/* ==========================================================================
   CFdating: Log in (start.php) + Create profile (register.php)
   One responsive stylesheet shared by both pages.
   Tokens: Ink #0F2A24 · Body #3F5A53 · Muted #5E7670 · Deep green #13705A
           Green #1E9E80 · Mint #8FE3C7 · Page #F6FBF9 · Tint #E1F2EC · Rule #C5DDD4
   Breakpoint: 760px. Above it: split screen (app panel | form card).
               At or below it: app card on top, then the web form.
   ========================================================================== */

.auth *, .auth *::before, .auth *::after { box-sizing: border-box; }

body.auth {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #E1F2EC;
    font-family: 'Space Grotesk', Helvetica, Arial, sans-serif;
    color: #0F2A24;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}
.auth a { color: #13705A; text-decoration: none; }
.auth a:hover { color: #0F2A24; }
.auth h1, .auth h2, .auth p, .auth ul { margin: 0; }
.auth :focus-visible { outline: 3px solid #1E9E80; outline-offset: 2px; border-radius: 6px; }

.bg-rings { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bg-ring { position: absolute; width: 640px; height: 640px; border-radius: 50%; bottom: -330px; pointer-events: none; }
.bg-ring--1 { left: -200px; border: 60px solid rgba(53, 191, 156, .18); }
.bg-ring--2 { left: 280px; border: 60px solid rgba(30, 158, 128, .12); }

.shell { position: relative; width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* ---------- Header ---------- */
.auth-header { padding-top: 18px; padding-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.auth-logo { display: flex; }
.auth-logo img { height: 30px; width: auto; display: block; }
.auth-header-right { display: flex; align-items: center; gap: 18px; }
.switch-text { font: 400 15px/1.3 'Space Grotesk', sans-serif; color: #3F5A53; }
.switch-text a { font-weight: 700; }
.auth a.pill { background: #0F2A24; color: #FFFFFF; padding: 13px 20px; border-radius: 999px; font: 700 15px/1 'Space Grotesk', sans-serif; white-space: nowrap; }
.auth a.pill:hover { background: #1E9E80; color: #FFFFFF; }
.switch-link-sm { display: none; }

/* ---------- Layout ---------- */
.auth-main { flex: 1; padding-top: 24px; padding-bottom: 56px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }

/* ---------- App panel ---------- */
.app-panel { background: #0F2A24; color: #FFFFFF; border-radius: 32px; padding: 48px 48px 0; display: flex; flex-direction: column; gap: 22px; position: relative; overflow: hidden; }
.app-panel-ring { position: absolute; width: 380px; height: 380px; border-radius: 50%; top: -150px; right: -120px; border: 44px solid rgba(53, 191, 156, .14); pointer-events: none; }
.app-panel > *:not(.app-panel-ring):not(.panel-phones) { position: relative; }
.panel-kicker { font: 700 13px/1 'Space Grotesk', sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #8FE3C7; }
.panel-title { font: 700 40px/1.05 'Space Grotesk', sans-serif; letter-spacing: -0.035em; max-width: 460px; }
.panel-sub { display: none; font: 400 15px/1.45 'Space Grotesk', sans-serif; color: #B9D3CB; }
.panel-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; font: 400 16px/1.4 'Space Grotesk', sans-serif; color: #B9D3CB; }
.panel-list li { display: flex; gap: 10px; }
.panel-list svg { flex: none; }
.auth .panel-list a { color: #FFFFFF; text-decoration: underline; text-decoration-color: #8FE3C7; text-underline-offset: 3px; }
.auth .panel-list a:hover { color: #8FE3C7; }

.store-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.auth a.store-btn { height: 52px; padding: 0 18px; border-radius: 12px; background: #FFFFFF; color: #0F2A24; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.auth a.store-btn:hover { background: #8FE3C7; color: #0F2A24; }
.store-btn svg { flex: none; fill: #0F2A24; }
.store-btn-text { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.store-btn-text small { font: 500 10px/1 'Space Grotesk', sans-serif; }
.store-btn-text strong { font: 700 17px/1 'Space Grotesk', sans-serif; }

.panel-phones { position: relative; margin-top: auto; padding-top: 12px; height: 300px; display: flex; justify-content: center; align-items: flex-start; }
.phone { position: relative; overflow: hidden; aspect-ratio: 900 / 1928; border-radius: 9.78% / 4.56%; background: #0A0A0A; flex: none; }
.phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.phone--back { width: 205px; margin-top: 46px; margin-right: -22px; transform: rotate(-5deg); box-shadow: 0 24px 50px rgba(0, 0, 0, .4); }
.phone--front { width: 225px; z-index: 2; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); }

/* ---------- Form card ---------- */
.form-card { background: #FFFFFF; border-radius: 32px; padding: 52px 52px 44px; display: flex; flex-direction: column; justify-content: center; gap: 24px; box-shadow: 0 24px 60px rgba(15, 42, 36, .08); }
.form-card .or-divider { display: none; }
.form-head { display: flex; flex-direction: column; gap: 10px; }
.form-head h1 { font: 700 40px/1.05 'Space Grotesk', sans-serif; letter-spacing: -0.035em; }
.form-head p { font: 400 17px/1.5 'Space Grotesk', sans-serif; color: #3F5A53; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-label { font: 700 14px/1 'Space Grotesk', sans-serif; }
.field-link { font: 500 14px/1 'Space Grotesk', sans-serif; }
.field-hint { font: 400 13px/1.3 'Space Grotesk', sans-serif; color: #5E7670; }
.auth a.forgot-sm { display: none; }
.field { width: 100%; height: 52px; padding: 0 16px; border: 1.5px solid #C5DDD4; border-radius: 12px; background: #FFFFFF; font: 400 16px/1 'Space Grotesk', sans-serif; color: #0F2A24; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.field:focus { border-color: #1E9E80; box-shadow: 0 0 0 4px rgba(30, 158, 128, .18); }
.field::placeholder { color: #7F948F; }
.field[aria-invalid="true"] { border-color: #B3261E; }
.pw-wrap { position: relative; }
.pw-wrap .field { padding-right: 76px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; height: 40px; min-width: 56px; padding: 0 12px; border: 0; border-radius: 9px; background: #E1F2EC; color: #0F2A24; font: 700 13px/1 'Space Grotesk', sans-serif; cursor: pointer; }
.checks { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.check-row { display: flex; gap: 12px; align-items: flex-start; font: 400 15px/1.45 'Space Grotesk', sans-serif; color: #3F5A53; cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: #0F2A24; cursor: pointer; }
.recaptcha-slot { min-height: 78px; }
.form-error { display: none; padding: 12px 14px; border-radius: 12px; background: #FCEDEC; color: #8C1D18; font: 500 15px/1.4 'Space Grotesk', sans-serif; }
.form-error.is-visible { display: block; }
.btn-primary { height: 56px; border: 0; border-radius: 12px; background: #0F2A24; color: #FFFFFF; font: 700 17px/1 'Space Grotesk', sans-serif; cursor: pointer; transition: background-color .15s ease; }
.btn-primary:hover { background: #1E9E80; }
.btn-primary[disabled] { opacity: .7; cursor: progress; }
.text-divider { display: flex; align-items: center; gap: 14px; color: #5E7670; font: 500 13px/1 'Space Grotesk', sans-serif; }
.text-divider::before, .text-divider::after { content: ""; flex: 1; height: 1px; background: #DCEBE5; }
.auth a.btn-outline { height: 52px; border: 1.5px solid #0F2A24; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #0F2A24; font: 700 16px/1 'Space Grotesk', sans-serif; }
.auth a.btn-outline:hover { background: #E1F2EC; }
.switch-line { text-align: center; font: 400 15px/1.4 'Space Grotesk', sans-serif; color: #3F5A53; }
.switch-line a { font-weight: 700; display: inline-block; padding: 10px 2px; }

/* ---------- Footer ---------- */
.auth-footer { padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font: 400 14px/1.4 'Space Grotesk', sans-serif; color: #3F5A53; }
.auth-footer nav { display: flex; gap: 20px; }
.auth .auth-footer a { color: #3F5A53; }
.auth .auth-footer a:hover { color: #0F2A24; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Single-card pages (forgot-password.php) ---------- */
.single-main { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 32px; padding-bottom: 56px; }
.single-card { width: 100%; max-width: 520px; background: #FFFFFF; border-radius: 32px; padding: 48px; display: flex; flex-direction: column; gap: 22px; box-shadow: 0 24px 60px rgba(15, 42, 36, .08); }
.single-card[hidden] { display: none; }
.single-icon { width: 56px; height: 56px; border-radius: 50%; background: #E1F2EC; display: flex; align-items: center; justify-content: center; flex: none; }
.single-icon--done { background: #1E9E80; }
.single-card h1 { font: 700 36px/1.08 'Space Grotesk', sans-serif; letter-spacing: -0.03em; }
.single-card p { font: 400 17px/1.55 'Space Grotesk', sans-serif; color: #3F5A53; }
.single-card .auth-form { gap: 16px; }
.auth a.back-link { display: inline-flex; align-items: center; gap: 8px; align-self: center; padding: 10px 4px; font: 700 15px/1 'Space Grotesk', sans-serif; }
.single-note { font: 400 15px/1.5 'Space Grotesk', sans-serif; color: #3F5A53; }
.auth .link-button { all: unset; cursor: pointer; color: #13705A; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.auth .link-button:hover { color: #0F2A24; }
.auth .link-button:focus-visible { outline: 3px solid #1E9E80; outline-offset: 2px; border-radius: 4px; }
.app-strip { width: 100%; max-width: 520px; background: #0F2A24; color: #FFFFFF; border-radius: 24px; padding: 18px 18px 18px 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; position: relative; overflow: hidden; }
.app-strip-text { display: flex; align-items: center; gap: 12px; }
.app-strip-text img { width: 36px; height: auto; flex: none; }
.app-strip-text span { display: flex; flex-direction: column; gap: 3px; }
.app-strip-text strong { font: 700 15px/1.2 'Space Grotesk', sans-serif; }
.app-strip-text small { font: 400 13px/1.3 'Space Grotesk', sans-serif; color: #B9D3CB; }
.app-strip-btns { display: flex; gap: 8px; }
.auth a.strip-store { height: 44px; padding: 0 14px; border-radius: 10px; background: #FFFFFF; color: #0F2A24; display: inline-flex; align-items: center; gap: 8px; font: 700 14px/1 'Space Grotesk', sans-serif; }
.auth a.strip-store:hover { background: #8FE3C7; color: #0F2A24; }
.strip-store svg { fill: #0F2A24; flex: none; }
.auth a.btn-primary, .auth a.btn-primary:hover { display: flex; align-items: center; justify-content: center; color: #FFFFFF; }

/* ==========================================================================
   ≤ 980px: stack form under panel (tablet)
   ========================================================================== */
@media (max-width: 980px) {
    .pair { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ≤ 760px: approved mobile layout
   ========================================================================== */
@media (max-width: 760px) {
    body.auth { background: #F6FBF9; }
    .bg-rings { display: none; }
    .shell { padding-left: 16px; padding-right: 16px; }

    .auth-header-wrap { background: #E1F2EC; }
    .auth-header { padding-top: 12px; padding-bottom: 12px; gap: 12px; }
    .auth-logo img { height: 26px; }
    .switch-text, .auth a.pill { display: none; }
    .auth a.switch-link-sm { display: flex; align-items: center; height: 44px; padding: 0 4px; font: 700 15px/1 'Space Grotesk', sans-serif; }

    .auth-main { padding-top: 0; padding-bottom: 32px; }
    .split { display: block; }

    /* App card sits on the tint band */
    .app-band { background: #E1F2EC; margin: 0 -16px; padding: 8px 16px 24px; }
    .app-panel { border-radius: 24px; padding: 24px 20px 20px; gap: 14px; }
    .app-panel-ring { width: 200px; height: 200px; top: -80px; right: -70px; border-width: 28px; border-color: rgba(53, 191, 156, .16); }
    .panel-kicker { font-size: 11px; }
    .panel-title { font-size: 26px; line-height: 1.08; letter-spacing: -0.03em; max-width: 210px; }
    .panel-sub { display: block; max-width: 210px; }
    .panel-list { gap: 8px; font-size: 14px; line-height: 1.35; max-width: 220px; }
    .panel-list li { gap: 8px; }
    .panel-list svg { width: 16px; height: 16px; margin-top: 1px; }
    .panel-list .desktop-only { display: none; }
    .page-login .panel-list { display: none; }

    .store-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; z-index: 3; }
    .panel-phones { z-index: 1; }
    .auth a.store-btn { padding: 0 8px; gap: 8px; }
    .store-btn-text small { font-size: 9px; }
    .store-btn-text strong { font-size: 15px; }

    .panel-phones { position: absolute; right: 16px; top: 22px; margin: 0; padding: 0; height: auto; display: block; }
    .phone--back { display: none; }
    .phone--front { width: 104px; transform: rotate(6deg); box-shadow: 0 16px 32px rgba(0, 0, 0, .4); }

    .form-card { background: transparent; box-shadow: none; border-radius: 0; padding: 28px 0 0; gap: 22px; }
    .form-card .or-divider { display: flex; }
    .form-head h1 { font-size: 30px; letter-spacing: -0.03em; }
    .form-head p { font-size: 15px; }
    .page-login .form-head p { display: none; }
    .auth-form { gap: 16px; }
    .field-row .field-link { display: none; }
    .auth a.forgot-sm { display: inline-block; align-self: flex-start; padding: 6px 0; font: 500 14px/1 'Space Grotesk', sans-serif; }
    .login-divider { display: none; }

    .auth-footer { flex-direction: column-reverse; gap: 10px; font-size: 13px; padding-top: 8px; }

    .page-single .auth-header-wrap { padding-bottom: 8px; }
    .single-main { padding-top: 20px; padding-bottom: 32px; gap: 12px; }
    .single-card { border-radius: 24px; padding: 28px 20px; gap: 18px; box-shadow: 0 12px 30px rgba(15, 42, 36, .06); }
    .single-card h1 { font-size: 28px; }
    .single-card p { font-size: 16px; }
    .app-strip { border-radius: 20px; padding: 16px; }
    .app-strip-btns { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth a.strip-store { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .auth *, .auth *::before, .auth *::after { transition: none !important; }
}
