:root {
    --bg:        #0e1116;
    --bg-2:      #0a0d12;
    --panel:     #161b22;
    --panel-2:   #1c232d;
    --panel-3:   #222b38;
    --line:      #263040;
    --line-2:    #2f3b4d;
    --text:      #e6edf3;
    --muted:     #8b98a9;
    --faint:     #75849b;
    --accent:    #2f6feb;
    --accent-2:  #58a6ff;
    --ok:        #2ea043;
    --warn:      #d29922;
    --err:       #e5534b;
    --ring:      rgba(88, 166, 255, .32);
    --radius:    14px;
    --radius-sm: 10px;
    --shadow:    0 10px 30px rgba(0, 0, 0, .35);
    --shadow-up: 0 18px 44px rgba(0, 0, 0, .5);
    --fast:      .16s cubic-bezier(.22, .8, .3, 1);
    --mid:       .24s cubic-bezier(.22, .8, .3, 1);
    --slow:      .34s cubic-bezier(.22, .8, .3, 1);
    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Inter, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    background-image:
        radial-gradient(900px 420px at 18% -10%, rgba(47, 111, 235, .13), transparent 70%),
        radial-gradient(700px 360px at 96% 0%, rgba(88, 166, 255, .07), transparent 70%);
    background-attachment: fixed;
}

a { color: var(--accent-2); text-decoration: none; transition: color var(--fast), opacity var(--fast); }
a:hover { text-decoration: underline; }

h1, h2, h3 { letter-spacing: -.01em; }

::selection { background: rgba(47, 111, 235, .38); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a3444; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a4657; }

:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--ring); border-radius: 8px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 90; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }

.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

.side {
    background: linear-gradient(180deg, #141a23, #0f141b);
    border-right: 1px solid var(--line);
    padding: 18px 14px 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 30;
}

.brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 16px; letter-spacing: .01em;
    margin: 4px 6px 20px;
}

.brand span {
    font-size: 18px; line-height: 1;
    display: grid; place-items: center;
    width: 32px; height: 32px; border-radius: 10px;
    background: linear-gradient(140deg, rgba(88, 166, 255, .28), rgba(47, 111, 235, .12));
    border: 1px solid rgba(88, 166, 255, .22);
}

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav a {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    padding: 9px 11px; border-radius: var(--radius-sm);
    color: var(--muted); font-weight: 500; text-decoration: none;
    transition: background var(--fast), color var(--fast), transform var(--fast);
}

.nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; transform: translateX(2px); }
.nav a:active { transform: translateX(2px) scale(.99); }

.nav a.on {
    background: linear-gradient(90deg, rgba(47, 111, 235, .26), rgba(47, 111, 235, .05));
    color: #fff;
}

.nav a.on::before {
    content: "";
    position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent-2);
    box-shadow: 0 0 12px rgba(88, 166, 255, .7);
    animation: mark var(--slow) ease-out both;
}

.nav .sep { margin: 16px 11px 6px; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }

.burger {
    display: none;
    width: 40px; height: 40px; flex: none;
    align-items: center; justify-content: center;
    background: var(--panel); color: var(--text);
    border: 1px solid var(--line); border-radius: 11px;
    cursor: pointer; font-size: 16px;
    transition: background var(--fast), transform var(--fast);
}

.burger:hover { background: var(--panel-2); }
.burger:active { transform: scale(.94); }

.scrim {
    position: fixed; inset: 0; z-index: 25;
    background: rgba(5, 8, 12, .6);
    backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none;
    transition: opacity var(--mid);
}

.main { padding: 26px 30px 70px; max-width: 1400px; min-width: 0; animation: page var(--slow) ease-out both; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.top h1 { font-size: 23px; margin: 0; font-weight: 650; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.who form { margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }

.card {
    position: relative;
    background: linear-gradient(180deg, var(--panel), #141921);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    overflow: hidden;
    animation: rise var(--slow) ease-out both;
    transition: border-color var(--mid), transform var(--mid), box-shadow var(--mid);
}

.card::after {
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, .45), transparent);
    opacity: 0; transition: opacity var(--mid);
}

.card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); padding-bottom: 18px; margin-bottom: -2px; }
.card:hover::after { opacity: 1; }

