/* ============================================================
   abes-terminal-dashboard — dark terminal aesthetic
   ============================================================ */

:root {
  --bg: #0a0e13;
  --panel: #0f151c;
  --border: #1d2733;
  --fg: #c9d4e0;
  --dim: #5b6b7e;
  --accent: #3dff8b;   /* green */
  --accent-dim: rgba(61, 255, 139, 0.25);
}

body[data-accent="amber"] { --accent: #ffb454; --accent-dim: rgba(255, 180, 84, 0.25); }
body[data-accent="blue"]  { --accent: #5cc8ff; --accent-dim: rgba(92, 200, 255, 0.25); }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(61, 255, 139, 0.05), transparent 60%),
    var(--bg);
  color: var(--fg);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.55;
  padding: 24px;
}

#app { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 48px); }

/* ---------- terminal chrome ---------- */

#terminal {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#term-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #121922;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--dim);
  user-select: none;
}

.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }

.term-title { flex: 1; text-align: center; }
.term-tip kbd {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
}

#term-screen {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
#term-screen::-webkit-scrollbar { width: 8px; }
#term-screen::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

#term-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  background: #0d1219;
}

#term-prompt { color: var(--accent); white-space: nowrap; }

#term-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font: inherit;
  caret-color: var(--accent);
}
#term-field::placeholder { color: var(--dim); }

/* ---------- output lines ---------- */

.line { white-space: pre-wrap; word-break: break-word; margin-bottom: 4px; }
.line.cmd { color: var(--fg); }
.line.cmd .prompt { color: var(--accent); }
.line.dim { color: var(--dim); }
.line.ok { color: var(--accent); }
.line.err { color: #ff6b6b; }
.line.warn { color: #ffb454; }
.line.art { color: var(--accent); line-height: 1.15; margin: 8px 0; }
.line a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.line a:hover { background: var(--accent-dim); }
.line b { color: var(--fg); }
.line .k { color: var(--accent); font-weight: 700; }
.line .muted { color: var(--dim); }

.term-row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; margin-bottom: 3px; }
.term-row .cmd-name { color: var(--accent); }
.term-row .cmd-desc { color: var(--dim); }

/* ---------- dashboard view ---------- */

#dashboard { display: flex; flex-direction: column; flex: 1; gap: 16px; }

#dashboard[hidden] { display: none; }

#dash-header {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}

#dash-title {
  flex: 1;
  color: var(--accent);
  text-transform: lowercase;
  letter-spacing: 0.08em;
}

#dash-clock { font-size: 14px; color: var(--fg); }

.btn {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 5px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.btn:hover { background: var(--accent); color: #0a0e13; }

#dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  flex: 1;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card h2 { font-size: 13px; text-transform: lowercase; letter-spacing: 0.1em; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 8px; }

.card-body { font-size: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body a { color: var(--accent); text-decoration: none; }
.card-body a:hover { text-decoration: underline; }

.big-temp { font-size: 34px; color: var(--fg); }
.weather-row { display: flex; justify-content: space-between; align-items: baseline; }
.weather-row .day { color: var(--dim); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; }

.feed-item { display: flex; flex-direction: column; gap: 1px; }
.feed-item .t { color: var(--fg); }
.feed-item .m { color: var(--dim); font-size: 12px; }

.link-row { display: flex; justify-content: space-between; }
.link-row .lbl { color: var(--dim); }

#dash-foot { text-align: center; font-size: 12px; }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  body { padding: 10px; font-size: 14px; }
  .term-tip { display: none; }
  #dash-grid { grid-template-columns: 1fr; }
}
