:root {
  color-scheme: light;
  --ink: #07163f;
  --muted: #64748b;
  --line: #d8e6f2;
  --surface: #ffffff;
  --soft: #f4f8fc;
  --nav: #02065a;
  --nav-2: #06127d;
  --nav-muted: #b7d7ef;
  --accent: #1289c9;
  --accent-strong: #006da9;
  --accent-soft: #e8f6ff;
  --warning: #d98b12;
  --danger: #dc3f46;
  --success: #188c61;
  --shadow: 0 18px 50px rgba(3, 28, 74, 0.1);
  --shadow-soft: 0 8px 24px rgba(3, 28, 74, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden],
.admin-only[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 0%, rgba(18, 137, 201, 0.14), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, var(--soft) 48%, #eef5fb 100%);
}

.public-site {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 4%, rgba(34, 211, 238, 0.2), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(18, 137, 201, 0.2), transparent 32%),
    linear-gradient(180deg, #f8fcff 0%, #edf7ff 46%, #f7fbff 100%);
  color: #07163f;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 5vw, 68px);
  border-bottom: 1px solid rgba(18, 137, 201, 0.14);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(3, 28, 74, 0.08);
}

.public-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.public-brand img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  padding: 5px;
  box-shadow: 0 14px 34px rgba(0, 33, 97, 0.14);
}

.public-brand strong,
.public-brand small {
  display: block;
}

.public-brand strong {
  line-height: 1.05;
}

.public-brand small {
  color: var(--accent);
  margin-top: 4px;
}

.public-header nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.public-header nav a,
.public-secondary,
.public-login-button {
  border-radius: 999px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.public-header nav a {
  padding: 10px 13px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.public-header nav a.active,
.public-header nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.public-login-button,
.public-secondary {
  border: 1px solid rgba(18, 137, 201, 0.24);
  background: #fff;
  padding: 11px 16px;
}

.public-login-button {
  background: linear-gradient(135deg, #062a83, #1289c9);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 16px 34px rgba(18, 137, 201, 0.28);
}

.public-main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 58px;
}

.public-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: center;
  gap: 28px;
  min-height: 560px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(160, 225, 255, 0.28);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(2, 6, 90, 0.98), rgba(8, 58, 152, 0.94) 54%, rgba(18, 137, 201, 0.9)),
    #06127d;
  color: #fff;
  box-shadow: 0 34px 90px rgba(2, 20, 80, 0.26);
  overflow: hidden;
}

.public-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 44%, rgba(255, 255, 255, 0.12) 45%, transparent 46%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 78px);
  pointer-events: none;
}

.public-hero > * {
  position: relative;
  z-index: 1;
}

.public-hero.compact {
  min-height: 360px;
  grid-template-columns: minmax(0, 1fr) 220px;
}

