:root {
  color-scheme: dark;
  font: 100%/1.55 system-ui, sans-serif;
  background: #0e1422;
  color: #eef3ff;
  --surface: #151e30;
  --line: #303f59;
  --muted: #b3bfd2;
  --accent: #8ed8ff;
}
* { box-sizing: border-box; }
body { margin: 0; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); background: #111a2a; }
.bar, .heading, .tools, .actions, .search { display: flex; align-items: center; gap: .75rem; }
.bar, .heading, .tools { justify-content: space-between; flex-wrap: wrap; }
.bar { min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: inherit; font-weight: 740; text-decoration: none; }
.brand b { color: var(--accent); }
.mark { display: flex; align-items: center; justify-content: center; gap: 2px; width: 34px; height: 34px; border-radius: 10px; background: #213d57; }
.mark i { width: 2px; height: 9px; background: var(--accent); border-radius: 3px; }
.mark i:nth-child(even) { height: 14px; }
.mark i:nth-child(3) { height: 20px; }
.server, .muted, p, small { color: var(--muted); }
.server { overflow-wrap: anywhere; font-size: .875rem; }
main { padding-block: 2.75rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -.035em; }
h2 { font-size: 1.125rem; }
h1 + p { margin-top: .65rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; margin-block: 1.65rem; }
.stats div, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.stats div { padding: 1rem 1.2rem; }
.stats span { display: block; font-size: .875rem; color: var(--muted); }
.stats strong { font-size: 1.85rem; font-variant-numeric: tabular-nums; }
.tools { padding: 1rem 1.2rem; }
.search { flex-wrap: wrap; }
input, button, .button { font: inherit; }
input {
  border: 1px solid var(--line); border-radius: 8px; background: #0e1727;
  color: inherit; padding: .54rem .75rem; min-width: 0; max-width: 100%;
}
.button {
  display: inline-block; padding: .52rem .83rem; border: 1px solid var(--line);
  border-radius: 8px; background: #24334b; color: #eef3ff; text-decoration: none;
  font-weight: 650; cursor: pointer;
}
.button:hover { filter: brightness(1.2); }
.primary { background: var(--accent); color: #102333; border-color: var(--accent); }
.danger { background: #a42d46; border-color: #d26e80; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.danger-link { color: #ffadb9; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: .8rem 1.2rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
thead th { color: var(--muted); font-size: .875rem; }
.status { display: inline-block; border-radius: 99px; padding: .12rem .6rem; font-size: .875rem; }
.online { color: #a3f4d8; background: #1a473e; }
.offline { color: #cbd6e6; background: #2b394f; }
.form-panel { max-width: 650px; padding: clamp(1.15rem, 4vw, 2rem); }
.fields { display: grid; gap: 1rem; margin-top: 1.4rem; }
.fields label { display: grid; gap: .35rem; }
.fields label .muted { display: inline; }
.fields small { margin-top: -.6rem; }
.notice { background: #193a33; border: 1px solid #397b6c; border-radius: 8px; color: #bbf4df; padding: .7rem 1rem; margin-bottom: 1rem; }
.error { background: #452433; border-color: #96546b; color: #ffd3dd; margin-top: 1rem; }
.form-panel > .button { margin-top: 1rem; }
@media (max-width: 580px) {
  main { padding-block: 1.5rem; }
  .stats { grid-template-columns: 1fr; gap: .5rem; }
  .stats div { display: flex; align-items: center; justify-content: space-between; }
  th, td { padding-inline: .7rem; }
}

/* Manajemen channel */
.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-block: 1.65rem; }
.channel-grid .form-panel { max-width: none; }
.channel-grid .channel-empty { margin-top: 1rem; }
.channel-grid select {
  min-width: 0; max-width: 100%; padding: .54rem .75rem;
  color: inherit; background: #0e1727; border: 1px solid var(--line);
  border-radius: 8px; font: inherit;
}
.channel-grid select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.dashboard-actions { flex-wrap: wrap; }
@media (max-width: 700px) {
  .channel-grid { grid-template-columns: 1fr; }
}
