:root{
  --bg:#eef3f8;
  --surface:#ffffff;
  --surface-2:#f7fafc;
  --border:#d8e1ea;
  --text:#17212b;
  --muted:#66798b;
  --brand:#234f6d;
  --brand-2:#365f7c;
  --ok:#1f7a44;
  --warn:#b2640a;
  --danger:#9f3131;
  --shadow:0 12px 30px rgba(20,34,47,.08);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:Inter, Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
}

.shell{
  min-height:100vh;
  display:grid;
  grid-template-rows:auto 1fr auto;
}

.app-header{
  position:sticky;
  top:0;
  z-index:10;
  background:#ffffff;
  border-bottom:1px solid var(--border);
  padding:8px 14px;
  box-shadow:0 8px 24px rgba(20,34,47,.06);
}

.app-header-shell{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(220px, 340px) minmax(280px, 1fr) auto;
  gap:12px;
  align-items:center;
}

.content{
  padding:16px;
  display:grid;
  align-content:start;
  gap:14px;
}

.flow-login-screen{
  display:none;
}

body[data-login-mode="flow"]{
  background:#dbe6f2;
}

body[data-login-mode="flow"] .app-header,
body[data-login-mode="flow"] .view-switcher,
body[data-login-mode="flow"] .card,
body[data-login-mode="flow"] .feedback-fab,
body[data-login-mode="flow"] .app-footer,
body[data-login-mode="flow"] #globalBanner,
body[data-login-mode="flow"] .sr-only{
  display:none !important;
}

body[data-login-mode="flow"] .content{
  min-height:100vh;
  padding:0;
  display:block;
}

body[data-login-mode="flow"] .flow-login-screen{
  position:relative;
  isolation:isolate;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:24px;
  padding:40px 24px 48px;
  background:
    linear-gradient(135deg, rgba(247, 250, 255, .18), rgba(18, 43, 70, .22)),
    url("/assets/flow-login-bg.png") center center / cover no-repeat;
}

body[data-login-mode="flow"] .flow-login-screen::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 22% 22%, rgba(255,255,255,.46), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, rgba(10, 26, 43, .08), rgba(10, 26, 43, .18));
  z-index:0;
}

.flow-login-screen__panel{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:1 1 auto;
}

.flow-login-screen__button{
  border:1px solid rgba(255,255,255,.52);
  min-width:220px;
  min-height:54px;
  padding:14px 28px;
  border-radius:18px;
  font-size:18px;
  font-weight:800;
  color:#f7fbff;
  background:linear-gradient(180deg, rgba(47,87,118,.96), rgba(29,56,81,.96));
  box-shadow:0 18px 42px rgba(17,33,49,.24);
  backdrop-filter:blur(10px);
}

.flow-login-screen__button:hover{
  background:linear-gradient(180deg, rgba(56,100,134,.98), rgba(34,65,94,.98));
  transform:translateY(-1px);
}

.flow-login-screen__button:focus-visible{
  outline:3px solid rgba(255,255,255,.78);
  outline-offset:4px;
}

.flow-login-screen__footer{
  position:relative;
  z-index:1;
  width:min(100%, 720px);
  margin-top:auto;
  padding:18px 24px;
  color:#36516a;
  font-size:13px;
  line-height:1.6;
  text-align:center;
  border:1px solid rgba(255,255,255,.42);
  border-radius:22px;
  background:rgba(248, 252, 255, .38);
  box-shadow:0 16px 40px rgba(17,33,49,.10);
  backdrop-filter:blur(14px);
}

.feedback-fab{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:120;
  border:1px solid #b98a00;
  border-radius:999px;
  padding:10px 14px;
  min-height:40px;
  background:#f4c300;
  color:#2d2200;
  font-size:14px;
  font-weight:800;
  box-shadow:0 10px 24px rgba(45,34,0,.18);
}

.feedback-fab[data-feedback-badge]::after{
  content:attr(data-feedback-badge);
  position:absolute;
  top:-8px;
  right:-6px;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#9f3131;
  color:#fff;
  font-size:11px;
  font-weight:800;
  box-shadow:0 6px 14px rgba(159,49,49,.28);
}

.feedback-fab.hidden{
  display:none;
}

.onboarding-overlay{
  position:fixed;
  inset:0;
  z-index:240;
  pointer-events:none;
}

.onboarding-overlay.hidden{
  display:none;
}

.onboarding-backdrop{
  position:absolute;
  inset:0;
  background:rgba(17,29,40,.48);
}

.onboarding-card{
  position:fixed;
  top:96px;
  left:16px;
  width:min(380px, calc(100vw - 32px));
  padding:18px;
  border-radius:20px;
  border:1px solid rgba(215,225,235,.9);
  background:#fff;
  box-shadow:0 24px 64px rgba(16,27,37,.24);
  pointer-events:auto;
}

.onboarding-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}

.onboarding-close{
  min-width:40px;
  min-height:40px;
  padding:0;
  display:grid;
  place-items:center;
  border-radius:12px;
  font-size:22px;
  line-height:1;
}

.onboarding-card h3{
  margin:0 0 8px;
  font-size:28px;
  line-height:1.1;
}

.onboarding-card p{
  margin:0;
}

.onboarding-card .eyebrow{
  margin-bottom:10px;
}

.onboarding-card .muted{
  margin-top:10px;
}

.onboarding-actions{
  margin-top:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.onboarding-actions-main{
  display:flex;
  gap:8px;
}

.onboarding-target-active{
  position:relative;
  z-index:241 !important;
  border-radius:18px;
  box-shadow:0 0 0 4px rgba(255,255,255,.96), 0 0 0 8px rgba(35,79,109,.4), 0 18px 48px rgba(17,29,40,.22);
  scroll-margin-top:120px;
}

.onboarding-target-active.field,
.onboarding-target-active.compact-field{
  background:rgba(255,255,255,.98);
}

.view-switcher{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

#moduleOnboardingBtn{
  margin-left:auto;
}

.header-search{
  min-width:0;
  display:flex;
  align-items:center;
}

.header-search-input{
  width:100%;
  min-width:0;
  min-height:42px;
  padding:10px 16px;
  border:1px solid #d7e1eb;
  border-radius:16px;
  background:#fbfdff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95);
  font-size:15px;
}

.header-search-input::placeholder{
  color:#8195a8;
  font-weight:600;
}

.auth-topbar{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:flex-end;
  min-width:0;
  width:100%;
  max-width:none;
  justify-self:end;
  flex-wrap:nowrap;
}

.header-toggle,
.easy-mode-toggle{
  white-space:nowrap;
  min-height:42px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid #d4deea;
  background:#f8fbfe;
  color:#3f5d74;
  font-size:14px;
  font-weight:800;
}

.header-toggle.is-active,
.easy-mode-toggle.is-active{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
}

.tenant-switcher{
  flex:0 0 124px;
  min-width:124px;
}

.header-select{
  min-width:124px;
  min-height:42px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid #d7e1eb;
  background:#fff;
  font-size:15px;
  font-weight:700;
}

.compact-field{
  min-width:0;
}

.compact-field span{
  font-size:11px;
  line-height:1;
}

.filters-bar{
  display:grid;
  grid-template-columns:220px minmax(220px, 1fr);
  gap:14px;
  margin-bottom:18px;
}

.brand{
  display:flex;
  gap:16px;
  align-items:center;
}

.brand-button{
  width:auto;
  max-width:320px;
  min-width:0;
  padding:0;
  background:transparent;
  border:0;
  border-radius:14px;
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  align-items:center;
  justify-content:flex-start;
  column-gap:12px;
  justify-self:start;
  overflow:hidden;
}

.brand-button:hover{
  transform:none;
  opacity:.92;
}

.brand-mark{
  width:68px;
  min-width:68px;
  max-width:68px;
  height:36px;
  padding:0 12px;
  border-radius:12px;
  background:#fff;
  border:1px solid #e3e8ef;
  color:#d39a00;
  display:grid;
  place-items:center;
  font-weight:800;
  letter-spacing:.06em;
  overflow:hidden;
  flex:0 0 auto;
}

.brand-mark.has-logo{
  width:96px;
  min-width:96px;
  max-width:96px;
  height:36px;
  padding:0;
  background:#fff;
  border:1px solid #e3e8ef;
  border-radius:12px;
  box-shadow:none;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.brand-mark img{
  width:auto;
  max-width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  display:block;
}

.brand-copy{
  display:grid;
  gap:1px;
  min-width:0;
  align-content:center;
}

.brand h1{
  margin:0;
  font-size:17px;
  line-height:1.05;
  letter-spacing:.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.brand p{
  display:none;
}

.version-badge{
  display:inline-flex;
  align-items:center;
  padding:5px 9px;
  border-radius:999px;
  background:#eaf0f5;
  border:1px solid var(--border);
  color:var(--brand);
  font-size:10px;
  font-weight:800;
  letter-spacing:.04em;
  white-space:nowrap;
}

.app-footer{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  padding:10px 18px 16px;
}

.footer-version{
  background:rgba(234,240,245,.82);
  color:var(--muted);
  border-color:#dbe4ec;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0, 0, 0, 0);
  white-space:nowrap;
  border:0;
}

.auth-compact{
  display:flex;
  align-items:center;
  gap:8px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:6px 8px 6px 10px;
  box-shadow:0 8px 18px rgba(20,34,47,.06);
  min-width:0;
  flex:1 1 auto;
  max-width:100%;
}

.icon-button{
  width:34px;
  height:34px;
  padding:0;
  display:grid;
  place-items:center;
  border-radius:10px;
  font-size:16px;
}

.auth-compact-copy{
  display:grid;
  gap:2px;
  min-width:0;
}

.auth-compact-name{
  font-weight:800;
  font-size:14px;
  line-height:1.1;
}

.auth-compact-meta{
  color:var(--muted);
  font-size:11px;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.app-header .primary,
.app-header .ghost{
  min-height:42px;
  padding:10px 14px;
  border-radius:14px;
}

.app-header #authState .primary,
.app-header #authState .ghost{
  min-height:38px;
  padding:9px 12px;
}

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:14px;
}

.order-focus-card{
  border-color:#9dc0db;
  box-shadow:0 16px 34px rgba(35,79,109,.12);
}

.order-details-card{
  padding-bottom:10px;
}

.order-details-card .grid.two{
  gap:10px;
}

.order-details-card .field span{
  font-size:12px;
}

.order-details-card textarea{
  min-height:96px;
}

.order-focus-card.is-readonly{
  background:linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.order-focus-card.is-readonly input:disabled,
.order-focus-card.is-readonly select:disabled,
.order-focus-card.is-readonly textarea:disabled{
  background:#f7fafd;
  color:var(--text);
  opacity:1;
  cursor:default;
  border-color:#dce6ef;
}

.order-focus-card.is-readonly textarea:disabled{
  resize:none;
}

.order-focus-card.is-readonly .field-helper,
.order-focus-card.is-readonly #orderClientLookupInput,
.order-focus-card.is-readonly #orderClientLookupResults,
.order-focus-card.is-readonly .twin-action-row,
.order-focus-card.is-readonly #importHubspotBtn{
  display:none;
}

.order-focus-card.is-readonly .field-action-row{
  grid-template-columns:minmax(0,1fr);
}

.order-field-hidden{
  display:none !important;
}

.order-section-hidden{
  display:none !important;
}

.order-readonly-toggle{
  min-width:164px;
}

.hero{
  min-height:150px;
  display:grid;
  align-content:center;
  gap:10px;
}

.hero h2{
  margin:0;
  font-size:30px;
}

.muted{
  color:var(--muted);
}

.audit-trail{
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
}

.audit-trail strong{
  color:var(--text);
}

.hidden{display:none !important}
.stack{display:grid}
.gap-sm{gap:10px}
.gap-md{gap:12px}
.gap-lg{gap:14px}

.banner{
  padding:14px 18px;
  border-radius:14px;
  font-weight:700;
  background:#e7f4ed;
  color:var(--ok);
  border:1px solid #bfdcc8;
}

.modal-banner{
  margin-bottom:14px;
  position:sticky;
  top:0;
  z-index:8;
  box-shadow:0 10px 24px rgba(16,30,43,.08);
}

.modal input:disabled,
.modal select:disabled,
.modal textarea:disabled{
  background:#f1f5f9;
  color:#8a98a8;
  border-color:#d7e0e8;
  cursor:not-allowed;
  opacity:1;
}

.schedule-mode-toggle{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}

.admin-inline-picker{
  max-height:260px;
}

.dispatch-block-items-manager{
  display:grid;
  gap:10px;
}

.dispatch-block-map-host{
  display:grid;
  gap:10px;
}

.dispatch-block-item-card{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  align-items:start;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-2);
}

.dispatch-block-item-copy{
  min-width:0;
  display:grid;
  gap:4px;
}
.dispatch-route-summary{
  display:grid;
  gap:2px;
  margin-top:4px;
  font-size:11px;
  color:#5f7388;
}
.dispatch-route-overflow{
  color:#b2640a;
  font-weight:700;
}

.dispatch-block-item-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}