.public-hero h1,
.public-legal h1 {
  margin: 8px 0 14px;
  font-size: clamp(2.25rem, 5.2vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.public-hero p {
  max-width: 680px;
  color: #dcefff;
  font-size: clamp(1rem, 2.2vw, 1.24rem);
  line-height: 1.65;
}

.public-eyebrow {
  margin: 0;
  color: #1289c9;
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.public-hero .public-eyebrow {
  color: #bce8ff;
}

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

.public-actions .primary-button {
  min-height: 48px;
  padding-inline: 22px;
  background: linear-gradient(135deg, #fff, #dff7ff) !important;
  color: #02065a !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
}

.public-actions .public-secondary {
  color: #fff;
  border-color: rgba(186, 236, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.public-hero-visual {
  display: grid;
  place-items: center;
}

.cargo-visual-card {
  position: relative;
  width: min(100%, 380px);
  min-height: 430px;
  padding: 18px;
  border: 1px solid rgba(210, 245, 255, 0.48);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.24), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(217, 242, 255, 0.12));
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 80px rgba(0, 8, 55, 0.3);
  overflow: hidden;
}

.cargo-visual-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(216, 246, 255, 0.16);
  border-radius: 22px;
  pointer-events: none;
}

.cargo-visual-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
}

.cargo-visual-top img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 5px;
}

.cargo-visual-top strong,
.cargo-visual-top span {
  display: block;
}

.cargo-visual-top span {
  color: #d8efff;
  font-size: 0.9rem;
}

.public-hero.compact img {
  width: min(100%, 260px);
  height: auto;
  object-fit: contain;
}

.route-map {
  position: absolute;
  inset: 100px 24px 142px;
  border-radius: 24px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

.route-node {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 0 8px rgba(34, 211, 238, 0.16);
}

.route-node.china {
  left: 16%;
  top: 38%;
}

.route-node.somalia {
  right: 17%;
  bottom: 30%;
}

.route-arc {
  position: absolute;
  left: 21%;
  right: 21%;
  top: 35%;
  height: 44%;
  border-top: 3px solid rgba(34, 211, 238, 0.86);
  border-radius: 50% 50% 0 0;
  transform: rotate(10deg);
  animation: routePulse 2.8s ease-in-out infinite;
}

.route-plane,
.route-ship {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #dff7ff);
  color: #06127d;
  box-shadow: 0 14px 34px rgba(0, 9, 60, 0.2);
}

.route-plane {
  left: 52%;
  top: 28%;
  transform: rotate(18deg);
  animation: planeFloat 3.2s ease-in-out infinite;
}

.route-ship {
  right: 24%;
  bottom: 19%;
  width: 40px;
  height: 40px;
  color: #1289c9;
  transform: rotate(0deg);
}

.route-plane svg,
.route-ship svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

@keyframes routePulse {
  0%,
  100% {
    opacity: 0.62;
    filter: drop-shadow(0 0 0 rgba(34, 211, 238, 0));
  }

  50% {
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.6));
  }
}

@keyframes planeFloat {
  0%,
  100% {
    transform: translateY(0) rotate(18deg);
  }

  50% {
    transform: translateY(-8px) rotate(18deg);
  }
}

.map-label {
  position: absolute;
  color: #e6f8ff;
  font-size: 0.82rem;
  font-weight: 850;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(3, 21, 77, 0.44);
  white-space: nowrap;
}

.china-label {
  left: 4%;
  top: 51%;
}

.somalia-label {
  right: 2%;
  bottom: 48%;
}

.cargo-stats {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cargo-stats div {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 76px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  text-align: center;
}

.cargo-stats strong {
  display: block;
}

.cargo-stats strong {
  margin-top: 6px;
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.2;
}

.mini-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: #dff7ff;
}

.mini-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cargo-route-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 106px;
  display: flex;
  justify-content: center;
  gap: 10px;
  color: #e6f8ff;
  font-size: 0.86rem;
  font-weight: 900;
}

.cargo-route-caption span {
  color: #22d3ee;
}

.public-section,
.public-contact-strip,
.public-contact-panel,
.public-contact-premium,
.public-legal {
  margin-top: 24px;
  border: 1px solid rgba(18, 137, 201, 0.14);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 20px 55px rgba(3, 28, 74, 0.09);
  backdrop-filter: blur(14px);
}

.public-section,
.public-contact-premium,
.public-legal {
  padding: clamp(22px, 4vw, 36px);
}

.public-section-heading {
  max-width: 760px;
  margin-bottom: 20px;
}

.public-section h2,
.public-contact-premium h2 {
  margin: 0 0 18px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.08;
}

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

.public-card-grid article {
  min-height: 190px;
  padding: 20px;
  border: 1px solid rgba(18, 137, 201, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 250, 255, 0.84));
  box-shadow: 0 16px 38px rgba(0, 45, 99, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.public-card-grid article:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(0, 45, 99, 0.14);
}

.public-card-grid strong,
.public-card-grid span {
  display: block;
}

.public-card-grid strong {
  margin-bottom: 9px;
  color: var(--nav);
  font-size: 1.08rem;
}

.public-card-grid span,
.public-legal p,
.public-legal li {
  color: var(--muted);
  line-height: 1.7;
}

