/* US Officials — assigning-app prototype stylesheet.

   A product UI rather than a marketing page: denser type, a fixed sidebar, real
   data tables. Shares the brand palette with the marketing site so the two read
   as one system, but drops the condensed display face to UI-sized Inter for
   everything except headings and figures. */

:root {
  --red:       #e01b24;
  --red-dark:  #b4141c;
  --blue:      #1d3fd6;

  --bg:        #070a12;
  --panel:     #0d1220;
  --panel-2:   #121a2b;
  --raise:     #172033;
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.14);

  --text:      #e9edf7;
  --muted:     #8e99b5;
  --dim:       #5f6a86;

  --ok:        #34d399;
  --warn:      #fbbf24;
  --bad:       #f2545b;

  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --disp: 'Barlow Condensed', 'Arial Narrow', var(--sans);
  --ease: cubic-bezier(.22,.61,.36,1);

  --side-w: 250px;
  --bar-h: 42px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
svg { width: 18px; height: 18px; flex: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* -------------------------------------------------------------- demo bar */

.demo-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 0 1.1rem;
  background: linear-gradient(90deg, var(--red), #8d1016);
  font-size: .8rem;
}
.demo-bar p { margin: 0; color: rgba(255,255,255,.92); }
.db-tag {
  font-size: .62rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; background: rgba(0,0,0,.32);
  padding: .25rem .6rem; border-radius: 2px; flex: none;
}
.demo-bar a {
  margin-left: auto; flex: none;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none;
  border: 1px solid rgba(255,255,255,.5);
  padding: .34rem .8rem; border-radius: 2px;
}
.demo-bar a:hover { background: rgba(255,255,255,.15); }

/* ----------------------------------------------------------------- shell */

.shell { display: flex; padding-top: var(--bar-h); min-height: 100vh; }

.side {
  position: fixed;
  top: var(--bar-h); bottom: 0; left: 0;
  width: var(--side-w);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 1.3rem 0;
}

.s-brand {
  display: flex; align-items: center; gap: .6rem;
  padding: 0 1.2rem 1.4rem;
  text-decoration: none;
}
.s-brand b { font-family: var(--disp); font-size: 1.25rem; text-transform: uppercase; }
.brand-mark {
  display: inline-flex; height: 30px; border-radius: 3px; overflow: hidden; flex: none;
}
.brand-mark span {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 700; font-style: italic;
  font-size: .95rem; color: #fff; padding: 0 .42rem;
}
.bm-us { background: var(--red); }
.bm-o  { background: var(--blue); padding-inline: .48rem; }

.s-label {
  margin: 0 0 .55rem;
  padding: 0 1.2rem;
  font-size: .62rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--dim);
}

.s-nav { display: flex; flex-direction: column; gap: 1px; }
.s-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .62rem 1.2rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.s-item:hover { background: var(--panel-2); color: var(--text); }
.s-item.active {
  background: var(--panel-2);
  color: #fff;
  border-left-color: var(--red);
}

.s-foot { margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--line); }