.dispatch-block-item-move-select{
  min-width:170px;
}

.inline-editor-row{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  align-items:end;
}

.dispatch-block-notes-log{
  display:grid;
  gap:8px;
  margin-top:10px;
}

.dispatch-block-note-entry{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fbfdff;
  font-size:12px;
  line-height:1.45;
}

.banner.error{
  background:#f8e9e9;
  color:var(--danger);
  border-color:#e5c0c0;
}
.banner.warn{
  background:#fff4e7;
  color:var(--warn);
  border-color:#efcfaa;
}

.panel-head,.section-head{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:10px;
}

.workbench-head{
  align-items:center;
  gap:16px;
}

.workbench-head > div:first-child{
  min-width:0;
}

.section-head h2,.section-head h3,.panel-head h2{
  margin:0;
}

.eyebrow{
  margin:0 0 6px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}

.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.label-action-btn{
  min-height:34px;
  padding:7px 12px;
  border-radius:12px;
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}

.head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.view-toggle-group{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  padding:4px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface-2);
}

.view-toggle-group .primary,
.view-toggle-group .ghost{
  min-height:36px;
  padding:8px 12px;
  border-radius:10px;
}

.summary-row{
  margin-top:6px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.document-feed-links{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:6px;
}

.document-feed-links a{
  font-size:13px;
  font-weight:700;
}

.scope-pills{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.quick-order-actions{
  margin-top:8px;
}

.order-side-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.kanban-board{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(200px, 232px);
  gap:10px;
  overflow-x:auto;
  padding-bottom:4px;
}

.kanban-column{
  min-height:180px;
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:18px;
  padding:10px;
  display:grid;
  align-content:start;
  gap:8px;
}

.kanban-column-compact{
  width:170px;
  min-width:170px;
}

.kanban-column.drag-target{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.15);
}

.kanban-column-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.kanban-column-title{
  font-size:14px;
  font-weight:800;
}

.kanban-list{
  display:grid;
  gap:7px;
}

.order-kanban-card{
  width:100%;
  text-align:left;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  box-shadow:var(--shadow);
  cursor:grab;
}

.order-kanban-card.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.15);
}

.order-kanban-card.dragging{
  opacity:.55;
  transform:rotate(1deg);
}

.order-kanban-card strong{
  display:block;
  margin-bottom:2px;
  font-size:14px;
}

.order-kanban-meta{
  display:grid;
  gap:2px;
  color:var(--muted);
  font-size:11px;
}

.deadline-chip{
  display:inline-flex;
  align-items:center;
  width:max-content;
  border-radius:999px;
  padding:3px 8px;
  font-size:11px;
  font-weight:800;
  background:#eef4f8;
  color:var(--brand);
}

.deadline-chip.warning,
.deadline-text.warning{
  background:#fff1de;
  color:#a25c00;
}

.deadline-chip.danger,
.deadline-text.danger{
  background:#fae8e8;
  color:var(--danger);
}

.task-kanban-card{
  width:100%;
  text-align:left;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  box-shadow:var(--shadow);
  cursor:grab;
}

.task-kanban-card.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.15);
}

.task-kanban-card.dragging{
  opacity:.55;
  transform:rotate(1deg);
}

.task-kanban-card strong{
  display:block;
  margin-bottom:3px;
  font-size:14px;
}

.task-kanban-meta{
  display:grid;
  gap:3px;
  color:var(--muted);
  font-size:11px;
}

.task-table-row{
  width:100%;
  text-align:left;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
  display:grid;
  grid-template-columns:28px minmax(180px, 220px) minmax(150px, 180px) minmax(150px, 1fr) minmax(120px, 150px) minmax(140px, 180px) auto;
  gap:10px;
  align-items:center;
}

.task-table-row.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.15);
}

.task-card-summary{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:6px;
}

.task-card-note{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}

.note-log-entry{
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  font-size:12px;
  color:var(--text);
}

.task-workbench-summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.tasks-filters-bar,
.tasks-bulk-bar{
  display:grid;
  gap:8px;
  align-items:end;
  margin-bottom:10px;
}

.tasks-filters-bar{
  grid-template-columns:repeat(6, minmax(130px, 1fr));
}

.dispatch-nav{
  display:flex;
  gap:8px;
  align-items:end;
  flex-wrap:wrap;
}

.actions-inline{
  display:flex;
  gap:6px;
  align-items:center;
}

.dispatch-day-jump{
  padding:4px 8px;
}

.quick-places{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:-4px;
}

.quick-place-button{
  border-radius:999px;
}

.dispatch-timeline-item.is-done,
.dispatch-item-done{
  border-color:#8dc7a2;
  background:#f1fbf4;
}

.dispatch-timeline-item.is-open,
.dispatch-item-open{
  border-color:#f0c27b;
  background:#fff9ef;
}

.tasks-bulk-bar{
  grid-template-columns:minmax(120px, auto) auto minmax(150px, 1fr) auto auto minmax(150px, 1fr) auto auto;
  padding:10px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#f7fafc;
}

.tasks-filters-bar .field,
.tasks-bulk-bar .field{
  margin:0;
}

.clients-pagination-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.clients-pagination-controls{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

.clients-pagination-chip{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid #dce6ef;
  background:#f7fafc;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

.dispatch-map-layout{
  display:grid;
  grid-template-columns:320px minmax(0, 1fr);
  gap:12px;
}

.dispatch-map-toolbar{
  grid-column:1 / -1;
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
}

.dispatch-map-toolbar-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(180px, 220px));
  gap:10px;
  align-items:end;
}

.dispatch-day-layout{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 276px;
  gap:2px;
  align-items:start;
}

.dispatch-pool-card{
  position:sticky;
  top:8px;
}

.dispatch-pool-filters{
  grid-template-columns:1fr;
  gap:4px;
  margin-bottom:4px;
}

.dispatch-pool-filters .field span{
  font-size:10px;
}

.dispatch-pool-filters input,
.dispatch-pool-filters select{
  min-height:32px;
  padding:6px 9px;
}

.dispatch-pool-list{
  max-height:calc(100vh - 300px);
  overflow:auto;
  padding-right:1px;
}

