:root {
      --page: #F6F7F9;
      --panel: #ffffff;
      --nav: #101827;
      --text: #1F2937;
      --muted: #6B7280;
      --line: #E5E7EB;
      --soft: #f6f8fb;
      --soft-2: #E5E7EB;
      --blue: #3d64e6;
      --blue-dark: #294fc7;
      --danger: #bd3c3c;
      --menu-bg: #0F172A;
      --menu-hover: #1E293B;
      --menu-active: #2563EB;
      --menu-text: #F8FAFC;
      --menu-muted: #94A3B8;
      --menu-line: #1E293B;
      --shadow: 0 16px 45px rgba(22, 34, 51, .08);
      font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

.app-toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10000;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 36px));
  pointer-events: none;
}

.app-toast {
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #3d64e6;
  border-radius: 7px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
  font-weight: 750;
  line-height: 1.35;
  animation: toast-in .16s ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

    * { box-sizing: border-box; }

    body {
      margin: 0;
      min-height: 100vh;
      color: var(--text);
      background: var(--page);
    }

    button, input, select, textarea {
      font: inherit;
    }

    button {
      border: 0;
      cursor: pointer;
      color: inherit;
    }

    .topbar {
      height: 52px;
      background: var(--nav);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 0 14px;
      box-shadow: 0 1px 0 rgba(255,255,255,.08);
    }

    .top-left {
      display: flex;
      align-items: center;
      gap: 0;
      min-width: 0;
    }

    .sidebar-toggle {
      width: 34px;
      height: 34px;
      border-radius: 8px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: #2b3141;
      border: 1px solid rgba(255,255,255,.18);
      color: #fff;
      line-height: 1;
      transition: transform .12s ease, background .12s ease, border-color .12s ease;
    }

    .sidebar-toggle span,
    .sidebar-toggle::before,
    .sidebar-toggle::after {
      content: "";
      width: 16px;
      height: 2px;
      border-radius: 999px;
      background: currentColor;
      display: block;
      position: absolute;
    }

    .sidebar-toggle {
      position: relative;
      z-index: 5;
      flex: 0 0 34px;
    }

    .sidebar-toggle span { transform: translateY(0); }
    .sidebar-toggle::before { transform: translateY(-6px); }
    .sidebar-toggle::after { transform: translateY(6px); }

    .sidebar-toggle:hover {
      background: #343b4d;
      transform: translateY(-1px);
    }

    .sidebar-toggle.active {
      border-color: rgba(255,255,255,.46);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 0;
      min-width: 0;
      margin-left: -34px;
      position: relative;
      z-index: 1;
      padding: 0;
      border: 0;
      background: transparent;
      cursor: pointer;
      font-size: clamp(18px, 1.1vw, 24px);
      font-weight: 900;
      letter-spacing: 0;
      white-space: nowrap;
    }

    .brand:hover {
      opacity: .86;
    }

    .brand-logo {
      width: 230px;
      height: 52px;
      object-fit: contain;
      display: block;
      flex: 0 0 auto;
    }

    .brand-icon {
      width: 30px;
      height: 22px;
      flex: 0 0 auto;
      display: inline-block;
      position: relative;
      background:
        radial-gradient(circle at 8px 18px, #fff 0 3px, transparent 3.2px),
        radial-gradient(circle at 22px 18px, #fff 0 3px, transparent 3.2px);
    }

    .brand-icon::before {
      content: "";
      position: absolute;
      left: 1px;
      top: 5px;
      width: 17px;
      height: 10px;
      border: 2px solid currentColor;
      border-radius: 4px 2px 2px 4px;
    }

    .brand-icon::after {
      content: "";
      position: absolute;
      right: 2px;
      top: 8px;
      width: 9px;
      height: 7px;
      border: 2px solid currentColor;
      border-left: 0;
      border-radius: 0 4px 3px 0;
    }

    .top-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .topbar.driver-view .sidebar-toggle,
    .topbar.driver-view .user-badge,
    .topbar.driver-view .top-actions .btn:not(#logoutBtn) {
      display: none;
    }

    .topbar.driver-view .top-actions {
      margin-left: auto;
      padding-right: 18px;
    }

    .btn {
      min-height: 32px;
      border-radius: 8px;
      padding: 0 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-weight: 850;
      font-size: 13px;
      background: #fff;
      color: var(--text);
      border: 1px solid var(--line);
      white-space: nowrap;
      transition: transform .12s ease, background .12s ease, border-color .12s ease;
    }

    .btn:hover { transform: translateY(-1px); }

    .btn.primary {
      color: #fff;
      background: var(--blue);
      border-color: var(--blue);
    }

    .btn.primary:hover {
      background: var(--blue-dark);
    }

    .btn.secondary {
      color: #fff;
      background: #2b3141;
      border-color: rgba(255,255,255,.18);
    }

    .btn.secondary.active {
      color: #ffffff;
      background: #2b3141;
      border-color: rgba(255,255,255,.18);
    }

    .btn.danger {
      color: #fff;
      background: var(--danger);
      border-color: var(--danger);
    }

    .user-badge {
      color: #dbe4f0;
      font-size: 11px;
      font-weight: 800;
      white-space: nowrap;
    }

    .hidden {
      display: none !important;
    }

    .auth-screen {
      min-height: 100vh;
      display: grid;
      grid-template-columns: minmax(320px, 1fr) minmax(360px, 460px);
      align-items: center;
      gap: clamp(24px, 5vw, 76px);
      padding: clamp(26px, 6vw, 72px);
      background:
        radial-gradient(circle at 22% 30%, rgba(255,255,255,.95), rgba(238,242,247,.7) 42%, rgba(238,242,247,.96) 82%),
        var(--page);
    }

    .auth-logo-panel {
      min-height: min(560px, 70vh);
      background: url("sokodispo-login-bg.png") center / contain no-repeat;
      filter: contrast(1.12) saturate(.95);
    }

    .auth-card {
      width: min(430px, 100%);
      background: rgba(255,255,255,.9);
      border: 1px solid var(--line);
      border-radius: 18px;
      box-shadow: 0 20px 70px rgba(7,20,38,.16);
      padding: 28px;
      backdrop-filter: blur(10px);
      justify-self: center;
    }

    .auth-card h1 {
      font-size: 27px;
      margin-bottom: 18px;
    }

    .auth-tabs {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      padding: 5px;
      border-radius: 12px;
      background: var(--soft-2);
      margin-bottom: 18px;
    }

    .auth-tab {
      min-height: 38px;
      border-radius: 9px;
      background: transparent;
      color: var(--text);
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }

    .auth-tab.active {
      background: #fff;
      color: var(--blue);
      box-shadow: 0 6px 18px rgba(7,20,38,.08);
    }

    .auth-form {
      display: grid;
      gap: 12px;
    }

    .auth-form input,
    .auth-form select {
      min-height: 46px;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px 12px;
      font: inherit;
      background: #fff;
    }

    .auth-hint {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.4;
    }

    .auth-error {
      color: var(--danger);
      min-height: 20px;
      font-weight: 800;
      font-size: 14px;
    }

    .auth-legal-links {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px 12px;
      margin-top: 18px;
      padding-top: 14px;
      border-top: 1px solid var(--line);
    }

    .auth-legal-links button {
      border: 0;
      background: transparent;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      text-decoration: underline;
      text-underline-offset: 3px;
      cursor: pointer;
      padding: 0;
    }

    .legal-content {
      display: grid;
      gap: 12px;
      color: var(--muted);
      font-weight: 750;
      line-height: 1.5;
    }

    .legal-content strong {
      color: var(--text);
    }

    .layout {
      display: grid;
      grid-template-columns: 318px minmax(0, 1fr);
      gap: 18px;
      padding: 20px 0 0;
      height: calc(100vh - 52px);
      overflow: hidden;
      transition: grid-template-columns .18s ease, gap .18s ease;
    }

    .driver-dashboard {
      min-height: calc(100vh - 52px);
      padding: 18px;
      background: var(--page);
    }

    .driver-overview {
      max-width: 1100px;
      margin: 0 auto;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 14px;
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .driver-overview-header {
      padding: 20px 22px;
      border-bottom: 1px solid var(--line);
      background: #f8fafc;
    }

    .driver-overview-header h2 {
      margin: 0 0 6px;
      font-size: 24px;
      line-height: 1.15;
    }

    .driver-overview-header p {
      margin: 0;
      color: var(--muted);
      font-weight: 800;
    }

    .driver-order-list {
      display: grid;
    }

    .driver-order-card {
      display: grid;
      gap: 8px;
      padding: 18px 22px;
      border-bottom: 1px solid var(--line);
      background: #fff;
      cursor: pointer;
    }

    .driver-order-card:hover {
      background: #f8fafc;
    }

    .driver-order-card:last-child {
      border-bottom: 0;
    }

    .driver-order-time {
      font-weight: 950;
      color: var(--blue);
      line-height: 1.35;
    }

    .driver-order-title {
      font-size: 18px;
      font-weight: 950;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .driver-order-meta {
      color: var(--muted);
      font-weight: 800;
      line-height: 1.35;
    }

    .driver-order-kind {
      width: fit-content;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: #eef3fb;
      color: var(--blue);
      padding: 4px 10px;
      font-size: 12px;
      font-weight: 950;
      line-height: 1;
    }

    .driver-detail-grid {
      display: grid;
      gap: 14px;
    }

    .driver-detail-item {
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--soft);
    }

    .driver-detail-item span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      margin-bottom: 5px;
    }

    .driver-detail-item strong {
      display: block;
      overflow-wrap: anywhere;
      line-height: 1.35;
    }

    .driver-order-actions {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin-top: 16px;
    }

    .driver-note-box {
      margin-top: 12px;
      display: grid;
      gap: 10px;
    }

    .driver-note-box textarea {
      width: 100%;
      min-height: 92px;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px 12px;
      resize: vertical;
      font: inherit;
    }

    .driver-upload-status {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      margin-top: 8px;
      min-height: 18px;
    }

    .attachment-section {
      margin-top: 14px;
      display: grid;
      gap: 8px;
    }

    .attachment-section-title {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .attachment-list {
      display: grid;
      gap: 8px;
    }

    .attachment-item {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--soft);
    }

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

    .attachment-preview {
      grid-column: 1 / -1;
      display: none;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
    }

    .attachment-preview.active {
      display: block;
    }

    .attachment-preview img {
      display: block;
      width: 100%;
      max-height: 460px;
      object-fit: contain;
      background: #fff;
    }

    .attachment-preview iframe {
      display: block;
      width: 100%;
      min-height: 520px;
      border: 0;
      background: #fff;
    }

    .attachment-name {
      min-width: 0;
      font-weight: 900;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .attachment-meta {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      margin-top: 3px;
    }

    .attachment-dropzone {
      min-height: 150px;
      border: 1.5px dashed #cbd5e1;
      border-radius: 12px;
      background: #f8fafc;
      display: grid;
      place-items: center;
      padding: 18px;
      text-align: center;
      color: #6B7280;
      font-weight: 800;
      cursor: pointer;
      transition: border-color .15s ease, background .15s ease, color .15s ease;
    }

    .attachment-dropzone strong {
      display: block;
      color: #1F2937;
      font-size: 15px;
      margin-bottom: 4px;
    }

    .attachment-dropzone.drag-over {
      border-color: var(--blue);
      background: #eef2ff;
      color: #4f46e5;
    }

    .attachment-dropzone.disabled {
      opacity: .65;
      cursor: not-allowed;
    }

    .order-ai-box {
      display: grid;
      gap: 10px;
      margin-bottom: 12px;
    }

    .order-ai-text {
      min-height: 96px;
      resize: vertical;
    }

    .order-ai-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }

    .order-ai-result {
      display: grid;
      gap: 8px;
    }

    .order-ai-suggestion {
      border: 1px solid #E5E7EB;
      border-radius: 10px;
      background: #F6F7F9;
      padding: 10px;
      display: grid;
      gap: 6px;
    }

    .order-ai-suggestion strong {
      color: #1F2937;
      font-size: 13px;
    }

    .order-ai-suggestion span {
      color: #6B7280;
      font-size: 12px;
      font-weight: 800;
    }

    .order-ai-suggestion .btn {
      min-height: 28px;
      padding: 6px 10px;
      margin-left: 6px;
      font-size: 12px;
    }

    .client-ai-examples {
      border-top: 1px solid #E5E7EB;
      padding-top: 12px;
      display: grid;
      gap: 10px;
    }

    .client-ai-examples textarea {
      min-height: 90px;
      resize: vertical;
    }

    .client-ai-example-form {
      display: grid;
      gap: 10px;
    }

    .client-ai-example-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .client-ai-example-list {
      display: grid;
      gap: 8px;
    }

    .client-example-button {
      display: block;
      width: fit-content;
      margin-left: auto;
    }

    .client-ai-example-item {
      border: 1px solid #E5E7EB;
      border-radius: 8px;
      background: #F6F7F9;
      padding: 10px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
    }

    .client-ai-example-item strong {
      display: block;
      color: #1F2937;
      overflow-wrap: anywhere;
    }

    .client-ai-example-item span {
      display: block;
      color: #6B7280;
      font-size: 12px;
      font-weight: 800;
      margin-top: 3px;
      overflow-wrap: anywhere;
    }

    #clientAiExampleDialog {
      width: min(1220px, calc(100vw - 28px));
      height: calc(100vh - 28px);
      max-height: calc(100vh - 28px);
      overflow: hidden;
    }

    #clientAiExampleDialog .event-modal {
      box-sizing: border-box;
      height: 100%;
      min-height: 0;
    }

    .client-ai-example-modal-list {
      display: grid;
      gap: 8px;
      max-height: 420px;
      overflow: auto;
    }

    .client-ai-example-modal-list button {
      text-align: left;
      justify-content: flex-start;
    }

    .client-ai-example-modal-list button.active {
      background: #eef2ff;
      color: var(--primary);
      border-color: rgba(88,70,232,.24);
    }

    .trip-list {
      display: grid;
      gap: 12px;
    }

    .cargo-extra-list {
      display: grid;
      gap: 10px;
      margin-top: 12px;
    }

    .cargo-position {
      border: 1px solid #E5E7EB;
      border-radius: 12px;
      background: #F6F7F9;
      padding: 12px;
      display: grid;
      gap: 10px;
    }

    .cargo-position-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      color: #1F2937;
      font-weight: 950;
    }

    .trip-row {
      border: 1px solid #E5E7EB;
      border-radius: 12px;
      padding: 12px;
      background: #f8fafc;
      display: grid;
      gap: 10px;
    }

    .trip-row-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    .trip-title-btn {
      border: 0;
      background: transparent;
      color: #1F2937;
      cursor: pointer;
      font: inherit;
      font-weight: 900;
      padding: 0;
      text-align: left;
    }

    .trip-title-btn:hover {
      color: var(--blue);
    }

    .trip-detail-panel {
      border: 1px solid #E5E7EB;
      border-radius: 10px;
      background: #fff;
      padding: 12px;
      display: grid;
      gap: 10px;
    }

    .event-modal.trip-only-mode .event-create-layout {
      display: block;
    }

    .event-modal.trip-only-mode .event-summary-card,
    .event-modal.trip-only-mode .event-create-main > section,
    .event-modal.trip-only-mode .event-create-main > .event-grid-3 > section:not(#eventTripsSection),
    .event-modal.trip-only-mode #eventTripsSection > .helper,
    .event-modal.trip-only-mode #addEventTripBtn {
      display: none;
    }

    .event-modal.trip-only-mode .event-create-main > .event-grid-3 {
      display: block;
    }

    .event-modal.trip-only-mode #eventTripsSection {
      display: block;
      max-width: 920px;
    }

    .event-modal.trip-only-mode .trip-row:not(.is-selected-trip) {
      display: none;
    }

    .trip-detail-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(120px, 1fr));
      gap: 10px;
      color: #6B7280;
      font-size: 13px;
    }

    .trip-detail-grid strong {
      display: block;
      color: #1F2937;
      font-size: 14px;
      margin-top: 2px;
    }

    .trip-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(150px, 1fr));
      gap: 10px;
    }

    .driving-check {
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 12px;
      background: #f8fafc;
      display: grid;
      gap: 8px;
    }

    .driving-check.ok {
      border-color: #b7e4c7;
      background: #f0fff4;
    }

    .driving-check.warn {
      border-color: #f4c7c7;
      background: #fff5f5;
    }

    .driving-check-title {
      font-weight: 950;
    }

    .driving-check-lines {
      display: grid;
      gap: 5px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
      line-height: 1.35;
    }

    .driving-check-lines .warn-line {
      color: #b42318;
    }

    .route-mini-map {
      width: 100%;
      height: 100%;
      min-height: 320px;
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      background: #eef2f7;
    }

    #routeCalcBox.route-map-visible {
      grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
      grid-template-rows: auto 1fr;
      column-gap: 16px;
      align-items: stretch;
    }

    #routeCalcBox.route-map-visible #routeCalcTitle {
      grid-column: 1;
      grid-row: 1;
    }

    #routeCalcBox.route-map-visible #routeCalcLines {
      grid-column: 1;
      grid-row: 2;
    }

    #routeCalcBox.route-map-visible #routeMiniMap {
      grid-column: 2;
      grid-row: 1 / 3;
    }

    .route-mini-map-message {
      height: 100%;
      display: grid;
      place-items: center;
      padding: 20px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
      text-align: center;
    }

    .auto-backup-controls {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 12px;
    }

    .auto-backup-toggle {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-weight: 850;
      color: var(--ink);
    }

    .auto-backup-toggle input {
      width: 18px;
      height: 18px;
      margin: 0;
    }

    .auto-backup-controls select {
      width: auto;
      min-width: 120px;
    }

    @media (max-width: 900px) {
      #routeCalcBox.route-map-visible {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
      }

      #routeCalcBox.route-map-visible #routeCalcTitle,
      #routeCalcBox.route-map-visible #routeCalcLines,
      #routeCalcBox.route-map-visible #routeMiniMap {
        grid-column: 1;
        grid-row: auto;
      }

      .route-mini-map {
        height: 240px;
        min-height: 240px;
      }
    }

    .crop-preview-wrap {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #f7f9fc;
      padding: 10px;
      max-height: 58vh;
      overflow: auto;
    }

    .crop-preview-wrap canvas {
      width: 100%;
      height: auto;
      display: block;
      border-radius: 8px;
      background: #fff;
    }

    .crop-controls {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin-top: 14px;
    }

    .crop-controls label {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .crop-controls input {
      width: 100%;
      accent-color: var(--primary);
    }

    .layout.sidebar-collapsed {
      grid-template-columns: 0 minmax(0, 1fr);
      gap: 0;
    }

    .sidebar,
    .planner {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 14px;
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .sidebar {
      min-height: calc(100vh - 72px);
      min-width: 0;
      overflow: auto;
      transition: opacity .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease, visibility .18s ease;
    }

    .planner {
      min-width: 0;
    }

    .layout.sidebar-collapsed .sidebar {
      opacity: 0;
      pointer-events: none;
      transform: translateX(-14px);
      border-color: transparent;
      box-shadow: none;
      visibility: hidden;
    }

    .sidebar-menu {
      padding: 10px;
      display: grid;
      gap: 10px;
    }

    h1, h2 {
      margin: 0;
      letter-spacing: 0;
    }

    .menu-section {
      border: 1px solid var(--line);
      border-radius: 11px;
      background: #f8fafc;
      overflow: hidden;
    }

    .menu-section summary {
      min-height: 46px;
      padding: 0 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      cursor: pointer;
      list-style: none;
      font-size: 16px;
      font-weight: 900;
      user-select: none;
    }

    .menu-section summary::-webkit-details-marker {
      display: none;
    }

    .menu-section summary::after {
      content: "›";
      color: var(--muted);
      font-size: 20px;
      transition: transform .12s ease;
    }

    .menu-section[open] summary::after {
      transform: rotate(90deg);
    }

    .menu-panel {
      padding: 0 12px 12px;
    }

    .reports-panel {
      display: grid;
      gap: 16px;
    }

    .vehicle-form,
    .driver-form,
    .client-form {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 46px;
      gap: 9px;
      margin-bottom: 10px;
    }

    .vehicle-form input,
    .driver-form input,
    .client-form input,
    .driver-select,
    .field input,
    .field select,
    .field textarea {
      width: 100%;
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 9px 11px;
      color: var(--text);
      background: #fff;
      outline: none;
    }

    .vehicle-form input,
    .driver-form input,
    .client-form input {
      min-height: 40px;
      font-size: 13px;
    }

    .add-vehicle,
    .add-driver,
    .add-client {
      min-height: 40px;
      border-radius: 8px;
      color: #fff;
      background: var(--blue);
      font-size: 18px;
      font-weight: 900;
    }

    .helper {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
      margin: 0;
    }

    .menu-panel .helper {
      margin: 0 0 10px;
    }

    .stat-grid {
      display: grid;
      gap: 8px;
    }

    .stat-card {
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
      padding: 10px;
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
    }

    .stat-card span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .stat-card strong {
      font-size: 18px;
      font-weight: 950;
    }

    .stats-open-btn {
      width: 100%;
      min-height: 38px;
    }

    .menu-button-stack {
      display: grid;
      gap: 10px;
      margin-bottom: 10px;
    }

    .compact-action-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      margin-bottom: 10px;
    }

    .compact-action-row .btn {
      width: auto;
      min-width: 116px;
      min-height: 30px;
      padding: 0 14px;
      border-radius: 9px;
      font-size: 12px;
      line-height: 1;
    }

    .stats-dialog {
      width: min(1120px, calc(100vw - 26px));
    }

    .stats-dashboard {
      display: grid;
      gap: 16px;
    }

    .stats-summary {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .stats-big-card {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #f8fafc;
      padding: 14px;
    }

    .stats-big-card span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .stats-big-card strong {
      display: block;
      margin-top: 7px;
      font-size: 28px;
      font-weight: 950;
    }

    .stats-summary.compact .stats-big-card strong {
      font-size: 22px;
    }

    .stats-section {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      padding: 14px;
    }

    .stats-section h3 {
      margin: 0 0 12px;
      font-size: 18px;
    }

    .client-stats {
      display: grid;
      grid-template-columns: 260px minmax(0, 1fr);
      gap: 18px;
      align-items: center;
    }

    .client-pie {
      width: min(240px, 100%);
      aspect-ratio: 1;
      border-radius: 50%;
      background: conic-gradient(var(--soft-2) 0 100%);
      box-shadow: inset 0 0 0 1px rgba(7,20,38,.08), 0 14px 30px rgba(7,20,38,.08);
      position: relative;
      margin: 0 auto;
    }

    .client-pie::after {
      content: "";
      position: absolute;
      inset: 31%;
      border-radius: inherit;
      background: #fff;
      box-shadow: inset 0 0 0 1px rgba(7,20,38,.08);
    }

    .client-pie-total {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      z-index: 1;
      font-weight: 950;
      pointer-events: none;
    }

    .client-pie-total span {
      color: var(--muted);
      font-size: 11px;
      text-transform: uppercase;
    }

    .client-pie-total strong {
      font-size: 30px;
      line-height: 1;
    }

    .client-stat-list {
      display: grid;
      gap: 8px;
    }

    .stats-km-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
      margin-top: 14px;
    }

    .stats-km-grid h4 {
      margin: 0 0 6px;
      font-size: 13px;
      color: var(--muted);
      text-transform: uppercase;
    }

    .client-stat-row {
      display: grid;
      grid-template-columns: 14px minmax(0, 1fr) auto auto;
      gap: 9px;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid var(--line);
    }

    .client-stat-row:last-child {
      border-bottom: 0;
    }

    .client-stat-dot {
      width: 12px;
      height: 12px;
      border-radius: 999px;
    }

    .client-stat-name {
      min-width: 0;
      font-weight: 900;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .client-stat-count,
    .client-stat-percent {
      color: var(--muted);
      font-weight: 900;
      white-space: nowrap;
    }

    .vehicle-util-list {
      display: grid;
      gap: 10px;
    }

    .vehicle-util-row {
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
      padding: 12px;
      display: grid;
      grid-template-columns: minmax(160px, 240px) minmax(0, 1fr) minmax(96px, auto);
      gap: 12px;
      align-items: center;
    }

    .vehicle-util-name {
      min-width: 0;
      font-weight: 900;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .util-bar {
      height: 12px;
      border-radius: 999px;
      background: #e8edf5;
      overflow: hidden;
    }

    .util-fill {
      height: 100%;
      border-radius: inherit;
      background: var(--blue);
    }

    .util-value {
      text-align: right;
      font-weight: 950;
    }

    .client-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .driver-list {
      display: grid;
      gap: 8px;
    }

    .user-list {
      display: grid;
      gap: 9px;
    }

    .order-list {
      display: grid;
      gap: 8px;
      max-height: 360px;
      overflow: auto;
    }

    .order-card {
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
      padding: 10px;
      display: grid;
      gap: 5px;
    }

    .order-title-row {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .order-card[data-order-id],
    .order-card[data-completed-order-id] {
      cursor: pointer;
    }

    .order-title {
      min-width: 0;
      font-weight: 950;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .read-check {
      flex: 0 0 auto;
      width: 17px;
      height: 17px;
      border-radius: 999px;
      display: inline-grid;
      place-items: center;
      border: 1px solid rgba(100,116,139,.35);
      background: #e5e7eb;
      color: #64748b;
      font-size: 12px;
      font-weight: 950;
      line-height: 1;
    }

    .read-check.is-read {
      border-color: rgba(22,163,74,.38);
      background: #dcfce7;
      color: #15803d;
    }

    .order-meta {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.35;
    }

    .order-export-controls {
      display: grid;
      gap: 8px;
      margin-bottom: 10px;
    }

    .orders-filter-grid {
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 12px;
      align-items: end;
    }

    .order-filter-field {
      display: grid;
      gap: 6px;
    }

    .order-filter-field.date-field {
      grid-column: span 3;
    }

    .order-filter-field.list-field {
      grid-column: span 2;
    }

    .order-filter-field.scale-field {
      grid-column: span 4;
    }

    .orders-filter-grid .helper {
      grid-column: 1 / -1;
      margin: 0;
    }

    .orders-filter-grid #ordersPdfBtn {
      grid-column: span 2;
      min-height: 44px;
    }

    .manager-filter-grid {
      grid-template-columns: repeat(5, minmax(150px, 1fr));
      gap: 10px 12px;
      align-items: end;
    }

    .manager-filter-grid > label {
      display: none;
    }

    @media (max-width: 1100px) {
      .manager-filter-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
      }
    }

    @media (max-width: 700px) {
      .manager-filter-grid {
        grid-template-columns: 1fr;
      }
    }

    .order-export-controls select,
    .order-export-controls input:not([type="checkbox"]):not([type="radio"]) {
      width: 100%;
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 8px 10px;
      background: #fff;
    }

    .saas-feature-list {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px 18px;
      margin-top: 16px;
    }

    .saas-feature-option {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 42px;
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      color: var(--ink);
      font-weight: 800;
      cursor: pointer;
    }

    .saas-feature-option input[type="checkbox"] {
      flex: 0 0 auto;
      width: 20px;
      height: 20px;
      margin: 0;
      accent-color: var(--primary);
    }

    @media (max-width: 700px) {
      .saas-feature-list {
        grid-template-columns: 1fr;
      }
    }

    .orders-filter-grid select[multiple] {
      min-height: 150px;
    }

    .user-card {
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
      padding: 10px;
      display: grid;
      gap: 8px;
    }

    .user-email {
      min-width: 0;
      font-weight: 900;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .user-role-select {
      width: 100%;
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 8px 10px;
      background: #fff;
    }

    .driver-chip,
    .client-chip {
      min-height: 28px;
      border-radius: 999px;
      background: #eef2f7;
      border: 1px solid var(--line);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 0 5px 0 10px;
      font-size: 12px;
      color: var(--text);
      font-weight: 800;
      max-width: 100%;
    }

    .driver-chip span,
    .client-chip span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .driver-delete,
    .client-delete {
      width: 20px;
      height: 20px;
      border-radius: 999px;
      background: #dde3ec;
      font-weight: 900;
      line-height: 1;
    }

    .driver-card {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 34px;
      gap: 8px;
      align-items: start;
    }

    .driver-card.color-open .driver-color-panel {
      display: grid;
    }

    .driver-color-panel {
      grid-column: 1 / -1;
      display: none;
      grid-template-columns: 84px minmax(0, 1fr);
      gap: 8px 10px;
      align-items: center;
      padding: 9px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: rgba(255,255,255,.72);
    }

    .driver-color-panel label {
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .driver-color-panel input[type="color"] {
      width: 100%;
      min-height: 31px;
      padding: 2px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
    }

    .driver-color-panel input[type="range"] {
      width: 100%;
      accent-color: var(--blue);
    }

    .vehicle-list {
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 9px;
    }

    .vehicle-card {
      min-height: 104px;
      border: 1px solid var(--line);
      border-radius: 11px;
      background: #f8fafc;
      padding: 13px 13px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 34px;
      align-items: start;
      gap: 12px;
    }

    .vehicle-actions {
      display: flex;
      flex-direction: column;
      gap: 7px;
      align-items: center;
    }

    .paint-btn {
      width: 34px;
      height: 34px;
      border-radius: 9px;
      background: #e3e7ed;
      color: var(--text);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }

    .paint-btn::before {
      content: "";
      width: 15px;
      height: 12px;
      border: 2px solid currentColor;
      border-radius: 3px 3px 5px 5px;
      transform: rotate(-12deg);
    }

    .paint-btn::after {
      content: "";
      position: absolute;
      right: 7px;
      bottom: 7px;
      width: 7px;
      height: 7px;
      border-radius: 50% 50% 50% 0;
      background: var(--paint-color, var(--blue));
      transform: rotate(-45deg);
      box-shadow: 0 0 0 1px rgba(7,20,38,.16);
    }

    .vehicle-color-panel {
      grid-column: 1 / -1;
      display: none;
      grid-template-columns: 84px minmax(0, 1fr);
      gap: 8px 10px;
      align-items: center;
      margin-top: 2px;
      padding: 9px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: rgba(255,255,255,.72);
    }

    .vehicle-card.color-open .vehicle-color-panel {
      display: grid;
    }

    .vehicle-color-panel label {
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .vehicle-color-panel input[type="color"] {
      width: 100%;
      min-height: 31px;
      padding: 2px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
    }

    .vehicle-color-panel input[type="range"] {
      width: 100%;
      accent-color: var(--blue);
    }

    .vehicle-name {
      font-size: 16px;
      font-weight: 900;
      line-height: 1.2;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .vehicle-count {
      color: var(--muted);
      margin-top: 5px;
      font-size: 12px;
    }

    .vehicle-driver {
      margin-top: 9px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .vehicle-driver label {
      font-size: 10px;
    }

    .driver-select {
      min-height: 32px;
      padding: 6px 9px;
      border-radius: 8px;
      background: #fff;
      font-size: 12px;
    }

    .delete-btn {
      width: 34px;
      height: 34px;
      border-radius: 9px;
      background: #e3e7ed;
      font-size: 17px;
      line-height: 1;
      font-weight: 700;
    }

    .planner {
      min-width: 0;
      height: calc(100vh - 72px);
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
    }

    .planner-toolbar {
      min-height: 78px;
      padding: 16px 20px;
      display: grid;
      grid-template-columns: auto minmax(220px, 1fr) auto auto;
      gap: 10px;
      align-items: center;
      border-bottom: 1px solid var(--line);
    }

    .nav {
      display: flex;
      gap: 12px;
      align-items: center;
    }

    .nav-btn {
      min-width: 36px;
      min-height: 40px;
      border-radius: 9px;
      background: #e5e9ef;
      font-size: 17px;
      font-weight: 900;
    }

    .today-btn {
      min-height: 40px;
      border-radius: 9px;
      background: #e5e9ef;
      padding: 0 15px;
      font-size: 13px;
      font-weight: 900;
    }

    .period-title {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      font-size: clamp(16px, 1.05vw, 21px);
      font-weight: 900;
    }

    .period-text {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      min-width: 0;
    }

    .week-badge {
      flex: 0 0 auto;
      border: 1px solid var(--line);
      background: #eef3fb;
      color: var(--blue);
      border-radius: 8px;
      padding: 4px 8px;
      font-size: 11px;
      font-weight: 900;
      line-height: 1;
    }

    .calendar-filter {
      position: relative;
      flex: 0 0 auto;
      font-size: 13px;
    }

    .calendar-filter summary {
      min-height: 32px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: #fff;
      padding: 0 11px;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      cursor: pointer;
      list-style: none;
      font-weight: 900;
      color: var(--text);
      box-shadow: 0 4px 14px rgba(25, 43, 70, .06);
    }

    .calendar-filter summary::-webkit-details-marker {
      display: none;
    }

    .calendar-filter summary::after {
      content: "⌄";
      color: var(--muted);
      font-size: 14px;
      line-height: 1;
    }

    .calendar-filter-panel {
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      z-index: 30;
      width: min(310px, calc(100vw - 32px));
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      box-shadow: 0 18px 38px rgba(17, 24, 39, .18);
      padding: 12px;
      display: grid;
      gap: 9px;
    }

    .calendar-filter-panel label {
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .calendar-filter-panel select {
      width: 100%;
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 8px 10px;
      background: #fff;
      color: var(--text);
      font-weight: 800;
    }

    .calendar-filter-panel select[multiple] {
      min-height: 132px;
    }

    .filter-count {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.35;
    }

    .tabs {
      display: grid;
      grid-template-columns: repeat(4, minmax(70px, 1fr));
      gap: 0;
      padding: 6px;
      background: #edf1f6;
      border-radius: 12px;
      min-width: 210px;
    }

    .tabs button {
      min-height: 38px;
      border-radius: 9px;
      background: transparent;
      font-size: 13px;
      font-weight: 900;
    }

    .tabs button.active {
      color: var(--blue);
      background: #fff;
      box-shadow: 0 5px 16px rgba(25, 43, 70, .08);
    }

    .calendar-shell {
      min-height: 0;
      overflow: auto;
      cursor: grab;
      user-select: none;
      overscroll-behavior: contain;
      background: #F6F7F9;
    }

    .calendar-shell.is-panning {
      cursor: grabbing;
    }

    #calendarRoot {
      position: relative;
      min-width: 100%;
      min-height: 100%;
      background: #F6F7F9;
    }

    .mobile-admin-orders {
      display: none;
      padding: 10px;
      overflow: auto;
      background: #f8fafc;
    }

    .mobile-admin-list {
      display: grid;
      gap: 9px;
    }

    .mobile-admin-card {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      padding: 11px;
      display: grid;
      gap: 6px;
      box-shadow: 0 6px 16px rgba(25,43,70,.06);
      cursor: pointer;
    }

    .mobile-admin-title {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 7px;
      font-weight: 950;
      line-height: 1.25;
    }

    .mobile-admin-title span:last-child {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .mobile-admin-meta {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      line-height: 1.35;
    }

    .board {
      width: max(100%, var(--board-min, 980px));
      min-width: var(--board-min, 980px);
      display: grid;
      grid-template-columns: 202px repeat(var(--cols), minmax(var(--day-min, 150px), 1fr));
      transform-origin: 0 0;
      position: absolute;
      left: 0;
      top: 0;
    }

    .board.year-board .day-head {
      padding: 10px 6px;
    }

    .board.year-board .day-head .main {
      font-size: 12px;
    }

    .board.year-board .day-head .sub {
      font-size: 10px;
    }

    .board.year-board .day-head .day-kw {
      font-size: 9px;
      padding: 2px 4px;
    }

    .board-cell {
      border-right: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      background: #F6F7F9;
    }

    .corner,
    .day-head,
    .row-head {
      background: var(--soft);
    }

    .corner {
      min-height: 68px;
      padding: 20px 10px;
      font-size: 18px;
      font-weight: 900;
    }

    .day-head {
      min-height: 68px;
      padding: 13px 10px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 4px;
      font-weight: 900;
    }

    .day-head .main {
      font-size: 17px;
      line-height: 1.1;
    }

    .day-head .sub {
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
    }

    .day-kw {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      color: var(--blue);
      background: rgba(61, 100, 230, .1);
      border-radius: 999px;
      padding: 2px 6px;
      font-size: 11px;
      font-weight: 900;
      line-height: 1;
    }

    .day-head.today {
      box-shadow: inset 0 0 0 3px rgba(61, 100, 230, .22);
    }

    .row-head {
      min-height: 88px;
      padding: 16px 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 5px;
      font-size: 17px;
      font-weight: 900;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .row-head .driver-name {
      max-width: 100%;
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .row-head span {
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .drop-cell {
      min-height: 88px;
      padding: 8px;
      display: block;
      background: #fff;
      transition: background .12s ease, box-shadow .12s ease;
    }

    .drop-cell:hover,
    .drop-hover {
      box-shadow: inset 0 0 0 2px rgba(61, 100, 230, .22);
    }

    .event-chip {
      min-height: 32px;
      border-radius: 6px;
      padding: 5px 7px;
      color: #fff;
      font-size: 11px;
      line-height: 1;
      font-weight: 750;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 8px 18px rgba(7,20,38,.12);
      cursor: grab;
      user-select: none;
      overflow: hidden;
      position: absolute;
      top: 0;
      bottom: 0;
      z-index: 1;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: flex-start;
      white-space: nowrap;
    }

    .event-title {
      display: block;
      min-width: 0;
      width: 100%;
      flex: 1 1 auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-shadow: 0 1px 2px rgba(7,20,38,.28);
    }

    .event-chip .read-check {
      width: 16px;
      height: 16px;
      margin-left: 5px;
      border-color: rgba(255,255,255,.38);
      box-shadow: 0 0 0 1px rgba(7,20,38,.06);
    }

    .event-warning {
      flex: 0 0 auto;
      display: inline-grid;
      place-items: center;
      width: 18px;
      height: 18px;
      margin-left: 6px;
      border-radius: 999px;
      color: #fff;
      background: #dc2626;
      font-size: 13px;
      font-weight: 950;
      box-shadow: 0 0 0 2px rgba(255,255,255,.75);
    }

    .event-chip.multi-event {
      overflow: hidden;
      justify-content: flex-start;
    }

    .event-chip.multi-event.label-anchor {
      z-index: 3;
    }

    .event-chip.multi-event .event-title {
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .board.view-month .lane-row {
      height: 24px;
      margin-bottom: 4px;
    }

    .board.view-month .bar-spacer {
      min-height: 24px;
    }

    .board.view-month .event-chip {
      min-height: 24px;
      height: 24px;
      top: 0;
      bottom: auto;
      padding: 0 26px 0 8px;
      border-radius: 6px;
      font-size: 10px;
      line-height: 24px;
      align-items: center;
      box-shadow: inset 0 0 0 1px rgba(15,23,42,.05), 0 6px 14px rgba(15,23,42,.12);
    }

    .board.view-month .event-chip .event-title {
      line-height: 24px;
      max-width: 100%;
    }

    .board.view-month .event-chip .read-check {
      position: absolute;
      right: 5px;
      top: 50%;
      width: 14px;
      height: 14px;
      margin: 0;
      transform: translateY(-50%);
      font-size: 10px;
      line-height: 1;
    }

    .board.view-month .event-warning {
      position: absolute;
      right: 22px;
      top: 50%;
      width: 14px;
      height: 14px;
      margin: 0;
      transform: translateY(-50%);
      font-size: 10px;
    }

    .event-chip:active { cursor: grabbing; }
    .dragging { opacity: .55; }

    .bar-spacer {
      min-height: 32px;
      pointer-events: none;
    }

    .lane-row {
      height: 32px;
      margin-bottom: 5px;
      position: relative;
    }

    .lane-row:last-child {
      margin-bottom: 0;
    }

    .range-start {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }

    .range-middle {
      border-radius: 0;
    }

    .range-end {
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }

    .range-middle strong,
    .range-end strong {
      display: none;
    }

    .range-middle {
      color: transparent;
    }

    .range-middle::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.18), rgba(255,255,255,.08));
      pointer-events: none;
    }

    .color-control {
      display: grid;
      grid-template-columns: 56px minmax(0, 1fr);
      gap: 10px;
      align-items: center;
    }

    input[type="color"] {
      width: 56px;
      min-height: 48px;
      padding: 4px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: #fff;
      cursor: pointer;
    }

    .swatches {
      display: flex;
      gap: 7px;
      flex-wrap: wrap;
    }

    .swatch {
      width: 28px;
      height: 28px;
      border-radius: 999px;
      border: 2px solid #fff;
      box-shadow: 0 0 0 1px var(--line);
    }

    .empty-state {
      padding: 44px 24px;
      color: var(--muted);
      font-size: 18px;
    }

    dialog {
      width: min(620px, calc(100vw - 26px));
      border: 0;
      border-radius: 18px;
      padding: 0;
      box-shadow: 0 28px 80px rgba(7,20,38,.28);
    }

    #eventDialog,
    #driverOrderDialog {
      width: min(920px, calc(100vw - 32px));
    }

    #eventDialog {
      width: calc(100vw - 28px);
      height: calc(100vh - 28px);
      max-width: none;
      max-height: calc(100vh - 28px);
      border-radius: 0;
      box-shadow: none;
      overflow: hidden;
    }

    dialog::backdrop {
      background: rgba(7,20,38,.45);
    }

    .modal {
      padding: 24px;
      background: #fff;
    }

    .modal-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
      margin-bottom: 18px;
    }

    .modal h2 {
      font-size: 24px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 7px;
      min-width: 0;
    }

    .field.full { grid-column: 1 / -1; }

    .inline-options {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .inline-options label {
      min-height: 42px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #f8fbff;
      color: var(--text);
      font-weight: 900;
      text-transform: none;
      cursor: pointer;
    }

    label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
    }

    textarea {
      min-height: 78px;
      resize: vertical;
    }

    .weekday-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 8px;
    }

    .weekday-grid label {
      display: grid;
      place-items: center;
      gap: 5px;
      min-height: 54px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      color: var(--text);
      font-size: 12px;
      cursor: pointer;
    }

    .weekday-grid input {
      width: auto;
      min-width: 0;
    }

    .modal-actions {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin-top: 20px;
    }

    .event-modal {
      background: #F6F7F9;
      padding: 22px;
      min-height: 100%;
      max-height: calc(100vh - 28px);
      overflow: auto;
    }

    .event-modal .modal-head {
      align-items: flex-start;
      margin-bottom: 18px;
      position: sticky;
      top: -22px;
      z-index: 5;
      padding: 22px 0 14px;
      background: rgba(246,247,249,.96);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid #E5E7EB;
    }

    .event-modal-title {
      display: flex;
      gap: 14px;
      align-items: center;
      min-width: 0;
    }

    .event-modal-icon {
      width: 42px;
      height: 42px;
      display: grid;
      place-items: center;
      border-radius: 10px;
      background: linear-gradient(135deg, #6d5dfc, #3b4be8);
      color: #fff;
      font-size: 24px;
      font-weight: 900;
      box-shadow: 0 12px 28px rgba(79,70,229,.24);
      flex: 0 0 auto;
    }

    .event-modal-kicker {
      color: #64748b;
      font-size: 12px;
      font-weight: 900;
      margin-bottom: 5px;
    }

    .event-modal-subtitle {
      color: #64748b;
      font-size: 13px;
      margin-top: 4px;
      font-weight: 700;
    }

    .event-create-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 270px;
      gap: 18px;
      align-items: start;
    }

    .event-create-main {
      display: grid;
      gap: 14px;
      min-width: 0;
    }

    .event-section {
      background: #fff;
      border: 1px solid #E5E7EB;
      border-radius: 10px;
      padding: 16px;
      box-shadow: 0 14px 36px rgba(15,23,42,.04);
      min-width: 0;
    }

    .event-section-title {
      display: flex;
      align-items: center;
      gap: 9px;
      margin-bottom: 14px;
      color: #1F2937;
      font-size: 16px;
      font-weight: 900;
    }

    .event-section-title::before {
      content: "";
      width: 9px;
      height: 9px;
      border-radius: 999px;
      background: #2563EB;
      box-shadow: 0 0 0 4px rgba(37,99,235,.12);
      flex: 0 0 auto;
    }

    .event-grid-4 {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
    }

    .event-grid-3 {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
    }

    .event-grid-2 {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .event-route-columns {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
      gap: 14px;
      align-items: center;
    }

    .route-arrow {
      width: 34px;
      height: 34px;
      border-radius: 999px;
      border: 1px solid #E5E7EB;
      display: grid;
      place-items: center;
      color: #1F2937;
      font-weight: 900;
      background: #fff;
      justify-self: center;
      align-self: center;
    }

    .event-summary-card {
      position: sticky;
      top: 16px;
      background: #fff;
      border: 1px solid #E5E7EB;
      border-radius: 10px;
      padding: 16px;
      box-shadow: 0 18px 44px rgba(15,23,42,.08);
    }

    .event-summary-card h3 {
      font-size: 17px;
      margin-bottom: 14px;
      color: #1F2937;
    }

    .event-summary-section {
      border-top: 1px solid #E5E7EB;
      padding-top: 12px;
      margin-top: 12px;
      display: grid;
      gap: 8px;
    }

    .event-summary-label {
      color: #6B7280;
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .event-summary-line {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      color: #334155;
      font-size: 13px;
      line-height: 1.35;
    }

    .event-summary-line strong {
      color: #1F2937;
      text-align: right;
    }

    .event-summary-route {
      display: grid;
      gap: 8px;
      font-size: 13px;
      color: #1F2937;
      font-weight: 800;
    }

    .event-summary-status {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      gap: 6px;
      padding: 5px 9px;
      border-radius: 999px;
      background: #eef2ff;
      color: #4f46e5;
      font-size: 12px;
      font-weight: 900;
    }

    .event-summary-option {
      display: flex;
      align-items: center;
      gap: 9px;
      color: #1F2937;
      font-size: 13px;
      font-weight: 900;
      cursor: pointer;
      user-select: none;
    }

    .event-summary-option input {
      width: 16px;
      height: 16px;
      accent-color: var(--blue);
    }

    @media (max-width: 1180px) {
      .event-create-layout {
        grid-template-columns: 1fr;
      }

      .event-summary-card {
        position: static;
      }
    }

    @media (max-width: 820px) {
      .event-grid-4,
      .event-grid-3,
      .event-grid-2,
      .event-route-columns {
        grid-template-columns: 1fr;
      }

      .route-arrow {
        transform: rotate(90deg);
      }
    }

    .action-group {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      flex-wrap: wrap;
    }

    .trash-list {
      max-height: 360px;
      overflow: auto;
      display: grid;
      gap: 9px;
      margin-top: 12px;
    }

    .trash-item {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      background: #f8fafc;
    }

    .trash-item strong,
    .trash-item span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .trash-meta {
      color: var(--muted);
      font-size: 12px;
      margin-top: 3px;
    }

    .trash-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .app-user-password-controls {
      grid-column: 2 / -1;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      min-width: 0;
    }

    .app-user-password-controls > input {
      width: min(320px, 100%);
      min-width: 180px;
    }

    .user-card .app-user-password-controls {
      grid-column: auto;
      justify-content: flex-start;
      flex-wrap: wrap;
    }

    .danger {
      background: var(--danger);
      color: #fff;
      border-color: var(--danger);
    }

    .hide { display: none !important; }

    /* SokoDispo SaaS redesign */
    :root {
      --page: #f4f7fb;
      --panel: #ffffff;
      --nav: #1F2937;
      --nav-2: #0d1d33;
      --text: #1F2937;
      --muted: #6B7280;
      --line: #E5E7EB;
      --soft: #f8fafc;
      --soft-2: #E5E7EB;
      --blue: #5846e8;
      --blue-dark: #432fd2;
      --green: #22c55e;
      --orange: #f97316;
      --menu-bg: #0F172A;
      --menu-hover: #1E293B;
      --menu-active: #2563EB;
      --menu-text: #F8FAFC;
      --menu-muted: #94A3B8;
      --menu-line: #1E293B;
      --shadow: 0 18px 48px rgba(15, 23, 42, .08);
    }

    body {
      background:
        radial-gradient(circle at 68% 0%, rgba(88,70,232,.08), transparent 32%),
        linear-gradient(180deg, #f8fbff 0%, var(--page) 100%);
    }

    .topbar {
      height: 64px;
      background: rgba(255,255,255,.92);
      color: var(--text);
      border-bottom: 1px solid var(--line);
      box-shadow: 0 8px 28px rgba(15,23,42,.06);
      backdrop-filter: blur(14px);
      padding: 0 18px;
    }

    .brand {
      color: var(--text);
      font-size: 20px;
    }

    .brand-logo {
      width: 234px;
      height: 54px;
    }

    .brand-icon {
      color: var(--blue);
    }

    .sidebar-toggle {
      background: #fff;
      border-color: var(--line);
      color: var(--text);
      box-shadow: 0 8px 20px rgba(15,23,42,.06);
    }

    .sidebar-toggle:hover,
    .sidebar-toggle.active {
      background: var(--soft-2);
      border-color: rgba(88,70,232,.28);
    }

    .global-search {
      width: 100%;
      max-width: none;
      min-width: 280px;
      position: relative;
      margin: 0;
    }

    .global-search::before {
      content: "⌕";
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--muted);
      font-size: 18px;
      font-weight: 900;
      pointer-events: none;
    }

    .global-search input {
      width: 100%;
      min-height: 40px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      color: var(--text);
      padding: 0 48px 0 40px;
      outline: 0;
      box-shadow: inset 0 1px 0 rgba(15,23,42,.02), 0 10px 24px rgba(15,23,42,.05);
    }

    .global-search input:focus {
      border-color: rgba(88,70,232,.45);
      box-shadow: 0 0 0 4px rgba(88,70,232,.12), 0 10px 24px rgba(15,23,42,.05);
    }

    .global-search-kbd {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      border-radius: 8px;
      background: #f1f5f9;
      color: var(--muted);
      padding: 3px 7px;
      font-size: 11px;
      font-weight: 950;
    }

    .top-actions {
      gap: 10px;
    }

    .top-actions .btn,
    .btn {
      min-height: 38px;
      border-radius: 10px;
      box-shadow: none;
    }

    .btn.primary {
      background: linear-gradient(135deg, #6d5df4, #432fd2);
      border-color: transparent;
      box-shadow: 0 12px 24px rgba(88,70,232,.24);
    }

    .btn.secondary {
      color: #263246;
      background: #fff;
      border-color: var(--line);
    }

    .btn.danger {
      background: #c94b4b;
      border-color: #c94b4b;
    }

    .user-badge {
      color: var(--muted);
      background: #f8fafc;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 7px 10px;
    }

    .layout {
      grid-template-columns: 292px minmax(0, 1fr);
      gap: 0;
      padding: 0;
      height: calc(100vh - 64px);
    }

    .sidebar {
      min-height: calc(100vh - 64px);
      border: 0;
      border-radius: 0;
      background: var(--menu-bg);
      box-shadow: inset -1px 0 0 var(--menu-line);
      color: var(--menu-text);
    }

    .sidebar-menu {
      padding: 14px 12px;
      gap: 6px;
    }

    .menu-section {
      border: 1px solid transparent;
      border-radius: 10px;
      background: transparent;
      color: var(--menu-text);
    }

    .menu-section[open] {
      background: transparent;
      border-color: var(--menu-line);
    }

    .menu-section summary {
      min-height: 36px;
      color: var(--menu-text);
      font-size: 12px;
      border-radius: 10px;
      padding: 0 10px;
    }

    .menu-section summary:hover {
      background: var(--menu-hover);
    }

    .menu-section[open] summary {
      background: var(--menu-active);
      color: var(--menu-text);
    }

    .menu-section summary::after {
      color: var(--menu-muted);
    }

    .menu-section summary:hover::after,
    .menu-section[open] summary::after {
      color: var(--menu-text);
    }

    .menu-panel {
      padding: 8px 9px 10px;
    }

    .menu-panel .helper,
    .sidebar .helper,
    .sidebar .vehicle-count,
    .sidebar .order-meta,
    .sidebar .driver-upload-status {
      color: var(--menu-muted);
    }

    .sidebar input,
    .sidebar select,
    .sidebar textarea {
      border-color: var(--menu-line);
      background: var(--menu-hover);
      color: var(--menu-text);
    }

    .sidebar input::placeholder {
      color: var(--menu-muted);
    }

    .sidebar option {
      color: var(--text);
    }

    .sidebar .vehicle-card,
    .sidebar .driver-card,
    .sidebar .client-chip,
    .sidebar .user-card,
    .sidebar .order-card,
    .sidebar .stat-card {
      border-color: rgba(255,255,255,.1);
      background: rgba(30,41,59,.72);
      color: var(--menu-text);
    }

    .sidebar .delete-btn {
      background: var(--menu-hover);
      color: var(--menu-text);
    }

    .planner {
      height: calc(100vh - 64px);
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      position: relative;
      grid-template-rows: auto auto minmax(0, 1fr);
      padding: 18px 24px 24px;
      gap: 12px;
    }

    .planner-toolbar {
      min-height: 58px;
      padding: 0;
      border: 0;
      grid-template-columns: auto max-content minmax(300px, 500px) minmax(0, 1fr) auto auto;
    }

    @media (min-width: 921px) {
      .planner-toolbar .calendar-filter {
        grid-column: 5;
      }

      .planner-toolbar .tabs {
        grid-column: 6;
      }
    }

    .nav-btn,
    .today-btn {
      background: #fff;
      border: 1px solid var(--line);
      box-shadow: 0 8px 18px rgba(15,23,42,.05);
    }

    .period-title {
      font-size: clamp(17px, 1.25vw, 23px);
      letter-spacing: 0;
    }

    .week-badge,
    .day-kw {
      border: 0;
      background: rgba(88,70,232,.1);
      color: var(--blue);
    }

    .tabs {
      background: #eef2f7;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 5px;
    }

    .tabs button.active {
      color: var(--blue);
      box-shadow: 0 8px 22px rgba(15,23,42,.08);
    }

    .calendar-filter summary {
      min-height: 42px;
      border-radius: 12px;
      box-shadow: 0 8px 20px rgba(15,23,42,.06);
    }

    .dashboard-cards {
      display: grid;
      grid-template-columns: repeat(3, minmax(150px, 1fr));
      gap: 10px;
    }

    .dashboard-card {
      min-height: 70px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255,255,255,.72);
      box-shadow: 0 8px 22px rgba(15,23,42,.04);
      padding: 10px 12px;
      display: grid;
      grid-template-columns: 36px minmax(0, 1fr);
      gap: 10px;
      align-items: center;
    }

    .dashboard-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: 950;
      font-size: 15px;
      box-shadow: 0 8px 16px rgba(15,23,42,.1);
    }

    .dashboard-icon.blue { background: linear-gradient(135deg, #3b82f6, #5846e8); }
    .dashboard-icon.green { background: linear-gradient(135deg, #22c55e, #16a34a); }
    .dashboard-icon.orange { background: linear-gradient(135deg, #fb923c, #f97316); }
    .dashboard-icon.purple { background: linear-gradient(135deg, #8b5cf6, #5846e8); }
    .dashboard-icon.slate { background: linear-gradient(135deg, #64748b, #334155); }

    .dashboard-label {
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
      line-height: 1.2;
    }

    .dashboard-value {
      margin-top: 3px;
      color: var(--text);
      font-size: 18px;
      font-weight: 950;
      line-height: 1;
    }

    .dashboard-note {
      margin-top: 4px;
      color: #16a34a;
      font-size: 10px;
      font-weight: 850;
    }

    .calendar-shell {
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #F6F7F9;
      box-shadow: 0 18px 48px rgba(15,23,42,.08);
      overflow: auto;
    }

    .board-cell {
      border-color: #E5E7EB;
    }

    .corner,
    .day-head,
    .row-head {
      background: #F6F7F9;
    }

    .corner {
      font-size: 14px;
    }

    .day-head .main {
      font-size: 14px;
    }

    .day-head .sub {
      font-size: 11px;
    }

    .row-head {
      align-items: flex-start;
      padding-left: 18px;
      font-size: 14px;
      text-align: left;
    }

    .row-head .driver-name {
      font-size: 10px;
    }

    .event-chip {
      border-radius: 7px;
      box-shadow: 0 10px 18px rgba(15,23,42,.1);
    }

    .search-dim {
      opacity: .22;
      filter: saturate(.65);
    }

    .manager-dialog {
      width: min(1280px, calc(100vw - 28px));
    }

    .manager-view {
      display: grid;
      gap: 22px;
    }

    .manager-hero {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
    }

    .manager-title {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .manager-title-icon {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: var(--blue);
      background: rgba(88,70,232,.1);
      font-size: 22px;
      font-weight: 950;
    }

    .manager-title h2 {
      font-size: 30px;
      line-height: 1.1;
    }

    .manager-title p {
      margin: 6px 0 0;
      color: var(--muted);
      font-weight: 750;
    }

    .manager-search {
      display: grid;
      grid-template-columns: minmax(220px, 1fr) auto;
      gap: 12px;
      align-items: center;
      min-width: min(440px, 100%);
    }

    .manager-search input {
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 0 13px;
      outline: 0;
    }

    .manager-search input:focus {
      border-color: rgba(88,70,232,.45);
      box-shadow: 0 0 0 4px rgba(88,70,232,.1);
    }

    .manager-stats {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
    }

    .manager-stat {
      min-height: 92px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fff;
      padding: 14px;
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr);
      gap: 12px;
      align-items: center;
      box-shadow: 0 10px 28px rgba(15,23,42,.05);
    }

    .manager-stat-icon {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: 950;
    }

    .manager-stat strong {
      display: block;
      margin-top: 4px;
      font-size: 24px;
      line-height: 1;
    }

    .manager-stat span,
    .manager-table th {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .manager-table-wrap {
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fff;
      overflow: hidden;
      box-shadow: 0 12px 32px rgba(15,23,42,.05);
    }

    .manager-table {
      width: 100%;
      border-collapse: collapse;
    }

    .manager-table th,
    .manager-table td {
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
      text-align: left;
      vertical-align: middle;
    }

    .manager-table th {
      background: #f8fafc;
      text-transform: uppercase;
      letter-spacing: .02em;
    }

    .manager-table tr:last-child td {
      border-bottom: 0;
    }

    .client-avatar {
      width: 38px;
      height: 38px;
      border-radius: 9px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      background: linear-gradient(135deg, #38bdf8, #5846e8);
      font-weight: 950;
      margin-right: 12px;
      vertical-align: middle;
    }

    .manager-client-name {
      display: inline-flex;
      flex-direction: column;
      gap: 3px;
      vertical-align: middle;
    }

    .manager-client-name strong {
      font-size: 14px;
    }

    .manager-client-name span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .status-pill {
      display: inline-flex;
      width: fit-content;
      border-radius: 999px;
      padding: 4px 9px;
      font-size: 12px;
      font-weight: 950;
      background: #dcfce7;
      color: #15803d;
    }

    .status-pill.inactive {
      background: #ffedd5;
      color: #c2410c;
    }

    .manager-actions {
      display: inline-flex;
      gap: 8px;
    }

    .manager-icon-btn {
      width: 34px;
      height: 34px;
      border-radius: 9px;
      border: 1px solid var(--line);
      background: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-weight: 950;
    }

    .manager-icon-btn:hover {
      background: var(--soft-2);
    }

    .manager-icon-btn.danger {
      background: #fff;
      color: var(--danger);
      border-color: #f3c2c2;
    }

    [data-manager-driver-card],
    [data-client-row] {
      grid-template-columns: minmax(208px, 1.2fr) minmax(208px, .9fr) minmax(208px, 1.4fr) 42px;
    }

    .manager-row-delete {
      justify-self: end;
      align-self: center;
      font-size: 18px;
      line-height: 1;
    }

    .client-create-row {
      display: grid;
      grid-template-columns: minmax(220px, 1fr) auto;
      gap: 10px;
      padding: 14px;
      border-bottom: 1px solid var(--line);
      background: #fbfdff;
    }

    .client-create-row input {
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 0 12px;
    }

    .workspace-panel {
      position: absolute;
      inset: 0;
      z-index: 45;
      background:
        radial-gradient(circle at 72% 0%, rgba(88,70,232,.08), transparent 30%),
        #f8fbff;
      padding: 28px;
      overflow: auto;
    }

    .workspace-panel.hidden {
      display: none;
    }

    .workspace-shell {
      min-height: 100%;
      display: grid;
      gap: 22px;
      align-content: start;
    }

    .workspace-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
    }

    .workspace-kicker {
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
      margin-bottom: 12px;
    }

    .workspace-title {
      display: flex;
      align-items: center;
      gap: 13px;
    }

    .workspace-title h2 {
      font-size: clamp(28px, 2vw, 38px);
      line-height: 1.05;
    }

    .workspace-title p {
      margin: 7px 0 0;
      color: var(--muted);
      font-weight: 750;
    }

    .workspace-icon {
      width: 48px;
      height: 48px;
      border-radius: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      background: linear-gradient(135deg, #3b82f6, #5846e8);
      font-size: 22px;
      font-weight: 950;
      box-shadow: 0 14px 28px rgba(88,70,232,.18);
    }

    .workspace-tools {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 10px;
    }

    .workspace-tabs {
      display: flex;
      width: fit-content;
      gap: 6px;
      padding: 5px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #eef3fb;
    }

    .workspace-tabs button {
      min-height: 36px;
      border-radius: 10px;
      padding: 0 14px;
      background: transparent;
      color: var(--muted);
      font-weight: 950;
    }

    .workspace-tabs button.active {
      background: #fff;
      color: var(--blue);
      box-shadow: 0 8px 20px rgba(15,23,42,.08);
    }

    .order-manager-tabs {
      align-self: center;
      flex-shrink: 0;
    }

    .order-manager-tabbar {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: center;
    }

    .vehicle-manager-form {
      display: grid;
      grid-template-columns: minmax(240px, 1fr) auto;
      gap: 10px;
      width: min(560px, 100%);
    }

    #usersManagerForm {
      width: 100%;
      grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
    }

    .vehicle-manager-form input,
    .vehicle-manager-form select,
    .vehicle-manager-search input,
    .vehicle-manager-card textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      color: var(--text);
      outline: 0;
    }

    .vehicle-manager-form input,
    .vehicle-manager-form select,
    .vehicle-manager-search input {
      min-height: 42px;
      padding: 0 13px;
    }

    .workspace-subtitle {
      margin: 4px 0 -4px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .vehicle-manager-search {
      width: min(360px, 100%);
    }

    .vehicle-manager-stats {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
    }

    .vehicle-manager-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
    }

    #settingsManagerGrid {
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      align-items: stretch;
    }

    #settingsManagerGrid .vehicle-manager-card {
      grid-template-columns: 1fr;
      align-content: start;
      gap: 14px;
      min-height: 0;
    }

    #settingsManagerGrid .vehicle-manager-controls {
      grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr);
    }

    #settingsManagerGrid .menu-button-stack {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 10px;
    }

    #settingsManagerGrid .driver-upload-status {
      margin-top: 10px;
      min-height: 20px;
    }

    #settingsManagerGrid + .workspace-subtitle {
      display: none;
    }

    #settingsManagerGrid + .workspace-subtitle + .vehicle-manager-card {
      grid-template-columns: 1fr;
      align-content: start;
      gap: 14px;
    }

    #settingsManagerGrid + .workspace-subtitle + .vehicle-manager-card .vehicle-manager-controls {
      grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr);
    }

    #settingsManagerGrid + .workspace-subtitle + .vehicle-manager-card .menu-button-stack {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 10px;
    }

    #settingsManagerGrid + .workspace-subtitle + .vehicle-manager-card .driver-upload-status {
      margin-top: 10px;
      min-height: 20px;
    }

    .vehicle-manager-card {
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255,255,255,.92);
      box-shadow: 0 8px 24px rgba(15,23,42,.045);
      padding: 14px;
      display: grid;
      grid-template-columns: minmax(260px, 1.2fr) minmax(260px, .9fr) minmax(260px, 1.4fr);
      gap: 16px;
      align-items: center;
    }

    .vehicle-manager-top {
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
    }

    .vehicle-manager-avatar {
      width: 48px;
      height: 48px;
      border-radius: 13px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: 950;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
    }

    .vehicle-manager-name {
      min-width: 0;
    }

    .vehicle-manager-name strong,
    .vehicle-manager-name span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .vehicle-manager-name strong {
      font-size: 16px;
    }

    .vehicle-manager-name span {
      margin-top: 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .vehicle-manager-controls {
      display: grid;
      grid-template-columns: 84px minmax(0, 1fr);
      gap: 8px 10px;
      align-items: center;
    }

    .vehicle-manager-controls label {
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .vehicle-manager-card textarea {
      min-height: 58px;
      padding: 10px 12px;
      resize: vertical;
    }

    .vehicle-manager-card.order-manager-order {
      grid-template-columns: 1fr;
      gap: 10px;
      cursor: pointer;
    }

    .order-trip-toggle {
      border: 1px solid var(--line);
      background: #fff;
      color: #1F2937;
      width: 34px;
      height: 34px;
      border-radius: 10px;
      display: inline-grid;
      place-items: center;
      cursor: pointer;
      font-size: 16px;
      font-weight: 950;
      line-height: 1;
      transition: background .15s ease, transform .15s ease;
    }

    .order-trip-toggle:hover {
      background: #F6F7F9;
    }

    .order-trip-toggle.is-open {
      transform: rotate(180deg);
    }

    .order-trip-list {
      border-top: 1px solid #E5E7EB;
      display: grid;
      gap: 7px;
      padding-top: 10px;
      margin-left: 50px;
    }

    .order-trip-item {
      border: 1px solid #E5E7EB;
      border-radius: 10px;
      background: #F6F7F9;
      padding: 9px 11px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      cursor: pointer;
    }

    .order-trip-item:hover {
      border-color: rgba(37,99,235,.35);
      background: #eef2ff;
    }

    .order-trip-item strong,
    .order-trip-item span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .order-trip-item strong {
      color: #1F2937;
      font-size: 13px;
      font-weight: 950;
    }

    .order-trip-item span {
      color: #6B7280;
      font-size: 11px;
      font-weight: 850;
      margin-top: 2px;
    }

    .vehicle-manager-empty {
      border: 1px dashed var(--line);
      border-radius: 16px;
      background: rgba(255,255,255,.72);
      padding: 30px;
      color: var(--muted);
      font-weight: 850;
      text-align: center;
    }

    .workspace-panel {
      padding: 22px;
      font-size: 80%;
    }

    .workspace-shell {
      gap: 18px;
    }

    .workspace-head {
      gap: 14px;
    }

    .workspace-kicker {
      font-size: 11px;
      margin-bottom: 9px;
    }

    .workspace-title {
      gap: 10px;
    }

    .workspace-title h2 {
      font-size: clamp(22px, 1.6vw, 30px);
    }

    .workspace-title p {
      margin-top: 5px;
      font-size: 12px;
    }

    .workspace-icon {
      width: 38px;
      height: 38px;
      border-radius: 11px;
      font-size: 18px;
    }

    .workspace-tools {
      gap: 8px;
    }

    .workspace-tabs {
      gap: 5px;
      padding: 4px;
      border-radius: 12px;
    }

    .workspace-tabs button {
      min-height: 30px;
      border-radius: 9px;
      padding: 0 11px;
      font-size: 12px;
    }

    .workspace-panel .btn,
    .workspace-panel input,
    .workspace-panel select,
    .workspace-panel textarea {
      font-size: 12px;
    }

    .vehicle-manager-form {
      gap: 8px;
      width: min(448px, 100%);
    }

    #usersManagerForm {
      grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
    }

    .vehicle-manager-form input,
    .vehicle-manager-form select,
    .vehicle-manager-search input {
      min-height: 34px;
      padding: 0 10px;
      border-radius: 10px;
    }

    .workspace-subtitle {
      font-size: 11px;
      margin: 3px 0 -3px;
    }

    .vehicle-manager-search {
      width: min(288px, 100%);
    }

    .manager-stats,
    .vehicle-manager-stats {
      gap: 11px;
    }

    .manager-stat {
      min-height: 74px;
      border-radius: 11px;
      padding: 11px;
      grid-template-columns: 38px minmax(0, 1fr);
      gap: 10px;
    }

    .manager-stat-icon {
      width: 38px;
      height: 38px;
      border-radius: 10px;
      font-size: 14px;
    }

    .manager-stat strong {
      margin-top: 3px;
      font-size: 19px;
    }

    .manager-stat span,
    .manager-table th {
      font-size: 10px;
    }

    .manager-table-wrap {
      border-radius: 11px;
    }

    .manager-table th,
    .manager-table td {
      padding: 11px 13px;
    }

    .vehicle-manager-grid {
      gap: 8px;
    }

    .vehicle-manager-card {
      border-radius: 11px;
      padding: 11px;
      grid-template-columns: minmax(208px, 1.2fr) minmax(208px, .9fr) minmax(208px, 1.4fr);
      gap: 13px;
    }

    .vehicle-manager-top {
      grid-template-columns: 38px minmax(0, 1fr) auto;
      gap: 10px;
    }

    .vehicle-manager-avatar {
      width: 38px;
      height: 38px;
      border-radius: 10px;
      font-size: 13px;
    }

    .vehicle-manager-name strong {
      font-size: 13px;
    }

    .vehicle-manager-name span {
      margin-top: 3px;
      font-size: 10px;
    }

    .vehicle-manager-controls {
      grid-template-columns: 67px minmax(0, 1fr);
      gap: 6px 8px;
    }

    .vehicle-manager-controls label {
      font-size: 9px;
    }

    .vehicle-manager-card textarea {
      min-height: 46px;
      padding: 8px 10px;
      border-radius: 10px;
    }

    .vehicle-manager-empty {
      border-radius: 13px;
      padding: 24px;
    }

    dialog {
      border-radius: 20px;
    }

    .modal {
      border-radius: 20px;
    }

@media (max-width: 920px) {
      .auth-screen {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 20px;
      }

      .auth-logo-panel {
        width: min(420px, 92vw);
        min-height: 190px;
        justify-self: center;
      }

      .topbar {
        height: auto;
        min-height: 84px;
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
      }

      .top-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
      }

      .topbar.driver-view {
        min-height: 64px;
        flex-direction: row;
        align-items: center;
      }

      .topbar.driver-view .top-actions {
        width: auto;
        display: flex;
        padding-right: 18px;
      }

      .layout {
        grid-template-columns: 1fr;
        padding: 14px;
        height: auto;
        min-height: calc(100vh - 84px);
        overflow: visible;
      }

      .sidebar,
      .planner {
        height: auto;
        min-height: auto;
      }

      .planner-toolbar {
        grid-template-columns: 1fr;
      }

      .tabs {
        width: 100%;
        min-width: 0;
      }

      .stats-summary,
      .vehicle-util-row,
      .client-stats {
        grid-template-columns: 1fr;
      }

      .util-value {
        text-align: left;
      }

      .driver-order-card {
        grid-template-columns: 1fr;
        gap: 8px;
      }

      .driver-order-actions {
        grid-template-columns: 1fr;
      }

      .crop-controls {
        grid-template-columns: 1fr 1fr;
      }

      .orders-filter-grid {
        grid-template-columns: 1fr;
      }

      .order-filter-field.date-field,
      .order-filter-field.list-field,
      .order-filter-field.scale-field,
      .orders-filter-grid #ordersPdfBtn {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 640px) {
      body {
        overflow: auto;
      }

      .auth-screen {
        min-height: 100svh;
        padding: 14px;
      }

      .auth-logo-panel {
        width: min(300px, 86vw);
        min-height: 150px;
      }

      .auth-card {
        padding: 18px;
        border-radius: 14px;
      }

      .auth-card h1 {
        font-size: 24px;
      }

      .topbar {
        position: sticky;
        top: 0;
        z-index: 20;
        min-height: 0;
        padding: 10px;
        gap: 9px;
      }

      .top-left {
        width: 100%;
        justify-content: space-between;
      }

      .brand {
        font-size: 18px;
        gap: 0;
        margin-left: -22px;
      }

      .brand-logo {
        width: 172px;
        height: 42px;
      }

      .brand-icon {
        width: 26px;
      }

      .user-badge {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
        justify-content: center;
        font-size: 11px;
        min-height: 28px;
      }

      .top-actions {
        display: flex;
        width: 100%;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 2px;
        scrollbar-width: thin;
      }

      .top-actions .btn {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 0 10px;
        font-size: 12px;
      }

      .layout {
        padding: 8px;
        gap: 8px;
        min-height: calc(100svh - 104px);
      }

      .sidebar {
        max-height: 42svh;
        overflow: auto;
        border-radius: 12px;
      }

      .layout.sidebar-collapsed {
        grid-template-columns: 1fr;
      }

      .layout.sidebar-collapsed .sidebar {
        display: none;
      }

      .menu-section summary {
        min-height: 44px;
        padding: 0 12px;
        font-size: 15px;
      }

      .menu-panel {
        padding: 0 10px 10px;
      }

      .vehicle-form,
      .driver-form,
      .client-form {
        grid-template-columns: minmax(0, 1fr) 42px;
      }

      .planner {
        min-height: 58svh;
        border-radius: 12px;
      }

      .planner-toolbar {
        gap: 8px;
        padding: 10px;
      }

      .nav {
        width: 100%;
        grid-template-columns: 38px 1fr 38px;
      }

      .period-title {
        font-size: 18px;
        flex-wrap: wrap;
      }

      .week-badge {
        font-size: 11px;
      }

      .tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 4px;
      }

      .tabs button {
        min-height: 34px;
        font-size: 12px;
        padding: 0 4px;
      }

      .calendar-shell {
        height: 58svh;
        min-height: 420px;
        -webkit-overflow-scrolling: touch;
      }

      body.admin-session .planner {
        min-height: calc(100svh - 120px);
      }

      body.admin-session .calendar-shell {
        display: none;
      }

      body.admin-session .mobile-admin-orders {
        display: block;
        min-height: 58svh;
      }

      body.admin-session .tabs {
        display: none;
      }

      .board {
        grid-template-columns: 134px repeat(var(--cols), minmax(var(--day-min, 132px), 1fr));
      }

      .board.year-board {
        grid-template-columns: 134px repeat(var(--cols), minmax(48px, 1fr));
      }

      .corner,
      .day-head {
        min-height: 58px;
      }

      .corner {
        padding: 16px 8px;
        font-size: 14px;
      }

      .day-head {
        padding: 8px 6px;
      }

      .day-head .main {
        font-size: 13px;
      }

      .day-head .sub {
        font-size: 10px;
      }

      .row-head {
        min-height: 78px;
        padding: 8px;
        font-size: 14px;
      }

      .drop-cell {
        min-height: 78px;
        padding: 6px;
      }

      .event-chip {
        min-height: 28px;
        padding: 4px 6px;
        font-size: 10px;
      }

      .form-grid,
      .stats-summary,
      .vehicle-util-row,
      .client-stats,
      .trash-item {
        grid-template-columns: 1fr;
      }

      dialog {
        width: min(100vw - 12px, 620px);
        max-height: calc(100svh - 12px);
        overflow: auto;
        border-radius: 14px;
      }

      #eventDialog,
      #driverOrderDialog {
        width: min(100vw - 12px, 620px);
      }

      #eventDialog {
        width: 100vw;
        height: 100svh;
        max-height: 100svh;
        border-radius: 0;
      }

      .event-modal {
        max-height: 100svh;
        padding: 14px;
      }

      .event-modal .modal-head {
        top: -14px;
        padding: 14px 0 12px;
      }

      .modal {
        padding: 16px;
      }

      .modal-head {
        align-items: flex-start;
        gap: 10px;
      }

      .modal h2 {
        font-size: 21px;
      }

      .modal-actions {
        flex-direction: column-reverse;
      }

      .action-group {
        width: 100%;
        justify-content: stretch;
      }

      .action-group .btn,
      .modal-actions > .btn {
        flex: 1 1 auto;
      }

      .weekday-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      .attachment-item {
        grid-template-columns: 1fr;
      }

      .attachment-item .btn {
        width: 100%;
      }
    }

    @media (max-width: 1180px) {
      .dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 920px) {
      .global-search {
        width: 100%;
        max-width: none;
        min-width: 0;
      }

      .planner-toolbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
      }

      .planner-toolbar .global-search {
        grid-column: 1 / -1;
      }

      .planner-toolbar .tabs {
        grid-column: 1 / -1;
      }

      .dashboard-cards {
        grid-template-columns: 1fr;
      }

      .manager-hero,
      .manager-search {
        grid-template-columns: 1fr;
      }

      .manager-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .manager-table-wrap {
        overflow-x: auto;
      }

      .manager-table {
        min-width: 780px;
      }

      .vehicle-manager-card {
        grid-template-columns: 1fr;
        align-items: stretch;
      }

      [data-manager-driver-card],
      [data-client-row] {
        grid-template-columns: 1fr auto;
      }

      [data-manager-driver-card] > :not(.manager-row-delete),
      [data-client-row] > :not(.manager-row-delete) {
        grid-column: 1;
      }

      [data-manager-driver-card] .manager-row-delete,
      [data-client-row] .manager-row-delete {
        grid-column: 2;
        grid-row: 1 / span 3;
      }

      .app-user-password-controls {
        grid-column: auto;
        justify-content: flex-start;
        flex-wrap: wrap;
      }
    }

    @media (max-width: 640px) {
      .global-search {
        min-width: 0;
      }

      .dashboard-card {
        min-height: 66px;
        grid-template-columns: 34px minmax(0, 1fr);
        padding: 9px 10px;
      }

      .dashboard-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
      }

      .dashboard-value {
        font-size: 17px;
      }

      .manager-title {
        align-items: flex-start;
      }

      .manager-title h2 {
        font-size: 24px;
      }

      .manager-stats,
      .client-create-row {
        grid-template-columns: 1fr;
      }
    }