.public-contact-strip,
.public-contact-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.public-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #06127d, #1289c9);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 32px rgba(18, 137, 201, 0.26);
}

.public-card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.public-why {
  background:
    linear-gradient(135deg, rgba(2, 6, 90, 0.95), rgba(15, 92, 168, 0.9)),
    #06127d;
  color: #fff;
}

.public-why .public-eyebrow,
.public-why h2 {
  color: #fff;
}

.public-why-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.public-why-grid div {
  padding: 18px;
  border: 1px solid rgba(203, 241, 255, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.public-why-grid strong,
.public-why-grid span {
  display: block;
}

.public-why-grid strong {
  margin-bottom: 8px;
}

.public-why-grid span {
  color: #d8efff;
  line-height: 1.55;
}

.public-contact-premium {
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.82);
}

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

.public-contact-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(18, 137, 201, 0.16);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 249, 255, 0.9));
  box-shadow: 0 16px 38px rgba(0, 45, 99, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.public-contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(0, 45, 99, 0.13);
}

.public-contact-card small {
  color: var(--muted);
  font-weight: 850;
  text-transform: uppercase;
}

.public-contact-card a,
.public-contact-card strong {
  color: #06127d;
  font-weight: 850;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.public-contact-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-contact-strip div,
.public-contact-panel div {
  display: grid;
  gap: 6px;
  padding: 20px;
  background: #fff;
}

.public-contact-strip span,
.public-contact-panel span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.public-contact-strip a,
.public-contact-panel a,
.public-legal a {
  color: var(--accent-strong);
  font-weight: 800;
}

.public-contact-strip div > span[aria-hidden],
.public-contact-panel div > span[aria-hidden] {
  display: inline;
  margin: 0 8px;
  color: var(--line);
}

.public-legal {
  max-width: 900px;
}

.public-legal h1 {
  color: var(--nav);
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.public-footer {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  padding: 30px clamp(18px, 5vw, 68px);
  color: #cceaff;
  border-top: 1px solid rgba(160, 225, 255, 0.18);
  background: linear-gradient(135deg, #02065a, #06127d 58%, #073f8d);
}

.public-footer a,
.public-footer span,
.public-footer strong {
  display: block;
}

.public-footer a {
  color: #e4f7ff;
  text-decoration: none;
}

.public-footer strong {
  margin-bottom: 8px;
  color: #fff;
}

.public-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.public-footer-brand img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  padding: 5px;
}

.public-copyright {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #b7d7ef;
}

.app-shell.locked {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(18, 137, 201, 0.36), transparent 34%),
    linear-gradient(135deg, #02065a 0%, #06127d 48%, #1289c9 100%);
}

.login-screen.hidden {
  display: none;
}

.login-card {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 18px;
  padding: 28px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(0, 11, 74, 0.3);
}

.login-brand {
  color: var(--ink);
  margin-bottom: 6px;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-weight: 700;
}

.profile-box {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.profile-box strong,
.profile-box span {
  display: block;
}

.profile-box span {
  color: var(--nav-muted);
  font-size: 0.84rem;
  margin-top: 3px;
}

body.dark-mode {
  --ink: #e8eef5;
  --muted: #aab8c6;
  --line: #344557;
  --surface: #172433;
  --soft: #0f1720;
  --nav: #090f16;
  --nav-2: #07143a;
  --nav-muted: #9fb4c8;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(18, 137, 201, 0.2), transparent 30%),
    linear-gradient(160deg, var(--nav) 0%, var(--nav-2) 58%, #02133d 100%);
  color: #fff;
  box-shadow: 14px 0 40px rgba(3, 28, 74, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  padding: 5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.login-brand .brand-logo {
  width: 118px;
  height: 118px;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f5b84b;
  color: #17202a;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--nav-muted);
  font-size: 0.84rem;
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 12px;
  color: var(--nav-muted);
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(18, 137, 201, 0.42), rgba(255, 255, 255, 0.09));
  border-color: rgba(183, 215, 239, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  min-width: 22px;
  font-weight: 700;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.field.compact {
  color: var(--nav-muted);
}

.field.compact select {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  border: 1px solid rgba(216, 230, 242, 0.86);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.85rem;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.topbar-actions,
.section-toolbar,
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-toolbar {
  margin-bottom: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  width: min(430px, 42vw);
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(3, 28, 74, 0.04);
}

.backend-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: #fff;
  font-size: 0.84rem;
  white-space: nowrap;
}

.backend-status.error {
  color: #98372f;
  background: #ffe6e3;
  border-color: #f1b8b2;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.primary-button,
.ghost-button,
.import-label,
.icon-button,
.segment {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.primary-button {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 750;
  box-shadow: 0 10px 22px rgba(18, 137, 201, 0.22);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(18, 137, 201, 0.28);
}

.ghost-button:hover,
.import-label:hover,
.segment:hover {
  border-color: rgba(18, 137, 201, 0.42);
  background: var(--accent-soft);
}

.ghost-button,
.segment,
.icon-button {
  border-color: #b8c4d0;
  color: var(--ink);
  background: #ffffff;
}

.icon-button {
  box-shadow: 0 1px 0 rgba(25, 40, 55, 0.08);
}

.primary-button {
  box-shadow: 0 1px 0 rgba(25, 40, 55, 0.12);
}

.import-label {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
}

.import-label input {
  display: none;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric,
.panel,
.table-wrap,
.inventory-card,
.fleet-card,
.customer-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--nav));
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 7px 0 4px;
  font-size: 1.8rem;
  color: var(--nav);
}

.accounting-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px;
  border: 1px solid rgba(16, 127, 201, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, #f5fbff, #eaf6ff);
  box-shadow: var(--shadow-soft);
}

.accounting-section {
  scroll-margin-top: 18px;
}

.flight-finance-card {
  border-color: rgba(16, 127, 201, 0.22);
  background: linear-gradient(180deg, #fff, #f4fbff);
}

.finance-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 12px;
}

.finance-card-grid span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(16, 127, 201, 0.12);
  padding-top: 7px;
  font-size: 0.82rem;
}

.finance-card-grid b {
  color: var(--nav);
}

.good {
  color: var(--success);
}

.warn {
  color: var(--warning);
}

.danger {
  color: var(--danger);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 16px;
}

.panel {
  padding: 18px;
}

.panel.wide {
  grid-row: span 2;
}

.profit-panel {
  margin-bottom: 16px;
}

.trend-panel {
  margin-bottom: 16px;
}

.today-panel {
  margin-bottom: 16px;
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.today-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

body.dark-mode .today-card,
body.dark-mode .profit-summary div,
body.dark-mode .board-column,
body.dark-mode .trend-chart {
  background: #1d2d3d;
}

.today-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.profit-layout {
  display: grid;
  grid-template-columns: minmax(190px, 260px) 1fr;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
}

.pie-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: min(240px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #edf2f6;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-soft);
}

.pie-chart .pie-center {
  display: grid;
  place-items: center;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

.pie-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 3;
  display: none;
  min-width: 230px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  padding: 10px;
  text-align: left;
}

.pie-tooltip span {
  display: block;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.45;
}

.pie-chart:hover .pie-tooltip,
.pie-chart:focus-within .pie-tooltip {
  display: block;
}

body.dark-mode .pie-chart .pie-center,
body.dark-mode .search-box,
body.dark-mode .backend-status,
body.dark-mode select,
body.dark-mode input,
body.dark-mode .ghost-button,
body.dark-mode .segment,
body.dark-mode .shipment-card,
body.dark-mode .empty-state {
  background: var(--surface);
  color: var(--ink);
}

body.dark-mode .primary-button {
  background: var(--accent);
  color: #fff;
}

body.dark-mode .dialog-actions {
  background: linear-gradient(180deg, rgba(29, 45, 61, 0), var(--surface) 28%);
}

.pie-chart strong,
.pie-chart span {
  display: block;
}

.pie-chart span {
  color: var(--muted);
  font-size: 0.78rem;
}

.pie-chart .pie-tooltip span {
  color: var(--ink);
  font-size: 0.82rem;
}

.profit-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.profit-summary div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #fff, #f6fbff);
}

.profit-summary span,
.profit-row span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
}

.profit-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 1.18rem;
}

.trend-chart {
  width: 100%;
  min-height: 220px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
}

.trend-chart svg {
  width: 100%;
  height: 220px;
  display: block;
}

.compact-table {
  margin-top: 12px;
}

.compact-table table {
  min-width: 620px;
}

.profit-chart {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.profit-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  align-items: center;
  gap: 14px;
}

.profit-bars {
  display: grid;
  gap: 5px;
}

.profit-bar {
  display: block;
  height: 9px;
  border-radius: 999px;
}

.profit-bar.revenue {
  background: var(--accent);
}

.profit-bar.cost {
  background: var(--warning);
}

.profit-bar.profit {
  background: var(--success);
}

.payment-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
}

.payment-line .icon-button {
  flex: 0 0 auto;
}

.icon-button.danger {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.28);
}

select,
input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

.shipment-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.board-column {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.board-column h3 {
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: var(--muted);
}

.shipment-card {
  display: grid;
  gap: 8px;
  border: 1px solid #d7e5ef;
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(3, 28, 74, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.shipment-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(3, 28, 74, 0.1);
}

.shipment-card[draggable="true"] {
  cursor: grab;
}

.shipment-card[draggable="true"]:active {
  cursor: grabbing;
}

.shipment-card.needs-payment,
.customer-card.needs-payment {
  border-left: 4px solid var(--warning);
}

.board-column.drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: -6px;
  background: #eefafa;
}

.shipment-card strong,
.shipment-card span {
  overflow-wrap: anywhere;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
  background: #eef6fb;
  color: var(--ink);
}

.status.In-Transit,
.status.Preparing {
  color: #075985;
  background: #dff3ff;
}

.status.Ready-to-Ship,
.status.Open {
  color: #064c86;
  background: #e3f2ff;
}

.status.Delivered,
.status.Paid,
.status.Available,
.status.Somalia-Office,
.status.Ready-for-Pickup,
.status.Fully-paid,
.status.Financially-closed,
.status.Arrived,
.status.Closed {
  color: #1d7446;
  background: #dff4e9;
}

.status.Overdue,
.status.Maintenance,
.status.China-Warehouse,
.status.Unpaid {
  color: #98372f;
  background: #ffe6e3;
}

.status.Partially-paid,
.status.Partially-collected {
  color: #87510b;
  background: #fff0d8;
}

.alert-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.alert {
  border-left: 4px solid var(--warning);
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff8ed;
}

.alert.danger {
  border-color: var(--danger);
  background: #fff1ef;
}

.bar-chart {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 76px;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
}

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

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.bar-fill.loss {
  background: var(--danger);
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segment {
  min-height: 34px;
  border-color: transparent;
  padding: 0 12px;
}

.segment.active {
  color: #fff;
  background: linear-gradient(135deg, var(--nav), var(--accent));
}

.table-wrap {
  overflow-x: auto;
  border-color: rgba(16, 127, 201, 0.18);
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #31516b;
  font-size: 0.78rem;
  text-transform: uppercase;
  background: linear-gradient(180deg, #f5faff, #eaf6ff);
}

tbody tr {
  transition: background 0.18s ease;
}

tbody tr:hover {
  background: #f8fcff;
}

td {
  font-size: 0.92rem;
}

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

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

.icon-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  font-weight: 800;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  text-align: left;
}

.inventory-grid,
.fleet-grid,
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.inventory-card,
.fleet-card,
.customer-card {
  padding: 16px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.inventory-card:hover,
.fleet-card:hover,
.customer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 52px rgba(3, 28, 74, 0.14);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card-top strong {
  overflow-wrap: anywhere;
}

.detail-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.capacity-meter {
  height: 9px;
  margin-top: 12px;
  border-radius: 999px;
  background: #edf2f6;
  overflow: hidden;
}

.capacity-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--nav));
}

dialog {
  width: min(640px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 28px 90px rgba(3, 11, 74, 0.26);
}

.profile-dialog {
  width: min(980px, calc(100vw - 28px));
}

.profile-dialog,
#assignDialog,
#entityDialog {
  background: var(--surface);
  color: var(--ink);
}

#entityDialog.payment-dialog {
  width: min(1120px, calc(100vw - 24px));
}

.profile-header {
  padding: 18px 18px 0;
}

.profile-content {
  padding: 18px;
  max-height: min(78vh, 820px);
  overflow: auto;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.profile-card,
.audit-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #f7fbff);
  margin-bottom: 12px;
}

body.dark-mode .profile-card,
body.dark-mode .audit-item {
  background: #1d2d3d;
}

.profile-card h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
}

