/* =============================================================================
   Cybrotrix Identity — account pages (sign-in, MFA, password reset, verification)
   ============================================================================= */

:root {
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --field: #f8fafc;
    --surface: #ffffff;

    --blue: #3b82f6;
    --blue-strong: #2563eb;
    --violet: #8b5cf6;
    --violet-strong: #7c3aed;
    --cyan: #22d3ee;
    --navy: #050817;

    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-line: #fecaca;
    --success: #047857;
    --success-bg: #ecfdf5;
    --success-line: #a7f3d0;
    --warn: #b45309;

    --radius: 12px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
    min-height: 100vh;
    font-family: var(--font);
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--blue-strong); }
button, input { font: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ── Layout ─────────────────────────────────────────────────────────────── */

.auth {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(460px, 1fr);
    min-height: 100vh;
}

/* ── Brand panel ────────────────────────────────────────────────────────── */

.brand {
    position: relative;
    overflow: hidden;
    color: #e2e8f0;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(59, 130, 246, .22), transparent 60%),
        radial-gradient(900px 700px at 110% 110%, rgba(139, 92, 246, .25), transparent 60%),
        var(--navy);
    isolation: isolate;
}

.brand__backdrop { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    will-change: transform;
}
.orb--a { width: 460px; height: 460px; left: -120px; top: 8%; background: radial-gradient(circle, #2563eb, transparent 70%); animation: drift-a 22s ease-in-out infinite alternate; }
.orb--b { width: 520px; height: 520px; right: -160px; bottom: -80px; background: radial-gradient(circle, #7c3aed, transparent 70%); animation: drift-b 26s ease-in-out infinite alternate; }
.orb--c { width: 300px; height: 300px; left: 42%; top: 40%; background: radial-gradient(circle, #06b6d4, transparent 70%); opacity: .35; animation: drift-c 18s ease-in-out infinite alternate; }

@keyframes drift-a { to { transform: translate(140px, 90px) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-120px, -140px) scale(1.1); } }
@keyframes drift-c { to { transform: translate(-90px, 80px) scale(1.25); } }

.grid {
    position: absolute;
    inset: -48px;
    background-image:
        linear-gradient(rgba(148, 163, 184, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .08) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 35% 45%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 35% 45%, #000 20%, transparent 75%);
    animation: grid-pan 28s linear infinite;
}
@keyframes grid-pan { to { transform: translate(48px, 48px); } }

.traces { position: absolute; inset: 0; width: 100%; height: 100%; }
.traces path {
    fill: none;
    stroke: rgba(56, 189, 248, .5);
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-dasharray: 90 700;
    animation: trace 9s linear infinite;
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, .8));
}
.traces path:nth-child(2) { animation-delay: -2s; animation-duration: 11s; stroke: rgba(167, 139, 250, .55); filter: drop-shadow(0 0 4px rgba(167, 139, 250, .8)); }
.traces path:nth-child(3) { animation-delay: -5s; animation-duration: 13s; }
.traces path:nth-child(4) { animation-delay: -7s; animation-duration: 10s; stroke: rgba(167, 139, 250, .55); }
.traces path:nth-child(5) { animation-delay: -3s; animation-duration: 12s; }
@keyframes trace { from { stroke-dashoffset: 790; } to { stroke-dashoffset: 0; } }

.spark {
    position: absolute;
    left: var(--x);
    bottom: -10px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #a5f3fc;
    box-shadow: 0 0 8px 2px rgba(165, 243, 252, .7);
    opacity: 0;
    animation: rise var(--d) linear var(--delay) infinite;
}
.spark:nth-child(3n) { background: #ddd6fe; box-shadow: 0 0 8px 2px rgba(196, 181, 253, .7); }
@keyframes rise {
    0% { transform: translate(0, 0); opacity: 0; }
    15% { opacity: .9; }
    100% { transform: translate(24px, -105vh); opacity: 0; }
}

.brand__content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    min-height: 100%;
    padding: 56px clamp(40px, 6vw, 88px);
}

.lockup { display: flex; align-items: center; gap: 14px; animation: fade-in .8s var(--ease) both; }
.lockup__text { display: flex; flex-direction: column; line-height: 1.05; }
.lockup__name { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.lockup__product { font-size: 11px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: #7dd3fc; margin-top: 4px; }

.mark { width: 44px; height: 44px; flex: none; }
.mark--glow { width: 52px; height: 52px; animation: glow 4s ease-in-out infinite; }
@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(59, 130, 246, .55)); }
    50% { filter: drop-shadow(0 0 22px rgba(139, 92, 246, .8)); }
}
.mark-trace { stroke-dasharray: 30; animation: mark-trace 3.5s ease-in-out infinite; }
@keyframes mark-trace { 0% { stroke-dashoffset: 30; } 50%, 100% { stroke-dashoffset: 0; } }

.brand__pitch { max-width: 520px; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(125, 211, 252, .25);
    border-radius: 999px;
    background: rgba(15, 23, 42, .5);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    color: #bae6fd;
    backdrop-filter: blur(6px);
    animation: rise-in .8s var(--ease) .1s both;
}
.eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, .6);
    animation: ping 2.2s ease-out infinite;
}
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } }

