/* ============================================================
   Silvra storefront: login / register / forgot / reset  (file: auth-split.css)
   One stylesheet for all four pages (replaces auth_minimal.css and
   auth_split_minimal.css). Named auth-split.css so it never collides with an
   existing auth.css. Every rule is scoped under .auth-page (the toast is the
   one exception and uses unique .auth-toast names).

   Layout: rounded split card. Left = banner (managed from Admin →
   Promotions, location "auth"), right = the form. Under 900px the
   banner is dropped and the form takes the full width.
   ============================================================ */

.auth-page {
    --au-gold: #f2b83a;
    --au-gold-deep: #dba636;
    --au-link: #8f6208;            /* darker gold: readable on white */
    --au-ink: #1c1a16;
    --au-ink2: #5d574b;
    --au-ink3: #8a8373;
    --au-line: #e6e1d6;
    --au-line-strong: #cfc7b6;
    --au-field: #faf9f6;
    --au-red: #c0392b;
    --au-green: #2f7d4f;
    --au-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

    padding: 40px 16px 56px;
    color: var(--au-ink);
}
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }

/* ── Shell ─────────────────────────────────────────────── */
.auth-page .auth-shell {
    max-width: 1040px; margin: 0 auto;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 640px;
    background: #fff; border: 1px solid var(--au-line); border-radius: 22px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(40,30,10,.05), 0 24px 60px rgba(40,30,10,.10);
}
.auth-page .auth-main { display: flex; align-items: center; justify-content: center; padding: 44px 40px; }
.auth-page .sa-card { width: 100%; max-width: 400px; }

/* ── Banner / brand panel ──────────────────────────────── */
.auth-page .auth-visual {
    position: relative; display: flex; flex-direction: column; justify-content: flex-end;
    padding: 40px; color: #fff; overflow: hidden;
    background-color: #1d1a14; background-size: cover; background-position: center;
}
.auth-page .auth-visual.is-brand {
    justify-content: space-between;
    background-image: radial-gradient(120% 90% at 20% 10%, #4a463d 0%, #25221c 55%, #14120e 100%);
}
.auth-page .auth-visual::before { /* legibility gradient, bottom heavy so the picture stays visible */
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(12,10,6,.28) 0%, rgba(12,10,6,0) 35%, rgba(12,10,6,.82) 100%);
}
.auth-page .auth-visual > * { position: relative; }
.auth-page .auth-visual .motif { position: absolute; right: -80px; bottom: -50px; width: 480px; height: 480px; opacity: .9; }
.auth-page .auth-visual-logo { font-family: var(--au-serif); font-weight: 700; font-size: 28px; }
.auth-page .auth-visual-logo span { color: var(--au-gold); }
.auth-page .auth-badge {
    align-self: flex-start; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--au-gold-deep);
}
.auth-page .auth-visual-title { font-family: var(--au-serif); font-size: 36px; line-height: 1.15; font-weight: 600; max-width: 16ch; margin: 0 0 10px; color: #fff; }
.auth-page .auth-visual-title em { font-style: normal; color: var(--au-gold); }
.auth-page .auth-visual-sub { font-size: 15.5px; line-height: 1.55; color: rgba(255,255,255,.82); max-width: 38ch; margin: 0; }
.auth-page .auth-cta {
    align-self: flex-start; margin-top: 20px; display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px; background: #fff; color: var(--au-ink); font-weight: 700; font-size: 14px; text-decoration: none;
    transition: transform .15s, box-shadow .15s;
}
.auth-page .auth-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.auth-page .auth-cta svg { width: 16px; height: 16px; }
@media (min-width: 900px) { .auth-page .auth-visual.has-image { background-image: var(--auth-bg); } } /* not downloaded on phones */

/* ── Headings ──────────────────────────────────────────── */
.auth-page .auth-brand { display: none; font-family: var(--au-serif); font-size: 26px; font-weight: 700; text-align: center; margin-bottom: 18px; }
.auth-page .sa-header { margin-bottom: 26px; }
.auth-page .sa-title { font-family: var(--au-serif); font-size: 32px; line-height: 1.15; font-weight: 600; margin: 0 0 6px; color: var(--au-ink); }
.auth-page .sa-subtitle { margin: 0; color: var(--au-ink2); font-size: 15px; }
.auth-page .sa-back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px; font-size: 14px; font-weight: 600; color: var(--au-link); text-decoration: none; }
.auth-page .sa-back-link:hover { text-decoration: underline; }

