/* First Choice one dashboard (SAMPLE) - Kevin's desktop screen.
   Work-site look: charcoal and hi-vis yellow chrome, a concrete-white work surface, condensed type.
   Calendar colors follow the person (checked for colorblind separation): Supervisor 1 blue,
   Supervisor 2 orange, the crew green. Text always stays in ink colors. */
:root {
  --char: #1b1c1e; --char-2: #242528; --char-3: #2f3135; --char-line: #3a3c41; --char-text: #c9c7c0;
  --hivis: #f5c518; --hivis-2: #ffd84a; --hivis-ink: #1b1c1e;
  --bg: #efeee9; --surface: #fbfbf8; --panel: #ffffff; --line: #e2dfd7; --line-2: #ecebe5;
  --ink: #1d1f22; --ink-2: #4a4d53; --muted: #84817a; --faint: #a9a69e;
  --s1: #2f6fd6; --s2: #d9661f; --crew: #1f8a6f; --kevin: #3a3d42;
  --danger: #c4321f; --ok: #1d7f49; --warn: #a86a12;
  --f-body: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --f-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --ph: 54px; /* one hour on the calendar */
  --r: 8px;
  --shadow: 0 1px 2px rgba(20, 20, 18, .06), 0 4px 14px rgba(20, 20, 18, .07);
  --shadow-lg: 0 10px 40px rgba(15, 15, 14, .22), 0 2px 8px rgba(15, 15, 14, .12);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.35 var(--f-body); overflow: hidden;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
button svg, a svg, label svg { width: 1.15em; height: 1.15em; }
.icon-d svg { width: 20px; height: 20px; }
.search svg { width: 17px; height: 17px; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--hivis); outline-offset: 2px; }
.mono { font-family: var(--f-mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ top bar */
.top { height: 58px; background: var(--char); color: #f3f1ea; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 10px; position: relative; z-index: 30; }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px;
  background: repeating-linear-gradient(-45deg, var(--hivis) 0 11px, var(--char) 11px 22px); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 238px; }
.badge { width: 38px; height: 38px; border-radius: 50%; background: var(--hivis); color: var(--hivis-ink); display: grid; place-items: center;
  font: 700 15px/1 var(--f-display); letter-spacing: .02em; box-shadow: inset 0 0 0 3px var(--char), 0 0 0 2px var(--hivis); }
.brand b { font: 700 20px/1 var(--f-display); letter-spacing: .03em; text-transform: uppercase; display: block; }
.brand small { font: 500 11px/1 var(--f-body); color: var(--char-text); letter-spacing: .12em; text-transform: uppercase; }
.navbtns { display: flex; align-items: center; gap: 6px; }
.btn-ghost-d { background: transparent; border: 1px solid var(--char-line); color: #f3f1ea; border-radius: 999px; padding: 6px 14px; font-weight: 600; }
.btn-ghost-d:hover { background: var(--char-3); }
.icon-d { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: #f3f1ea; display: grid; place-items: center; }
.icon-d:hover { background: var(--char-3); }
.title { font: 600 24px/1 var(--f-display); letter-spacing: .01em; white-space: nowrap; }
.spacer { flex: 1; }
.search { display: flex; align-items: center; gap: 8px; background: var(--char-3); border-radius: 999px; padding: 0 14px; height: 36px; width: min(340px, 26vw); color: var(--char-text); }
.search input { background: transparent; border: 0; outline: 0; color: #fff; width: 100%; }
.search input::placeholder { color: #8e8c86; }
.seg { display: flex; background: var(--char-3); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--char-text); padding: 6px 12px; border-radius: 999px; font-weight: 600; letter-spacing: .02em; }
.seg button[aria-pressed="true"] { background: var(--hivis); color: var(--hivis-ink); }
.who { display: flex; align-items: center; gap: 9px; padding-left: 6px; }
.who .av { width: 34px; height: 34px; border-radius: 50%; background: #f3f1ea; color: var(--char); display: grid; place-items: center; font: 700 13px/1 var(--f-display); }
.who b { display: block; font-weight: 600; font-size: 13.5px; }
.who small { color: var(--char-text); font-size: 11.5px; }
.sample { font: 600 10.5px/1 var(--f-mono); letter-spacing: .08em; color: var(--hivis); border: 1px dashed rgba(245, 197, 24, .6); padding: 5px 7px; border-radius: 4px; text-transform: uppercase; white-space: nowrap; }
.who b, .who small { white-space: nowrap; }

/* ------------------------------------------------------------ layout */
.app { display: grid; grid-template-columns: 70px 1fr; height: calc(100vh - 58px); padding-top: 5px; }
.rail { background: var(--char-2); display: flex; flex-direction: column; align-items: stretch; padding: 10px 0; gap: 4px; }
.rail button, .rail a { border: 0; background: transparent; color: var(--char-text); display: grid; justify-items: center; gap: 4px; padding: 9px 2px; position: relative; text-decoration: none;
  font: 600 11px/1.1 var(--f-body); letter-spacing: .04em; }
.rail button:hover, .rail a:hover { color: #fff; background: var(--char-3); }
.rail [aria-current="page"] { color: #fff; }
.rail [aria-current="page"]::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 3px 3px 0; background: var(--hivis); }
.rail svg { width: 22px; height: 22px; }
.rail .dot { position: absolute; top: 5px; right: 13px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--hivis); color: var(--hivis-ink); font: 700 11px/18px var(--f-mono); padding: 0 4px; }
.rail .grow { flex: 1; }
.view { min-width: 0; min-height: 0; overflow: hidden; }

/* ------------------------------------------------------------ calendar view layout */
.calview { display: grid; grid-template-columns: 236px minmax(0, 1fr) 356px; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.calview > .glance { grid-column: 1 / -1; grid-row: 1; }
.calview > .side { grid-column: 1; grid-row: 2; }
.calview > .center { grid-column: 2; grid-row: 2; }
.calview > .needs { grid-column: 3; grid-row: 2; }
.calview.side-off { grid-template-columns: 0 minmax(0, 1fr) 356px; }
.calview.side-off .side { display: none; }
.side { background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; padding: 14px 14px 20px; }
.center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.needs { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }

.create { display: flex; align-items: center; gap: 10px; border: 0; background: var(--hivis); color: var(--hivis-ink); border-radius: 16px; padding: 12px 18px 12px 14px;
  font: 700 15px/1 var(--f-display); letter-spacing: .05em; text-transform: uppercase; box-shadow: 0 2px 0 #c99f00, var(--shadow); width: 100%; }
.create:hover { background: var(--hivis-2); }
.create svg { width: 20px; height: 20px; }
.side h4 { font: 700 12px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px; }
.mini { margin-top: 16px; }
.mini-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; margin-bottom: 4px; }
.mini-head button { border: 0; background: transparent; width: 26px; height: 26px; border-radius: 50%; color: var(--ink-2); }
.mini-head button:hover { background: var(--line-2); }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; }
.mini-grid span { color: var(--faint); font: 600 10px/22px var(--f-mono); }
.mini-grid button { border: 0; background: transparent; height: 26px; border-radius: 50%; font-size: 12px; color: var(--ink-2); }
.mini-grid button.out { color: var(--faint); }
.mini-grid button:hover { background: var(--line-2); }
.mini-grid button.inweek { background: color-mix(in srgb, var(--hivis) 22%, transparent); border-radius: 0; }
.mini-grid button.today { background: var(--char); color: var(--hivis); border-radius: 50%; font-weight: 700; }
.chk { display: flex; align-items: center; gap: 9px; padding: 5px 4px; border-radius: 6px; cursor: pointer; user-select: none; }
.chk:hover { background: var(--line-2); }
.chk input { appearance: none; width: 17px; height: 17px; border-radius: 4px; border: 2px solid var(--c, var(--ink-2)); margin: 0; display: grid; place-items: center; flex: none; }
.chk input:checked { background: var(--c, var(--ink-2)); }
.chk input:checked::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.chk .lbl { flex: 1; min-width: 0; }
.chk .lbl small { display: block; color: var(--muted); font-size: 11.5px; }
.chk .n { font: 500 11px var(--f-mono); color: var(--muted); }
.side-foot { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); display: grid; gap: 8px; }
.side-foot button, .side-foot a { justify-self: start; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 12px; font-weight: 600; color: var(--ink-2); text-decoration: none; }

/* ------------------------------------------------------------ at-a-glance strip */
.glance { display: grid; grid-template-columns: minmax(270px, 1.7fr) repeat(8, minmax(0, 1fr)); gap: 8px; padding: 12px 14px 11px; border-bottom: 1px solid var(--line); background: var(--bg); }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px 9px; text-align: left; position: relative; min-width: 0; box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s; }
button.tile:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: #d2cec4; }
.tile .k { font: 700 11px/1.1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile .k svg { width: 14px; height: 14px; }
.tile .v { font: 700 30px/1 var(--f-display); margin: 6px 0 3px; letter-spacing: .01em; }
.tile .s { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.hot::before { content: ''; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 3px 3px 0; background: var(--hivis); }
.tile.late::before { background: var(--danger); }
.tile.late .s { color: var(--danger); font-weight: 600; }
.tile.zero .v { color: var(--faint); }
.tile.today { background: var(--char); border-color: var(--char); color: #f3f1ea; }
.tile.today .k { color: var(--hivis); }
.tile.today .rows { display: grid; gap: 3px; margin-top: 7px; font-size: 12.5px; }
.tile.today .rows div { display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.tile.today .rows b { font: 700 12px var(--f-mono); color: #fff; min-width: 30px; }
.tile.today .rows span { overflow: hidden; text-overflow: ellipsis; color: var(--char-text); }
.tile.today .sw { width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; align-self: center; }

/* ------------------------------------------------------------ calendar: shared */
.cal { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--surface); position: relative; }
.wk-head, .wk-all, .wk-grid { display: grid; grid-template-columns: 58px repeat(var(--n), minmax(0, 1fr)); }
.wk-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.dh { padding: 8px 4px 0; text-align: center; border-left: 1px solid var(--line-2); }
.dh .dow { font: 700 11px/1 var(--f-display); letter-spacing: .14em; color: var(--muted); }
.dh .dn { font: 600 26px/1 var(--f-display); margin: 4px auto 6px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.dh .dn:hover { background: var(--line-2); }
.dh button.dn { border: 0; background: transparent; color: inherit; padding: 0; }
.settled .ev:not(.flash) { animation: none; }
.dh.today .dow { color: var(--ink); }
.dh.today .dn { background: var(--char); color: var(--hivis); }
.dh.past .dn { color: var(--muted); }
.dh .lanes { display: grid; grid-template-columns: repeat(var(--lanes), 1fr); border-top: 1px solid var(--line-2); }
.dh .lanes span { font: 700 10.5px/22px var(--f-mono); letter-spacing: .06em; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 5px; }
.dh .lanes span::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.dh .lanes span + span { border-left: 1px dashed var(--line); }
.gut-lbl { font: 600 10px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; }

.wk-all { border-bottom: 1px solid var(--line); min-height: 30px; grid-auto-rows: 26px; row-gap: 3px; padding: 4px 0; background: color-mix(in srgb, var(--crew) 4%, var(--surface)); }
.wk-all .gut-lbl { grid-column: 1; align-items: flex-start; padding-top: 7px; }
.bar { margin: 0 3px; border-radius: 6px; background: color-mix(in srgb, var(--crew) 16%, #fff); border-left: 4px solid var(--crew); padding: 0 8px; display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; white-space: nowrap; overflow: hidden; cursor: pointer; border-top: 1px solid color-mix(in srgb, var(--crew) 25%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--crew) 25%, transparent); }
.bar:hover { box-shadow: var(--shadow); }
.bar b { font-weight: 600; }
.bar .meta { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.bar.done { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--crew) 10%, #fff) 0 6px, #fff 6px 12px); }

.wk-body { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; scroll-behavior: smooth; }
.wk-grid { position: relative; height: calc(var(--ph) * 11); }
.gutter { position: relative; }
.gutter span { position: absolute; right: 8px; transform: translateY(-50%); font: 500 10.5px var(--f-mono); color: var(--muted); }
.day { position: relative; display: grid; grid-template-columns: repeat(var(--lanes), minmax(0, 1fr)); border-left: 1px solid var(--line-2);
  background-image: repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px var(--ph)); }
.day.today { background-color: color-mix(in srgb, var(--hivis) 5%, transparent); }
.day.off { background-color: #f3f2ee; }
.lane { position: relative; min-width: 0; }
.lane + .lane { border-left: 1px dashed var(--line); }
.lane.selecting { cursor: copy; }
.lane.selecting:hover { background: color-mix(in srgb, var(--c) 4%, transparent); }

.ev { position: absolute; left: 3px; right: 3px; border-radius: 7px; background: color-mix(in srgb, var(--c) 13%, #fff); border-left: 4px solid var(--c);
  padding: 4px 6px 4px 7px; font-size: 12.5px; line-height: 1.2; overflow: hidden; cursor: pointer; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent);
  animation: pop .32s cubic-bezier(.2, .8, .3, 1.2) both; z-index: 2; }
.ev:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent), var(--shadow); z-index: 4; }
.ev .t { font: 500 10.5px/1.2 var(--f-mono); color: var(--ink-2); display: flex; justify-content: space-between; gap: 4px; }
.ev .n { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.ev .w { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .x { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .st { font: 600 9.5px/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; }
.ev.done { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c) 9%, #fff) 0 6px, #fff 6px 12px); }
.ev.done .n { color: var(--ink-2); }
.ev.waiting { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent), inset 0 -3px 0 var(--hivis); }
.ev.flash { animation: flash 1.4s ease 1; }
.ev[draggable="true"]:active { cursor: grabbing; }
.ev.dragging { opacity: .4; }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }
@keyframes flash { 0%, 100% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent); } 30% { box-shadow: 0 0 0 4px var(--hivis), var(--shadow); } }

.drv { position: absolute; left: 50%; width: 0; border-left: 2px dotted #b9b5ab; z-index: 1; pointer-events: none; }
.drv span { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px;
  font: 500 9.5px/14px var(--f-mono); color: var(--ink-2); white-space: nowrap; display: flex; align-items: center; gap: 3px; }
.drv span svg { width: 10px; height: 10px; }
.drv.tight { border-left-color: var(--danger); }
.drv.tight span { border-color: var(--danger); color: var(--danger); font-weight: 600; }

.ghost { position: absolute; left: 3px; right: 3px; border-radius: 7px; border: 2px dashed var(--c); z-index: 3; cursor: pointer; padding: 4px 6px; overflow: hidden;
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c) 13%, transparent) 0 7px, color-mix(in srgb, #fff 70%, transparent) 7px 14px);
  animation: breathe 1.8s ease-in-out infinite; display: flex; flex-direction: column; gap: 1px; }
.ghost b { font: 700 11px/1.1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.ghost small { font: 500 10.5px/1.2 var(--f-mono); color: var(--ink-2); }
.ghost:hover { animation: none; background: color-mix(in srgb, var(--c) 20%, #fff); border-style: solid; }
.ghost.r1 { border-width: 3px; }
@keyframes breathe { 50% { opacity: .62; } }
.dropline { position: absolute; left: 2px; right: 2px; height: 0; border-top: 3px solid var(--c); z-index: 6; pointer-events: none; }
.dropline span { position: absolute; left: 4px; top: -20px; background: var(--char); color: var(--hivis); font: 600 10.5px/16px var(--f-mono); padding: 0 6px; border-radius: 4px; }
.now { position: absolute; left: -1px; right: 0; height: 0; border-top: 2px solid var(--danger); z-index: 5; pointer-events: none; }
.now::before { content: ''; position: absolute; left: -6px; top: -7px; width: 12px; height: 12px; border-radius: 50%; background: var(--danger); }

.selbar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20; background: var(--char); color: #f3f1ea; border-radius: 999px; padding: 8px 8px 8px 18px;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-lg); white-space: nowrap; animation: rise .25s ease both; }
.selbar b { color: var(--hivis); }
.selbar button { border: 0; border-radius: 999px; padding: 6px 12px; background: var(--char-3); color: #fff; font-weight: 600; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }

/* week: days only (the hours open when a day is clicked) */
.wd { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-auto-rows: minmax(100%, auto); }
.wd-col { border-left: 1px solid var(--line-2); display: flex; flex-direction: column; min-width: 0; padding-bottom: 24px; cursor: pointer; transition: background-color .12s; }
.wd-col:first-child { border-left: 0; }
.wd-col.today { background: color-mix(in srgb, var(--hivis) 6%, transparent); }
.wd-col.off { background: #f3f2ee; }
.wd-col:hover { background-color: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.wd-col.today:hover { background: color-mix(in srgb, var(--hivis) 10%, transparent); }
.wd-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); padding: 9px 10px 8px; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 9px; row-gap: 3px; align-items: center; }
.wd-col.today .wd-head { background: color-mix(in srgb, var(--hivis) 8%, var(--surface)); }
.wd-head .dow { font: 700 12px/1 var(--f-display); letter-spacing: .14em; color: var(--muted); grid-column: 2; grid-row: 1; align-self: end; }
.wd-col.today .wd-head .dow { color: var(--ink); }
.wd-head .dn { font: 600 26px/1 var(--f-display); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; grid-column: 1; grid-row: 1 / span 2; }
.wd-head .sum { grid-column: 2; grid-row: 2; align-self: start; }
.wd-head .hrs { grid-column: 3; grid-row: 1 / span 2; }
.wd-col.today .wd-head .dn { background: var(--char); color: var(--hivis); }
.wd-col.past .wd-head .dn { color: var(--muted); }
.wd-head .sum { font: 600 12.5px/1.2 var(--f-body); color: var(--ink-2); }
.wd-head .hrs { font: 700 10.5px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 2px; opacity: 0; transition: opacity .12s; }
.wd-head .hrs svg { width: 12px; height: 12px; }
.wd-col:hover .wd-head .hrs { opacity: 1; color: var(--ink); }
.wd-crew { padding: 8px 8px 0; display: grid; gap: 4px; }
.wd-crew .bar { margin: 0; height: 30px; }
.wd-sec { padding: 8px 8px 2px; border-radius: 10px; margin: 0 2px; }
.wd-sec.drop { background: color-mix(in srgb, var(--c) 10%, transparent); box-shadow: inset 0 0 0 2px var(--c); }
.wd-sec h4 { display: flex; align-items: center; gap: 6px; margin: 2px 2px 6px; font: 700 12px/1 var(--f-mono); color: var(--ink); flex-wrap: wrap; }
.wd-sec h4 .sw { width: 9px; height: 9px; border-radius: 2px; background: var(--c); }
.wd-sec h4 em { font: 600 12px/1 var(--f-body); font-style: normal; color: var(--ink-2); }
.wd-sec h4 small { flex-basis: 100%; font: 500 10.5px/1.2 var(--f-mono); color: var(--muted); padding-left: 15px; }
.ev.wk { position: relative; left: auto; right: auto; top: auto; height: auto; padding: 6px 8px 6px 9px; }
.ev.wk .t { font-size: 11px; }
.ev.wk .st { display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; color: var(--ink-2); }
.ghost.wk { position: relative; left: auto; right: auto; top: auto; height: auto; margin: 5px 0; padding: 7px 8px; }
.ghost.wk + .ev.wk, .ev.wk + .ghost.wk { margin-top: 5px; }
.wd-drive { margin: 0 0 0 14px; padding: 4px 0 4px 10px; border-left: 2px dotted #b9b5ab; font: 500 10.5px/1 var(--f-mono); color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.wd-drive svg { width: 11px; height: 11px; }
.wd-drive.tight { color: var(--danger); border-left-color: var(--danger); font-weight: 600; }
.wd-empty { font-size: 12px; color: var(--faint); padding: 6px 4px 8px; border: 1px dashed var(--line); border-radius: 8px; text-align: center; }

/* month */
.mo { flex: 1; display: grid; grid-template-rows: auto repeat(var(--rows), minmax(0, 1fr)); min-height: 0; }
.mo-h, .mo-r { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mo-h div { font: 700 11px/30px var(--f-display); letter-spacing: .14em; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); }
.mo-c { border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 4px 5px; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.mo-c.out { background: #f4f3ef; }
.mo-c.out .mo-d { color: var(--faint); }
.mo-d { font: 600 13px/1 var(--f-display); align-self: center; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 0; background: transparent; }
.mo-d:hover { background: var(--line-2); }
.mo-c.today .mo-d { background: var(--char); color: var(--hivis); }
.chip { display: flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; overflow: hidden; border-radius: 4px; padding: 1px 4px; cursor: pointer; border: 0; background: transparent; text-align: left; width: 100%; }
.chip:hover { background: var(--line-2); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.chip .tm { font: 500 10.5px var(--f-mono); color: var(--ink-2); }
.chip.all { background: color-mix(in srgb, var(--crew) 15%, #fff); border-left: 3px solid var(--crew); border-radius: 3px; }
.chip.more { color: var(--ink-2); font-weight: 600; }

/* schedule (agenda) */
.ag { flex: 1; overflow-y: auto; padding: 6px 22px 30px; }
.ag-day { display: grid; grid-template-columns: 120px 1fr; border-bottom: 1px solid var(--line-2); padding: 10px 0; }
.ag-day .d { font: 600 15px/1.1 var(--f-display); }
.ag-day .d small { display: block; color: var(--muted); font: 500 11px var(--f-body); letter-spacing: .06em; text-transform: uppercase; }
.ag-day.today .d { color: var(--ink); }
.ag-day.today .d::before { content: 'TODAY'; display: inline-block; font: 700 10px/1 var(--f-mono); background: var(--char); color: var(--hivis); padding: 3px 5px; border-radius: 3px; margin-bottom: 4px; }
.ag-row { display: grid; grid-template-columns: 110px 14px 1fr auto; gap: 10px; align-items: center; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.ag-row:hover { background: var(--line-2); }
.ag-row .tm { font: 500 12px var(--f-mono); color: var(--ink-2); }
.ag-row i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); }
.ag-row .who2 { font: 600 11px var(--f-mono); color: var(--ink-2); }

/* ------------------------------------------------------------ needs-you rail */
.needs-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 10px; }
.needs-head h2 { margin: 0; font: 700 21px/1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; }
.needs-head .cnt { font: 700 13px/1 var(--f-mono); background: var(--hivis); color: var(--hivis-ink); padding: 3px 7px; border-radius: 999px; }
.needs-head small { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.needs-body { overflow-y: auto; flex: 1; padding: 6px 10px 30px; }
.sec { border-bottom: 1px solid var(--line-2); }
.sec > summary { list-style: none; display: flex; align-items: center; gap: 9px; padding: 11px 6px 9px; cursor: pointer; user-select: none; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary .ic { width: 28px; height: 28px; border-radius: 8px; background: var(--char); color: var(--hivis); display: grid; place-items: center; flex: none; }
.sec > summary .ic svg { width: 16px; height: 16px; }
.sec > summary h3 { margin: 0; font: 700 14.5px/1.1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; flex: 1; }
.sec > summary h3 small { display: block; font: 500 11.5px/1.2 var(--f-body); letter-spacing: 0; text-transform: none; color: var(--muted); margin-top: 2px; }
.sec > summary .n { font: 700 12px/1 var(--f-mono); min-width: 24px; text-align: center; padding: 4px 6px; border-radius: 999px; background: var(--line-2); }
.sec > summary .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.sec[open] > summary .chev { transform: rotate(90deg); }
.sec.empty > summary { opacity: .55; }
.sec.pulse { animation: secpulse 1.2s ease 1; border-radius: 10px; }
@keyframes secpulse { 30% { background: color-mix(in srgb, var(--hivis) 25%, transparent); } }
.items { display: grid; gap: 8px; padding: 0 2px 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; box-shadow: 0 1px 0 rgba(0, 0, 0, .02); position: relative; }
.card.sel { border-color: var(--char); box-shadow: 0 0 0 2px var(--hivis), var(--shadow); }
.card[draggable="true"] { cursor: grab; }
.card .l1 { display: flex; align-items: baseline; gap: 8px; }
.card .l1 b { font-weight: 700; font-size: 14.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .l1 .ago { font: 500 11px var(--f-mono); color: var(--muted); white-space: nowrap; }
.card .l1 .ago.late { color: var(--danger); font-weight: 600; }
.card .l2 { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.card .q { margin: 7px 0 0; font-size: 13px; color: var(--ink); background: var(--line-2); border-radius: 7px; padding: 7px 9px; position: relative; }
.card .q.vm { font-style: italic; }
.card .q.vm::before { content: 'Voicemail'; display: block; font: 600 9.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-style: normal; margin-bottom: 4px; }
.card .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.b { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 11px; font-weight: 600; font-size: 12.5px; color: var(--ink); display: inline-flex; align-items: center; gap: 5px; text-decoration: none; white-space: nowrap; }
.b:hover { border-color: #c9c5bb; background: #faf9f5; }
.b svg { width: 14px; height: 14px; }
.b.pri { background: var(--hivis); border-color: #e2b300; color: var(--hivis-ink); }
.b.pri:hover { background: var(--hivis-2); }
.b.dark { background: var(--char); border-color: var(--char); color: #fff; }
.b.dark:hover { background: var(--char-3); }
.b.quiet { border-color: transparent; color: var(--ink-2); }
.b.quiet:hover { background: var(--line-2); }
.b:disabled { opacity: .45; cursor: default; }
.sugs { display: grid; gap: 5px; margin-top: 9px; }
.sug { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 6px 7px 6px 6px; background: #fdfdfb; }
.sug .who3 { width: 26px; height: 26px; border-radius: 6px; background: var(--c); color: #fff; display: grid; place-items: center; font: 700 11px/1 var(--f-mono); }
.sug .w1 { font-weight: 700; font-size: 13px; }
.sug .w2 { font-size: 11.5px; color: var(--ink-2); }
.sug .w2.away { color: var(--warn); }
.sug.best { border-color: var(--char); }
.reply { margin-top: 8px; display: grid; gap: 6px; }
.reply textarea { width: 100%; min-height: 52px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; resize: vertical; font-size: 13px; background: #fdfdfb; }
.allclear { color: var(--muted); font-size: 12.5px; padding: 0 8px 12px; }

/* tags */
.tag { font: 600 10.5px/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag.terr { background: transparent; border: 1px solid var(--line); }
.tag.type { background: #ecebe4; color: var(--ink); }
.tag.src { background: transparent; color: var(--ink-2); padding-left: 0; padding-right: 0; }
.pdot { display: inline-flex; align-items: center; gap: 5px; font: 600 11px var(--f-mono); color: var(--ink-2); }
.pdot::before { content: ''; width: 9px; height: 9px; border-radius: 2px; background: var(--c); }

/* ------------------------------------------------------------ board (clients) */
.page { height: 100%; overflow-y: auto; padding: 18px 24px 40px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font: 700 32px/1 var(--f-display); letter-spacing: .02em; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.tools { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.tools select, .tools input { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.grp { margin: 16px 0 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 0 rgba(0, 0, 0, .02); }
.grp-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-left: 6px solid var(--g); cursor: pointer; user-select: none; }
.grp-h h2 { margin: 0; font: 700 18px/1 var(--f-display); letter-spacing: .03em; color: var(--ink); }
.grp-h .n { color: var(--muted); font: 500 12px var(--f-mono); }
.grp-h .sum { margin-left: auto; font: 600 13px var(--f-mono); color: var(--ink-2); }
.grp table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.grp th { font: 700 10.5px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 8px 10px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: #fbfaf7; white-space: nowrap; }
.grp td { padding: 6px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp tbody tr { cursor: pointer; }
.grp tbody tr:hover td { background: #faf9f4; }
.grp tbody tr:last-child td { border-bottom: 0; }
.grp td.nm { font-weight: 700; border-left: 6px solid color-mix(in srgb, var(--g) 35%, #fff); }
.pill { display: block; text-align: center; color: #fff; font-weight: 600; font-size: 12px; padding: 4px 6px; border-radius: 4px; background: var(--pc, #777); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp.collapsed table { display: none; }

/* ------------------------------------------------------------ money */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kpi .k { font: 700 11px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi .v { font: 700 30px/1 var(--f-display); margin: 8px 0 4px; }
.kpi .s { font-size: 12.5px; color: var(--ink-2); }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 4px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 10px 16px; font: 700 14px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); position: relative; }
.tabs button[aria-pressed="true"] { color: var(--ink); }
.tabs button[aria-pressed="true"]::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -2px; height: 3px; background: var(--hivis); }
.tabs .sep { width: 1px; background: var(--line); margin: 8px 8px; }
.tabs .n { font: 600 11px var(--f-mono); color: var(--muted); margin-left: 4px; }
.mhead { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 4px 8px; border-bottom: 2px solid var(--ink); }
.mhead h3 { margin: 0; font: 700 18px/1 var(--f-display); letter-spacing: .03em; }
.mhead span { font: 600 14px var(--f-mono); }
.mrow { display: grid; grid-template-columns: minmax(0, 1.4fr) 92px minmax(0, 1.6fr) 120px 120px auto; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); background: transparent; }
.mrow:hover { background: #faf9f4; }
.mrow .nm { font-weight: 700; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; cursor: pointer; }
.mrow .nm small { display: block; font-weight: 400; color: var(--muted); text-decoration: none; font-size: 12px; }
.mrow .addr { color: var(--ink-2); font-size: 13px; }
.mrow .amt { font: 600 14.5px var(--f-mono); text-align: right; }
.mrow .em { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.mrow .em svg { width: 13px; height: 13px; }
.status { font: 700 10.5px/1 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: #e4ecfa; color: #24467e; justify-self: start; }
.status.draft { background: #fff1c2; color: #6b5200; }
.status.ok { background: #dcf1e4; color: #1d5a37; }
.status.no { background: #f6e0dc; color: #8a2a1a; }
.status.late { background: #f6e0dc; color: #8a2a1a; }
.empty-state { padding: 40px; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------ drawer (one job) */
.drawer-wrap { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; background: rgba(20, 20, 18, .28); animation: fade .18s ease both; }
.drawer-wrap[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.drawer { width: min(860px, 62vw); height: 100%; background: var(--bg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .24s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.dr-head { background: var(--char); color: #f3f1ea; padding: 16px 20px 14px; position: relative; }
.dr-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px; background: repeating-linear-gradient(-45deg, var(--hivis) 0 11px, var(--char) 11px 22px); }
.dr-head .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.dr-head .tag { background: var(--char-3); color: #f3f1ea; }
.dr-head h2 { margin: 0; font: 700 30px/1 var(--f-display); letter-spacing: .01em; }
.dr-head .addr { margin-top: 6px; color: var(--char-text); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.dr-head .addr a { color: #fff; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.dr-head .x { position: absolute; top: 12px; right: 12px; }
.steps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 16px 20px 10px; }
.step { text-align: center; font: 600 10.5px/1.1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.step i { display: block; height: 6px; border-radius: 3px; background: var(--line); margin-bottom: 6px; }
.step.done i { background: var(--char); }
.step.done { color: var(--ink-2); }
.step.cur i { background: var(--hivis); box-shadow: inset 0 0 0 1px #d6a800; }
.step.cur { color: var(--ink); }
.step.stop i { background: var(--danger); }
.dr-body { flex: 1; overflow-y: auto; padding: 6px 20px 30px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 14px; align-content: start; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px; }
.box h3 { margin: 0 0 10px; font: 700 13px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.box h3 .r { margin-left: auto; letter-spacing: 0; text-transform: none; font: 500 12px var(--f-body); }
.box.now-box { border-color: var(--char); box-shadow: 0 0 0 2px color-mix(in srgb, var(--hivis) 70%, transparent); }
.box.now-box h3 { color: var(--ink); }
.box.now-box h3::before { content: 'NEXT'; font: 700 9.5px/1 var(--f-mono); background: var(--hivis); color: var(--hivis-ink); padding: 3px 5px; border-radius: 3px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row + .row { margin-top: 8px; }
.field { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.field select, .field input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13.5px; color: var(--ink); background: #fff; }
.items-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.items-t td { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.items-t td.q, .items-t td.a { text-align: right; font-family: var(--f-mono); font-size: 12.5px; white-space: nowrap; padding-left: 10px; }
.items-t tr.tot td { border-bottom: 0; font-weight: 700; font-size: 15px; padding-top: 8px; }
.note-l { display: grid; gap: 8px; font-size: 13px; }
.note-l div { background: #faf9f4; border-radius: 8px; padding: 7px 9px; }
.note-l small { display: block; color: var(--muted); font: 500 11px var(--f-mono); margin-bottom: 2px; }
.hist { display: grid; gap: 0; font-size: 12.5px; max-height: 260px; overflow-y: auto; }
.hist div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.hist small { font: 500 11px var(--f-mono); color: var(--muted); }
.warn { background: #fff6dc; border: 1px solid #f0d27a; color: #5c4400; border-radius: 8px; padding: 7px 9px; font-size: 12.5px; margin-top: 8px; }
.okline { color: var(--ok); font-weight: 600; }
.badline { color: var(--danger); font-weight: 600; }
.sk-thumb { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; position: relative; text-decoration: none; }
.sk-thumb > svg { display: block; width: 100%; height: 190px; }
.sk-thumb span { position: absolute; right: 8px; bottom: 8px; background: var(--char); color: var(--hivis); font: 700 11px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; padding: 7px 10px; border-radius: 6px; display: flex; align-items: center; gap: 6px; }
.sk-thumb span svg { width: 12px; height: 12px; }
.sk-thumb:hover { border-color: var(--char); }
.span2 { grid-column: 1 / -1; }

/* ------------------------------------------------------------ dialog, toasts */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, 92vw); box-shadow: var(--shadow-lg); background: var(--bg); color: var(--ink); }
dialog::backdrop { background: rgba(20, 20, 18, .38); }
.dlg-h { background: var(--char); color: #fff; padding: 14px 18px; font: 700 20px/1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; justify-content: space-between; }
.dlg-b { padding: 16px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlg-b .span2 { grid-column: 1 / -1; }
.dlg-f { padding: 0 18px 16px; display: flex; justify-content: flex-end; gap: 8px; }
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; justify-items: center; pointer-events: none; }
.toast { background: var(--char); color: #f3f1ea; border-radius: 12px; padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-lg); pointer-events: auto;
  max-width: 640px; animation: rise2 .25s ease both; border-left: 5px solid var(--hivis); }
.toast b { color: var(--hivis); }
.toast button { border: 0; background: var(--char-3); color: #fff; border-radius: 999px; padding: 5px 12px; font-weight: 700; }
@keyframes rise2 { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1360px) {
  .calview { grid-template-columns: 220px minmax(0, 1fr) 330px; }
  .calview.side-off { grid-template-columns: 0 minmax(0, 1fr) 330px; }
  .glance { grid-template-columns: minmax(230px, 1.5fr) repeat(8, minmax(0, 1fr)); gap: 6px; }
  .tile { padding: 8px 9px; }
  .tile .v { font-size: 26px; }
  .search { width: 200px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