.card .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.card .value { font-size: 28px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.card .delta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.card .delta.up { color: var(--ok); }
.card .delta.down { color: var(--err); }

.cards .card:nth-child(2) { animation-delay: 45ms; }
.cards .card:nth-child(3) { animation-delay: 90ms; }
.cards .card:nth-child(4) { animation-delay: 135ms; }
.cards .card:nth-child(5) { animation-delay: 180ms; }
.cards .card:nth-child(6) { animation-delay: 225ms; }

.grid { display: grid; gap: 16px; min-width: 0; }
.grid > * { min-width: 0; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); }

.box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    min-width: 0;
    animation: rise var(--slow) ease-out both;
}

.box h2 { font-size: 15px; margin: 0 0 14px; font-weight: 600; color: var(--text); }
.box .hint { color: var(--muted); font-size: 13px; margin: -8px 0 14px; }

.grid .box:nth-child(2) { animation-delay: 60ms; }
.grid .box:nth-child(3) { animation-delay: 120ms; }
.grid .box:nth-child(4) { animation-delay: 180ms; }

.chart { width: 100%; height: 280px; }

.tablewrap {
    width: 100%;
    background:
        linear-gradient(90deg, var(--panel) 30%, rgba(22, 27, 34, 0)) 0 0,
        linear-gradient(270deg, var(--panel) 30%, rgba(22, 27, 34, 0)) 100% 0,
        radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0)) 0 0,
        radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0)) 100% 0;
    background-repeat: no-repeat;
    background-size: 36px 100%, 36px 100%, 13px 100%, 13px 100%;
    background-attachment: local, local, scroll, scroll;
}

