﻿.nav-messages-link {
    position: relative;
}

.nav-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 9px;
    margin-left: 4px;
    line-height: 1;
    animation: badge-pop 0.3s cubic-bezier(0.2, 0.8, 0.4, 1.2);
}

@keyframes badge-pop {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

/* ============================================================
   My Account — Modern Tabbed Layout
   ============================================================ */

.acct-auth-notice {
    text-align: center;
    padding: 4rem 2rem;
}

/* ── Two-column layout ── */
.acct-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    min-height: 60vh;
}

/* ── Sidebar ── */
.acct-sidebar {
    position: sticky;
    top: calc(var(--nav-height, 60px) + 1rem);
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.acct-sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--color-surface);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.acct-sidebar-name {
    margin: 0.75rem 0 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.acct-sidebar-email {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

/* ── Sidebar Nav ── */
.acct-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--color-surface);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 0.5rem;
    overflow: hidden;
}

.acct-nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: left;
    width: 100%;
}

    .acct-nav-item:hover {
        background: rgba(0, 0, 0, 0.03);
        color: var(--color-text);
    }

.acct-nav-active {
    background: var(--color-primary) !important;
    color: #fff !important;
    font-weight: 600;
}

.acct-nav-icon {
    font-size: 0.95rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Sidebar Quick Links ── */
.acct-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.25rem;
}

.acct-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-accent);
    text-decoration: none;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s;
}

    .acct-sidebar-link:hover {
        background: rgba(0, 0, 0, 0.03);
    }

.acct-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 9px;
    margin-left: auto;
}

/* ── Main Content Area ── */
.acct-main {
    min-width: 0;
}

.acct-section {
    background: var(--color-surface);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 2rem;
}

.acct-section-title {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.acct-section-desc {
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.acct-subsection-title {
    margin: 1.75rem 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* ── Forms ── */
.acct-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.acct-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

    .acct-form-group label {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--color-text);
    }

.acct-input {
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
}

    .acct-input:focus {
        outline: none;
        border-color: var(--color-accent);
        box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.12);
    }

.acct-textarea {
    resize: vertical;
    min-height: 80px;
}

.acct-hint {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 0.2rem;
}

.acct-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* ── Avatar Upload ── */
.acct-avatar-upload {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.acct-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.acct-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: var(--color-bg);
    border: 2px dashed rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.acct-avatar-upload-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    flex: 1;
}

.acct-uploading {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 600;
    margin-top: 0.35rem;
}

/* ── Privacy Toggles ── */
.acct-privacy-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.acct-toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--color-bg);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

    .acct-toggle-row:hover {
        background: rgba(0, 0, 0, 0.03);
    }

    .acct-toggle-row input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-top: 2px;
        accent-color: var(--color-primary);
        flex-shrink: 0;
    }

.acct-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.acct-toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

.acct-toggle-hint {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* ── Security Section ── */
.acct-security-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.acct-security-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.acct-security-value {
    display: block;
    font-size: 0.95rem;
    color: var(--color-text);
    margin-top: 0.15rem;
}

.acct-change-form {
    padding: 1.25rem;
    background: var(--color-bg);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.acct-security-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ── Toast Notifications ── */
.acct-toast {
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 1rem;
    animation: acct-toast-in 0.25s ease;
}

@keyframes acct-toast-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.acct-toast-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.acct-toast-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.acct-toast-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .acct-layout {
        grid-template-columns: 1fr;
    }

    .acct-sidebar {
        position: static;
    }

    .acct-sidebar-profile {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
    }

    .acct-sidebar-name {
        margin-top: 0;
    }

    .acct-sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0.35rem;
        gap: 0;
    }

    .acct-nav-item {
        white-space: nowrap;
        padding: 0.5rem 0.85rem;
        font-size: 0.82rem;
    }

    .acct-nav-icon {
        display: none;
    }

    .acct-sidebar-links {
        flex-direction: row;
        gap: 0.75rem;
    }
}

@media (max-width: 600px) {
    .acct-form-row {
        grid-template-columns: 1fr;
    }

    .acct-section {
        padding: 1.25rem;
    }

    .acct-avatar-upload {
        flex-direction: column;
        align-items: flex-start;
    }
}
