/* My Ember Works
   One stylesheet for both the crew tools and the homeowner portal. */

@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('caveat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

:root {
  --ember: #dc9600;
  --ember-dark: #a97000;
  --ember-soft: #fdf3e0;
  --ink: #1c1c1c;
  --ink-2: #454545;
  --muted: #807d78;
  --line: #e3e1dd;
  --line-soft: #f1efeb;
  --bg: #f8f7f5;
  --card: #ffffff;
  --ok: #16805a;
  --ok-soft: #e6f4ee;
  --warn: #b57708;
  --warn-soft: #fdf3df;
  --bad: #c9372c;
  --bad-soft: #fdeceb;
  --info: #2a6fb0;
  --info-soft: #e9f2fa;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .05), 0 8px 24px -12px rgba(20, 20, 20, .18);
  --shadow-lg: 0 2px 4px rgba(20, 20, 20, .05), 0 24px 48px -20px rgba(20, 20, 20, .3);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ember-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.02em; font-weight: 680; }
h1 { font-size: 27px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
small { font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 8px; } .mt2 { margin-top: 16px; } .mt3 { margin-top: 26px; }
.mb0 { margin-bottom: 0; } .mb1 { margin-bottom: 8px; } .mb2 { margin-bottom: 16px; } .mb3 { margin-bottom: 26px; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-top { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; }
.hide { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { text-decoration: none; background: var(--line-soft); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ember); border-color: var(--ember); color: #fff; }
.btn-primary:hover { background: var(--ember-dark); border-color: var(--ember-dark); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-danger { color: var(--bad); border-color: #eccbc8; background: #fff; }
.btn-danger:hover { background: var(--bad-soft); }
/* For the handful of actions that really do destroy something. */
.btn-danger.btn-solid {
  color: #fff; background: var(--bad); border-color: var(--bad); font-weight: 650;
}
.btn-danger.btn-solid:hover { background: #ab2c23; border-color: #ab2c23; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--line-soft); }
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 26px; font-size: 17px; border-radius: 12px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ------------------------------------------------------------------- forms */

label, .label {
  display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-2);
  margin-bottom: 5px; letter-spacing: .01em;
}
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=tel],
input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(220, 150, 0, .18);
}
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23807d78' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.field { margin-bottom: 14px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 180px; margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 10px; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--ember); flex: none; }

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

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px;
}
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-soft); background: #fbfaf8; border-radius: 0 0 var(--radius) var(--radius); }

.grid { display: grid; gap: 18px; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-side { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
}

/* ------------------------------------------------------------------ badges */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; background: var(--line-soft); color: var(--ink-2);
  white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.done { background: var(--ok-soft); color: var(--ok); }
.badge.muted { background: var(--line-soft); color: var(--muted); }
.badge.ember { background: var(--ember-soft); color: var(--ember-dark); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------------------------------------------------------------- progress */

.progress {
  height: 9px; background: var(--line-soft); border-radius: 999px; overflow: hidden;
}
.progress > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #f0b638, var(--ember));
  transition: width .5s ease;
}
.progress.lg { height: 14px; }

.ring { display: block; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-linecap: round; }
.ring .track { stroke: var(--line-soft); }
.ring .bar { stroke: url(#emberGrad); transition: stroke-dashoffset .8s ease; }

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

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 700; padding: 9px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfaf8; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ------------------------------------------------------------------ flashes */

.flash {
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px;
  font-size: 14px; font-weight: 550; border: 1px solid transparent;
}
.flash.ok { background: var(--ok-soft); color: var(--ok); border-color: #c6e6d8; }
.flash.error { background: var(--bad-soft); color: var(--bad); border-color: #f2cfcc; }
.flash.info { background: var(--info-soft); color: var(--info); border-color: #cfe2f2; }

.empty {
  text-align: center; padding: 44px 20px; color: var(--muted);
}
.empty h3 { color: var(--ink-2); }

/* =================================================================== STAFF */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px; flex: none; background: #141414; color: #cdcbc7;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px;
  color: #fff; font-weight: 700; letter-spacing: -.01em;
}
.sidebar .brand img { width: 30px; height: auto; }
.sidebar .brand span { font-size: 15px; line-height: 1.15; }
.sidebar .brand small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ember); font-weight: 700; }
.sidebar nav { padding: 6px 10px; overflow-y: auto; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px;
  color: #b6b4b0; font-size: 14px; font-weight: 550; margin-bottom: 2px;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.sidebar nav a.on { background: var(--ember); color: #fff; }
.sidebar nav .sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #66645f; padding: 16px 11px 6px; font-weight: 700; }
.sidebar nav a .pill { margin-left: auto; background: var(--ember); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.sidebar nav a.on .pill { background: rgba(0,0,0,.28); }
.sidebar .who { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }
.sidebar .who strong { color: #fff; display: block; font-size: 13.5px; }
.sidebar .who a { color: #8a8884; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 12px 24px; display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 19px; margin: 0; }
.topbar .sub { font-size: 12.5px; color: var(--muted); }
.content { padding: 22px 24px 60px; max-width: 1240px; width: 100%; }

.clockchip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--ok-soft);
  color: var(--ok); border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 650;
}
.clockchip .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.mobilebar { display: none; }
.bottomnav { display: none; }

@media (max-width: 900px) {
  /* The sidebar becomes an off-canvas drawer rather than disappearing, so the
     full navigation is still reachable on a phone. */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100dvh;
    width: 272px; max-width: 84vw; z-index: 60;
    transform: translateX(-101%); transition: transform .22s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, .5);
  }
  body.navopen .sidebar { transform: none; }
  .navscrim {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 55;
  }
  .navtoggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; margin-right: -4px; flex: none;
    background: transparent; border: 0; border-radius: 9px;
    color: #cdcbc7; cursor: pointer; padding: 0;
  }
  .navtoggle:active { background: rgba(255, 255, 255, .1); }
  .mobilebar {
    display: flex; align-items: center; gap: 12px; justify-content: space-between;
    background: #141414; color: #fff; padding: 11px 16px; position: sticky; top: 0; z-index: 40;
  }
  .mobilebar .brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; font-size: 15px; }
  .mobilebar .brand img { width: 26px; }
  .mobilebar a { color: #cdcbc7; }
  .topbar { padding: 12px 16px; top: 48px; }
  .content { padding: 16px 14px 96px; }
  .bottomnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px -12px rgba(0,0,0,.4);
  }
  .bottomnav a {
    flex: 1; text-align: center; font-size: 10.5px; font-weight: 650; color: var(--muted);
    padding: 5px 2px; border-radius: 10px; letter-spacing: .01em;
  }
  .bottomnav a:hover { text-decoration: none; }
  .bottomnav a svg { display: block; margin: 0 auto 2px; }
  .bottomnav a.on { color: var(--ember); }
}

/* ------------------------------------------------------------- staff bits */

.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow); }
.stat .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.stat .v { font-size: 25px; font-weight: 700; letter-spacing: -.025em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat .n { font-size: 12.5px; color: var(--muted); }

.tabs { display: flex; gap: 3px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a {
  padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--ink-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a:hover { color: var(--ember-dark); text-decoration: none; }
.tabs a.on { color: var(--ember-dark); border-bottom-color: var(--ember); }
.tabs a .pill { background: var(--ember); color: #fff; font-size: 10.5px; padding: 0 6px; border-radius: 999px; margin-left: 5px; vertical-align: 1px; }

.projlist { display: grid; gap: 12px; }
.projcard {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); color: inherit;
  transition: border-color .12s, transform .08s;
}
.projcard:hover { text-decoration: none; border-color: #d7cdc3; transform: translateY(-1px); }
.projcard .title { font-weight: 680; font-size: 16px; letter-spacing: -.01em; }
.projcard .meta { font-size: 12.5px; color: var(--muted); }
.projcard .pct { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

.phase {
  display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line-soft);
}
.phase:last-child { border-bottom: 0; }
.phase .marker { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); background: #fff; }
.phase.complete .marker { background: var(--ok); border-color: var(--ok); color: #fff; }
.phase.in_progress .marker { border-color: var(--ember); color: var(--ember); box-shadow: 0 0 0 4px var(--ember-soft); }
.phase.blocked .marker { border-color: var(--warn); color: var(--warn); }
.phase .name { font-weight: 640; }

.tasklist { list-style: none; margin: 0; padding: 0; }
.tasklist li {
  display: flex; align-items: flex-start; gap: 11px; padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}
.tasklist li:last-child { border-bottom: 0; }
.tasklist .tbody { flex: 1; min-width: 0; }
.tasklist .ttitle { font-weight: 570; }
.tasklist li.done .ttitle { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.tickbtn {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px;
  border: 2px solid var(--line); background: #fff; cursor: pointer; padding: 0;
  display: grid; place-items: center; transition: background .12s, border-color .12s;
}
.tickbtn:hover { border-color: var(--ember); }
.tickbtn.on { background: var(--ok); border-color: var(--ok); }
.tickbtn svg { opacity: 0; }
.tickbtn.on svg { opacity: 1; }

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline .item { position: relative; padding-bottom: 22px; }
.timeline .item:last-child { padding-bottom: 0; }
.timeline .item::before {
  content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 3px var(--bg);
}
.timeline .item.quiet::before { background: var(--line); }
.timeline .when { font-size: 12px; color: var(--muted); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.photo-grid a { display: block; position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--line-soft); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.photo-grid a:hover img { transform: scale(1.05); }
.photo-grid .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 6px; font-size: 11.5px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); line-height: 1.3;
}
.photo-grid .hiddenflag { position: absolute; top: 6px; right: 6px; }

.chatlog { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; }
.msg .who { font-size: 11.5px; font-weight: 700; opacity: .75; margin-bottom: 2px; }
.msg.them { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.us { align-self: flex-end; background: var(--ember); color: #fff; border-bottom-right-radius: 4px; }
.msg .at { font-size: 11px; opacity: .65; margin-top: 3px; }

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px 18px;
  text-align: center; color: var(--muted); background: #fbfaf8; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.hot { border-color: var(--ember); background: var(--ember-soft); color: var(--ember-dark); }

/* ================================================================== PORTAL */

.portal { background: var(--bg); min-height: 100vh; }
.portal-head {
  background: #141414;
  background-image: radial-gradient(120% 140% at 12% -20%, #3a3020 0%, #141414 62%);
  color: #fff; padding: 16px 20px;
}
.portal-head .inner { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.portal-head .brand { display: flex; align-items: center; gap: 11px; color: #fff; }
.portal-head .brand img { width: 38px; }
.portal-head .brand b { display: block; font-size: 15px; letter-spacing: -.01em; }
.portal-head .brand small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--ember); font-weight: 700; }
.portal-head a { color: #b6b4b0; font-size: 13px; }

.portal-nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.portal-nav .inner { max-width: 1000px; margin: 0 auto; display: flex; gap: 4px; padding: 0 20px; overflow-x: auto; }
.portal-nav a {
  padding: 13px 14px; font-size: 14px; font-weight: 620; color: var(--ink-2);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.portal-nav a.on { color: var(--ember-dark); border-bottom-color: var(--ember); }
.portal-nav a:hover { text-decoration: none; color: var(--ember-dark); }
.portal-nav a .pill { background: var(--ember); color: #fff; font-size: 10.5px; padding: 0 6px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }

.portal-body { max-width: 1000px; margin: 0 auto; padding: 24px 20px 70px; }
.portal-foot { max-width: 1000px; margin: 0 auto; padding: 0 20px 40px; color: var(--muted); font-size: 12.5px; text-align: center; }

.hero {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg); overflow: hidden; margin-bottom: 20px;
}
.hero .top { padding: 24px; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.hero .headline { flex: 1 1 260px; min-width: 0; }
.hero .headline h1 { font-size: 26px; margin-bottom: 6px; }
.hero .ringwrap { flex: none; text-align: center; }
.hero .ringwrap .pctnum { font-size: 27px; font-weight: 720; letter-spacing: -.03em; }
.hero .ringwrap .pctlbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.hero .strip { display: flex; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.hero .strip div { flex: 1 1 150px; padding: 14px 20px; border-right: 1px solid var(--line-soft); }
.hero .strip div:last-child { border-right: 0; }
.hero .strip .k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.hero .strip .v { font-weight: 660; font-size: 15px; margin-top: 2px; }

.stepper { list-style: none; margin: 0; padding: 0; }
.stepper li { display: flex; gap: 14px; position: relative; padding-bottom: 20px; }
.stepper li:last-child { padding-bottom: 0; }
.stepper li::before {
  content: ""; position: absolute; left: 13px; top: 30px; bottom: 0; width: 2px; background: var(--line);
}
.stepper li:last-child::before { display: none; }
.stepper .mk {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: #fff;
  border: 2px solid var(--line); display: grid; place-items: center; z-index: 1;
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.stepper li.complete .mk { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper li.in_progress .mk { border-color: var(--ember); color: var(--ember); box-shadow: 0 0 0 4px var(--ember-soft); }
.stepper li.blocked .mk { border-color: var(--warn); color: var(--warn); }
.stepper .nm { font-weight: 640; font-size: 15px; }
.stepper li.complete .nm { color: var(--ink-2); }

.loginwrap {
  min-height: 100vh; display: grid; place-items: center; padding: 30px 18px;
  background: #141414;
  background-image: radial-gradient(130% 110% at 50% -10%, #4a3c1c 0%, #141414 60%);
}

/* --------------------------------------------------- "my" brand lockup */

.lockup { text-align: center; margin-bottom: 26px; }
.lockup .my {
  font-family: 'Caveat', 'Segoe Script', 'Snell Roundhand', cursive;
  font-size: 56px; line-height: .8; color: var(--ember);
  display: block; margin-bottom: 2px; transform: rotate(-4deg);
  text-shadow: 0 2px 18px rgba(220, 150, 0, .42);
}
.lockup img { width: 250px; max-width: 78%; height: auto; display: block; margin: 0 auto; }
.lockup .tag {
  color: #a3a19d; font-size: 13px; margin-top: 12px; letter-spacing: .01em;
  white-space: nowrap;
}
@media (max-width: 430px) { .lockup .tag { font-size: 11.5px; } }

.segmented {
  display: flex; background: var(--line-soft); border-radius: 11px; padding: 3px; margin-bottom: 20px;
}
.segmented button {
  flex: 1; font: inherit; font-size: 13.5px; font-weight: 650; padding: 9px 8px;
  border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.segmented button.on { background: #fff; color: var(--ember-dark); box-shadow: var(--shadow); }

/* The small cursive "my" used in the app chrome. */
.brandmy {
  font-family: 'Caveat', 'Segoe Script', 'Snell Roundhand', cursive;
  font-size: 20px; line-height: .85; color: var(--ember);
  text-transform: none; letter-spacing: 0; font-weight: 600;
}
.loginbox {
  width: 100%; max-width: 420px; background: #fff; border-radius: 18px;
  box-shadow: 0 30px 70px -25px rgba(0,0,0,.6); padding: 30px 28px 26px;
}
.loginbox .logo { text-align: center; margin-bottom: 18px; }
.loginbox .logo img { width: 62px; }
.loginbox h1 { text-align: center; font-size: 21px; margin-bottom: 4px; }
.loginbox .sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.loginbox .codeinput {
  text-transform: uppercase; letter-spacing: .16em; font-weight: 650; font-size: 17px; text-align: center;
}
.loginfoot { text-align: center; margin-top: 20px; color: #8a8884; font-size: 12.5px; }
.loginfoot a { color: #cdcbc7; }

/* --------------------------------------------------------------- printing */

.accesscard {
  max-width: 640px; margin: 0 auto; border: 2px solid var(--line); border-radius: 16px;
  padding: 34px; background: #fff; text-align: center;
}
.accesscard .code {
  font-size: 34px; font-weight: 750; letter-spacing: .14em; color: var(--ember-dark);
  background: var(--ember-soft); border-radius: 12px; padding: 14px 20px; display: inline-block; margin: 10px 0;
}

@media print {
  .noprint, .sidebar, .topbar, .mobilebar, .bottomnav, .tabs { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
  .card { box-shadow: none; }
}

/* ------------------------------------------------------- the one-off nudge */

.nudge-backdrop {
  position: fixed; inset: 0; z-index: 300; background: rgba(12, 12, 12, .72);
  display: grid; place-items: center; padding: 24px;
  animation: nudgeFade .25s ease;
}
.nudge-backdrop[hidden] { display: none; }
@keyframes nudgeFade { from { opacity: 0; } to { opacity: 1; } }
.nudge {
  width: 100%; max-width: 400px; background: #fff; border-radius: 18px;
  padding: 30px 28px 26px; text-align: center;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .65);
  border-top: 5px solid var(--ember);
  animation: nudgePop .3s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes nudgePop { from { transform: translateY(14px) scale(.96); opacity: 0; } }
.nudge-mark { margin-bottom: 12px; }
.nudge h2 { font-size: 23px; margin-bottom: 8px; }
.nudge p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; margin-bottom: 22px; }

/* ------------------------------------------------- month planning calendar */

.calwrap {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.calhead {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  background: #fbfaf8; border-bottom: 1px solid var(--line);
}
.calhead div {
  padding: 8px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); text-align: left;
}
.calweek { position: relative; border-bottom: 1px solid var(--line); }
.calweek:last-child { border-bottom: 0; }
.caldays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calday {
  /* Grows with however many bars the week needs, so nothing spills into
     the row below. 26px for the date, then one lane per stacked bar. */
  min-height: max(104px, calc(26px + (var(--lanes, 0) * 24px) + 10px));
  border-right: 1px solid var(--line-soft); padding: 4px 6px;
  position: relative;
}
.calday:last-child { border-right: 0; }
.calday.out { background: #fbfaf8; }
.calday.out .daynum { color: #c3bfb8; }
.calday.today { background: #fdf8ec; }
.calday.today .daynum { color: var(--ember-dark); font-weight: 800; }
.daynum { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.daynum .mon { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.dayadd {
  position: absolute; top: 3px; right: 6px; color: var(--muted); font-size: 16px;
  line-height: 1; opacity: 0; text-decoration: none;
}
.calday:hover .dayadd { opacity: 1; }
.dayadd:hover { color: var(--ember); text-decoration: none; }

/* Bars float over the day cells, one row per lane. */
.calbars { position: absolute; top: 26px; left: 0; right: 0; padding: 0 2px; pointer-events: none; }
.callane {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  height: 21px; margin-bottom: 3px;
}
.calbar, .calbar a { pointer-events: auto; }
.calgap { min-height: 1px; }
.calbar {
  border-radius: 5px; color: #fff; font-size: 11.5px; font-weight: 600;
  padding: 2px 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  /* 4px each side leaves a clear 8px gutter between neighbouring bars, and
     keeps them off the outer border. Continuation sides stay flush below. */
  margin: 0 4px; line-height: 1.5;
}
.calbar a { color: #fff; text-decoration: none; display: block;
            overflow: hidden; text-overflow: ellipsis; }
.calbar a:hover { text-decoration: underline; }
.calbar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.calbar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.calbar .trucks { opacity: .8; font-weight: 500; }
.calbar.isnote { background: transparent !important; font-weight: 650; padding-left: 4px; }
.calbar.isnote a { color: inherit; }
.calbar.isnote::before { content: "\2022 "; }

@media (max-width: 900px) {
  .calday { min-height: max(78px, calc(24px + (var(--lanes, 0) * 21px) + 8px)); padding: 3px 5px; }
  .calbar { font-size: 10.5px; padding: 1px 5px; }
  .callane { height: 18px; margin-bottom: 3px; }
  .calbars { top: 22px; }
}

/* Dashboard variant: same grid, tighter and read-only. */
.calwrap.compact { box-shadow: none; border-radius: var(--radius-sm); }
.calwrap.compact .calhead div { padding: 5px 8px; font-size: 10px; }
.calwrap.compact .calday {
  min-height: max(64px, calc(20px + (var(--lanes, 0) * 19px) + 8px));
  padding: 2px 5px;
}
.calwrap.compact .daynum { font-size: 11px; }
.calwrap.compact .calbars { top: 19px; }
.calwrap.compact .callane { height: 16px; margin-bottom: 3px; }
.calwrap.compact .calbar { font-size: 10px; padding: 0 5px; line-height: 1.6; margin: 0 3px; }

/* ------------------------------------------------ dashboard: today's board */

.todayband {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: #141414;
  background-image: radial-gradient(120% 160% at 8% -30%, #3a3020 0%, #141414 60%);
  border-radius: var(--radius); padding: 22px 26px; margin-bottom: 12px;
  color: #fff; text-decoration: none; box-shadow: var(--shadow-lg);
  border-left: 5px solid var(--ember);
  transition: transform .1s ease;
}
.todayband:hover { text-decoration: none; transform: translateY(-1px); }
.todayband .eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ember);
}
.todayband h2 { color: #fff; margin: 2px 0 4px; font-size: 25px; letter-spacing: -.02em; }
.todayband .meta { color: #b6b4b0; font-size: 14.5px; }
.todayband .meta strong { color: #fff; font-size: 17px; }
.todayband .meta .draft { color: #e8bf6a; }
.todaygo {
  flex: none; background: var(--ember); color: #141414; font-weight: 700; font-size: 16px;
  padding: 14px 26px; border-radius: 11px; white-space: nowrap;
}
.todayband:hover .todaygo { background: #eaa62a; }

.tomorrowstrip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 18px; margin-bottom: 22px;
  color: var(--ink-2); font-size: 14px; text-decoration: none;
}
.tomorrowstrip:hover { text-decoration: none; border-color: #d8d4ce; background: #fbfaf8; }

@media (max-width: 640px) {
  .todayband { padding: 18px; gap: 14px; }
  .todayband h2 { font-size: 21px; }
  .todaygo { width: 100%; text-align: center; }
}

/* Sign-in: tighten the top on small screens. Vertically centring a tall box
   on a phone leaves a big empty band above the wordmark. */
@media (max-width: 640px) {
  .loginwrap { align-items: start; padding: 22px 14px 32px; min-height: 100dvh; }
  .lockup { margin-bottom: 18px; }
  .lockup .my { font-size: 44px; margin-bottom: 0; }
  .lockup .tag { margin-top: 8px; }
  .loginbox { padding: 24px 20px 22px; }
  .loginbox h1 { font-size: 19px; }
  .loginbox .sub { margin-bottom: 16px; }
}

/* ------------------------------------------------------- weekly time grid */

.weekgrid th, .weekgrid td { padding: 6px 5px; }
.weekgrid th:first-child, .weekgrid td:first-child { padding-left: 12px; }
.weekgrid input, .weekgrid select { padding: 7px 8px; font-size: 14px; }

/* Seven narrow day columns have to hold a number input without the browser's
   spinner arrows squeezing the digits out of view. */
.weekgrid .daycol { width: 62px; text-align: center; }
.weekgrid th.daycol { padding-bottom: 4px; }
.weekgrid .dname {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: var(--muted); text-transform: uppercase; line-height: 1.3;
}
.weekgrid .ddate {
  display: block; font-size: 15px; font-weight: 700; color: var(--ink);
  text-transform: none; letter-spacing: 0; line-height: 1.1;
}
.weekgrid input.hrs {
  width: 100%; min-width: 0; text-align: center; padding: 7px 2px;
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.weekgrid input.hrs::-webkit-outer-spin-button,
.weekgrid input.hrs::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.weekgrid input.hrs:placeholder-shown { color: var(--muted); }
.weekgrid tfoot .daycol { font-variant-numeric: tabular-nums; }
.weekgrid .rowtot { font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .weekgrid .daycol { width: 54px; }
  .weekgrid input.hrs { font-size: 13px; padding: 6px 1px; }
  .weekgrid th, .weekgrid td { padding: 5px 3px; }
}

/* =================================================================== TV MODE
   Full-screen board for a wall-mounted display. Dark, large, no chrome, and
   readable from across a warehouse. */

body.tv {
  background: #0d0d0d; color: #f3f1ee; margin: 0;
  height: 100vh; overflow: hidden;
}
.tvwrap { display: flex; flex-direction: column; height: 100vh; padding: 18px 22px 14px; }

.tvhead { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.tvlogo { width: 190px; height: auto; }
.tvmonth { font-size: 34px; font-weight: 750; letter-spacing: -.02em; line-height: 1; color: #fff; }
.tvsub { font-size: 15px; color: #9a958e; margin-top: 3px; }
.tvclock { font-size: 34px; font-weight: 750; color: var(--ember); line-height: 1;
           font-variant-numeric: tabular-nums; }

.tvcal { flex: 1 1 auto; min-height: 0; margin-top: 14px; display: flex; }
.tvcal .calwrap {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  background: #151515; border-color: #2a2a2a; box-shadow: none; border-radius: 10px;
}
.tvcal .calhead { background: #1c1c1c; border-bottom-color: #2a2a2a; }
.tvcal .calhead div { color: #8f8a83; font-size: 14px; padding: 8px 12px; letter-spacing: .1em; }
/* Each week takes one lane-height per stacked bar, plus one for the date row.
   --lane is set per page from the real viewport, so a busy month shrinks to
   fit rather than spilling into the row below. */
.tvcal .calweek {
  flex: 0 0 auto;
  height: calc(var(--lane, 30px) * (var(--lanes, 0) + 1));
  border-bottom-color: #262626; display: flex; flex-direction: column; position: relative;
}
.tvcal .caldays { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tvcal .calday {
  min-height: 0; border-right-color: #212121; padding: 4px 8px; background: transparent;
}
.tvcal .calday.out { background: #101010; }
.tvcal .calday.out .daynum { color: #454545; }
.tvcal .calday.today { background: #2a2110; }
.tvcal .calday.today .daynum { color: var(--ember); }
.tvcal .daynum { font-size: clamp(13px, calc(var(--lane, 30px) * 0.62), 22px);
                 font-weight: 700; color: #d8d4ce; line-height: var(--lane, 30px); }
.tvcal .daynum .mon { font-size: 14px; color: #8f8a83; }
.tvcal .calbars { top: var(--lane, 30px); }
.tvcal .callane { height: calc(var(--lane, 30px) - 4px); margin-bottom: 4px; }
.tvcal .calbars { padding: 0 3px; }
.tvcal .calbar {
  font-size: clamp(11px, calc(var(--lane, 30px) * 0.5), 18px);
  font-weight: 650; padding: 0 10px; border-radius: 6px;
  line-height: calc(var(--lane, 30px) - 4px);
}
.tvcal .calbar.isnote { color: #c7bfae !important; }

.tvboard {
  flex: none; margin-top: 12px; background: #151515; border: 1px solid #2a2a2a;
  border-left: 5px solid var(--ember); border-radius: 10px; padding: 12px 18px;
  max-height: 27vh; overflow: hidden;
}
.tvboardhead {
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ember); margin-bottom: 8px;
}
.tvboardrows { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 6px 26px; }
.tvjob { display: flex; gap: 14px; align-items: baseline; }
.tvjobtime {
  flex: none; width: 62px; font-size: 21px; font-weight: 750; color: var(--ember);
  font-variant-numeric: tabular-nums;
}
.tvjobname { font-size: 18px; font-weight: 650; color: #fff; line-height: 1.25; }
.tvcrew { font-size: 14.5px; color: #a8a29a; }
.tvcrew span::after { content: ", "; }
.tvcrew span:last-child::after { content: ""; }
.tvcrew .tvtruck { color: #d3a13d; }

@media (max-width: 1400px) {
  .tvmonth, .tvclock { font-size: 28px; }
  .tvlogo { width: 150px; }
  .tvjobname { font-size: 16px; }
  .tvjobtime { font-size: 18px; width: 54px; }
}

/* The client's own logo, sitting to the left of their project title. */
.clientlogo {
  background: #fff; border-radius: 10px; display: inline-flex;
  align-items: center; justify-content: center; line-height: 0;
}
.hero-logo {
  /* Centred against the title block rather than pinned to the top of it. */
  flex: none; padding: 10px 14px; border: 1px solid var(--line);
  align-self: center;
}
.hero-logo img { max-height: 72px; max-width: 170px; display: block; }
@media (max-width: 640px) {
  .hero-logo { padding: 8px 10px; }
  .hero-logo img { max-height: 46px; max-width: 130px; }
}

/* The drawer toggle only exists on small screens. Scoped to a min-width query
   so it cannot override the mobile rules defined earlier in this file. */
@media (min-width: 901px) {
  .navtoggle, .navscrim { display: none !important; }
}
.navscrim[hidden] { display: none; }

/* ---------------------------------------------------- searchable selects */

.combo { position: relative; }
.combo .combo-native {
  /* Kept in the DOM so the form still posts, but out of sight. */
  position: absolute; opacity: 0; pointer-events: none; height: 0; padding: 0; border: 0;
}
.combo .combo-input { width: 100%; }
.combo-list {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0;
  margin: 0; padding: 4px; list-style: none; max-height: 260px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.combo-list li {
  padding: 8px 10px; border-radius: 7px; font-size: 14.5px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.combo-list li:hover, .combo-list li.on { background: var(--ember-soft); color: var(--ember-dark); }
.combo-list .combo-none { color: var(--muted); cursor: default; }
.combo-list .combo-none:hover { background: transparent; color: var(--muted); }

/* ------------------------------------------------------- expense report sheet */

.expsheet { border-color: #ddd8d1; }
.expsheet-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 20px 22px 16px; border-bottom: 2px solid var(--ink);
}
.expsheet-title {
  font-size: 21px; font-weight: 750; letter-spacing: -.01em; text-transform: uppercase;
}
.expsheet-sub { font-size: 12.5px; color: var(--muted); }
.expsheet-ref {
  font-size: 17px; font-weight: 750; color: var(--ember-dark); letter-spacing: .04em;
}
.expsheet-table th {
  border-bottom: 1px solid var(--ink-2); color: var(--ink-2);
}
.expsheet-table td { border-bottom: 1px solid var(--line); }
.expsheet-table tfoot .expsheet-total td {
  border-top: 2px solid var(--ink); border-bottom: 0;
  font-size: 17px; font-weight: 750; padding-top: 12px; padding-bottom: 12px;
}
.expsheet-foot {
  display: flex; gap: 40px; flex-wrap: wrap; padding: 22px;
  border-top: 1px solid var(--line-soft);
}
.expsheet-foot > div { flex: 1 1 200px; }
.sigline {
  border-bottom: 1px solid var(--ink-2); min-height: 28px; margin: 4px 0 4px;
  font-size: 15px; font-weight: 600;
}
@media print {
  .expsheet { border: 0; }
  .expsheet-head { padding-left: 0; padding-right: 0; }
  .expsheet-foot { padding-left: 0; padding-right: 0; }
}

.expsheet-emp {
  display: flex; gap: 40px; flex-wrap: wrap; padding: 14px 22px;
  border-bottom: 1px solid var(--line); background: #fbfaf8;
}
/* One line can carry an amount in several columns, so they are entered side by side. */
.expamounts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px 10px;
}
.expamounts label { display: block; margin-bottom: 2px; }
.expamounts input { width: 100%; }
.expsheet-table td.faint { color: #d5d0c9; }
.expsheet-table tfoot .expsheet-subtotal td {
  border-top: 1px solid var(--ink-2); font-weight: 650;
}
.officebox {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fbfaf8;
}

/* --------------------------------------------------------- signature capture */

.sigbox { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.sigpad {
  display: block; width: 100%; height: 150px; margin: 8px 0 6px;
  border: 1px dashed var(--line); border-bottom: 2px solid var(--ink-2);
  border-radius: 6px; background: #fffdfa; touch-action: none; cursor: crosshair;
}
.sigimg {
  display: block; width: 100%; max-width: 320px; height: auto; margin: 6px 0 2px;
  border-bottom: 1px solid var(--ink-2);
}
@media print {
  .sigbox { border: 0; padding: 0; }
}

/* ------------------------------------------------------ warehouse lane board */

.laneboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lanecol { display: flex; flex-direction: column; gap: 8px; }
.lane {
  display: flex; align-items: stretch; gap: 10px; position: relative;
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 12px 9px 10px; color: inherit;
  text-decoration: none; min-height: 58px;
}
.lane:hover { border-color: var(--ember); box-shadow: var(--shadow); }
.lanenum {
  flex: 0 0 34px; font-size: 20px; font-weight: 750; letter-spacing: -.02em;
  color: var(--ink-2); align-self: center; text-align: center;
}
.lanebody { flex: 1 1 auto; min-width: 0; align-self: center; }
.laneclient {
  display: block; font-weight: 680; font-size: 15px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lanemeta {
  display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 11.5px; color: var(--muted);
  margin-top: 2px;
}
.lanestat { font-weight: 650; }
.laneempty { color: #b9b5ae; font-size: 13px; font-weight: 600; }
.lane.lane-empty { background: #faf9f7; border-style: dashed; }
.lane.lane-in     { border-left-color: var(--info); }
.lane.lane-in .lanestat { color: var(--info); }
.lane.lane-out    { border-left-color: var(--ember-dark); }
.lane.lane-out .lanestat { color: var(--ember-dark); }
.lane.lane-hold   { border-left-color: var(--muted); background: #f6f5f3; }
.lane.lane-ready  { border-left-color: var(--ok); }
.lane.lane-ready .lanestat { color: var(--ok); }
.lane.lane-soon { background: var(--warn-soft); }
.lane.lane-late { background: var(--bad-soft); border-color: #f0c6c2; }
.laneflag {
  position: absolute; top: 6px; right: 8px; color: var(--bad); font-weight: 800; font-size: 15px;
}
.lanesite { font-weight: 500; color: var(--muted); }
.tvlanesite { font-weight: 500; color: #b3aea6; }
/* One load bracketed across several lanes, the way it is drawn on the whiteboard. */
.lanecont { font-size: 11.5px; color: var(--muted); font-style: italic; }
.lane-run-start { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.lane-run-mid, .lane-run-end { border-top-left-radius: 0; border-top-right-radius: 0; }
.lane-run-mid { border-radius: 0; }
.lane.lane-run-mid, .lane.lane-run-end { border-top: 1px dashed var(--line); margin-top: -8px; }
@media (max-width: 900px) {
  .laneboard { grid-template-columns: 1fr; }
}

/* TV mode. Rows are sized off the viewport so 34 lanes always fit the screen. */
.tvlanes .tvhead { padding-bottom: 18px; border-bottom: 1px solid #262626; }
.tvlanes .tvlanegrid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  height: calc(100vh - 176px); margin-top: 20px;
}
.tvlanecol { display: grid; grid-template-rows: repeat(var(--rows, 12), 1fr); gap: 6px; }
.tvlane {
  display: flex; align-items: center; gap: 10px; min-height: 0;
  background: #171717; border-left: 6px solid #3a3a3a; border-radius: 6px; padding: 4px 10px;
}
.tvlanenum {
  flex: 0 0 46px; font-size: clamp(16px, 2.1vh, 30px); font-weight: 800; color: #8f8f8f;
  text-align: center;
}
.tvlanebody { min-width: 0; flex: 1 1 auto; }
.tvlaneclient {
  font-size: clamp(15px, 2.1vh, 30px); font-weight: 700; color: #fff; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tvlanemeta {
  display: flex; gap: 12px; font-size: clamp(10px, 1.35vh, 18px); color: #a6a29b;
  white-space: nowrap; overflow: hidden;
}
.tvlaneempty { font-size: clamp(13px, 1.7vh, 22px); color: #565656; font-weight: 600; }
.tvlane.lane-empty { background: #101010; border-left-color: #262626; }
.tvlane.lane-in { border-left-color: #4a9be0; }
.tvlane.lane-out { border-left-color: var(--ember); }
.tvlane.lane-hold { border-left-color: #6b6b6b; }
.tvlane.lane-ready { border-left-color: #2fbb85; }
.tvlane.lane-soon { background: #35290b; }
.tvlane.lane-late { background: #3d1613; border-left-color: #e5564a; }
.tvlane.lane-late .tvlaneclient { color: #ffd9d5; }
.tvlanecont {
  font-size: clamp(12px, 1.5vh, 21px); color: #8b8781; font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tvlane.lane-run-start { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.tvlane.lane-run-mid { border-radius: 0; }
.tvlane.lane-run-end { border-top-left-radius: 0; border-top-right-radius: 0; }
.tvlane.lane-run-mid .tvlanenum, .tvlane.lane-run-end .tvlanenum { opacity: .55; }
