/* Maniac Board - approved design (Distribution look). All colours come from themes.css variables. */
:root {
  --pending: #ffd76a; --info: #8ab4ff;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --good-bg: color-mix(in srgb, var(--good) 12%, transparent);
  --bad-bg: color-mix(in srgb, var(--bad) 12%, transparent);
  --pending-bg: color-mix(in srgb, var(--pending) 12%, transparent);
  --info-bg: color-mix(in srgb, var(--info) 12%, transparent);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-color: var(--border-2) transparent; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: var(--hover); padding: 1px 5px; border-radius: 5px; }

/* ---------- shell ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }
.side { width: 236px; flex: none; height: 100%; background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 16px 12px; gap: 2px; overflow-y: auto; }
.brand { font-weight: 800; letter-spacing: .08em; font-size: 14px; padding: 4px 10px 14px; }
.brand span { color: var(--accent); }
.brand.center { justify-content: center; padding-bottom: 20px; }
/* The Maniac logo (white on transparent, wwwroot/img/maniac-logo.png). */
.brand, .cab-brand, .portal-brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { display: block; height: 18px; width: auto; flex: none; }
.brand.center .brand-logo { height: 26px; }
:root[data-theme="light"] .brand-logo { filter: invert(1); }
.grp { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); padding: 12px 10px 4px; }
.nav { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 9px; color: var(--text-2); font-size: 13.5px; }
.nav:hover { background: var(--hover); color: var(--text); }
.nav.on { background: var(--accent-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.ico { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.me { margin-top: auto; border-top: 1px solid var(--border); padding: 12px 4px 0; display: flex; flex-direction: column; gap: 10px; }
.me-row { display: flex; align-items: center; gap: 10px; }
.tg-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; color: inherit; text-decoration: none; }
.tg-row:hover { border-color: var(--border-2, var(--border)); }
.me-name { display: flex; flex-direction: column; min-width: 0; }
.main { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.top { height: 60px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 28px; border-bottom: 1px solid var(--border); }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs b { color: var(--text); font-weight: 600; }
.top-act { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.page { flex: 1; min-height: 0; overflow: auto; padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 18px; }
/* A long page scrolls; its blocks never get squeezed (a card with overflow: hidden would otherwise be cut off). */
.page > * { flex-shrink: 0; }

/* ---------- type ---------- */
.h1 { font-size: 24px; font-weight: 750; margin: 0; letter-spacing: -.01em; }
.h1.big { font-size: 30px; }
.sub { color: var(--muted); font-size: 13px; }
.sub.big { font-size: 14px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.neg { color: var(--bad); }
.pos { color: var(--good); }
.center { text-align: center; }
.big-title { font-size: 18px; font-weight: 750; }
.step-body { color: var(--text-2); }
.help { font-size: 12px; color: var(--muted-2); }
.card-t { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

/* ---------- layout helpers ---------- */
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack-2 { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stack-3 { display: flex; flex-direction: column; gap: 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ml-auto { margin-left: auto; }
.w-fit { width: fit-content; }
.w-full { width: 100%; justify-content: center; }
.grow { flex: 1; min-width: 0; }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.grid-main-side { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .grid-main-side, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- controls ---------- */
.btn { height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn:hover { border-color: var(--muted-2); background: var(--hover); color: var(--text); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); color: var(--accent-text); }
.btn.ghost { background: transparent; }
.btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.icon { width: 38px; padding: 0; justify-content: center; }
.btn.sm.icon { width: 30px; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-bg); }
.input, .select { height: 38px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--panel); color: var(--text); font-size: 13px; padding: 0 12px; width: 100%; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.input:hover, .select:hover { border-color: var(--muted-2); }
.select.sm { height: 30px; font-size: 12px; width: auto; }
.input.code { font-size: 20px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.cell-ctrl { width: 100%; min-width: 90px; height: 30px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--border-2); background: var(--bg); color: var(--text); font-size: 12.5px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.field.tiny { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: 10px; padding: 3px; gap: 2px; background: var(--panel); flex-wrap: wrap; width: fit-content; }
.seg button { height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 0 12px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border-2); }
.hidden-file { display: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: span 2; }
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-error { color: var(--bad); margin: 0; font-size: 13px; }

/* ---------- chips / bars / avatars ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; border: 1px solid var(--border-2); color: var(--text-2); white-space: nowrap; width: fit-content; }
.chip.mini { height: 18px; font-size: 10px; padding: 0 7px; }
.chip.good { color: var(--good); background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.chip.pend { color: var(--pending); background: var(--pending-bg); border-color: color-mix(in srgb, var(--pending) 30%, transparent); }
.chip.bad { color: var(--bad); background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.chip.info { color: var(--info); background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.chip.acc { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.chip.mute { color: var(--muted); }
.bar { display: block; height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.bar.thick { height: 8px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex: none; }
.av.sm { width: 24px; height: 24px; font-size: 10px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-b { padding: 16px 18px; }
.state-box { border: 1px dashed var(--border-2); border-radius: 12px; padding: 28px 20px; text-align: center; color: var(--muted); }
.state-box a { color: var(--accent); }
.skel-block, .skel-line { border-radius: 12px; background: linear-gradient(90deg, var(--surface) 25%, var(--hover) 37%, var(--surface) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skel-block { height: 320px; }
.skel-line { height: 18px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skel-block, .skel-line { animation: none; } }

/* ---------- tickets list ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head-t { display: flex; flex-direction: column; gap: 4px; }
.page-head-stats { margin-left: auto; display: flex; gap: 10px; }
.stat-inline { padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.stat-inline .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.stat-inline .v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-field { position: relative; display: flex; align-items: center; width: 300px; }
.search-field .ico { position: absolute; left: 11px; color: var(--muted); }
.search-field .input { padding-left: 34px; }
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border-2); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:hover td { background: var(--hover); }
.tbl tr.has-problems td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.th-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.th-btn:hover { color: var(--text); }
th.asc .th-btn::after { content: " ↑"; color: var(--accent); }
th.desc .th-btn::after { content: " ↓"; color: var(--accent); }
.th-reset { background: none; border: 0; color: var(--muted-2); cursor: pointer; padding: 0 0 0 4px; }
.w-progress { width: 190px; }
.ticket-id { display: flex; gap: 8px; align-items: flex-start; }
.tick { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border-2); background: transparent; color: var(--muted-2); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; flex: none; }
span.tick { cursor: default; }
.tick .ico { width: 13px; height: 13px; }
.tick.ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); background: var(--good-bg); }
.budget { font-size: 11.5px; color: var(--accent); }
.cell-release { min-width: 220px; }
.cell-release .song { font-weight: 650; font-size: 14px; }
.cell-comment { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-actions { white-space: nowrap; text-align: right; }
.cell-actions .btn + .btn { margin-left: 6px; }
.owner { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.progress-cell { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.progress-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.empty-row { padding: 28px !important; text-align: center; color: var(--muted); }
.pager { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 12.5px; color: var(--muted); }
.pager-nav { margin-left: auto; display: flex; gap: 6px; }

/* ---------- ticket page ---------- */
.tabs { margin-top: -4px; }
.ticket-head { padding: 22px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.ticket-head-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.ticket-head-progress { width: 300px; display: flex; flex-direction: column; gap: 8px; }
.phase-row { display: flex; justify-content: space-between; font-size: 11px; }
.phase-row .good { color: var(--good); }
.phase-row .cur { color: var(--text); font-weight: 700; }
.phase-row .muted { color: var(--muted-2); }
.recent { display: inline-block; margin-left: 6px; border-bottom: 1px dotted var(--muted-2); cursor: help; }
.fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.field-view { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.field-k { font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.field-v { font-weight: 600; }
.problem-line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); }
.problem-line > .ico { color: var(--bad); margin-top: 2px; }
.money-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.money { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.activity-line { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.activity-line:last-child { border-bottom: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex: none; }
.dot.milestone { background: var(--info); }
.dot.field { background: var(--accent); }
.dot.problem { background: var(--bad); }
.dot.resolved { background: var(--good); }
.version-line { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.version-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.version-edit .input { flex: 1; min-width: 160px; }
.upload-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.file-group { display: flex; flex-direction: column; gap: 8px; }
.file-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.file-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.file-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-main audio { width: 100%; height: 32px; margin-top: 4px; }
.file-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cover-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-2); flex: none; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 40; }
.modal { position: fixed; left: 50%; top: 80px; transform: translateX(-50%); width: 560px; max-width: calc(100vw - 32px); max-height: calc(100vh - 120px); z-index: 50; background: var(--panel); border: 1px solid var(--border-2); border-radius: 16px; display: flex; flex-direction: column; }
.modal-h, .drawer-h { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-titles, .drawer-titles { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.modal-title, .drawer-title { font-size: 17px; font-weight: 750; }
.modal-h .btn, .drawer-h .btn { margin-left: auto; }
.modal-b { padding: 20px 22px; overflow: auto; }
.modal-f, .drawer-f { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.confirm-text { margin: 0; color: var(--text-2); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 100vw; z-index: 50; background: var(--panel); border-left: 1px solid var(--border-2); display: flex; flex-direction: column; }
.drawer-b { flex: 1; overflow: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 18px; }
.toast-stack { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); font-size: 13px; }
.toast.error { border-color: color-mix(in srgb, var(--bad) 50%, transparent); color: var(--bad); }
.toast-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; }

/* ---------- sign-in ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 420px; max-width: 100%; background: var(--surface); border: 1px solid var(--border-2); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.auth-title { font-size: 22px; margin: 0; text-align: center; }
.alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; }
.alert.bad { background: var(--bad-bg); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.qr { align-self: center; background: #fff; padding: 8px; border-radius: 10px; }
.secret { word-break: break-all; }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; padding: 12px 20px; background: var(--bad-bg); color: var(--bad); border-top: 1px solid var(--bad); }
#blazor-error-ui .reload { color: var(--text); text-decoration: underline; margin-left: 8px; }
/* Ctrl+K palette */
.palette-opener { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.palette { width: 640px; top: 90px; }
.palette-input { margin: 14px 14px 8px; }
.palette-list { overflow-y: auto; padding: 0 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.palette-hint { padding: 8px 10px; }
.palette-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text); text-decoration: none; min-width: 0; }
.palette-row.on { background: var(--hover); }
/* "Emil is also here": bottom-left of the page area, clear of the menu and the toasts. */
.presence-badge { position: fixed; bottom: 20px; left: 256px; z-index: 60; display: flex; align-items: center; gap: 8px; padding: 6px 12px;
    background: var(--panel); border: 1px solid var(--border-2, var(--border)); border-radius: 999px; font-size: 12px; color: var(--muted);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
@media (max-width: 900px) { .presence-badge { left: 16px; } }
.nav-search { display: flex; align-items: center; gap: 10px; width: 100%; margin: 4px 0 8px; padding: 8px 10px; border-radius: 9px;
    border: 1px solid var(--border); background: var(--bg); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.nav-search:hover { color: var(--text); border-color: var(--border-2, var(--border)); }
.nav-search span { flex: 1; }
.nav-search kbd { font: 600 10.5px/1 inherit; padding: 3px 5px; border-radius: 5px; border: 1px solid var(--border); color: var(--muted); }
/* Narrow windows and phones: the menu becomes a slide-in panel opened by ☰ (old BOARD did the same below 820 px). */
.nav-toggle, .hamburger, .nav-scrim { display: none; }
@media (max-width: 820px) {
    .hamburger { display: flex; align-items: center; justify-content: center; position: fixed; top: 9px; left: 10px; z-index: 72;
        width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border-2, var(--border)); background: var(--panel);
        color: var(--text); font-size: 18px; cursor: pointer; }
    .side { position: fixed; top: 0; left: 0; z-index: 71; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .5); }
    .nav-toggle:checked ~ .side { transform: none; }
    .nav-toggle:checked ~ .nav-scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .5); }
    .top { padding-left: 64px; padding-right: 12px; overflow-x: auto; }
    .top-act { flex: none; }
    .side .brand { padding-left: 58px; padding-top: 14px; }
    .page { padding: 18px 14px 40px; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }
.filters .select { width: auto; min-width: 170px; }
.tbl td .num { white-space: nowrap; }
.archives-scroll { max-height: 520px; overflow-y: auto; }
/* Chat message formatting (ChatMarkup / artist-chat.js) */
.md { word-break: break-word; line-height: 1.5; }
.md-h1, .md-h2, .md-h3 { display: inline-block; font-weight: 750; margin: 4px 0 2px; }
.md-h1 { font-size: 1.35em; } .md-h2 { font-size: 1.2em; } .md-h3 { font-size: 1.07em; }
.md code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; padding: 1px 5px; border-radius: 5px; background: var(--bg); border: 1px solid var(--border); }
.composer-tools { display: flex; gap: 4px; }
.composer-tools button { min-width: 30px; height: 26px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 12.5px; }
.composer-tools button:hover { color: var(--text); }
/* Release date picker */
.date-pick { position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.date-pick > input { flex: 1; min-width: 0; }
.date-pick-btn { flex: none; }
/* Opens right under the field (never clipped by a dialog or a table) */
.date-pop { flex: 1 1 100%; min-width: 250px; max-width: 320px; padding: 10px; border-radius: 12px;
    background: var(--panel); border: 1px solid var(--border-2, var(--border)); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.date-pop-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.date-dow { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0; }
.date-dow.fri { color: var(--accent); font-weight: 700; }
.date-day { height: 32px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.date-day:hover { background: var(--hover); }
.date-day.fri { background: var(--accent-soft, rgba(255, 106, 0, .15)); font-weight: 700; }
.date-day.past { opacity: .4; }
.date-day.today { border-color: var(--border-2, var(--border)); }
.date-day.sug { border-color: var(--good); }
.date-day.on { background: var(--accent); color: #111; }
.date-pop-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.date-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.date-key.fri { background: var(--accent-soft, rgba(255, 106, 0, .25)); }
.date-key.sug { border: 1px solid var(--good); }

/* Points: the menu counter (where Timeglass was), the "+0.5" pop, history lines. */
.pts-row { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; color: inherit; text-decoration: none; }
.pts-row:hover { border-color: var(--border-2, var(--border)); }
.pts-nums { display: flex; align-items: baseline; gap: 2px; font-variant-numeric: tabular-nums; }
.pts-dot { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--panel); }
.pts-pop { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, -100%); font-weight: 700; font-size: 15px; color: var(--good); text-shadow: 0 1px 2px rgba(0,0,0,.35); animation: pts-float 1.1s ease-out forwards; }
@keyframes pts-float { 0% { opacity: 0; transform: translate(-50%, -60%); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -260%); } }
.pts-plus { color: var(--good); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.pts-minus { color: var(--bad); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.pts-new { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.dot.points { background: var(--good); }
.pts-totals { display: flex; gap: 12px; flex-wrap: wrap; }
.pts-total { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); min-width: 140px; }
.pts-total b { font-size: 26px; font-variant-numeric: tabular-nums; }
.pts-input { width: 80px; text-align: right; }
/* Admin > Points: the month's points as a pie, split of an amount by points. Slice colours read on every theme. */
:root { --sp1: #ff7a1a; --sp2: #4f8cff; --sp3: #33c27f; --sp4: #e5486b; --sp5: #f2b630; --sp6: #9b6bff; --sp7: #22b8c7; --sp8: #c7568f; --sp9: #8a9a3b; --sp10: #8c8f99; }
.split { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 28px; align-items: center; }
.split-pie { width: 100%; max-width: 280px; aspect-ratio: 1; margin: 0 auto; display: block; }
.split-pie path, .split-pie circle { stroke: var(--surface); stroke-width: 1.5; transition: opacity .15s; }
.split-pie:hover path:not(:hover) { opacity: .45; }
.split-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: baseline; }
.split-total td { font-weight: 600; border-bottom: 0; }
.split-tbl td:first-child { white-space: nowrap; }
.split-amount { display: flex; align-items: center; gap: 8px; }
.split-money { display: inline-flex; align-items: center; gap: 4px; }
.split-money .input { width: 120px; height: 30px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .split { grid-template-columns: minmax(0, 1fr); } .card-h:has(.split-amount) { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { .split-pie path { transition: none; } }
.pts-month { background: var(--surface); padding-block: 8px; }
.pts-back > .grow, .pts-back > .pts-plus, .pts-back > .pts-minus { opacity: .55; }
.pts-back .pts-plus, .pts-back .pts-minus { text-decoration: line-through; }
