/* Office app layout. The top bar is the brand moment: a highway guide sign. Everything below stays quiet. */

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.signbar { position: sticky; top: 0; z-index: 100; background: var(--chrome); padding: 6px 10px; }
.signbar-inner { display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 10px 0 12px; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 9px; }
.signbar .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: .005em; text-decoration: none; flex: none; }
.signbar .brand img { height: 30px; }
.signbar .brand .co { font-weight: 600; font-size: 12.5px; color: rgba(255, 255, 255, .72); border-left: 1px solid rgba(255, 255, 255, .3); padding-left: 10px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 7px; color: rgba(255, 255, 255, .86); font-weight: 600; font-size: 14px; white-space: nowrap; }
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.nav a.on { background: #fff; color: var(--green-900); }
.nav a svg { width: 17px; height: 17px; }
.nav .badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--kraft-500); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.nav a.on .badge { background: var(--kraft-700); }
.signbar .tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.searchbox { display: flex; align-items: center; gap: 8px; height: 34px; width: 230px; padding: 0 10px; border-radius: 7px; background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .8); border: 1px solid transparent; cursor: text; font-size: 13px; }
.searchbox:hover { background: rgba(255, 255, 255, .18); }
.searchbox svg { width: 16px; height: 16px; }
.searchbox kbd { margin-left: auto; font: inherit; font-size: 11px; padding: 1px 5px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .3); }
.signbar .btn.newlead { background: var(--kraft-500); border-color: var(--kraft-500); color: #fff; }
.signbar .btn.newlead:hover { background: var(--kraft-700); }
.signbar .me { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 800; font-size: 12px; cursor: pointer; }
@media (max-width: 1540px) { .signbar .brand .co { display: none; } }
@media (max-width: 1400px) { .nav a { padding: 0 9px; gap: 6px; } .searchbox { width: 40px; } .searchbox span, .searchbox kbd { display: none; } }
@media (max-width: 1120px) { .nav a:not(.on) .lbl { display: none; } }
.acct-bar { font-size: 12.5px; font-weight: 600; text-align: center; padding: 6px 16px; }
.acct-bar.test { background: var(--slate-100); color: var(--on-slate); }
.acct-bar.trial { background: var(--kraft-100); color: var(--on-kraft); }
.acct-act { margin-left: 6px; padding: 2px 10px; border: 0; border-radius: 999px; background: var(--on-kraft); color: var(--kraft-100); font: inherit; font-weight: 800; cursor: pointer; }
.acct-act:hover { filter: brightness(1.08); }
.upgrade-note { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.acct-bar a { color: inherit; text-decoration: underline; text-underline-offset: 2px; margin-left: 4px; }
.paused { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.paused-sign { max-width: 520px; background: var(--chrome); color: #fff; border-radius: 14px; padding: 28px 30px; box-shadow: inset 0 0 0 3px var(--chrome), inset 0 0 0 5px rgba(255,255,255,.85); }
.paused-sign h1 { font-size: 24px; margin: 0 0 10px; color: #fff; }
.paused-sign p { margin: 0 0 14px; line-height: 1.5; color: rgba(255,255,255,.9); }
.paused-contact { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.paused-contact a { color: var(--kraft-300); font-weight: 700; }

.page { width: 100%; max-width: 1480px; margin: 0 auto; padding: 22px 24px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .lede { color: var(--text-2); margin-top: 4px; }
.page-head .btn-row { flex-wrap: nowrap; }
.page-head .btn-row input[type=date] { width: 150px; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; margin-bottom: 6px; }
.crumb svg { width: 15px; height: 15px; }

.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 6px; z-index: 150; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border: 0; background: none; border-radius: 6px; text-align: left; cursor: pointer; font-size: var(--fs-sm); color: var(--text); }
.menu button:hover, .menu a:hover { background: var(--ink-100); text-decoration: none; }
.menu .sep { height: 1px; background: var(--line-soft); margin: 5px 2px; }
.menu svg { width: 16px; height: 16px; color: var(--text-2); }
.rel { position: relative; }

/* command search */
.cmdk { width: min(640px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); overflow: hidden; }
.cmdk input { width: 100%; border: 0; border-bottom: 1px solid var(--line-soft); padding: 16px 18px; font-size: 17px; outline: none; background: transparent; }
.cmdk ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.cmdk li button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; }
.cmdk li button:hover, .cmdk li button.on { background: var(--green-50); }

/* Today */
.today-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
.statline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 22px; }
.statline > div { background: var(--surface); padding: 14px 18px; }
.statline b { display: block; font-size: var(--fs-2xl); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.statline span { color: var(--text-2); font-size: var(--fs-sm); }
.statline em { font-style: normal; color: var(--text-3); font-size: var(--fs-xs); display: block; margin-top: 2px; }
.jobrow { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.jobrow:last-child { border-bottom: 0; }
.jobrow:hover { background: var(--green-50); }
.jobrow .time { font-weight: 800; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.jobrow .time small { display: block; font-weight: 600; color: var(--text-3); font-size: var(--fs-xs); }
.lead-age { font-weight: 800; font-variant-numeric: tabular-nums; }
.lead-age.late { color: var(--red-600); }
.todo { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.todo:last-child { border-bottom: 0; }
.todo .check input { margin-top: 3px; }
.listhead { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 10px; border-bottom: 1px solid var(--line-soft); }
.listhead h3 { font-size: var(--fs-md); }
.matrix { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.matrix th, .matrix td { padding: 7px 12px; text-align: right; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line-soft); }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix thead th { color: var(--text-2); font-weight: 600; font-size: var(--fs-xs); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 6px 2px 0; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; height: 100%; justify-content: flex-end; }
.bars .bar i { display: block; width: 100%; max-width: 34px; background: var(--green-700); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .bar.now i { background: var(--kraft-500); }
.bars .bar span { font-size: 11px; color: var(--text-3); }
.srcrow { display: grid; grid-template-columns: 130px minmax(0, 1fr) 104px 76px; gap: 12px; align-items: center; font-size: var(--fs-sm); padding: 6px 0; }
.srcrow .r { text-align: right; font-variant-numeric: tabular-nums; }
.srcrow .track { height: 8px; background: var(--ink-100); border-radius: 4px; overflow: hidden; }
.srcrow .track i { display: block; height: 100%; background: var(--green-700); border-radius: 4px; }

/* Pipeline */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.views { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.views button { position: relative; height: 38px; padding: 0 14px; border: 0; background: none; cursor: pointer; font-weight: 700; color: var(--text-2); white-space: nowrap; font-size: var(--fs-sm); }
.views button:hover { color: var(--text); }
.views button.on { color: var(--text); }
.views button.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.views button .n { margin-left: 6px; color: var(--text-3); font-weight: 600; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; }
.cust-cell b { display: block; }
.cust-cell small { color: var(--text-3); font-size: var(--fs-xs); }
.signals { display: inline-flex; gap: 4px; }
.signals .sig { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--ink-100); color: var(--text-3); }
.signals .sig.on { background: var(--green-100); color: var(--on-green); }
.signals .sig svg { width: 13px; height: 13px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.lane { background: var(--ink-100); border-radius: var(--r-lg); padding: 10px; min-height: 300px; }
.lane > header { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; font-weight: 700; font-size: var(--fs-sm); }
.lane > header small { color: var(--text-2); font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.card:hover { border-color: var(--green-600); }
.card .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.card .meta { color: var(--text-2); font-size: var(--fs-xs); margin-top: 4px; }

/* Opportunity */
.opp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; align-items: start; margin-bottom: 16px; }
.opp-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.opp-head .quote { font-size: var(--fs-sm); color: var(--text-2); font-weight: 700; }
.contact-line { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; color: var(--text-2); font-size: var(--fs-sm); align-items: center; }
.contact-line a { color: var(--text); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 16px; }
.facts > div { padding: 12px 16px; border-right: 1px solid var(--line-soft); min-width: 0; }
.facts > div:last-child { border-right: 0; }
.facts span { display: block; font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; }
.facts b { display: block; font-size: var(--fs-lg); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.facts small { display: block; color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.routebar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 18px 14px; margin-bottom: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.routebar .trip { font-size: var(--fs-xs); color: var(--text-2); text-align: right; white-space: nowrap; }
.maps-links { margin-top: 6px; }
.maps-links a { font-weight: 700; }
.opp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { position: relative; height: 40px; padding: 0 14px; border: 0; background: none; font-weight: 700; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--text); }
.tabs button.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.tabs .n { margin-left: 5px; color: var(--text-3); font-weight: 600; }
.side > .panel { margin-bottom: 14px; }
.side .panel h4 { margin-bottom: 10px; }
.inline-select { border: 1px solid transparent; background: transparent; border-radius: var(--r-sm); height: 28px; padding: 0 6px; margin-left: -7px; max-width: 100%; color: var(--text); font-weight: 600; cursor: pointer; }
.inline-select:hover { border-color: var(--line); background: var(--surface); }
.composer { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin-bottom: 18px; }
.composer .modes { display: flex; gap: 2px; padding: 6px 6px 0; border-bottom: 1px solid var(--line-soft); }
.composer .modes button { display: flex; gap: 6px; align-items: center; height: 34px; padding: 0 12px; border: 0; border-radius: 7px 7px 0 0; background: none; color: var(--text-2); font-weight: 700; cursor: pointer; font-size: var(--fs-sm); }
.composer .modes button svg { width: 15px; height: 15px; }
.composer .modes button.on { color: var(--accent); background: var(--green-50); }
.composer textarea { border: 0; width: 100%; min-height: 86px; padding: 12px 14px; resize: vertical; background: transparent; outline: none; }
.composer .foot { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 10px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 0 0 16px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line-soft); }
.timeline li:last-child::before { display: none; }
.timeline .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-100); color: var(--text-2); }
.timeline .ic svg { width: 15px; height: 15px; }
.timeline .ic.sms, .timeline .ic.email { background: var(--slate-100); color: var(--on-slate); }
.timeline .ic.in { background: var(--kraft-100); color: var(--on-kraft); }
.timeline .ic.note { background: var(--amber-100); color: var(--on-amber); }
.timeline .ic.payment { background: var(--green-100); color: var(--on-green); }
.timeline .ic.document { background: var(--green-100); color: var(--on-green-strong); }
.timeline .meta { font-size: var(--fs-xs); color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.timeline .meta b { color: var(--text-2); }
.timeline .body { white-space: pre-wrap; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.timeline .bubble { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 9px 12px; }
.timeline .bubble.in { background: var(--kraft-50); border-color: var(--kraft-100); }

.est-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 16px; }
.block > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.block > header h3 { font-size: var(--fs-md); }
.block > .body { padding: 14px 16px; }
.stop-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.stop-row:last-child { border-bottom: 0; }
.stop-row .marker { width: 26px; height: 26px; border-radius: 50%; background: var(--ink-800); color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.stop-row.origin .marker { background: var(--green-700); }
.stop-row.destination .marker { background: var(--kraft-700); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.job-card { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.job-card:last-child { border-bottom: 0; }
.job-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.job-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.job-stats div { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 8px 10px; }
.job-stats span { display: block; font-size: var(--fs-xs); color: var(--text-2); }
.job-stats b { font-variant-numeric: tabular-nums; }
.job-stats .set { border-color: var(--kraft-300); background: var(--kraft-50); }
.receipt { position: sticky; top: 76px; }
.receipt .lines { padding: 10px 16px; }
.receipt .line { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: var(--fs-sm); }
.receipt .line span:first-child { color: var(--text-2); }
.receipt .line.big { font-size: var(--fs-xl); font-weight: 800; padding-top: 10px; border-top: 2px solid var(--text); margin-top: 6px; }
.receipt .line.big span:first-child { color: var(--text); }
.explain { list-style: none; margin: 0; padding: 0 16px 14px; font-size: var(--fs-xs); color: var(--text-2); }
.explain li { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 4px 0; border-top: 1px dashed var(--line-soft); }
.explain li b { color: var(--text); font-weight: 700; }
.size-pick { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.room-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.room-chips button { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px dashed var(--ink-300); background: transparent; cursor: pointer; font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); }
.room-chips button.on { border-style: solid; border-color: var(--green-700); background: var(--green-100); color: var(--on-green-strong); }

.inv-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; }
.inv-rooms { display: flex; flex-direction: column; gap: 2px; }
.inv-rooms button { display: flex; justify-content: space-between; align-items: center; height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: none; cursor: pointer; font-weight: 600; color: var(--text-2); text-align: left; }
.inv-rooms button.on { background: var(--surface); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.inv-item { display: grid; grid-template-columns: minmax(0, 1fr) 70px 120px; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.stepper button { width: 32px; height: 30px; border: 0; background: var(--surface-2); cursor: pointer; font-weight: 800; color: var(--text-2); }
.stepper button:hover { background: var(--green-100); color: var(--on-green-strong); }
.stepper input { width: 42px; height: 30px; border: 0; text-align: center; font-variant-numeric: tabular-nums; background: var(--surface); }

/* Calendar */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 8px 10px; font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 118px; padding: 8px 9px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); cursor: pointer; display: flex; flex-direction: column; gap: 5px; position: relative; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover { background: var(--green-50); }
.cal-day.out { background: var(--surface-2); color: var(--text-3); }
.cal-day.today .dnum { background: var(--accent); color: #fff; }
.cal-day.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day.blocked { background: repeating-linear-gradient(135deg, var(--surface) 0 8px, var(--ink-50) 8px 16px); }
.cal-day .dtop { display: flex; justify-content: space-between; align-items: center; }
.cal-day .dnum { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm); }
.cal-day .rate { font-size: 10.5px; font-weight: 800; color: var(--on-kraft); background: var(--kraft-100); border-radius: 4px; padding: 1px 5px; }
.load { display: flex; gap: 2px; }
.load i { flex: 1; height: 7px; border-radius: 2px; background: var(--ink-150); }
.load i.used { background: var(--green-700); }
.load i.over { background: var(--red-600); }
.cal-day .who { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-day .counts { font-size: 11px; color: var(--text-3); margin-top: auto; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }

/* Dispatch */
.dispatch { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.dock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; position: sticky; top: 76px; }
.dock h4 { margin: 6px 4px 8px; font-size: var(--fs-sm); }
.dock .res { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-sm); font-size: var(--fs-sm); }
.dock .res.busy { color: var(--text-3); }
.lanes { display: flex; flex-direction: column; gap: 12px; }
.crew-lane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.crew-lane > header { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.crew-lane > header input.name { border: 0; font-weight: 800; font-size: var(--fs-md); width: 120px; background: transparent; }
.crew-lane .resources { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex: 1; }
.crew-lane .drop { min-height: 74px; padding: 10px 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.crew-lane .drop.over { background: var(--green-50); }
.dj { width: 250px; border: 1px solid var(--line); border-left: 4px solid var(--green-700); border-radius: var(--r-md); padding: 8px 10px; background: var(--surface); cursor: grab; font-size: var(--fs-sm); }
.dj.pending { border-left-color: var(--kraft-500); }
.dj .t { font-weight: 800; display: flex; justify-content: space-between; gap: 8px; }
.dj .m { color: var(--text-2); font-size: var(--fs-xs); }
.chip-select { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 4px; border-radius: 999px; background: var(--ink-100); font-size: var(--fs-xs); font-weight: 700; }
.chip-select .avatar { width: 20px; height: 20px; font-size: 9px; }
.chip-select button { border: 0; background: none; cursor: pointer; color: var(--text-3); padding: 0; display: grid; }
.chip-select.truck { background: var(--kraft-100); color: var(--on-kraft); padding-left: 8px; }

/* Settings */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.subnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 76px; }
.subnav button { text-align: left; height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: none; font-weight: 600; color: var(--text-2); cursor: pointer; }
.subnav button.on { background: var(--surface); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.subnav .grp { font-size: var(--fs-xs); font-weight: 700; color: var(--text-3); padding: 14px 12px 4px; }
.set-body { min-width: 0; display: flex; flex-direction: column; gap: 18px; padding-bottom: 70px; }
.set-panel > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line-soft); }
.set-panel > header h3 { font-size: var(--fs-lg); }
.set-panel > header p { margin: 3px 0 0; color: var(--text-2); font-size: var(--fs-sm); max-width: 62ch; }
.set-pad { padding: 14px 18px 16px; }
.set-row { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 16px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); }
.set-row:last-child { border-bottom: 0; }
.set-row .lbl b { display: block; font-weight: 700; font-size: var(--fs-sm); }
.set-row .lbl span { display: block; color: var(--text-3); font-size: var(--fs-xs); margin-top: 1px; }
.set-row .ctl { min-width: 0; }
.note-bar { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: var(--r-md); background: var(--kraft-100); color: var(--on-kraft); font-weight: 600; font-size: var(--fs-sm); }
.savebar { position: sticky; bottom: 14px; z-index: 5; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 10px 12px 10px 18px; border-radius: var(--r-lg); background: var(--chrome); color: #fff; box-shadow: var(--shadow-pop); }
.savebar > span { font-weight: 700; margin-right: auto; }
.savebar .check { color: rgba(255, 255, 255, .86); }
.table-wrap.flat { border: 0; border-radius: 0; background: none; }
.ledger.edit td { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
.ledger tr.off td { opacity: .5; }
.table-foot { display: flex; gap: 14px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line-soft); }
.linkish { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; padding: 0; }
.input.cell { height: 30px; border-color: transparent; background: transparent; padding: 0 8px; }
.input.cell:hover { border-color: var(--line); background: var(--surface); }
.input.cell:focus { background: var(--surface); }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-money { width: 120px; margin-left: auto; }
.cell-money .addon { background: transparent; border-color: transparent; padding: 0 2px 0 6px; }
.cell-check { width: 16px; height: 16px; accent-color: var(--accent); }
.who-cell { display: flex; gap: 10px; align-items: center; }
.warn-text { color: var(--on-amber); font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.radios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--green-50); box-shadow: inset 0 0 0 1px var(--accent); }
.radio-card input { margin-top: 3px; accent-color: var(--accent); }
.radio-card b { display: block; font-size: var(--fs-sm); }
.radio-card small { display: block; color: var(--text-2); font-size: var(--fs-xs); line-height: 1.35; margin-top: 2px; }
.scale-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 22px; }
.scale-grid label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: var(--fs-sm); padding: 4px 0; border-bottom: 1px dashed var(--line-soft); }
.chip-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.chip-tabs button { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.chip-tabs button span { color: var(--text-3); font-size: var(--fs-xs); }
.chip-tabs button.on { background: var(--chrome); border-color: var(--chrome); color: #fff; }
.chip-tabs button.on span { color: rgba(255, 255, 255, .7); }
.evt { padding: 12px 18px 4px; border-bottom: 1px solid var(--line-soft); }
.evt:last-child { border-bottom: 0; }
.evt h4 { font-size: var(--fs-sm); color: var(--text-2); font-weight: 700; margin: 0 0 4px; }
.tpl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 0; }
.set-panel > div > .tpl { padding: 10px 18px; border-bottom: 1px solid var(--line-soft); }
.tpl.off .tpl-main { opacity: .55; }
.tpl-main { cursor: pointer; min-width: 0; }
.tpl-main b { margin-right: 8px; }
.tpl-main p { margin: 3px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: var(--fs-sm); color: var(--text); }
.menu-switch:hover { background: var(--ink-100); }
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--ink-300); transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { box-shadow: var(--focus); }
.tpl-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 22px; }
.fieldchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fieldchips button, .fieldchips code { height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--ink-50); font-size: 11.5px; font-weight: 600; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; font-family: inherit; }
.fieldchips code { cursor: default; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 500; }
.fieldchips button:hover { border-color: var(--accent); color: var(--accent); }
.sms-prev { background: var(--ink-50); border: 1px solid var(--line); border-radius: 18px; padding: 16px 14px; }
.sms-prev .bubble { background: var(--ink-150); color: var(--text); border-radius: 16px 16px 16px 4px; padding: 9px 12px; white-space: pre-wrap; font-size: var(--fs-sm); line-height: 1.4; max-width: 92%; margin-bottom: 8px; overflow-wrap: anywhere; }
.mail-prev { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.mail-prev .subj { padding: 10px 14px; font-weight: 800; border-bottom: 1px solid var(--line); background: var(--ink-50); }
.mail-prev .mbody { padding: 14px; white-space: pre-wrap; font-size: var(--fs-sm); line-height: 1.5; max-height: 460px; overflow: auto; overflow-wrap: anywhere; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.5; }
.row-check { display: flex; padding: 4px 0; }
.row-check b { display: block; font-size: var(--fs-sm); }
.row-check small { display: block; color: var(--text-2); font-size: var(--fs-xs); margin-top: 1px; }
.tagedit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tagedit .tag { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 6px 0 11px; border-radius: 999px; background: var(--ink-100); font-size: var(--fs-sm); font-weight: 600; }
.tagedit .tag button { border: 0; background: none; color: var(--text-3); cursor: pointer; display: grid; padding: 3px; border-radius: 50%; }
.tagedit .tag button:hover { color: var(--red-600); background: var(--red-100); }
.inline-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--ink-50); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; word-break: break-all; display: inline-block; }
.checklist { margin: 14px 0 0; padding-left: 18px; color: var(--text-2); display: grid; gap: 4px; }
.swatch { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; flex: none; }
.logo-prev { height: 34px; max-width: 120px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; background: #fff; }
.law-note { margin-top: 14px; padding: 12px 16px; border-radius: var(--r-md); background: var(--kraft-50); border: 1px solid var(--kraft-100); font-size: var(--fs-sm); }
.law-note ul { margin: 6px 0 6px; padding-left: 18px; display: grid; gap: 4px; }
.law-note p { margin: 0; }
.lock-note { margin-top: 14px; display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-sm); }
.lock-note p { margin: 0; flex: 1; }
.lock-note svg { margin-top: 2px; flex: none; color: var(--text-2); }
.co-tag { margin-left: 6px; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--kraft-50); color: var(--on-kraft); border: 1px solid var(--kraft-100); white-space: nowrap; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--ink-50); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; white-space: pre-wrap; word-break: break-all; }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 480px); background: var(--surface); }
.login-art { background: var(--chrome); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art .sign { border: 2px solid rgba(255, 255, 255, .7); border-radius: 14px; padding: 26px 30px; max-width: 460px; }
.login-art .sign h1 { font-size: 40px; line-height: 1.05; }
.login-art .sign p { margin: 12px 0 0; color: rgba(255, 255, 255, .78); font-size: var(--fs-lg); }
.login-art .exit { display: flex; gap: 10px; align-items: center; margin-top: 18px; font-weight: 800; }
.login-art .exit span { background: #fff; color: var(--green-900); border-radius: 6px; padding: 2px 8px; }
.login-form { padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }

@media (max-width: 1100px) {
  .today-grid, .opp-grid, .est-grid, .cal-wrap { grid-template-columns: minmax(0, 1fr); }
  .receipt { position: static; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts > div { border-bottom: 1px solid var(--line-soft); }
  .job-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .searchbox { width: 40px; } .searchbox span, .searchbox kbd { display: none; }
}
@media (max-width: 760px) {
  .page { padding: 16px 16px 60px; }
  .signbar .brand .co, .nav a span.lbl { display: none; }
  .statline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch, .settings, .inv-layout { grid-template-columns: minmax(0, 1fr); }
  .dock, .subnav { position: static; }
  .routebar { grid-template-columns: minmax(0, 1fr); }
  .routebar .trip { text-align: left; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .set-row, .tpl-edit, .radios { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .set-panel > header { flex-direction: column; }
  .login-wrap { grid-template-columns: minmax(0, 1fr); }
  .login-art { display: none; }
  .login-form { padding: 32px 20px; }
  .cal-day { min-height: 74px; padding: 5px; }
  .cal-day .who { display: none; }
  .opp-head { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- settings: import and export ---------- */
.imp-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 4px; }
.imp-steps > li { counter-increment: step; position: relative; padding: 4px 0 18px 44px; border-left: 2px solid var(--line-soft); margin-left: 14px; }
.imp-steps > li:last-child { border-left-color: transparent; padding-bottom: 4px; }
.imp-steps > li::before { content: counter(step); position: absolute; left: -15px; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm); background: var(--surface); border: 2px solid var(--line); color: var(--text-2); }
.imp-steps > li.on::before { border-color: var(--accent); color: var(--accent); }
.imp-steps > li.done::before { content: '✓'; background: var(--accent); border-color: var(--accent); color: #fff; }
.imp-head { margin: 3px 0 10px; }
.imp-head b { display: block; }
.imp-head span { display: block; color: var(--text-2); font-size: var(--fs-sm); max-width: 70ch; }
.imp-map select.input.cell { min-width: 220px; }
.imp-sample { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-prev tr.off td { color: var(--text-3); }
.imp-progress { height: 10px; border-radius: 999px; background: var(--ink-100); overflow: hidden; margin: 4px 0 8px; max-width: 520px; }
.imp-progress i { display: block; height: 100%; background: var(--accent); transition: width .3s ease; }
.imp-list { margin-top: 10px; font-size: var(--fs-sm); }
.imp-list summary { cursor: pointer; font-weight: 700; }
.imp-list ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; max-height: 260px; overflow: auto; }
.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.exp-item { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text); font: inherit; }
.exp-item:hover:not(:disabled) { border-color: var(--accent); }
.exp-item:disabled { opacity: .6; cursor: default; }
.exp-item svg { flex: none; margin-top: 2px; color: var(--text-2); }
.exp-item b { display: block; }
.exp-item small { display: block; color: var(--text-2); font-size: var(--fs-xs); margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .imp-progress i { transition: none; } }

/* settings: connections */
.optset { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); align-self: flex-start; }
.optset button { height: 30px; padding: 0 12px; border: 0; border-radius: 6px; background: none; font-weight: 600; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; }
.optset button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(10, 30, 22, .14); }
.ledger.conn td { vertical-align: middle; }
.ledger.conn .conn-name { width: 140px; }
.ledger.conn .conn-state { width: 160px; }
.ledger.conn .conn-act { width: 1%; white-space: nowrap; text-align: right; }

/* photos and files on a move */
.ph-drop { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border: 1.5px dashed var(--ink-300); border-radius: var(--r-lg); background: var(--surface); margin-bottom: 16px; }
.ph-drop.over { border-color: var(--accent); background: var(--green-50); }
.ph-drop > div { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.ph-group { margin-bottom: 18px; }
.ph-group-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.ph-item { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--ink-100); cursor: pointer; }
.ph-item:hover { border-color: var(--ink-400); }
.ph-item img, .ph-item .ph-wait, .ph-item .ph-missing { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; font-size: var(--fs-xs); font-weight: 700; color: #fff; text-align: left; background: linear-gradient(to top, rgba(8, 20, 15, .72), transparent); }
.ph-doc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 100%; padding: 10px; color: var(--text-2); }
.ph-doc b { font-size: var(--fs-xs); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ph-wait { background: linear-gradient(90deg, var(--ink-100), var(--ink-50), var(--ink-100)); }
.ph-missing { display: grid !important; place-items: center; color: var(--text-3); font-weight: 800; }
.ph-big { background: var(--ink-900); border-radius: var(--r-md); display: grid; place-items: center; min-height: 240px; margin-bottom: 10px; }
.ph-big img { max-width: 100%; max-height: 66vh; object-fit: contain; }
.ledger.conn .btn-row { flex-wrap: nowrap; justify-content: flex-end; }