.dispatch-pool-planning-pills{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:4px 0 8px;
}

.dispatch-pool-planning-pills button{
  min-height:30px;
  padding:6px 10px;
  font-size:11px;
}

.dispatch-pool-strip-group{
  display:grid;
  gap:4px;
}

.dispatch-pool-strip-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  font-size:12px;
}

.dispatch-pool-strip-list{
  display:grid;
  gap:4px;
}

.dispatch-pool-item-strip{
  border:1px solid #bfd0df;
  border-radius:8px;
  background:#fff;
  padding:5px 6px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:6px;
  align-items:center;
  cursor:grab;
}

.dispatch-pool-item-strip.is-fully-planned{
  opacity:.76;
}

.dispatch-pool-item-strip strong{
  display:block;
  font-size:11px;
  line-height:1.12;
  margin:0;
}

.dispatch-pool-item-strip-main{
  min-width:0;
}

.dispatch-pool-item-strip-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:6px;
  margin-bottom:2px;
}

.dispatch-pool-item-strip-meta{
  display:grid;
  gap:0;
  font-size:10px;
  line-height:1.2;
  color:var(--muted);
}

.dispatch-pool-item-strip-meta-row{
  display:flex;
  gap:6px;
  align-items:center;
  flex-wrap:wrap;
}

.dispatch-pool-item-strip-side{
  display:grid;
  justify-items:end;
  gap:2px;
}

.dispatch-pool-status-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:18px;
  padding:0 7px;
  border-radius:999px;
  background:#e8f4ec;
  color:#1f7a44;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}

.dispatch-pool-item-card-installation{ border-color:#e4b087; }
.dispatch-pool-item-card-service{ border-color:#8fceab; }
.dispatch-pool-item-card-measurement{ border-color:#9cc3f3; }
.dispatch-pool-item-card-task{ border-color:#baa8ef; }

.dispatch-pool-type-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:26px;
  min-height:18px;
  padding:0 6px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
  flex:0 0 auto;
}

.dispatch-pool-type-installation{
  background:#fff0e6;
  color:#b45309;
}

.dispatch-pool-type-service{
  background:#e9f8ef;
  color:#1f7a44;
}

.dispatch-pool-type-measurement{
  background:#e8f1ff;
  color:#1d4ed8;
}

.dispatch-pool-type-task{
  background:#f1eaff;
  color:#6b49b6;
}

.small-button{
  min-height:30px;
  padding:6px 10px;
  font-size:11px;
}

.dispatch-map-list{
  display:grid;
  gap:8px;
  max-height:70vh;
  overflow:auto;
}

.dispatch-map-item{
  width:100%;
  text-align:left;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  display:grid;
  gap:6px;
}

.dispatch-map-item-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
}

.dispatch-map-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:#e8eef5;
  color:var(--brand);
}

.dispatch-map-icon-installation{ background:#ffe4d2; color:#c96f34; }
.dispatch-map-icon-service{ background:#e8f7ec; color:#257a49; }
.dispatch-map-icon-measurement{ background:#e3f0ff; color:#2f69c4; }
.dispatch-map-icon-task{ background:#f1eaff; color:#6b49b6; }

.dispatch-map-item.active,
.active-dispatch{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.15);
}

.dispatch-map-frame-wrap{
  min-height:420px;
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}

.dispatch-map-canvas,
.dispatch-block-map-canvas-host{
  width:100%;
  min-height:420px;
}

.dispatch-map-loading{
  display:grid;
  place-items:center;
  min-height:420px;
  padding:16px;
  text-align:center;
}

.dispatch-map-marker-host{
  background:transparent;
  border:0;
}

.dispatch-map-marker{
  width:28px;
  height:28px;
  border-radius:14px 14px 14px 2px;
  transform:rotate(-45deg);
  display:grid;
  place-items:center;
  border:2px solid rgba(255,255,255,.92);
  box-shadow:0 5px 12px rgba(23,33,43,.18);
}

.dispatch-map-marker span{
  transform:rotate(45deg);
  font-size:12px;
  font-weight:800;
  color:#fff;
}

.dispatch-map-marker-installation{ background:#c96f34; }
.dispatch-map-marker-service{ background:#257a49; }
.dispatch-map-marker-measurement{ background:#2f69c4; }
.dispatch-map-marker-task{ background:#6b49b6; }
.dispatch-map-marker-base{ background:#234f6d; }
.dispatch-map-marker-client{ background:#d97706; }

.dispatch-map-marker.is-active{
  box-shadow:0 0 0 4px rgba(35,79,109,.18), 0 8px 18px rgba(23,33,43,.22);
}

.dispatch-map-popup{
  display:grid;
  gap:4px;
  min-width:180px;
}

.dispatch-block-map{
  margin-top:12px;
  border-top:1px solid var(--border);
  padding-top:12px;
}

.dispatch-block-map-layout{
  display:grid;
  grid-template-columns:320px minmax(0, 1fr);
  gap:12px;
}

.dispatch-block-map-points{
  display:grid;
  gap:8px;
}

.dispatch-block-map-point{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
}

.people-board{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(280px, 320px);
  gap:12px;
  overflow:auto;
  padding-bottom:4px;
}

.people-column{
  border:1px solid var(--border);
  border-radius:16px;
  background:#f8fbfd;
  min-height:420px;
  display:flex;
  flex-direction:column;
}

.people-column.drag-target{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.12);
  background:#eef5fb;
}

.people-column-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:12px 12px 8px;
  position:sticky;
  top:0;
  background:#f8fbfd;
  border-bottom:1px solid var(--border);
  z-index:1;
}

.people-column-summary{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:4px;
  font-size:11px;
  color:var(--muted);
}

.people-column-list{
  display:grid;
  gap:10px;
  padding:12px;
  overflow:auto;
  max-height:70vh;
}

.button-link{
  text-decoration:none;
}

.checkbox-cell{
  display:flex;
  align-items:center;
  justify-content:center;
}

.row-checkbox{
  width:18px;
  height:18px;
}

.picker-panel{
  border:1px solid var(--border);
  border-radius:14px;
  background:#fbfdff;
  max-height:220px;
  overflow:auto;
  padding:8px;
  display:grid;
  gap:6px;
}

.picker-option{
  display:flex;
  gap:8px;
  align-items:flex-start;
  padding:6px 4px;
  border-radius:10px;
}

.picker-option:hover{
  background:#eef4f8;
}

.picker-option input{
  width:16px;
  height:16px;
  margin-top:2px;
}

.picker-option-meta{
  display:grid;
  gap:2px;
  min-width:0;
}

.picker-option-meta strong{
  font-size:13px;
}

.picker-option-meta span{
  font-size:11px;
  color:var(--muted);
}

.picker-selected{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  min-height:14px;
}

.field-job-card{
  width:100%;
  text-align:left;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  box-shadow:var(--shadow);
  cursor:grab;
}

.field-job-card.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.15);
}

.field-job-card.dragging{
  opacity:.55;
  transform:rotate(1deg);
}

.field-job-meta{
  display:grid;
  gap:3px;
  color:var(--muted);
  font-size:11px;
}

.field-job-badges{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:6px;
}

.dispatch-progress-label{
  font-size:10px;
  line-height:1;
  font-weight:700;
  letter-spacing:0;
  padding:0;
  background:transparent;
  border:0;
}

.status-missing-data{
  background:#fff3cd;
  color:#8a5a00;
}

.dispatch-incomplete-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#f4c542;
  box-shadow:0 0 0 1px rgba(138,90,0,.18);
  display:inline-block;
  flex:0 0 auto;
  margin-top:4px;
}

.field-job-row{
  width:100%;
  text-align:left;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
  display:grid;
  grid-template-columns:minmax(180px, 220px) minmax(120px, 150px) minmax(160px, 1fr) minmax(120px, 150px) minmax(160px, 200px) auto;
  gap:10px;
  align-items:center;
}

.field-job-row.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.15);
}

.task-dependency-list{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:6px;
}

.dependency-pill{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  background:#eef4f8;
  color:var(--brand);
}

.dependency-pill.blocked{
  background:#f8e9e9;
  color:var(--danger);
}

.dependency-pill.warn{
  background:#fff2d6;
  color:#9a6700;
}

.dependency-pill.info{
  background:#e8f1fb;
  color:#1f5d85;
}

.kanban-card-operator{
  font-weight:700;
  color:var(--brand);
}

.orders-table{
  display:grid;
  gap:7px;
}

.order-list-row{
  width:100%;
  text-align:left;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
  display:grid;
  grid-template-columns:minmax(110px, 140px) minmax(190px, 1fr) minmax(120px, 170px) minmax(150px, 200px) auto auto auto;
  gap:10px;
  align-items:center;
}

.order-list-row.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.15);
}

.order-list-status{
  justify-self:start;
}

.deadline-text{
  display:inline-flex;
  align-items:center;
  justify-self:start;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:800;
}

.status-pill{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:8px 14px;
  font-size:12px;
  font-weight:800;
}

.status-order{
  color:#c71818;
  background:#ffd7d5;
}

.status-docs{
  color:#165fb8;
  background:#cde7ff;
}

.status-partial-plan{
  color:#8a5a00;
}

.status-fully-planned{
  color:#1f7a44;
}

.status-overplanned{
  color:#b42318;
}

.status-production{
  color:#9a4e21;
  background:#ffd9c8;
}

.status-install{
  color:#fff;
  background:#1a7a4b;
}

.status-settle{
  color:#6e4b00;
  background:#ffe29b;
}

.status-review{
  color:#49566b;
  background:#e5eaf1;
}

.status-closed{
  color:#1d7b2e;
  background:#d8f2ba;
}

.status-supplier-settlement{
  color:#ffffff;
  background:#6f42c1;
}

.status-cancelled{
  color:#333;
  background:#e6e7eb;
}

button{
  border:0;
  border-radius:14px;
  padding:10px 14px;
  font:inherit;
  font-weight:700;
  cursor:pointer;
  transition:transform .12s ease, opacity .12s ease;
}
button:hover{transform:translateY(-1px)}
button:disabled{opacity:.55;cursor:not-allowed;transform:none}

.primary{
  background:var(--brand);
  color:#fff;
}

.ghost{
  background:#eaf0f5;
  color:var(--text);
}

.danger-button{
  background:#f8e9e9;
  color:var(--danger);
  border:1px solid #e5c0c0;
}

.field{
  display:grid;
  gap:7px;
}

.field-guided{
  align-content:start;
  position:relative;
}

.field-label-line{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.field-index-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  background:#eaf3fb;
  color:var(--brand);
  font-size:11px;
  font-weight:800;
  letter-spacing:.02em;
}

.field-label-text{
  color:inherit;
  font:inherit;
}

.field-help{
  position:relative;
  display:inline-flex;
  align-items:center;
}

.field-help-trigger{
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  border-radius:999px;
  border:1px solid #bfd2e2;
  background:#f2f8fd;
  color:#355874;
  font-size:11px;
  font-weight:800;
  cursor:help;
  box-shadow:0 2px 6px rgba(20,34,47,.06);
}

.field-help-popover{
  position:absolute;
  left:0;
  top:calc(100% + 8px);
  z-index:40;
  width:min(320px, 74vw);
  padding:10px 12px;
  border-radius:14px;
  border:1px solid #cfdbe7;
  background:#fff;
  color:var(--text);
  box-shadow:0 18px 34px rgba(20,34,47,.18);
  display:none;
  gap:6px;
  font-size:12px;
  line-height:1.5;
}

.field-help:hover .field-help-popover,
.field-help:focus-within .field-help-popover{
  display:grid;
}

.field-help-popover strong{
  color:var(--brand);
  font-size:11px;
  letter-spacing:.02em;
}

.field-helper{
  padding:8px 10px 8px 12px;
  border-radius:12px;
  border:1px dashed #d6e3ee;
  background:#f8fbfe;
  color:#6d8092;
  font-size:12px;
  line-height:1.45;
  border-left:3px solid #d7e4ef;
}

.field-empty .field-helper{
  background:#f8fbfe;
  color:#7b8d9e;
}

.field-filled .field-helper{
  background:#fbfdff;
  border-color:#d3dfeb;
  color:#667b8e;
}

body[data-field-descriptions-visible="false"] .field-helper{
  display:none !important;
}

body[data-field-descriptions-visible="true"] .field-help{
  display:none !important;
}

body[data-easy-mode="true"] .field-easy-muted{
  display:none !important;
}

body[data-easy-mode="true"] .label-action-btn{
  display:none !important;
}

.field-action-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
}

