/* =========================================================
   United Global Freight — Design System
   ========================================================= */

:root {
  /* Palette — drawn from the UGF mark (deep navy + gold) */
  --navy-950: #060f1f;
  --navy-900: #0a1c38;
  --navy-800: #102a4c;
  --navy-700: #17396a;
  --navy-600: #22508f;
  --gold-600: #a1791d;
  --gold-500: #c69a2e;
  --gold-400: #d9b959;
  --gold-200: #f0dfa8;
  --paper: #faf8f3;
  --surface: #ffffff;
  --ink: #0e1524;
  --ink-muted: #59657a;
  --ink-faint: #93a0b4;
  --border: #e6e1d3;
  --border-dark: rgba(255, 255, 255, 0.12);
  --danger: #b3432b;
  --success: #2f7a52;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1220px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --shadow-soft: 0 1px 2px rgba(10, 20, 40, 0.04), 0 8px 24px -12px rgba(10, 20, 40, 0.12);
  --shadow-lift: 0 20px 40px -16px rgba(10, 20, 40, 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--navy-900);
}

p {
  margin: 0 0 1em;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background: var(--gold-400);
  color: var(--navy-950);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold-500);
}

.section {
  padding: 96px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 0 56px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
}

.section-head p {
  color: var(--ink-muted);
  font-size: 17px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--navy-900);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-800);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.btn-gold {
  background: var(--gold-500);
  color: var(--navy-950);
}

.btn-gold:hover {
  background: var(--gold-400);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline-dark {
  background: transparent;
  border-color: var(--navy-900);
  color: var(--navy-900);
}

.btn-outline-dark:hover {
  background: var(--navy-900);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 13px;
}

/* ---------- Top bar ---------- */

.topbar {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 6px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.topbar-info {
  display: flex;
  flex-wrap: wrap;
  row-gap: 6px;
  gap: 20px;
  align-items: center;
}

.topbar-info a,
.topbar-info span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
}

.topbar-info svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--gold-400);
}

.topbar-social {
  display: flex;
  gap: 16px;
}

.topbar-social a svg {
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}

.topbar-social a:hover svg {
  color: var(--gold-400);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-900);
  border-bottom: 1px solid var(--border-dark);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

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

.brand img {
  height: 46px;
  width: auto;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-word strong {
  font-family: var(--font-display);
  font-size: 18px;
  color: #fff;
  letter-spacing: 0.01em;
}

.brand-word span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--navy-950);
  overflow: hidden;
  min-height: 640px;
  display: flex;
  align-items: stretch;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide-art {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 78% 20%, rgba(198, 154, 46, 0.16), transparent 60%),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 640px;
  width: 100%;
}

.hero-text {
  max-width: 640px;
  padding: 80px 0;
}

.hero-text .eyebrow {
  color: var(--gold-400);
}

.hero-text h1 {
  font-size: clamp(36px, 5.4vw, 62px);
  color: #fff;
  letter-spacing: -0.01em;
}

.hero-text h1 em {
  font-style: italic;
  color: var(--gold-400);
}

.hero-text p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-graphic {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

.hero-graphic svg {
  width: 100%;
  height: auto;
  max-width: 560px;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 26px;
  height: 3px;
  border: none;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s;
}

.hero-dots button.is-active {
  background: var(--gold-400);
}

/* ---------- Marquee / trust strip ---------- */

.trust-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.trust-strip .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 20px;
  border-left: 1px solid var(--border);
}

.trust-item:first-child {
  border-left: none;
}

.trust-item svg {
  width: 26px;
  height: 26px;
  color: var(--gold-600);
  flex: none;
}

.trust-item strong {
  display: block;
  font-size: 14.5px;
  color: var(--navy-900);
}

.trust-item span {
  font-size: 13px;
  color: var(--ink-muted);
}

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service-card {
  background: var(--surface);
  padding: 40px 32px;
  transition: background 0.3s var(--ease);
  position: relative;
}

.service-card:hover {
  background: var(--navy-900);
}

.service-card:hover h3,
.service-card:hover p {
  color: #fff;
}

.service-card:hover p {
  color: rgba(255, 255, 255, 0.68);
}

.service-card:hover .service-icon {
  background: var(--gold-500);
  color: var(--navy-950);
}

.service-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--border);
  color: var(--navy-800);
  margin-bottom: 24px;
  transition: all 0.3s var(--ease);
}

.service-icon svg {
  width: 26px;
  height: 26px;
}

.service-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
  transition: color 0.3s;
}

