@charset "UTF-8";

@font-face {
    font-family: Hack;
    src: url("fonts/Hack-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Hack;
    src: url("fonts/Hack-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: Hack;
    src: url("fonts/Hack-Italic.ttf") format("truetype");
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Hack;
    src: url("fonts/Hack-BoldItalic.ttf") format("truetype");
    font-style: italic;
    font-weight: 700;
    font-display: swap;
}

:root {
    color-scheme: light;
    --bg: #e7edf7;
    --panel: #fff;
    --border: #a8b8d0;
    --text: #11213d;
    --muted: #465773;
    --accent: #1553c4;
    --green: #19522f;
    --header: #102647;
    --layout-width: min(1300px, calc(100% - 48px));
    font-family: Hack, ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
}

* { box-sizing: border-box; }

.registration-trap { display: none; }
body {
    margin: 0;
    position: relative;
    isolation: isolate;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-wrap: anywhere;
}

.skip-link { position: absolute; top: 8px; left: 8px; z-index: 10; padding: 12px 16px; background: var(--panel); color: var(--text); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
#main-content:focus { outline: none; }
.ambient-background { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; background: var(--bg); }
.ambient-background::before, .ambient-background::after {
    content: "";
    position: absolute;
    inset: -20%;
    background: linear-gradient(125deg, transparent 25%, #1553c410 25%, #1553c410 43%, transparent 43%), linear-gradient(35deg, transparent 60%, #3e7fe612 60%, transparent 80%);
    animation: ambient-drift 48s ease-in-out infinite alternate;
}
.ambient-background::after { background: linear-gradient(145deg, transparent 45%, #ffffff70 45%, #ffffff70 58%, transparent 58%); animation-duration: 64s; animation-direction: alternate-reverse; }

@keyframes ambient-drift {
    from { transform: translate3d(-2%, -1%, 0); }
    to { transform: translate3d(3%, 2%, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .ambient-background::before, .ambient-background::after { animation: none; }
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.panel a:not(.button) { text-decoration: underline; display: inline-block; min-height: 24px; }
button, input { font: inherit; }
a, button, input, select, summary { touch-action: manipulation; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid #1553c4;
    outline-offset: 3px;
}

.topbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    padding: 20px max(24px, calc((100% - 1300px) / 2));
    background: var(--header);
    border-bottom: 4px solid #3174ec;
    box-shadow: 0 4px 16px #1026471a;
}

.brand {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #fff;
}

.brand:hover { text-decoration: none; }
.brand-mark { display: block; width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.brand-dot { color: #86b4ff; margin-left: -10px; }
nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 24px; font-size: 13px; }
nav a { color: #fff; padding: 8px 0; border-bottom: 2px solid transparent; }
nav a:hover { border-bottom-color: #86b4ff; text-decoration: none; }
.language-switch { margin: 0; }
.language-switch button { width: auto; margin: 0; padding: 8px; background: transparent; border-color: #7488a8; font-size: 11px; gap: 8px; }
.language-switch button:hover { background: #1c3c68; }
.language-switch button span { margin: 0; }
.language-flag { display: block; width: 27px; height: 18px; }
main { flex: 1; min-width: 0; }
.narrow { width: var(--layout-width); margin: 56px auto; }
.wide { width: var(--layout-width); margin: 40px auto; }
.flow-page { width: min(520px, calc(100% - 48px)); }
.panel { background: var(--panel); border: 1px solid var(--border); border-top: 4px solid var(--accent); padding: 36px; box-shadow: 4px 4px 0 #10264712; min-width: 0; }
.admin-panel { padding: 32px; }
.flow-content { max-width: 560px; margin: 0 auto; }
.account-grid, .account-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 24px; }
.account-grid { margin-top: 32px; }
.account-section { min-width: 0; padding: 24px; border: 1px solid var(--border); }
.account-section h2 { margin: 0 0 16px; }
.account-actions details { min-width: 0; margin-top: 24px; }
.sessions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 24px; margin: 24px 0; }
.sessions-grid .session-card { min-width: 0; margin: 0; }
.narrow > .panel > form, .narrow > .panel > .button { max-width: 560px; }
.eyebrow { display: block; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 1.2px; line-height: 1.8; }
.status-dot { background: #276641; width: 7px; height: 7px; display: inline-block; flex-shrink: 0; }
h1 { font-size: 25px; font-weight: 700; letter-spacing: -.8px; line-height: 1.35; margin: 14px 0 12px; overflow-wrap: anywhere; }
h2 { font-size: 19px; margin: 36px 0 16px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.panel > form, .flow-content > form { margin-top: 28px; }
label { display: block; font-size: 12px; font-weight: 700; margin: 19px 0 9px; }
input { font-size: 14px; background: #fff; border: 1px solid #7488a8; border-bottom-width: 2px; border-radius: 0; color: var(--text); padding: 12px; width: 100%; min-width: 0; }
input::placeholder { color: #596b85; }
input:focus { border-color: var(--accent); }
button, .button { display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; padding: 13px 18px; font: inherit; font-size: 13px; font-weight: 700; color: #fff; border: 1px solid var(--accent); border-radius: 0; background: var(--accent); cursor: pointer; margin-top: 22px; line-height: 1.5; min-height: 44px; }
button:hover, .button:hover { background: #103f96; text-decoration: none; }
.button span, button span { margin-left: auto; }
button.secondary { color: var(--accent); background: #fff; border: 2px solid var(--accent); }
button.secondary:hover { background: #e7efff; }
.form-link { font-size: 11px; display: block; text-align: right; margin-top: 12px; }
label.remember-device { display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; cursor: pointer; }
.remember-device input[type=checkbox] { width: 18px; height: 18px; min-height: 0; flex: 0 0 18px; padding: 0; margin: 0; accent-color: var(--accent); }
.remember-help { margin-top: 0; }
.panel-footer { border-top: 1px solid var(--border); padding-top: 23px; margin-top: 27px; text-align: center; font-size: 12px; color: var(--muted); }
.pending-email { border: 1px solid var(--border); padding: 16px; margin-top: 24px; overflow-wrap: anywhere; }
.pending-email h2 { margin-top: 0; }
.session-card { border: 1px solid var(--border); padding: 16px; margin: 24px 0; overflow-wrap: anywhere; }
.session-card h2 { margin-top: 0; }
.session-card h3 { margin: 24px 0 12px; }
.session-current { display: inline-block; padding: 2px 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 11px; }
.session-details { margin: 20px 0; font-size: 12px; }
.session-details dt { color: var(--muted); margin-top: 8px; }
.session-details dd { margin-left: 0; }
.session-application { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.session-application small { display: block; color: var(--muted); }
.secondary-link { display: block; text-align: center; font-size: 11px; margin-top: 18px; color: var(--muted); }
.panel .flow-content > .secondary-link { display: block; }
small { display: block; font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 6px; overflow-wrap: anywhere; }
code { font-family: inherit; font-size: 12px; overflow-wrap: anywhere; }
.secret { display: block; background: #edf3ff; border: 1px solid var(--border); padding: 14px; margin: 16px 0; word-break: break-all; color: var(--text); }
.mfa-qr { margin: 24px 0; text-align: center; }
.mfa-qr-code { max-width: 100%; height: auto; }
/* Six-digit verification code: two groups of three boxes. */
.otp { display: flex; align-items: center; gap: 12px; max-width: 360px; }
.otp[hidden] { display: none; }
.otp .otp-group { display: flex; flex: 1 1 0; gap: 8px; min-width: 0; }
.otp .otp-group input { flex: 1 1 0; width: 100%; min-width: 0; height: 54px; padding: 0; text-align: center; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.otp-separator { color: var(--muted); font-weight: 700; }
.otp-recovery { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); row-gap: 10px; }
.otp-recovery[hidden] { display: none; }
.otp.otp-recovery .otp-group input { height: 48px; font-size: 20px; font-family: inherit; }
form button.otp-toggle, form button.otp-toggle:hover { display: inline-flex; width: auto; min-height: 44px; margin-top: 8px; padding: 0; border: 0; background: none; color: var(--accent); font-size: 12px; font-weight: 700; text-decoration: underline; }
form button.otp-layout-toggle, form button.otp-layout-toggle:hover { display: block; width: auto; min-height: 44px; margin-top: 8px; padding: 0; border: 0; background: none; color: var(--accent); font-size: 12px; text-decoration: underline; }
.otp-controls { display: flex; flex-wrap: wrap; column-gap: 20px; }
.mfa-qr-code { display: block; width: 280px; max-width: 100%; height: auto; margin: 0 auto; background: #fff; }
.mfa-qr figcaption { margin-top: 12px; color: var(--muted); font-size: 11px; }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.recovery-codes code { padding: 10px; background: #edf3ff; font-size: 11px; }
.account-status { display: flex; align-items: center; gap: 10px; color: var(--green); font-size: 12px; margin: 25px 0; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px; width: var(--layout-width); margin: 0 auto; padding: 24px 0; border-top: 2px solid #7187a9; font-size: 10px; color: var(--muted); }
.search { display: flex; gap: 10px; max-width: 500px; }
.search button { margin: 0; width: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
th { background: var(--header); color: #edf3ff; font-weight: 700; padding: 12px; border-bottom: 1px solid var(--border); }
td { padding: 16px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
td strong { font-weight: 700; overflow-wrap: anywhere; }
.badge { display: inline-block; background: #e1f2e8; color: var(--green); border: 1px solid #95bda5; padding: 4px 8px; font-size: 10px; margin-top: 7px; }
.badge.danger { color: #96382d; background: #fff0ee; border-color: #c28c85; }
.badge.pending { color: #775c24; background: #fff8e7; border-color: #bfa86d; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.actions input:not([type=hidden]) { padding: 8px; width: 130px; font-size: 11px; }
.small { width: auto; padding: 8px 10px; margin: 0; font-size: 10px; }
.danger-button { background: #a03933; border-color: #a03933; color: #fff; }
.danger-button:hover { background: #802d29; }
.client-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.client-row > div { min-width: 0; }
.client-row strong { font-size: 13px; }
details { margin-top: 24px; border: 1px solid var(--border); padding: 18px; }
summary { cursor: pointer; font-size: 13px; color: var(--accent); }
summary { min-height: 24px; }
details form { max-width: 600px; }
.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; }
.activity-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; margin-bottom: 20px; }
.delete-user { margin: 0; padding: 8px; }
.delete-user summary { font-size: 12px; color: #a03933; }
.delete-user p { margin: 8px 0; }
.delete-user form { margin: 0; }
.delete-user button { margin: 0; }
.activity-filters select { width: 100%; min-width: 0; padding: 12px; background: #fff; border: 1px solid #7488a8; color: var(--text); font: inherit; font-size: 14px; }
.activity-filters button { margin: 0; }
#activity-more[hidden] { display: none; }
#activity-more { width: fit-content; min-width: 160px; }
#activity-sentinel { height: 1px; }
[hidden], label.remember-device[hidden] { display: none; }
footer .motion-control { margin: 0; color: var(--muted); font-size: 12px; min-height: 24px; }
body:has(#pause-motion:checked) .ambient-background::before, body:has(#pause-motion:checked) .ambient-background::after { animation-play-state: paused; }
.topbar :focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: reduce) {
    footer .motion-control { display: none; }
}

@media (max-width: 600px) {
    :root { --layout-width: calc(100% - 24px); }
    .topbar { padding: 16px 12px; gap: 16px; }
    .brand { font-size: 24px; }
    nav { gap: 16px; font-size: 11px; order: 1; width: 100%; justify-content: flex-end; }
    .language-switch { margin-left: auto; }
    .narrow { margin: 32px auto; }
    .wide { margin: 24px auto; }
    .flow-page { width: calc(100% - 32px); }
    .panel { padding: 24px; }
    .admin-panel { padding: 16px; }
    .account-grid, .account-actions, .sessions-grid { gap: 16px; }
    .account-section { padding: 16px; }
    h1 { font-size: 23px; }
    .recovery-codes { grid-template-columns: 1fr; }
    .otp { gap: 8px; }
    .otp .otp-group { gap: 5px; }
    .otp.otp-recovery { gap: 6px; }
    .otp-recovery .otp-group { gap: 2px; }
    .otp.otp-recovery .otp-group input { font-size: 18px; }
    .activity-filters { grid-template-columns: 1fr; }
    footer { flex-direction: column; gap: 8px; }
    .client-row { align-items: flex-start; flex-wrap: wrap; }
}
