/* ------------------------------------------------------------------ */
/* auth.css - Shared frosted-glass layout for the public auth pages    */
/* (login.php, register.php, forgot_password.php)                      */
/* Palette: monochrome (black & white) with #049785 accent.            */
/* ------------------------------------------------------------------ */

html, body { min-height: 100%; }

body.auth-page {
    /* Scoped palette override: teal accent instead of the portal indigo */
    --primary: #049785;
    --primary-hover: #037a6c;
    --primary-soft: rgba(4, 151, 133, 0.16);

    /* Local radius scale (less rounded than before) */
    --auth-radius: 10px;
    --auth-radius-sm: 6px;

    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    color: #111827;
    background: #0b0b0d;
}

/* Monochrome background image (grayscale) */
body.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background: url('../bg_review.jpg') center / cover no-repeat;
    filter: grayscale(100%) contrast(0.95) brightness(0.5);
}
/* Dark neutral wash for contrast */
body.auth-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(150deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.4) 45%, rgba(0, 0, 0, 0.72) 100%);
}

/* ---------- Header ---------- */
header.auth-header {
    position: sticky;
    top: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.75rem !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12) !important;
    color: #111827 !important;
}
.auth-header .brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}
.auth-header .brand img { height: 34px; width: auto; display: block; }
.auth-header .brand .brand-text {
    font-weight: 800;
    font-size: 1.05rem;
    color: #111827;
    letter-spacing: -0.01em;
}
.auth-header .header-cta {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1.1rem;
    border: 1px solid var(--primary);
    border-radius: var(--auth-radius-sm);
    background: var(--primary);
    transition: background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}
.auth-header .header-cta:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* ---------- Hamburger button ---------- */
.auth-burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    position: relative;
    z-index: 70;
}
.auth-burger .bar {
    display: block;
    width: 100%;
    height: 2.5px;
    border-radius: 2px;
    background: #111827;
    transition: transform 0.3s ease, opacity 0.2s ease, background 0.3s ease;
    transform-origin: center;
}
.auth-burger.open .bar:nth-child(1) { transform: translateY(8.75px) rotate(45deg); }
.auth-burger.open .bar:nth-child(2) { opacity: 0; }
.auth-burger.open .bar:nth-child(3) { transform: translateY(-8.75px) rotate(-45deg); }

/* ---------- Mobile slide-in nav ---------- */
.auth-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.auth-mobile-overlay.open { opacity: 1; pointer-events: auto; }

.auth-mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    width: 270px;
    max-width: 82vw;
    height: 100vh;
    padding: 84px 0 24px;
    background: #111114;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}
.auth-mobile-nav.open { transform: translateX(0); }
.auth-mobile-nav a {
    display: block;
    padding: 15px 28px;
    color: #f3f4f6;
    text-decoration: none;
    font-size: 1.02rem;
    font-weight: 600;
    border-left: 3px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}
.auth-mobile-nav a:hover,
.auth-mobile-nav a.active {
    background: rgba(4, 151, 133, 0.16);
    border-left-color: var(--primary);
    color: #ffffff;
    padding-left: 33px;
}
.auth-mobile-nav .auth-mobile-label {
    padding: 0 28px 10px;
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---------- Main ---------- */
.auth-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}
.auth-shell { width: 100%; max-width: 440px; }
.auth-shell.auth-shell-wide { max-width: 760px; }

.auth-intro { text-align: center; margin-bottom: 1.75rem; }
.auth-intro h1 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.auth-intro p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
    margin-top: 0.4rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

/* ---------- Frosted card ---------- */
.auth-card {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--auth-radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    padding: 2.5rem;
}
.auth-card h2 { color: #111827; }
.auth-card label { color: #111827; }
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card select,
.auth-card textarea {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: var(--auth-radius-sm);
}
.auth-card textarea { resize: vertical; min-height: 150px; }
.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.auth-card .field-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0.3rem 0 0;
}
.auth-card .btn { border-radius: var(--auth-radius-sm); }

.auth-error {
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 0.85rem 1rem;
    background-color: rgba(254, 226, 226, 0.92);
    color: #b91c1c;
    border: 1px solid rgba(185, 28, 28, 0.25);
    border-radius: var(--auth-radius-sm);
    font-size: 0.9rem;
    text-align: center;
}
.auth-error ul { margin: 0.5rem 0 0 1.2rem; text-align: left; }

.auth-success {
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 0.85rem 1rem;
    background-color: rgba(209, 250, 240, 0.92);
    color: #036c5f;
    border: 1px solid rgba(4, 151, 133, 0.3);
    border-radius: var(--auth-radius-sm);
    font-size: 0.9rem;
    text-align: center;
}

.turnstile-wrap {
    display: flex;
    justify-content: center;
    margin: 1.25rem 0 0.25rem;
}

.auth-divider {
    margin: 1.75rem 0;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.auth-alt {
    text-align: center;
    font-size: 0.95rem;
    color: #4b5563;
    margin: 0;
}
.auth-alt a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.auth-footer {
    z-index: 20;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    padding: 1.5rem;
    text-align: center;
}
.auth-footer p { margin: 0.15rem 0; font-size: 0.82rem; color: rgba(255, 255, 255, 0.78); }
.auth-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.82rem;
}
.auth-footer .footer-links a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 600;
}
.auth-footer .footer-links a:hover { color: #37d3bd; text-decoration: underline; }
.auth-footer .footer-links .sep { color: rgba(255, 255, 255, 0.35); }

/* ---------- Responsive ---------- */
@media (min-width: 641px) {
    .auth-mobile-nav,
    .auth-mobile-overlay { display: none !important; }
}
@media (max-width: 640px) {
    .auth-header .header-cta { display: none; }
    .auth-burger { display: flex; }
}
@media (max-width: 520px) {
    header.auth-header { padding: 0.75rem 1rem !important; }
    .auth-header .brand .brand-text { display: none; }
    .auth-card { padding: 1.75rem; }
}