.service-card p {
  font-size: 14.5px;
  color: var(--ink-muted);
  margin-bottom: 0;
  transition: color 0.3s;
}

.service-index {
  position: absolute;
  top: 32px;
  right: 32px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-faint);
}

.service-card:hover .service-index {
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- About ---------- */

.about-section {
  background: var(--navy-950);
  color: #fff;
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.about-copy .eyebrow {
  color: var(--gold-400);
}

.about-copy h2 {
  color: #fff;
  font-size: clamp(28px, 3.2vw, 38px);
}

.about-copy p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--border-dark);
}

.about-stats div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--gold-400);
}

.about-stats div span {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.6);
}

.about-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-art svg {
  width: 100%;
  max-width: 460px;
  height: auto;
}

/* ---------- Process ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.process-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--gold-600);
  display: block;
  margin-bottom: 14px;
}

.process-step h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.process-step p {
  font-size: 14.5px;
  color: var(--ink-muted);
  margin-bottom: 0;
}

/* ---------- Contact ---------- */

.contact-section {
  background: var(--surface);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
}

.contact-details {
  background: var(--navy-900);
  color: #fff;
  padding: 56px;
}

.contact-details h3 {
  color: #fff;
  font-size: 24px;
}

.contact-details p.lead {
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 32px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-list svg {
  width: 20px;
  height: 20px;
  color: var(--gold-400);
  flex: none;
  margin-top: 2px;
}

.contact-list strong {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 3px;
}

.contact-list span,
.contact-list a {
  font-size: 15px;
  color: #fff;
}

.contact-visual {
  position: relative;
  background: var(--paper);
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-visual svg {
  width: 100%;
  height: auto;
  max-width: 420px;
  margin: 0 auto 28px;
}

.contact-visual p {
  text-align: center;
  color: var(--ink-muted);
  font-size: 14.5px;
  margin-bottom: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.6);
  padding-top: 72px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border-dark);
}

.footer-brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.footer-brand-mark img {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

.footer-brand-mark .brand-word strong {
  font-size: 19px;
}

.footer-brand p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.footer-social a:hover {
  background: var(--gold-500);
  border-color: var(--gold-500);
}

.footer-social a:hover svg {
  color: var(--navy-950);
}

.footer-social svg {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--gold-400);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a:hover {
  color: var(--gold-400);
}

/* =========================================================
   Tracking page
   ========================================================= */

.page-hero {
  background: var(--navy-950);
  color: #fff;
  padding: 72px 0 0;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 85% 0%, rgba(198, 154, 46, 0.14), transparent 60%);
}

.page-hero .container {
  position: relative;
}

.page-hero .eyebrow {
  color: var(--gold-400);
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(30px, 4vw, 44px);
  max-width: 640px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.68);
  max-width: 540px;
  font-size: 16px;
}

.track-form {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-dark);
  padding: 10px;
  border-radius: var(--radius-md);
  margin: 36px 0;
  max-width: 620px;
}

.track-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  padding: 12px 14px;
  font-size: 15px;
}

.track-form input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.track-form input:focus {
  outline: none;
}

.track-results {
  padding: 72px 0 96px;
}

.track-empty {
  text-align: center;
  padding: 64px 24px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

.track-empty svg {
  width: 44px;
  height: 44px;
  color: var(--ink-faint);
  margin: 0 auto 16px;
}

.track-empty h3 {
  margin-bottom: 6px;
}

.track-empty p {
  color: var(--ink-muted);
  margin-bottom: 0;
}

.shipment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  overflow: hidden;
}

.shipment-card + .shipment-card {
  margin-top: 28px;
}

.shipment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  background: var(--navy-900);
  color: #fff;
  flex-wrap: wrap;
  gap: 12px;
}

.shipment-header .tag {
  display: inline-block;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gold-500);
  color: var(--navy-950);
  border-radius: 2px;
}

.shipment-header h3 {
  color: #fff;
  font-size: 20px;
  margin: 6px 0 0;
}

.shipment-route {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 32px;
  border-bottom: 1px solid var(--border);
}

.route-point {
  flex: 1;
  text-align: center;
}

.route-point strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--navy-900);
}

.route-point span {
  font-size: 13px;
  color: var(--ink-muted);
}

.route-line {
  flex: 2;
  position: relative;
  height: 2px;
  background: var(--border);
}

.route-line::before,
.route-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-500);
  transform: translateY(-50%);
}

.route-line::before {
  left: 0;
}

.route-line::after {
  right: 0;
}

.shipment-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.shipment-group {
  padding: 28px 32px;
  border-left: 1px solid var(--border);
}

