:root {
  --blue: #075ead;
  --blue-dark: #063f78;
  --blue-deep: #072c50;
  --blue-soft: #eaf4fc;
  --blue-mist: #f3f8fd;
  --ink: #172b3a;
  --ink-soft: #4f6372;
  --muted: #708493;
  --line: #dce6ed;
  --line-strong: #cad8e2;
  --surface: #ffffff;
  --background: #f4f8fb;
  --green: #0c8d60;
  --green-soft: #e9f8f2;
  --amber: #b86a00;
  --amber-soft: #fff5df;
  --red: #c43b42;
  --red-soft: #fff0f1;
  --violet: #6d4fd3;
  --shadow: 0 12px 36px rgba(26, 60, 84, .08);
  --shadow-lg: 0 26px 70px rgba(7, 44, 80, .18);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-width: 264px;
  --topbar-height: 78px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--background); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
html[data-feature-maps="off"] [data-map-address],
html[data-feature-maps="off"] #checkNewAddress,
html[data-feature-partner="off"] [data-route="partners"],
html[data-feature-partner="off"] [data-open-transmission],
html[data-feature-partner="off"] [data-feature-block="partner"],
html[data-feature-documents="off"] #newDocumentChecklist,
html[data-feature-documents="off"] .drawer-documents,
html[data-feature-routes="off"] [data-feature-block="routes"] { display: none !important; }
.muted { color: var(--muted); }