.triple-action-row{
  grid-template-columns:minmax(0,1fr) auto auto;
}

.twin-action-row{
  grid-template-columns:auto auto;
  justify-content:start;
}

.field-action-row button{
  white-space:nowrap;
}

.lookup-selected-hint{
  min-height:16px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid #dde8f0;
  background:#f7fafc;
  color:#586d80;
  font-size:12px;
  line-height:1.45;
}

.client-view-tabs{
  margin-top:10px;
}

.client-address-pair{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.client-address-card{
  display:grid;
  gap:12px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface-2);
}

.client-address-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.client-address-head h4{
  margin:2px 0 0;
  font-size:16px;
}

.client-modal-map-card,
.client-drive-card{
  margin-top:4px;
}

.client-map-actions{
  flex-wrap:wrap;
}

.client-map-frame-wrap{
  min-height:280px;
}

.client-map-frame-wrap .dispatch-map-canvas,
.client-map-frame-wrap .dispatch-map-loading{
  min-height:280px;
}

.client-map-frame-large{
  min-height:280px;
}

.client-map-placeholder{
  display:grid;
  gap:10px;
  justify-items:center;
  text-align:center;
}

.client-map-placeholder p{
  max-width:440px;
  margin:0;
  color:#5f7388;
}

.client-context-grid-modal{
  margin-top:12px;
}

.hubspot-diff-row{
  display:grid;
  gap:8px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface-2);
}

.hubspot-diff-values{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.hubspot-diff-values span{
  display:block;
  margin-bottom:4px;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  letter-spacing:.02em;
}

.hubspot-diff-values b{
  display:block;
  font-size:13px;
  line-height:1.45;
}

.client-lookup-results{
  max-height:180px;
  padding:6px;
}

.client-lookup-result{
  width:100%;
  text-align:left;
  border:1px solid transparent;
  border-radius:12px;
  background:#fff;
  padding:8px 10px;
  display:grid;
  gap:2px;
}

.client-lookup-result:hover{
  background:#eef4f8;
}

.client-lookup-result.active{
  border-color:rgba(35,79,109,.28);
  background:#f2f7fb;
}

@media (max-width: 900px){
  .client-address-pair{
    grid-template-columns:1fr;
  }

  .hubspot-diff-values{
    grid-template-columns:1fr;
  }
}

.client-lookup-result strong{
  font-size:13px;
}

.client-lookup-result span{
  font-size:11px;
  color:var(--muted);
}

.client-list-row{
  grid-template-columns:minmax(180px, 1.2fr) minmax(140px, 1fr) minmax(160px, 1fr) minmax(200px, 1.2fr) auto auto;
}

.client-order-row{
  grid-template-columns:minmax(140px, 180px) minmax(120px, 150px) minmax(120px, 160px) minmax(120px, 160px) auto auto;
}

.field span{
  font-size:13px;
  font-weight:700;
  color:#566a7d;
}

input, select, textarea{
  width:100%;
  border:1px solid #c8d6e3;
  border-radius:14px;
  padding:10px 12px;
  font:inherit;
  background:linear-gradient(180deg, #ffffff 0%, #fcfeff 100%);
  color:var(--text);
  box-shadow:0 1px 2px rgba(16,30,43,.04), inset 0 0 0 1px rgba(255,255,255,.45);
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}

input:not(:disabled),
textarea:not(:disabled){
  cursor:text;
}

select:not(:disabled){
  cursor:pointer;
}

input::placeholder,
textarea::placeholder{
  color:#a8b7c5;
  opacity:1;
  font-weight:400;
  font-style:italic;
}

input:placeholder-shown,
textarea:placeholder-shown{
  background:#fff;
  border-color:#cfdae5;
}

.field-empty input,
.field-empty select,
.field-empty textarea{
  background:#ffffff;
  border-color:#b6cada;
  box-shadow:0 1px 0 rgba(35,79,109,.04), 0 2px 10px rgba(35,79,109,.04);
  color:var(--text);
}

.field-filled input,
.field-filled select,
.field-filled textarea{
  background:#ffffff;
  border-color:#8aa8bf;
  box-shadow:0 0 0 1px rgba(35,79,109,.08), 0 2px 10px rgba(35,79,109,.05);
  color:var(--text);
}

input:enabled,
select:enabled,
textarea:enabled{
  background:#ffffff;
}

input:hover,
select:hover,
textarea:hover{
  background:#fff;
  border-color:#7e9fb8;
  box-shadow:0 4px 14px rgba(35,79,109,.10);
}

input:focus,
select:focus,
textarea:focus,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:none;
  background:#fff;
  border-color:#2365a8;
  box-shadow:0 0 0 3px rgba(35,101,168,.16);
}

textarea{
  resize:vertical;
}

.grid{
  display:grid;
  gap:14px;
}

.task-feedback-section{
  border:1px solid var(--border);
  border-radius:16px;
  background:#f8fbff;
  padding:16px;
}

.task-feedback-toolbar{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}

.task-feedback-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.task-feedback-links .ghost{
  min-height:36px;
}

.feedback-screenshot-preview{
  min-height:160px;
  border:1px dashed var(--border);
  border-radius:12px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  padding:8px;
}

.feedback-screenshot-preview img{
  display:block;
  max-width:100%;
  max-height:320px;
  border-radius:8px;
}

.feedback-submit-slot{
  margin-top:-4px;
}

.feedback-submit-row{
  justify-content:flex-start;
}

.feedback-queue-list{
  display:grid;
  gap:12px;
}

.feedback-queue-item{
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  padding:12px;
  display:grid;
  gap:8px;
}

.feedback-queue-item-unseen{
  border-color:#cfa51d;
  box-shadow:0 0 0 2px rgba(244,195,0,.16);
}

.feedback-queue-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.feedback-queue-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:var(--muted);
  font-size:12px;
}

.feedback-queue-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}

.feedback-queue-highlight{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:2px 8px;
  background:#fff4cc;
  color:#8a6500;
  font-weight:700;
}

.incidents-feedback-panel{
  margin:8px 0 14px;
  border:1px solid #d8e3ed;
  border-radius:18px;
  background:linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
  padding:16px 18px;
  display:grid;
  gap:12px;
}

.incidents-feedback-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.incidents-feedback-panel-head h3{
  margin:0;
  font-size:18px;
}

.incidents-feedback-panel-copy{
  display:grid;
  gap:4px;
}

.incidents-feedback-panel-copy p{
  margin:0;
  color:var(--muted);
  font-size:13px;
}

.incidents-feedback-list{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:10px;
}

