/* Log in / Create account page, plus the "reset password" and "staff sign-in" dialogs.
   Loaded after welcome.css. Every id used by auth.js is unchanged. */
#login-screen.za-screen {
    --za-bg: #070912; --za-card: #0e1222; --za-line: #232b47; --za-line2: #33406a;
    --za-text: #f1f4fd; --za-dim: #a3adc8; --za-mute: #76809c; --za-blue: #3b82f6; --za-blue2: #60a5fa;
    --za-grad: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
    position: fixed; inset: 0; z-index: 1500; display: none; overflow-y: auto; padding: 24px;
    align-items: flex-start !important; justify-content: center;
    background:
        radial-gradient(60% 50% at 15% 0%, rgba(37, 99, 235, .28), transparent 70%),
        radial-gradient(50% 45% at 100% 100%, rgba(124, 58, 237, .22), transparent 70%),
        var(--za-bg) !important;
    animation: none !important; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--za-text);
}
.za-shell {
    width: 100%; max-width: 980px; margin: auto; display: grid; grid-template-columns: 1fr 1.05fr;
    border: 1px solid var(--za-line); border-radius: 26px; overflow: hidden; background: var(--za-card);
    box-shadow: 0 40px 100px rgba(0, 0, 0, .55), 0 0 60px rgba(37, 99, 235, .12);
    animation: zaIn .45s cubic-bezier(.2, .8, .2, 1);
}
@keyframes zaIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---- left panel ---- */
.za-aside {
    position: relative; padding: 44px 40px; display: flex; flex-direction: column; overflow: hidden;
    background: linear-gradient(160deg, #1d3fae 0%, #3730a3 55%, #5b21b6 100%);
}
.za-aside::before, .za-aside::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.za-aside::before { width: 380px; height: 380px; right: -150px; top: -130px; background: radial-gradient(circle, rgba(255, 255, 255, .2), transparent 65%); }
.za-aside::after { width: 320px; height: 320px; left: -130px; bottom: -140px; background: radial-gradient(circle, rgba(96, 165, 250, .32), transparent 65%); }
.za-aside > * { position: relative; z-index: 1; }
.za-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; color: #fff; }
.za-brand b { font-weight: 700; letter-spacing: -.01em; }
.za-brand i { font-style: normal; opacity: .7; font-weight: 600; }
.za-logo { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 19px; color: #fff; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); }
.za-aside h2 { margin: 56px 0 12px; font-size: 34px; line-height: 1.12; font-weight: 800; letter-spacing: -.025em; color: #fff; }
.za-aside > p { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .82); max-width: 34ch; }
.za-points { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 18px; }
.za-points li { display: flex; gap: 14px; align-items: flex-start; }
.za-points li > span { flex: none; width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); color: #fff; }
.za-points svg { width: 19px; height: 19px; }
.za-points div { font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .78); }
.za-points b { display: block; font-size: 14.5px; color: #fff; font-weight: 650; }
.za-aside-foot { margin-top: auto; padding-top: 36px; font-size: 12.5px; color: rgba(255, 255, 255, .7); }

/* ---- form card ---- */
#login-screen .login-container.za-card {
    background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important;
    padding: 36px 44px 32px !important; width: auto !important; max-width: none !important; margin: 0 !important;
    max-height: none !important; overflow: visible !important; animation: none !important; backdrop-filter: none !important;
}
#login-screen .login-container.za-card::before { display: none !important; }
.za-top { display: flex; align-items: center; justify-content: space-between; min-height: 36px; margin-bottom: 26px; }
.za-top .za-brand.sm { display: none; }
#login-screen .za-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 0 -8px; padding: 7px 12px 7px 6px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--za-dim) !important; cursor: pointer; text-decoration: none; transition: background .15s, color .15s; }
#login-screen .za-back:hover { background: rgba(255, 255, 255, .06); color: #fff !important; }
.za-back svg { width: 17px; height: 17px; }
#login-screen .login-header.za-head { text-align: left; margin: 0 0 22px; }
#login-screen .login-header.za-head::before { display: none !important; }
#login-screen .za-head h2 { font-size: 28px !important; font-weight: 800 !important; letter-spacing: -.02em !important; margin: 0 0 6px; color: #fff; -webkit-text-fill-color: #fff !important; background: none !important; }
#login-screen .za-head p { margin: 0; font-size: 14.5px; color: var(--za-dim) !important; }

#login-screen .auth-tabs.za-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 22px; border-radius: 14px; background: rgba(4, 6, 14, .7); border: 1px solid var(--za-line); }
#login-screen .za-tabs .auth-tab { padding: 10px 8px; border-radius: 10px; border: 0 !important; background: transparent !important; color: var(--za-dim) !important; font-size: 14px; font-weight: 600; text-align: center; cursor: pointer; transition: background .18s, color .18s; user-select: none; }
#login-screen .za-tabs .auth-tab:hover { color: #fff !important; }
#login-screen .za-tabs .auth-tab.active { background: var(--za-grad) !important; color: #fff !important; box-shadow: 0 6px 18px rgba(37, 99, 235, .35); }

.za-form { display: block; }
.za-field { margin: 0 0 14px; text-align: left; }
.za-field > label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: #d5dcf0; letter-spacing: 0; text-transform: none; }
.za-field small { display: block; margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--za-mute); }
.za-field small a, .za-note a, .za-legal a, .za-row a { color: var(--za-blue2) !important; text-decoration: none; cursor: pointer; }
.za-field small a:hover, .za-note a:hover, .za-legal a:hover, .za-row a:hover { text-decoration: underline; }
.za-screen .za-field input, .za-modal .za-field input {
    width: 100%; box-sizing: border-box; margin: 0 !important; padding: 13px 14px !important; font: 500 15px/1.3 inherit; font-family: inherit;
    color: #fff !important; background: rgba(4, 6, 14, .65) !important; border: 1px solid var(--za-line2, #33406a) !important; border-radius: 12px !important;
    outline: none; transition: border-color .15s, box-shadow .15s, background .15s; box-shadow: none !important;
}
.za-screen .za-field input::placeholder, .za-modal .za-field input::placeholder { color: #66708d !important; }
.za-screen .za-field input:hover, .za-modal .za-field input:hover { border-color: #46558a !important; }
.za-screen .za-field input:focus, .za-modal .za-field input:focus { border-color: #3b82f6 !important; box-shadow: 0 0 0 3.5px rgba(59, 130, 246, .24) !important; background: rgba(4, 6, 14, .9) !important; }
.za-screen .za-field input:disabled { opacity: .45; cursor: not-allowed; }
.za-field.bad input { border-color: #f87171 !important; box-shadow: 0 0 0 3.5px rgba(248, 113, 113, .18) !important; }
.za-pw { position: relative; }
.za-pw input { padding-right: 48px !important; }
.za-screen .za-pw .pw-toggle, .za-modal .za-pw .pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin: 0 !important; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #8c97b8 !important; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0; transition: background .15s, color .15s; }
.za-pw .pw-toggle:hover { background: rgba(255, 255, 255, .07); color: #fff !important; }
.za-pw .pw-toggle svg { width: 19px; height: 19px; }
.za-pw .pw-toggle.on { color: var(--za-blue2, #60a5fa) !important; }
.za-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 14px; font-size: 13px; }
.za-row a { font-weight: 600; }

.za-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 11px 12px; border-radius: 12px; border: 1px dashed var(--za-line2); background: rgba(59, 130, 246, .05); font-size: 12.5px; line-height: 1.5; color: var(--za-dim); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.za-check:hover { border-color: #46558a; }
.za-check input { flex: none; width: 17px !important; height: 17px; margin: 1px 0 0 !important; padding: 0 !important; accent-color: #3b82f6; cursor: pointer; }
.za-check b { color: #e6ebfa; font-weight: 600; }
.za-check:has(input:checked) { border-style: solid; border-color: rgba(59, 130, 246, .6); background: rgba(59, 130, 246, .1); }

.za-meter { display: none; align-items: center; gap: 5px; margin: -6px 0 14px; }
.za-meter.show { display: flex; }
.za-meter i { flex: 1; height: 4px; border-radius: 4px; background: #232b47; transition: background .2s; }
.za-meter span { flex: none; min-width: 74px; text-align: right; font-size: 11.5px; font-weight: 600; color: var(--za-mute); }
.za-meter[data-s="1"] i:nth-child(-n+1) { background: #f87171; } .za-meter[data-s="1"] span { color: #f87171; }
.za-meter[data-s="2"] i:nth-child(-n+2) { background: #fbbf24; } .za-meter[data-s="2"] span { color: #fbbf24; }
.za-meter[data-s="3"] i:nth-child(-n+3) { background: #60a5fa; } .za-meter[data-s="3"] span { color: #60a5fa; }
.za-meter[data-s="4"] i:nth-child(-n+4) { background: #34d399; } .za-meter[data-s="4"] span { color: #34d399; }

.za-screen .auth-msg, .za-modal .auth-msg { min-height: 0; margin: 0; padding: 0; font-size: 13px; line-height: 1.5; text-align: left; border-radius: 11px; }
.za-screen .auth-msg:not(:empty), .za-modal .auth-msg:not(:empty) { margin: 0 0 14px; padding: 10px 12px 10px 36px; border: 1px solid; background-repeat: no-repeat; background-position: 11px 11px; background-size: 17px; animation: zaShake .3s; }
.za-screen .auth-msg.error:not(:empty), .za-modal .auth-msg.error:not(:empty) { color: #fecaca !important; border-color: rgba(248, 113, 113, .4); background-color: rgba(248, 113, 113, .1); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f87171' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16.500v.01'/%3E%3C/svg%3E"); }
.za-screen .auth-msg.success:not(:empty), .za-modal .auth-msg.success:not(:empty) { color: #bbf7d0 !important; border-color: rgba(52, 211, 153, .4); background-color: rgba(52, 211, 153, .1); animation: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.500l2.800 2.800L16 9.500'/%3E%3C/svg%3E"); }
.za-screen .auth-msg:not(.error):not(.success):not(:empty), .za-modal .auth-msg:not(.error):not(.success):not(:empty) { padding-left: 12px; color: var(--za-dim, #a3adc8); border-color: #232b47; }
@keyframes zaShake { 0%, 100% { transform: none; } 30% { transform: translateX(-4px); } 65% { transform: translateX(4px); } }

.za-screen .za-btn, .za-modal .za-btn {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; box-sizing: border-box; margin: 0 !important; padding: 13px 18px !important;
    font: 650 15px/1.2 inherit; font-family: inherit; letter-spacing: 0 !important; text-transform: none; color: #fff !important; cursor: pointer;
    border: 1px solid transparent !important; border-radius: 12px !important; background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%) !important;
    box-shadow: 0 10px 26px rgba(37, 99, 235, .32) !important; transition: filter .15s, transform .12s, background .15s, border-color .15s;
}
.za-screen .za-btn:hover:not(:disabled), .za-modal .za-btn:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.za-screen .za-btn:active:not(:disabled), .za-modal .za-btn:active:not(:disabled) { transform: none; }
.za-screen .za-btn:disabled, .za-modal .za-btn:disabled { opacity: .65; cursor: progress; }
.za-screen .za-btn.ghost, .za-modal .za-btn.ghost { background: transparent !important; border-color: var(--za-line2, #33406a) !important; color: #e3e8f7 !important; box-shadow: none !important; }
.za-screen .za-btn.ghost:hover:not(:disabled), .za-modal .za-btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .05) !important; border-color: #4b5b92 !important; filter: none; }
.za-btn.sm { width: auto !important; padding: 10px 16px !important; font-size: 14px !important; }
.za-btn.busy { color: transparent !important; }
.za-btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: zaSpin .7s linear infinite; }
@keyframes zaSpin { to { transform: rotate(360deg); } }

.za-legal { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--za-mute); text-align: center; }
.za-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; font-size: 12px; color: var(--za-mute); }
.za-or::before, .za-or::after { content: ""; flex: 1; height: 1px; background: var(--za-line); }
.za-google { justify-content: center; margin: 0 0 10px; }
.za-note { margin: 12px 0 0; font-size: 12px; line-height: 1.55; color: var(--za-mute); text-align: center; }
#login-screen[data-mode="register"] .za-card > .za-note:last-of-type { margin-top: 8px; }

/* ---- dialogs (reset password, staff sign-in) ---- */
.modal.za-modal { position: fixed; inset: 0; z-index: 1600; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(3, 5, 12, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
.za-modal .modal-content.za-dialog { width: 100%; max-width: 420px; box-sizing: border-box; margin: 0; padding: 28px 28px 22px; max-height: calc(100vh - 36px); overflow-y: auto; text-align: left; color: #f1f4fd; background: #0e1222 !important; border: 1px solid #2a3355 !important; border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: zaIn .3s cubic-bezier(.2, .8, .2, 1); }
.za-dialog-ic { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; color: #93c5fd; background: rgba(59, 130, 246, .14); border: 1px solid rgba(59, 130, 246, .3); }
.za-dialog-ic.staff { color: #fcd34d; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .3); }
.za-dialog-ic svg { width: 23px; height: 23px; }
.za-dialog h3 { margin: 0 0 6px; font-size: 20px; font-weight: 750; letter-spacing: -.01em; color: #fff !important; text-align: left; }
.za-dialog p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: #a3adc8; }
.za-dialog .za-note { text-align: left; margin-top: 14px; padding-top: 14px; border-top: 1px solid #232b47; color: #76809c; }
.za-dialog .za-note b { color: #c9d1e8; }
.za-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.za-modal .za-field input.za-code { text-transform: uppercase; letter-spacing: .35em; text-align: center; font-size: 19px !important; font-weight: 700; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.za-modal .za-field input.za-code::placeholder { letter-spacing: .05em; font-weight: 500; font-size: 14px; }
#forgot-sending { text-align: center; padding: 22px 0 !important; }

/* ---- phones and small windows ---- */
@media (max-width: 860px) {
    #login-screen.za-screen { padding: 0; }
    .za-shell { grid-template-columns: 1fr; max-width: 480px; min-height: 100%; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    .za-aside { display: none; }
    #login-screen .login-container.za-card { padding: 22px 20px 28px !important; }
    .za-top .za-brand.sm { display: flex; }
    .za-top .za-brand.sm .za-logo { background: var(--za-grad); border: 0; width: 32px; height: 32px; font-size: 17px; border-radius: 10px; }
    .za-screen .za-field input, .za-modal .za-field input { font-size: 16px !important; }
    .za-dialog-actions .za-btn.sm { flex: 1; }
    .za-modal .modal-content.za-dialog { padding: 22px 20px 18px; }
}
@media (prefers-reduced-motion: reduce) { .za-shell, .za-dialog, .auth-msg { animation: none !important; } }
