/* XXPanel — minimal dark theme */
* { box-sizing: border-box; margin: 0; }
:root {
  --bg: #0e1116; --bg2: #161b22; --bg3: #1d242e; --line: #2a313c;
  --fg: #e6e9ee; --dim: #8b949e; --accent: #4f8cff;
  --up: #3fb950; --grace: #d29922; --down: #f85149; --paused: #6e7681;
}
[v-cloak] { display: none; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: var(--fg); background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px; cursor: pointer; }
button:hover { border-color: var(--dim); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:disabled { opacity: .6; cursor: default; }
button.wide { width: 100%; }
button.linkish { background: none; border: none; color: var(--accent); padding: 2px 6px; }
button.linkish.danger { color: var(--down); }
input, select { font: inherit; color: var(--fg); background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus { outline: none; border-color: var(--accent); }
code { font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; font-size: 13px; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; word-break: break-all; }
.err { color: var(--down); margin-top: 8px; }
.ok { color: var(--up); margin-top: 8px; }
.hint { color: var(--dim); font-size: 13px; margin-top: 8px; }
.dim { color: var(--dim); }
.accent { color: var(--accent); }
.spacer { flex: 1; }

/* auth */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 360px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 30px; }
.auth-card h1 { font-size: 26px; margin-bottom: 4px; }
.auth-card form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.tabs { display: flex; gap: 6px; margin-top: 14px; }
.tabs button { flex: 1; border-radius: 8px; }
.tabs button.on { border-color: var(--accent); color: var(--accent); }

/* layout */
.layout { display: flex; min-height: 100vh; }
.side { width: 200px; background: var(--bg2); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.logo { font-size: 20px; font-weight: 700; padding: 6px 10px 16px; }
.side a { color: var(--dim); padding: 8px 10px; border-radius: 8px; }
.side a.on { background: var(--bg3); color: var(--fg); }
.side-foot { margin-top: auto; padding: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.who { color: var(--dim); word-break: break-all; }
.main { flex: 1; padding: 26px 30px; max-width: 1000px; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.counts { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-size: 13px; color: var(--dim); background: var(--bg2); border: 1px solid var(--line); padding: 3px 10px; border-radius: 20px; }
.pill.up { color: var(--up); } .pill.grace { color: var(--grace); } .pill.down { color: var(--down); }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--paused); }
.dot.big { width: 14px; height: 14px; }
.dot.up { background: var(--up); } .dot.grace { background: var(--grace); }
.dot.down { background: var(--down); } .dot.paused { background: var(--paused); }

table.checks { width: 100%; border-collapse: collapse; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.checks th { text-align: left; color: var(--dim); font-weight: 500; font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.checks td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
table.checks tbody tr:last-child td { border-bottom: none; }
table.checks tbody tr { cursor: pointer; }
table.checks tbody tr:hover { background: var(--bg3); }
td.name { font-weight: 600; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.rowbtns { white-space: nowrap; text-align: right; }
.tag { font-size: 11px; color: var(--accent); border: 1px solid var(--accent); border-radius: 10px; padding: 0 7px; margin-left: 8px; vertical-align: 1px; }

.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.card h3 { font-size: 15px; margin-bottom: 12px; }
.code-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.code-row code { flex: 1; }
.variant { margin: 10px 0; padding: 10px; border-top: 1px dashed var(--line); }
.events { list-style: none; }
.events li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.events li:last-child { border-bottom: none; }
.events .when { margin-left: auto; color: var(--dim); font-size: 13px; white-space: nowrap; }
.ch-row { display: flex; gap: 10px; align-items: center; }
.ch-form { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-form select { width: 210px; }
.ch-form input { width: 240px; }
.empty { text-align: center; color: var(--dim); padding: 60px 0; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 10; }
.modal-card { width: 440px; max-height: 90vh; overflow: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.modal-card h3 { margin-bottom: 14px; }
.modal-card label { display: block; color: var(--dim); font-size: 13px; margin-bottom: 12px; }
.modal-card label input, .modal-card label select { margin-top: 5px; }
.modal-card label.checkline { display: flex; align-items: center; gap: 8px; color: var(--fg); }
.modal-card label.checkline input { width: auto; margin: 0; }
.modal-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .main { padding: 16px; }
  .ch-form input, .ch-form select { width: 100%; }
}