.role-switch {
  display: flex;
  margin: 0 1.2rem .9rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 3px;
  gap: 3px;
}
.role-switch button {
  flex: 1;
  font: inherit;
  font-size: .74rem; font-weight: 600;
  color: var(--muted);
  background: none; border: 0; border-radius: 2px;
  padding: .42rem 0;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.role-switch button:hover { color: var(--text); }
.role-switch button.on { background: var(--red); color: #fff; }

.s-user { display: flex; align-items: center; gap: .6rem; padding: 0 1.2rem; }
.s-who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.s-who b { font-size: .84rem; }
.s-who span { font-size: .72rem; color: var(--dim); }

.av {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #2b1a8a);
  font-size: .7rem; font-weight: 700; letter-spacing: .02em;
  color: #fff;
}
.av-lg { width: 36px; height: 36px; font-size: .78rem; }

/* ------------------------------------------------------------------ main */

.main { flex: 1; margin-left: var(--side-w); min-width: 0; }

.top {
  position: sticky;
  top: var(--bar-h);
  z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  height: 58px;
  padding: 0 1.6rem;
  background: rgba(7,10,18,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.t-search { flex: 1; max-width: 420px; }
.t-search input, .filters input, .filters select {
  font: inherit; font-size: .82rem;
  width: 100%;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .5rem .8rem;
}
.t-search input::placeholder, .filters input::placeholder { color: var(--dim); }
.t-search input:focus, .filters input:focus, .filters select:focus {
  outline: none; border-color: var(--red);
}
.t-right { margin-left: auto; display: flex; align-items: center; gap: .9rem; }
.t-bell {
  position: relative;
  width: 34px; height: 34px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
}
.t-bell::before {
  content: ''; position: absolute; inset: 50% auto auto 50%;
  width: 13px; height: 13px; margin: -8px 0 0 -6.5px;
  border: 2px solid var(--muted);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}
.t-bell::after {
  content: ''; position: absolute; left: 50%; top: 22px;
  width: 17px; height: 2px; margin-left: -8.5px; background: var(--muted);
}
.t-bell .dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--panel-2);
}

.view { padding: 1.8rem 1.6rem 3rem; }

.v-head {
  display: flex; align-items: flex-end; gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.v-head h1 {
  font-family: var(--disp);
  font-size: 2.1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: -.005em;
  margin: 0 0 .2rem;
}
.v-head p { margin: 0; color: var(--muted); }
.v-head b { color: var(--text); }
.v-actions { margin-left: auto; display: flex; gap: .6rem; }

.a-btn {
  font: inherit;
  font-size: .78rem; font-weight: 600;
  padding: .55rem 1.1rem;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.a-red { background: var(--red); color: #fff; }
.a-red:hover { background: var(--red-dark); }
.a-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.a-ghost:hover { border-color: var(--muted); background: var(--panel-2); }
.a-dim { background: var(--panel-2); color: var(--dim); cursor: not-allowed; }
.a-sm { font-size: .72rem; padding: .38rem .8rem; }

/* ------------------------------------------------------------------ tiles */

.k-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .9rem;
  margin-bottom: 1.3rem;
}
.k-tile {
  position: relative;
  padding: 1.1rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.k-tile b {
  display: block;
  font-family: var(--disp);
  font-size: 2.1rem; font-weight: 700; font-style: italic;
  line-height: 1;
}
.k-tile span {
  display: block; margin-top: .3rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--dim);
}
.trend {
  position: absolute; top: 1.1rem; right: 1.1rem;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}
.trend-up   { border-bottom: 7px solid var(--ok); }
.trend-down { border-top: 7px solid var(--bad); }
.trend-flat {
  border: 0; width: 11px; height: 2px; background: var(--dim);
}

/* ----------------------------------------------------------------- cards */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 1.3rem;
  overflow: hidden;
}
.c-head {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.c-head h2 {
  font-family: var(--disp);
  font-size: 1.25rem; font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}
.c-note { font-size: .78rem; color: var(--dim); }
.c-link {
  margin-left: auto;
  font-size: .76rem; font-weight: 600;
  color: var(--muted); text-decoration: none;
}
.c-link:hover { color: var(--text); }

.seg {
  margin-left: auto;
  display: flex; gap: 2px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px; padding: 2px;
}
.seg button {
  font: inherit; font-size: .74rem; font-weight: 600;
  color: var(--muted); background: none; border: 0;
  border-radius: 2px; padding: .32rem .8rem; cursor: pointer;
}
.seg button.on { background: var(--raise); color: #fff; }

.filters { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.filters select, .filters input { width: auto; min-width: 140px; }

/* ---------------------------------------------------------------- tables */

.t-scroll { overflow-x: auto; }

.tbl { width: 100%; border-collapse: collapse; min-width: 720px; }
.tbl th {
  text-align: left;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dim);
  padding: .7rem 1.2rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td {
  padding: .8rem 1.2rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .15s var(--ease); }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl .row-bad { box-shadow: inset 3px 0 0 var(--bad); }
.tbl b { font-weight: 600; display: block; }
.sub { display: block; font-size: .76rem; color: var(--dim); }
.nw { white-space: nowrap; }
.fee { font-weight: 700; font-variant-numeric: tabular-nums; }

.pos {
  display: inline-block;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  padding: .2rem .5rem;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--muted);
}

.chip {
  display: inline-block;
  font-size: .68rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase;
  padding: .26rem .6rem;
  border-radius: 2px;
  white-space: nowrap;
}
.chip-ok   { color: var(--ok);   background: rgba(52,211,153,.12);  border: 1px solid rgba(52,211,153,.3); }
.chip-warn { color: var(--warn); background: rgba(251,191,36,.12);  border: 1px solid rgba(251,191,36,.3); }
.chip-bad  { color: var(--bad);  background: rgba(242,84,91,.12);   border: 1px solid rgba(242,84,91,.32); }

.who { display: flex; align-items: center; gap: .6rem; }
.who b { display: inline; }

.crew { display: inline-flex; align-items: center; gap: 4px; }
.crew i {
  width: 8px; height: 8px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line-2);
}
.crew i.on { background: var(--ok); border-color: var(--ok); }
.crew em {
  font-style: normal; font-size: .76rem; color: var(--dim); margin-left: .3rem;
  font-variant-numeric: tabular-nums;
}

.meter {
  display: inline-block; width: 70px; height: 5px;
  background: var(--raise); border-radius: 3px; overflow: hidden;
  margin-right: .5rem; vertical-align: middle;
}
.meter i { display: block; height: 100%; background: var(--ok); }
.tbl .meter + .sub { display: inline; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- two column */

.two-col {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 1.3rem;
  align-items: start;
}

/* Offers list */
.offers { list-style: none; margin: 0; padding: 0; }
.offers li {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.offers li:last-child { border-bottom: 0; }
.offers li:hover { background: var(--panel-2); }
.o-when {
  display: flex; flex-direction: column; flex: none;
  width: 98px;
  padding-right: .9rem;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.o-when b { font-size: .82rem; }
.o-when span { font-size: .74rem; color: var(--dim); }
.o-what { min-width: 0; flex: 1; }
.o-what b { font-size: .86rem; }
.o-act { margin-left: auto; display: flex; align-items: center; gap: .8rem; flex: none; }

/* Availability grid */
.avail { padding: 1.1rem 1.2rem .4rem; }
.av-row {
  display: grid;
  grid-template-columns: 74px repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 5px;
  align-items: center;
}
.av-head span {
  font-size: .66rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--dim); text-align: center;
}
.av-label { font-size: .76rem; color: var(--muted); }
.av-cell { height: 30px; border-radius: 2px; }
.av-free    { background: rgba(52,211,153,.22); border: 1px solid rgba(52,211,153,.4); }
.av-booked  { background: rgba(29,63,214,.34);  border: 1px solid rgba(77,116,255,.5); }
.av-blocked { background: var(--raise); border: 1px solid var(--line); }

.av-key {
  display: flex; flex-wrap: wrap; gap: 1rem;
  padding: .5rem 1.2rem 1.1rem;
  font-size: .74rem; color: var(--dim);
}
.av-key span { display: flex; align-items: center; gap: .4rem; }
.av-key i { width: 11px; height: 11px; border-radius: 2px; }
.av-key .av-free    { background: rgba(52,211,153,.4); }
.av-key .av-booked  { background: rgba(29,63,214,.6); }
.av-key .av-blocked { background: var(--raise); border: 1px solid var(--line); }

/* Coverage bar */
.cover-bar {
  padding: 1.1rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 1.3rem;
}
.cb-track {
  display: flex; height: 9px; border-radius: 5px; overflow: hidden;
  background: var(--raise);
}
.cb-ok   { background: var(--ok); }
.cb-warn { background: var(--warn); }
.cb-bad  { background: var(--bad); }
.cb-key {
  display: flex; flex-wrap: wrap; gap: 1.3rem;
  margin-top: .8rem;
  font-size: .76rem; color: var(--muted);
}
.cb-key span { display: flex; align-items: center; gap: .45rem; }
.cb-key i { width: 10px; height: 10px; border-radius: 2px; }
.k-ok { background: var(--ok); } .k-warn { background: var(--warn); } .k-bad { background: var(--bad); }

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

@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }

@media (max-width: 860px) {
  :root { --side-w: 0px; }
  .side {
    position: static; width: 100%; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: .8rem;
    padding: .8rem 1rem;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .s-brand { padding: 0; }
  .s-nav, .s-user, .s-label { display: none; }
  .s-foot { margin: 0 0 0 auto; padding: 0; border: 0; }
  .role-switch { margin: 0; }
  .shell { flex-direction: column; }
  .main { margin-left: 0; }
  .top { top: 0; position: static; }
  .v-actions { margin-left: 0; width: 100%; }
  .filters, .seg, .c-link { margin-left: 0; width: 100%; }
  .filters select, .filters input { flex: 1; min-width: 0; }
  .demo-bar p { display: none; }
}
