/* The office app's own pieces: the day planner (list beside the map), stop rows, the plan comparison, sheets. */
.office { overflow-y: scroll; }
.jr-main { flex: 1; min-height: 0; }
.page.narrow { max-width: 920px; }
.signbar .tools { position: relative; }
.jr-menu { right: 6px; top: 50px; z-index: 150; }
.menu-who { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.menu-who span { font-size: var(--fs-xs); color: var(--text-2); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: 2fr 1fr 1fr auto; align-items: end; }
.jr-sec { margin-bottom: 14px; }
.jr-sec h3 { margin-bottom: 6px; }
.inline-code { font-family: var(--mono); font-size: var(--fs-xs); background: var(--ink-100); padding: 2px 6px; border-radius: 5px; word-break: break-all; }

/* Sign in */
.jr-login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  linear-gradient(90deg, transparent 47px, rgba(255,255,255,.75) 47px, rgba(255,255,255,.75) 53px, transparent 53px) 0 0 / 100px 100px,
  linear-gradient(0deg, transparent 47px, rgba(255,255,255,.75) 47px, rgba(255,255,255,.75) 53px, transparent 53px) 0 0 / 100px 100px, #DCE7FB; }
.jr-login .login-form { width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-pop); border-top: 5px solid var(--route); }
.jr-login .login-form h1 { font-size: var(--fs-xl); }
.jr-login-logo { margin-bottom: 4px; }

/* The planner: the day's list beside the map */
.planner { display: grid; grid-template-columns: minmax(340px, 440px) 1fr; height: calc(100vh - 60px); }
.acct-bar ~ .jr-main .planner { height: calc(100vh - 90px); }
.plan-side { overflow-y: auto; padding: 12px 12px 48px; background: var(--surface-2); border-right: 1px solid var(--line); }
.plan-map { position: relative; min-height: 320px; background: #EEF3FC; }
.map { position: absolute; inset: 0; }
.map-off { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--text-2); text-align: center; }
.plan-date { display: flex; align-items: center; gap: 4px; margin: 0 0 10px; }
.plan-day { display: flex; flex-direction: column; min-width: 0; flex: 1; text-align: center; }
.plan-day b { font-size: var(--fs-lg); }
.plan-day span { font-size: var(--fs-xs); color: var(--text-2); }
.plan-pick { width: 42px; padding: 0 6px; color: transparent; cursor: pointer; }
.plan-pick::-webkit-datetime-edit { display: none; }
.plan-status, .compare { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; margin-bottom: 10px; }
.plan-status p { margin: 0 0 10px; font-size: var(--fs-sm); color: var(--text-2); }
.compare { border: 2px solid var(--route); }
.compare h3 { margin-bottom: 8px; }
.compare table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin-bottom: 8px; }
.compare th { text-align: left; color: var(--text-2); font-weight: 600; padding: 3px 0; }
.compare thead th { font-size: var(--fs-xs); text-align: right; }
.compare td { text-align: right; font-family: var(--mono); padding: 3px 0 3px 10px; white-space: nowrap; }
.compare td.good { color: #1E8E4E; font-weight: 700; }
.compare td.bad { color: var(--red-600); font-weight: 700; }
.compare .warn, .plan-status .warn { color: var(--on-signal); font-size: var(--fs-sm); }
.plan-totals { font-size: var(--fs-sm); color: var(--text-2); margin: 2px 4px 10px; }

.route-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 10px; overflow: hidden; }
.route-card.unassigned { border-style: dashed; }
.route-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.route-head .faint { font-size: var(--fs-xs); }
.route-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; vertical-align: -1px; }
.route-empty { margin: 0; padding: 8px 12px; }
.stop-row { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-soft); padding: 8px 12px; cursor: pointer; color: inherit; font: inherit; }
.stop-row:last-child { border-bottom: 0; }
.stop-row:hover { background: var(--brand-50); }
.stop-row.on { background: var(--brand-100); box-shadow: inset 3px 0 0 var(--route); }
.stop-row .seq { width: 24px; height: 24px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; flex: none; }
.stop-row .seq.off { background: var(--ink-300); }
.stop-row .eta { width: 50px; font-size: var(--fs-sm); color: var(--text-2); flex: none; }
/* Lunch sits between two stops: a quiet line at the same indent as the stop times. */
.lunch-row { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 45px; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-xs); color: var(--text-2); background: var(--surface-2, transparent); }
.lunch-row .eta { width: 50px; flex: none; }
.stop-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stop-main b, .stop-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-main span { font-size: var(--fs-xs); color: var(--text-2); }
.stop-main em { font-style: normal; font-size: var(--fs-xs); }
.warn { color: var(--on-signal); }
.tag.warn { background: var(--signal-100); color: var(--on-signal); }
.lockmark { color: var(--on-brand); display: inline-flex; }
.stop-row.st-done, .stop-row.st-skipped { opacity: .55; }
.pill.st-done { background: var(--ink-100); color: var(--on-ink); }
.pill.st-skipped { background: var(--amber-100); color: var(--on-amber); }
.pill.st-arrived { background: var(--brand-100); color: var(--on-brand); }
.sheet-h { margin: 20px 0 8px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); }
.drawer .check { align-items: flex-start; margin-top: 10px; line-height: 1.4; }

/* Address search */
.addr-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); margin-top: 6px; overflow: hidden; }
.addr-list button { display: flex; gap: 8px; align-items: center; text-align: left; background: var(--surface); border: 0; border-bottom: 1px solid var(--line-soft); padding: 9px 10px; cursor: pointer; font: inherit; color: inherit; }
.addr-list button:hover { background: var(--brand-50); }
.addr-ok { color: #1E7A46; font-size: var(--fs-sm); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0 0; }
.addr p { margin: 6px 0 0; }

/* Trucks and yard */
.yard-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.yard-row > div { flex: 1; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 4px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.svc-list { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-sent { background: #E3F4EA; color: #1E7A46; }
.msg-failed { background: var(--red-100); color: var(--on-red); }
.msg-test, .msg-logged { background: var(--ink-100); color: var(--on-ink); }
.msg-received { background: var(--brand-100); color: var(--on-brand); }

@media (max-width: 900px) {
  .planner { grid-template-columns: 1fr; height: auto; }
  .acct-bar ~ .jr-main .planner { height: auto; }
  .plan-map { order: -1; height: 42vh; position: sticky; top: 60px; z-index: 5; }
  .plan-side { border-right: 0; overflow: visible; }
  .form-grid.three, .form-grid.four { grid-template-columns: 1fr 1fr; }
}
