/* PandaMenu — shared auth-page styles (login / register / forgot / reset /
   verify). Layout lives in templates/auth/_layout.html. Tokens mirror
   md-files/DESIGN_SYSTEM.md — see its "Auth pages" section. */

:root {
    --brand: #E61821;
    --brand-dark: #B01018;
    --brand-soft: #FEF2F2;
    --ink: #0F111A;
    --ink-2: #1F2937;
    --muted: #6B7280;
    --line: #E7E5E4;
    --line-2: #D6D3D1;
    --cream: #FAFAF9;
    --green: #16a34a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    min-height: 100vh; min-height: 100dvh;
    background: #fff;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink-2);
}

/* ───── Split layout: brand panel (left, ≥ 992px) · form (right) ───── */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
@media (max-width: 991px) { .auth { grid-template-columns: minmax(0, 1fr); } }

.auth-aside {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 36px 48px;
    background: var(--cream); border-right: 1px solid var(--line);
}
@media (max-width: 991px) { .auth-aside { display: none; } }
/* Soft brand glow — decorative. */
.auth-aside::before {
    content: ""; position: absolute; width: 420px; height: 420px; right: -160px; top: -140px;
    background: radial-gradient(circle, rgba(230, 24, 33, .10), transparent 65%);
    pointer-events: none;
}
.auth-aside .logo img { height: 38px; width: auto; }
.aside-body { position: relative; max-width: 440px; }
.aside-eyebrow {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
    font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.aside-eyebrow::before { content: ""; width: 1.5rem; height: 2px; border-radius: 999px; background: var(--brand); }
.aside-body h2 { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 26px; }
.aside-body h2 .accent { color: var(--brand); }
.aside-points { display: grid; gap: 16px; list-style: none; margin-bottom: 30px; }
.aside-points li { display: flex; align-items: flex-start; gap: 12px; }
.aside-points i {
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px;
    background: var(--brand-soft); color: var(--brand);
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.aside-points b { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.aside-points span { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Mock order ticket — decorative, generic data. */
.mock-ticket {
    width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 24px 48px -28px rgba(15, 17, 26, .35); padding: 16px 18px; transform: rotate(-2deg);
}
.mock-ticket .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mock-ticket .where { display: flex; align-items: center; gap: 10px; }
.mock-ticket .where i { width: 32px; height: 32px; border-radius: 9px; background: var(--cream); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--ink); }
.mock-ticket .where b { display: block; font-size: 13.5px; color: var(--ink); }
.mock-ticket .where small { font-size: 11.5px; color: var(--muted); }
.mock-ticket .new { padding: 2px 7px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-dark); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.mock-ticket .line { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); padding: 4px 0; }
.mock-ticket .total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 14px; font-weight: 800; color: var(--ink); }
.mock-ticket .track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 12px; }
.mock-ticket .track span { height: 4px; border-radius: 2px; background: var(--line); }
.mock-ticket .track span.on { background: var(--ink); }
.aside-foot { position: relative; font-size: 12px; color: var(--muted); }

/* ───── Form column ───── */
.auth-main { display: flex; flex-direction: column; min-width: 0; padding: 28px 24px 18px; }
.auth-main-top { display: none; text-align: center; margin-bottom: 24px; }
.auth-main-top img { height: 36px; width: auto; }
@media (max-width: 991px) { .auth-main-top { display: block; } }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; }
@media (max-width: 991px) { .auth-center { align-items: flex-start; padding-top: 8px; } .auth-main { padding-top: 24px; } }
.auth-card { width: 100%; max-width: 400px; }
.auth-card.center { text-align: center; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px;
    font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 1.5rem; height: 2px; border-radius: 999px; background: var(--brand); }
h1 { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 8px; }
.sub { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin-bottom: 24px; }
.sub b { color: var(--ink); font-weight: 600; word-break: break-word; }
@media (max-width: 480px) { h1 { font-size: 23px; } }