.tablewrap.wide { overflow-x: auto; overscroll-behavior-x: contain; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th {
    position: sticky; top: 0; z-index: 2;
    text-align: left; color: var(--muted); font-weight: 500; font-size: 12px;
    text-transform: uppercase; letter-spacing: .05em;
    padding: 8px 10px 10px;
    background: var(--panel);
    box-shadow: inset 0 -1px var(--line);
}

td { padding: 11px 10px; border-top: 1px solid var(--line); vertical-align: middle; overflow-wrap: break-word; }
tbody tr { transition: background var(--fast), box-shadow var(--fast); }
tbody tr:hover { background: var(--panel-2); box-shadow: inset 3px 0 var(--accent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr.in { animation: row .3s ease-out both; }

.pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
    background: var(--panel-2); color: var(--muted);
    border: 1px solid transparent;
    white-space: nowrap;
}

.pill.ok { background: rgba(46, 160, 67, .16); color: #57d364; border-color: rgba(46, 160, 67, .24); }
.pill.warn { background: rgba(210, 153, 34, .16); color: #e3b341; border-color: rgba(210, 153, 34, .24); }
.pill.err { background: rgba(229, 83, 75, .16); color: #ff7b72; border-color: rgba(229, 83, 75, .24); }
.pill.blue { background: rgba(47, 111, 235, .18); color: var(--accent-2); border-color: rgba(88, 166, 255, .26); }

.pills { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }

.person { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.person .at { color: var(--muted); font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.person .name { overflow-wrap: anywhere; }

.btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    background: linear-gradient(180deg, #3b7cf5, var(--accent));
    color: #fff; border: 1px solid rgba(255, 255, 255, .09); cursor: pointer;
    padding: 9px 15px; border-radius: var(--radius-sm);
    font: inherit; font-weight: 600; font-size: 14px; white-space: nowrap;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 6px 16px rgba(47, 111, 235, .22);
    transition: filter var(--fast), transform var(--fast), box-shadow var(--fast), background var(--fast);
}

.btn:hover { filter: brightness(1.1); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.985); box-shadow: none; }
.btn.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--panel-3); border-color: var(--line-2); }
.btn.danger { background: linear-gradient(180deg, #ec6a62, var(--err)); box-shadow: 0 6px 16px rgba(229, 83, 75, .22); }
.btn.ok { background: linear-gradient(180deg, #36b44f, var(--ok)); box-shadow: 0 6px 16px rgba(46, 160, 67, .22); }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; filter: none; }

input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=file]), select, textarea {
    width: 100%;
    background: var(--bg-2); color: var(--text);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 10px 12px; font: inherit;
    transition: border-color var(--fast), box-shadow var(--fast), background var(--fast);
}

input:hover, textarea:hover, select:hover { border-color: var(--line-2); }

input:focus, select:focus, textarea:focus {
    outline: 0;
    border-color: var(--accent);
    background: #0f1520;
    box-shadow: 0 0 0 3px var(--ring);
}

input::placeholder, textarea::placeholder { color: rgba(139, 152, 169, .66); }

textarea { min-height: 120px; resize: vertical; line-height: 1.55; font-family: inherit; }

select {
    appearance: none; -webkit-appearance: none;
    padding-right: 34px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b98a9' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
}

input[type=date]::-webkit-calendar-picker-indicator,
input[type=time]::-webkit-calendar-picker-indicator,
input[type=datetime-local]::-webkit-calendar-picker-indicator {
    filter: invert(.62) sepia(.1) saturate(.6);
    cursor: pointer; opacity: .8;
    transition: opacity var(--fast);
}

input[type=date]::-webkit-calendar-picker-indicator:hover,
input[type=datetime-local]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

input[type=checkbox] {
    appearance: none; -webkit-appearance: none;
    min-width: 40px; max-width: 40px; height: 22px; flex: none;
    border-radius: 999px; border: 1px solid var(--line);
    background-color: var(--panel-2);
    background-image: radial-gradient(circle at center, #9aa7b8 0 45%, transparent 47%);
    background-repeat: no-repeat;
    background-size: 18px 18px;
    background-position: 1px center;
    cursor: pointer; padding: 0; vertical-align: middle;
    transition: background-color var(--mid), background-position var(--mid), border-color var(--mid), box-shadow var(--fast);
}

input[type=checkbox]:hover { border-color: var(--line-2); }

input[type=checkbox]:checked {
    background-color: var(--accent);
    border-color: rgba(88, 166, 255, .5);
    background-image: radial-gradient(circle at center, #fff 0 45%, transparent 47%);
    background-position: 19px center;
}

input[type=radio] {
    appearance: none; -webkit-appearance: none;
    min-width: 20px; max-width: 20px; height: 20px; flex: none;
    border-radius: 50%; border: 1px solid var(--line);
    background-color: var(--bg-2);
    background-image: radial-gradient(circle at center, #fff 0 50%, transparent 52%);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0 0;
    cursor: pointer; padding: 0; vertical-align: middle;
    transition: background-size var(--fast), background-color var(--mid), border-color var(--mid), box-shadow var(--fast);
}

input[type=radio]:hover { border-color: var(--line-2); }
input[type=radio]:checked { background-color: var(--accent); border-color: rgba(88, 166, 255, .5); background-size: 10px 10px; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.tip { margin: 6px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.45; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.pick { position: relative; width: 100%; min-width: 132px; }

.pick > select { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; clip-path: inset(50%); }

.pick-btn {
    display: flex; align-items: center; gap: 8px; width: 100%;
    background: var(--bg-2); color: var(--text);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 10px 12px; font: inherit; text-align: left; cursor: pointer;
    transition: border-color var(--fast), box-shadow var(--fast), background var(--fast);
}

.pick-btn:hover { border-color: var(--line-2); }
.pick-btn:focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.pick.open .pick-btn { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); background: #0f1520; }

.pick-val { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pick-arrow {
    flex: none; width: 16px; height: 16px; opacity: .7;
    background: currentColor;
    transition: transform var(--mid), opacity var(--fast);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pick.open .pick-arrow { transform: rotate(180deg); opacity: 1; }

.pick-menu {
    position: absolute; z-index: 50; left: 0; top: calc(100% + 6px);
    min-width: 100%; width: max-content; max-width: min(340px, 80vw);
    background: #141a23; border: 1px solid var(--line-2); border-radius: 12px;
    box-shadow: var(--shadow-up);
    padding: 6px;
    opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top left;
    transition: opacity var(--fast), transform var(--fast), visibility var(--fast);
}

.pick.up .pick-menu { top: auto; bottom: calc(100% + 6px); transform-origin: bottom left; transform: translateY(6px) scale(.98); }
.pick.open .pick-menu { opacity: 1; visibility: visible; transform: none; }

.pick-find {
    width: 100%; margin-bottom: 6px;
    background: var(--bg-2); color: var(--text);
    border: 1px solid var(--line); border-radius: 9px;
    padding: 8px 10px; font: inherit; font-size: 14px;
}

.pick-list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }

.pick-opt {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 9px;
    color: var(--text); font-size: 14px; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: background var(--fast), color var(--fast);
}

.pick-opt::before {
    content: "";
    flex: none; width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-2);
    opacity: 0; transform: scale(.4);
    transition: opacity var(--fast), transform var(--fast);
}

.pick-opt.hot { background: var(--panel-2); }
.pick-opt.on { background: rgba(47, 111, 235, .18); color: #fff; }
.pick-opt.on::before { opacity: 1; transform: none; }
.pick-opt.hide { display: none; }

.pick-empty { padding: 10px; color: var(--muted); font-size: 13px; text-align: center; }

.note { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; border: 1px solid transparent; }
.note.ok { background: rgba(46, 160, 67, .14); color: #57d364; border-color: rgba(46, 160, 67, .22); }
.note.err { background: rgba(229, 83, 75, .14); color: #ff7b72; border-color: rgba(229, 83, 75, .22); }
.note.muted { background: var(--panel-2); color: var(--muted); border-color: var(--line); }

.mono { font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.right { margin-left: auto; }

details > summary { cursor: pointer; list-style: none; transition: color var(--fast); }
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
    content: "▸";
    display: inline-block; width: 12px; margin-right: 4px;
    color: var(--faint);
    transition: transform var(--fast), color var(--fast);
}

details > summary:hover::before { color: var(--accent-2); }
details[open] > summary::before { transform: rotate(90deg); }
details[open] > *:not(summary) { animation: reveal var(--mid) ease-out both; }

.log { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; max-height: 620px; overflow: auto; }
.log .line { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 5px 6px; border-radius: 7px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; transition: background var(--fast); }
.log .body { min-width: 0; overflow-wrap: anywhere; }
.log .line summary { overflow-wrap: anywhere; }
.log .line.in { animation: row .26s ease-out both; }
.log .line:hover { background: #121821; }
.log .time { color: var(--faint); }
.log .line.err .body { color: #ff7b72; }
.log .line.warn .body { color: #e3b341; }

.bar {
    position: fixed; z-index: 80; left: 0; top: 0; height: 2px; width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 10px rgba(88, 166, 255, .8);
    opacity: 0;
    transition: opacity .2s ease;
}

.bar.on { opacity: 1; animation: crawl 2.4s cubic-bezier(.1, .8, .3, 1) forwards; }
.bar.done { opacity: 0; width: 100%; animation: none; transition: width .18s ease-out, opacity .3s ease .12s; }

.toasts { position: fixed; z-index: 90; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }

.toast {
    display: flex; align-items: flex-start; gap: 10px;
    max-width: min(420px, calc(100vw - 36px));
    background: #1a212c; color: var(--text);
    border: 1px solid var(--line-2); border-left: 3px solid var(--accent-2);
    border-radius: 12px; padding: 12px 14px;
    box-shadow: var(--shadow-up);
    font-size: 14px; line-height: 1.45;
    pointer-events: auto;
    animation: toastIn var(--mid) ease-out both;
}

.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
.toast.warn { border-left-color: var(--warn); }
.toast.muted { border-left-color: var(--faint); }
.toast .txt { flex: 1 1 auto; }
.toast .x { flex: none; background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 6px; transition: color var(--fast), background var(--fast); }
.toast .x:hover { color: var(--text); background: var(--panel-3); }
.toast.out { animation: toastOut var(--fast) ease-in both; }

.skel {
    position: relative; overflow: hidden;
    background: var(--panel-2); border-radius: 8px;
    height: 14px; margin: 8px 0;
}

.skel.title { height: 20px; width: 40%; }
.skel.line { height: 12px; }
.skel.line.short { width: 55%; }
.skel.block { height: 120px; border-radius: 12px; }

.skel::after {
    content: "";
    position: absolute; inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent);
    animation: shimmer 1.3s infinite;
}

.htmx-request { opacity: .6; transition: opacity var(--fast); }
.htmx-indicator { opacity: 0; transition: opacity var(--fast); }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

.login { display: grid; place-items: center; min-height: 100vh; padding: 24px; position: relative; }

.login .box {
    width: min(430px, 100%);
    text-align: center;
    padding: 36px 32px;
    border-radius: 18px;
    background: linear-gradient(180deg, #171d26, #12171f);
    box-shadow: var(--shadow-up);
    animation: pop var(--slow) cubic-bezier(.2, .9, .3, 1) both;
}

.login .box h1 { font-size: 21px; margin: 0 0 10px; font-weight: 650; }
.login .box p { margin: 0 0 6px; line-height: 1.6; }
.login .mark {
    width: 58px; height: 58px; margin: 0 auto 18px;
    display: grid; place-items: center; font-size: 28px;
    border-radius: 18px;
    background: linear-gradient(140deg, rgba(88, 166, 255, .3), rgba(47, 111, 235, .1));
    border: 1px solid rgba(88, 166, 255, .26);
    box-shadow: 0 10px 30px rgba(47, 111, 235, .28);
    animation: float 4s ease-in-out infinite;
}

.login .foot { margin-top: 22px; font-size: 12px; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; }
.login .note { margin: 18px 0 0; text-align: left; }
.login .btn { margin-top: 18px; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes row { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes page { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes mark { from { opacity: 0; transform: scaleY(.2); } to { opacity: 1; transform: none; } }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes crawl { from { width: 0; } 60% { width: 72%; } to { width: 92%; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(24px) scale(.96); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

@media (max-width: 1000px) {
    .layout { grid-template-columns: 1fr; }

    .side {
        position: fixed; left: 0; top: 0; bottom: 0; width: 262px;
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform var(--mid);
        box-shadow: var(--shadow-up);
    }

    .burger { display: inline-flex; }
    .main { padding: 18px 16px 60px; }
    .top h1 { font-size: 20px; flex: 1 1 auto; }
    body.menu .side { transform: none; }
    body.menu .scrim { opacity: 1; pointer-events: auto; }
    body.menu { overflow: hidden; }
    .tablewrap { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
    .tablewrap table { min-width: 620px; }
    .tablewrap table:not(:has(thead)) { min-width: 0; }
    .grid.two { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .main { padding: 16px 14px 60px; }
    .cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
    .card { padding: 13px 14px; }
    .card .value { font-size: 24px; }
    .box { padding: 15px 14px; }
    .top { gap: 10px; }
    .who { font-size: 12px; gap: 7px; }
    .chart { height: 230px; }
    .toasts { right: 12px; left: 12px; bottom: 12px; align-items: stretch; }
    .toast { max-width: none; }
    .log .line { grid-template-columns: 62px 1fr; gap: 7px; font-size: 12px; }
    .pick-menu { max-width: calc(100vw - 40px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

.login form { margin-top: 18px; }
.login .field { text-align: left; }
.login input { text-align: center; font-size: 17px; padding: 12px 14px; }
.login input#code { letter-spacing: .35em; font-size: 22px; font-weight: 650; font-family: ui-monospace, Menlo, Consolas, monospace; }
.login .btn { width: 100%; justify-content: center; margin-top: 4px; }
.login .again { margin-top: 10px; }
.login .again .btn { background: transparent; border: 0; color: var(--muted); font-weight: 500; }
.login .again .btn:hover { color: var(--text); }
.login .foot { text-transform: none; letter-spacing: 0; font-size: 12.5px; line-height: 1.5; margin-top: 16px; }

.login .known { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: -6px 0 14px; }
.login .chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--bg-2); color: var(--text);
    border: 1px solid var(--line); border-radius: 999px;
    padding: 6px 8px 6px 13px; font: inherit; font-size: 13.5px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    cursor: pointer; transition: border-color var(--fast), background var(--fast);
}
.login .chip:hover { border-color: var(--accent); background: var(--panel-2); }
.login .chip .x {
    display: grid; place-items: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--line); color: var(--faint);
    font-size: 13px; line-height: 1;
}
.login .chip .x:hover { background: var(--err); color: #fff; }
