 :root {
  color-scheme: dark;
  --bg:#0f0f13; --bg-2:#1a1a24; --panel:#22222e; --panel-2:#2a2a38;
  --line:#2e2e3a; --line-soft:#2e2e3a; --text:#e8e8ed; --muted:#8e8e9b; --dim:#6d6d7c;
  --brand:#6366f1; --brand-2:#818cf8; --brand-ink:#fff; --danger:#ef4444; --warn:#fbbf24; --ok:#22c55e;
  --radius:10px; --radius-sm:10px; --shadow:0 18px 40px -24px rgba(0,0,0,.65);
}
[data-theme="light"] {
  color-scheme:light; --bg:#f4f5f9; --bg-2:#ffffff; --panel:#ffffff; --panel-2:#e9eaf2;
  --line:#dfe1ea; --line-soft:#dfe1ea; --text:#1c1c28; --muted:#6d6d7c; --dim:#8e8e9b;
  --brand:#6366f1; --brand-2:#4f46e5; --brand-ink:#fff; --shadow:0 18px 40px -24px rgba(15,15,30,.18);
}


* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(99, 102, 241, .14), transparent 60%),
    radial-gradient(900px 480px at 92% 0%, rgba(129, 140, 248, .10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 26px;
  height: 62px;
  background: rgba(8, 14, 23, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--text);
  font-size: 16px;
}
.brand:hover { text-decoration: none; }
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .16), 0 0 18px rgba(99, 102, 241, .8);
}
.brand small { color: var(--dim); font-weight: 500; font-size: 12px; margin-left: 2px; }

.nav { display: flex; gap: 6px; margin-left: 10px; }
.nav a {
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.active { background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(129,140,248,.12)); color: var(--brand); }

.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 4px; }
.who .navlink {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.who .navlink:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.who .navlink.active { color: var(--brand); background: rgba(99, 102, 241, .08); }
.who .who-name { color: var(--text); padding: 0 6px; }
@media (max-width: 620px) {
  .who .navlink { padding: 6px 8px; font-size: 13px; }
  .who .who-name { display: none; }
  .topbar { gap: 8px; }
}
@media (max-width: 480px) {
  .brand { font-size: 15px; gap: 7px; }
  .brand small { display: none; }
  .who { gap: 0; }
  .who .navlink { padding: 6px 5px; font-size: 12.5px; }
  .hero h1 { font-size: 25px; }
}
.badge-role {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: rgba(251, 191, 36, .14); color: var(--warn); border: 1px solid rgba(251, 191, 36, .28);
}

main { max-width: 1180px; margin: 0 auto; padding: 34px 26px 70px; }
main.narrow { max-width: 520px; padding-top: 7vh; }

h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.4px; }
h2 { font-size: 18px; margin: 0 0 14px; letter-spacing: -.2px; }
h3 { font-size: 15px; margin: 0 0 10px; }
p.lead { color: var(--muted); margin: 0 0 26px; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.018), transparent), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-sub { color: var(--muted); font-size: 13px; }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { main { padding: 22px 16px 60px; } .topbar { padding: 0 14px; } .nav { display: none; } }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
label.field .hint { display: block; font-size: 12px; color: var(--dim); margin-top: 5px; }