.headline {
    margin-top: 22px;
    font-size: clamp(30px, 3.2vw, 44px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -.025em;
    color: #fff;
    animation: rise-in .8s var(--ease) .2s both;
}
.headline span {
    background: linear-gradient(90deg, #67e8f9, #93c5fd 40%, #c4b5fd 70%, #67e8f9);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer-text 6s linear infinite;
}
@keyframes shimmer-text { to { background-position: -200% 0; } }

.lede {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.6;
    color: #94a3b8;
    animation: rise-in .8s var(--ease) .3s both;
}

.features { margin-top: 36px; display: grid; gap: 14px; }
.features li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(30, 41, 59, .55), rgba(15, 23, 42, .35));
    backdrop-filter: blur(8px);
    font-size: 14px;
    line-height: 1.5;
    color: #94a3b8;
    animation: rise-in .8s var(--ease) both;
    transition: border-color .3s, transform .3s var(--ease);
}
.features li:nth-child(1) { animation-delay: .4s; }
.features li:nth-child(2) { animation-delay: .5s; }
.features li:nth-child(3) { animation-delay: .6s; }
.features li:hover { border-color: rgba(125, 211, 252, .35); transform: translateX(4px); }
.features strong { display: block; color: #f1f5f9; font-weight: 600; margin-bottom: 2px; }
.features__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, .25), rgba(139, 92, 246, .25));
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, .25);
}
.features__icon svg { width: 18px; height: 18px; fill: none; stroke: #bae6fd; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.brand__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 12.5px; color: #64748b; animation: fade-in 1s var(--ease) .7s both; }
.standards { display: flex; flex-wrap: wrap; gap: 8px; }
.standards li {
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, .18);
    color: #cbd5e1;
    font-weight: 500;
    letter-spacing: .02em;
}

/* ── Form panel ─────────────────────────────────────────────────────────── */

.panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(139, 92, 246, .07), transparent 70%),
        radial-gradient(500px 300px at 0% 100%, rgba(59, 130, 246, .06), transparent 70%),
        var(--surface);
}
.panel__inner { width: 100%; max-width: 400px; }

.panel__brand { display: none; align-items: center; gap: 10px; margin-bottom: 32px; font-size: 18px; color: var(--ink-2); }
.panel__brand .mark { width: 36px; height: 36px; }
.panel__brand strong { color: var(--ink); }

/* Entrance: each direct child of .stagger rises in turn. */
.stagger > * { animation: rise-in .6s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .12s; }
.stagger > *:nth-child(3) { animation-delay: .19s; }
.stagger > *:nth-child(4) { animation-delay: .26s; }
.stagger > *:nth-child(5) { animation-delay: .33s; }
.stagger > *:nth-child(6) { animation-delay: .40s; }
.stagger > *:nth-child(7) { animation-delay: .47s; }
.stagger > *:nth-child(n+8) { animation-delay: .54s; }

