:root {
  color-scheme: dark;
  --bg: #0d0d10;
  --panel: #131318;
  --fg: #e6e6e6;
  --accent: #d787d7;
  --header-bg: #5f00d7;
  --header-fg: #ffffd7;
  --subtle: #8a8a8a;
  --border: #585858;
  --success: #00d787;
  --warning: #ffaf00;
  --danger: #ff5f5f;
  --next: #00afff;
}

* { box-sizing: border-box; }

button {
  font: inherit;
  background: #1c1c24;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
}
button:hover { border-color: var(--accent); color: var(--accent); }

html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 16px;
  padding-block: 16px;
  background: var(--bg);
  color: var(--fg);
  font-family: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.5;
}

#app {
  max-width: 900px;
  margin: 0 auto;
}

.hidden { display: none !important; }

.title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--header-bg);
  color: var(--header-fg);
  font-size: 20px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 8px;
}

.title-bar .session-info {
  font-weight: normal;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-bar button {
  background: transparent;
  border: 1px solid var(--header-fg);
  color: var(--header-fg);
  border-radius: 4px;
  padding: 2px 8px;
  font: inherit;
  cursor: pointer;
}

.title-bar button:hover { background: rgba(255,255,255,0.15); }

.panel {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
}

.accent { color: var(--accent); font-weight: bold; }
.subtle { color: var(--subtle); }
.success { color: var(--success); }
.warning { color: var(--warning); }
.danger { color: var(--danger); font-weight: bold; }
.next-color { color: var(--next); }

.help-line {
  color: var(--subtle);
  margin-top: 10px;
}

.help-full {
  color: var(--subtle);
  margin-top: 10px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.help-full .col { display: flex; flex-direction: column; gap: 2px; }
.help-full kbd, .help-line kbd {
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 4px;
  margin-right: 4px;
  font-family: inherit;
}

.status-msg { margin-top: 8px; min-height: 1.4em; }

/* ---- list screens (menu, roster, past logs) ---- */

.list-title {
  background: var(--header-bg);
  color: var(--header-fg);
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.list-items { list-style: none; margin: 0; padding: 0; }

.list-item {
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.list-item .item-title { font-weight: bold; }
.list-item .item-desc { color: var(--subtle); font-size: 12.5px; }

.list-item.selected {
  background: #24243a;
  border-left: 3px solid var(--accent);
}
.list-item.selected .item-title { color: var(--accent); }

.filter-bar {
  margin-bottom: 8px;
  color: var(--fg);
}
.filter-bar .caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--fg);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.empty-note { color: var(--subtle); padding: 10px 4px; }

/* ---- forms ---- */

.form-wrap { padding: 8px 4px; }

.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  gap: 0;
}

.form-label {
  color: var(--subtle);
  width: 150px;
  flex-shrink: 0;
}

.input-box {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  flex: 1;
  min-width: 0;
}

.input-box.focused { border-color: var(--accent); }

.input-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font: inherit;
  width: 100%;
}

.form-err { color: var(--danger); font-weight: bold; margin-top: 6px; }

/* ---- login screen ---- */

.login-wrap {
  max-width: 420px;
  margin: 10vh auto 0;
}

.login-wrap .panel { padding: 20px 24px; }

.login-title {
  font-size: 18px;
  margin-bottom: 4px;
}

.login-sub {
  color: var(--subtle);
  margin-bottom: 18px;
}

/* ---- net active screen ---- */

.net-header {
  background: var(--header-bg);
  color: var(--header-fg);
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.net-counts { color: var(--subtle); margin-bottom: 8px; }

.next-up {
  border: 1px solid var(--next);
  color: var(--next);
  font-weight: bold;
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 10px;
  display: inline-block;
}

.checkin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}

.checkin-table th {
  text-align: left;
  color: var(--subtle);
  font-weight: normal;
  padding: 2px 6px;
  border-bottom: 1px solid var(--border);
}

.checkin-table td {
  padding: 3px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkin-table tr.cursor-row {
  background: var(--header-bg);
  color: var(--header-fg);
}

.checkin-table td.marker { width: 1.4em; color: var(--next); font-weight: bold; }

.row-actions { white-space: nowrap; }
.row-actions button { padding: 1px 6px; margin-right: 2px; font-size: 11px; }

.status-waiting { color: #c8c8c8; }
.status-done { color: var(--success); }
.status-no-traffic { color: var(--warning); }
.status-skipped { color: var(--subtle); }

/* ---- summary / past log view ---- */

.report {
  white-space: pre;
  overflow-x: auto;
  font-size: 13px;
  padding: 4px 0;
}

@media (max-width: 600px) {
  .form-label { width: 90px; }
  .checkin-table { font-size: 12px; }
  .title-bar { font-size: 13px; }
}