input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(99, 102, 241, .55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
input::placeholder { color: #4f6380; }
input.uid { font-family: var(--mono); letter-spacing: 2px; text-transform: uppercase; }
textarea { min-height: 84px; resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: var(--panel-2);
  color: var(--text);
  transition: transform .12s, filter .15s, background .15s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--brand-ink);
  box-shadow: 0 10px 24px -14px rgba(99, 102, 241, .8);
}
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: #31496a; }
.btn-danger { background: rgba(248, 113, 113, .12); color: var(--danger); border-color: rgba(248,113,113,.3); }
.btn-wake { background: linear-gradient(135deg, #6366f1, #818cf8); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.hidden { display: none !important; }

.alert {
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-error { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.3); color: #fca5a5; }
.alert-ok { background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.3); color: #6ee7b7; }
.alert-info { background: rgba(129,140,248,.08); border-color: rgba(129,140,248,.25); color: #c7d2fe; }
.alert-warn { background: rgba(251,191,36,.09); border-color: rgba(251,191,36,.28); color: #fcd34d; }

.auth-card {
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent), var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9);
}
.auth-title { text-align: center; margin-bottom: 22px; }
.auth-title .logo { font-size: 30px; margin-bottom: 6px; }
.auth-title h1 { font-size: 22px; margin: 0 0 4px; }
.auth-title p { margin: 0; color: var(--muted); font-size: 13px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }

.tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 12px; margin-bottom: 20px; }
.tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px;
  border-radius: 9px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.tabs button.active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; font-family: var(--mono); letter-spacing: 4px; }
.code-row .btn { min-width: 108px; }

.device {
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.device:hover { border-color: #2b4363; box-shadow: 0 20px 40px -30px rgba(99,102,241,.4); }
.device-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.device-name { font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 9px; }
.status-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #475569; flex: none;
  box-shadow: 0 0 0 3px rgba(71,85,105,.16);
}
.status-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(52,211,153,.16), 0 0 12px rgba(52,211,153,.7); }
.status-dot.off { background: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,.14); }
.status-dot.warn { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.16), 0 0 12px rgba(251,191,36,.6); }
.dot-note { font-size: 12px; color: #fbbf24; margin-right: 2px; white-space: nowrap; }
.online-text { font-size: 12px; color: var(--muted); }
.online-text.on { color: var(--ok); }

.fw-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 11, 18, .74);
}
.fw-overlay-box {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 28px 40px; border-radius: 16px;
  background: #141d2b; border: 1px solid #26364c;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8);
  text-align: center;
}
.fw-overlay-box strong { font-size: 17px; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(99, 102, 241, .22); border-top-color: #6366f1;
  animation: fw-spin .8s linear infinite;
}
@keyframes fw-spin { to { transform: rotate(360deg); } }

.uid-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px dashed var(--line);
  border-radius: 9px; padding: 9px 12px;
  font-family: var(--mono); font-size: 13.5px; letter-spacing: 1.5px; color: var(--brand);
  justify-content: space-between;
}
.copy-btn { border: 0; background: transparent; color: var(--dim); cursor: pointer; font-size: 12px; padding: 2px 4px; }
.copy-btn:hover { color: var(--brand); }
.uid-dots { color: #47576e; letter-spacing: 1px; }

.info-list { margin: 0; padding: 0; }
.info-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: var(--dim); font-size: 13px; margin: 0; flex: none; }
.info-list dd { margin: 0; color: var(--text); font-size: 13.5px; text-align: right; word-break: break-all; }

.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 14px; font-size: 13px; }
.meta-grid .k { color: var(--dim); }
.meta-grid .v { color: var(--muted); font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }

.wol-config { border-top: 1px solid var(--line-soft); padding-top: 13px; display: grid; gap: 10px; }
.wol-config .fields { display: grid; grid-template-columns: 1.4fr 1fr .7fr; gap: 8px; }
@media (max-width: 640px) { .wol-config .fields { grid-template-columns: 1fr; } }

.cmd-list { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.cmd-item { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.cmd-item .time { color: var(--dim); font-family: var(--mono); font-size: 11.5px; margin-left: auto; }
.pill { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid transparent; }
.pill.pending { color: var(--warn); background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.25); }
.pill.sent { color: var(--brand-2); background: rgba(129,140,248,.1); border-color: rgba(129,140,248,.25); }
.pill.done { color: var(--ok); background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.25); }
.pill.error { color: var(--danger); background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.25); }
.pill.expired { color: var(--dim); background: rgba(97,116,141,.12); border-color: rgba(97,116,141,.25); }

