﻿:root {
      --nav: #061d35;
      --nav-dark: #02111f;
      --page: #f4f8fc;
      --panel: #ffffff;
      --ink: #102033;
      --muted: #65758a;
      --line: #dce6f2;
      --blue: #1466df;
      --blue-soft: #eef5ff;
      --cyan: #10b8cf;
      --green: #2ab56f;
      --amber: #f3a63b;
      --red: #ef4d55;
      --shadow: 0 12px 32px rgba(16, 32, 51, .08);
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      min-height: 100vh;
      font-family: Inter, Arial, sans-serif;
      color: var(--ink);
      background: var(--page);
    }

    button, input, select { font: inherit; }

    .app {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 230px minmax(0, 1fr);
    }

    .sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 24px 16px;
      display: flex;
      flex-direction: column;
      gap: 24px;
      color: #d8e6f7;
      background:
        radial-gradient(circle at 0 0, rgba(0, 174, 202, .16), transparent 30%),
        linear-gradient(180deg, var(--nav), var(--nav-dark));
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 8px 12px;
    }

    .brand-mark {
      width: 42px;
      height: 42px;
      display: grid;
      place-items: center;
      color: white;
      font-size: 34px;
      font-weight: 900;
      line-height: 1;
    }

    .brand strong {
      display: block;
      color: white;
      font-size: 20px;
      text-transform: uppercase;
      line-height: 1;
    }

    .brand span {
      display: block;
      color: #c3d5eb;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 4px;
      text-transform: uppercase;
      margin-top: 5px;
    }

    .nav {
      display: grid;
      gap: 7px;
    }

    .nav a {
      min-height: 45px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 14px;
      color: #d7e5f8;
      text-decoration: none;
      font-size: 13px;
      font-weight: 750;
    }

    .nav a.active {
      color: white;
      background: linear-gradient(90deg, #135fc8, #0b4eaa);
    }

    .help {
      margin-top: auto;
      padding: 18px;
      border-radius: 8px;
      background: linear-gradient(145deg, rgba(0, 174, 202, .32), rgba(8, 63, 93, .92));
      border: 1px solid rgba(105, 221, 237, .24);
    }

    .help strong {
      display: block;
      color: white;
      font-size: 14px;
      margin-bottom: 8px;
    }

    .help p {
      margin: 0 0 14px;
      color: #d8f7ff;
      font-size: 12px;
      line-height: 1.45;
    }

    .help button {
      width: 100%;
      min-height: 38px;
      border: 1px solid rgba(255, 255, 255, .62);
      border-radius: 8px;
      color: white;
      background: rgba(255, 255, 255, .06);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 12px;
      font-weight: 850;
      cursor: pointer;
    }

    .copyright {
      color: #8098b3;
      font-size: 11px;
      padding: 0 10px;
    }

    main {
      padding: 18px;
      overflow: hidden;
    }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 16px;
    }

    .title-row {
      display: flex;
      align-items: end;
      gap: 16px;
      min-width: 0;
    }

    h1 {
      margin: 0;
      font-size: 26px;
      line-height: 1;
      letter-spacing: 0;
    }

    .title-row p {
      margin: 0 0 2px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .top-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .bell {
      width: 38px;
      height: 38px;
      border: 0;
      background: transparent;
      color: #223b58;
      display: grid;
      place-items: center;
      position: relative;
      cursor: pointer;
    }

    .bell span {
      position: absolute;
      top: 4px;
      right: 4px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: #f04438;
      color: white;
      font-size: 10px;
      font-weight: 900;
      border: 2px solid white;
    }

    .account {
      border: 0;
      background: transparent;
      display: inline-flex;
      align-items: center;
      gap: 9px;
      color: #12233a;
      font-size: 12px;
      font-weight: 850;
      cursor: pointer;
    }

    .avatar {
      width: 31px;
      height: 31px;
      border-radius: 50%;
      background: #08294e;
      color: white;
      display: grid;
      place-items: center;
      font-size: 11px;
      font-weight: 900;
    }

    .layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 292px;
      gap: 16px;
    }

    .left,
    .right {
      display: grid;
      align-content: start;
      gap: 16px;
      min-width: 0;
    }

    .card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
    }

    .filters {
      padding: 16px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 160px;
      gap: 13px;
      align-items: end;
    }

    .shipments-filter-form {
      display: grid;
      grid-template-columns: minmax(260px, 1fr) 180px 110px;
      gap: 13px;
      align-items: end;
    }

    .field {
      display: grid;
      gap: 7px;
    }

    .field label {
      color: #273b55;
      font-size: 11px;
      font-weight: 850;
    }

    .search,
    .select,
    .date,
    .native-select {
      min-height: 42px;
      border: 1px solid #d4e0ee;
      border-radius: 7px;
      background: white;
      color: #253a54;
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 0 12px;
      font-size: 12px;
      font-weight: 700;
    }

    .native-select {
      width: 100%;
      appearance: none;
    }

    .search input {
      min-width: 0;
      flex: 1;
      border: 0;
      outline: 0;
      color: #253a54;
      background: transparent;
      font-size: 12px;
      font-weight: 700;
    }

    .primary {
      min-height: 42px;
      border: 0;
      border-radius: 7px;
      background: var(--blue);
      color: white;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 10px 20px rgba(20, 102, 223, .18);
      text-decoration: none;
    }

    .filter-btn {
      min-height: 42px;
      border: 1px solid #d4e0ee;
      border-radius: 7px;
      background: white;
      color: #213a58;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 12px;
      font-weight: 850;
      cursor: pointer;
      text-decoration: none;
      padding: 0 14px;
    }

    .stats {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      overflow: hidden;
    }

    .stat {
      min-height: 86px;
      padding: 16px;
      border-right: 1px solid #e7eef7;
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr);
      align-items: center;
      gap: 12px;
    }

    .stat:last-child { border-right: 0; }

    .stat-icon {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      color: var(--blue);
      background: var(--blue-soft);
    }

    .stat:nth-child(2) .stat-icon { color: var(--cyan); background: #e8f9fc; }
    .stat:nth-child(3) .stat-icon { color: var(--green); background: #e8f8f1; }
    .stat:nth-child(4) .stat-icon { color: var(--amber); background: #fff4df; }
    .stat:nth-child(5) .stat-icon { color: var(--red); background: #ffeaec; }

    .stat small {
      color: var(--muted);
      display: block;
      font-size: 10px;
      font-weight: 800;
    }

    .stat strong {
      display: block;
      margin-top: 3px;
      font-size: 24px;
      line-height: 1;
    }

    .stat span {
      display: block;
      color: var(--muted);
      margin-top: 6px;
      font-size: 10px;
      font-weight: 800;
    }

    .table-card {
      overflow: hidden;
    }

    .tabs {
      display: flex;
      align-items: center;
      gap: 28px;
      min-height: 54px;
      padding: 0 18px;
      border-bottom: 1px solid #e6eef7;
      overflow-x: auto;
    }

    .tabs a {
      height: 54px;
      display: inline-flex;
      align-items: center;
      border-bottom: 3px solid transparent;
      color: #253a54;
      text-decoration: none;
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
    }

    .tabs a.active {
      color: var(--blue);
      border-bottom-color: var(--blue);
    }

    .table-wrap {
      overflow-x: auto;
    }

    table {
      width: 100%;
      min-width: 880px;
      border-collapse: collapse;
    }

    th {
      height: 42px;
      color: #617189;
      text-align: left;
      font-size: 10px;
      font-weight: 900;
      text-transform: uppercase;
      border-bottom: 1px solid #e6eef7;
      padding: 0 16px;
    }

    td {
      height: 67px;
      padding: 0 16px;
      border-bottom: 1px solid #e6eef7;
      vertical-align: middle;
      font-size: 12px;
      font-weight: 800;
    }

    tr:last-child td { border-bottom: 0; }

    .sub {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }

    .route-cell {
      display: grid;
      grid-template-columns: 1fr 18px 1fr;
      align-items: center;
      gap: 8px;
      min-width: 150px;
    }

    .flag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .flag b {
      display: inline-grid;
      place-items: center;
      width: 20px;
      height: 15px;
      border-radius: 2px;
      font-size: 10px;
      background: #eef2f7;
    }

    .route-arrow {
      color: #94a3b8;
    }

    .badge {
      min-height: 25px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 0 10px;
      font-size: 11px;
      font-weight: 850;
      white-space: nowrap;
    }

    .transit { color: var(--blue); background: #e9f3ff; }
    .pending { color: #b56a08; background: #fff4df; }
    .delivered { color: #168c55; background: #e8f8f1; }
    .delayed { color: #c5363f; background: #ffeaec; }

    .action {
      width: 31px;
      height: 31px;
      border: 1px solid #d8e3f0;
      border-radius: 7px;
      background: white;
      color: #314a66;
      display: inline-grid;
      place-items: center;
      margin-right: 7px;
      cursor: pointer;
      text-decoration: none;
    }

    .table-footer {
      min-height: 52px;
      padding: 0 18px;
      border-top: 1px solid #e6eef7;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      color: #4d5f75;
      font-size: 12px;
      font-weight: 750;
    }

    .pages {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .page {
      width: 31px;
      height: 31px;
      border: 1px solid #d8e3f0;
      border-radius: 7px;
      background: white;
      color: #243b56;
      display: grid;
      place-items: center;
      font-size: 12px;
      font-weight: 850;
    }

    .page.active {
      background: var(--blue);
      border-color: var(--blue);
      color: white;
    }

    .side-card {
      padding: 18px;
    }

    .side-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 16px;
    }

    .side-title h2 {
      margin: 0;
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .side-title a {
      color: var(--blue);
      text-decoration: none;
      font-size: 11px;
      font-weight: 900;
    }

    .donut-wrap {
      display: grid;
      grid-template-columns: 128px minmax(0, 1fr);
      gap: 15px;
      align-items: center;
    }

    .donut {
      width: 126px;
      aspect-ratio: 1;
      border-radius: 50%;
      background: conic-gradient(var(--blue) 0 53%, var(--green) 53% 86%, var(--amber) 86% 95%, var(--red) 95% 100%);
      display: grid;
      place-items: center;
    }

    .donut::after {
      content: "128\A Total";
      white-space: pre;
      width: 74px;
      height: 74px;
      border-radius: 50%;
      background: white;
      display: grid;
      place-items: center;
      text-align: center;
      color: #18304e;
      font-size: 24px;
      line-height: 1.05;
      font-weight: 900;
      box-shadow: inset 0 0 0 1px #edf2f7;
    }

    .legend {
      display: grid;
      gap: 10px;
    }

    .legend div {
      display: grid;
      grid-template-columns: 10px minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
      font-size: 10px;
      font-weight: 850;
      color: #304863;
    }

    .dot {
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: var(--blue);
    }

    .legend div:nth-child(2) .dot { background: var(--green); }
    .legend div:nth-child(3) .dot { background: var(--amber); }
    .legend div:nth-child(4) .dot { background: var(--red); }

    .route-bars {
      display: grid;
      gap: 13px;
    }

    .bar-row {
      display: grid;
      gap: 6px;
    }

    .bar-label {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      font-size: 11px;
      font-weight: 850;
    }

    .bar-track {
      height: 7px;
      border-radius: 999px;
      background: #e6edf6;
      overflow: hidden;
    }

    .bar-track span {
      display: block;
      height: 100%;
      border-radius: 999px;
      background: var(--blue);
    }

    .deliveries {
      display: grid;
      gap: 13px;
    }

    .delivery {
      display: grid;
      grid-template-columns: 26px minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
    }

    .delivery i {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      color: var(--blue);
      background: var(--blue-soft);
    }

    .delivery strong {
      display: block;
      font-size: 11px;
    }

    .delivery span {
      display: block;
      color: var(--muted);
      font-size: 10px;
      font-weight: 750;
      margin-top: 3px;
    }

    .delivery time {
      color: var(--green);
      font-size: 10px;
      font-weight: 900;
      text-align: right;
      white-space: nowrap;
    }

    .side-link {
      margin-top: 16px;
      padding-top: 13px;
      border-top: 1px solid #e6eef7;
      color: var(--blue);
      font-size: 11px;
      font-weight: 900;
      display: flex;
      justify-content: space-between;
      text-decoration: none;
    }

    .success-message,
    .empty-state {
      color: var(--muted);
      font-weight: 850;
      text-align: center;
    }

    .success-message {
      border: 1px solid #b8ebcc;
      border-radius: 8px;
      padding: 12px 14px;
      color: #0d7d47;
      background: #ecfbf2;
      font-size: 13px;
      text-align: left;
    }

    .pagination-row nav {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .pagination-row a,
    .pagination-row span {
      color: #243b56;
      font-size: 12px;
      font-weight: 850;
      text-decoration: none;
    }

    .status-stack {
      display: grid;
      gap: 9px;
    }

    .status-stack a {
      min-height: 38px;
      border: 1px solid #e6eef7;
      border-radius: 8px;
      padding: 0 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: #263c55;
      background: #f8fbff;
      text-decoration: none;
      font-size: 12px;
      font-weight: 850;
    }

    .shipment-form-page,
    .shipment-detail-page {
      display: grid;
      gap: 16px;
    }

    .form-card,
    .detail-panel {
      padding: 22px;
    }

    .form-head,
    .shipment-hero {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
    }

    .form-head {
      margin-bottom: 18px;
    }

    .form-head p,
    .eyebrow {
      margin: 0 0 8px;
      color: var(--blue);
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .form-head h2,
    .shipment-hero h2,
    .detail-panel h2 {
      margin: 0;
      font-size: 24px;
    }

    .shipment-form {
      display: grid;
      gap: 16px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .shipment-form label {
      display: grid;
      gap: 7px;
      color: #26374b;
      font-size: 12px;
      font-weight: 850;
    }

    .field-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .field-top a {
      min-height: 26px;
      border: 1px solid #d4e0ee;
      border-radius: 999px;
      padding: 0 9px;
      color: var(--blue);
      background: #eef5ff;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      font-weight: 900;
      text-decoration: none;
      white-space: nowrap;
    }

    .shipment-form input,
    .shipment-form select {
      width: 100%;
      min-height: 44px;
      border: 1px solid #cfdbea;
      border-radius: 8px;
      background: #fbfdff;
      color: var(--ink);
      padding: 0 12px;
      outline: none;
    }

    .shipment-form small {
      color: var(--red);
    }

    .form-actions,
    .detail-actions {
      display: flex;
      gap: 10px;
      align-items: center;
    }

    .detail-actions form {
      margin: 0;
    }

    .shipment-hero {
      padding: 22px;
    }

    .shipment-hero span {
      display: block;
      margin-top: 7px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .shipment-detail-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 280px;
      gap: 16px;
    }

    .detail-list {
      display: grid;
      gap: 12px;
    }

    .detail-list div {
      min-height: 44px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 10px;
      display: flex;
      justify-content: space-between;
      gap: 14px;
    }

    .detail-list span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .detail-list strong {
      text-align: right;
      font-size: 13px;
    }

    .shipment-side {
      display: grid;
      gap: 14px;
      align-content: start;
    }

    .side-stat {
      padding: 18px;
    }

    .side-stat strong {
      display: block;
      color: #0b4aa0;
      font-size: 26px;
    }

    .side-stat span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .danger-button {
      min-height: 42px;
      border: 1px solid #f4b5b5;
      border-radius: 8px;
      padding: 0 14px;
      background: #fff4f4;
      color: #b42318;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
    }

    .detail-section-title {
      padding: 16px 18px 0;
    }

    @media (max-width: 1260px) {
      .layout { grid-template-columns: 1fr; }
      .right { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }

    @media (max-width: 1100px) {
      .app { grid-template-columns: 82px minmax(0, 1fr); }
      .sidebar { align-items: center; padding: 20px 12px; }
      .brand { padding: 0; }
      .brand div:not(.brand-mark), .nav span, .help, .copyright { display: none; }
      .nav a { width: 50px; justify-content: center; padding: 0; }
      .filters,
      .shipments-filter-form,
      .form-grid,
      .shipment-detail-grid {
        grid-template-columns: 1fr;
      }
      .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .stat { border-bottom: 1px solid #e7eef7; }
    }

    @media (max-width: 760px) {
      .app { display: block; }
      .sidebar {
        position: static;
        height: auto;
        display: block;
      }
      .brand div:not(.brand-mark), .nav span { display: block; }
      .nav {
        grid-template-columns: repeat(4, 1fr);
        margin-top: 14px;
      }
      .nav a {
        justify-content: center;
        padding: 0;
      }
      .nav span { display: none !important; }
      main { padding: 14px; }
      .topbar, .title-row, .top-actions { display: grid; align-items: start; }
      .top-actions { grid-template-columns: auto 1fr; }
      .account { justify-content: end; }
      .filters,
      .shipments-filter-form,
      .stats,
      .right,
      .donut-wrap {
        grid-template-columns: 1fr;
      }
      .table-footer { display: grid; }
      .form-head,
      .shipment-hero,
      .form-actions,
      .detail-actions {
        display: grid;
      }
    }

