:root { --bg: #f7f7fb; --card: #fff; --fg: #1d1d2b; --muted: #6b6b80; --line: #e4e4ee; --acc: #5b5bf0; --acc2: #ececfe; --ok: #1f9d55; --warn: #c27c0e; --bad: #d64545; }
@media (prefers-color-scheme: dark) { :root { --bg: #14141c; --card: #1e1e2a; --fg: #ececf4; --muted: #9a9ab0; --line: #2e2e3e; --acc: #8686ff; --acc2: #2a2a4a; } }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--fg); }
a { color: var(--acc); text-decoration: none; }
h1 { font-size: 22px; margin: 4px 0; } h3 { margin: 24px 0 8px; }
input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); width: 100%; }
label { display: block; margin: 10px 0; color: var(--muted); } label input { margin-top: 4px; color: var(--fg); }
button, .btn { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; white-space: nowrap; display: inline-block; }
.primary { background: var(--acc); border-color: var(--acc); color: #fff; } .ghost { background: transparent; } .danger { color: var(--bad); }
.link { border: 0; background: none; color: var(--acc); padding: 0; }
.wide { width: 100%; margin-top: 8px; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; } .row.end { justify-content: flex-end; margin-top: 16px; }
.muted { color: var(--muted); }
.shell { display: flex; min-height: 100vh; }
.side { width: 200px; padding: 20px; border-right: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 10px; }
.brand { font-weight: 700; font-size: 18px; color: var(--fg); margin-bottom: 12px; }
main { flex: 1; padding: 24px 32px; min-width: 0; }
header { margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--fg); display: flex; flex-direction: column; gap: 6px; }
.card:hover { border-color: var(--acc); } .card small { color: var(--muted); }
.stats3 { margin-top: 8px; color: var(--muted); font-size: 13px; } .stats3 b { color: var(--fg); }
.empty { padding: 48px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--acc2); color: var(--acc); vertical-align: middle; font-weight: 600; text-transform: uppercase; }
.pill.live, .pill.given { background: #dff5e7; color: var(--ok); } .pill.paused, .pill.pending { background: #fdf0d9; color: var(--warn); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; } .tabs a.on { color: var(--fg); border-color: var(--acc); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; } .kpi small { color: var(--muted); display: block; } .kpi b { font-size: 24px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.bars div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bars i { display: block; width: 100%; background: var(--acc); border-radius: 4px 4px 0 0; min-height: 2px; } .bars small { font-size: 10px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 12px; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; } th { color: var(--muted); font-weight: 500; font-size: 12px; }
tr.flagged td { opacity: .5; text-decoration: line-through; } tr.flagged td:last-child { text-decoration: none; opacity: 1; }
#q { max-width: 320px; }
pre { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; }
.narrow { max-width: 560px; } .ms { justify-content: flex-start; margin: 6px 0; } .ms input[type=number] { width: 80px; } .ms input[name=reward] { flex: 1; width: auto; }
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 24px; width: min(560px, calc(100vw - 32px)); background: var(--card); color: var(--fg); }
dialog::backdrop { background: rgba(0,0,0,.4); }
.tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0; cursor: pointer; color: var(--fg); }
.tpl:has(input:checked) { border-color: var(--acc); background: var(--acc2); } .tpl input { width: auto; margin: 0 6px 0 0; } .tpl small { display: block; color: var(--muted); }
/* widget */
.widget { display: flex; justify-content: center; padding: 24px 16px; }
.wbox { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.big { font-size: 40px; font-weight: 700; margin: 8px 0; } .big small { font-size: 14px; color: var(--muted); font-weight: 400; }
.ml, .lb { padding-left: 20px; } .lb li { display: flex; justify-content: space-between; }
.share { justify-content: flex-start; margin-top: 8px; }
.err { color: var(--bad); }
.logout { margin-top: auto; text-align: left; color: var(--muted); }
@media (max-width: 700px) { .logout { margin: 0 0 0 auto; } }
@media (max-width: 700px) { .shell { flex-direction: column; } .side { width: auto; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); } .brand { margin: 0 12px 0 0; } main { padding: 16px; } .tpls { grid-template-columns: 1fr; } }