.incidents-feedback-card{
  border:1px solid #d7e3ed;
  border-radius:14px;
  background:#fff;
  padding:12px;
  display:grid;
  gap:8px;
  text-align:left;
  box-shadow:0 8px 24px rgba(16,30,43,.05);
}

.incidents-feedback-card:hover{
  border-color:#a9bfd0;
  box-shadow:0 10px 28px rgba(16,30,43,.09);
}

.incidents-feedback-card-top,
.incidents-feedback-card-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
}

.incidents-feedback-card strong{
  font-size:14px;
  line-height:1.3;
}

.incidents-feedback-card-meta{
  font-size:12px;
  color:var(--muted);
}

.incidents-feedback-card-note{
  font-size:13px;
  color:#4c6074;
  line-height:1.45;
}

.incidents-feedback-card-context{
  display:grid;
  gap:2px;
  font-size:12px;
  color:var(--muted);
}

.link-button{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-bottom:10px;
}

.grid.two{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.wide{
  grid-column:1 / -1;
}

.check{
  display:flex;
  gap:10px;
  align-items:center;
  min-height:48px;
}

.check input{
  width:18px;
  height:18px;
}

.order-list{
  display:grid;
  gap:10px;
  max-height:calc(100vh - 320px);
  overflow:auto;
  padding-right:4px;
}

.order-row{
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface);
  padding:14px;
  display:grid;
  gap:4px;
  cursor:pointer;
}

.order-row.active{
  border-color:#92abc0;
  background:#f5f9fc;
}

.order-row strong{
  font-size:16px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  background:#eef4f8;
  color:var(--brand);
  font-weight:700;
  font-size:12px;
  padding:6px 10px;
}

.badge.is-ready{
  background:#f2fbf4;
  color:#2f7d47;
  border:1px solid #c7dfcf;
}

.badge.is-warning{
  background:#fffaf0;
  color:#9a6d12;
  border:1px solid #ead7b0;
}

.badge.is-blocked{
  background:#fff6f4;
  color:#b64a38;
  border:1px solid #edc6c0;
}

.summary-filter-chip{
  border:1px solid transparent;
  cursor:pointer;
}

.summary-filter-chip.active{
  background:var(--brand);
  color:#fff;
  border-color:var(--brand);
}

.group-card{
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface-2);
  overflow:hidden;
}

.group-head{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}

.group-list{
  display:grid;
}

.item-row{
  padding:10px 12px;
  display:grid;
  gap:6px;
  border-top:1px solid #e6edf3;
}

.item-row:first-child{border-top:0}

.item-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}

.item-meta{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:11px;
}

.item-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.order-note-card{
  gap:10px;
}

.order-note-context{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:var(--muted);
  font-size:12px;
  padding:4px 0 2px;
}

.order-note-summary{
  font-size:16px;
  font-weight:700;
  line-height:1.55;
  color:var(--text);
}

.order-note-block{
  display:grid;
  gap:4px;
  padding:8px 10px;
  border:1px solid #e6edf3;
  border-radius:12px;
  background:#f8fbfd;
  line-height:1.5;
}

.order-note-block-label{
  font-size:11px;
  font-weight:800;
  color:var(--brand);
  text-transform:uppercase;
  letter-spacing:.03em;
}

.order-note-mail-hint{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  background:#f3f7fb;
  color:#4f657a;
  font-size:12px;
  border:1px solid #dce7f2;
}

.order-note-mail-hint code{
  padding:2px 6px;
  border-radius:8px;
  background:#fff;
  border:1px solid #d8e3ed;
  color:var(--text);
}

.context-subsection{
  display:grid;
  gap:6px;
}

.context-subsection + .context-subsection{
  margin-top:10px;
}

.context-subsection-head{
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#5c7388;
  padding:4px 2px;
}

.process-form-grid{
  display:grid;
  gap:14px;
}

.process-section{
  display:grid;
  gap:12px;
  padding:14px;
  border:1px solid #dce6ef;
  border-radius:16px;
  background:#fbfdff;
}

.field-easy-hidden,
.field-conditional-hidden,
.section-empty-hidden{
  display:none !important;
}

.process-check-row{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  gap:12px;
  align-items:start;
  margin-top:4px;
}

.contract-readiness-panel{
  display:grid;
  gap:10px;
}

.incident-readiness-panel{
  margin-top:4px;
}

.contract-readiness-progress{
  display:grid;
  gap:2px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid #dce6ef;
  background:#fff;
}

.contract-readiness-progress strong{
  font-size:13px;
  line-height:1.35;
}

.contract-readiness-progress span{
  font-size:12px;
  color:var(--muted);
}

.contract-readiness-progress.is-ready{
  border-color:#cfe4d5;
  background:#f4fbf6;
}

.contract-readiness-progress.is-ready strong{
  color:#2f7d47;
}

.contract-readiness-progress.is-warning{
  border-color:#efd7a6;
  background:#fffaf0;
}

.contract-readiness-progress.is-warning strong{
  color:#9a6d12;
}

.contract-readiness-progress.is-blocked{
  border-color:#edc6c0;
  background:#fff6f4;
}

.contract-readiness-progress.is-blocked strong{
  color:#b64a38;
}

.contract-readiness-decision-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;
}

.contract-readiness-decision{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid #dce6ef;
  background:#fff;
}

.contract-readiness-decision span{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
}

.contract-readiness-decision strong{
  font-size:14px;
  line-height:1.3;
}

.contract-readiness-decision small{
  font-size:12px;
  line-height:1.45;
  color:#5f7488;
}

.contract-readiness-decision.is-ready{
  border-color:#c9e3d1;
  background:#fbfefc;
}

.contract-readiness-decision.is-ready strong{
  color:#2f7d47;
}

.contract-readiness-decision.is-missing{
  border-color:#ead7b0;
  background:#fffdf7;
}

.contract-readiness-decision.is-missing strong{
  color:#9a6d12;
}

.contract-readiness-decision.is-soft{
  border-color:#d6e2ec;
  background:#f9fbfd;
}

.contract-readiness-inline-copy{
  padding:9px 12px;
  border-radius:12px;
  border:1px dashed #d6e3ee;
  background:#f8fbfe;
  color:#6a7f92;
  font-size:12px;
  line-height:1.5;
}

.contract-readiness-inline-copy.is-ready{
  border-color:#cfe4d5;
  background:#f4fbf6;
  color:#2f7d47;
}

.contract-readiness-status{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border:1px solid #dce6ef;
  border-radius:14px;
  background:#f8fbfd;
}

.contract-readiness-status .contract-readiness-copy{
  display:grid;
  gap:2px;
}

.contract-readiness-status strong{
  font-size:14px;
  line-height:1.3;
}

.contract-readiness-status span{
  font-size:12px;
  color:var(--muted);
}

.contract-readiness-lamp{
  width:12px;
  height:12px;
  border-radius:999px;
  background:#aab8c5;
  box-shadow:0 0 0 4px rgba(170,184,197,.18);
  flex:0 0 12px;
}

.contract-readiness-status.is-ready{
  border-color:#b9dec0;
  background:#f3fbf5;
}

.contract-readiness-status.is-ready .contract-readiness-lamp{
  background:#2f9d52;
  box-shadow:0 0 0 4px rgba(47,157,82,.16);
}

.contract-readiness-status.is-warning{
  border-color:#efd7a6;
  background:#fffaf0;
}

.contract-readiness-status.is-warning .contract-readiness-lamp{
  background:#d39a1d;
  box-shadow:0 0 0 4px rgba(211,154,29,.16);
}

.contract-readiness-status.is-blocked{
  border-color:#edc6c0;
  background:#fff6f4;
}

.contract-readiness-status.is-blocked .contract-readiness-lamp{
  background:#cf5a46;
  box-shadow:0 0 0 4px rgba(207,90,70,.16);
}

.contract-draft-summary{
  display:grid;
  gap:10px;
}

.contract-draft-summary-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;
}

.contract-draft-card{
  border:1px solid #dce6ef;
  border-radius:14px;
  background:#ffffff;
  padding:10px 12px;
  display:grid;
  gap:4px;
}

.contract-draft-card span{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
}

.contract-draft-card strong{
  font-size:14px;
  line-height:1.35;
}

.contract-readiness-groups{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:10px;
}

.contract-readiness-group{
  border:1px solid #dce6ef;
  border-radius:14px;
  background:#fff;
  padding:10px 12px;
  display:grid;
  gap:6px;
}

.contract-readiness-group-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.contract-readiness-group-header strong{
  font-size:13px;
}

.contract-readiness-group-meta{
  font-size:12px;
  color:var(--muted);
}

.contract-readiness-group-list{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:4px;
  color:#5c7185;
  font-size:12px;
}

.contract-readiness-group.is-ready{
  border-color:#cfe4d5;
  background:#fbfefb;
}

.contract-readiness-group.is-ready .contract-readiness-group-meta{
  color:#2f7d47;
  font-weight:700;
}

.contract-readiness-group.is-missing{
  border-color:#ead7b0;
  background:#fffdf7;
}

.contract-readiness-group.is-missing .contract-readiness-group-meta{
  color:#9a6d12;
}

.contract-draft-helper{
  margin-top:2px;
}

.contract-draft-details{
  display:grid;
  gap:10px;
}

.contract-draft-details summary{
  cursor:pointer;
  color:#4c647a;
  font-weight:700;
}

.contract-draft-field textarea{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:12px;
  line-height:1.5;
  background:#f8fbfe;
}

.contract-draft-details{
  border:1px dashed #d5e1eb;
  border-radius:14px;
  padding:10px 12px;
  background:#f9fbfd;
}

.contract-draft-details summary{
  cursor:pointer;
  font-weight:700;
  color:var(--brand);
}