.timeline {
  display: grid;
  gap: 8px;
}

.timeline-item {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

.timeline-item span,
.timeline-item small,
.audit-item span {
  display: block;
  color: var(--muted);
}

.history-list {
  line-height: 1.7;
}

.photo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.photo-actions input {
  display: none;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.photo-grid figure {
  margin: 0;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.photo-grid figcaption {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 4px;
}

.check-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.assign-dialog {
  width: min(1120px, calc(100vw - 28px));
}

.assign-dialog form {
  padding: 18px;
}

.dialog-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.assign-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.assign-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.assign-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border: 1px solid rgba(18, 137, 201, 0.22);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--nav);
  background: var(--accent-soft);
  font-size: 0.9rem;
}

.assign-table-wrap {
  max-height: min(52vh, 460px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.assign-table {
  min-width: 880px;
}

.assign-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.assign-check {
  width: 52px;
  text-align: center;
}

.assign-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

body.dark-mode .assign-summary span {
  color: #d8f1ff;
  background: rgba(18, 137, 201, 0.18);
}

.audit-panel {
  margin-top: 16px;
}

.audit-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.audit-filters {
  margin-bottom: 14px;
}

dialog::backdrop {
  background: rgba(2, 6, 90, 0.48);
  backdrop-filter: blur(3px);
}

#entityForm {
  padding: 18px 18px 0;
}

.payment-dialog #entityForm {
  padding: 16px 18px 0;
}

.payment-dialog .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

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

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

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

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  border-radius: 12px;
  border-color: var(--line);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus,
.field select:focus,
.search-box:focus-within {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(18, 137, 201, 0.14);
}

.customer-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.inline-add-button {
  white-space: nowrap;
  min-height: 42px;
}

.inline-customer-form {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, #f6fbff, #fff);
}

.inline-customer-form[hidden] {
  display: none;
}

.inline-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.inline-form-header small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.compact-form {
  gap: 10px;
}

.inline-actions {
  margin-top: 10px;
}

.payment-awb-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(180deg, #f6fbff, #fff);
}

.payment-awb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.payment-awb-list {
  max-height: 330px;
  overflow: auto;
  border: 1px solid #d7e5ef;
  border-radius: 14px;
  background: #fff;
}

.payment-awb-table {
  min-width: 760px;
  margin: 0;
}

.payment-awb-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.payment-awb-table th,
.payment-awb-table td {
  padding: 8px 9px;
  font-size: 0.86rem;
}

.payment-check {
  width: 44px;
  text-align: center;
}

.payment-check input {
  min-height: auto;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.payment-selection-summary {
  color: var(--muted);
}

.payment-selection-summary {
  margin-top: 10px;
  font-weight: 700;
}

.form-note {
  border: 1px solid rgba(16, 137, 199, 0.22);
  border-radius: 10px;
  background: rgba(16, 137, 199, 0.08);
  color: var(--navy);
  padding: 10px 12px;
  font-weight: 700;
}

body.dark-mode .form-note {
  background: rgba(56, 189, 248, 0.14);
  color: var(--text);
}

.selected-summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(105px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.selected-summary-grid span {
  border: 1px solid #d7e5ef;
  border-radius: 12px;
  padding: 9px;
  background: #fff;
  color: var(--muted);
}

.selected-summary-grid b {
  display: block;
  margin-top: 3px;
  color: var(--nav);
}

.payment-summary-row {
  align-items: stretch;
}

.payment-status-line {
  border-radius: 12px;
  padding: 9px 10px;
  background: #f7fbff;
}

.compact-button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.dialog-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 18px 0 0;
  padding: 14px 0 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--surface) 28%);
  z-index: 2;
}

