/* Auth Screen */

#auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(180deg, #0d1420 0%, #111a2c 100%);
    overflow-y: auto;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, #1a2438 0%, #162030 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--r-lg);
    padding: 36px 32px 32px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 24px 64px rgba(0, 0, 0, 0.5);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.auth-logo .logo-mark {
    width: 40px;
    height: 40px;
    font-size: 16px;
    border-radius: 12px;
    box-shadow: none;
}

.auth-logo h1 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -0.03em;
    margin: 0;
}

.auth-tabs {
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    height: 38px;
    border: none;
    background: transparent;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.auth-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-2);
}

.auth-tab.active {
    background: linear-gradient(180deg, #6a7ff0 0%, var(--accent) 100%);
    color: #fff;
}

.auth-form .form-group {
    margin-bottom: 14px;
}

.auth-form .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.auth-form .form-group input {
    width: 100%;
    box-sizing: border-box;
}

.auth-error {
    min-height: 20px;
    font-size: 13px;
    color: var(--danger);
    margin-bottom: 14px;
    font-weight: 600;
}

.auth-form .btn-primary {
    width: 100%;
    justify-content: center;
    height: 46px;
    font-size: 14px;
    margin-top: 4px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-3);
    cursor: pointer;
    margin-bottom: 6px;
    user-select: none;
}

.auth-remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Account page */

.account-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 560px;
}

.account-danger {
    border-color: rgba(224, 78, 100, 0.3);
}

.account-danger .panel-header h3 {
    color: var(--danger);
}

.account-info-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 14px;
    color: var(--text-2);
}

.account-info-row:last-child {
    border-bottom: none;
}

.account-info-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 100px;
}

/* Sidebar user area */

.sidebar-user-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 8px;
    min-width: 0;
}

.sidebar-username {
    flex: 1;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.btn-icon-xs {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-3);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}

.btn-icon-xs:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-1);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px 24px;
        border-radius: 20px;
    }

    .sidebar-user-row {
        display: none;
    }
}
