:root { --bg:#0E1013; --panel:#15181D; --hover:#1A1D22; --line:#23272E; --line2:#3A404A; --text:#E8EAED; --text2:#C3C9D1; --text3:#B5BCC5; --muted:#9AA3AD;
        --copper:#D08A47; --copper-text:#E3A46A; --on-copper:#1A1008; --lav:#C7B8F5; --lav-line:#6B5AA8; --green:#8FE0B0; --green-bg:#1F3A2C;
        --amber:#E3C27A; --red:#F2A3A3; --red-bg:#3A1F22; --warn-bg:#2A1E14; --warn-line:#5C4330; --warn-text:#F2C08F; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; }
a { color: var(--copper-text); } a:hover { color: #F2C08F; }
h1, h2, h3, .display { font-family: 'Space Grotesk', sans-serif; }
h1 { font-size: 34px; line-height: 1.15; margin: 0; }
h2 { font-size: 20px; font-weight: 600; margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } h1 { font-size: 28px; } }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand b { font-family: 'Space Grotesk', sans-serif; font-size: 17px; letter-spacing: .5px; display: block; line-height: 1.15; }
.brand small { font-size: 12px; color: var(--muted); }
nav.main { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
nav.main a { padding: 10px 14px; border-radius: 8px; color: var(--text3); text-decoration: none; font-weight: 500; }
nav.main a[aria-current="page"] { background: var(--hover); color: var(--text); font-weight: 600; }
.me { display: flex; align-items: center; gap: 10px; }
.me small { display: block; font-size: 12px; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #5865F2; display: inline-flex; align-items: center; justify-content: center;
          font-weight: 600; font-size: 14px; color: #fff; flex-shrink: 0; overflow: hidden; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 72px; height: 72px; font-size: 28px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* controls */
.btn { min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line2); background: transparent; color: var(--text);
       font: 500 14px Inter, sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn:hover { border-color: var(--copper); color: var(--text); }
.btn.primary, .btn[aria-pressed="true"] { background: var(--copper); border-color: var(--copper); color: var(--on-copper); font-weight: 600; }
.btn.danger { border-color: #7A3A3E; color: var(--red); }
.btn.danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--text2);
        font: 13px Inter, sans-serif; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--copper); background: var(--warn-bg); color: var(--warn-text); font-weight: 600; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input, select, textarea { min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg); color: var(--text);
                          font: 14px Inter, sans-serif; width: 100%; }
textarea { padding: 10px 12px; min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible, a:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.switch { flex-shrink: 0; width: 44px; height: 26px; border-radius: 13px; border: none; background: var(--line2); position: relative; cursor: pointer; padding: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"] { background: var(--copper); }
.switch[aria-checked="true"]::after { left: 22px; }

/* layout */
main.page { padding-top: 32px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
.cols { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card h2 { font-size: 17px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row-flex { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spread { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--copper-text); }
.label-caps { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line2); color: var(--text2); white-space: nowrap; }
.pill.spont { border-color: var(--lav-line); color: var(--lav); }
.pill.ok { border: none; background: var(--green-bg); color: var(--green); font-weight: 600; }
.pill.warn { border: none; background: var(--warn-bg); color: var(--warn-text); font-weight: 600; }
.pill.bad { border: none; background: var(--red-bg); color: var(--red); font-weight: 600; }
.back { font-size: 14px; text-decoration: none; }
.facts { display: flex; flex-wrap: wrap; gap: 28px; font-size: 14px; }
.facts span { color: var(--muted); display: block; }
.facts b { font-weight: 500; color: var(--text); }
.list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }
.list .head { padding: 10px 20px; background: var(--panel); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 20px; color: var(--text); text-decoration: none; }
a.row:hover { background: var(--hover); color: var(--text); }
.row .date { width: 56px; text-align: center; line-height: 1.1; }
.row .date span { font-size: 12px; color: var(--muted); text-transform: uppercase; display: block; }
.row .date b { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; }
.row .name { flex: 1 1 220px; min-width: 0; }
.row .name b { font-weight: 600; }
.row .name small { display: block; font-size: 13px; color: var(--muted); }
.row .count { font-size: 14px; color: var(--text3); min-width: 80px; text-align: right; }
.empty { color: var(--muted); padding: 20px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stats b { font-family: 'Space Grotesk', sans-serif; font-size: 28px; display: block; line-height: 1.2; }
.stats span { font-size: 13px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tiles .card b { font-family: 'Space Grotesk', sans-serif; font-size: 32px; display: block; line-height: 1.2; }
.tiles .card span { font-size: 13px; color: var(--muted); }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; padding: 12px; background: var(--panel); white-space: nowrap; }
td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 20px; } th:last-child, td:last-child { padding-right: 20px; }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar > div { height: 100%; background: var(--copper); }

/* sign-in / message screens */
.center-msg { max-width: 480px; margin: 12vh auto; text-align: center; padding: 0 16px; }
.center-msg h1 { margin-bottom: 8px; }
.center-msg p { color: var(--text3); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--warn-bg); border: 1px solid var(--warn-line); color: #F7E2CC;
         padding: 12px 18px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px); z-index: 50; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 14px; padding: 24px; width: min(480px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
.creator { display: inline-flex; align-items: center; justify-content: center; color: #F2555A; margin-left: 6px; vertical-align: -2px; }
.bell { position: relative; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--text2); text-decoration: none; }
.bell:hover { border-color: var(--copper); color: var(--text); }
.bell[aria-current="page"] { background: var(--hover); color: var(--text); }
.bell span { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--copper); color: var(--on-copper);
             font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.yay { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--green-bg); color: var(--green); font-weight: 600; }
.nay { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--red-bg); color: var(--red); font-weight: 600; }
/* checkboxes */
input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0;
  border: 1.5px solid var(--line2); border-radius: 6px; background: var(--bg); cursor: pointer; display: inline-grid; place-content: center;
  transition: background-color .12s, border-color .12s; }
input[type="checkbox"]::after { content: ''; width: 11px; height: 11px; transform: scale(0); transition: transform .12s;
  background: var(--on-copper); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); }
input[type="checkbox"]:hover { border-color: var(--copper); }
input[type="checkbox"]:checked { background: var(--copper); border-color: var(--copper); }
input[type="checkbox"]:checked::after { transform: scale(1); }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
input[type="checkbox"]:disabled { opacity: .5; cursor: progress; }
label.check { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 12px 0 10px; border: 1px solid var(--line2); border-radius: 999px;
  font-size: 13px; color: var(--text2); cursor: pointer; user-select: none; }
label.check:hover { border-color: var(--copper); }
label.check:has(input:checked) { border-color: var(--copper); background: var(--warn-bg); color: var(--warn-text); font-weight: 600; }