#saveEntity {
  min-width: 150px;
  border-color: var(--accent) !important;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong)) !important;
  color: #fff !important;
  font-weight: 800;
}

.form-message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.empty-state {
  padding: 28px;
  border: 1px dashed #a9c7de;
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
  background: linear-gradient(180deg, #fff, #f4faff);
}

.empty-state::before {
  content: "";
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  background: url("assets/haatuf-cargo-logo.jpeg") center / contain no-repeat;
  opacity: 0.55;
}

@media (max-width: 980px) {
  .public-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-hero,
  .public-hero.compact,
  .public-card-grid,
  .public-contact-grid,
  .public-why-grid,
  .public-contact-strip,
  .public-contact-panel {
    grid-template-columns: 1fr 1fr;
  }

  .public-footer {
    grid-template-columns: 1fr 1fr;
  }

  .public-hero {
    min-height: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .metric-grid,
  .dashboard-grid,
  .shipment-board,
  .profit-row,
  .profit-layout,
  .finance-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .payment-dialog .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selected-summary-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 640px) {
  .public-main {
    width: min(100% - 24px, 1180px);
    padding: 20px 0 34px;
  }

  .public-header {
    padding: 12px;
  }

  .public-header nav,
  .public-login-button {
    width: 100%;
  }

  .public-header nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .public-login-button {
    justify-content: center;
  }

  .public-hero,
  .public-hero.compact,
  .public-card-grid,
  .public-contact-grid,
  .public-why-grid,
  .public-contact-strip,
  .public-contact-panel {
    grid-template-columns: 1fr;
  }

  .public-hero {
    padding: 22px;
    border-radius: 20px;
  }

  .public-hero-visual,
  .public-hero.compact img {
    max-width: 260px;
    justify-self: center;
  }

  .cargo-visual-card {
    width: min(100%, 280px);
    min-height: 420px;
  }

  .cargo-visual-top img {
    width: 52px;
    height: 52px;
  }

  .route-map {
    inset: 92px 18px 158px;
  }

  .cargo-stats {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .cargo-stats div {
    min-height: auto;
    padding: 8px 10px;
  }

  .cargo-route-caption {
    bottom: 142px;
    font-size: 0.78rem;
  }

  .route-plane {
    width: 38px;
    height: 38px;
  }

  .route-ship {
    width: 34px;
    height: 34px;
  }

  .map-label {
    font-size: 0.68rem;
    padding: 4px 6px;
  }

  .china-label {
    left: 0;
  }

  .somalia-label {
    right: 0;
  }

  .public-footer {
    grid-template-columns: 1fr;
  }

  .main,
  .sidebar {
    padding: 16px;
  }

  .nav-list,
  .metric-grid,
  .dashboard-grid,
  .shipment-board,
  .profit-row,
  .profit-layout,
  .finance-card-grid,
  .selected-summary-grid,
  .form-grid,
  .customer-picker {
    grid-template-columns: 1fr;
  }

  .payment-dialog .form-grid {
    grid-template-columns: 1fr;
  }

  .payment-awb-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .accounting-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .pie-chart {
    justify-self: center;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .login-brand .brand-logo {
    width: 78px;
    height: 78px;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .segment {
    flex: 1 0 auto;
  }

  .assign-dialog form {
    padding: 14px;
  }

  .assign-toolbar {
    grid-template-columns: 1fr;
  }

  .assign-table-wrap {
    max-height: 58vh;
  }
}
