/* Operations Home.
 *
 * The "Glass Deck" material from All_Websites/mocoai_engine/static/console.css,
 * whose brand tokens come from mocoai-landing. Taken as a feel, not a copy:
 * same material, own screens.
 *
 * One deliberate divergence: the Deck collapses its left nav below 860px,
 * which would drop it on an iPad in portrait. The nav here persists on tablets
 * and collapses only at phone widths, and it does so on available space rather
 * than a device number, so a different iPad needs no code change.
 */
:root {
  --bg: #08080b; --panel: #111016; --purple: #6f3dff; --deep: #3b176e;
  --soft: #9a6bff; --neutral: #e8e8ee; --muted: #a6a6b0; --cyan: #22d3ee;
  --glass: rgba(255,255,255,.06); --edge: rgba(255,255,255,.12);
  --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; --idle: #6b7280;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: radial-gradient(120% 90% at 12% 0%, #3b1d78 0%, #140b28 55%, #08050f 100%) fixed, var(--bg);
  color: var(--neutral); min-height: 100vh;
  font: 15px/1.5 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--soft); text-decoration: none; }
.shell { display: flex; min-height: 100vh; }

.nav {
  width: 232px; flex: none; padding: 22px 16px;
  background: rgba(255,255,255,.04); border-right: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { font-size: 11px; letter-spacing: .2em; color: #c4a9ff; margin-bottom: 14px; }
.nv {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; padding: 8px 12px; border-radius: 99px; color: #a49dc0; font-size: 14px;
}
.nv:hover { background: rgba(255,255,255,.05); color: var(--neutral); }
.nv.on {
  background: linear-gradient(90deg, rgba(154,107,255,.35), transparent);
  color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.nv .ct { font-size: 12px; color: #d8d2ee; font-variant-numeric: tabular-nums; }
.nav .spacer { flex: 1; }
.nav .foot { font-size: 11px; color: #8e88a8; line-height: 1.4; }

.main { flex: 1; padding: 26px 30px 60px; max-width: 1180px; }
h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.head .count { color: #a49dc0; font-size: 14px; }
.sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card {
  background: var(--glass); border: 1px solid var(--edge); border-radius: 18px;
  padding: 16px 18px; backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(0,0,0,.45); display: block;
}
.card.linked:hover { border-color: rgba(154,107,255,.5); }
.card .top { display: flex; align-items: center; gap: 10px; }
.card h2 { font-size: 15px; font-weight: 600; color: var(--neutral); flex: 1; }
.card .why { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.card.muted { opacity: .62; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor; }
.dot.ok { background: var(--ok); color: var(--ok); }
.dot.degraded { background: var(--warn); color: var(--warn); }
.dot.down { background: var(--bad); color: var(--bad); }
.dot.unknown { background: var(--idle); color: transparent; box-shadow: none; }

.chip {
  display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 11px;
  border: 1px solid var(--edge); color: #cfc7e6; background: rgba(255,255,255,.05);
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.empty { border: 1px dashed var(--edge); border-radius: 16px; padding: 36px; text-align: center; color: #a49dc0; }
.banner {
  border: 1px solid rgba(251,191,36,.35); background: rgba(251,191,36,.08);
  border-radius: 14px; padding: 12px 16px; color: #f3e3bd; font-size: 13.5px; margin-bottom: 18px;
}

.login { max-width: 380px; margin: 14vh auto; padding: 0 20px; }
.login .card { padding: 26px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
input[type=password] {
  width: 100%; background: rgba(255,255,255,.07); color: var(--neutral);
  border: 1px solid var(--edge); border-radius: 12px; padding: 11px 14px; font-size: 15px;
}
button.primary {
  width: 100%; margin-top: 14px; border: 0; border-radius: 99px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; color: #fff; cursor: pointer;
  background: linear-gradient(90deg, var(--purple), var(--soft));
  box-shadow: 0 6px 22px rgba(111,61,255,.45);
}
.err { color: var(--bad); font-size: 13px; margin-top: 12px; }

/* Phone only. A tablet keeps the left nav -- it is the primary away-from-desk
   device, and losing the nav there was the one thing to change about the Deck. */
@media (max-width: 640px) {
  .shell { flex-direction: column; }
  .nav {
    width: auto; height: auto; position: static; flex-direction: row;
    overflow-x: auto; gap: 8px; padding: 12px; border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .nav .brand, .nav .spacer, .nav .foot { display: none; }
  .nv { white-space: nowrap; }
  .main { padding: 18px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Watched sites: smaller cards, denser grid. They are a glance under their
   watcher, not peers of the applications above. */
.grid.tight { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.card.site { padding: 12px 14px; }
.card.site h2 { font-size: 13.5px; font-weight: 500; }

/* Priority bands. The scale lives in the owning app; this only paints it.
   Colour carries the same meaning as the word beside it, never instead of it —
   the band is always spelled out, so this reads without relying on colour. */
.chip.band-high { background: rgba(248,113,113,.16); color: #f8a5a5; border-color: rgba(248,113,113,.35); }
.chip.band-med  { background: rgba(251,191,36,.14);  color: #f3d08a; border-color: rgba(251,191,36,.32); }
.chip.band-low  { background: rgba(255,255,255,.05); color: #a49dc0; }

/* A checkbox inside a chip: the whole pill is the hit target, which matters
   most on a phone. */
.chip.pick { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip.pick input { margin: 0; }

/* The row you arrived from, so a deep link lands somewhere obvious. */
.card.focused {
  border-color: rgba(154,107,255,.65);
  box-shadow: 0 0 0 1px rgba(154,107,255,.35), 0 14px 40px rgba(0,0,0,.45);
}

textarea {
  width: 100%; background: rgba(255,255,255,.07); color: var(--neutral);
  border: 1px solid var(--edge); border-radius: 12px; padding: 10px 12px;
  font: inherit; resize: vertical;
}

/* Skip sits under Approve and is deliberately quieter: it is a real decision,
   not the primary one. */
button.secondary {
  width: 100%; margin-top: 8px; border-radius: 99px; padding: 9px 18px;
  font-size: 13.5px; cursor: pointer;
  background: rgba(255,255,255,.06); color: var(--muted);
  border: 1px solid var(--edge);
}
button.secondary:hover { color: var(--neutral); border-color: rgba(255,255,255,.24); }
