@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;650;700;750;800&display=swap');

body.driver-modern-active { background: #f4f6fa; }
.driver-modern-active > #app { display: none; }
#driverModern[hidden] { display: none !important; }
#driverModern [hidden] { display: none !important; }
#driverModern {
  --dm-ink: #243047;
  --dm-muted: #768196;
  --dm-blue: #4169e1;
  --dm-line: #e9edf4;
  --dm-wash: #f4f6fa;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--dm-ink);
  font-size: 14px;
  line-height: 1.55;
  height: 100dvh;
  overflow: hidden;
  background: #fff;
}
#driverModern *, #driverModern *::before, #driverModern *::after { box-sizing: border-box; }
#driverModern button, #driverModern select { font-family: inherit; }
#driverModern button { cursor: pointer; }
#driverModern button:disabled { cursor: wait; opacity: .5; }
#driverModern :focus-visible { outline: 3px solid #9bb5ff; outline-offset: 3px; }
#driverModern svg[viewBox="0 0 24 24"] { width: 20px; height: 20px; flex-shrink: 0; }
#driverModern h1, #driverModern h2, #driverModern h3, #driverModern p { margin: 0; }
.dm-header { height: 76px; padding: 0 28px; display: flex; gap: 24px; align-items: center; border-bottom: 1px solid var(--dm-line); }
.dm-brand { display: inline-flex; gap: 9px; align-items: center; text-decoration: none; color: var(--dm-ink); }
.dm-brand > svg { width: 29px !important; height: 29px !important; color: var(--dm-blue); stroke-width: 1.8; }
.dm-brand strong { font-size: 29px; letter-spacing: -1.8px; font-weight: 800; }
.dm-brand strong span { color: var(--dm-blue); }
.dm-header-divider { height: 24px; width: 1px; background: var(--dm-line); }
.dm-section-name { font-size: 15px; font-weight: 600; }
.dm-header-right { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.dm-user { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #e9eefc; color: #536eb2; font-size: 13px; font-weight: 750; }
.dm-preview { position: relative; }
.dm-preview summary { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dm-muted); cursor: pointer; list-style: none; }
.dm-preview summary::-webkit-details-marker { display: none; }
.dm-preview summary svg { width: 14px !important; }
.dm-preview > div { position: absolute; right: 0; top: 32px; z-index: 40; width: 230px; padding: 18px; background: #fff; box-shadow: 0 12px 45px #1d2e5520; border: 1px solid var(--dm-line); border-radius: 14px; }
.dm-preview label { display: grid; gap: 8px; color: var(--dm-muted); font-size: 13px; }
.dm-preview select { padding: 10px; background: white; color: var(--dm-ink); border: 1px solid var(--dm-line); border-radius: 8px; }
.dm-preview button { margin-top: 12px; background: transparent; border: 0; color: var(--dm-blue); padding: 8px 0; }
.dm-layout { height: calc(100dvh - 76px); display: grid; grid-template-columns: 290px minmax(0,1fr) 300px; }
.dm-assignments { background: #fff; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--dm-line); }
.dm-list-heading { display: flex; align-items: flex-start; justify-content: space-between; padding: 29px 22px 23px; }
.dm-list-heading h1 { font-size: 21px; letter-spacing: -.5px; font-weight: 800; }
.dm-list-heading p { color: var(--dm-muted); font-size: 12px; margin-top: 3px !important; }
.dm-count { min-width: 27px; height: 27px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 8px; background: #eef1f7; font-size: 12px; font-weight: 750; }
.dm-list { overflow: auto; padding: 0 12px 14px; flex: 1; scrollbar-width: thin; scrollbar-color: #dbe1ea transparent; }
.dm-order-toolbar { display: grid; gap: 5px; padding: 0 22px 16px; }
.dm-order-toolbar button { display: flex; align-items: center; gap: 6px; width: fit-content; padding: 5px 0; border: 0; background: transparent; color: var(--dm-blue); font-size: 12px; }
.dm-order-toolbar button svg { width: 15px !important; height: 15px !important; }
.dm-order-toolbar > span { color: var(--dm-muted); font-size: 10px; }
.dm-task-row { border-radius: 14px; margin-bottom: 6px; border: 1px solid transparent; }
.dm-task-row .dm-task { margin-bottom: 0; }
.dm-task-row.dm-order-editing { border-color: #e5eaf3; }
.dm-task-row[draggable="true"] { cursor: grab; }
.dm-task-row.dm-dragging { opacity: .45; }
.dm-task-row.dm-drop-target { border: 2px solid var(--dm-blue); background: #eff3ff; }
.dm-order-controls { display: flex; align-items: center; gap: 6px; padding: 0 10px 10px; }
.dm-order-controls > span { display: flex; align-items: center; gap: 4px; margin-right: auto; color: #8a98ac; font-size: 10px; }
.dm-order-controls > span svg { width: 14px !important; }
.dm-order-controls button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #dce4f2; border-radius: 9px; background: white; color: #5976ad; }
#driverModern .dm-order-controls button:disabled { opacity: .3; cursor: default; }
.dm-list-map { padding: 14px 18px; border-top: 1px solid var(--dm-line); background: #fff; }
.dm-list-map .dm-button { width: 100%; }
.dm-list-map small { display: block; margin-top: 6px; text-align: center; color: #8b99ae; font-size: 10px; }
.dm-address-warning { display: block; width: fit-content; padding: 4px 7px; border-radius: 6px; font-size: 10px; line-height: 1.6; font-weight: 650; margin-top: 9px; }
.dm-address-unresolved { color: #ad303e; background: #fff0f1; border-left: 3px solid #d64b5b; }
.dm-address-approximate { color: #8a5d0b; background: #fff6da; border-left: 3px solid #dfad34; }
.dm-address-confirmed { color: #227c64; background: #eaf8f2; border-left: 3px solid #42a68a; }
#driverModern.dm-manager-map-only { height: 0; }
#driverModern.dm-manager-map-only > :not(dialog):not(#dmToast) { display: none; }
.dm-map-profile-label { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 12px; color: #7c8da7; }
.dm-map-profile-label select { border: 1px solid #dde5f2; border-radius: 7px; padding: 7px; color: #536d97; background: white; }
.dm-map-stop-controls { display: flex; align-items: center; gap: 6px; padding: 0 6px 12px; }
.dm-map-stop-controls button { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 34px; min-height: 34px; border: 1px solid #dde5f2; border-radius: 8px; background: white; color: #6381b6; padding: 5px; }
.dm-map-stop-controls .dm-edit-point { margin-left: auto; font-size: 10px; }
.dm-map-stop-controls svg { width: 14px !important; height: 14px !important; }
.dm-map-stop-controls small { font-size: 10px; color: #96a1b2; }
.dm-point-editor { padding: 16px; overflow-y: auto; }
.dm-point-editor h3 { font-size: 14px; margin: 10px 0; }
#dmDialog .dm-point-editor p { font-size: 11px; margin: 10px 0; }
.dm-point-editor label { display: grid; gap: 5px; font-size: 11px; margin: 12px 0; color: #798ba7; }
.dm-point-editor input,.dm-point-editor textarea { width: 100%; padding: 9px; border: 1px solid #dee5ef; border-radius: 7px; color: #334b70; font: inherit; }
.dm-point-editor .dm-button { width: 100%; margin-top: 7px; }
.dm-point-draft { background: #de942e; font-size: 24px; }
#dmDialog.dm-stops-dialog { width: min(1220px,96vw); }
.dm-stops-heading { padding-right: 35px; }
#dmDialog .dm-stops-heading h2 { margin-top: 5px; margin-bottom: 8px; }
#dmDialog .dm-stops-heading p { font-size: 12px; margin: 0; }
.dm-map-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.dm-stops-layout { display: grid; grid-template-columns: minmax(0,1fr) 290px; height: min(56dvh,560px); min-height: 350px; border: 1px solid var(--dm-line); border-radius: 15px; overflow: hidden; }
#dmStopsMap { height: 100%; min-height: 0; background: #eaf0f4; z-index: 0; }
.dm-stops-list { overflow-y: auto; padding: 10px; background: #fff; }
.dm-stops-list button[data-map-stop] { display: flex; gap: 10px; width: 100%; text-align: left; border: 1px solid #e9edf4; background: #fff; color: var(--dm-ink); padding: 13px 10px; border-radius: 10px; margin-bottom: 8px; }
.dm-stops-list button[data-map-stop] > span { display: grid; place-items: center; height: 25px; min-width: 25px; background: #edf2ff; color: var(--dm-blue); border-radius: 8px; font-size: 11px; }
.dm-stops-list strong { font-size: 12px; }
#dmDialog .dm-stops-list p { font-size: 11px; margin: 5px 0; }
.dm-stops-list small { display: block; font-size: 10px; color: #8d99ac; margin-top: 7px; }
.dm-stops-list button.dm-stop-unresolved { border-color: #f1c1c9; background: #fff9fa; }
.dm-stops-list button.dm-stop-approximate { border-color: #efdaa2; background: #fffdf5; }
.dm-stops-list button.dm-stop-unresolved > span { background: #fde6ea; color: #b03948; }
.dm-stops-list button.dm-stop-approximate > span { background: #fff0c5; color: #986b14; }
.dm-stop-marker { display: grid; place-items: center; border-radius: 50%; background: #4169e1; border: 3px solid white; color: white; box-shadow: 0 2px 8px #182b4a50; font-size: 12px; font-weight: 800; }
.dm-stop-marker-approximate { background: #dfad34; color: #503700; }
#dmDialog .dm-stops-note { font-size: 11px; margin: 14px 0 0; }
#dmDialog .dm-stops-network { font-size: 12px; color: #a63a45; }
#dmStopsMap .leaflet-popup-content { font-family: 'Manrope','Segoe UI',sans-serif; font-size: 12px; line-height: 1.6; }
#dmStopsMap .leaflet-popup-content p { font-size: 11px; margin: 7px 0; }
#dmStopsMap .leaflet-popup-content small { color: #8190a6; }
@media(max-width:700px) {
  .dm-order-controls button { width: 44px; height: 44px; }
  .dm-stops-layout { display: flex; flex-direction: column; height: auto; }
  #dmStopsMap { height: 330px; flex-shrink: 0; }
  .dm-stops-list { max-height: 245px; }
  .dm-point-editor { max-height: 330px; }
  .dm-map-stop-controls button { min-width: 42px; min-height: 42px; }
  #dmDialog.dm-stops-dialog { padding: 18px; }
}
.dm-task { display: flex; gap: 12px; width: 100%; position: relative; padding: 16px 12px; border: 0; border-radius: 14px; background: transparent; text-align: left; color: var(--dm-ink); margin-bottom: 5px; }
.dm-task:hover { background: #f7f8fc; }
.dm-task.selected { background: #eef2ff; }
.dm-task-number { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: #f2f4f8; color: #8a96a9; font-size: 12px; font-weight: 700; flex-shrink: 0; margin-top: 2px; }
.dm-task.selected .dm-task-number { color: #fff; background: var(--dm-blue); box-shadow: 0 4px 10px #4169e124; }
.dm-task-copy { flex: 1; min-width: 0; }
.dm-list-caption { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--dm-muted); margin-bottom: 4px; }
.dm-task.selected .dm-list-caption { color: #526ca9; }
.dm-task-copy > strong { font-size: 14px; line-height: 1.5; font-weight: 750; display: block; overflow-wrap: anywhere; }
.dm-task-copy > p { font-size: 12px; color: var(--dm-muted); line-height: 1.5; margin-top: 4px !important; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.dm-list-bottom { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; margin-top: 10px; }
.dm-list-bottom span { font-size: 11px; color: #63759b; }
.dm-list-bottom small { color: #9aa3b3; font-size: 10px; }
.dm-source { padding: 17px 22px; display: flex; align-items: center; gap: 11px; border-top: 1px solid var(--dm-line); color: var(--dm-muted); font-size: 12px; }
.dm-source svg { color: #a1adbf; width: 17px !important; }
.dm-source small { display: block; font-size: 10px; margin-top: 2px; }
.dm-center { min-width: 0; padding: 27px 30px 40px; overflow-y: auto; background: var(--dm-wash); scrollbar-width: thin; scrollbar-color: #d5dcea transparent; scroll-behavior: smooth; }
.dm-task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dm-trip-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid #e4e9f2; }
.dm-trip-tools > span { font-size: 12px; color: #8090a8; }
.dm-trip-tools .dm-button { font-size: 11px; min-height: 38px; padding: 8px 11px; }
.dm-scan-title { display: flex; gap: 10px; align-items: center; color: #6586ba; margin-bottom: 12px; font-size: 10px; letter-spacing: 1px; }
.dm-scan-cargo { padding: 18px; background: #f1f5fd; border-radius: 12px; margin: 20px 0; }
.dm-scan-cargo span, .dm-scan-cargo small { display: block; margin-top: 5px; color: #8190a7; font-size: 12px; }
.dm-scan-status { padding: 13px 16px; background: #fff5e7; border: 1px solid #f4dfbd; color: #96703c; border-radius: 10px; font-size: 12px; margin: 20px 0; }
.dm-scan-steps { padding-left: 23px; display: grid; gap: 18px; }
.dm-scan-steps strong { display: block; font-size: 14px; }
.dm-scan-steps span { display: block; color: #8290a5; font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
#dmDialog .dm-scan-device { font-size: 12px; margin: 20px 0; }
.dm-scan-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dm-scan-manifest { max-height: 185px; overflow: auto; background: #f7f9fc; border-radius: 12px; padding: 7px 16px; }
.dm-scan-manifest > div { display: flex; gap: 15px; border-bottom: 1px solid #e9edf4; padding: 10px 0; font-size: 12px; }
.dm-scan-manifest > div:last-child { border: 0; }
.dm-scan-manifest strong { color: #6380ad; }
.dm-scan-manifest span { color: #7c8ba3; }
.dm-task-id { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #8a95a7; margin-bottom: 8px; }
.dm-task-id span:first-child { color: var(--dm-blue); font-weight: 700; }
.dm-task-top h2 { font-size: clamp(23px,2.1vw,31px); line-height: 1.25; font-weight: 800; letter-spacing: -.8px; }
.dm-archive-pill { margin-top: 1px; display: inline-flex; border-radius: 7px; padding: 4px 8px; color: #7c879a; background: #e9edf4; font-size: 11px; }
.dm-task-meta { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; color: var(--dm-muted); font-size: 12px; }
.dm-task-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.dm-task-meta svg { width: 15px !important; height: 15px !important; }
.dm-section-tabs { display: flex; gap: 25px; border-bottom: 1px solid #e0e5ef; margin: 23px 0 20px; }
.dm-section-tabs { overflow-x: auto; scrollbar-width: thin; }
.dm-section-tabs button { flex-shrink: 0; }
.dm-section-tabs button { display: flex; align-items: center; gap: 7px; position: relative; border: 0; padding: 0 0 13px; background: transparent; color: #8993a6; font-size: 13px; font-weight: 600; }
.dm-section-tabs button svg { width: 17px !important; height: 17px !important; }
.dm-section-tabs button.active { color: var(--dm-blue); }
.dm-section-tabs button.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--dm-blue); border-radius: 2px; }
.dm-map-section { border-radius: 20px; background: #fff; box-shadow: 0 5px 20px #23386106; overflow: hidden; scroll-margin-top: 20px; }
.dm-map-frame { position: relative; height: clamp(340px,35vw,470px); background: #e9eef3; }
.dm-map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.dm-map-expand { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; height: 40px; width: 40px; border: 0; border-radius: 11px; background: #fff; color: #485778; box-shadow: 0 2px 8px #1d2e5526; }
.dm-map-bottom { display: flex; gap: 12px; padding: 19px 21px 15px; align-items: flex-start; }
.dm-location-icon { width: 38px; height: 38px; background: #f0f3ff; border-radius: 11px; color: var(--dm-blue); display: grid; place-items: center; flex-shrink: 0; }
.dm-location strong { font-size: 13px; font-weight: 750; }
.dm-location p { font-size: 13px; color: var(--dm-muted); line-height: 1.6; margin-top: 3px !important; }
.dm-map-actions { display: flex; align-items: center; gap: 8px; padding: 0 21px 21px; flex-wrap: wrap; }
.dm-button { border: 1px solid #e3e8f1; background: #fff; color: #53617c; padding: 10px 15px; min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; font-size: 12px; font-weight: 650; }
.dm-button svg { width: 17px !important; height: 17px !important; }
.dm-button:hover { background: #f1f4fc; }
.dm-button.dm-primary { border-color: var(--dm-blue); background: var(--dm-blue); color: #fff; }
.dm-button.dm-primary:hover { background: #3359ca; }
.dm-icon-button { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 10px; border: 1px solid #e3e8f1; background: #fff; color: #7a88a4; }
.dm-information { padding: 23px; background: #fff; margin-top: 20px; border-radius: 17px; scroll-margin-top: 20px; }
.dm-information h3, .dm-discussion h3 { font-size: 17px; letter-spacing: -.3px; font-weight: 800; }
.dm-information dl { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 25px; margin: 20px 0; }
.dm-information dt { color: var(--dm-muted); font-size: 12px; margin-bottom: 3px; }
.dm-information dd { color: #394660; font-size: 14px; margin: 0; font-weight: 650; }
.dm-information dd small { display:block; font-size:12px; font-weight:400; color:var(--dm-muted); margin-top:5px; }
.dm-instructions { border-top:1px solid var(--dm-line); padding-top:20px; margin-top:22px; scroll-margin-top:20px; }
.dm-parameter-totals { display:flex; flex-wrap:wrap; gap:18px; margin:15px 0; color:var(--dm-muted); font-size:12px; }
.dm-parameter-totals strong { display:block; color:var(--dm-ink); font-size:16px; }
.dm-package-cards { display:grid; gap:12px; margin-top:14px; }
.dm-package-cards article { background:#f7f9fd; border:1px solid var(--dm-line); border-radius:12px; padding:15px; }
.dm-package-cards header { display:flex; justify-content:space-between; gap:10px; }
.dm-package-cards header span { color:var(--dm-muted); font-size:12px; }
.dm-package-cards dl { margin-bottom:0; }
.dm-required-documents { background:#f6f8fc; padding:14px; border-radius:12px; margin-bottom:20px; }
.dm-required-documents h3,.dm-available-documents { font-size:13px; margin:0 0 8px!important; }
.dm-required-documents>p { font-size:11px; color:var(--dm-muted); }
.dm-required-documents ul { list-style:none; padding:0; margin:12px 0; }
.dm-required-documents li { display:flex; justify-content:space-between; align-items:center; gap:8px; border-top:1px solid var(--dm-line); padding:10px 0; font-size:12px; }
.dm-required-documents small { display:block; font-size:10px; color:var(--dm-muted); }
.dm-required-documents li>span { font-size:10px; border-radius:6px; padding:4px 7px; }
.dm-doc-missing { color:#9b6922; background:#fff0d9; }
.dm-doc-present { color:#247150; background:#e3f5ed; }
.dm-quick-messages { display:flex; flex-wrap:wrap; gap:7px; margin:10px 0 15px; }
.dm-quick-messages button { border:1px solid #dfe6f2; background:#f8faff; border-radius:9px; color:#526784; padding:9px 11px; font-size:12px; min-height:40px; }
.dm-quick-messages button[aria-pressed=true] { background:#eaf0ff; border-color:#7b9aee; color:#345bc5; }
.dm-operation-receipts p { font-size:12px; border-top:1px solid var(--dm-line); padding-top:10px; margin-top:10px!important; }
.dm-operation-receipts small { display:block; color:var(--dm-muted); font-size:10px; }
.dm-section-tabs { overflow-x:auto; }
.dm-section-tabs button { white-space:nowrap; }
.dm-missing { border-top: 1px solid var(--dm-line); padding-top: 17px; }
.dm-missing summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #687897; cursor: pointer; font-size: 12px; list-style: none; }
.dm-missing summary svg { width: 16px !important; }
.dm-missing p { font-size: 13px; color: var(--dm-muted); margin-top: 12px !important; }
.dm-discussion { margin-top: 20px; padding: 23px; background: #fff; border-radius: 17px; scroll-margin-top: 20px; }
.dm-discussion-heading { display: flex; align-items: center; justify-content: space-between; }
.dm-discussion-heading > svg { color: #a3b1c8; }
.dm-discussion-heading p { font-size: 12px; color: var(--dm-muted); margin-top: 3px !important; }
.dm-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.dm-members span { font-size: 11px; color: #61708e; padding: 4px 8px; background: #f3f5fa; border-radius: 6px; }
.dm-conversation-note { color: #929caf; font-size: 11px; margin-top: 10px !important; }
.dm-chat-messages { padding: 20px 0; display: flex; flex-direction: column; gap: 12px; }
.dm-chat-empty { color: #8b97ac; font-size: 13px; line-height: 1.7; padding: 20px 0; }
.dm-chat-messages article { padding: 13px 16px; max-width: 85%; border-radius: 14px 14px 3px 14px; background: #edf2ff; align-self: flex-end; }
.dm-chat-messages article > div { display: flex; justify-content: space-between; gap: 25px; font-size: 11px; color: #6077b1; margin-bottom: 4px; }
.dm-chat-messages article p { font-size: 14px; }
#dmCompose label { display: block; color: var(--dm-muted); font-size: 12px; margin-bottom: 7px; }
.dm-compose-row { display: flex; gap: 8px; }
.dm-compose-row select { min-width: 0; flex: 1; border: 1px solid #e4e9f2; border-radius: 11px; background: #f9faff; color: #4e5d78; padding: 11px; font-size: 13px; }
.dm-stage-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.dm-stage-actions .dm-button { flex: 1; font-size: 11px; padding: 9px; }
.dm-stage-actions .dm-confirmed { color: #278969; background: #edf9f4; border-color: #d4eee2; }
.dm-log p { border-top: 1px solid var(--dm-line); margin-top: 12px !important; padding-top: 10px; font-size: 12px; }
.dm-log small { display: block; margin-top: 3px; color: var(--dm-muted); }
.dm-photos { min-width: 0; padding: 29px 22px; border-left: 1px solid var(--dm-line); overflow-y: auto; scrollbar-width: thin; }
.dm-photo-heading { display: flex; align-items: center; gap: 10px; }
.dm-photo-heading h2 { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.dm-photo-heading p { color: #97a1b3; font-size: 11px; margin-top: 2px !important; }
.dm-photo-heading .dm-count { margin-left: auto; }
.dm-photo-icon { color: #7f90ac; }
.dm-photo-context { display: flex; flex-direction: column; gap: 5px; padding: 23px 0; margin-top: 5px; }
.dm-photo-context span { font-size: 12px; color: var(--dm-muted); }
.dm-photo-context strong { font-size: 14px; font-weight: 650; }
.dm-photo-empty { min-height: 315px; border: 1px dashed #dce3ee; border-radius: 16px; background: #fafbfe; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dm-photo-empty > div { width: 60px; height: 60px; background: #edf1f9; color: #9aaeca; border-radius: 18px; display: grid; place-items: center; margin-bottom: 20px; }
.dm-photo-empty > div svg { width: 27px !important; height: 27px !important; }
.dm-photo-empty h3 { font-size: 14px; font-weight: 750; }
.dm-photo-empty p { margin-top: 9px !important; color: #8b97aa; font-size: 12px; line-height: 1.75; }
.dm-photo-empty > span { display: flex; align-items: center; gap: 5px; color: #9daabe; margin-top: 26px; font-size: 11px; }
.dm-photo-empty > span svg { width: 13px !important; height: 13px !important; }
.dm-camera-button { width: 100%; margin-top: 16px; }
.dm-photo-footnote { color: #9ba5b5; font-size: 11px; line-height: 1.8; margin-top: 13px !important; }
.dm-gallery { display: grid; gap: 13px; }
.dm-photo { padding: 0; border: 1px solid var(--dm-line); border-radius: 14px; overflow: hidden; background: #fff; text-align: left; color: var(--dm-ink); }
.dm-photo img { width: 100%; height: 205px; object-fit: cover; display: block; }
.dm-photo > span { display: block; padding: 11px; font-size: 12px; }
.dm-photo small { display: block; margin-top: 3px; font-size: 10px; color: var(--dm-muted); }
.dm-photo-stage { display: block; margin-top: 7px; color: #536da4; font-size: 11px; font-weight: 600; }
.dm-file-tabs { display: flex; gap: 4px; padding: 4px; background: #f2f5fa; border-radius: 10px; margin-top: 22px; }
.dm-file-tabs button { flex: 1; border: 0; background: transparent; color: #8390a4; border-radius: 7px; font-size: 11px; padding: 10px 5px; white-space: nowrap; }
.dm-file-tabs button[aria-selected="true"] { color: var(--dm-blue); background: #fff; box-shadow: 0 2px 6px #2338610a; font-weight: 700; }
.dm-file-tabs span { font-size: 10px; margin-left: 3px; }
.dm-stage-filter { display: grid; gap: 7px; margin: 18px 0; font-size: 11px; color: var(--dm-muted); }
.dm-stage-filter select { width: 100%; min-width: 0; padding: 11px 8px; border: 1px solid var(--dm-line); border-radius: 9px; background: #fff; color: #53617c; font-size: 12px; }
.dm-document-card { padding: 17px; border: 1px solid var(--dm-line); border-radius: 13px; margin-bottom: 12px; overflow-wrap: anywhere; }
.dm-document-card > svg { color: var(--dm-blue); }
.dm-document-card h3 { font-size: 13px; margin: 7px 0 !important; }
.dm-document-card p, .dm-document-card small, .dm-document-status { font-size: 11px; color: var(--dm-muted); }
.dm-document-card small { display: block; margin-top: 7px; }
.dm-document-card a { margin-top: 12px; text-decoration: none; }
.dm-document-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 15px; }
.dm-document-actions button { display: flex; align-items: center; justify-content: flex-start; gap: 6px; min-height: 40px; padding: 8px; background: #f7f9fe; border: 1px solid #e3e9f5; border-radius: 9px; color: #5371ad; font-size: 11px; }
.dm-document-actions button svg { width: 15px !important; height: 15px !important; }
.dm-document-actions button{min-width:0;height:44px;cursor:pointer;font-family:inherit;text-align:left}
.dm-document-actions button svg{flex-shrink:0}
.dm-document-actions button:hover:not(:disabled){background:#eaf0fc;border-color:#bfcef0}
.dm-document-actions button:focus-visible{outline:2px solid #4169e1;outline-offset:2px}
#dmDocuments{container-type:inline-size}
@container(max-width:270px){.dm-document-actions{grid-template-columns:1fr}}
#driverModern .dm-document-actions button:disabled { cursor: not-allowed; color: #8c99ad; opacity: .6; }
.dm-document-empty-actions { padding: 0 0 20px; }
.dm-document-empty-actions > p { font-size: 11px; color: #8996aa; margin-top: 9px !important; }
.dm-document-attachment { display: flex; gap: 13px; align-items: flex-start; padding: 17px; background: #f2f5fc; border-radius: 12px; margin-top: 15px; }
.dm-document-attachment > svg { color: #6584bf; }
#dmDialog .dm-document-attachment p { font-size: 12px; margin: 4px 0; }
.dm-forward-source { border-left: 3px solid #a5b9e3; background: #f8faff; padding: 14px 18px; margin-top: 15px; font-size: 12px; }
#dmDialog .dm-forward-source p { margin: 5px 0; font-size: 12px; }
.dm-document-message { display: grid; gap: 8px; color: #7d8da7; font-size: 12px; }
.dm-document-message textarea { width: 100%; border: 1px solid #e0e7f3; border-radius: 10px; padding: 12px; resize: vertical; font: inherit; color: #334760; }
.dm-transfer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
#dmTransferStatus { font-size: 13px; color: #627faa; }
.dm-document-status { margin-top: 18px !important; line-height: 1.8; }
.dm-document-status strong { display: block; color: #596d92; font-weight: 600; }
.dm-journey { padding: 24px; background: #fff; border-radius: 17px; margin-top: 20px; scroll-margin-top: 20px; }
.dm-journey-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.dm-journey-heading h3 { font-size: 18px; margin: 4px 0 0 !important; }
.dm-journey-heading > svg { color: #7b93c4; }
.dm-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: #8497b5; }
.dm-journey-note { font-size: 12px; color: #8592a6; margin-top: 12px !important; line-height: 1.8; }
.dm-journey-list { list-style: none; padding: 0; margin: 23px 0 0; }
.dm-journey-list > li { position: relative; display: flex; gap: 15px; padding-bottom: 24px; }
.dm-journey-list > li:last-child { padding-bottom: 0; }
.dm-journey-list > li:not(:last-child)::before { content: ''; position: absolute; left: 16px; top: 38px; bottom: 5px; border-left: 1px dashed #d4deee; }
.dm-journey-dot { width: 33px; height: 33px; border-radius: 11px; background: #eef3fe; color: #6483ba; display: grid; place-items: center; flex-shrink: 0; font-size: 12px; }
.dm-journey-dot svg { width: 17px !important; }
.dm-journey-list article { flex: 1; min-width: 0; padding-top: 4px; }
.dm-journey-list header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dm-journey-list h4 { font-size: 14px; margin: 0; }
.dm-journey-list header > span { font-size: 11px; color: #6883b2; }
.dm-journey-list article > strong { display: block; font-size: 13px; font-weight: 650; }
.dm-journey-list article > p { font-size: 12px; color: #8a96a7; margin-top: 4px !important; }
.dm-journey-list dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.dm-journey-list dt { font-size: 10px; color: #929daf; }
.dm-journey-list dd { font-size: 12px; color: #5e6e87; margin: 2px 0 0; overflow-wrap: anywhere; }
.dm-journey-list .dm-journey-status { color: #6886b2; font-size: 11px; }
.dm-journey-list .dm-journey-source { font-size: 10px; }
.dm-journey-files { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--dm-blue); padding: 10px 0 0; font-size: 11px; }
.dm-journey-files svg { width: 13px !important; height: 13px !important; }
.dm-journey-gap .dm-journey-dot { background: #f3f5f8; color: #9ba7ba; }
@media (min-width:901px) and (max-width:1199px) { .dm-file-tabs { flex-direction: column; } }
.dm-mobile-nav { display: none; }
.dm-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 80; max-width: min(90vw,520px); padding: 14px 20px; border-radius: 12px; color: #fff; background: #26354e; box-shadow: 0 8px 30px #17254530; font-size: 13px; }
#dmDialog { border: 0; border-radius: 20px; padding: 28px; color: var(--dm-ink); width: min(900px,95vw); max-height: 92dvh; box-shadow: 0 20px 90px #14274430; }
#dmDialog::backdrop { background: #17233b80; backdrop-filter: blur(4px); }
.dm-dialog-close { position: sticky; float: right; top: 0; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 0; background: #eff2f8; color: #4c6082; z-index: 2; }
#dmDialog h2 { font-size: 23px; margin-bottom: 14px; }
#dmDialog p { margin: 12px 0; color: var(--dm-muted); }
.dm-large-map { width: 100%; height: 72dvh; border: 0; margin-top: 12px; }
.dm-large-photo { display: block; width: 100%; max-height: 75dvh; object-fit: contain; margin-top: 12px; }
#dmVideo { width: 100%; max-height: 60dvh; background: #1d293b; border-radius: 12px; }

@media (min-width:1700px) { .dm-layout { grid-template-columns: 315px minmax(0,1fr) 350px; } .dm-center { padding-inline: 45px; } .dm-map-frame { height: 500px; } }
@media (max-width:1199px) and (min-width:901px) {
  .dm-layout { grid-template-columns: 235px minmax(0,1fr) 240px; }
  .dm-center { padding: 23px 18px; }
  .dm-photos { padding: 24px 16px; }
  .dm-task { gap: 8px; padding-inline: 8px; }
  .dm-task-number { width: 24px; height: 24px; }
  .dm-list-heading { padding-inline: 18px; }
  .dm-task-copy > strong { font-size: 13px; }
  .dm-photo-heading { flex-wrap: wrap; }
  .dm-photo-heading h2 { font-size: 14px; }
  .dm-photo-icon { display: none; }
  .dm-map-actions { gap: 6px; padding-inline: 15px; }
  .dm-map-actions .dm-button { padding-inline: 10px; }
  .dm-information dl { grid-template-columns: 1fr; gap: 15px; }
}
@media (max-width:900px) {
  #driverModern { height: 100dvh; }
  .dm-header { height: 65px; padding: 0 18px; gap: 16px; }
  .dm-brand strong { font-size: 26px; }
  .dm-section-name { font-size: 13px; }
  .dm-header-right { gap: 12px; }
  .dm-layout { display: block; height: calc(100dvh - 132px - env(safe-area-inset-bottom)); }
  .dm-assignments, .dm-center, .dm-photos { height: 100%; display: none; border: 0; }
  #driverModern[data-view="list"] .dm-assignments { display: flex; }
  #driverModern[data-view="task"] .dm-center, #driverModern[data-view="chat"] .dm-center { display: block; }
  #driverModern[data-view="photos"] .dm-photos { display: block; }
  .dm-center { padding: 24px; }
  .dm-map-frame { height: 410px; }
  .dm-mobile-nav { height: calc(67px + env(safe-area-inset-bottom)); padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4,1fr); background: white; border-top: 1px solid var(--dm-line); }
  .dm-mobile-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 12px; background: transparent; color: #929eb2; font-size: 11px; }
  .dm-mobile-nav button[aria-current="page"] { background: #eff3ff; color: var(--dm-blue); }
  .dm-task { max-width: 800px; margin-inline: auto; }
  .dm-task-copy > p { -webkit-line-clamp: 1; }
  .dm-list-caption, .dm-task-copy > strong { font-size: 15px; }
  .dm-task-number { width: 35px; height: 35px; }
  .dm-photos { padding: 25px; }
  .dm-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dm-photo-empty { grid-column: 1/-1; }
  .dm-toast { bottom: 85px; }
}
@media (max-width:560px) {
  .dm-section-name, .dm-header-divider { display: none; }
  .dm-header { padding-inline: 17px; }
  .dm-preview summary { font-size: 11px; }
  .dm-user { width: 34px; height: 34px; }
  .dm-center { padding: 22px 16px 32px; }
  .dm-task-top h2 { font-size: 24px; }
  .dm-task-meta { font-size: 11px; gap: 8px; }
  .dm-section-tabs { gap: 18px; margin-top: 21px; }
  .dm-section-tabs button { font-size: 12px; gap: 5px; }
  .dm-section-tabs button svg { width: 15px !important; }
  .dm-map-frame { height: 330px; }
  .dm-map-bottom { padding: 15px; }
  .dm-map-actions { padding: 0 15px 17px; gap: 6px; }
  .dm-map-actions .dm-button { font-size: 11px; padding: 9px 11px; }
  .dm-icon-button { width: 39px; }
  .dm-information, .dm-discussion { padding: 20px; }
  .dm-information dl { grid-template-columns: 1fr; gap: 15px; }
  .dm-information dl > div { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 10px; }
  .dm-information dd { font-size: 13px; }
  .dm-information dt { font-size: 11px; }
  .dm-stage-actions { flex-direction: column; }
  .dm-stage-actions .dm-button { font-size: 12px; }
  .dm-gallery { grid-template-columns: 1fr; }
  .dm-photo img { height: 280px; }
  #dmDialog { padding: 18px; }
}
@media (prefers-reduced-motion:reduce) { .dm-center { scroll-behavior: auto; } }

/* Cargo facts remain readable above the map, without repeating the driver. */
.dm-heading-address { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; color: #576986; font-size: 14px; line-height: 1.6; }
.dm-heading-address svg { width: 17px !important; height: 17px !important; margin-top: 3px; color: #6682bd; }
.dm-cargo-summary { margin-top: 19px; border-radius: 14px; background: #fff; overflow: hidden; }
.dm-cargo-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 17px 0; }
.dm-cargo-metrics > div { padding: 0 17px; border-right: 1px solid var(--dm-line); min-width: 0; }
.dm-cargo-metrics > div:last-child { border: 0; }
.dm-cargo-metrics span { display: block; font-size: 12px; color: #78859b; margin-bottom: 4px; }
.dm-cargo-metrics strong { display: block; font-size: 22px; font-weight: 750; line-height: 1.5; letter-spacing: -.5px; }
.dm-cargo-metrics small { font-size: 12px; font-weight: 600; letter-spacing: 0; color: #8490a3; }
.dm-cargo-metrics .dm-value-missing { font-size: 13px; letter-spacing: 0; color: #8994a8; padding-top: 7px; font-weight: 500; }
.dm-dimensions-line { display: flex; align-items: center; gap: 9px; padding: 11px 17px; border-top: 1px solid #f0f2f7; font-size: 12px; color: #79869b; }
.dm-dimensions-line svg { width: 16px !important; height: 16px !important; }
.dm-dimensions-line > span { flex: 1; overflow-wrap: anywhere; }
.dm-dimensions-line button, .dm-adr-summary button { padding: 6px 0 6px 10px; border: 0; background: transparent; color: var(--dm-blue); font-size: 12px; flex-shrink: 0; }
.dm-adr-summary { display: flex; align-items: center; gap: 9px; padding: 10px 2px 0; color: #8691a4; font-size: 12px; }
.dm-adr-summary > svg { width: 16px !important; height: 16px !important; }
.dm-adr-summary > span { flex: 1; }
.dm-adr-summary strong { font-weight: 550; }
.dm-adr-summary small { display: block; font-size: 12px; margin-top: 3px; }
.dm-adr-summary.dm-dangerous { background: #fff0df; color: #945011; border: 1px solid #efc796; border-radius: 12px; margin-top: 12px; padding: 12px 15px; }
.dm-adr-summary.dm-dangerous strong { font-size: 14px; font-weight: 750; }
.dm-adr-summary.dm-dangerous button { color: #945011; }
.dm-route-details { display: grid; gap: 18px; margin-top: 22px; }
.dm-route-stop { display: flex; gap: 12px; align-items: flex-start; }
.dm-route-marker { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #f0f4ff; color: #6982b7; flex-shrink: 0; }
.dm-route-marker svg { width: 17px !important; height: 17px !important; }
.dm-route-stop > div > span { display: block; color: #8190a5; font-size: 12px; }
.dm-route-stop strong { display: block; font-size: 14px; font-weight: 700; margin: 3px 0; }
.dm-route-stop p { font-size: 13px; color: #6f7f96; }
.dm-package-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-top: 19px; margin-top: 20px; border-top: 1px solid var(--dm-line); }
.dm-package-heading h4, .dm-adr-details h4 { font-size: 15px; font-weight: 750; margin: 0; }
.dm-package-heading > span { color: #8b96a9; font-size: 11px; }
.dm-package-empty { padding: 16px 0; }
.dm-package-empty > span { display: block; font-size: 12px; color: #7d8ba2; }
.dm-package-empty strong { display: block; font-size: 13px; font-weight: 550; color: #667893; margin-top: 4px; }
.dm-package-empty p, .dm-field-note { font-size: 12px; line-height: 1.7; color: #8b96a7; margin-top: 9px !important; }
.dm-package-table-wrap { overflow-x: auto; margin-top: 13px; }
.dm-package-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.dm-package-table th { color: #8190a6; font-size: 11px; font-weight: 550; padding: 9px 10px 9px 0; }
.dm-package-table td { padding: 12px 10px 12px 0; border-top: 1px solid var(--dm-line); }
.dm-package-table td:nth-child(3) { white-space: nowrap; }
.dm-adr-details { border-radius: 12px; background: #f6f8fc; padding: 17px; margin: 18px 0; scroll-margin-top: 22px; }
.dm-adr-details > p { font-size: 13px; color: #7a889f; margin-top: 7px !important; }
.dm-adr-details.dm-dangerous { background: #fff4e7; border: 1px solid #f3d4ac; }
.dm-adr-details.dm-dangerous h4 { color: #995214; }
.dm-adr-details dl { margin-bottom: 0; }
@media (min-width:901px) and (max-width:1199px) {
  .dm-cargo-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 0; }
  .dm-cargo-metrics > div:nth-child(2) { border: 0; }
}
@media (max-width:560px) {
  .dm-heading-address { font-size: 13px; }
  .dm-cargo-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 0; }
  .dm-cargo-metrics > div:nth-child(2) { border: 0; }
  .dm-cargo-metrics strong { font-size: 21px; }
  .dm-cargo-metrics .dm-value-missing { font-size: 13px; }
  .dm-dimensions-line { font-size: 11px; padding-inline: 14px; }
  .dm-adr-summary { flex-wrap: wrap; }
  .dm-adr-summary button { font-size: 11px; }
  .dm-package-heading { align-items: flex-start; }
  .dm-package-heading > span { white-space: nowrap; }
}
/* In-app viewing avoids unsupported native PDF tabs and popup blockers. */
#dmDialog.dm-document-dialog{width:min(1150px,96vw);max-height:96dvh;padding:18px}
#dmDialog.dm-document-dialog h2{margin:0 42px 12px 0}
.dm-document-viewer{display:block;width:100%;height:78dvh;border:1px solid #dce4ef;border-radius:10px;background:#f3f6fb}
