.assist-brand .brand-mark { background: #16796c; }
.assist-nav { margin-top: 44px; }
.assist-shell .nav-item.active { background: #203951; }
.assist-shell .refresh-button, .employee-profile { width: 42px; height: 42px; }
.assist-content { max-width: 1530px; }
.assist-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 13px 16px; }
.assist-date-strip, .assist-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.assist-date-strip .icon-button { width: 36px; height: 36px; }
.assist-date-strip .button, .assist-filters select, .assist-date-field input { min-height: 36px; }
.assist-filters { gap: 13px; }
.assist-filters label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .83rem; }
.assist-filters select { max-width: 200px; min-width: 132px; }
.assist-filters select, .assist-date-field input {
  color: var(--ink); background: var(--paper); border: 1px solid #dce4ef; padding: 5px 8px; border-radius: 7px;
  font-size: .89rem; font-weight: 620;
}
.assist-date-field input { max-width: 155px; margin: 0; }
.assist-metrics { margin: 16px 0; }
.assist-metric { gap: 13px; min-height: 82px; }
.stat-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; flex: 0 0 auto; }
.assist-metric strong { font-size: 1.48rem; line-height: 1.08; }
.dispatch-grid { display: grid; grid-template-columns: minmax(360px, 1.15fr) minmax(335px, 1fr); gap: 16px; align-items: start; }
.assist-map-card, .assist-list-card { overflow: hidden; }
.assist-card-header { display: flex; align-items: center; gap: 11px; min-height: 69px; padding: 12px 15px; }
.assist-card-header h2 { font-size: 1rem; line-height: 1.3; letter-spacing: -.012em; }
.assist-card-header p { margin-top: 3px; color: var(--muted); font-size: .83rem; }
.assist-card-header .text-button { margin-left: auto; }
.assist-section-icon { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 auto; background: #eef4fb; color: #34588b; border-radius: 9px; }
.map-stage { --map-size: clamp(410px, 50vh, 620px); height: var(--map-size); display: grid; place-items: center; overflow: hidden; background-color: #edf4fa;
  background-image: linear-gradient(#dce7f24d 1px, transparent 1px), linear-gradient(90deg, #dce7f24d 1px, transparent 1px); background-size: 28px 28px;
  border-block: 1px solid #e3edf6; }
.italy-frame { position: relative; width: min(100%, calc((var(--map-size) - 2px) * var(--map-width-factor))); aspect-ratio: var(--map-ratio); }
.italy-frame canvas { width: 100%; height: 100%; display: block; }
.map-loading { color: var(--muted); font-size: .9rem; }
.map-pin { position: absolute; display: grid; place-items: center; transform: translate(-50%, -50%); width: 27px; height: 27px;
  border: 2px solid #fff; border-radius: 100%; color: #fff; background: #2857d5; box-shadow: 0 2px 7px #1a366756;
  font-size: .74rem; font-weight: 750; line-height: 1; z-index: 1; }
.map-pin:hover, .map-pin.selected, .map-pin:focus-visible { z-index: 2; background: #17387d; }
.map-pin.selected { box-shadow: 0 0 0 4px #567bdb59, 0 2px 6px #193d78a1; }
.assist-map-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px;
  padding: 11px 15px; color: var(--muted); font-size: .76rem; }
.assist-map-footer span { display: inline-flex; gap: 7px; align-items: center; }
.assist-map-footer i { width: 8px; height: 8px; border-radius: 100%; background: var(--blue); }
.assist-map-footer a { color: var(--muted); }
.assist-dispatch-list { border-top: 1px solid var(--line); }
.assist-dispatch-list li + li { border-top: 1px solid var(--line); }
.assist-dispatch-row { width: 100%; padding: 14px 15px; border: 0; background: white; color: var(--ink); text-align: left;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px 12px; }
.assist-dispatch-row:hover, .employee-assignment:hover { background: #f7faff; }
.assist-dispatch-row > svg { color: var(--quiet); }
.assist-dispatch-main { display: grid; gap: 4px; overflow-wrap: anywhere; }
.assist-location { display: flex; align-items: flex-start; gap: 5px; color: var(--muted); font-size: .85rem; }
.assist-location svg { margin-top: 1px; }
.assist-crew-line { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; }
.crew-chip { display: inline-flex; gap: 5px; align-items: center; max-width: 100%; min-height: 25px; padding: 3px 7px;
  color: #344963; background: #f3f6fb; border: 1px solid #e6edf6; border-radius: 6px; font-size: .76rem; overflow-wrap: anywhere; }
.crew-chip i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #6e86ab; }
.crew-chip i.confirmed { background: #2857d5; }
.crew-chip i.done { background: #1e876b; }
.crew-chip i.reschedule { background: #bf662a; }
.crew-chip i.cancelled { background: #aa5565; }
.assist-pill { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; max-width: 100%; border-radius: 6px;
  background: #edf2f9; color: #3c5678; font-size: .77rem; font-weight: 700; line-height: 1.25; }
.assist-pill.confirmed { color: #254f9e; background: #e6efff; }
.assist-pill.done { color: #22654e; background: #def4e9; }
.assist-pill.reschedule { color: #8b4e21; background: #fff0e0; }
.assist-pill.cancelled { color: #952e45; background: #fcecef; }
.assist-empty { padding: 38px 15px; justify-items: center; text-align: center; }
.assist-empty > span { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 3px; color: #47668e; background: #eef4fb; border-radius: 13px; }
.planner-card { overflow: hidden; }
.planner-card .month-title { margin: 0 4px; text-transform: capitalize; font-size: 1.03rem; }
.planner-scroll { overflow: auto; }
.planner-grid { display: grid; grid-template-columns: repeat(7, minmax(82px, 1fr)); min-width: 600px; }
.planner-weekday { text-align: center; padding: 9px 4px; border-block: 1px solid var(--line); color: var(--muted); font-size: .81rem; font-weight: 700; background: #f4f7fb; }
.planner-day { min-height: 86px; display: flex; align-items: stretch; flex-direction: column; gap: 3px; padding: 6px;
  border: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; background: white; color: var(--ink); min-width: 0; }
.planner-day:nth-child(7n) { border-right: 0; }
.planner-day.out-month { background: #f9fafc; color: var(--quiet); }
.planner-day:hover { background: #f1f6ff; }
.planner-day.selected { background: #edf4ff; box-shadow: inset 0 0 0 1px #7ea0eb; }
.planner-number { align-self: start; display: grid; place-items: center; min-width: 24px; height: 24px; font-size: .84rem; font-weight: 710; }
.planner-number.today { background: var(--blue); color: white; border-radius: 50%; }
.planner-event, .planner-more { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 4px; font-size: .74rem; }
.planner-event { background: #e5effc; color: #23466e; border-radius: 4px; }
.planner-event.cancelled { background: #f8eaf0; color: #773f4c; }
.planner-more { color: var(--muted); }
.planner-day-list { margin-top: 16px; overflow: hidden; }
.access-card { max-width: 820px; overflow: hidden; }
.assist-history-card { overflow: hidden; }
.assist-history-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 15px; }
.assist-history-filters > p, .assist-history-filters .assist-form-actions { grid-column: 1 / -1; }
.assist-history-card .assist-dispatch-row > .assist-pill { max-width: 145px; text-align: center; }
.assist-history-card .assist-pill.past { background: #f5edf9; color: #67427b; }
.access-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.access-list li + li { border-top: 1px solid var(--line); }
.access-list li div { min-width: 0; overflow-wrap: anywhere; }
.access-list li div span { display: block; color: var(--muted); font-size: .85rem; margin-top: 3px; }
.employee-topbar { display: flex; justify-content: space-between; align-items: center;
  background: var(--navy); color: #fff; padding: max(13px, env(safe-area-inset-top)) max(17px, env(safe-area-inset-right)) 13px max(17px, env(safe-area-inset-left)); }
.employee-topbar .brand { padding: 0; }
.employee-topbar .brand-mark { width: 39px; height: 39px; }
.employee-topbar .brand strong { font-size: 1.2rem; }
.employee-topbar .brand small { margin-top: 2px; }
.employee-profile { background: #20334f; color: #e1ecff; border-color: #365072; }
.employee-profile:hover:enabled { color: #fff; background: #2f476b; }
.employee-content { max-width: 650px; margin: 0 auto; padding: 22px 17px max(24px, env(safe-area-inset-bottom)); }
.employee-content .page-heading { margin-bottom: 16px; }
.employee-content h1 { font-size: clamp(1.6rem, 5.8vw, 2rem); }
.employee-switch { display: flex; gap: 4px; padding: 3px; margin-bottom: 14px; background: #e9eef7; border-radius: 9px; }
.employee-switch button { flex: 1; min-height: 41px; background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 7px; font-size: .9rem; font-weight: 700; }
.employee-switch button[aria-pressed=true] { color: var(--ink); background: white; border-color: #e1e8f2; box-shadow: 0 1px 2px #233a6215; }
.employee-assignments { display: grid; gap: 9px; }
.employee-assignments li { min-width: 0; overflow: hidden; }
.employee-assignment { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px 10px; align-items: start; width: 100%;
  padding: 12px; border: 0; background: #fff; color: var(--ink); text-align: left; }
.assignment-icon { display: grid; place-items: center; width: 36px; height: 36px; color: #246959; background: #e1f2ed; border-radius: 10px; }
.employee-assignment-content { display: grid; gap: 4px; overflow-wrap: anywhere; }
.employee-assignment-content > span, .employee-assignment-meta > span:not(.assist-pill) { display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: .81rem; }
.employee-assignment > svg { color: var(--quiet); align-self: center; }
.employee-assignment-meta { grid-column: 2 / 4; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.load-more { margin-top: 13px; }
.access-denied-actions, .assist-profile { display: grid; gap: 10px; }
.assist-dialog { width: min(94vw, 610px); }
.assist-dialog.assign-dialog { width: min(94vw, 715px); }
.assist-dialog .modal-header { align-items: center; }
.assist-dialog .modal-header h2 { overflow-wrap: anywhere; }
.assist-dialog a.button { text-decoration: none; }
.assist-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.assist-fieldset { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
.assist-fieldset legend { color: var(--ink); font-weight: 650; padding: 0 5px; font-size: .9rem; }
.crew-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 174px; overflow: auto; }
.crew-options .crew-choice { display: flex; gap: 8px; align-items: center; padding: 6px 8px; background: #f7f9fd; border: 1px solid #e5edf6; border-radius: 7px; overflow-wrap: anywhere; }
.crew-choice input { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; flex: 0 0 auto; accent-color: var(--blue); }
.crew-choice small { display: block; color: var(--muted); font-weight: 500; margin-top: 2px; }
.assist-form-section { display: block; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.assist-form-section > summary { cursor: pointer; font-size: .9rem; font-weight: 700; color: var(--ink); }
.assist-form-section[open] > summary { margin-bottom: 10px; }
.assist-form-section > label + label, .assist-form-section > .form-hint { margin-top: 8px; }
.assist-form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.assist-conflicts { color: #70441d; border: 1px solid #e7c88b; background: #fff8e9; border-radius: 8px; padding: 10px 12px; font-size: .88rem; }
.assist-conflicts ul { margin: 7px 0 0 18px; list-style: disc; }
.assist-conflicts li + li { margin-top: 4px; }
.address-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 9px; }
.address-maps-link { display: inline-flex; align-items: center; gap: 4px; }
.address-suggestions { overflow: hidden; border: 1px solid #dce4ef; border-radius: 8px; margin-top: 8px; }
.address-suggestions li + li { border-top: 1px solid var(--line); }
.address-suggestions button { width: 100%; text-align: left; padding: 9px 10px; border: 0; background: white; color: var(--ink); font-size: .87rem; }
.address-suggestions button:hover { background: #f3f7fd; }
.address-suggestions p { padding: 8px 10px; color: var(--muted); font-size: .86rem; }
.maps-attribution { display: block; width: auto; height: 17px; margin: 10px 10px 5px auto; }
.address-terms a { color: #2454c9; }
.assist-detail { display: grid; gap: 14px; }
.assist-detail-summary { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.assist-detail-summary > span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .88rem; }
.assist-detail-section { display: grid; justify-items: start; gap: 6px; padding-bottom: 11px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.assist-detail-section h3 { display: flex; align-items: center; gap: 6px; font-size: .93rem; margin: 0; }
.assist-detail-section h3 svg { color: #4d6a94; }
.assist-detail-section p, .assist-multiline { font-size: .88rem; color: var(--muted); }
.assist-multiline { white-space: pre-wrap; overflow-wrap: anywhere; }
.assist-multiline + .assist-multiline { margin-top: 8px; }
.assist-contact { display: grid; gap: 5px; }
.assist-contact a, .document-link { display: flex; align-items: center; gap: 5px; color: #2454c9; font-size: .88rem; }
.assist-document-list, .assist-detail-crew, .assist-pending-files, .upload-form { width: 100%; }
.assist-document-list li, .assist-pending-files li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; }
.document-link { gap: 8px; min-height: 34px; }
.document-link svg { flex: 0 0 auto; }
.assist-pending-files li { padding: 7px 8px; background: #fff5ef; border-radius: 6px; margin-top: 4px; font-size: .86rem; }
.assist-pending-files li div { flex: 1; min-width: 0; }
.assist-pending-files li small { display: block; color: #7c4731; }
.upload-form { justify-items: start; margin-top: 4px; }
.upload-form label { width: 100%; }
.assist-detail-crew li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; padding: 7px 0; align-items: start; }
.assist-detail-crew li + li { border-top: 1px solid var(--line); }
.assist-detail-crew li strong { font-size: .89rem; }
.assist-outcome-note { grid-column: 1 / -1; white-space: pre-wrap; }
.assist-outcome-actions { display: grid; gap: 8px; }

@media (max-width: 1080px) {
  .dispatch-grid { grid-template-columns: minmax(300px, 1fr) minmax(270px, 1fr); }
}

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

@media (max-width: 600px) {
  .assist-history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assist-content .page-heading { align-items: flex-start; flex-direction: column; }
  .assist-content .page-heading .primary { width: 100%; }
  .assist-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .assist-metric { display: block; padding: 7px; min-height: auto; }
  .assist-metric .stat-icon { display: none; }
  .assist-metric .metric-label { font-size: .72rem; }
  .assist-filters { flex: 1; align-items: stretch; gap: 7px; }
  .assist-filters label { flex: 1; min-width: 0; display: grid; }
  .assist-filters select { width: 100%; min-width: 0; max-width: none; }
  .assist-toolbar { padding: 10px; }
  .map-stage { --map-size: clamp(340px, 48vh, 480px); }
  .assist-map-footer { padding-inline: 10px; }
  .assist-dialog.employee-detail { width: min(100vw, 610px); max-width: 100vw; margin: auto auto 0; max-height: 92dvh;
    border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .assist-dialog .modal-header { padding: 13px 15px; }
  .assist-dialog .modal-body { padding: 14px; }
  .assist-dialog .form-hint { font-size: .81rem; }
  .assist-form-grid { grid-template-columns: 1fr; }
  .crew-options { grid-template-columns: 1fr; }
}
