/* Profile Page Styles - Minimalistic Design */

/* Page Layout */
.profile-page {
    min-height: 100vh;
    background: #ffffff;
    padding: 100px 0 60px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 1rem;
    color: #9ca3af;
}

/* Profile Content Layout */
.profile-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar - Minimalistic */
.profile-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.profile-card {
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

/* Avatar Section - Clean */
.profile-avatar-section {
    padding: 30px 20px;
    text-align: center;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    cursor: pointer;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f0f0;
    transition: all 0.3s ease;
}

.avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay i {
    color: white;
    font-size: 1.5rem;
}

.profile-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.profile-email {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    color: #10b981;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Navigation - Minimal */
.profile-nav {
    padding: 0;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: none;
    border: none;
    border-left: 2px solid transparent;
    color: #6b7280;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.nav-item i {
    font-size: 1rem;
    width: 18px;
}

.nav-item:hover {
    background: #f9fafb;
    color: var(--primary-color);
}

.nav-item.active {
    background: #fef2f2;
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

/* Main Content - Clean */
.profile-main {
    min-height: 500px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.2s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Content Cards - Minimal */
.content-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    padding: 30px;
    margin-bottom: 20px;
}

.card-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f5f5f5;
}

.card-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.card-header p {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Forms - Minimal */
.profile-form {
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group label i {
    color: #9ca3af;
    font-size: 0.85rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.2s ease;
    background: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.form-group input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
    color: #9ca3af;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Info Box */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-box i {
    color: #3b82f6;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box p {
    color: #1e40af;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Email Display */
.email-display {
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Password Input */
.password-input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Password Strength - Minimal */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 3px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: #ef4444;
    transition: all 0.3s ease;
}

.strength-bar.weak::before {
    width: 33%;
    background: #ef4444;
}

.strength-bar.medium::before {
    width: 66%;
    background: #f59e0b;
}

.strength-bar.strong::before {
    width: 100%;
    background: #10b981;
}

.strength-text {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Buttons - Minimal */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f5f5f5;
}

.btn {
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* Timeline Styles */
.visits-timeline {
    position: relative;
    padding-left: 20px;
}

.visits-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    padding-bottom: 25px;
    padding-left: 15px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #edf2f7;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.timeline-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.timeline-title {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 2px;
}

.timeline-time {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-secondary {
    background: #f5f5f5;
    color: var(--secondary-color);
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-outline {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Connected Accounts - Minimal */
.connected-accounts {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #f5f5f5;
}

.connected-accounts h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.google-icon {
    font-size: 1.8rem;
    color: #4285f4;
}

.account-info strong {
    display: block;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 0.95rem;
}

.account-info p {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Preferences - Minimal */
.preference-section {
    margin-bottom: 30px;
}

.preference-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preference-section h4 i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* Toggle Switch - Minimal */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.toggle-item:hover {
    border-color: #e5e7eb;
}

.toggle-info strong {
    display: block;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.toggle-info p {
    color: #9ca3af;
    font-size: 0.85rem;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--primary-color);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(22px);
}

/* Radio Group - Minimal */
.radio-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.radio-option {
    position: relative;
    cursor: pointer;
}

.radio-option input {
    position: absolute;
    opacity: 0;
}

.radio-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.radio-option input:checked+span {
    background: #fef2f2;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.radio-option:hover span {
    border-color: #e5e7eb;
}

/* Activity List - Minimal */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: white;
    border-color: #e5e7eb;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.login {
    background: #eff6ff;
    color: #3b82f6;
}

.activity-icon.update {
    background: #f0fdf4;
    color: #10b981;
}

.activity-icon.security {
    background: #fef3c7;
    color: #f59e0b;
}

.activity-details strong {
    display: block;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.activity-details p {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Danger Zone - Minimal */
.danger-zone {
    border: 1px solid #fee2e2;
    background: #fef2f2;
}

.danger-zone .card-header {
    border-bottom-color: #fecaca;
}

.danger-zone .card-header h3 {
    color: #dc2626;
}

.danger-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.danger-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: white;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

.danger-item strong {
    display: block;
    color: #dc2626;
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.danger-item p {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Loading Overlay - Minimal */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .profile-content {
        grid-template-columns: 260px 1fr;
        gap: 20px;
    }

    .content-card {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .profile-page {
        padding: 90px 0 40px;
    }

    .page-title {
        font-size: 2rem;
    }

    .profile-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .profile-sidebar {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .radio-group {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .account-item,
    .danger-item {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .account-info {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .content-card {
        padding: 20px;
    }

    .profile-avatar-section {
        padding: 24px 16px;
    }

    .avatar-wrapper {
        width: 90px;
        height: 90px;
    }

    .profile-name {
        font-size: 1.2rem;
    }
}

/* Shared account-page layout */
.profile-page.account-page {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: start;
    gap: 34px;
    width: 100%;
    max-width: 1280px;
    min-height: calc(100vh - 60px);
    margin: 0 auto;
    padding: 136px 32px 80px;
    background: #f8f9fa;
    color: #20242b;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.account-sidebar {
    position: sticky;
    top: 88px;
    align-self: start;
    padding-top: 20px;
}

.account-nav {
    display: grid;
    gap: 5px;
}

.account-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 9px;
    color: #646b73;
    font-size: 0.84rem;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.account-nav a i {
    width: 16px;
    color: #8b929a;
    text-align: center;
}

.account-nav a:hover,
.account-nav a.active {
    background: #f0f1f2;
    color: #20242b;
}

.account-nav a.active {
    font-weight: 600;
}

.account-nav a.active i {
    color: #f52008;
}

.profile-workspace.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 22px;
    color: #9098a3;
    font-size: 0.76rem;
}

.breadcrumbs a {
    color: #59616b;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #20242b;
}

.breadcrumbs i {
    font-size: 0.58rem;
}

.profile-page .page-header {
    margin-bottom: 22px;
    text-align: left;
}

.profile-page .page-title {
    margin: 0;
    color: #20242b;
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -0.04em;
}

.profile-page .page-subtitle {
    margin: 7px 0 0;
    color: #68717d;
    font-size: 0.9rem;
}

.profile-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    max-width: none;
    margin: 0;
}

.profile-sidebar {
    position: static;
    top: auto;
    height: auto;
}

.profile-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid #eef0f2;
    text-align: left;
}

.avatar-wrapper {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    margin: 0;
}

.profile-avatar {
    border: 1px solid #e5e7eb;
}

.profile-avatar-section .profile-name {
    margin: 0 0 2px;
    color: #20242b;
    font-size: 0.92rem;
    font-weight: 600;
}

.profile-avatar-section .profile-email {
    margin: 0 0 5px;
    color: #68717d;
    font-size: 0.78rem;
}

.profile-badge {
    gap: 5px;
    padding: 3px 8px;
    background: #edf5f1;
    color: #356b55;
    font-size: 0.68rem;
}

.profile-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 0 12px;
}

.profile-nav .nav-item {
    width: auto;
    min-height: 44px;
    flex: 0 0 auto;
    gap: 8px;
    padding: 0 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: #646b73;
    font-family: inherit;
    font-size: 0.78rem;
    white-space: nowrap;
}

.profile-nav .nav-item i {
    width: auto;
    font-size: 0.82rem;
}

.profile-nav .nav-item:hover {
    background: #fafbfc;
    color: #20242b;
}

.profile-nav .nav-item.active {
    border-bottom-color: #f52008;
    background: #fff;
    color: #c51b09;
}

.profile-main {
    min-width: 0;
    min-height: 0;
}

.content-card {
    margin-bottom: 14px;
    padding: 24px;
    border-color: #e5e7eb;
    border-radius: 12px;
    box-shadow: none;
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom-color: #eef0f2;
}

.card-header h3 {
    color: #20242b;
    font-size: 1.15rem;
}

.card-header h3 i,
.preference-section h4 i {
    color: #f52008;
}

.card-header p {
    margin: 4px 0 0;
    color: #68717d;
}

.profile-page .form-group input,
.profile-page .form-group textarea,
.profile-page .email-display,
.profile-page .btn {
    font-family: inherit;
}

.profile-page .form-group input,
.profile-page .form-group textarea {
    border-color: #e1e4e7;
    background: #fafbfc;
}

.profile-page .form-group input:focus,
.profile-page .form-group textarea:focus {
    border-color: #f52008;
    box-shadow: 0 0 0 3px rgba(245, 32, 8, 0.1);
}

.profile-page .form-group label {
    color: #39414a;
}

.profile-page .form-hint,
.profile-page .page-subtitle {
    color: #68717d;
}

.profile-page .btn-primary {
    background: #f52008;
}

.profile-page .btn-primary:hover {
    background: #d91c08;
    box-shadow: none;
}

.profile-page .btn-secondary {
    background: #f1f3f5;
    color: #354052;
}

.profile-page .btn-secondary:hover {
    background: #e7e9ec;
}

.profile-page .nav-item:focus-visible,
.account-nav a:focus-visible,
.breadcrumbs a:focus-visible,
.profile-page .btn:focus-visible {
    outline: 2px solid #f52008;
    outline-offset: 3px;
}

@media (max-width: 760px) {
    .profile-page.account-page {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding: 120px 24px 64px;
    }

    .account-sidebar {
        position: static;
        top: auto;
        padding-top: 0;
    }

    .account-nav {
        display: flex;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 3px;
    }

    .account-nav a {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 0 11px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .profile-page.account-page {
        gap: 14px;
        padding: 112px 14px 48px;
    }

    .breadcrumbs {
        margin-bottom: 17px;
    }

    .profile-page .page-title {
        font-size: 1.6rem;
    }

    .profile-avatar-section {
        padding: 12px 14px;
    }

    .content-card {
        padding: 18px;
    }

    .profile-nav {
        padding: 0 8px;
    }

    .profile-nav .nav-item {
        padding: 0 9px;
    }
}