@import url("./tailwind.css?v=20260724-ajax2");

:root {
    --background: #f8fafc;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --primary: #0f4c81;
    --primary-foreground: #ffffff;
    --secondary: #f1f5f9;
    --secondary-foreground: #172033;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --accent: #e8f1f8;
    --accent-foreground: #123f65;
    --destructive: #dc2626;
    --destructive-soft: #fef2f2;
    --border: #e2e8f0;
    --input: #cbd5e1;
    --ring: #3b82f6;
    --radius: 0.75rem;
    --shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 30px rgba(15,23,42,.07);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { color-scheme: light; }
body {
    min-height: 100vh;
    color: var(--foreground);
    background: var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
::selection { color: var(--foreground); background: #bfdbfe; }

.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;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px,.86fr) minmax(520px,1.14fr);
}

.brand-panel {
    position: relative;
    overflow: hidden;
    padding: 48px clamp(36px,5vw,72px);
    display: flex;
    flex-direction: column;
    color: #f8fafc;
    background:
        radial-gradient(circle at 15% 5%,rgba(56,189,248,.18),transparent 26rem),
        linear-gradient(160deg,#0b1f35,#0e3558 62%,#0b4566);
}
.brand-panel::after {
    content: "";
    position: absolute;
    right: -11rem;
    bottom: -12rem;
    width: 27rem;
    height: 27rem;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    box-shadow: 0 0 0 4rem rgba(255,255,255,.025),0 0 0 8rem rgba(255,255,255,.015);
}

.brand, .mobile-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
}
.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.brand-copy { position: relative; z-index: 1; max-width: 590px; margin: auto 0; }
.brand-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(36px,4.2vw,60px);
    line-height: 1.06;
    letter-spacing: -.045em;
}
.eyebrow {
    margin: 0 0 14px;
    color: #7dd3fc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.eyebrow.dark { margin-bottom: 10px; color: var(--primary); }
.lead { max-width: 530px; margin: 0; color: #cbd5e1; font-size: 16px; line-height: 1.7; }
.panel-footer { position: relative; z-index: 1; margin: 0; color: #94a3b8; font-size: 12px; }

.trust-list {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
}
.trust-list > div { padding-top: 13px; display: flex; gap: 9px; border-top: 1px solid rgba(255,255,255,.14); }
.trust-list span { color: #7dd3fc; font-size: 11px; font-weight: 700; }
.trust-list p { margin: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.trust-list small { color: #94a3b8; }

.auth-panel {
    padding: 40px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 100% 0,rgba(59,130,246,.06),transparent 25rem),
        var(--background);
}
.auth-card {
    width: min(100%,460px);
    padding: 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
}
.auth-card.ui-card { border-color: var(--border); }
.mobile-brand { display: none; margin-bottom: 30px; color: var(--foreground); }
.mobile-brand .brand-mark { color: var(--primary); background: var(--accent); border-color: var(--border); }
.auth-card h2 { margin: 0 0 10px; font-size: 27px; line-height: 1.25; letter-spacing: -.025em; }
.muted { margin: 0 0 24px; color: var(--muted-foreground); font-size: 14px; line-height: 1.6; }

.button {
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--primary-foreground);
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 9px;
    box-shadow: 0 1px 2px rgba(15,23,42,.12);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s,border-color .15s,box-shadow .15s,transform .05s;
}
.button:hover { background: #0b3e69; border-color: #0b3e69; }
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(59,130,246,.25); }
.button:disabled,.button[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }
.button.is-loading { pointer-events: none; }
.spinner {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.button span { font-size: 17px; }
.button-secondary { color: var(--secondary-foreground); background: #fff; border-color: var(--border); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.button-secondary:hover { background: var(--secondary); border-color: var(--border); }
.logout-form { margin-top: 10px; }

.login-form { display: flex; flex-direction: column; }
.login-form label { margin: 0 0 7px; color: #334155; font-size: 12px; font-weight: 650; }
.login-form input {
    width: 100%;
    height: 44px;
    margin-bottom: 16px;
    padding: 0 13px;
    color: var(--foreground);
    background: #fff;
    border: 1px solid var(--input);
    border-radius: 9px;
    outline: 0;
    font: inherit;
    font-size: 14px;
    transition: border-color .15s,box-shadow .15s;
}
.login-form input::placeholder { color: #94a3b8; }
.login-form input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px rgba(59,130,246,.16); }
.login-form input:user-invalid { border-color: var(--destructive); }
.login-form .ui-input { width:100%; }
.login-form .button { margin-top: 3px; }

.alert {
    margin: 0 0 18px;
    padding: 12px 13px;
    color: #991b1b;
    background: var(--destructive-soft);
    border: 1px solid #fecaca;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.5;
}
.security-note {
    margin-top: 20px;
    padding: 12px 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 9px;
}
.security-note > span {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: grid;
    place-items: center;
    color: #047857;
    background: #d1fae5;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}
.security-note p { margin: 0; color: #334155; font-size: 12px; line-height: 1.45; }
.security-note small { color: var(--muted-foreground); }
.help { margin: 25px 0 0; color: var(--muted-foreground); font-size: 11px; text-align: center; }
.status-badge {
    margin-bottom: 18px;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
}
.status-badge i { width: 6px; height: 6px; background: #10b981; border-radius: 50%; }

.code-box {
    margin: 20px 0;
    padding: 24px 18px;
    text-align: center;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.otp-code { display: block; color: var(--foreground); font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 36px; font-weight:700; letter-spacing:.28em; font-variant-numeric:tabular-nums; }
.copy-button { margin-top: 10px; }
.countdown { margin-top:10px; color: var(--muted-foreground); font-size: 12px; }
.progress { height: 5px; margin-top:14px; overflow: hidden; background: var(--secondary); border-radius: 999px; }
.progress > * { display:block; height: 100%; background: var(--primary); transition:width 1s linear; }
.copy-button { width:auto; min-width:120px; margin:0 auto; }
.generator-error { color:var(--destructive); }
.auth-full-height { min-height: 100vh; }
.progress-fill { width: 100%; }
.one-time-code { text-align: center; letter-spacing: .32em; font-size: 20px!important; font-variant-numeric: tabular-nums; }
.password-field { position: relative; }
.password-field input { padding-right: 86px; }
.password-toggle {
    position: absolute;
    right: 7px;
    top: 7px;
    height: 30px;
    padding: 0 8px;
    color: var(--muted-foreground);
    background: transparent;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
}
.password-toggle:hover { color: var(--foreground); background: var(--secondary); }
.help a { color:var(--primary); text-decoration:none; }
.help a:hover { text-decoration:underline; }

@media (max-width:900px) {
    .shell { grid-template-columns: 1fr; }
    .brand-panel { display: none; }
    .auth-panel { min-height: 100vh; padding: 24px 18px; }
    .mobile-brand { display: flex; }
}
@media (max-width:480px) {
    .auth-panel { padding: 12px; }
    .auth-card { padding: 24px 20px; border-radius: var(--radius); }
    .auth-card h2 { font-size: 23px; }
}
@media (prefers-reduced-motion:reduce) {
    *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.01ms!important; }
}

.access-denied-card { text-align: left; }
.access-denied-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    display: grid;
    place-items: center;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 800;
}
.access-denied-note {
    margin: 0 0 22px;
    padding: 13px 14px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.55;
}
.access-denied-actions { display: grid; gap: 10px; }
.access-denied-card .help { margin-top: 18px; }