/* Shared brand */
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--blue-deep); }
.brand-mark { position: relative; display: grid; width: 48px; height: 35px; place-items: center; border: 2px solid currentColor; border-radius: 8px; font-weight: 900; letter-spacing: -.08em; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; top: 12px; width: 4px; height: 8px; border: 2px solid currentColor; }
.brand-mark::before { left: -6px; border-right: 0; border-radius: 3px 0 0 3px; }
.brand-mark::after { right: -6px; border-left: 0; border-radius: 0 3px 3px 0; }
.brand-mark span { font-size: 21px; transform: translateX(-1px); }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 18px; letter-spacing: .16em; }
.brand-copy small { margin-top: 5px; font-size: 8px; font-weight: 800; letter-spacing: .18em; opacity: .72; }
.brand--light { color: #fff; }

/* Login */
.login-screen { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 1.05fr) minmax(460px, .95fr); background: #fff; }
.login-brand-panel { position: relative; overflow: hidden; min-height: 100%; background: linear-gradient(145deg, #075ead 0%, #064c8f 55%, #063764 100%); color: #fff; }
.login-brand-panel::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(to bottom, #000, transparent 90%); pointer-events: none; }
.login-brand-content { position: relative; z-index: 2; display: flex; min-height: 100%; max-width: 760px; padding: 52px clamp(48px, 7vw, 110px); flex-direction: column; }
.login-message { margin: auto 0; padding: 90px 0 70px; }
.eyebrow { display: inline-block; color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow--light { color: #cfe9ff; }
.login-message h1 { max-width: 600px; margin: 20px 0 24px; font-size: clamp(46px, 5vw, 76px); line-height: .98; letter-spacing: -.055em; }
.login-message p { max-width: 510px; margin: 0; color: #d9ecfb; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.65; }
.login-proof { display: flex; flex-wrap: wrap; gap: 20px 30px; color: #d7eafa; font-size: 13px; font-weight: 650; }
.login-proof span { display: inline-flex; align-items: center; gap: 8px; }
.login-proof svg { width: 16px; height: 16px; }
.login-circles span { position: absolute; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.login-circles span:nth-child(1) { right: -180px; bottom: -210px; width: 570px; height: 570px; }
.login-circles span:nth-child(2) { right: -100px; bottom: -130px; width: 410px; height: 410px; }
.login-circles span:nth-child(3) { top: 16%; right: 11%; width: 90px; height: 90px; background: rgba(255,255,255,.04); }
.login-form-panel { display: grid; place-items: center; padding: 48px; background: linear-gradient(180deg, #fff, #fbfdff); }
.login-card { width: 100%; max-width: 450px; }
.mobile-login-brand { display: none; margin-bottom: 48px; }
.login-card h2 { margin: 12px 0 6px; font-size: 36px; line-height: 1.15; letter-spacing: -.035em; }
.login-card > .muted { margin: 0 0 32px; }
.login-card form { display: grid; gap: 19px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span:first-child { color: #425a6a; font-size: 12px; font-weight: 750; }
.field input, .field select, .field textarea, .list-toolbar select { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-strong); outline: none; border-radius: 10px; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .list-toolbar select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(7,94,173,.1); }
.field input::placeholder, .field textarea::placeholder { color: #9aacb8; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; top: 4px; right: 4px; }
.icon-button { display: inline-grid; width: 40px; height: 40px; padding: 0; place-items: center; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--blue-soft); color: var(--blue); }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 1px 0 4px; }
.check-line { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); }
.link-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--blue); font-weight: 750; cursor: pointer; }
.link-button svg { width: 15px; height: 15px; }
.form-error { min-height: 0; margin: -8px 0 0; color: var(--red); font-size: 13px; font-weight: 700; }
.button { display: inline-flex; min-height: 46px; padding: 10px 18px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 18px; height: 18px; }
.button--primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(7,94,173,.18); }
.button--primary:hover { background: #064f93; box-shadow: 0 10px 26px rgba(7,94,173,.25); }
.button--secondary { border-color: #b9cddd; background: #fff; color: var(--blue-dark); }
.button--secondary:hover { border-color: var(--blue); background: var(--blue-soft); }
.button--ghost { background: var(--blue-mist); color: var(--blue-dark); }
.button--wide { width: 100%; }
.button:disabled, button:disabled, select:disabled, input:disabled, textarea:disabled { cursor: not-allowed; opacity: .58; }
.button:disabled:hover, button:disabled:hover { transform: none; }
.login-footer { display: flex; margin-top: 36px; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.login-footer span:last-child { margin-left: auto; }
.login-footer .link-button { font-size: 12px; }

/* Public login and legal pages */
.public-body { overflow-x: hidden; background: #063f78; }
.public-login-page { position: relative; display: grid; min-height: 100dvh; padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)); place-items: center; overflow: hidden; background: radial-gradient(circle at 15% 10%, rgba(72,169,242,.34), transparent 28%), radial-gradient(circle at 88% 88%, rgba(0,36,72,.42), transparent 32%), linear-gradient(145deg, #0871c8 0%, #075ead 38%, #063866 100%); }
.public-login-page::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(135deg, #000, transparent 82%); pointer-events: none; }
.login-card--public { position: relative; z-index: 1; width: min(100%, 470px); max-width: none; padding: clamp(30px, 5vw, 48px); border: 1px solid rgba(255,255,255,.7); border-radius: 24px; background: rgba(255,255,255,.98); box-shadow: 0 34px 90px rgba(0,27,55,.32); }
.login-logo { display: flex; justify-content: center; }
.login-domain { margin: 14px 0 30px; color: #7b8f9d; font-size: 12px; font-weight: 750; letter-spacing: .06em; text-align: center; }
.login-lock { display: grid; width: 46px; height: 46px; margin-bottom: 22px; place-items: center; border: 1px solid #cfe1ef; border-radius: 14px; background: var(--blue-soft); color: var(--blue); }
.login-lock svg { width: 22px; height: 22px; }
.login-card--public h1 { margin: 9px 0 6px; font-size: clamp(32px, 6vw, 42px); letter-spacing: -.045em; }
.login-card--public > .muted { margin-bottom: 28px; }
.secure-login-form { display: grid; gap: 18px; }
.login-submit { min-height: 52px; margin-top: 2px; }
.login-submit svg { margin-left: auto; }
.login-error { display: flex; padding: 12px 13px; align-items: flex-start; gap: 9px; border: 1px solid #f2c4c8; border-radius: 11px; background: var(--red-soft); color: #a92731; font-size: 13px; font-weight: 700; }
.login-error svg { width: 18px; height: 18px; flex: 0 0 auto; }
.login-footer--public a { color: var(--blue-dark); font-weight: 750; text-decoration: none; }
.login-footer--public a:hover { text-decoration: underline; }
.public-legal-shell { min-height: 100dvh; padding: 0 clamp(18px, 4vw, 58px) 38px; background: linear-gradient(180deg, #075ead 0, #06477f 190px, var(--background) 190px); }
.public-legal-header { display: flex; max-width: 1080px; height: 118px; margin: 0 auto; align-items: center; justify-content: space-between; gap: 20px; }
.public-legal-header .brand { text-decoration: none; }
.public-legal-card { max-width: 930px; margin: 8px auto 0; padding: clamp(25px, 5vw, 56px); }
.public-legal-card h1 { margin: 8px 0 12px; font-size: clamp(34px, 6vw, 50px); letter-spacing: -.045em; }
.public-legal-card h2 { margin: 30px 0 8px; color: var(--blue-dark); font-size: 18px; }
.public-legal-card p, .public-legal-card li { color: var(--ink-soft); line-height: 1.75; }
.public-legal-card a { font-weight: 700; }
.legal-lead { margin: 0 0 28px; font-size: 17px; }
.public-legal-footer { display: flex; max-width: 930px; margin: 18px auto 0; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }

/* App shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; display: flex; width: var(--sidebar-width); padding: 29px 18px 20px; flex-direction: column; background: linear-gradient(180deg, #073d6d 0%, #062e53 100%); color: #d7e7f3; box-shadow: 8px 0 30px rgba(6,46,83,.09); }
.sidebar-brand { margin: 0 15px 33px; }
.sidebar-brand .brand-mark { width: 42px; height: 31px; }
.sidebar-brand .brand-copy strong { font-size: 16px; }
.sidebar-nav { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav-item { display: flex; min-height: 45px; width: 100%; padding: 10px 12px; align-items: center; gap: 12px; border: 0; border-radius: 10px; background: transparent; color: #bdd0df; font-size: 13px; font-weight: 700; text-align: left; text-decoration: none; cursor: pointer; }
.nav-item svg { width: 19px; height: 19px; flex: 0 0 auto; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: #fff; color: var(--blue-dark); box-shadow: 0 10px 24px rgba(0,0,0,.13); }
.nav-count { min-width: 22px; margin-left: auto; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.13); color: #fff; font-size: 10px; text-align: center; }
.nav-item.active .nav-count { background: var(--blue-soft); color: var(--blue); }
.nav-section { margin: 23px 12px 7px; color: #7794aa; font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.sidebar-footer { display: grid; gap: 2px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.nav-item--small { min-height: 35px; padding-top: 7px; padding-bottom: 7px; font-size: 12px; }
.nav-item--small svg { width: 16px; height: 16px; }
.sidebar-user { display: flex; margin-top: 11px; padding: 13px 8px 3px; align-items: center; gap: 10px; }
.avatar { display: inline-grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #d9edfd, #fff); color: var(--blue-dark); font-size: 11px; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(7,94,173,.12); }
.sidebar-user > span:nth-child(2), .profile-button > span:last-child { display: flex; min-width: 0; flex: 1; flex-direction: column; line-height: 1.25; }
.sidebar-user strong, .profile-button strong { overflow: hidden; color: #fff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small, .profile-button small { color: #8eacc1; font-size: 9px; }
.sidebar-user .icon-button { width: 34px; height: 34px; color: #9fb7ca; }
.logout-form { margin: 0; }
.app-area { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; z-index: 40; top: 0; display: flex; height: var(--topbar-height); padding: 0 34px; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(18px); }
.sidebar-toggle { display: none; }
.global-search { position: relative; display: flex; width: min(560px, 48vw); align-items: center; }
.global-search > svg { position: absolute; left: 14px; width: 18px; height: 18px; color: #8195a3; pointer-events: none; }
.global-search input { width: 100%; height: 44px; padding: 10px 62px 10px 42px; border: 1px solid transparent; outline: 0; border-radius: 11px; background: #f3f7fa; color: var(--ink); }
.global-search input:focus { border-color: #bfd4e5; background: #fff; box-shadow: 0 0 0 4px rgba(7,94,173,.07); }
.global-search kbd { position: absolute; right: 10px; padding: 3px 7px; border: 1px solid #d7e1e8; border-radius: 6px; background: #fff; color: #82939f; font-family: inherit; font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.notification-button { position: relative; border: 1px solid var(--line); background: #fff; color: var(--blue); }
.notification-button svg { width: 19px; height: 19px; }
.notification-button b { position: absolute; top: -6px; right: -6px; display: grid; min-width: 19px; height: 19px; padding: 0 4px; place-items: center; border: 2px solid #fff; border-radius: 99px; background: var(--red); color: #fff; font-size: 8px; }
.sync-pill { display: inline-flex; margin-right: 5px; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 650; }
.sync-pill i, .draft-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(12,141,96,.1); }
.sync-pill--saving i { background: var(--amber); box-shadow: 0 0 0 4px rgba(184,106,0,.1); animation: save-pulse 1s ease-in-out infinite; }
.sync-pill--error { color: var(--red); }
.sync-pill--error i { background: var(--red); box-shadow: 0 0 0 4px rgba(196,59,66,.1); }
@keyframes save-pulse { 50% { opacity: .35; } }
.profile-button { display: flex; padding: 5px 7px; align-items: center; gap: 8px; border: 0; border-radius: 11px; background: transparent; color: inherit; text-decoration: none; cursor: pointer; }
.profile-button:hover { background: var(--blue-mist); }
.profile-button strong { color: var(--ink); }
.profile-button small { color: var(--muted); }
.main-content { max-width: 1660px; margin: 0 auto; padding: 34px clamp(24px, 3.2vw, 52px) 72px; }
.page { display: none; animation: page-in .22s ease; }
.page.active { display: block; }
.public-back { display: none; }
.app-shell.public-mode .sidebar,
.app-shell.public-mode .topbar,
.app-shell.public-mode .mobile-nav { display: none !important; }
.app-shell.public-mode .app-area { margin-left: 0; }
.app-shell.public-mode .public-back { display: inline-flex; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-heading { display: flex; margin-bottom: 25px; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-heading h1 { margin: 6px 0 4px; font-size: clamp(28px, 3vw, 39px); line-height: 1.08; letter-spacing: -.04em; }
.page-heading p { margin: 0; color: var(--muted); }
.draft-pill, .pill { display: inline-flex; min-height: 30px; padding: 5px 11px; align-items: center; gap: 8px; border-radius: 999px; background: #edf2f5; color: var(--ink-soft); font-size: 11px; font-weight: 750; white-space: nowrap; }
.pill--blue { background: var(--blue-soft); color: var(--blue); }
.pill--green { background: var(--green-soft); color: var(--green); }
.pill--amber { background: var(--amber-soft); color: var(--amber); }
.pill--red { background: var(--red-soft); color: var(--red); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; padding: 21px 23px 17px; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading h2, .form-section h2, .form-summary h2, .tenant-panel h2, .role-panel h2, .legal-checklist h2 { margin: 4px 0 0; font-size: 19px; letter-spacing: -.025em; }

/* Dashboard */
.metric-grid { display: grid; margin-bottom: 22px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.metric-card { position: relative; display: grid; min-height: 142px; padding: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s; }
.metric-card { width: 100%; color: inherit; font: inherit; text-align: left; }
.metric-card:hover { transform: translateY(-2px); border-color: #c0d7e7; box-shadow: 0 16px 38px rgba(26,60,84,.12); }
.metric-card::after { content: ""; position: absolute; right: -25px; bottom: -35px; width: 100px; height: 100px; border-radius: 50%; background: var(--blue-soft); opacity: .5; }
.metric-card--danger::after { background: var(--red-soft); }
.metric-card--success::after { background: var(--green-soft); }
.metric-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.metric-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); }
.metric-card--danger .metric-icon { background: var(--red-soft); color: var(--red); }
.metric-card--success .metric-icon { background: var(--green-soft); color: var(--green); }
.metric-icon svg { width: 18px; height: 18px; }
.metric-number { margin: 11px 0 0; font-size: 31px; font-weight: 850; line-height: 1; letter-spacing: -.04em; }
.metric-card p { position: relative; z-index: 1; margin: 7px 0 0; color: var(--muted); font-size: 12px; font-weight: 650; }
.metric-badge { padding: 3px 7px; border-radius: 99px; background: var(--blue-mist); color: var(--blue); font-size: 9px; font-weight: 800; }
.dashboard-grid { display: grid; margin-bottom: 22px; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .8fr); gap: 20px; }
.task-list { padding: 0 10px 12px; }
.task-row { display: grid; min-height: 75px; width: 100%; padding: 12px 13px; align-items: center; grid-template-columns: 42px minmax(150px, 1.25fr) minmax(130px, .85fr) 115px 35px; gap: 12px; border: 0; border-top: 1px solid #edf2f5; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.task-row:hover { border-radius: 10px; background: var(--blue-mist); }
.task-time { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; background: var(--blue-soft); color: var(--blue-dark); font-size: 11px; font-weight: 850; }
.task-customer, .task-next { display: flex; min-width: 0; flex-direction: column; }
.task-customer strong, .task-next strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.task-customer small, .task-next small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.status-badge { display: inline-flex; width: fit-content; min-height: 25px; padding: 4px 8px; align-items: center; gap: 5px; border-radius: 7px; background: #edf2f5; color: var(--ink-soft); font-size: 9px; font-weight: 850; line-height: 1.2; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-badge--blue { background: var(--blue-soft); color: var(--blue); }
.status-badge--amber { background: var(--amber-soft); color: var(--amber); }
.status-badge--green { background: var(--green-soft); color: var(--green); }
.status-badge--red { background: var(--red-soft); color: var(--red); }
.task-arrow { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: #92a4af; }
.task-row:hover .task-arrow { background: #fff; color: var(--blue); }
.route-list { padding: 1px 21px 23px; }
.route-row { position: relative; display: grid; width: 100%; padding: 10px 0 16px 37px; grid-template-columns: 1fr auto; gap: 10px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.route-row:hover strong { color: var(--blue); }
.route-row:not(:last-child)::after { content: ""; position: absolute; top: 35px; bottom: -2px; left: 10px; border-left: 1px dashed #b9ccd9; }
.route-dot { position: absolute; top: 13px; left: 0; display: grid; width: 21px; height: 21px; place-items: center; border: 5px solid var(--blue-soft); border-radius: 50%; background: var(--blue); z-index: 1; }
.route-row > span { display: flex; min-width: 0; flex-direction: column; }
.route-row strong { font-size: 12px; }
.route-row small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.route-row em { color: var(--blue); font-size: 11px; font-style: normal; font-weight: 850; }
.quick-panel { padding-bottom: 16px; }
.quick-grid { display: grid; padding: 0 16px; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quick-grid button { display: grid; min-height: 82px; padding: 13px; align-items: center; grid-template-columns: 42px 1fr 20px; gap: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; text-align: left; cursor: pointer; }
.quick-grid button:hover { border-color: #b9d0e0; background: var(--blue-mist); }
.quick-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); }
.quick-grid button > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.quick-grid strong { font-size: 12px; }
.quick-grid small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.quick-grid .chevron { width: 16px; color: #9aabb6; }
.module-panel { margin-top: 22px; padding-bottom: 18px; }
.module-grid { display: grid; padding: 0 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.module-card { display: grid; min-height: 142px; padding: 17px; align-content: start; grid-template-columns: 42px 1fr; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #fff, #f8fbfd); color: var(--ink); text-decoration: none; transition: transform .18s, border-color .18s, box-shadow .18s; }
.module-card:hover { transform: translateY(-2px); border-color: #b8d3e7; box-shadow: 0 13px 30px rgba(26,60,84,.11); }
.module-card--system { background: linear-gradient(145deg, #f3f8fd, #fff); }
.module-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); }
.module-icon svg { width: 20px; height: 20px; }
.module-card > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.module-card strong { font-size: 13px; line-height: 1.35; }
.module-card small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.module-card em { display: inline-flex; grid-column: 1 / -1; margin-top: auto; align-items: center; justify-content: flex-end; gap: 3px; color: var(--blue); font-size: 10px; font-style: normal; font-weight: 850; }
.module-card em svg { width: 13px; height: 13px; }

/* Lists */
.list-panel { overflow: hidden; }
.list-toolbar { display: flex; padding: 17px 19px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.inline-search { position: relative; display: flex; min-width: 260px; flex: 1; align-items: center; }
.inline-search--wide { max-width: 680px; }
.inline-search svg { position: absolute; left: 13px; width: 17px; height: 17px; color: #8195a3; }
.inline-search input { width: 100%; height: 43px; padding: 9px 14px 9px 40px; border: 1px solid var(--line); outline: 0; border-radius: 10px; background: #f8fafc; }
.inline-search input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(7,94,173,.08); }
.list-toolbar select { width: auto; min-width: 170px; min-height: 43px; padding: 9px 34px 9px 11px; font-size: 11px; }
.filter-chips { display: flex; padding: 13px 19px; gap: 7px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips button { display: inline-flex; min-height: 31px; padding: 6px 11px; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-soft); font-size: 10px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.filter-chips button.active, .filter-chips button:hover { border-color: var(--blue); background: var(--blue); color: #fff; }
.filter-chips b { font-size: 9px; }
.job-table { width: 100%; border-collapse: collapse; }
.job-table th { padding: 13px 16px; background: #f8fafb; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.job-table td { padding: 14px 16px; border-top: 1px solid #edf2f5; vertical-align: middle; }
.job-table tbody tr { cursor: pointer; }
.job-table tbody tr:hover { background: var(--blue-mist); }
.job-main, .vehicle-cell, .next-cell { display: flex; min-width: 0; flex-direction: column; }
.job-main strong { font-size: 12px; }
.job-main small, .vehicle-cell small, .next-cell small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.job-id { color: var(--blue); font-size: 9px; font-weight: 850; }
.plate { display: inline-flex; width: fit-content; padding: 3px 7px; border: 1px solid #253846; border-radius: 4px; background: #fff; color: #182833; font-family: "Arial Narrow", Arial, sans-serif; font-size: 11px; font-weight: 900; letter-spacing: .05em; }
.employee-cell { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.employee-cell .avatar { width: 27px; height: 27px; font-size: 8px; }
.row-action { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #91a3af; cursor: pointer; }
.row-action:hover { background: #fff; color: var(--blue); box-shadow: 0 3px 12px rgba(23,43,58,.1); }
.mobile-job-list { display: none; }
.empty-state { padding: 48px 20px; color: var(--muted); text-align: center; }

/* New job form */
.new-job-layout { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; }
.form-main { display: grid; gap: 18px; }
.form-section { padding: 22px; }
.form-section-heading { display: flex; margin-bottom: 22px; align-items: flex-start; gap: 13px; }
.form-section-heading > span { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 850; }
.form-section-heading h2 { margin-top: 0; }
.form-section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field--wide { grid-column: 1 / -1; }
.map-helper { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 12px; }
.map-helper > span { grid-column: 1 / -1; }
.map-helper .button { width: fit-content; }
.map-helper small { color: var(--muted); font-size: 10px; }
.plate-input, .vin-input { font-family: "Arial Narrow", ui-monospace, monospace; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.check-box-field { display: flex; min-height: 48px; padding: 12px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--blue-mist); }
.check-box-field > span { font-size: 11px !important; }
.alternate-addresses { display: grid; padding: 15px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; border: 1px solid #cfe0ec; border-radius: 12px; background: #f7faff; }
.alternate-addresses > div { display: grid; align-content: start; gap: 10px; }
.alternate-addresses > div > strong { color: var(--blue-dark); font-size: 11px; }
.address-row { display: grid; grid-template-columns: minmax(80px, .6fr) minmax(0, 1.4fr); gap: 9px; }
.document-checklist { display: grid; margin-bottom: 18px; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.document-checklist label { display: flex; min-height: 65px; padding: 12px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.document-checklist label:has(input:checked) { border-color: #8ac9b1; background: var(--green-soft); }
.document-checklist label > span { display: flex; flex-direction: column; }
.document-checklist strong { font-size: 11px; }
.document-checklist small { color: var(--muted); font-size: 9px; }
.notes-grid .field { align-content: start; }
.internal-field { padding: 13px; border: 1px solid #cddced; border-radius: 12px; background: #f7faff; }
.internal-field > span b { margin-left: 5px; padding: 2px 5px; border-radius: 5px; background: var(--blue); color: #fff; font-size: 7px; letter-spacing: .08em; }
.form-summary { position: sticky; top: calc(var(--topbar-height) + 20px); padding: 22px; }
.summary-placeholder { display: flex; margin: 17px 0; padding: 14px; align-items: center; gap: 11px; border-radius: 12px; background: var(--blue-mist); }
.summary-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: #fff; color: var(--blue); }
.summary-placeholder p { margin: 0; color: var(--muted); font-size: 10px; }
.form-summary dl { margin: 0 0 16px; }
.form-summary dl div { display: flex; padding: 9px 0; justify-content: space-between; gap: 14px; border-bottom: 1px solid #edf2f5; font-size: 10px; }
.form-summary dt { color: var(--muted); }
.form-summary dd { margin: 0; font-weight: 750; text-align: right; }
.summary-alert { display: flex; margin: 15px 0; padding: 12px; align-items: flex-start; gap: 10px; border: 1px solid #d7e7f4; border-radius: 11px; background: var(--blue-mist); color: var(--blue-dark); }
.summary-alert svg { width: 18px; height: 18px; flex: 0 0 auto; }
.summary-alert span { display: flex; flex-direction: column; }
.summary-alert strong { font-size: 10px; }
.summary-alert small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.form-summary .button + .button { margin-top: 8px; }

/* Customers */
.customer-grid { display: grid; padding: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.customer-card { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .15s, transform .15s; }
.customer-card:hover { transform: translateY(-1px); border-color: #b6cfdf; }
.customer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.customer-identity { display: flex; align-items: center; gap: 10px; }
.customer-identity .avatar { width: 40px; height: 40px; }
.customer-identity span { display: flex; flex-direction: column; }
.customer-identity strong { font-size: 12px; }
.customer-identity small { color: var(--muted); font-size: 9px; }
.customer-details { display: grid; margin: 15px 0; gap: 7px; color: var(--ink-soft); font-size: 10px; }
.customer-details span { display: flex; align-items: center; gap: 7px; }
.customer-details svg { width: 14px; height: 14px; color: var(--blue); }
.customer-meta { display: flex; padding-top: 12px; align-items: center; justify-content: space-between; border-top: 1px solid #edf2f5; }
.customer-meta small { color: var(--muted); font-size: 9px; }

/* Offices and partners */
.info-banner { display: flex; margin-bottom: 18px; padding: 14px 17px; align-items: flex-start; gap: 12px; border: 1px solid #bcd7e9; border-radius: 13px; background: var(--blue-soft); color: var(--blue-dark); }
.info-banner--warning { border-color: #f0d6a3; background: var(--amber-soft); color: #714716; }
.info-banner svg { width: 19px; height: 19px; flex: 0 0 auto; }
.info-banner > div { display: flex; flex-direction: column; }
.info-banner strong { font-size: 11px; }
.info-banner span { margin-top: 2px; font-size: 10px; }
.office-grid, .partner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.office-card, .partner-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.office-card-head, .partner-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.office-icon, .partner-icon { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); }
.office-title, .partner-title { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.office-title strong, .partner-title strong { font-size: 14px; }
.office-title small, .partner-title small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.office-body { display: grid; margin-top: 18px; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; }
.office-info, .hours-list { display: grid; align-content: start; gap: 8px; }
.office-info span { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-soft); font-size: 10px; }
.office-info svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--blue); }
.hours-list { padding: 12px; border-radius: 11px; background: #f8fafb; }
.hours-list strong { margin-bottom: 2px; font-size: 10px; }
.hours-list span { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-soft); font-size: 9px; }
.office-actions, .partner-actions { display: flex; margin-top: 16px; flex-wrap: wrap; gap: 8px; }
.office-actions .button, .partner-actions .button { min-height: 38px; padding: 7px 11px; flex: 1; font-size: 10px; }
.source-row { display: flex; margin-top: 13px; padding-top: 11px; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #edf2f5; color: var(--muted); font-size: 8px; }
.source-row a { font-weight: 750; text-decoration: none; }
.partner-grid { margin-bottom: 20px; }
.partner-card { display: grid; grid-template-columns: auto 1fr; gap: 13px; }
.partner-card-head { display: contents; }
.partner-card-body { grid-column: 1 / -1; }
.partner-capabilities { display: flex; margin: 12px 0; flex-wrap: wrap; gap: 6px; }
.partner-capabilities span { padding: 4px 7px; border-radius: 6px; background: #f0f4f7; color: var(--ink-soft); font-size: 8px; font-weight: 750; }
.transmission-log-panel { overflow: hidden; }
.transmission-log { padding: 0 22px 17px; }
.transmission-row { display: grid; padding: 13px 0; align-items: center; grid-template-columns: 33px minmax(150px, 1fr) minmax(130px, .7fr) auto; gap: 10px; border-top: 1px solid #edf2f5; }
.transmission-row > svg { display: grid; width: 31px; height: 31px; padding: 7px; border-radius: 9px; background: var(--blue-soft); color: var(--blue); }
.transmission-row span { display: flex; min-width: 0; flex-direction: column; }
.transmission-row strong { font-size: 10px; }
.transmission-row small { color: var(--muted); font-size: 8px; }

/* Users and settings */
.settings-grid { display: grid; align-items: start; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 20px; }
.settings-main { overflow: hidden; }
.user-list { padding: 0 20px 16px; }
.user-row { display: grid; padding: 14px 2px; align-items: center; grid-template-columns: minmax(180px, 1fr) 150px 120px 40px; gap: 12px; border-top: 1px solid #edf2f5; }
.user-identity { display: flex; min-width: 0; align-items: center; gap: 10px; }
.user-identity span { display: flex; min-width: 0; flex-direction: column; }
.user-identity strong { font-size: 11px; }
.user-identity small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; }
.user-row select { min-height: 38px; padding: 7px 28px 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 9px; }
.active-label { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 9px; font-weight: 800; }
.active-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.role-panel, .tenant-panel { padding: 22px; }
.role-list { display: grid; margin-top: 18px; gap: 16px; }
.role-list > div { display: flex; align-items: flex-start; gap: 10px; }
.role-list > div > span:last-child { display: flex; flex-direction: column; }
.role-list strong { font-size: 10px; }
.role-list small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.role-dot { width: 9px; height: 9px; margin-top: 4px; flex: 0 0 auto; border-radius: 50%; background: #879aa7; }
.role-dot--admin { background: var(--blue); }
.role-dot--dispatch { background: var(--violet); }
.role-dot--office { background: var(--green); }
.role-dot--driver { background: var(--amber); }
.toggle-list { padding: 0 20px 17px; }
.toggle-row { display: flex; min-height: 69px; padding: 12px 2px; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid #edf2f5; }
.toggle-row > span { display: flex; flex-direction: column; }
.toggle-row strong { font-size: 11px; }
.toggle-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.switch { position: relative; display: inline-block; width: 43px; height: 25px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #c9d4db; cursor: pointer; transition: .2s; }
.switch i::before { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: .2s; }
.switch input:checked + i { background: var(--blue); }
.switch input:checked + i::before { transform: translateX(18px); }
.tenant-panel { display: grid; gap: 15px; }
.tenant-panel h2 { margin-bottom: 3px; }
.color-field { display: flex; align-items: center; gap: 9px; }
.color-field input { width: 58px; height: 44px; padding: 3px; }
.color-field code { color: var(--ink-soft); font-size: 11px; }

/* Legal */
.legal-layout { display: grid; align-items: start; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 20px; }
.legal-content { padding: clamp(22px, 4vw, 42px); }
.legal-content h2 { margin: 30px 0 8px; font-size: 17px; letter-spacing: -.02em; }
.legal-content h2:first-of-type { margin-top: 22px; }
.legal-content p, .legal-content li { color: var(--ink-soft); font-size: 12px; line-height: 1.72; }
.legal-content ul { padding-left: 20px; }
.legal-warning { display: flex; padding: 16px; align-items: flex-start; gap: 11px; border: 1px solid #efd9ad; border-radius: 12px; background: var(--amber-soft); color: #6f4a19; }
.legal-warning svg { width: 20px; height: 20px; flex: 0 0 auto; }
.legal-warning p { margin: 0; color: inherit; }
.legal-checklist { position: sticky; top: calc(var(--topbar-height) + 20px); display: grid; padding: 22px; gap: 12px; }
.legal-checklist h2 { margin-bottom: 5px; }
.legal-checklist label { display: flex; padding: 10px 0; align-items: center; gap: 9px; border-bottom: 1px solid #edf2f5; color: var(--ink-soft); font-size: 10px; }
.legal-checklist p { margin: 3px 0 8px; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.imprint-brand { margin-bottom: 22px; }

/* Drawer, modal and toast */
.job-drawer { position: fixed; z-index: 100; inset: 0; display: none; }
.job-drawer.open { display: block; }
.drawer-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(3,28,49,.47); backdrop-filter: blur(2px); }
.drawer-panel { position: absolute; top: 0; right: 0; display: flex; width: min(560px, 94vw); height: 100%; flex-direction: column; background: #fff; box-shadow: -20px 0 60px rgba(7,44,80,.23); animation: drawer-in .24s ease; }
@keyframes drawer-in { from { transform: translateX(100%); } }
.drawer-header { display: flex; padding: 21px 23px; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 5px 0 0; font-size: 23px; letter-spacing: -.03em; }
.drawer-close, .sheet-close { font-size: 24px; }
.drawer-content { flex: 1; overflow-y: auto; }
.drawer-hero { padding: 20px 23px; background: var(--blue-mist); }
.drawer-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drawer-hero h3 { margin: 12px 0 3px; font-size: 18px; }
.drawer-hero p { margin: 0; color: var(--muted); font-size: 11px; }
.drawer-section { padding: 20px 23px; border-bottom: 1px solid var(--line); }
.drawer-section h3 { margin: 0 0 14px; font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-item { display: flex; min-width: 0; padding: 11px; flex-direction: column; border-radius: 10px; background: #f7f9fb; }
.detail-item small { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.detail-item strong { overflow-wrap: anywhere; margin-top: 3px; font-size: 10px; }
.drawer-checklist { display: grid; gap: 8px; }
.drawer-checklist label { display: flex; min-height: 39px; padding: 8px 10px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; font-size: 10px; }
.note-block { padding: 12px; border-left: 3px solid var(--blue); border-radius: 0 10px 10px 0; background: var(--blue-mist); font-size: 10px; }
.drawer-actions { position: sticky; bottom: 0; display: flex; padding: 15px 23px calc(15px + env(safe-area-inset-bottom)); flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); }
.drawer-actions .button { min-width: 120px; flex: 1; font-size: 10px; }
.timeline { display: grid; gap: 0; }
.timeline-row { position: relative; display: grid; min-height: 53px; padding-left: 28px; grid-template-columns: 1fr auto; gap: 10px; }
.timeline-row::before { content: ""; position: absolute; top: 4px; left: 3px; width: 9px; height: 9px; border: 3px solid var(--blue-soft); border-radius: 50%; background: var(--blue); }
.timeline-row:not(:last-child)::after { content: ""; position: absolute; top: 16px; bottom: 0; left: 9px; border-left: 1px solid #c7d7e1; }
.timeline-row span { display: flex; flex-direction: column; }
.timeline-row strong { font-size: 9px; }
.timeline-row small { color: var(--muted); font-size: 8px; }
.timeline-row time { color: var(--muted); font-size: 8px; }
.modal { position: fixed; z-index: 120; inset: 0; display: grid; padding: 20px; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(3,28,49,.55); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(480px, 100%); max-height: calc(100dvh - 40px); padding: 28px; overflow-y: auto; border-radius: 20px; background: #fff; box-shadow: var(--shadow-lg); animation: modal-in .2s ease; }
.modal-card--wide { width: min(760px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(9px) scale(.98); } }
.modal-icon { display: grid; width: 48px; height: 48px; margin-bottom: 16px; place-items: center; border-radius: 14px; background: var(--blue-soft); color: var(--blue); }
.modal-card h2 { margin: 6px 0 8px; font-size: 23px; letter-spacing: -.03em; }
.modal-card > p { margin: 0 0 19px; color: var(--muted); font-size: 11px; }
.modal-card .field { margin-top: 12px; }
.crud-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.crud-form-grid .field--wide { grid-column: 1 / -1; }
.crud-form-grid textarea { min-height: 92px; resize: vertical; }
.crud-form-grid .check-box-field { margin-top: 16px; }
.record-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.record-actions .button { min-height: 34px; padding: 6px 10px; font-size: 9px; }
.archived-card { border-style: dashed; opacity: .74; }
.transmission-payload { display: grid; margin-top: 14px; padding: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border: 1px solid #d5e5f1; border-radius: 11px; background: var(--blue-mist); }
.transmission-payload span { display: flex; min-width: 0; flex-direction: column; }
.transmission-payload small { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.transmission-payload strong { overflow-wrap: anywhere; margin-top: 2px; font-size: 10px; }
.modal-actions { display: flex; margin-top: 22px; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; z-index: 150; right: 24px; bottom: 24px; display: flex; max-width: 380px; padding: 12px 16px 12px 11px; align-items: center; gap: 10px; border: 1px solid #c7e4d8; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 17px 48px rgba(7,44,80,.18); opacity: 0; transform: translateY(20px); pointer-events: none; transition: .22s; }
.toast.show { opacity: 1; transform: none; }
.toast-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; background: var(--green-soft); color: var(--green); }
.toast-icon svg { width: 16px; height: 16px; }
#toastText { font-size: 11px; font-weight: 750; }
.mobile-nav, .mobile-more-sheet { display: none; }
.app-footer { position: fixed; z-index: 42; right: 20px; bottom: 14px; display: inline-flex; padding: 7px 10px; align-items: center; gap: 10px; border: 1px solid rgba(202,216,226,.9); border-radius: 999px; background: rgba(255,255,255,.92); color: var(--muted); font-size: 9px; font-weight: 750; box-shadow: 0 8px 24px rgba(7,44,80,.1); backdrop-filter: blur(12px); }
.app-footer span + span { padding-left: 10px; border-left: 1px solid var(--line); color: var(--blue); }
.footer-update { display: inline-flex; padding: 4px 8px; align-items: center; gap: 5px; border: 0; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font: inherit; cursor: pointer; }
.footer-update svg { width: 12px; height: 12px; }
.footer-update:disabled { opacity: .55; cursor: wait; }
.job-signal { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(20,45,65,.15); vertical-align: -1px; }
.job-signal--red { background: #d52c3c; }
.job-signal--blue { background: #1976d2; }
.job-signal--green { background: #159052; }
.handover-grid { display: grid; margin-top: 12px; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px; }
.handover-grid .button { min-height: 43px; }
.handover-summary { display: grid; margin-top: 14px; padding: 12px; gap: 6px; border: 1px solid #cde0ef; border-radius: 11px; background: #f5faff; font-size: 12px; }
.handover-summary .pending { color: var(--red); }
.notification-modal { max-width: 920px; }
.notification-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.notification-head h2 { margin: 3px 0 16px; }
.notification-layout { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(280px,.7fr); gap: 18px; }
.notification-list { display: grid; max-height: 55dvh; padding-right: 5px; overflow-y: auto; gap: 9px; }
.notification-item { display: flex; padding: 13px; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.notification-item.is-important { border-color: #efb1b7; background: #fff7f8; }
.notification-item.is-read { opacity: .66; }
.notification-item > div { min-width: 0; }
.notification-item strong,.notification-item p,.notification-item small { display: block; }
.notification-item p { margin: 5px 0; white-space: pre-wrap; }
.notification-item small { color: var(--muted); }
.notification-type { display: inline-block; margin-bottom: 4px; color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.message-form { display: grid; padding: 16px; align-content: start; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbfd; }
.message-form h3 { margin: 0; }

/* Tablet */
@media (max-width: 1180px) {
  :root { --sidebar-width: 224px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .customer-grid { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-table th:nth-child(4), .job-table td:nth-child(4) { display: none; }
  .document-checklist { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .login-screen { grid-template-columns: 1fr 1fr; }
  .login-brand-content { padding: 42px; }
  .login-message h1 { font-size: 47px; }
  :root { --sidebar-width: 260px; }
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.open { transform: none; }
  .app-area { margin-left: 0; }
  .sidebar-toggle { display: inline-grid; }
  .global-search { flex: 1; width: auto; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .new-job-layout { grid-template-columns: 1fr; }
  .form-summary { position: static; }
  .settings-grid, .legal-layout { grid-template-columns: 1fr; }
  .legal-checklist { position: static; }
}

/* Mobile */
@media (max-width: 680px) {
  :root { --topbar-height: 64px; --radius: 15px; }
  body { font-size: 14px; }
  .login-screen { display: block; min-height: 100dvh; background: linear-gradient(180deg, #f2f8fd 0, #fff 42%); }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100dvh; padding: 30px 21px; align-items: start; }
  .login-card { padding-top: 10px; }
  .mobile-login-brand { display: inline-flex; }
  .login-card h2 { font-size: 30px; }
  .sidebar { display: none; }
  .topbar { height: calc(var(--topbar-height) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 15px 0; gap: 8px; }
  .sidebar-toggle, .profile-button, .sync-pill, .global-search kbd { display: none; }
  .global-search { min-width: 0; }
  .global-search input { height: 42px; padding-right: 12px; font-size: 12px; }
  .topbar-actions { gap: 0; }
  .main-content { padding: 23px 15px calc(96px + env(safe-area-inset-bottom)); }
  .page-heading { margin-bottom: 18px; align-items: flex-start; flex-direction: column; gap: 14px; }
  .page-heading h1 { font-size: 30px; }
  .page-heading p { font-size: 12px; }
  .page-heading .button { width: 100%; }
  .page-heading .public-back { width: 100%; }
  .dashboard-heading .button { display: none; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .metric-card { min-height: 125px; padding: 15px; }
  .metric-number { font-size: 27px; }
  .metric-card p { font-size: 10px; }
  .metric-grid .metric-card:last-child { grid-column: 1 / -1; min-height: 105px; }
  .dashboard-grid { gap: 15px; }
  .panel-heading { padding: 18px 17px 14px; }
  .panel-heading h2 { font-size: 17px; }
  .task-list { padding: 0 5px 8px; }
  .task-row { min-height: 99px; padding: 11px; grid-template-columns: 39px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 6px 9px; }
  .task-row .task-time { grid-row: 1 / 3; }
  .task-row .task-customer { grid-column: 2; grid-row: 1; }
  .task-row .status-badge { display: inline-flex; grid-column: 3; grid-row: 1; }
  .task-row .task-next { display: flex; grid-column: 2 / 4; grid-row: 2; }
  .task-row .task-next strong, .task-row .task-next small { font-size: 10px; }
  .task-row .task-arrow { display: none; }
  .quick-panel { display: none; }
  .module-panel { margin-top: 14px; }
  .module-grid { padding: 0 12px; grid-template-columns: 1fr; }
  .module-card { min-height: 120px; }
  .route-list { padding: 0 17px 18px; }
  .list-toolbar { padding: 13px; flex-wrap: wrap; }
  .inline-search { width: 100%; min-width: 100%; }
  .list-toolbar select { min-width: calc(50% - 5px); flex: 1; }
  .filter-chips { padding: 11px 13px; }
  .job-table { display: none; }
  .mobile-job-list { display: grid; padding: 10px; gap: 8px; }
  .mobile-job-card { display: grid; width: 100%; padding: 14px; gap: 11px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; }
  .mobile-job-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .mobile-job-head > span:first-child { display: flex; min-width: 0; flex-direction: column; }
  .mobile-job-head strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-job-head small { color: var(--blue); font-size: 10px; font-weight: 850; }
  .mobile-job-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mobile-job-next { display: flex; padding-top: 10px; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #edf2f5; color: var(--ink-soft); font-size: 11px; }
  .form-section { padding: 17px; }
  .form-grid { grid-template-columns: 1fr; gap: 13px; }
  .field--wide { grid-column: auto; }
  .field input, .field select, .field textarea, .list-toolbar select, .inline-search input { font-size: 16px; }
  .map-helper { display: grid; grid-template-columns: 1fr; }
  .map-helper > span { grid-column: auto; }
  .map-helper .button { width: 100%; }
  .document-checklist { grid-template-columns: 1fr 1fr; }
  .alternate-addresses { grid-template-columns: 1fr; }
  .document-checklist label { min-height: 58px; padding: 9px; }
  .notes-grid { grid-template-columns: 1fr; }
  .form-summary { padding: 18px; }
  .customer-grid { padding: 11px; grid-template-columns: 1fr; }
  .office-grid, .partner-grid { grid-template-columns: 1fr; gap: 12px; }
  .office-card, .partner-card { padding: 17px; }
  .office-body { grid-template-columns: 1fr; gap: 12px; }
  .transmission-row { grid-template-columns: 30px 1fr auto; }
  .transmission-row > span:nth-child(3) { display: none; }
  .user-list { padding: 0 14px 12px; }
  .user-row { grid-template-columns: 1fr auto; }
  .user-row select { grid-row: 2; grid-column: 1; }
  .user-row .active-label { grid-row: 2; grid-column: 2; }
  .toggle-list { padding: 0 15px 13px; }
  .legal-content { padding: 21px 18px; }
  .drawer-panel { width: 100%; }
  .drawer-header { padding: 17px; }
  .drawer-hero, .drawer-section { padding-left: 17px; padding-right: 17px; }
  .drawer-actions { padding-left: 17px; padding-right: 17px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .modal { padding: 15px; }
  .modal-card { padding: 22px 18px; }
  .crud-form-grid { grid-template-columns: 1fr; }
  .crud-form-grid .field--wide { grid-column: auto; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
  .toast { right: 14px; bottom: calc(84px + env(safe-area-inset-bottom)); left: 14px; max-width: none; }
  .mobile-nav { position: fixed; z-index: 45; right: 0; bottom: 0; left: 0; display: grid; height: calc(69px + env(safe-area-inset-bottom)); padding: 7px 10px env(safe-area-inset-bottom); grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: 0 -10px 30px rgba(7,44,80,.07); backdrop-filter: blur(18px); }
  html[data-access-mode="read"] .mobile-nav { grid-template-columns: repeat(4, 1fr); }
  .mobile-nav button { position: relative; display: flex; min-width: 0; padding: 3px; align-items: center; justify-content: center; flex-direction: column; gap: 3px; border: 0; background: transparent; color: #768b99; cursor: pointer; }
  .mobile-nav svg { width: 20px; height: 20px; }
  .mobile-nav span { font-size: 10px; font-weight: 750; }
  .mobile-nav button.active { color: var(--blue); }
  .mobile-nav button b { position: absolute; top: 0; right: 16%; display: grid; min-width: 16px; height: 16px; padding: 0 3px; place-items: center; border: 2px solid #fff; border-radius: 999px; background: var(--red); color: #fff; font-size: 7px; }
  .mobile-nav .mobile-new { transform: translateY(-16px); }
  .mobile-nav .mobile-new > span { display: grid; width: 50px; height: 50px; place-items: center; border: 4px solid #fff; border-radius: 50%; background: var(--blue); color: #fff; box-shadow: 0 7px 20px rgba(7,94,173,.3); }
  .mobile-nav .mobile-new svg { width: 22px; height: 22px; }
  .mobile-nav .mobile-new em { color: var(--blue); font-size: 8px; font-style: normal; font-weight: 850; }
  .mobile-more-sheet { position: fixed; z-index: 110; inset: 0; display: block; }
  .sheet-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(3,28,49,.5); }
  .sheet-card { position: absolute; right: 0; bottom: 0; left: 0; max-height: 90dvh; padding: 9px 17px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; border-radius: 22px 22px 0 0; background: #fff; box-shadow: 0 -20px 50px rgba(7,44,80,.2); animation: sheet-in .22s ease; }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  .sheet-handle { display: block; width: 38px; height: 4px; margin: 0 auto 9px; border-radius: 99px; background: #d6e0e6; }
  .sheet-heading { display: flex; padding: 4px 0 13px; align-items: center; justify-content: space-between; }
  .sheet-heading strong { font-size: 19px; }
  .sheet-grid { display: grid; margin-bottom: 14px; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .sheet-grid button, .sheet-grid a { display: flex; min-height: 58px; padding: 11px; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 10px; font-weight: 750; text-align: left; text-decoration: none; }
  .sheet-grid svg { width: 18px; height: 18px; color: var(--blue); }
  .app-footer { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); left: 12px; justify-content: center; }
  .app-footer span:first-child { display: none; }
  .notification-layout { grid-template-columns: 1fr; }
  .notification-list { max-height: 40dvh; }
  .handover-grid { grid-template-columns: 1fr; }
  .public-login-page { align-items: center; padding-right: 14px; padding-left: 14px; }
  .login-card--public { padding: 29px 22px; border-radius: 20px; }
  .login-logo .brand-copy strong { font-size: 16px; }
  .login-footer--public { flex-wrap: wrap; }
  .login-footer--public span:last-child { width: 100%; margin: 4px 0 0; text-align: center; }
  .public-legal-header { height: 98px; }
  .public-legal-header .button { min-height: 40px; padding: 8px 12px; }
  .public-legal-header .brand-copy { display: none; }
  .public-legal-footer { flex-direction: column; gap: 4px; }
}

@media (max-width: 380px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-grid .metric-card:last-child { grid-column: auto; }
  .document-checklist { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .sidebar, .topbar, .mobile-nav, .app-footer, .page-heading .button { display: none !important; }
  .app-area { margin: 0; }
  .main-content { max-width: none; padding: 0; }
  .panel { box-shadow: none; }
}