.contract-draft-details[open]{
  display:grid;
  gap:12px;
}

.contract-draft-field{
  margin-top:8px;
}

.task-feedback-toolbar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.readiness-grid{
  align-items:start;
}

.readiness-chip-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;
}

.readiness-chip{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid #dce6ef;
  background:#fff;
}

.readiness-chip strong{
  font-size:13px;
  line-height:1.3;
}

.readiness-chip small{
  font-size:12px;
  line-height:1.45;
  color:#5f7488;
}

.readiness-chip.is-ready{
  border-color:#c9e3d1;
  background:#fbfefc;
}

.readiness-chip.is-ready strong{
  color:#2f7d47;
}

.readiness-chip.is-missing{
  border-color:#ead7b0;
  background:#fffdf7;
}

.readiness-chip.is-missing strong{
  color:#9a6d12;
}

.readiness-chip.is-blocked{
  border-color:#edc6c0;
  background:#fff6f4;
}

.readiness-chip.is-blocked strong{
  color:#b64a38;
}

.incident-workflow-rail{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(120px, 1fr));
  gap:8px;
  margin:12px 0 14px;
}

.incident-workflow-step{
  border:1px solid #d7e3ed;
  border-radius:14px;
  background:#f8fbff;
  padding:10px 12px;
  display:grid;
  gap:4px;
}

.incident-workflow-step span{
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#6e8396;
}

.incident-workflow-step strong{
  font-size:13px;
  line-height:1.25;
  color:var(--text);
}

.incident-workflow-step small{
  font-size:12px;
  color:var(--muted);
}

.incident-workflow-step.is-done{
  background:#f2fbf4;
  border-color:#c7dfcf;
}

.incident-workflow-step.is-done span,
.incident-workflow-step.is-done strong{
  color:#2f7d47;
}

.incident-workflow-step.is-active{
  background:#fffaf0;
  border-color:#ead7b0;
  box-shadow:0 0 0 1px rgba(234,215,176,.4), 0 8px 18px rgba(154,109,18,.10);
}

.incident-workflow-step.is-active span,
.incident-workflow-step.is-active strong{
  color:#9a6d12;
}

.incident-workflow-step.is-future{
  background:#f8fbff;
}

.incident-workflow-guidance{
  display:grid;
  gap:6px;
  margin:-2px 0 14px;
  padding:12px 14px;
  border:1px solid #d7e3ed;
  border-radius:14px;
  background:#f8fbff;
}

.incident-workflow-guidance strong{
  font-size:13px;
  color:var(--text);
}

.incident-workflow-guidance span{
  font-size:13px;
  line-height:1.5;
  color:var(--muted);
}

.incident-workflow-guidance.is-info{
  border-color:#d7e3ed;
  background:#f8fbff;
}

.incident-workflow-guidance.is-warning{
  border-color:#ead7b0;
  background:#fffaf0;
}

.incident-workflow-guidance.is-warning strong{
  color:#9a6d12;
}

.incident-workflow-guidance.is-success{
  border-color:#c7dfcf;
  background:#f2fbf4;
}

.incident-workflow-guidance.is-success strong{
  color:#2f7d47;
}

.incident-workflow-guidance.is-muted{
  border-color:#dfe7ee;
  background:#f6f8fb;
}

.dispatch-block-layout{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(320px,.85fr);
  gap:12px;
  padding:12px;
}

.dispatch-zone-card{
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface);
  padding:10px;
  display:grid;
  gap:10px;
}

.dispatch-zone-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}

.dispatch-timeline-zone,
.dispatch-flex-zone{
  border:1px dashed #c4d3df;
  border-radius:12px;
  background:#f8fbfd;
  padding:10px;
  transition:border-color .15s ease, background .15s ease;
}

.dispatch-timeline-zone.drag-over,
.dispatch-flex-zone.drag-over{
  border-color:#5c84a8;
  background:#eef5fb;
}

.dispatch-timeline-hours{
  display:grid;
  grid-template-columns:repeat(var(--dispatch-hours, 14), minmax(72px,1fr));
  gap:0;
  margin-bottom:8px;
}

.dispatch-hour-label{
  font-size:11px;
  color:#4d6981;
  text-align:left;
  font-weight:700;
  padding:4px 0;
}

.dispatch-timeline-grid{
  position:relative;
  display:grid;
  grid-template-columns:repeat(var(--dispatch-hours, 14), minmax(72px,1fr));
  min-height:188px;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:
    linear-gradient(to right, rgba(170,190,206,.35) 1px, transparent 1px);
  background-size:calc(100% / var(--dispatch-hours, 14)) 100%;
}

.dispatch-hour-cell{
  min-height:188px;
  border-right:1px solid rgba(170,190,206,.25);
}

.dispatch-empty-lane{
  position:absolute;
  inset:8px;
}

.dispatch-timeline-item{
  position:absolute;
  top:16px;
  min-height:18px;
  border:1px solid #9eb8cd;
  border-radius:12px;
  background:#f1f7fb;
  padding:8px 10px;
  display:grid;
  gap:4px;
  box-shadow:0 6px 16px rgba(35,67,93,.07);
  cursor:grab;
  overflow:hidden;
}

.dispatch-timeline-item.is-open{
  background:#f4f9fc;
}

.dispatch-timeline-item.is-done{
  background:#edf8ef;
  border-color:#aed4b5;
}

