/* OFD Station — Option D (Station Black). Colors and type from the Oronoco Fire brand guide v1.0. */
:root {
  --black: #231F20; --rail: #1A1718; --card: #2F2A2B; --line: #4A4547; --line2: #3A3536;
  --red: #EB2029; --gold: #FEE000; --gray: #7E7D80; --smoke: #E6E7E8; --navy: #182C56; --maroon: #993333;
  --head: 'Montserrat', system-ui, sans-serif; --body: 'Open Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; min-width: 0; }
html, body { height: 100%; }
body { margin: 0; background: var(--black); color: #fff; font: 16px/1.45 var(--body); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }
.app { display: flex; min-height: 100vh; min-height: 100dvh; }

/* rail */
.rail { position: relative; width: 232px; flex: none; background: var(--rail); border-right: 1px solid var(--line2); display: flex; flex-direction: column; gap: 4px; padding: 20px 12px; transition: width .15s; }
.rail.collapsed { width: 84px; }
.rail .brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 18px; }
.rail.collapsed .brand { justify-content: center; }
.rail .brand img { width: 48px; height: 56px; object-fit: contain; }
.rail .brand span { font: 800 18px var(--head); letter-spacing: .12em; }
.rail.collapsed .brand span, .rail.collapsed .nav span { display: none; }
.nav { height: 48px; display: flex; align-items: center; gap: 14px; padding: 0 14px; border-radius: 8px; text-decoration: none; color: var(--smoke); font: 700 14px var(--head); letter-spacing: .08em; border: 0; background: none; cursor: pointer; text-align: left; }
.rail.collapsed .nav { justify-content: center; padding: 0; }
.nav svg { flex: none; }
.nav.active { background: var(--red); color: #fff; }
.nav.soon { opacity: .45; cursor: default; }
.nav:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.rail .bottom { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.toggle { position: absolute; top: 36px; right: -15px; z-index: 5; width: 30px; height: 44px; border: 0; background: transparent; padding: 0; display: flex; align-items: center; justify-content: center; color: var(--gray); cursor: pointer; }
.toggle span { width: 22px; height: 22px; border-radius: 50%; background: var(--rail); border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; }

/* main */
.main { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 24px 28px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.eyebrow { font: 700 13px var(--head); letter-spacing: .14em; color: var(--smoke); text-transform: uppercase; }
h1 { margin: 4px 0 0; font: 800 30px/1.05 var(--head); text-transform: uppercase; }
h2 { margin: 0; font: 800 20px/1.15 var(--head); text-transform: uppercase; letter-spacing: .02em; }
.muted { color: var(--smoke); }
.small { font-size: 14px; }

.btn { min-height: 48px; padding: 0 20px; border-radius: 8px; border: 2px solid var(--gray); background: transparent; color: #fff; font: 700 15px var(--head); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--red); border-color: var(--red); font-size: 18px; font-weight: 800; }
.btn.white { background: #fff; border-color: #fff; color: var(--black); font-size: 18px; font-weight: 800; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

.nextup { background: var(--red); border-radius: 12px; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.nextup .title { font: 800 26px/1.1 var(--head); text-transform: uppercase; margin-top: 2px; }
.nextup .eyebrow { color: #fff; letter-spacing: .16em; }

.tiles { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(170px, 1fr); gap: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; color: #fff; text-decoration: none; display: flex; flex-direction: column; gap: 6px; cursor: pointer; text-align: left; }
.tile .row { display: flex; justify-content: space-between; align-items: flex-start; }
.tile .name { margin-top: auto; font: 800 20px var(--head); text-transform: uppercase; }
.tile .sub { font-size: 15px; color: var(--smoke); }
.tile.soon { opacity: .45; cursor: default; }
.tag { font: 800 13px var(--head); letter-spacing: .1em; background: var(--gold); color: var(--black); padding: 5px 10px; border-radius: 999px; text-transform: uppercase; }
.tag.gray { background: var(--line); color: #fff; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.footer { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--smoke); border-top: 1px solid var(--line); padding-top: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); flex: none; }

/* roster grid */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.person { min-height: 56px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: #fff; text-align: left; font: 600 16px var(--body); cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.person.done { background: #1E3A1E; border-color: #3D6B3D; }
.person.done::after { content: '✓'; color: var(--gold); font-weight: 800; }
.person .rk { font-size: 12px; color: var(--smoke); font-weight: 400; display: block; }

/* modal + pin pad */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { background: var(--black); border: 1px solid var(--line); border-radius: 14px; padding: 24px; width: min(560px, 100%); max-height: 92vh; overflow: auto; }
.modal.pin { width: 340px; text-align: center; }
.pindots { display: flex; justify-content: center; gap: 14px; margin: 18px 0; }
.pindots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--smoke); }
.pindots i.on { background: var(--gold); border-color: var(--gold); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pad button { height: 64px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font: 700 24px var(--head); cursor: pointer; }
.err { color: #FF8A8F; font-weight: 600; min-height: 22px; margin-top: 10px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font: 700 13px var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--smoke); }
.field input, .field select, .field textarea { min-height: 46px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); padding: 8px 12px; font-size: 16px; }
.field textarea { min-height: 80px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }

/* tables + lists */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font: 700 12px var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--smoke); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.click { cursor: pointer; } tr.click:hover td { background: #2A2526; }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line2); }
.li .grow { flex: 1; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { font: 700 12px var(--head); letter-spacing: .1em; color: var(--smoke); padding: 4px 6px; }
.cal .day { min-height: 92px; background: var(--card); border: 1px solid var(--line2); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal .day.out { opacity: .4; }
.cal .day.today { border-color: var(--gold); }
.cal .num { font: 700 13px var(--head); }
.ev { font-size: 12px; line-height: 1.25; padding: 3px 6px; border-radius: 5px; background: var(--line); border: 0; color: #fff; text-align: left; cursor: pointer; }
.ev.training, .ev.drill { background: var(--maroon); } .ev.meeting { background: var(--navy); } .ev.cancelled { text-decoration: line-through; opacity: .6; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--black); font: 800 18px var(--head); padding: 14px 24px; border-radius: 10px; z-index: 60; text-transform: uppercase; }
.empty { padding: 40px; text-align: center; color: var(--smoke); }

@media (max-width: 760px) {
  .app { flex-direction: column; }
  .rail, .rail.collapsed { width: 100%; flex-direction: row; overflow-x: auto; padding: 8px; gap: 2px; border-right: 0; border-bottom: 1px solid var(--line2); position: sticky; top: 0; z-index: 10; }
  .rail .brand { padding: 0 8px 0 4px; } .rail .brand span, .toggle, .rail .bottom .nav span { display: none; }
  .rail .nav { flex: none; padding: 0 12px; } .rail .nav span { display: none; } .rail .bottom { margin: 0; flex-direction: row; }
  .main { padding: 16px; } .tiles { grid-template-columns: 1fr; grid-auto-rows: auto; } .tile { min-height: 120px; }
  .grid2 { grid-template-columns: 1fr; } h1 { font-size: 24px; }
  .cal .day { min-height: 64px; } .ev { font-size: 10px; padding: 2px 3px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
