:root { --login-primary: #ed6b4d; }
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: #181d27; font-family: 'Inter', Arial, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
.login-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; padding: 16px; gap: 16px; }
.login-panel { width: 80%; max-width: 760px; min-width: 0; margin: 0 auto; display: grid; grid-template-rows: auto 1fr auto; padding: 22px 0 10px; gap: 48px; }
.login-brand { display: flex; justify-content: center; align-items: center; gap: 11px; min-height: 36px; }
.login-brand img { max-width: 240px; max-height: 60px; width: auto; height: auto; object-fit: contain; }
.login-brand-name { font-size: 28px; font-weight: 600; letter-spacing: -.7px; overflow-wrap: anywhere; }
.login-brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; color: var(--login-primary); }
.login-brand-mark svg { width: 100%; height: 100%; }
.login-content { align-self: center; padding-bottom: 12px; }
.login-content h1 { margin: 0 0 10px; font-size: 24px; font-weight: 700; line-height: 1.3; letter-spacing: -.45px; }
.login-intro { margin: 0 0 24px; color: #6b7280; line-height: 1.6; overflow-wrap: anywhere; }
.login-field { margin-bottom: 22px; }
.login-field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.login-input-wrap { position: relative; }
.login-field input { width: 100%; height: 42px; border: 1px solid #dce2eb; border-radius: 5px; background: #fff; color: #181d27; padding: 9px 46px 9px 12px; box-shadow: 0 2px 4px #10182805; outline: none; transition: border-color .15s, box-shadow .15s; }
.login-field input:focus { border-color: var(--login-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--login-primary) 15%, transparent); }
.login-input-icon, .login-password-toggle svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.login-input-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: #475467; }
.login-password-toggle { position: absolute; top: 0; right: 2px; height: 42px; width: 42px; border: 0; border-radius: 4px; background: transparent; color: #475467; display: grid; place-items: center; cursor: pointer; }
.login-password-toggle[hidden] { display: none; }
.login-password-toggle:hover { color: var(--login-primary); }
.login-password-toggle[aria-pressed=true] .password-eye-slash { display: none; }
.login-submit { display: block; width: 100%; min-height: 42px; padding: 11px 16px; margin-top: 6px; border: 0; border-radius: 5px; background: var(--login-primary); color: #fff; font-weight: 600; cursor: pointer; transition: filter .15s; }
.login-submit:hover { filter: brightness(.92); }
.login-submit:focus-visible, .login-password-toggle:focus-visible { outline: 2px solid var(--login-primary); outline-offset: 3px; }
.login-help { margin: 19px 0 0; color: #6b7280; font-size: 13px; line-height: 1.7; }
.login-options-row { display: flex; align-items: center; justify-content: space-between; margin: -10px 0 20px; }
.login-remember-me { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: #475467; cursor: pointer; user-select: none; }
.login-remember-me input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--login-primary); cursor: pointer; margin: 0; }
.login-error { margin-bottom: 20px; padding: 12px 14px; color: #b42318; background: #fef3f2; border: 1px solid #fecdca; border-radius: 6px; line-height: 1.5; overflow-wrap: anywhere; }
.login-success { margin-bottom: 20px; padding: 12px 14px; color: #027a48; background: #ecfdf3; border: 1px solid #a6f4c5; border-radius: 6px; line-height: 1.5; overflow-wrap: anywhere; }
.otp-badge-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.otp-shield-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: color-mix(in srgb, var(--login-primary) 12%, transparent); color: var(--login-primary); flex-shrink: 0; }
.otp-shield-icon svg { width: 20px; height: 20px; }
.otp-reauth-notice { margin: 0 0 16px; padding: 10px 14px; background: #f0f9ff; border: 1px solid #b9e6fe; border-radius: 6px; font-size: 13px; color: #026aa2; line-height: 1.5; }
.otp-digits-wrapper { display: flex; justify-content: space-between; gap: 8px; margin: 24px 0 24px; }
.otp-digit { width: 100%; max-width: 54px; height: 58px; font-size: 24px; font-weight: 700; text-align: center; border: 1.5px solid #dce2eb; border-radius: 8px; background: #fff; color: #181d27; outline: none; transition: all .15s ease; box-shadow: 0 2px 4px #10182805; font-family: monospace; }
.otp-digit:focus { border-color: var(--login-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--login-primary) 20%, transparent); transform: translateY(-1px); }
.otp-digit.is-filled { border-color: #98a2b3; background: #fcfcfd; }
.otp-resend-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #f2f4f7; }
.otp-resend-row .login-help { margin: 0; }
.otp-resend-btn { background: none; border: 0; padding: 0; font-size: 13.5px; font-weight: 600; color: var(--login-primary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; transition: opacity .15s; }
.otp-resend-btn:disabled { color: #98a2b3; text-decoration: none; cursor: not-allowed; }
.otp-resend-btn:not(:disabled):hover { opacity: .85; }
.otp-back-link { margin-top: 24px; text-align: center; }
.login-cancel { font-size: 13px; color: #6b7280; text-decoration: none; font-weight: 500; }
.login-cancel:hover { color: #181d27; text-decoration: underline; }
.login-footer { padding: 0 0 3px; text-align: center; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.login-visual { position: sticky; top: 16px; height: calc(100vh - 32px); height: calc(100dvh - 32px); min-height: 420px; overflow: hidden; border-radius: 10px; background: #f2f4f7; }
.login-visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
@media (max-width: 1100px) { .login-panel { width: 88%; } .login-brand-name { font-size: 24px; } .login-brand img { max-width: 200px; } }
@media (max-width: 991px) {
    .login-page { grid-template-columns: minmax(0, 1fr); padding: 24px; }
    .login-panel { width: 100%; max-width: 480px; padding: 12px 0 0; gap: 48px; }
    .login-visual { display: none; }
    .login-content { padding: 0; }
    .login-field input { font-size: 16px; height: 46px; }
    .login-password-toggle { height: 46px; }
    .login-submit { min-height: 46px; }
    .login-footer { padding-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.login-options-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.login-forgot { order: 2; font-weight: 600; }
.login-forgot, .login-back, .login-recovery-actions a, .login-text-button { color: var(--login-primary); text-decoration: none; }
.login-forgot:hover, .login-back:hover, .login-recovery-actions a:hover, .login-text-button:hover { text-decoration: underline; }
.login-success { background: #ecfdf5; border: 1px solid #a7f3d0; padding: 12px; border-radius: 8px; color: #065f46; margin-bottom: 20px; line-height: 1.5; }
.login-recovery-note { color: #334155; background: #f8fafc; border: 1px solid #dbe2eb; padding: 12px; border-radius: 8px; margin-bottom: 20px; line-height: 1.6; }
.login-field > small { display: block; font-size: 12px; color: #475569; margin-top: 7px; }
.login-recovery-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: 13px; }
.login-text-button { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.login-text-button:disabled { color: #475569; cursor: not-allowed; text-decoration: none; font-variant-numeric: tabular-nums; }
.login-text-button:focus-visible { outline: 2px solid var(--login-primary); outline-offset: 4px; }
.login-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* =========================================================
   DESIGN 2: DIAGONAL GRADIENT WAVE & FLOATING CARD
   ========================================================= */
body.login-theme-wave { background: #ffffff; color: #181d27; overflow-x: hidden; }
.wave-stage { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 36px 18px 28px; overflow: hidden; }
.wave-bg {
    position: fixed; left: -12%; right: -12%; bottom: -22vh; height: 68vh; z-index: 0; pointer-events: none;
    border-top-left-radius: 56px; border-top-right-radius: 56px;
    background: linear-gradient(122deg, #4f46e5 0%, #7c3aed 45%, #ec4899 100%);
    transform: rotate(-7deg); box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.wave-wrap { position: relative; z-index: 1; width: 100%; max-width: 450px; display: flex; flex-direction: column; align-items: center; }
.wave-brand { margin-bottom: 20px; }
.wave-brand img { max-height: 52px; }
.wave-card {
    width: 100%; background: #ffffff; border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 18px; padding: 36px 34px 30px;
    box-shadow: 0 24px 60px -12px rgba(15, 23, 42, .22), 0 4px 16px rgba(15, 23, 42, .06);
}
.wave-title { margin: 0 0 6px; font-size: 26px; font-weight: 800; text-align: center; letter-spacing: -.02em; color: #111827; }
.wave-sub { margin: 0 0 24px; font-size: 13.5px; text-align: center; color: #64748b; }
.wave-field { margin-bottom: 18px; }
.wave-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.wave-label-row label { margin-bottom: 0; }
.wave-forgot { font-size: 12.5px; font-weight: 600; color: #6366f1; text-decoration: none; }
.wave-forgot:hover { text-decoration: underline; }
.wave-field input { padding: 10px 44px 10px 40px; height: 44px; border-radius: 9px; border-color: #dbe2eb; }
.wave-field input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .16); }
.wave-left-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; stroke: #94a3b8; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.wave-remember { margin: 2px 0 18px; font-size: 13px; color: #475569; }
.wave-submit {
    min-height: 46px; border-radius: 10px; font-size: 14.5px; font-weight: 600;
    background: linear-gradient(135deg, #5b4df5 0%, #7c3aed 100%);
    box-shadow: 0 8px 20px rgba(99, 102, 241, .32);
}
.wave-submit:hover { filter: brightness(1.06); }
.wave-footer { margin-top: 22px; text-align: center; font-size: 12px; color: rgba(255,255,255,.9); text-shadow: 0 1px 2px rgba(0,0,0,.15); }
@media (max-width: 520px) { .wave-card { padding: 28px 22px 24px; } .wave-bg { height: 55vh; bottom: -16vh; } }

/* =========================================================
   DESIGN 3: MIDNIGHT ARCHITECTURAL DARK SPLIT
   ========================================================= */
body.login-theme-dark { background: #070b14; color: #f8fafc; }
.dark-page { display: grid; grid-template-columns: 1.08fr 1fr; min-height: 100vh; min-height: 100dvh; }
.dark-hero { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 48px; background: #0b1120; }
.dark-hero-media { position: absolute; inset: 0; height: 100%; top: 0; border-radius: 0; background: #0b1120; }
.dark-hero-media img { opacity: .48; filter: saturate(.85) contrast(1.06); }
.dark-hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,11,20,.35) 0%, rgba(7,11,20,.88) 70%, #070b14 100%); }
.dark-hero-inner { position: relative; z-index: 2; max-width: 520px; }
.dark-pill { display: inline-block; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #e2e8f0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; backdrop-filter: blur(8px); }
.dark-hero-inner h2 { margin: 0 0 12px; font-size: 32px; line-height: 1.2; font-weight: 800; letter-spacing: -.025em; color: #fff; }
.dark-hero-inner p { margin: 0 0 26px; font-size: 14.5px; line-height: 1.65; color: #cbd5e1; }
.dark-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: 12px; color: #94a3b8; }
.dark-metrics span { display: block; font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.dark-panel { display: flex; align-items: center; justify-content: center; padding: 36px 28px; background: radial-gradient(circle at top right, rgba(59,130,246,.14), transparent 55%), #070b14; }
.dark-card { width: 100%; max-width: 440px; padding: 36px 34px; border-radius: 20px; background: rgba(15, 23, 42, .88); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 25px 60px rgba(0,0,0,.5); backdrop-filter: blur(12px); }
.dark-brand { justify-content: flex-start; margin-bottom: 24px; }
.dark-brand .login-brand-name { color: #fff; font-size: 22px; }
.dark-brand img { filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); background: rgba(255,255,255,.94); padding: 6px 10px; border-radius: 8px; }
.dark-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.dark-intro { margin: 0 0 24px; font-size: 13.5px; color: #94a3b8; }
.login-theme-dark .login-field label { color: #cbd5e1; }
.login-theme-dark .login-field input { background: #1e293b; border-color: #334155; color: #f8fafc; border-radius: 10px; height: 44px; }
.login-theme-dark .login-field input::placeholder { color: #64748b; }
.login-theme-dark .login-field input:focus { border-color: var(--login-primary); background: #0f172a; }
.login-theme-dark .login-input-icon, .login-theme-dark .login-password-toggle { color: #94a3b8; }
.login-theme-dark .login-remember-me { color: #cbd5e1; }
.login-theme-dark .login-forgot { color: #93c5fd; }
.dark-submit { min-height: 46px; border-radius: 10px; font-size: 14.5px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.dark-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); text-align: center; font-size: 12px; color: #64748b; }
.login-theme-dark .login-field > small,
.login-theme-dark .login-help,
.login-theme-dark .login-cancel { color: #94a3b8; }
.login-theme-dark .login-back,
.login-theme-dark .login-recovery-actions a,
.login-theme-dark .login-text-button,
.login-theme-dark .otp-resend-btn { color: #93c5fd; }
.login-theme-dark .login-recovery-note,
.login-theme-dark .otp-reauth-notice { background: rgba(30, 58, 138, .28); border-color: rgba(96, 165, 250, .35); color: #dbeafe; }
.login-theme-dark .otp-digit { background: #1e293b; border-color: #334155; color: #f8fafc; }
.login-theme-dark .otp-digit.is-filled { background: #0f172a; border-color: #60a5fa; }
.login-theme-dark .otp-resend-row { border-top-color: rgba(255,255,255,.1); }
.login-theme-wave .wave-card .login-help { text-align: center; }
.login-theme-wave .wave-card .login-back,
.login-theme-wave .wave-card .login-recovery-actions a,
.login-theme-wave .wave-card .login-text-button,
.login-theme-wave .wave-card .otp-resend-btn { color: #6366f1; }
@media (max-width: 991px) {
    .dark-page { grid-template-columns: 1fr; }
    .dark-hero { display: none; }
    .dark-card { padding: 28px 22px; }
}