:root {
  color-scheme: light;
  --ink: #0B1220;
  --muted: #0F172A;
  --line: #E3F0FF;
  --panel: #FFFFFF;
  --panel-soft: #E3F0FF;
  --bg: #F5F8FF;
  --navy: #1976F3;
  --navy-2: #1976F3;
  --teal: #1976F3;
  --teal-soft: #E3F0FF;
  --amber: #c87b13;
  --red: #b63b45;
  --shadow: 0 16px 45px rgba(19, 48, 79, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
/* `overflow-x:hidden` on the root can silently become the scrolling container and break
   position:sticky in Safari/PWA mode. Clip horizontal paint without creating that container. */
html, body { max-width: 100%; overflow-x: clip; overflow-y: visible; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; }
.topbar { position: -webkit-sticky; position: sticky; top: 0; z-index: 40; min-height: 62px; display: flex; align-items: center; gap: 10px; padding: calc(7px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 7px max(18px, env(safe-area-inset-left)); color: #FFFFFF; background: #1976F3; box-shadow: 0 5px 20px rgba(15, 23, 42, .18); transform: translateZ(0); backface-visibility: hidden; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 205px; color:#fff; }
.brand-home { border:0; background:transparent; padding:0; text-align:left; border-radius:10px; }
.brand-home:hover, .brand-home:focus-visible { background:rgba(255,255,255,.12); outline:none; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand strong { display: block; font-size: 17px; white-space:nowrap; }
.brand small { display: block; color: #FFFFFF; opacity: .86; }
.nav { display: flex; flex: 1; gap: 3px; overflow-x: auto; align-items:center; }
.nav button { color: #FFFFFF; border: 0; border-radius: 12px; background: transparent; padding: 7px 9px; white-space: nowrap; display:flex; align-items:center; justify-content:center; gap:7px; }
.nav button:hover, .nav button.active { color: #FFFFFF; background: rgba(255,255,255,.20); box-shadow: inset 0 -3px 0 #FFFFFF; }
.user-menu { display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.account-stack { display:flex; flex-direction:column; align-items:center; gap:2px; }
.account-stack .user-label { font-size:11px; line-height:1.1; opacity:.9; }
.user-menu .notification-button { padding:7px 6px; align-self:center; }
.user-menu button { color: #fff; border: 1px solid rgba(255,255,255,.28); border-radius: 9px; background: transparent; padding: 7px 10px; }
.content { padding: 22px; max-width: 1680px; margin: 0 auto; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.035em; }
.eyebrow { color: var(--teal); font-weight: 800; text-transform: uppercase; letter-spacing: .09em; font-size: 12px; }
.muted { color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.panel-pad { padding: 20px; }
.scheduler-grid { display: grid; grid-template-columns: minmax(480px, 1.35fr) 152px minmax(420px, 1fr); gap: 16px; align-items: start; }
.record-panel { min-height: 700px; }
.mode-row, .tab-row, .filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.seg { border: 1px solid var(--line); background: #f8fafc; color: var(--ink); border-radius: 999px; padding: 9px 14px; }
.seg.active { border-color: var(--navy); background: var(--navy); color: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #0B1220; font-size: 13px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #E3F0FF; border-radius: 9px; padding: 11px 12px; color: var(--ink); background: #FFFFFF; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(25, 118, 243, .18); border-color: #1976F3; }
/* Keeps a checkbox and its label text aligned on one row instead of the browser default, which can
   visually separate them on narrow screens -- e.g. the Commercial Account / Billing same-as-service
   checkboxes. */
.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--ink); font-weight: 600; }
.checkbox input[type="checkbox"] { width: 19px; height: 19px; flex-shrink: 0; margin: 0; accent-color: var(--navy); }
.checkbox { display: flex; align-items: center; gap: 8px; margin: 5px 0 12px; }
.workbook { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.workbook-head, .work-line { display: grid; grid-template-columns: 65px 120px 1fr 100px 105px 40px; gap: 8px; padding: 9px; align-items: center; }
.workbook-head { color: #fff; background: var(--navy); font-size: 12px; font-weight: 800; }
.work-line { border-top: 1px solid var(--line); }
.work-line input { min-width: 0; width: 100%; border: 0; border-bottom: 1px solid #bac6d3; padding: 7px 4px; background: transparent; }
.work-line button { border: 0; color: var(--red); background: transparent; font-size: 20px; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.btn { border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 750; }
.btn-primary { color: #fff; background: var(--navy); }
.btn-primary:hover { background: var(--navy-2); }
.btn-secondary { color: #0F172A; background: #E3F0FF; }
.btn-success { color: #fff; background: var(--teal); }
.btn-danger { color: #fff; background: var(--red); }
.rail { display: grid; gap: 9px; position: -webkit-sticky; position: sticky; top: calc(108px + env(safe-area-inset-top)); }
.rail button { min-height: 64px; border: 1px solid #E3F0FF; border-radius: 13px; background: #FFFFFF; color: #1976F3; font-weight: 800; box-shadow: 0 8px 24px rgba(15, 23, 42, .07); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; text-align:center; }
.rail button:hover { transform: translateY(-1px); border-color: #9db4ca; }
.rail .alert { color: #fff; border: 0; background: linear-gradient(135deg, #cc6f08, #e29b28); animation: glow 1.6s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 0 7px rgba(226,155,40,.16), 0 10px 28px rgba(200,123,19,.2); } }
.calendar { overflow: hidden; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; padding: 17px; border-bottom: 1px solid var(--line); }
.calendar-list { max-height: 780px; overflow: auto; }
.day-group { padding: 13px 15px 6px; color: var(--navy); font-weight: 850; background: #f7f9fc; border-bottom: 1px solid var(--line); }
.job-card { margin: 10px; border: 1px solid var(--line); border-left: 5px solid var(--navy-2); border-radius: 10px; padding: 12px; background: #fff; }
.job-card.completed { border-left-color: var(--teal); opacity: .72; }
.job-card.unassigned { border-left-color: var(--amber); }
.job-card.unread { border-left-color: var(--amber); background: #fffaf0; }
.job-card strong { display: block; }
.job-meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-top: 6px; }
.mini-action { border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; color: var(--navy); background: #fff; font-size: 12px; font-weight: 750; display: inline-flex; align-items: center; min-height: 30px; }
.mini-action.danger { color: var(--red); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 800; text-transform: capitalize; background: #e8eef5; color: var(--navy); }
.badge.green { color: #0c675a; background: var(--teal-soft); }
.badge.amber { color: #855006; background: #fff0d8; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.stat b { display: block; font-size: 25px; color: var(--navy); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 12px 10px; vertical-align: top; }
th { color: #526177; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: #f7f9fc; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-actions button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 7px 9px; }
.mobile-list { display: grid; gap: 14px; max-width: 860px; margin: 0 auto; }
.mobile-job { overflow: hidden; }
.mobile-job summary { list-style: none; padding: 18px; cursor: pointer; }
.mobile-job summary::-webkit-details-marker { display: none; }
.mobile-job[open] summary { border-bottom: 1px solid var(--line); }
.mobile-job-body { padding: 18px; }
.mobile-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 14px; }
.vehicle-check { padding: 17px; border: 2px solid #d6e2ee; background: #f7fbff; border-radius: 14px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 20%, #d8edf0 0, transparent 34%), linear-gradient(135deg, #eff5fa, #dfe9f3); }
.login-card { width: min(460px, 100%); padding: 32px; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.8); border-radius: 22px; box-shadow: 0 24px 70px rgba(16,45,73,.18); }
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 25px; }
.login-brand img { width: 52px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; margin-top: 8px; }
.notice { padding: 12px 14px; border-radius: 10px; color: #0c675a; background: var(--teal-soft); border: 1px solid #b9e1da; }
.error { color: #8e2831; background: #fcebed; border-color: #efc2c7; }
.empty { padding: 38px 20px; text-align: center; color: var(--muted); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: 380px; transform: translateY(120px); opacity: 0; transition: .25s ease; color: #fff; background: #163b5e; border-radius: 11px; padding: 13px 16px; box-shadow: var(--shadow); }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #8e2831; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(8,25,42,.58); }
.modal { width: min(620px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 30px 90px rgba(0,0,0,.28); padding: 22px; }
@media (max-width: 1150px) {
  .scheduler-grid { grid-template-columns: minmax(430px, 1.25fr) 125px minmax(340px, .9fr); }
  .content { padding: 14px; }
}
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; padding: 10px 14px; }
  .brand { min-width: 0; flex: 1; }
  .nav { order: 3; flex-basis: 100%; }
  .account-stack .user-label { display: none; }
  .scheduler-grid { grid-template-columns: 1fr; }
  .rail { position: static; grid-template-columns: repeat(3, 1fr); }
  .record-panel { min-height: 0; }
  .calendar-list { max-height: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .content { padding: 10px; }
  .page-head { align-items: start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .workbook { overflow-x: auto; }
  .workbook-head, .work-line { min-width: 680px; }
  .rail { display: flex; overflow-x: auto; }
  .rail button { min-width: 120px; }
  .stats { grid-template-columns: 1fr 1fr; }
  th, td { padding: 10px 7px; }
}

.clickable-row { cursor: pointer; }
.clickable-row:hover { background: rgba(15, 23, 42, 0.04); }
.job-card[role="button"] { cursor: pointer; }

/* v0.1.32 workflow consolidation: clearer field progression without changing the visual identity. */
.workflow-section { padding: 16px 0; border-top: 1px solid var(--line); }
.workflow-section:first-child { border-top: 0; padding-top: 0; }
.section-kicker { margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.workflow-section h3 { margin-bottom: 8px; }
.workflow-section-request { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.workflow-section-actual { background: #fbfefd; border: 1px solid #cde8e2; border-radius: 12px; padding: 14px; }
.workflow-section-complete { background: var(--teal-soft); border: 1px solid #b8ded6; border-radius: 12px; padding: 14px; }
.work-summary { padding: 10px 12px; border-radius: 10px; margin: 8px 0; background: #fff; border: 1px solid var(--line); }
.requested-work { color: #4f6074; }
.performed-work { border-color: #cde8e2; }
.work-edit-card { border: 1px solid #cde8e2; border-radius: 12px; padding: 13px; margin: 10px 0; background: #fff; }
.field-help { margin: 2px 0 0; font-size: 12px; }
.primary-field-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.primary-field-actions .btn { min-height: 44px; }
.inline-expander { margin-top: 10px; }
.inline-expander > summary { list-style: none; display: inline-block; cursor: pointer; }
.inline-expander > summary::-webkit-details-marker { display: none; }
.expander-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.collection-rule { padding: 10px 12px; border-radius: 10px; margin: 10px 0; }
.collection-rule.collect { background: #fff7e6; color: #7d520d; border: 1px solid #f0d39e; }
.collection-rule.account { background: #eef4fa; color: var(--navy); border: 1px solid #cadbea; }
.btn-danger-soft { color: var(--red); background: #fbecef; border: 1px solid #f1c8cf; }
.btn-danger-soft:hover { background: #f8dde2; }
.action-groups { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px 16px; }
.action-group { display: flex; flex-wrap: wrap; gap: 8px; }
.charge-type-badge { display: inline-flex; margin: 4px 0 2px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #eef3f8; color: #46566a; }
.charge-cancellation_fee, .charge-no_show_fee, .charge-class_no_show { background: #fff0e8; color: #935019; }
.charge-service_call { background: #edf3fb; color: var(--navy); }
.charge-tuition, .charge-class_tuition { background: var(--teal-soft); color: #116c60; }
.admin-wide { grid-column: 1 / -1; }
.policy-service-call { max-width: 320px; margin-bottom: 18px; }
.policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.policy-rule { display: grid; grid-template-columns: minmax(180px, 1fr) 190px 130px; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfd; }
.policy-rule select, .policy-rule input { width: 100%; border: 1px solid #cbd5e1; border-radius: 9px; padding: 10px 11px; background: #fff; }
.policy-summary { margin: 3px 0 0; font-size: 12px; }
.cancellation-modal { max-width: 600px; }
@media (max-width: 700px) {
  .policy-grid { grid-template-columns: 1fr; }
  .policy-rule { grid-template-columns: 1fr; }
  .primary-field-actions { align-items: stretch; }
  .primary-field-actions .btn, .primary-field-actions .nav-control { width: 100%; }
  .action-groups { width: 100%; justify-content: flex-start; }
}

/* v0.1.33 tablet-first scheduler + notebook work surface. */
.scheduler-workspace { padding: 0; overflow: hidden; }
.scheduler-workspace > .eyebrow,
.scheduler-workspace > h2,
.scheduler-workspace > #record-actions,
.scheduler-workspace > .mode-row,
.scheduler-workspace > .tab-row { margin-left: 20px; margin-right: 20px; }
.scheduler-workspace > .eyebrow { margin-top: 20px; }
.scheduler-section { margin: 0; padding: 22px 20px 24px; border-top: 1px solid var(--line); scroll-margin-top: 86px; }
.scheduler-section:first-of-type { border-top: 0; }
.scheduler-section-customer { background: #fff; }
.scheduler-section-work { background: #f7fafc; }
.scheduler-section-assignment { background: #fff; }
.scheduler-section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 16px; }
.scheduler-section-heading h3 { margin: 0 0 4px; font-size: 20px; color: var(--navy); }
.scheduler-section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.notebook-workbook { grid-column: 1 / -1; border: 1px solid #bdcad7; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.notebook-workbook .workbook-head { background: #1976F3; }
.notebook-workbook .work-line { min-height: 45px; padding-top: 6px; padding-bottom: 6px; background: #fff; }
.notebook-workbook .work-line.is-blank { background: linear-gradient(to bottom, #fff, #fcfdff); }
.notebook-workbook .work-line:focus-within { background: #f1f7fc; box-shadow: inset 4px 0 0 var(--navy-2); }
.notebook-workbook .work-line input { font-size: 15px; }
.notebook-workbook .work-line.is-blank .remove-work-row { opacity: .18; }
.notebook-hint { padding: 9px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; background: #f4f7fa; }
.scheduler-finish-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.scheduler-finish-actions .btn { min-height: 46px; }
.scheduler-reset-note { margin: 10px 0 0; text-align: right; font-size: 12px; }

/* Technician Actual Work uses the same open-notebook idea without exposing admin tools. */
.tech-notebook { overflow-x: auto; border: 1px solid #bfded7; border-radius: 12px; background: #fff; }
.tech-notebook-head,
.notebook-work-row { display: grid; grid-template-columns: 155px 64px 90px minmax(190px,1fr) 90px 90px 58px 34px; gap: 6px; align-items: center; min-width: 810px; padding: 7px; }
.tech-notebook-head { background: #1976F3; color: #fff; font-size: 11px; font-weight: 800; }
.notebook-work-row { margin: 0; border-top: 1px solid #d9e8e4; }
.notebook-work-row:first-of-type { border-top: 0; }
.notebook-work-row:focus-within { background: #f1fbf8; box-shadow: inset 4px 0 0 var(--teal); }
.notebook-work-row input,
.notebook-work-row select { min-width: 0; width: 100%; border: 0; border-bottom: 1px solid #b9c9c5; border-radius: 0; padding: 8px 4px; background: transparent; color: var(--ink); }
.notebook-work-row .notebook-save { justify-content: center; }
.notebook-row-spacer { width: 24px; }

/* Touch devices should invoke the browser/OS keyboard, not a custom ServeIn keyboard. */
@media (pointer: coarse) {
  .field input, .field select, .field textarea,
  .work-line input, .notebook-work-row input, .notebook-work-row select { font-size: 16px; min-height: 44px; }
  .btn, .seg, .mini-action, .rail button { min-height: 44px; }
}

/* Tablet landscape: prioritize the scheduler work surface; calendar becomes a full-width context row. */
@media (max-width: 1180px) and (min-width: 901px) {
  .scheduler-grid { grid-template-columns: minmax(0, 1fr) 145px; }
  .scheduler-grid > .calendar { grid-column: 1 / -1; }
  .record-panel { min-width: 0; }
  .rail { top: 82px; }
}

@media (max-width: 700px) {
  .scheduler-section { padding: 18px 14px 20px; }
  .scheduler-workspace > .eyebrow,
  .scheduler-workspace > h2,
  .scheduler-workspace > #record-actions,
  .scheduler-workspace > .mode-row,
  .scheduler-workspace > .tab-row { margin-left: 14px; margin-right: 14px; }
  .scheduler-section-heading { align-items: start; }
  .scheduler-finish-actions { display: grid; grid-template-columns: 1fr; }
  .scheduler-finish-actions .btn { width: 100%; }
  .scheduler-reset-note { text-align: left; }
  .notebook-workbook { overflow-x: auto; }
  .notebook-workbook .workbook-head,
  .notebook-workbook .work-line { min-width: 700px; }

  .tech-notebook { overflow: visible; border: 0; background: transparent; }
  .tech-notebook-head { display: none; }
  .notebook-work-row { min-width: 0; grid-template-columns: 90px minmax(0,1fr) minmax(0,1fr); padding: 10px 8px; border: 1px solid #d9e8e4; border-radius: 10px; margin: 8px 0; background: #fff; }
  .notebook-work-row .notebook-catalog { grid-column: 1 / -1; }
  .notebook-work-row input[name="quantity"] { grid-column: 1; }
  .notebook-work-row input[name="itemCode"] { grid-column: 2 / -1; }
  .notebook-work-row input[name="description"] { grid-column: 1 / -1; }
  .notebook-work-row input[name="variant"] { grid-column: 1 / 3; }
  .notebook-work-row input[name="unitPrice"] { grid-column: 3; }
  .notebook-work-row .notebook-save { grid-column: 1 / 3; }
  .notebook-work-row .notebook-remove,
  .notebook-work-row .notebook-row-spacer { grid-column: 3; justify-self: stretch; }
}

/* v0.1.35 technician stabilization: job-first field workspace + server-backed time/workforce. */
.tech-head-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tech-head-actions .badge { border:1px solid var(--line); cursor:pointer; min-height:34px; }
.tech-job-order { position:relative; }
.tech-order-label { display:inline-block; margin:0 0 -3px 12px; padding:4px 8px; border-radius:8px 8px 0 0; background:var(--navy); color:#fff; font-size:10px; font-weight:900; letter-spacing:.08em; }
.tech-job-order:first-child .mobile-job { box-shadow:0 12px 34px rgba(19,48,79,.11); border-color:#aebfd0; }
.calendar-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.calendar-toolbar > div { display:flex; gap:7px; flex-wrap:wrap; }
.time-card-panel { display:grid; grid-template-columns:minmax(220px,1fr) auto; align-items:center; gap:18px; margin-bottom:16px; }
.time-status { display:grid; gap:4px; }
.time-status span { color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.07em; }
.time-status strong { font-size:28px; color:var(--navy); }
.time-status.clocked_in strong { color:#0c675a; }
.time-status.on_break strong { color:#855006; }
.time-status small { color:var(--muted); }
.time-actions { display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.time-primary { min-width:150px; min-height:52px; font-size:16px; }
.time-event { display:flex; justify-content:space-between; gap:12px; padding:11px 0; border-top:1px solid var(--line); }
.time-event:first-of-type { border-top:0; }
.workforce-person { display:flex; justify-content:space-between; gap:18px; align-items:center; padding:13px 0; border-top:1px solid var(--line); }
.workforce-person:first-of-type { border-top:0; }
.workforce-person > div:first-child { display:grid; gap:3px; }
.workforce-person > div:first-child span { color:var(--muted); font-size:12px; }
.workforce-state { display:flex; align-items:center; gap:9px; flex-wrap:wrap; justify-content:flex-end; }
@media (max-width:600px) {
  .time-card-panel { grid-template-columns:1fr; }
  .time-actions { justify-content:stretch; }
  .time-actions .btn { flex:1; }
  .workforce-person { align-items:flex-start; flex-direction:column; }
  .workforce-state { justify-content:flex-start; }
}

/* v0.1.40 UI cleanup: permission-led visibility, service modes, and focused field work. */
.capability-box { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.capability-box > strong { color: var(--navy); }
.permission-explainer { margin: 12px 0 16px; }
.permission-groups { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.permission-group { border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px 6px; background: #fbfcfe; }
.permission-group h3 { margin-bottom: 8px; color: var(--navy); font-size: 14px; }
.permission-choice { align-items: flex-start; padding: 5px 0; margin: 0 0 4px; }
.permissions-modal { width: min(780px, 100%); }
.sticky-modal-actions { position: sticky; bottom: -22px; padding: 14px 0 2px; background: linear-gradient(to top, #fff 78%, rgba(255,255,255,0)); }
.tech-job-brief { display: grid; grid-template-columns: 1fr 1.5fr .65fr; gap: 10px; margin-bottom: 12px; }
.tech-brief-item { display: grid; gap: 4px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; }
.tech-brief-item span { color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.tech-brief-item strong { overflow-wrap: anywhere; }
.technician-focus-card[open] { border-color: #9fb9cf; box-shadow: 0 18px 42px rgba(19,48,79,.12); }
.compact-expander { margin: 8px 0 12px; }
@media (max-width: 1180px) { .nav { overflow-x: visible; flex-wrap: wrap; } .nav button { padding: 9px 11px; } }
@media (max-width: 760px) { .topbar { gap: 9px; } .brand small { display: none; } .nav { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); width: 100%; gap: 5px; } .nav button { width: 100%; white-space: normal; text-align: center; min-height: 42px; } .user-menu { margin-left: auto; } .permission-groups { grid-template-columns: 1fr; } .tech-job-brief { grid-template-columns: 1fr; } .mobile-job summary { padding: 15px; } .mobile-job-body { padding: 14px; } }

/* v0.1.41 — job photos and attachments */
.attachment-modal{max-width:980px;width:min(980px,94vw);max-height:90vh;overflow:auto}
.attachment-uploader{border:1px dashed var(--line,#d7dee8);border-radius:14px;padding:14px;margin:14px 0;background:rgba(255,255,255,.65)}
.attachment-uploader.compact{margin-top:12px}
.attachment-input-label{cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.attachment-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;margin-top:10px}
.attachment-card{border:1px solid var(--line,#d7dee8);border-radius:14px;overflow:hidden;background:#fff;min-width:0}
.attachment-preview{display:block;aspect-ratio:4/3;background:#eef2f6;overflow:hidden}
.attachment-preview img{display:block;width:100%;height:100%;object-fit:cover}
.attachment-file-icon{display:flex;aspect-ratio:4/3;align-items:center;justify-content:center;text-decoration:none;font-weight:800;letter-spacing:.08em;background:#eef2f6;color:inherit}
.attachment-info{padding:12px;display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
.attachment-info strong{max-width:100%;overflow-wrap:anywhere}
.attachment-info p{margin:0;overflow-wrap:anywhere}
.attachment-info small{color:var(--muted,#667085);line-height:1.4}
.intake-attachment{padding:12px 0;border-bottom:1px solid var(--line,#d7dee8)}
.assign-attachment-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;margin-top:10px}
.technician-attachments .attachment-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
@media(max-width:640px){.attachment-grid,.technician-attachments .attachment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.assign-attachment-row{grid-template-columns:1fr}.attachment-info{padding:9px}.attachment-uploader .actions{display:grid;grid-template-columns:1fr}.attachment-uploader .btn{width:100%}}

/* v0.1.44 signed updater */
.update-status-card{border:1px solid var(--line);border-radius:14px;padding:14px;margin:12px 0;background:var(--panel-soft,#f7f9fc)}
.update-status-card .job-meta{margin-bottom:8px}.update-review{margin:14px 0}.update-error{font-weight:700;color:#9b1c1c}

/* v0.1.46 — approved ServeIn blue identity and separate business/employee workspaces. */
.ui-icon,.nav-icon{width:24px;height:24px;display:block;flex:0 0 auto}
.nav-icon{width:20px;height:20px}
.notification-button{position:relative;padding:8px!important}
.notification-button .ui-icon{width:21px;height:21px}
.notification-button #notif-count{display:none;position:absolute;top:-7px;right:-7px;border-radius:10px;padding:0 5px}
.notification-button #notif-count:not([hidden]){display:inline-flex}
.shell,.content{min-width:0;max-width:100%}
.muted{color:#0F172A;opacity:.72}
.eyebrow{color:#1976F3}
.panel,.job-card,.stat,.attachment-card{background:#FFFFFF;border-color:#E3F0FF}
.seg{background:#E3F0FF;border-color:#E3F0FF;color:#0B1220}
.seg.active{background:#1976F3;border-color:#1976F3;color:#FFFFFF}
.day-group,.scheduler-section-work,.workflow-section-request,.capability-box,.permission-group,.tech-brief-item,.update-status-card{background:#F5F8FF;border-color:#E3F0FF}
.calendar-head,.time-event,.workforce-person,th,td{border-color:#E3F0FF}
th{background:#E3F0FF;color:#0B1220}
.badge{background:#E3F0FF;color:#0F172A}
.toast{background:#0F172A}

.employee-workspace .topbar{flex-wrap:wrap;gap:10px 16px}
.employee-workspace .brand{flex:1}
.employee-workspace .nav{order:3;flex:0 0 100%;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;overflow:visible;background:#FFFFFF;border-radius:16px 16px 0 0;padding:8px 10px 0}
.employee-workspace .nav button{min-width:0;min-height:74px;display:flex;flex-direction:column;gap:5px;color:#0F172A;border-radius:12px 12px 0 0;padding:8px 4px;white-space:normal;text-align:center;font-size:13px}
.employee-workspace .nav button:hover,.employee-workspace .nav button.active{color:#1976F3;background:#F5F8FF;box-shadow:inset 0 -4px 0 #1976F3}
.employee-workspace .nav-icon{width:28px;height:28px}
.business-workspace .topbar{min-height:96px}
.business-workspace .nav{display:grid;grid-template-columns:repeat(7,minmax(68px,1fr));gap:2px;overflow:visible;align-self:stretch}
.business-workspace .nav button{min-width:0;min-height:72px;display:grid;grid-template-rows:25px minmax(2.24em,auto);align-content:center;justify-items:center;gap:6px;padding:7px 2px;white-space:normal;text-align:center;line-height:1.12}
.business-workspace .nav-icon{width:25px;height:25px}
.technician-page-head{margin-bottom:14px}
.tech-quick-actions{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 22px}
.tech-quick-card{height:104px;min-width:0;border:1px solid #E3F0FF;border-radius:16px;background:#E3F0FF;color:#1976F3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;font-weight:800;font-size:16px;box-shadow:0 9px 24px rgba(15,23,42,.07)}
.tech-quick-card .ui-icon{width:31px;height:31px}
.tech-quick-card.green,.tech-quick-card.amber{border-radius:16px}

.lookup-modal{width:min(1180px,96vw);max-height:92vh;padding:22px;overflow:auto;overscroll-behavior:contain}
.lookup-heading{position:sticky;top:-22px;z-index:3;padding:18px 0 12px;background:#FFFFFF}
.lookup-grid{display:grid;grid-template-columns:minmax(270px,360px) minmax(0,1fr);gap:16px;align-items:start}
.lookup-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-bottom:12px}
.lookup-search-row input{width:100%;min-height:44px;border:1px solid #E3F0FF;border-radius:10px;padding:10px 12px;color:#0B1220}
.lookup-list>#new-customer{width:100%;margin-bottom:12px}
.workforce-modal,.fleet-modal{width:min(820px,96vw)}

@media(max-width:900px){
  .business-workspace .nav{order:3;flex:0 0 100%;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
  .business-workspace .nav button{min-height:66px}
  .lookup-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  .employee-workspace .topbar{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
  .employee-workspace .brand strong{font-size:22px}
  .employee-workspace .user-menu .user-label{display:none}
  .employee-workspace .nav{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding-left:2px;padding-right:2px}
  .employee-workspace .nav button{font-size:11.5px;line-height:1.15;padding:7px 1px;min-height:68px}
  .employee-workspace .nav-icon{width:25px;height:25px}
  .tech-quick-actions{gap:9px}
  .tech-quick-card{height:94px;padding:8px;font-size:13px;border-radius:14px}
  .tech-quick-card.green,.tech-quick-card.amber{border-radius:14px}
  .lookup-modal{width:100%;height:100%;max-height:100%;border-radius:0;padding:16px}
  .lookup-heading{top:-16px;padding-top:10px}
}
@media(max-width:430px){
  .employee-workspace .brand small{display:none}
  .employee-workspace .brand img{width:36px;height:36px}
  .employee-workspace .brand strong{font-size:19px}
  .employee-workspace .user-menu{gap:5px}
  .employee-workspace .user-menu button{padding:7px 8px}
  .employee-workspace .nav button{font-size:10.5px}
  .employee-workspace .nav-icon{width:23px;height:23px}
  .tech-quick-actions{gap:7px}
  .tech-quick-card{height:86px;font-size:12px}
  .tech-quick-card .ui-icon{width:27px;height:27px}
}
@media(orientation:landscape) and (max-height:520px){
  .employee-workspace .topbar{position:sticky;padding-top:max(6px,env(safe-area-inset-top));padding-bottom:5px}
  .employee-workspace .nav button{min-height:56px;flex-direction:row}
  .employee-workspace .nav-icon{width:22px;height:22px}
  .tech-quick-card{height:76px;flex-direction:row}
}
.hours-grid{display:grid;gap:8px;margin-top:10px}.hours-row{display:grid;grid-template-columns:minmax(130px,1fr) 110px auto 110px;gap:8px;align-items:center}.hours-row input[type=time]{width:100%}@media(max-width:620px){.hours-row{grid-template-columns:1fr 1fr}.hours-row span{display:none}}
