:root {
      --bg: #f5f7fb;
      --sidebar: #072b42;
      --text-dark: #08171c;
      --text-muted: #6a7b87;
      --border: #e2e7ee;
      --card: #ffffff;
      --accent: #18c2a5;
      --pill-bg: #dbe4f1;
      --pill-bg-hover: #c4d3e8;
      --pill-text: #0d1f29;
    }
    * {
      box-sizing: border-box;
    }
    .btn-accent {
        background: var(--accent);
        color: var(--bs-white);
    }
    .btn-accent:hover {
        background: var(--accent);
        color: var(--bs-white);
    }
    body {
      margin: 0;
      font-family: 'Spline Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      background: var(--bg);
      color: var(--text-dark);
    }
    .app {
      display: grid;
      grid-template-columns: 240px 1fr;
      min-height: 100vh;
    }
    aside.sidebar {
      background: var(--sidebar);
      color: #f7fbff;
      padding: 32px 18px;
      display: flex;
      flex-direction: column;
      gap: 3rem;
      border-radius: 1rem;
      margin: 1rem 0;
    }
    .logo {
      display: flex;
      align-items: center;
      font-weight: 600;
      letter-spacing: 0.02em;
      margin-bottom: 1rem;
    }
    .logo-badge {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      background: linear-gradient(135deg, #0f7d7f, #0cb5a3);
      display: grid;
      place-items: center;
      font-weight: 700;
    }
    nav {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .nav-label {
      font-size: 13px;
      text-transform: uppercase;
      color: rgba(255, 255, 255, 0.45);
      margin-bottom: 8px;
      letter-spacing: 0.08em;
    }
    .nav-link {
      color: inherit;
      text-decoration: none;
      padding: 4px 12px;
      border-radius: 10px;
      font-weight: 500;
      font-size: 15px;
      display: flex;
      align-items: center;
      /* justify-content: space-between; */
    }
    .nav-link img {
        margin-right: 0.5rem;
        vertical-align: baseline;
        height: 18px;
        width: 18px;
        margin-bottom: 2px;
    }
    .nav-link.active img path {
        fill: #00B3A0;
    }
    .nav-link.active,
    .nav-link:hover {
      background: rgba(255, 255, 255, 0.08);
    }
    .sidebar-bottom {
      margin-top: auto;
      display: flex;
      flex-direction: column;
      gap: 8px;
      font-weight: 500;
    }
    main.main-content {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 24px;
    }
    .card {
        border: 0;
    }
    .user-bar {
        display: flex;
        align-items: center;
    }
    .user-bar > div {
        margin-left: 0.5rem;
    }
    .top-bar {
        height: 3rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--card);
        border-radius: 1rem;
    }
    .breadcrumbs {
        border-left: 1px solid var(--border);
      font-size: 14px;
      font-weight: 300;
      color: var(--text-muted);
    }
    .user-chip {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 6px 12px;
      border-radius: 999px;
      background: var(--card);
      border: 1px solid var(--border);
    }
    .user-chip strong {
      font-size: 14px;
    }
    .avatar {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: #cfe9e4;
      display: grid;
      place-items: center;
      font-weight: 600;
      color: #0c6f63;
    }
    .notification-wrapper {
      position: relative;
    }
    .notification-panel {
      position: absolute;
      right: 0;
      top: 130%;
      min-width: 260px;
      max-width: 320px;
      max-height: 360px;
      overflow-y: auto;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
      padding: 12px;
      display: none;
      z-index: 1000;
    }
    .notification-panel.show {
      display: block;
    }
    .notification-item {
      padding: 8px 6px;
      border-bottom: 1px solid #eef0f2;
    }
    .notification-item:last-child {
      border-bottom: 0;
    }
    .notif-badge {
      position: absolute;
      top: -6px;
      right: -8px;
      background: #e55353;
      color: #fff;
      border-radius: 999px;
      padding: 2px 6px;
      font-size: 10px;
      font-weight: 700;
      line-height: 1;
    }
    .grid-2 {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 20px;
    }
    .grid-1-1 {
      display: grid;
      grid-template-columns: 1.15fr 0.85fr;
      gap: 24px;
    }
    .card {
      background: var(--card);
      border-radius: 1rem;
      padding: 1rem;
      border: 1px solid var(--border);
      box-shadow: 0 20px 45px rgba(17, 49, 96, 0.05);
      margin-bottom: 1rem;
      overflow: hidden;
    }
    .card h3 {
        margin: 0;
      font-size: 16px;
    }
    .card h4 {
      margin: 0;
      font-size: 14px;
      /*
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.04em;
      */
    }
    .card .text-active {
        color: #15927d;
    }
    .stat-line {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 16px;
    }
    .stat-group {
      display: grid;
      grid-template-columns: repeat(4, minmax(40px, 1fr));
      gap: 16px;
      margin-top: 18px;
    }
    .stat {
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-weight: 500;
      font-size: 13px;
      line-height: normal;
      white-space: nowrap;
      overflow: hidden;
    }
    .stat span {
      font-size: 22px;
      color: var(--text-dark);
    }
    .forecast-cols {
        white-space: nowrap;
        display: flex;
        overflow-x: auto;
        margin-top: 1rem;
        scrollbar-color: rgba(0,0,0,0.3) transparent;
        scrollbar-width: thin;
        padding-bottom: 1rem;
      }
    .forecast {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      padding-right: 1rem;
      gap: 4px;
    }
    .forecast img {
    }
    .forecast strong {
        break-after: always; 
        font-weight: 500;
        color: #15927d;
      font-size: 12px;
    }
    .forecast small {
        display: block;
        padding-top: 10px;
        color: var(--text-muted);
        font-size: 10px;
    }
    .chart-header {
      display: flex;
      justify-content: space-between;
    }
    .chart-wrapper {
      height: 320px;
    }
    .chart-wrapper canvas {
      display: block;
      width: 100%;
      height: 100%;
    }
    .map-card {
      padding: 0;
      aspect-ratio: 1/1;
      overflow: hidden;
    }
    .map-embed {
      width: 100%;
      height: 100%;
    }
    .map-label span {
      background: rgba(7, 43, 66, 0.85);
      font-size: 11px;
      white-space: nowrap;
      padding: 0.3rem 0.5rem;
    }
    .map-label {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      text-align: center;
      width: max-content;
      position: absolute;
      top: 0;
      left: 50%;
      transform: translate(-50%, calc(-100% - 10px));
      pointer-events: none;
    }
    .map-label .icon {
        border-radius: 50%;
        background: var(--bs-white);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        aspect-ratio: 1/1;
        width: 28px;
        height: 28px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        color: #000;
        font-size: 16px;
    }
    .map-label img {
        filter: brightness(0%);
        width: 14px;
        height: 14px;
    }
    .map-marker {
      background: transparent;
      border: none;
    }
    .map-label span {
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .map-label small {
      color: rgba(255, 255, 255, 0.8);
      font-weight: 500;
    }
    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }
    th {
      text-align: left;
      color: var(--text-muted) !important;
      font-size: 11px;
      padding-bottom: 8px;
      font-weight: 400;
      text-transform: uppercase;
    }
    td {
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
    }
    tr td:last-child {
        text-align: right;
    }
    .badge {
      padding: 4px 10px;
      border-radius: 999px;
      background: var(--bs-gray-200);
      color: #0a7d66;
      font-weight: 400;
      font-size: 12px;
    }
    .tracking-icons {
        display: flex;
        align-items: center;
        width: auto;
    }
    .tracking-icons .progress-wrap {
        display: inline-block;
        position: relative;
        width: 100px;
    }
    .tracking-icons .progress {
        height: 4px;
    }
    .tracking-icons .progress .progress-bar {
        background: var(--text-muted);
    }
    .progress-truck {
        position: absolute;
        top: -5px;
    }
    .progress-lunch {
        position: absolute;
        top: -5px;
    }
    .progress-charge {
        position: absolute;
        top: -5px;
    }
    .section-heading {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-weight: 500;
      margin-bottom: 1rem;
    }
    .link {
      font-size: 12px;
      color: #15927d;
      text-decoration: none;
    }
    .stacked {
      display: grid;
      gap: 12px;
    }
    .update {
      padding: 16px;
      border-radius: 16px;
      border: 1px solid var(--border);
      background: #f9fbfd;
      display: grid;
      gap: 6px;
    }
    .update small {
      font-size: 12px;
      color: var(--text-muted);
    }
    .update-actions {
      display: flex;
      gap: 10px;
      margin-top: 10px;
    }
    .actions {
        margin-left: 0.5rem;
        white-space: nowrap;
    }
    .pill-btn {
      flex: 1;
      border-radius: 12px;
      padding: 10px;
      border: none;
      background: var(--card);
      border: 1px solid var(--border);
      font-weight: 600;
      font-size: 13px;
      cursor: pointer;
    }
    .pill-btn.primary {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
    }
    .loads-page {
      margin-top: 0.5rem;
    }
    .loads-card {
      padding: 1.75rem;
    }
    .loads-card__header {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 1rem;
      margin-bottom: 1.5rem;
    }
    .loads-title {
      display: flex;
      gap: 1.25rem;
      align-items: flex-start;
    }
    .loads-title__icon {
      width: 54px;
      height: 54px;
      border-radius: 16px;
      background: rgba(24, 194, 165, 0.15);
      display: grid;
      place-items: center;
    }
    .loads-actions {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .btn-pill {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      border-radius: 999px;
      padding: 0.5rem 1.1rem;
      border: 1px solid transparent;
      background: var(--pill-bg);
      color: var(--pill-text);
      font-weight: 600;
      font-size: 0.9rem;
    }
    .btn-pill:hover,
    .btn-pill:focus {
      background: var(--pill-bg-hover);
      color: var(--text-dark);
      border-color: transparent;
      text-decoration: none;
      box-shadow: 0 6px 16px rgba(13, 31, 41, 0.18);
    }
    .btn-pill:focus-visible {
      outline: 2px solid rgba(24, 194, 165, 0.5);
      outline-offset: 2px;
    }
    .btn-primary.btn-pill {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
      box-shadow: 0 12px 30px rgba(24, 194, 165, 0.35);
    }
    .btn-primary.btn-pill:hover,
    .btn-primary.btn-pill:focus {
      background: #0fb093;
      border-color: #0fb093;
      color: #fff;
    }
    .btn-accent.btn-pill {
      border: none;
      box-shadow: 0 12px 30px rgba(24, 194, 165, 0.25);
      text-decoration: none;
    }
    .loads-search {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.4rem 0.9rem;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--bg);
    }
    .loads-search input {
      border: none;
      background: transparent;
      font-size: 0.9rem;
      outline: none;
      width: 160px;
    }
    .eyebrow {
      text-transform: uppercase;
      letter-spacing: 0.15em;
      font-size: 11px;
      color: var(--text-muted);
    }
    .loads-kpis {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 0.85rem;
      margin-bottom: 1.5rem;
    }
    .load-chip {
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 0.85rem 1rem;
      background: #f7fafc;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }
    .load-chip .label {
      font-size: 0.8rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .load-chip .value {
      font-size: 1.4rem;
      font-weight: 600;
    }
    .load-chip .trend {
      font-size: 0.75rem;
    }
    .loads-tabs {
      display: flex;
      justify-content: space-between;
      margin-bottom: 0.75rem;
    }
    .segments {
      background: var(--bg);
      border-radius: 999px;
      padding: 0.3rem;
      display: inline-flex;
      gap: 0.3rem;
      border: 1px solid var(--border);
    }
    .segments .segment {
      border: none;
      background: transparent;
      padding: 0.5rem 1.25rem;
      border-radius: 999px;
      font-weight: 600;
      font-size: 0.9rem;
      color: var(--text-muted);
      cursor: pointer;
    }
    .segments .segment.active {
      background: #fff;
      color: var(--text-dark);
      box-shadow: 0 8px 18px rgba(8, 23, 28, 0.08);
    }
    .loads-table {
      max-height: none;
      overflow: visible;
    }
    .loads-table table {
      min-width: 900px;
    }
    .loads-table th {
      font-size: 0.72rem;
      letter-spacing: 0.08em;
    }
    .loads-table td {
      font-size: 0.92rem;
    }
    .status-pill {
      padding: 4px 12px;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      background: #e4f5f0;
      color: #0c6f63;
      border: 1px solid transparent;
    }
    .status-pill.assigned {
      background: rgba(24, 194, 165, 0.15);
      border-color: rgba(24, 194, 165, 0.32);
      color: #0f9a8a;
    }
    .status-pill.unassigned {
      background: rgba(54, 162, 235, 0.15);
      border-color: rgba(54, 162, 235, 0.3);
      color: #1572a1;
    }
    .status-pill.muted {
      background: #f2f4f7;
      border-color: #d7dde4;
      color: var(--text-muted);
    }
    .status-pill.active {
      background: rgba(24, 194, 165, 0.15);
      border-color: rgba(24, 194, 165, 0.32);
      color: #0f9a8a;
    }
    .status-pill.maintenance {
      background: rgba(245, 165, 36, 0.15);
      border-color: rgba(245, 165, 36, 0.35);
      color: #b07007;
    }
    .status-pill.offline,
    .status-pill.inactive,
    .status-pill.unknown {
      background: rgba(148, 163, 184, 0.2);
      border-color: rgba(148, 163, 184, 0.45);
      color: #475569;
    }
    .loads-tab-content {
      animation: fadeIn 0.2s ease;
    }
    .unscheduled-intro {
      margin-bottom: 1rem;
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .stations-page {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }
    .stations-hero {
      padding: 1.75rem;
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }
    .stations-hero__header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      flex-wrap: wrap;
      gap: 1rem;
    }
    .stations-hero__title {
      display: flex;
      gap: 1rem;
      align-items: flex-start;
    }
    .stations-hero__icon {
      width: 54px;
      height: 54px;
      border-radius: 16px;
      background: rgba(7, 43, 66, 0.08);
      display: grid;
      place-items: center;
    }
    .stations-hero__actions {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .inline-search,
    .stations-hero__actions .inline-search,
    .stations-table-card .inline-search {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.4rem 0.9rem;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--bg);
    }
    .inline-search input {
      border: none;
      background: transparent;
      font-size: 0.9rem;
      outline: none;
      min-width: 150px;
    }
    .stations-metrics {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 0.85rem;
    }
    .station-chip {
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 0.9rem 1rem;
      background: #f9fbfd;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }
    .station-chip .label {
      font-size: 0.8rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }
    .station-chip .value {
      font-size: 1.4rem;
      font-weight: 600;
    }
    .stations-grid {
      display: grid;
      grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
      gap: 1.5rem;
    }
    .stations-map-card,
    .stations-status-card,
    .stations-table-card {
      padding: 1.5rem;
    }
    .stations-map {
      /* height: 320px; */
      aspect-ratio: 2/1;
      border-radius: 18px;
      overflow: hidden;
      background: var(--bg);
    }
    .stations-map .map-empty {
      height: 100%;
      display: grid;
      place-items: center;
    }
    .map-legend {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      margin-top: 1rem;
      font-size: 0.85rem;
      color: var(--text-muted);
    }
    .map-legend .dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      display: inline-block;
      margin-right: 6px;
    }
    .map-legend .dot.active {
      background: #18c2a5;
    }
    .map-legend .dot.maintenance {
      background: #f5a524;
    }
    .map-legend .dot.offline {
      background: #94a3b8;
    }
    .stations-status-card {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    .status-breakdown {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }
    .status-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .status-label {
      font-weight: 600;
      font-size: 0.9rem;
      text-transform: capitalize;
    }
    .status-count {
      font-weight: 600;
    }
    .status-progress {
      width: 100%;
      height: 4px;
      background: var(--border);
      border-radius: 999px;
      overflow: hidden;
    }
    .status-progress .bar {
      display: block;
      height: 100%;
      border-radius: inherit;
    }
    .status-progress .bar.active {
      background: #18c2a5;
    }
    .status-progress .bar.maintenance {
      background: #f5a524;
    }
    .status-progress .bar.offline,
    .status-progress .bar.inactive,
    .status-progress .bar.unknown {
      background: #94a3b8;
    }
    .status-extra {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.75rem;
      margin-top: 1rem;
    }
    .status-extra div {
      background: #f5f7fb;
      border-radius: 12px;
      padding: 0.75rem;
      text-align: center;
    }
    .stations-table-card {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }
    .table-toolbar {
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 1rem;
      align-items: flex-start;
    }
    .station-table-wrapper {
      max-height: 460px;
      overflow: auto;
    }
    .station-table-wrapper table {
      min-width: 980px;
    }
    @media (max-width: 1200px) {
      .stations-grid {
        grid-template-columns: 1fr;
      }
    }
    @media (max-width: 1100px) {
      .app {
        grid-template-columns: 200px 1fr;
      }
      .grid-1-1 {
        grid-template-columns: 1fr;
      }
    }
    .scheduled-loads-table {
        max-height: 30rem;
        overflow-y: scroll;
        scrollbar-color: rgba(0,0,0,0.3) transparent;
        scrollbar-width: thin;
        padding-right: 1rem;
    }
    .placeholder-page {
      margin-top: 24px;
    }
    .placeholder-card {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 180px;
    }
    .placeholder-card h2 {
      margin: 0;
      font-size: 24px;
      font-weight: 600;
    }
    .user-dropdown {
      position: relative;
      margin-left: 0.5rem;
    }
    .user-dropdown-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border: none;
      background: transparent;
      font-weight: 600;
      font-size: 14px;
      color: var(--text-dark);
      cursor: pointer;
      padding: 4px 6px;
    }
    .user-dropdown-toggle img {
      pointer-events: none;
    }
    .user-dropdown-menu {
      position: absolute;
      top: 100%;
      right: 0;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 12px 24px rgba(8, 23, 28, 0.1);
      min-width: 150px;
      padding: 12px;
      display: none;
      z-index: 10000;
    }
    .user-dropdown-menu::before {
      content: '';
      position: absolute;
      top: -12px;
      left: 0;
      right: 0;
      height: 12px;
    }
    .user-dropdown:hover .user-dropdown-menu,
    .user-dropdown:focus-within .user-dropdown-menu {
      display: block;
    }
    .user-dropdown-menu a {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      border-radius: 8px;
      color: var(--text-dark);
      text-decoration: none;
      font-size: 14px;
    }
    .user-dropdown-menu a:hover {
      background: var(--bg);
    }
    body.login-body {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg);
      font-family: 'Spline Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    }
    .login-wrapper {
      width: 100%;
      max-width: 420px;
      padding: 24px;
    }
    .login-card {
      background: var(--card);
      border-radius: 1.25rem;
      padding: 32px;
      border: 1px solid var(--border);
      box-shadow: 0 25px 60px rgba(7, 43, 66, 0.08);
    }
    .login-header {
      text-align: center;
      margin-bottom: 24px;
    }
    .login-header img {
      height: 46px;
      margin-bottom: 10px;
    }
    .login-card label {
      font-weight: 600;
      font-size: 13px;
      color: var(--text-dark);
    }
    .login-card .form-control {
      border-radius: 12px;
      padding: 12px;
      border: 1px solid var(--border);
    }
    .login-card .btn-accent {
      width: 100%;
      border-radius: 12px;
      padding: 12px;
      font-size: 15px;
      font-weight: 600;
      border: none;
    }
    @media (max-width: 800px) {
      .app {
        grid-template-columns: 1fr;
      }
      aside.sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 24px;
      }
      nav {
        flex-direction: row;
        flex-wrap: wrap;
      }
    }