.shipment-group:first-child {
  border-left: none;
}

.shipment-group h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-600);
  margin-bottom: 16px;
}

.shipment-group dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shipment-group dt {
  font-size: 12.5px;
  color: var(--ink-muted);
}

.shipment-group dd {
  margin: 2px 0 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--navy-900);
}

/* =========================================================
   Login
   ========================================================= */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-950);
  background-image: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(198, 154, 46, 0.12), transparent 60%);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 44px 40px;
  box-shadow: var(--shadow-lift);
  text-align: center;
}

.auth-card img {
  height: 56px;
  margin: 0 auto 24px;
}

.auth-card h1 {
  font-size: 22px;
  margin-bottom: 6px;
}

.auth-card p.sub {
  color: var(--ink-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.field {
  text-align: left;
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 14.5px;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  background: #fff;
}

.form-error {
  background: rgba(179, 67, 43, 0.08);
  color: var(--danger);
  border: 1px solid rgba(179, 67, 43, 0.2);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 18px;
  text-align: left;
}

/* =========================================================
   Admin
   ========================================================= */

.admin-shell {
  min-height: 100vh;
  background: var(--paper);
}

.admin-topbar {
  background: var(--navy-950);
  color: #fff;
}

.admin-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.admin-topbar .brand img {
  height: 32px;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-topbar-actions a {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.7);
}

.admin-topbar-actions a:hover {
  color: #fff;
}

.admin-main {
  padding: 48px 0 96px;
}

.admin-main .container {
  max-width: 1180px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.admin-header h1 {
  font-size: 26px;
  margin-bottom: 4px;
}

.admin-header p {
  color: var(--ink-muted);
  margin-bottom: 0;
  font-size: 14.5px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
}

.panel-head {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-head h2 {
  font-size: 17px;
  margin-bottom: 0;
}

.panel-body {
  padding: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 20px;
}

.form-grid .field {
  margin-bottom: 0;
}

.form-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

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

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.data-table th:first-child,
table.data-table td:first-child {
  padding-left: 28px;
}

table.data-table th:last-child,
table.data-table td:last-child {
  padding-right: 28px;
  max-width: none;
}

table.data-table tr:last-child td {
  border-bottom: none;
}

table.data-table tr:hover td {
  background: var(--paper);
}

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

.icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  color: var(--navy-800);
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--navy-900);
  color: #fff;
  border-color: var(--navy-900);
}

.icon-btn.danger:hover {
  background: var(--danger);
  border-color: var(--danger);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.empty-row td {
  text-align: center;
  color: var(--ink-muted);
  padding: 40px;
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 15, 31, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  overflow-y: auto;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
}

.modal-head h2 {
  font-size: 17px;
  margin-bottom: 0;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-muted);
  padding: 4px;
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 28px;
}

.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--navy-950);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  box-shadow: var(--shadow-lift);
  z-index: 300;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s var(--ease);
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: var(--danger);
}

/* =========================================================
   404
   ========================================================= */

.error-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}

.error-page .eyebrow {
  justify-content: center;
}

.error-page h1 {
  font-size: clamp(48px, 8vw, 96px);
  color: var(--navy-900);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1080px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .shipment-body {
    grid-template-columns: 1fr;
  }
  .shipment-group {
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .shipment-group:first-child {
    border-top: none;
  }
}

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 300px;
    background: var(--navy-950);
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    padding: 100px 28px 28px;
    z-index: 99;
  }
  .main-nav.is-open {
    transform: translateX(0);
  }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .main-nav a {
    padding: 14px 16px;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .header-actions .btn {
    display: none;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-art {
    order: -1;
  }
  .about-art svg {
    max-width: 320px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .trust-strip .container {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust-item:nth-child(3) {
    border-left: none;
  }
}

@media (max-width: 760px) {
  .section {
    padding: 64px 0;
  }
  .hero {
    min-height: auto;
  }
  .hero-content {
    min-height: auto;
  }
  .hero-text {
    padding: 64px 0 56px;
    max-width: 100%;
  }
  .hero-graphic {
    display: none;
  }
  .topbar-info > *:not(:last-child) {
    display: none;
  }
  .services-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .track-form {
    flex-direction: column;
  }
  .shipment-route {
    flex-direction: column;
  }
  .route-line {
    width: 2px;
    height: 32px;
  }
  .contact-details,
  .contact-visual {
    padding: 36px 24px;
  }
}

@media (max-width: 560px) {
  .topbar-social {
    display: none;
  }
}
