/* ── Auth Modal ── */

/* Nav Sign In button */
.nav-signin {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    transition: all 0.2s;
    cursor: pointer;
    background: none;
    font-family: inherit;
    line-height: 1;
}
.nav-signin:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
}
.nav-signin svg { flex-shrink: 0; }

/* Authenticated nav links (Dashboard, Account, Sign Out) — plain text, no border */
.nav-auth-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    padding: 0;
    line-height: 1;
}
.nav-auth-link:hover { color: #fff; }
.nav-auth-link svg { flex-shrink: 0; }

/* Overlay */
.auth-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-modal-overlay.open {
    display: flex;
}

/* Card */
.auth-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    animation: modalIn 0.18s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

/* Close button */
.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.auth-modal-close:hover { color: #0a1628; background: #f1f5f9; }

/* Tabs */
.auth-modal-tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}
.auth-modal-tab {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 0 12px;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
    font-family: inherit;
}
.auth-modal-tab.active {
    color: #0a1628;
    border-bottom-color: #22c55e;
}
.auth-modal-tab:hover { color: #0a1628; }

/* Tab content */
.auth-modal-tab-content { display: none; }
.auth-modal-tab-content.active { display: block; }

/* Form groups */
.auth-modal-group {
    margin-bottom: 14px;
}
.auth-modal-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #0a1628;
    margin-bottom: 5px;
}
.auth-modal-group .required { color: #ef4444; }
.auth-modal-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #0a1628;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.auth-modal-group input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.auth-modal-group input::placeholder { color: #94a3b8; }

/* Password field with eye toggle */
.auth-modal-pw-wrap {
    position: relative;
}
.auth-modal-pw-wrap input { padding-right: 44px; }
.auth-modal-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.auth-modal-pw-toggle:hover { color: #0a1628; }

/* Two-column row for names */
.auth-modal-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Remember me */
.auth-modal-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    user-select: none;
}
.auth-modal-remember input[type="checkbox"] {
    accent-color: #0d9488;
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Submit button */
.auth-modal-btn {
    width: 100%;
    padding: 13px;
    background: #0a1628;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 16px;
    font-family: inherit;
}
.auth-modal-btn:hover { background: #1a3a5c; }
.auth-modal-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Alert messages */
.auth-modal-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    color: #dc2626;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
}

/* Footer link */
.auth-modal-footer {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    margin: 0;
}
.auth-modal-footer a {
    color: #0d9488;
    text-decoration: none;
    font-weight: 500;
}
.auth-modal-footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 480px) {
    .auth-modal-box { padding: 28px 18px 24px; }
    .auth-modal-row2 { grid-template-columns: 1fr; }
}
