/*
 * The console's own styles.
 *
 * These are the utilities the page uses, written out rather than pulled
 * from a CDN: this page holds an operator session, and any script that can
 * execute here can act as the operator.
 */
:root {
  --ink: #0F1F26; --teal: #1F6F63; --mist: #F4F2EE;
  --steel: #5C6B70; --coral: #D9614C; --amber: #B45309;
  --surface: #FFFFFF; --line: rgba(0,0,0,.10); --hover: rgba(0,0,0,.03);
  --muted: var(--steel); --bg: var(--mist); --fg: var(--ink);
}
.dark {
  --surface: rgba(255,255,255,.05); --line: rgba(255,255,255,.12);
  --hover: rgba(255,255,255,.06); --muted: rgba(244,242,238,.55);
  --bg: var(--ink); --fg: var(--mist);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 72rem; margin: 0 auto; padding: 1.5rem; }
.row { display: flex; align-items: center; gap: .75rem; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 22rem; } }
h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.muted { color: var(--muted); font-size: .875rem; }
.tiny { font-size: .6875rem; color: var(--muted); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 1rem; overflow: hidden;
}
.pad { padding: 1.25rem; }
input, button, select { font: inherit; }
input, select {
  width: 100%; padding: .625rem .875rem; border-radius: .75rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  outline: none;
}
input:focus, select:focus { box-shadow: 0 0 0 3px rgba(31,111,99,.25); }
button { cursor: pointer; border-radius: .75rem; border: 1px solid transparent; }
.primary {
  background: var(--teal); color: #fff; padding: .75rem 1.25rem;
  font-weight: 500;
}
.primary:hover { opacity: .9; }
.ghost {
  background: transparent; border-color: var(--line); color: var(--fg);
  padding: .625rem 1rem;
}
.ghost:hover { background: var(--hover); }
.danger { background: transparent; border-color: rgba(217,97,76,.4); color: var(--coral); padding: .625rem 1rem; }
.danger:hover { background: rgba(217,97,76,.1); }
.full { width: 100%; }
.item {
  display: flex; align-items: center; gap: .75rem; width: 100%;
  padding: .75rem 1rem; background: transparent; border: 0;
  border-bottom: 1px solid var(--line); text-align: left; color: inherit;
}
.item:hover { background: var(--hover); }
.avatar {
  height: 2.25rem; width: 2.25rem; flex: 0 0 auto; border-radius: 999px;
  background: rgba(31,111,99,.15); color: var(--teal);
  display: grid; place-items: center; font-size: .8125rem; font-weight: 600;
}
.name { font-size: .875rem; font-weight: 500; }
.sub { font-size: .75rem; color: var(--muted); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: .6875rem; border-radius: 999px; padding: .125rem .5rem; }
.tag-closed { background: rgba(217,97,76,.15); color: var(--coral); }
.tag-susp { background: rgba(180,83,9,.15); color: var(--amber); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.stat { background: var(--hover); border-radius: .5rem; padding: .5rem; text-align: center; }
.stat dt { font-size: .6875rem; color: var(--muted); }
.stat dd { margin: .125rem 0 0; font-size: 1.125rem; font-weight: 600; }
label { display: block; margin-bottom: .75rem; }
label span { font-size: .75rem; color: var(--muted); }
label input { margin-top: .25rem; }
.banner { margin-bottom: 1rem; border-radius: .75rem; padding: .75rem 1rem; font-size: .875rem; border: 1px solid; }
.ok { border-color: rgba(31,111,99,.3); background: rgba(31,111,99,.1); color: var(--teal); }
.bad { border-color: rgba(217,97,76,.3); background: rgba(217,97,76,.1); color: var(--coral); }
.hidden { display: none !important; }
.center { min-height: 100vh; display: grid; place-items: center; }
.signin { width: 22rem; max-width: 90vw; }

/* Navigation between the console's pages. */
/*
 * A segmented control rather than two words.
 *
 * On a narrow screen the previous version read as plain text, so the only
 * clue that it could be tapped was that one word was darker.
 */
.nav {
  display: flex; gap: .125rem; padding: .1875rem;
  background: var(--hover); border-radius: .75rem;
}
.nav button {
  flex: 1; background: transparent; border: 0; color: var(--muted);
  padding: .5rem 1rem; border-radius: .625rem; font-size: .875rem;
  min-height: 40px; white-space: nowrap;
}
.nav button:hover { color: var(--fg); }
.nav button[aria-current="page"] {
  background: var(--surface); color: var(--fg); font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.dark .nav button[aria-current="page"] {
  background: rgba(255,255,255,.10); box-shadow: none;
}
.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; }
.tile dt { font-size: .75rem; color: var(--muted); margin: 0; }
.tile dd { margin: .375rem 0 0; font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; }
.secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem; letter-spacing: .1em; word-break: break-all;
  background: var(--hover); border-radius: .625rem; padding: .75rem;
  margin: .5rem 0 1rem;
}
.rowline { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .625rem 0; border-top: 1px solid var(--line); }
.tag-op { background: rgba(31,111,99,.15); color: var(--teal); }


/*
 * Narrow screens.
 *
 * The header carried a title, a navigation control and three buttons on one
 * line, which fitted a laptop and overflowed a phone. Each band gets its
 * own row, the navigation spans the width so both halves are reachable with
 * a thumb, and the detail panel follows the list rather than sitting beside
 * it in a column too narrow to read.
 */
@media (max-width: 720px) {
  .wrap { padding: 1rem; }
  .head {
    display: grid; gap: .875rem; align-items: stretch;
  }
  .head .row { justify-content: space-between; }
  .nav { width: 100%; }
  h1 { font-size: 1.375rem; }
  .searchrow { flex-direction: column; align-items: stretch; }
  .searchrow .primary { width: 100%; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .tile { padding: .875rem; }
  .tile dt { font-size: .6875rem; line-height: 1.3; }
  .tile dd { font-size: 1.5rem; margin-top: .25rem; }
  .signin { width: 100%; }
  .center { padding: 1rem; align-items: start; padding-top: 3rem; }
  /* The label is dropped rather than the date: a line cut mid-date reads
     as a rendering fault, and the date is the part being looked for. */
  .wide { display: none; }
  /* A tap target that a finger can hit, not only a cursor. */
  .item { padding: .875rem 1rem; }
  .avatar { height: 2.5rem; width: 2.5rem; }
  select, .ghost { min-height: 42px; }
}

@media (max-width: 340px) {
  /* Only where two columns genuinely stop fitting. At 375px a pair reads
     comfortably, and stacking there wasted most of the screen. */
  .tiles { grid-template-columns: 1fr; }
}
