:root {
  --bg: #0f1216;
  --panel: #171b21;
  --panel-2: #1d222a;
  --line: #262c36;
  --text: #dfe4ea;
  --muted: #8b95a4;
  --accent: #4c8dff;
  --high: #ff6b5e;
  --low: #6c7684;
  --ok: #3ecf8e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: .2px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

.tabs { display: flex; gap: 4px; }
.tab {
  background: transparent; border: 0; color: var(--muted);
  padding: 7px 14px; border-radius: 7px; cursor: pointer; font-size: 14px;
}
.tab:hover { color: var(--text); background: var(--panel-2); }
.tab.active { color: var(--text); background: var(--panel-2); }

.clock { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }

main { padding: 22px; max-width: 1100px; margin: 0 auto; }

.view { display: none; gap: 18px; }
.view.active { display: grid; grid-template-columns: 1fr 260px; }
#view-notes.active, #view-status.active { grid-template-columns: 1fr; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.panel h2 { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }

.row { display: flex; gap: 8px; margin-bottom: 14px; }
input[type=text], select, textarea {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 10px 12px; font: inherit; outline: none;
}
input[type=text] { flex: 1; }
input[type=text]:focus, textarea:focus { border-color: var(--accent); }

button { font: inherit; }
.primary {
  background: var(--accent); color: #fff; border: 0;
  padding: 10px 16px; border-radius: 8px; cursor: pointer; font-weight: 500;
}
.primary:hover { filter: brightness(1.1); }

.filters { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.chip {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  padding: 5px 11px; border-radius: 20px; cursor: pointer; font-size: 13px;
}
.chip.active { color: var(--text); border-color: var(--accent); }
.chip.ghost:hover { color: var(--high); }

.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 4px; border-bottom: 1px solid var(--line);
}
.tasks li:last-child { border-bottom: 0; }
.tasks input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; flex: none; }
.tasks .txt { flex: 1; word-break: break-word; }
.tasks li.done .txt { color: var(--muted); text-decoration: line-through; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 12px; border: 1px solid var(--line); color: var(--muted); flex: none; }
.tag.high { color: var(--high); border-color: var(--high); }
.tag.low { color: var(--low); }
.del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 17px; line-height: 1; padding: 0 4px; flex: none; }
.del:hover { color: var(--high); }

.empty { color: var(--muted); text-align: center; padding: 26px 0; margin: 0; display: none; }
.empty.show { display: block; }

.side .stat { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.side .stat span { color: var(--muted); }
.progress { height: 5px; background: var(--panel-2); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--ok); transition: width .3s; }
.hint { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; }

textarea { width: 100%; min-height: 320px; resize: vertical; line-height: 1.6; }

.status { list-style: none; margin: 0 0 16px; padding: 0; }
.status li { display: flex; align-items: center; gap: 11px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.status .name { flex: 1; }
.status .ms { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.led { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.led.up { background: var(--ok); }
.led.down { background: var(--high); }
.led.wait { background: #d8a13a; }

footer {
  display: flex; justify-content: space-between;
  padding: 16px 22px; color: var(--muted); font-size: 12.5px;
  border-top: 1px solid var(--line); margin-top: 20px;
}

@media (max-width: 760px) {
  .view.active { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; gap: 12px; padding: 12px 14px; }
  .clock { display: none; }
  main { padding: 14px; }
  .row { flex-wrap: wrap; }
  input[type=text] { min-width: 100%; }
}