.empty { text-align: center; color: var(--dim); padding: 34px 16px; font-size: 14px; }

.stat {
  background: var(--bg-2); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 14px 16px;
}
.stat .n { font-size: 24px; font-weight: 700; color: var(--text); font-family: var(--mono); }
.stat .l { font-size: 12px; color: var(--dim); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); }
table.tbl th { color: var(--dim); font-weight: 500; font-size: 12px; }
table.tbl tr:hover td { background: rgba(255,255,255,.015); }
.table-wrap { overflow-x: auto; }

.tabbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--line-soft); padding-bottom: 12px; }
.tabbar button {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 8px 14px; border-radius: 9px; cursor: pointer; font-size: 14px; font-family: inherit;
}
.tabbar button:hover { color: var(--text); background: var(--panel); }
.tabbar button.active { color: var(--brand); background: rgba(99,102,241,.08); border-color: rgba(99,102,241,.25); }
.tabpane { display: none; }
.tabpane.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 18px; }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } }

#toast { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 11px 16px; font-size: 13.5px; min-width: 200px; max-width: 340px;
  box-shadow: 0 16px 34px -18px rgba(0,0,0,.9);
  animation: slide .22s ease;
}
.toast.ok { border-color: rgba(52,211,153,.4); }
.toast.err { border-color: rgba(248,113,113,.45); }
@keyframes slide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero { padding: 46px 0 20px; text-align: center; }
.hero h1 { font-size: 38px; letter-spacing: -1px; margin-bottom: 14px; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.tw-wrap { position: relative; display: inline-block; max-width: 100%; }
.tw-ghost { display: block; padding-right: .45em; }
.js .tw-ghost { visibility: hidden; }
.tw-live { position: absolute; left: 0; top: 0; width: 100%; text-align: left; }
.tw-caret {
  display: inline-block;
  width: 3px;
  height: .92em;
  margin-left: 5px;
  border-radius: 2px;
  vertical-align: -.08em;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 10px rgba(99, 102, 241, .55);
  animation: caret-blink 1.05s steps(1, end) infinite;
}
@keyframes caret-blink {
  0%, 49%  { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .tw-caret { animation: none; }
}
.hero p { color: var(--muted); max-width: 620px; margin: 0 auto 26px; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .hero h1 { font-size: 28px; } }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: left; }

.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity .8s cubic-bezier(.16, .84, .44, 1),
    transform .8s cubic-bezier(.16, .84, .44, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.steps .step:nth-child(2) { --reveal-delay: 110ms; }
.steps .step:nth-child(3) { --reveal-delay: 220ms; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

.step .num {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(99,102,241,.12); color: var(--brand); font-weight: 700; font-size: 13px; margin-bottom: 12px;
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 13px; }

footer.site { text-align: center; color: var(--dim); font-size: 12px; padding: 30px 0 40px; }
footer.site code { background: var(--panel); padding: 2px 6px; border-radius: 5px; font-size: 11px; }

details.help { margin-top: 10px; }
details.help summary { cursor: pointer; color: var(--dim); font-size: 12.5px; }
details.help pre {
  background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 8px;
  padding: 12px; overflow-x: auto; font-size: 12px; color: var(--muted);
}

.count-badge {
  display: inline-block;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(99, 102, 241, .12);
  border: 1px solid rgba(99, 102, 241, .28);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
  vertical-align: 3px;
}

.device-list { display: flex; flex-direction: column; gap: 12px; }

.device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.device-row:hover { border-color: #2b4363; box-shadow: 0 18px 34px -30px rgba(99, 102, 241, .5); }

.device-row-main { min-width: 0; }
.device-row-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.device-row-title .name { font-size: 16px; font-weight: 650; }

.device-row-meta {
  display: flex;
  gap: 8px 24px;
  flex-wrap: wrap;
  margin-top: 9px;
  font-size: 13px;
  color: var(--muted);
}
.device-row-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.device-row-meta b { font-weight: 500; color: var(--dim); }
.device-row-meta .mono { font-family: var(--mono); font-size: 12.5px; }

.link-btn {
  border: 0;
  background: transparent;
  color: var(--brand-2);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.link-btn:hover { background: rgba(129, 140, 248, .1); text-decoration: none; }

@media (max-width: 620px) {
  .device-row { flex-direction: column; align-items: stretch; }
  .device-row .btn { width: 100%; }
}

.device-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.device-tile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.device-tile:hover { border-color: #2b4363; box-shadow: 0 18px 34px -30px rgba(99, 102, 241, .5); }

.tile-head { display: flex; align-items: center; gap: 8px; }
.tile-head .name { font-size: 15.5px; font-weight: 650; }
.tile-head .link-btn { margin-left: auto; }

.tile-meta { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.tile-meta .line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tile-meta .k { color: var(--dim); flex: none; }
.tile-meta .v { color: var(--muted); font-family: var(--mono); font-size: 12.5px; text-align: right; }

.device-tile .row.between { align-items: center; }

input[type=file] {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
}
input[type=file]::file-selector-button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 14px;
  margin-right: 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
input[type=file]::file-selector-button:hover {
  border-color: #31496a;
}

.log-pre {
  margin: 0;
  padding: 14px 16px;
  max-height: 420px;
  overflow: auto;
  background: #0d1522;
  border: 1px solid var(--line, #22334c);
  border-radius: 10px;
  font-family: Consolas, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: #9fb0c6;
  white-space: pre-wrap;
  word-break: break-all;
}
.log-day {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line, #22334c);
  background: transparent;
  color: #8ca0ba;
  font-size: 12.5px;
  cursor: pointer;
}
.log-day.active {
  background: rgba(99, 102, 241, .14);
  border-color: rgba(99, 102, 241, .5);
  color: #5eead4;
}

.fw-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 10, 18, .74);
  backdrop-filter: blur(3px);
}
.fw-modal.hidden { display: none; }
.fw-modal-box {
  width: 100%;
  max-width: 430px;
  padding: 26px 24px 22px;
  background: #101a29;
  border: 1px solid #24344a;
  border-radius: 14px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .55);
}
.fw-modal-box h3 {
  margin: 0 0 12px;
  font-size: 18px;
  color: #fbbf24;
}
.fw-modal-box p {
  margin: 0 0 20px;
  color: #9fb0c6;
  font-size: 14px;
  line-height: 1.8;
  word-break: break-word;
}
.fw-modal-actions {
  display: flex;
  justify-content: flex-end;
}


/* MusicCatch theme finishing layer: overrides legacy hard-coded teal surfaces. */
html { background:var(--bg); transition:background .25s; }
body { background:radial-gradient(900px 460px at 10% -10%,rgba(99,102,241,.12),transparent 60%),var(--bg); color:var(--text); }
.topbar { background:color-mix(in srgb,var(--bg-2) 78%,transparent); border-bottom-color:var(--line); backdrop-filter:blur(14px) saturate(140%); }
.brand .dot { background:var(--brand); box-shadow:0 0 0 4px rgba(99,102,241,.16),0 0 18px rgba(99,102,241,.55); }
.btn-primary { background:var(--brand); border-color:var(--brand); color:#fff; } .btn-primary:hover { background:var(--brand-2); border-color:var(--brand-2); }
.card,.auth-card,.stat { background:var(--panel); border-color:var(--line); box-shadow:var(--shadow); }
input,select,textarea { background:var(--bg-2); border-color:var(--line); color:var(--text); }
input:focus,select:focus,textarea:focus { border-color:var(--brand); box-shadow:0 0 0 3px rgba(99,102,241,.14); }
.tabbar button.active,.tabs button.active { background:var(--brand); color:#fff; border-color:var(--brand); }
.tbl tr:hover td { background:color-mix(in srgb,var(--brand) 6%,transparent); }