/* Fields */
.field { margin-bottom: 16px; text-align: left; }
.field label, .label-row label {
    display: block; margin-bottom: 8px;
    font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.label-link { font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.label-link:hover { color: var(--brand); }
.input { position: relative; }
.input > i.lead {
    position: absolute; top: 50%; left: 14px; transform: translateY(-50%);
    color: var(--muted); font-size: 15px; pointer-events: none;
}
.input input {
    width: 100%; height: 48px; padding: 0 14px 0 42px;
    border: 1px solid var(--line-2); border-radius: 10px; background: #fff;
    font-family: inherit; font-size: 15px; color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.input input::placeholder { color: var(--muted); opacity: .65; }
.input input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15, 17, 26, .06); }
.input.has-eye input { padding-right: 46px; }
.input .eye {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    width: 36px; height: 36px; border: none; border-radius: 8px; background: transparent;
    color: var(--muted); font-size: 16px; cursor: pointer;
}
.input .eye:hover { background: var(--cream); color: var(--ink); }
.field.is-invalid input { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(230, 24, 33, .08); }
.field-note { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 12.5px; color: var(--muted); }
.field-note.warn { color: #B45309; }
.field-note[hidden] { display: none; }

/* Live checks (password rules) */
/* Password rules. Hidden until the person starts typing — an empty field
   has not failed anything yet, and a row of grey "requirements" above an
   untouched box reads as an error state.
   Taken OUT OF FLOW rather than just made invisible: reserving the row's
   height left a band of empty space above the Terms checkbox on an
   untouched form, which is worse than the alternative. The shift when it
   appears is fine here — it happens in response to the person's own
   keystroke, not on page load, which is the case the reserve-the-space
   rule exists for. */
.checks { display: none; }
.checks.is-typing {
    display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -6px 0 16px;
    font-size: 12.5px; color: var(--muted); text-align: left;
}
.checks span { display: inline-flex; align-items: center; gap: 5px; }
.checks span.ok { color: #166534; }
.checks i { font-size: 13px; }

/* Checkboxes */
.check { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 20px; font-size: 13px; color: var(--ink-2); line-height: 1.5; cursor: pointer; text-align: left; }
.check input { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; accent-color: var(--brand); cursor: pointer; }
.check a { color: var(--ink); font-weight: 600; text-decoration: none; }
.check a:hover { color: var(--brand); }

/* Buttons */
.btn-primary, .btn-outline {
    width: 100%; height: 48px; padding: 0 18px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 10px; font-family: inherit; font-size: 15px; font-weight: 600;
    text-decoration: none; cursor: pointer;
    transition: background .18s, border-color .18s, box-shadow .18s, transform .18s, opacity .18s;
}
.btn-primary { background: var(--brand); color: #fff; border: none; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); color: #fff; box-shadow: 0 8px 20px -8px rgba(230, 24, 33, .45); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
.btn-outline:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.btn-outline:disabled { color: var(--muted); cursor: not-allowed; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-outline .spinner { border-color: rgba(15, 17, 26, .15); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.alt { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--muted); }
.alt a { color: var(--ink); font-weight: 600; text-decoration: none; }
.alt a:hover { color: var(--brand); }
.trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.trust i { color: var(--green); margin-right: 4px; }

/* Messages — shown above the form (no blue: info = cream) */
.msg { display: none; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; text-align: left; }
.msg.show { display: flex; }
.msg i { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.msg a { color: inherit; font-weight: 600; }
.msg.danger { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid rgba(230, 24, 33, .18); }
.msg.success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.msg.info { background: var(--cream); color: var(--ink-2); border: 1px solid var(--line); }

/* Status states (verify / pending / sent / done) */
.status-icon {
    width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 20px;
    background: var(--brand-soft); color: var(--brand);
    display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.status-icon.success { background: #DCFCE7; color: var(--green); }
.status-icon.neutral { background: var(--cream); color: var(--ink); border: 1px solid var(--line); }
.auth-card.center .eyebrow { justify-content: center; }
.email-chip {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
    margin: -8px 0 22px; padding: 8px 12px; border-radius: 10px;
    background: var(--cream); border: 1px solid var(--line);
    font-size: 13.5px; font-weight: 600; color: var(--ink); word-break: break-all;
}
.email-chip i { color: var(--muted); }
.steps { list-style: none; display: grid; gap: 10px; margin: 0 0 22px; padding: 14px 16px; border-radius: 12px; background: var(--cream); border: 1px solid var(--line); text-align: left; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.steps i { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.verify-spinner { width: 28px; height: 28px; border: 3px solid rgba(230, 24, 33, .18); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }

/* Footer — in the flow (never covers the form on short screens) */
.auth-foot { padding-top: 24px; text-align: center; font-size: 12px; color: var(--muted); }
.auth-foot a { color: var(--ink-2); text-decoration: none; font-weight: 500; margin: 0 4px; }
.auth-foot a:hover { color: var(--ink); }
[hidden] { display: none !important; }