.dispatch-timeline-item.is-partial-plan{
  border-color:#e2b65d;
  background:linear-gradient(180deg, #fff8e9 0%, #fffdf7 100%);
}

.dispatch-timeline-item.is-overplanned{
  border-color:#f1a5a5;
  background:linear-gradient(180deg, #fff0ee 0%, #fffaf9 100%);
}

.item-row[draggable="true"]{
  cursor:grab;
}

.planner-note-log{
  white-space:pre-line;
  line-height:1.5;
}

.dispatch-timeline-item strong{
  font-size:13px;
}

.dispatch-timeline-meta{
  font-size:11px;
  color:var(--muted);
}

.dispatch-timeline-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}

.dispatch-timeline-actions button{
  grid-column:1 / -1;
}

.dispatch-resize-handle{
  position:absolute;
  top:10px;
  bottom:10px;
  width:10px;
  border:0;
  padding:0;
  border-radius:999px;
  background:rgba(35,79,109,.14);
  cursor:ew-resize;
}

.dispatch-resize-handle:hover{
  background:rgba(35,79,109,.28);
}

.dispatch-resize-handle-start{
  left:4px;
}

.dispatch-resize-handle-end{
  right:4px;
}

.dispatch-timeline-grid[data-dispatch-orientation="vertical"]{
  display:block;
  min-height:calc(var(--dispatch-slots, 28) * 32px);
  background:
    linear-gradient(to bottom, rgba(170,190,206,.35) 1px, transparent 1px);
  background-size:100% calc(100% / var(--dispatch-slots, 28));
}

.dispatch-timeline-grid[data-dispatch-orientation="vertical"] .dispatch-resize-handle-start{
  top:4px;
  left:10px;
  right:10px;
  width:auto;
  height:10px;
  bottom:auto;
  cursor:ns-resize;
}

.dispatch-timeline-grid[data-dispatch-orientation="vertical"] .dispatch-resize-handle-end{
  left:10px;
  right:10px;
  width:auto;
  height:10px;
  top:auto;
  bottom:4px;
  cursor:ns-resize;
}

.dispatch-timeline-item-vertical{
  left:4px;
  right:4px;
  top:auto;
  min-height:18px;
  padding:8px 10px 22px;
}
.dispatch-timeline-workline{
  position:absolute;
  left:8px;
  right:8px;
  border-top:1px dashed rgba(37,99,235,.75);
  opacity:.95;
  pointer-events:none;
}

.dispatch-timeline-workline-start{
  transform:translateY(0);
}

.dispatch-timeline-workline-end{
  border-top-color:rgba(22,163,74,.78);
  transform:translateY(-1px);
}

.dispatch-timeline-item-vertical .dispatch-timeline-actions.compact{
  position:absolute;
  left:10px;
  right:10px;
  bottom:8px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:4px;
}

.dispatch-timeline-item-vertical .dispatch-timeline-actions.compact button{
  grid-column:auto;
  font-size:11px;
  min-height:28px;
  padding:5px 6px;
}

.dispatch-block-head-drop,
.dispatch-new-block-drop,
.dispatch-empty-day-drop,
.dispatch-week-day{
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.dispatch-block-head-drop.drag-over,
.dispatch-new-block-drop.drag-over,
.dispatch-empty-day-drop.drag-over,
.dispatch-week-day.drag-over{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.15);
  background:#eef5fb;
}

.dispatch-new-block-drop{
  align-content:start;
  min-height:100%;
}

.dispatch-empty-day-drop{
  border:1px dashed #c4d3df;
  border-radius:16px;
  background:#f8fbfd;
  position:absolute;
  inset:6px;
  z-index:1;
  align-content:flex-start;
  padding:14px 12px;
  display:grid;
  gap:8px;
}

.dispatch-route-strip{
  margin-top:8px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  font-size:11px;
  color:var(--muted);
}

.dispatch-calendar-shell{
  overflow:auto;
}

.dispatch-calendar-grid{
  display:grid;
  grid-template-columns:46px minmax(0, 1fr);
  gap:2px;
  min-width:max(960px, calc(var(--dispatch-day-count, 5) * 178px));
}

.dispatch-calendar-hours-column{
  display:grid;
  grid-template-rows:auto 1fr;
  gap:8px;
}

.dispatch-calendar-hours-head{
  min-height:184px;
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  padding-right:4px;
  padding-top:8px;
  font-size:12px;
  font-weight:700;
  color:#4d6981;
}

.dispatch-calendar-hours-body{
  position:relative;
  min-height:calc(var(--dispatch-slots, 28) * 32px);
}

.dispatch-calendar-hour-tick{
  position:absolute;
  left:0;
  right:0;
  transform:translateY(-50%);
  font-size:11px;
  font-weight:700;
  color:#4d6981;
  text-align:right;
  padding-right:4px;
}

.dispatch-calendar-hour-tick:nth-child(1){ top:0%; }
.dispatch-calendar-hour-tick:nth-child(2){ top:7.1428%; }
.dispatch-calendar-hour-tick:nth-child(3){ top:14.2856%; }
.dispatch-calendar-hour-tick:nth-child(4){ top:21.4284%; }
.dispatch-calendar-hour-tick:nth-child(5){ top:28.5712%; }
.dispatch-calendar-hour-tick:nth-child(6){ top:35.714%; }
.dispatch-calendar-hour-tick:nth-child(7){ top:42.8568%; }
.dispatch-calendar-hour-tick:nth-child(8){ top:49.9996%; }
.dispatch-calendar-hour-tick:nth-child(9){ top:57.1424%; }
.dispatch-calendar-hour-tick:nth-child(10){ top:64.2852%; }
.dispatch-calendar-hour-tick:nth-child(11){ top:71.428%; }
.dispatch-calendar-hour-tick:nth-child(12){ top:78.5708%; }
.dispatch-calendar-hour-tick:nth-child(13){ top:85.7136%; }
.dispatch-calendar-hour-tick:nth-child(14){ top:92.8564%; }

.dispatch-calendar-days{
  display:grid;
  grid-template-columns:repeat(var(--dispatch-day-count, 5), minmax(170px, 1fr));
  gap:0;
}

.dispatch-calendar-day{
  display:grid;
  gap:2px;
  align-content:start;
}

.dispatch-calendar-day-head{
  min-height:36px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
}

.dispatch-calendar-day-events{
  min-height:34px;
  max-height:34px;
  display:flex;
  align-items:center;
  gap:6px;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:2px;
}

.dispatch-calendar-event-bar{
  border:1px solid var(--border);
  border-radius:999px;
  background:#f7fafc;
  color:#4d6981;
  padding:4px 10px;
  font-size:12px;
  font-weight:700;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
}

.dispatch-calendar-event-bar.is-absence{
  background:#fef3c7;
  border-color:#f4d58d;
  color:#92400e;
}

.dispatch-calendar-event-bar.is-holiday{
  background:#ffe8d6;
  border-color:#f3c39d;
  color:#9a3412;
}

.dispatch-calendar-lanes-heads{
  display:grid;
  gap:1px;
  margin-bottom:4px;
  align-items:stretch;
  min-height:92px;
}

.dispatch-calendar-day-body{
  position:relative;
  min-height:calc(var(--dispatch-slots, 28) * 32px);
  border:1px solid var(--border);
  border-radius:0;
  background:#fff;
  overflow:hidden;
}

.dispatch-calendar-hour-line{
  height:calc(100% / var(--dispatch-slots, 28));
  border-top:1px solid rgba(170,190,206,.28);
}

.dispatch-calendar-hour-line:first-child{
  border-top:0;
}

.dispatch-calendar-lanes{
  position:absolute;
  inset:0;
  display:grid;
  gap:1px;
  padding:1px;
}

.dispatch-calendar-lanes-body{
  z-index:1;
}

.dispatch-calendar-lane{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.dispatch-calendar-lane.is-conflict{
  background:rgba(185, 28, 28, .03);
}

.dispatch-calendar-lane.is-overduration{
  background:rgba(180, 83, 9, .04);
}

.dispatch-calendar-lane-head{
  border:1px solid rgba(158,184,205,.9);
  border-radius:8px;
  background:#f6fbff;
  padding:4px 5px;
  display:grid;
  gap:3px;
  min-height:88px;
  max-height:88px;
  cursor:pointer;
  overflow:hidden;
}

.dispatch-calendar-lane-head.has-flex-items{
  background:#edf5ff;
  border-color:#8eb3d5;
}

.dispatch-calendar-lane-head.is-overduration{
  border-color:#e2b65d;
  background:linear-gradient(180deg, #fff6e6 0%, #fffdf7 100%);
}

.dispatch-calendar-lane-head.is-conflict{
  border-color:#e4a7a7;
  background:#fff2f2;
}

.dispatch-calendar-lane-head-top{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:flex-start;
}

.dispatch-calendar-conflict-note{
  color:#b42318;
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
  line-height:1.25;
}

.dispatch-calendar-conflict-flag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:18px;
  padding:0 7px;
  border-radius:999px;
  background:#fde8e8;
  color:#b42318;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}

.dispatch-calendar-crew,
.dispatch-calendar-note{
  line-height:1.35;
}

.dispatch-calendar-note{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dispatch-calendar-flex-pills{
  display:flex;
  flex-wrap:nowrap;
  gap:4px;
  align-items:flex-start;
  overflow:hidden;
}

.dispatch-calendar-flex-pill{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:1px 7px;
  border-radius:999px;
  background:#d9ecff;
  color:#123f68;
  font-size:10px;
  font-weight:700;
  cursor:grab;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dispatch-calendar-flex-pill-more{
  cursor:default;
  background:#cfe4fb;
  color:#214f74;
}

.dispatch-calendar-lane-body{
  min-height:0;
  border-radius:12px;
}

.dispatch-calendar-lane-body.is-conflict{
  box-shadow:inset 0 0 0 1px rgba(185, 28, 28, .18);
  background:linear-gradient(180deg, rgba(255,241,242,.55) 0%, rgba(255,255,255,0) 24%);
}

.dispatch-calendar-lane-body.is-overduration{
  box-shadow:inset 0 0 0 1px rgba(180, 83, 9, .18);
}

.dispatch-calendar-workband{
  position:absolute;
  left:4px;
  right:4px;
  border-radius:10px;
  background:rgba(35,79,109,.08);
  border:1px dashed rgba(35,79,109,.2);
}

.dispatch-calendar-workband.is-overduration{
  background:rgba(245, 158, 11, .11);
  border-color:rgba(217, 119, 6, .38);
}

.dispatch-block-shift-handle{
  position:absolute;
  top:6px;
  right:6px;
  width:18px;
  height:18px;
  border:0;
  border-radius:999px;
  background:rgba(35,79,109,.18);
  cursor:grab;
  box-shadow:0 1px 3px rgba(15, 23, 42, .14);
}

.dispatch-block-shift-handle::before{
  content:"";
  position:absolute;
  inset:4px 6px;
  border-top:2px solid rgba(18, 63, 104, .82);
  border-bottom:2px solid rgba(18, 63, 104, .82);
}

.dispatch-block-shift-handle:hover{
  background:rgba(35,79,109,.28);
}

.dispatch-block-shift-handle:active{
  cursor:grabbing;
}

.dispatch-calendar-lane-footer{
  display:none;
}

.dispatch-calendar-new-lane{
  border:1px dashed #9eb8cd;
  border-radius:8px;
  background:rgba(248,251,253,.65);
  width:42px;
  min-width:42px;
  display:grid;
  place-items:center;
  cursor:pointer;
}

.dispatch-calendar-lanes-heads .dispatch-calendar-new-lane{
  min-height:88px;
}

.dispatch-calendar-day.is-holiday .dispatch-calendar-day-body{
  background:#fff7ef;
}

.dispatch-calendar-day.is-holiday .dispatch-calendar-new-lane,
.dispatch-calendar-day.is-holiday .dispatch-empty-day-drop{
  background:#fff2e2;
  border-color:#e5c39d;
}

.dispatch-new-block-button{
  width:100%;
  height:100%;
  min-height:88px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#5a7388;
  font-size:28px;
  font-weight:700;
  cursor:pointer;
}

.dispatch-pool-card .section-head{
  margin-bottom:6px;
}

.dispatch-pool-card .section-head h3{
  font-size:16px;
}

.dispatch-drive-chip{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 8px;
  background:#eef4f8;
  color:#47637b;
  font-weight:700;
}

@media (max-width: 1180px){
  .order-side-grid{
    grid-template-columns:1fr;
  }

  .dispatch-block-layout{
    grid-template-columns:1fr;
  }
}

@media (max-width: 1440px){
  .brand p{
    display:none;
  }

  .app-header{
    grid-template-columns:minmax(220px, 300px) minmax(260px, 1fr) minmax(240px, 340px);
  }

  .brand-button{
    max-width:300px;
  }

  .brand-mark.has-logo{
    width:92px;
    min-width:92px;
    max-width:92px;
  }

  .version-badge{
    padding:6px 10px;
    font-size:11px;
  }

  .status-pill{
    padding:7px 12px;
    font-size:11px;
  }
}

@media (max-width: 1280px){
  .app-header-shell{
    grid-template-columns:1fr;
  }

  .header-search{
    order:2;
  }

  .auth-topbar{
    order:3;
    justify-content:flex-start;
    flex-wrap:wrap;
    max-width:none;
  }

  .head-actions{
    justify-content:flex-start;
  }

  .order-list-row{
    grid-template-columns:1fr 1fr;
  }

  .admin-layout{
    grid-template-columns:1fr;
  }
}

@media (max-width: 900px){
  .content{
    padding:16px;
  }

  .app-header{
    padding:8px 10px;
  }

  .brand{
    gap:12px;
  }

  .brand-button{
    max-width:none;
    column-gap:12px;
  }

  .brand-mark{
    width:60px;
    min-width:60px;
    max-width:60px;
    height:44px;
    padding:0 12px;
  }

  .brand-mark.has-logo{
    width:min(104px, 28vw);
    min-width:min(104px, 28vw);
    max-width:min(104px, 28vw);
  }

  .brand h1{
    font-size:18px;
  }

  .brand-copy p{
    display:none;
  }

  .header-toggle,
  .easy-mode-toggle,
  .header-select,
  .header-search-input{
    width:100%;
  }

  .app-footer{
    padding:8px 14px 14px;
  }

  .panel-head,
  .section-head,
  .workbench-head{
    flex-direction:column;
    align-items:stretch;
  }

  .head-actions{
    width:100%;
    justify-content:flex-start;
  }

  .view-toggle-group{
    width:100%;
  }

  .view-toggle-group .primary,
  .view-toggle-group .ghost{
    flex:1 1 120px;
  }

  .grid.two,
  .filters-bar,
  .order-list-row,
  .admin-status-grid,
  .admin-user-grid,
  .admin-visibility-grid,
  .field-action-row{
    grid-template-columns:1fr;
  }
}

.context-hint{
  margin-bottom:14px;
  padding:12px 14px;
  border-radius:14px;
  background:#f3f7fb;
  color:var(--brand);
  border:1px solid var(--border);
  font-size:14px;
  font-weight:600;
}

.pill{
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  font-weight:700;
  background:#eef4f8;
  color:var(--brand);
}

.pill.warn{background:#fff1de;color:var(--warn)}
.pill.success{background:#e8f4ec;color:var(--ok)}
.pill.danger{background:#fae8e8;color:var(--danger)}

.modal{
  width:min(760px,calc(100vw - 24px));
  border:0;
  border-radius:24px;
  padding:0;
  box-shadow:0 22px 60px rgba(16,30,43,.2);
}

.modal::backdrop{
  background:rgba(10,22,34,.32);
}

.modal-body{
  position:relative;
  padding:18px;
  padding-bottom:84px;
  max-height:85vh;
  overflow:auto;
  overscroll-behavior:contain;
}

@media (max-width: 700px){
  .label-action-btn{
    display:none !important;
  }
}

.modal-wide{
  width:min(1100px,calc(100vw - 32px));
}

.admin-modal-body{
  max-height:85vh;
  overflow:auto;
}

.admin-layout{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

.admin-card{
  padding:12px;
}

.admin-statuses-list,
.admin-users-list,
.admin-visibility-list{
  display:grid;
  gap:8px;
}

.migration-job-row,
.migration-review-row{
  background:#fff;
}

.migration-job-row.active{
  border-color:#9dc0db;
  box-shadow:0 10px 24px rgba(35,79,109,.10);
}

.migration-summary-grid{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.migration-review-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  font-size:13px;
  line-height:1.45;
}

.migration-review-grid strong{
  color:var(--text);
}

.migration-candidate-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.migration-candidate-btn{
  min-height:36px;
  padding:8px 10px;
  border-radius:12px;
  font-size:12px;
  text-align:left;
}

.migration-candidate-btn:hover{
  border-color:#9dc0db;
  background:#eef5fb;
}

.multi-select-dropdown{
  position:relative;
}

.multi-select-summary{
  list-style:none;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  min-height:40px;
  padding:10px 38px 10px 12px;
  cursor:pointer;
  display:flex;
  align-items:center;
  color:var(--text);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.multi-select-summary::-webkit-details-marker{
  display:none;
}

.multi-select-dropdown .multi-select-summary::after{
  content:"▾";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  color:var(--muted);
  pointer-events:none;
}

.multi-select-dropdown[open] .multi-select-summary{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.12);
}

.multi-select-panel{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  right:0;
  z-index:20;
  background:#fff;
  box-shadow:var(--shadow);
}

.admin-status-row,
.admin-user-row,
.admin-visibility-row{
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface-2);
  padding:10px;
  display:grid;
  gap:8px;
}

.admin-status-grid{
  display:grid;
  grid-template-columns:150px minmax(0,1fr) 160px 150px;
  gap:8px;
  align-items:end;
}

.admin-user-grid{
  display:grid;
  grid-template-columns:minmax(220px,1.2fr) 170px 140px 140px auto;
  gap:8px;
  align-items:end;
}

.admin-user-grid-add{
  grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) 150px 130px auto;
}

.admin-visibility-grid{
  display:grid;
  grid-template-columns:170px 170px 170px auto;
  gap:8px;
  align-items:end;
}

.admin-row-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}

.admin-note{
  font-size:12px;
  color:var(--muted);
}

.admin-note-block{
  align-self:end;
  font-size:12px;
  line-height:1.5;
  color:var(--muted);
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface-2);
}

.admin-logo-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.admin-logo-preview{
  width:120px;
  height:72px;
  border:1px dashed var(--border);
  border-radius:14px;
  background:#f8fbfd;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-size:12px;
  overflow:hidden;
}

.admin-logo-preview.has-image{
  border-style:solid;
  background:#fff;
}

.admin-logo-preview img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.admin-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:12px;
}

.weekday-picker{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding-top:6px;
}

.dispatch-month-calendar{
  display:grid;
  gap:10px;
}

.dispatch-month-head,
.dispatch-month-grid{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:8px;
}

.dispatch-month-head span{
  font-size:12px;
  color:var(--muted);
  font-weight:700;
  text-align:center;
}

.dispatch-month-cell{
  min-height:140px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  padding:10px;
  display:grid;
  align-content:start;
  gap:8px;
  text-align:left;
}

.dispatch-month-cell.is-filler{
  background:transparent;
  border-style:dashed;
  opacity:.3;
}

.dispatch-month-cell.is-active{
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(31,78,121,.12);
}

.dispatch-month-cell.is-holiday{
  background:#fff7ef;
}

.dispatch-month-date{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
}

.dispatch-month-blocks{
  display:grid;
  gap:6px;
}

.dispatch-month-block,
.dispatch-month-absence{
  display:block;
  border-radius:10px;
  padding:6px 8px;
  background:var(--surface-2);
  font-size:12px;
  line-height:1.4;
}

.dispatch-month-item-installation{
  background:#ffe8d6;
}

.dispatch-month-item-service{
  background:#e8f7ec;
}

.dispatch-month-item-measurement{
  background:#e3f0ff;
}

.dispatch-month-item-task{
  background:#f1eaff;
}

.dispatch-month-absence{
  background:#fef3c7;
  color:#92400e;
}

.dispatch-week-grid{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:12px;
}

.dispatch-week-day{
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  padding:12px;
  display:grid;
  gap:10px;
  align-content:start;
}

.dispatch-week-day.is-holiday{
  background:#fff7ef;
}

.dispatch-week-head{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
}

.dispatch-week-list,
.dispatch-week-chip-list{
  display:grid;
  gap:8px;
}

.dispatch-week-empty-drop{
  min-height:88px;
  border:1px dashed #c4d3df;
  border-radius:12px;
  background:#f8fbfd;
  padding:12px;
  color:var(--muted);
  display:flex;
  align-items:center;
}

.dispatch-week-block{
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-2);
  padding:10px;
  display:grid;
  gap:8px;
}

.dispatch-week-block.drag-over{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.15);
  background:#eef5fb;
}

.row-end{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
}

.entity-share-link-row{
  display:flex;
  justify-content:flex-start;
  margin-top:12px;
}

.entity-share-link{
  margin-right:auto;
  padding:0;
  border:0;
  background:none;
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
  text-align:left;
  cursor:pointer;
  max-width:100%;
  word-break:break-all;
  text-decoration:underline;
  text-decoration-style:dotted;
  text-underline-offset:2px;
  transition:color .18s ease, opacity .18s ease;
}

.entity-share-link:hover,
.entity-share-link:focus-visible{
  color:var(--brand-strong);
  opacity:1;
}

.entity-share-link.hidden{
  display:none;
}

@media (max-width: 980px){
  .shell{
    grid-template-columns:1fr;
  }

  .sidebar{
    border-right:0;
    border-bottom:1px solid var(--border);
  }

  .content{
    padding:18px 14px 28px;
  }

  .feedback-fab{
    right:16px;
    bottom:16px;
  }

  .tasks-filters-bar{
    grid-template-columns:repeat(3, minmax(140px, 1fr));
  }

  .tasks-bulk-bar{
    grid-template-columns:repeat(3, minmax(180px, 1fr));
  }

  .dispatch-map-layout{
    grid-template-columns:1fr;
  }

  .dispatch-map-toolbar-grid{
    grid-template-columns:1fr;
  }

  .dispatch-block-map-layout{
    grid-template-columns:1fr;
  }

  .dispatch-day-layout{
    grid-template-columns:1fr;
  }

  .inline-editor-row{
    grid-template-columns:1fr;
  }

  .dispatch-pool-card{
    position:static;
  }

  .dispatch-month-head,
  .dispatch-month-grid{
    grid-template-columns:repeat(5, minmax(0, 1fr));
  }

  .dispatch-week-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 700px){
  .grid.two{
    grid-template-columns:1fr;
  }

  .hero h2{
    font-size:28px;
  }

  .section-head,.panel-head{
    display:grid;
  }

  .tasks-filters-bar,
  .tasks-bulk-bar{
    grid-template-columns:1fr;
  }

  .feedback-queue-top{
    display:grid;
  }

  .admin-user-grid,
  .admin-user-grid-add,
  .admin-status-grid{
    grid-template-columns:1fr;
  }

  .dispatch-month-head,
  .dispatch-month-grid{
    grid-template-columns:1fr;
  }
}