@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.page-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, .12), rgba(139, 92, 246, .14));
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .18);
}
.page-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--violet-strong); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.page-icon--success { background: var(--success-bg); box-shadow: inset 0 0 0 1px var(--success-line); }
.page-icon--success svg { stroke: var(--success); }
.page-icon--danger { background: var(--danger-bg); box-shadow: inset 0 0 0 1px var(--danger-line); }
.page-icon--danger svg { stroke: var(--danger); }

.title { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; }
.subtitle { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.page-head { margin-bottom: 28px; }

/* ── Alerts ─────────────────────────────────────────────────────────────── */

.alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 22px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}
.alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alert code { font-family: var(--mono); font-size: 12.5px; }
.alert--error { color: #991b1b; background: var(--danger-bg); border: 1px solid var(--danger-line); animation: rise-in .4s var(--ease) both, shake .5s var(--ease) .35s both; }
.alert--success { color: #065f46; background: var(--success-bg); border: 1px solid var(--success-line); animation: rise-in .5s var(--ease) both; }
@keyframes shake {
    20% { transform: translateX(-6px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}

/* ── Fields ─────────────────────────────────────────────────────────────── */

.field { margin-bottom: 18px; }
.field__label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.field__label label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field__label a { font-size: 13px; font-weight: 500; text-decoration: none; }
.field__label a:hover { text-decoration: underline; }

.control { position: relative; }
.control__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: none;
    stroke: #94a3b8;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition: stroke .2s;
}
.control input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--field);
    color: var(--ink);
    font-size: 15px;
    outline: none;
    transition: border-color .2s, box-shadow .25s var(--ease), background-color .2s;
}
.control input::placeholder { color: #a3aec0; }
.control input:hover { border-color: #cbd5e1; }
.control input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(59, 130, 246, .14); }
.control:focus-within .control__icon { stroke: var(--blue-strong); }
.control input.input-validation-error { border-color: #f87171; background: #fff; }
.control input.input-validation-error:focus { box-shadow: 0 0 0 4px rgba(239, 68, 68, .14); }

/* Browser autofill paints its own background; keep the field on-brand. */
.control input:-webkit-autofill,
.control input:-webkit-autofill:hover,
.control input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    caret-color: var(--ink);
    transition: background-color 9999s;
}

.control--code input {
    height: 60px;
    padding: 0 16px;
    font-family: var(--mono);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: .5em;
    text-indent: .5em;
    text-align: center;
}

.reveal {
    position: absolute;
    right: 6px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: color .2s, background-color .2s;
}
.reveal:hover { color: var(--ink-2); background: #eef2f7; }
.reveal:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.reveal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reveal .icon-hide { display: none; }
.reveal[aria-pressed="true"] .icon-show { display: none; }
.reveal[aria-pressed="true"] .icon-hide { display: block; }

.field-error { display: block; margin-top: 6px; font-size: 13px; color: var(--danger); }
.field-error:empty { display: none; }

.hint { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 12.5px; color: var(--muted); }
.caps { color: var(--warn); font-weight: 500; animation: rise-in .25s var(--ease) both; }
.caps[hidden] { display: none; }
.caps svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Checkbox ───────────────────────────────────────────────────────────── */

.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    background: #fff center / 12px no-repeat;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, transform .15s;
}
.check input:hover { border-color: var(--blue); }
.check input:active { transform: scale(.9); }
.check input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.check input:checked {
    border-color: transparent;
    background-color: var(--blue-strong);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E"), linear-gradient(135deg, var(--blue-strong), var(--violet-strong));
    background-size: 12px, cover;
    animation: pop .25s var(--ease);
}
@keyframes pop { 50% { transform: scale(1.15); } }

.form-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 24px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue-strong) 0%, #4f46e5 50%, var(--violet-strong) 100%);
    background-size: 200% 100%;
    color: #fff;
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: .01em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 24px -10px rgba(79, 70, 229, .65), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: background-position .5s var(--ease), transform .2s var(--ease), box-shadow .3s var(--ease);
}
.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
    transform: translateX(-120%);
}
.btn:hover { background-position: 100% 0; transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(124, 58, 237, .7), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn:hover::after { animation: sheen .9s var(--ease); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(59, 130, 246, .45); outline-offset: 2px; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
@keyframes sheen { to { transform: translateX(120%); } }

.btn__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.btn.is-loading { cursor: progress; pointer-events: none; }
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading svg { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn + .btn { margin-top: 12px; }
.btn--secondary {
    background: #fff;
    color: var(--ink-2);
    border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.btn--secondary::after { display: none; }
.btn--secondary:hover { color: var(--danger); border-color: var(--danger-line); background: var(--danger-bg); box-shadow: none; transform: translateY(-1px); }
.btn--secondary:hover svg { transform: none; }

/* ── Signed-in session (home page) ──────────────────────────────────────── */

.account {
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #fff, #fbfcfe);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    overflow: hidden;
}
.account__who { display: flex; align-items: center; gap: 14px; padding: 18px; border-bottom: 1px solid var(--line); }
.account__who div { min-width: 0; line-height: 1.35; }
.account__who strong { display: block; font-size: 16px; color: var(--ink); }
.account__who div span { display: block; font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--blue-strong), var(--violet-strong));
    box-shadow: 0 8px 18px -10px rgba(79, 70, 229, .8);
}
.account__facts { margin: 0; padding: 6px 18px; }
.account__facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 13.5px; }
.account__facts div + div { border-top: 1px dashed var(--line); }
.account__facts dt { font-weight: 500; color: var(--muted); }
.account__facts dd { margin: 0; font-weight: 600; color: var(--ink-2); text-align: right; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
    transition: color .2s;
}
.back-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.back-link:hover { color: var(--blue-strong); }
.back-link:hover svg { transform: translateX(-3px); }

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    color: #94a3b8;
    animation: fade-in 1s var(--ease) .6s both;
}
.secure-note svg { width: 14px; height: 14px; fill: none; stroke: #10b981; stroke-width: 2; stroke-linejoin: round; }

/* ── External providers on the sign-in page ─────────────────────────────── */

.alert--info { color: #1e3a8a; background: #eff6ff; border: 1px solid #bfdbfe; animation: rise-in .5s var(--ease) both; }

.divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 18px; font-size: 12.5px; font-weight: 500; color: #94a3b8; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.providers { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.providers form { margin: 0; }
.provider-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink-2);
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    transition: border-color .2s, box-shadow .2s, transform .2s var(--ease), background .2s;
}
.provider-btn:hover { border-color: #cbd5e1; background: #f8fafc; box-shadow: 0 6px 16px -10px rgba(15, 23, 42, .35); transform: translateY(-1px); }
.provider-btn:focus-visible { outline: 3px solid rgba(59, 130, 246, .45); outline-offset: 2px; }
.provider-btn__logo { width: 18px; height: 18px; flex: none; }
.provider-btn .btn__spinner { border-color: #e2e8f0; border-top-color: var(--violet-strong); }
.provider-btn.is-loading { cursor: progress; pointer-events: none; }
.provider-btn.is-loading .btn__spinner { display: inline-block; }
.provider-btn.is-loading .provider-btn__logo { display: none; }

/* ── Organization sign-in ───────────────────────────────────────────────── */

.org-badge { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13.5px; color: var(--ink-2); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.org-badge span, .org-badge img { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--blue-strong), var(--violet-strong)); }
.providers--stacked { grid-template-columns: 1fr; }
.providers--stacked .provider-btn { height: 50px; font-size: 15px; }
.sso-list { margin-bottom: 4px; }
.provider-btn--sso { border-color: rgba(99, 102, 241, .35); background: linear-gradient(180deg, #fff, #f8f9ff); color: var(--ink); }
.provider-btn--sso .provider-btn__logo { fill: none; stroke: var(--violet-strong); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quiet-link { display: block; margin-top: 22px; text-align: center; font-size: 13px; color: var(--muted); text-decoration: none; }
.quiet-link:hover { color: var(--blue-strong); text-decoration: underline; }

/* ── Signing out (front-channel logout) ─────────────────────────────────── */

.page-icon--busy { position: relative; }
.page-icon--busy::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 18px;
    border: 2px solid transparent;
    border-top-color: var(--violet);
    border-right-color: var(--blue);
    animation: spin 1.1s linear infinite;
}
.is-complete .page-icon--busy { background: var(--success-bg); box-shadow: inset 0 0 0 1px var(--success-line); transition: background .3s; }
.is-complete .page-icon--busy svg { stroke: var(--success); }
.is-complete .page-icon--busy::after { border-color: var(--success-line); animation: none; }

.progress { height: 6px; margin-bottom: 20px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.progress__fill {
    display: block;
    width: 6%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue-strong), var(--violet-strong));
    transition: width .5s var(--ease);
}
.is-complete .progress__fill { width: 100% !important; background: linear-gradient(90deg, #10b981, #059669); }

.app-list { list-style: none; margin: 0 0 8px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.app-list__item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; transition: background .3s; }
.app-list__item + .app-list__item { border-top: 1px solid var(--line); }
.app-list__item.is-done { background: #fbfefc; }
.app-list__mark {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--blue-strong), var(--violet-strong));
}
.app-list__text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.app-list__text strong { font-size: 14.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-list__text span { font-size: 12.5px; color: var(--muted); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-list__state { display: grid; place-items: center; flex: none; width: 24px; height: 24px; }
.app-list__spinner { width: 18px; height: 18px; border: 2px solid #e2e8f0; border-top-color: var(--violet-strong); border-radius: 50%; animation: spin .8s linear infinite; }
.app-list__done { display: none; width: 22px; height: 22px; padding: 3px; border-radius: 50%; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; background: #10b981; animation: pop .35s var(--ease); }
.is-done .app-list__spinner, .is-slow .app-list__spinner { display: none; }
.is-done .app-list__done { display: block; }
.is-slow .app-list__state::before { content: "–"; font-weight: 700; color: var(--muted); }

.signout-frame { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }
.link-button {
    display: block;
    margin: 16px auto 0;
    padding: 6px 10px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--blue-strong);
    cursor: pointer;
    animation: fade-in .4s var(--ease) both;
}
.link-button:hover { text-decoration: underline; }
.link-button[hidden] { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Error page ─────────────────────────────────────────────────────────── */

.page-icon--warn { background: #fffbeb; box-shadow: inset 0 0 0 1px #fde68a; }
.page-icon--warn svg { stroke: var(--warn); }
.page-icon--neutral { background: #f1f5f9; box-shadow: inset 0 0 0 1px var(--line); }
.page-icon--neutral svg { stroke: var(--ink-2); }
.eyebrow-code { margin: 0 0 6px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.reference { margin: 24px 0 0; padding: 4px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--field); }
.reference div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 13px; }
.reference div + div { border-top: 1px dashed var(--line); }
.reference dt { color: var(--muted); font-weight: 500; }
.reference dd { margin: 0; color: var(--ink-2); font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.reference code { font-family: var(--mono); font-size: 12px; }

.details { margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.details summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.details summary:hover { color: var(--blue-strong); }
.details dl { margin: 10px 0 0; padding: 12px 14px; border-radius: 10px; background: #0f172a; color: #e2e8f0; }
.details dt { font-family: var(--mono); font-size: 11.5px; color: #94a3b8; }
.details dd { margin: 2px 0 10px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.details dd:last-child { margin-bottom: 0; }
.details code { font-family: var(--mono); }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1023px) {
    .auth { grid-template-columns: 1fr; }
    .brand { display: none; }
    .panel {
        align-items: flex-start;
        padding: 40px 16px;
        background:
            radial-gradient(500px 260px at 100% 0%, rgba(139, 92, 246, .12), transparent 70%),
            radial-gradient(420px 260px at 0% 0%, rgba(59, 130, 246, .10), transparent 70%),
            var(--surface);
    }
    .panel__inner { margin-top: min(8vh, 64px); }
    .panel__brand { display: flex; }
}

@media (max-width: 420px) {
    .title { font-size: 24px; }
    .form-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Movement is decoration here: honour the user's preference to switch it off. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: .01ms !important;
    }
    .spark, .traces { display: none; }
}