/* ── Fields ────────────────────────────────────────────── */
.auth-page .sa-form-group { margin-bottom: 16px; }
.auth-page .sa-form-label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; color: var(--au-ink); }
.auth-page .sa-form-label.sa-required::after { content: ' *'; color: var(--au-red); }
.auth-page .sa-input-wrapper { position: relative; }
.auth-page .sa-form-input {
    width: 100%; height: 48px; padding: 0 14px; border-radius: 12px;
    border: 1px solid var(--au-line-strong); background: var(--au-field); color: var(--au-ink);
    font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.auth-page .sa-input-wrapper .sa-form-input { padding-right: 48px; }
.auth-page .sa-form-input::placeholder { color: var(--au-ink3); }
.auth-page .sa-form-input:hover { border-color: var(--au-ink3); }
.auth-page .sa-form-input:focus { outline: 0; border-color: var(--au-gold-deep); background: #fff; box-shadow: 0 0 0 4px rgba(219,166,54,.28); }
.auth-page .sa-form-input.error { border-color: var(--au-red); box-shadow: 0 0 0 4px rgba(192,57,43,.10); }
.auth-page .sa-error-message { margin-top: 6px; font-size: 12.5px; color: var(--au-red); }
.auth-page .sa-password-toggle {
    position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border: 0; background: none; border-radius: 10px;
    display: grid; place-items: center; cursor: pointer; color: var(--au-ink3);
}
.auth-page .sa-password-toggle:hover { color: var(--au-ink); }

.auth-page .sa-password-strength { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.auth-page .sa-password-strength-bar { flex: 1; height: 5px; border-radius: 99px; background: var(--au-line); overflow: hidden; }
.auth-page .sa-password-strength-fill { height: 100%; width: 0; border-radius: inherit; transition: width .25s, background-color .25s; }
.auth-page .sa-password-strength-fill.weak { width: 33%;  background: var(--au-red); }
.auth-page .sa-password-strength-fill.medium { width: 66%;  background: #d98a1f; }
.auth-page .sa-password-strength-fill.strong { width: 100%; background: var(--au-green); }
.auth-page .sa-password-strength-text { font-size: 12.5px; font-weight: 600; color: var(--au-ink2); min-width: 54px; text-align: right; }

.auth-page .sa-form-options { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 20px; }
.auth-page .sa-checkbox-wrapper, .auth-page .sa-terms-label { display: flex; align-items: center; gap: 9px; color: var(--au-ink2); font-size: 14px; cursor: pointer; }
.auth-page .sa-checkbox-label { cursor: pointer; }
.auth-page .sa-form-checkbox { width: 18px; height: 18px; accent-color: var(--au-gold-deep); cursor: pointer; flex-shrink: 0; }
.auth-page .sa-form-checkbox.error { outline: 2px solid var(--au-red); outline-offset: 2px; }
.auth-page .sa-terms-wrapper { margin: 4px 0 20px; }
.auth-page .sa-terms-label { align-items: flex-start; line-height: 1.45; }
.auth-page .sa-terms-label a, .auth-page .sa-forgot-link, .auth-page .sa-footer-link { color: var(--au-link); font-weight: 600; text-decoration: none; }
.auth-page .sa-terms-label a:hover, .auth-page .sa-forgot-link:hover, .auth-page .sa-footer-link:hover { text-decoration: underline; }

/* ── Buttons ───────────────────────────────────────────── */
.auth-page .sa-btn-auth {
    position: relative; width: 100%; height: 50px; border-radius: 12px; border: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font: inherit; font-weight: 700; font-size: 15.5px; transition: filter .15s, box-shadow .15s, transform .05s, background-color .15s;
}
.auth-page .sa-btn-primary { background: linear-gradient(135deg, var(--au-gold), var(--au-gold-deep)); color: var(--au-ink); box-shadow: 0 8px 20px rgba(219,166,54,.28); }
.auth-page .sa-btn-primary:hover { filter: brightness(1.04); box-shadow: 0 10px 24px rgba(219,166,54,.38); }
.auth-page .sa-btn-primary:active { transform: translateY(1px); }
.auth-page .sa-btn-google { background: #fff; border: 1px solid var(--au-line-strong); color: var(--au-ink); font-weight: 600; }
.auth-page .sa-btn-google:hover { background: var(--au-field); }
.auth-page .sa-btn-auth:focus-visible, .auth-page .auth-cta:focus-visible { outline: 2px solid var(--au-gold-deep); outline-offset: 2px; }
.auth-page .sa-btn-auth:disabled { cursor: not-allowed; }
.auth-page .sa-btn-loading { pointer-events: none; }
.auth-page .sa-btn-loading > span { opacity: 0; }
.auth-page .sa-btn-loading::after {
    content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
    border: 3px solid rgba(28,26,22,.25); border-top-color: var(--au-ink); animation: au-spin .7s linear infinite;
}
@keyframes au-spin { to { transform: rotate(360deg); } }

.auth-page .auth-divider { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--au-ink3); font-size: 12.5px; font-weight: 600; letter-spacing: .08em; }
.auth-page .auth-divider::before, .auth-page .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--au-line); }
.auth-page .sa-footer { margin-top: 22px; text-align: center; color: var(--au-ink2); font-size: 14.5px; }

/* ── Messages ──────────────────────────────────────────── */
.auth-page .auth-alert { margin-bottom: 18px; padding: 11px 14px; border-radius: 10px; font-size: 14px; border: 1px solid transparent; }
.auth-page .auth-alert.success { background: rgba(47,125,79,.09); color: var(--au-green); border-color: rgba(47,125,79,.25); }
.auth-page .auth-alert.error { background: rgba(192,57,43,.08); color: var(--au-red); border-color: rgba(192,57,43,.25); }

.auth-toast {
    position: fixed; top: 20px; right: 20px; z-index: 10000; max-width: min(360px, calc(100vw - 40px));
    display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 12px;
    background: #fff; color: #1c1a16; font-size: 14px; font-weight: 500; box-shadow: 0 12px 34px rgba(0,0,0,.18); border: 1px solid #e6e1d6;
    transform: translateY(-14px); opacity: 0; transition: transform .25s, opacity .25s;
}
.auth-toast.show { transform: none; opacity: 1; }
.auth-toast .auth-toast-icon { width: 20px; height: 20px; flex-shrink: 0; }
.auth-toast.success { border-left: 4px solid #2f7d4f; } .auth-toast.success .auth-toast-icon { color: #2f7d4f; }
.auth-toast.error { border-left: 4px solid #c0392b; } .auth-toast.error   .auth-toast-icon { color: #c0392b; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 899px) {
    .auth-page { padding: 20px 14px 40px; }
    .auth-page .auth-shell { grid-template-columns: 1fr; min-height: 0; max-width: 480px; }
    .auth-page .auth-visual { display: none; }
    .auth-page .auth-brand { display: block; }
    .auth-page .auth-main { padding: 32px 24px 28px; }
    .auth-page .sa-header { text-align: center; }
}
@media (min-width: 900px) { .auth-page .auth-shell:has(.auth-visual) .auth-brand { display: none; } }
@media (max-width: 420px) { .auth-page .sa-title { font-size: 27px; } .auth-page .auth-main { padding: 28px 18px 24px; } }
@media (prefers-reduced-motion: reduce) { .auth-page *, .auth-toast { transition: none !important; animation: none !important; } }