:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #16213e;
  --muted: #5b6770;
  --border: #d4dce6;
  --accent: #0b3d91;
  --accent-soft: #e7f0ff;
  --accent-strong: #ffb400;
  --shadow: 0 18px 45px rgba(13, 32, 73, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

/* Hide hamburger menu on desktop */
.menu-toggle {
  display: none;
}

.page-title,
.section-title,
.header-title {
  color: var(--accent);
  margin-bottom: 16px;
  font-size: clamp(1rem, 5vw, 2.4rem);
  letter-spacing: -0.03em;
}

.section {
  padding: 32px 0;
}

.card,
.panel,
.form-card,
.stat-card,
.price-card,
.table-card,
.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

button.primary,
.btn,
input[type='submit'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

button.primary:hover,
button:hover,
input[type='submit']:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(11, 61, 145, 0.18);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  background: var(--surface-soft);
  color: var(--text);
  min-height: 44px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(11, 61, 145, 0.10);
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text);
}

.form-group {
  margin-bottom: 20px;
}

nav,
.header-bar,
.top-bar,
.header,
.hero-panel {
  background: linear-gradient(90deg, #0b3d91, #1a4eb8);
  color: white;
  position: relative;
}

nav,
.header-bar,
.top-bar {
  padding: 16px 0;
}

nav .nav-inner,
.header-bar .nav-inner,
.header .nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

nav a,
.header-bar a,
.header a {
  color: white;
  font-weight: 600;
}

nav a:hover,
.header-bar a:hover,
.header a:hover {
  color: var(--accent-strong);
}

nav a.active,
.header a.active,
.nav-links a.active {
  color: var(--accent-strong);
}

.site-header {
  background: #f4f4f4;
  border-bottom: 1px solid rgba(13, 32, 73, 0.08);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 90px;
  padding: 16px 0;
}

.site-header .site-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  min-width: 0;
  flex: 1 1 auto;
}

.site-header .site-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
}

.site-header .site-brand > div {
  min-width: 0;
}

.site-header .site-brand h1,
.site-header .site-brand p {
  color: var(--text);
}

.site-header .site-brand h1 {
  margin: 0;
  font-size: clamp(0.95rem, 3.5vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  word-break: break-word;
}

.site-header .site-brand p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--muted);
  max-width: 560px;
}

.site-header .navbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  background: linear-gradient(90deg, #0b3d91, #1a4eb8);
  border-radius: 0;
  padding: 10px 12px;
  flex-wrap: nowrap;
}

.site-header .navbar a {
  color: #edf3ff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.site-header .navbar a:hover,
.site-header .navbar a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Mobile nav menu */
.navbar.active,
.nav-links.active {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: rgba(11, 61, 145, 0.98);
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-radius: 0 0 12px 12px;
  z-index: 1000;
  animation: slideDown 0.3s ease;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.site-header .navbar,
.site-header .navbar:not(.active) {
  display: flex;
}

.navbar:not(.active),
.nav-links:not(.active) {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-brand img {
  width: 42px;
}

.site-brand h1,
.site-brand h2 {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.hero,
.track-panel,
.intro-panel {
  padding: 32px 0;
}

.hero-panel,
.track-panel,
.card-panel,
.form-card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 20px;
}

.track-box {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.track-box input {
  flex: 1;
}

.track-box button {
  min-width: 140px;
}

.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;
}

.shipment-timeline {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.timeline-heading,
.timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.timeline-heading h3 {
  color: var(--accent);
  margin: 0;
}

.timeline-list {
  list-style: none;
  position: relative;
  margin: 24px 0 0;
  padding: 0 0 4px;
}

.timeline-list::before {
  content: '';
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 16px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0 var(--timeline-progress), var(--border) var(--timeline-progress) 100%);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  min-height: 84px;
  color: var(--muted);
}

.timeline-marker {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.timeline-item.is-reached .timeline-marker {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.timeline-item.is-current .timeline-marker {
  box-shadow: 0 0 0 5px rgba(255, 180, 0, 0.22);
}

.timeline-item.is-special .timeline-marker {
  border-color: var(--accent-strong);
  background: #fff8e6;
  color: #9a6700;
}

.timeline-content {
  padding: 1px 0 22px;
}

.timeline-meta span {
  color: var(--text);
  font-weight: 700;
}

.timeline-meta time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: right;
}

.timeline-content p {
  margin-top: 4px;
  font-size: 0.94rem;
}

.timeline-location {
  display: block;
  color: var(--accent);
  font-weight: 600;
}

.timeline-content small {
  display: block;
  margin-top: 5px;
  color: #9a6700;
}

.timeline-reference {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-stopped,
.status-customs-cleared,
.status-hold {
  background: #fff4d6;
  color: #9a6700;
}

.status-created { background: #e7f1ff; color: #0b3d91; }

@media (max-width: 640px) {
  .timeline-meta {
    display: block;
  }

  .timeline-meta time {
    display: block;
    margin-top: 3px;
    text-align: left;
  }
}

.top-bar {
  background: #0b3d91;
  color: white;
  padding: 12px 0;
  text-align: center;
  border-radius: 0 0 20px 20px;
  margin-bottom: 24px;
}

.hero {
  padding: 40px 0 48px;
  background: linear-gradient(135deg, #0b3d91 0%, #1a4eb8 100%);
  color: white;
}

.hero-content {
  display: grid;
  gap: 20px;
  max-width: 920px;
  text-align: left;
  color: white;
}

.hero-badge {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0.95;
}

.hero-headline {
  font-size: clamp(1.25rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-copy {
  font-size: 1rem;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.feature-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.feature-card h3 {
  margin-bottom: 14px;
  color: var(--accent);
}

.cta-panel {
  background: var(--accent);
  color: white;
  border-radius: 20px;
  padding: 28px;
}

.cta-panel h2,
.cta-panel p {
  margin-bottom: 18px;
}

.cta-panel .btn {
  background: white;
  color: var(--accent);
}

.cta-panel .btn:hover {
  background: #f4f7fb;
}

.section-heading {
  margin-bottom: 28px;
}

.page-backlink {
  display: inline-block;
  margin: 24px 0 14px;
  color: var(--accent);
  font-weight: 600;
}

.page-backlink:hover {
  text-decoration: underline;
}

.track-hero {
  padding: 42px 0;
  text-align: center;
  display: grid;
  gap: 24px;
}

.track-hero h1 {
  font-size: clamp(1.25rem, 5vw, 3rem);
  margin-bottom: 12px;
}

.track-search {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.track-search input {
  max-width: 420px;
}

.track-search button {
  min-width: 140px;
}

.track-faq {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
  padding: 24px 0;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.faq-item:hover {
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.faq-item h3,
.faq-item span {
  font-weight: 700;
}

.faq-contents,
.faq-content {
  margin-top: 16px;
  line-height: 1.8;
  color: var(--muted);
}

.faq-icon {
  float: right;
  font-size: 0.95rem;
}

.footer {
  background: #f2f2f2;
  padding: 48px 0 24px;
  color: #555;
}

.footer-top {
  max-width: 1200px;
  margin: 0 auto 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-logo img {
  width: 120px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  flex: 1;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.95rem;
  color: #666;
}

.footer-links a:hover {
  color: #d40511;
}

.footer-social {
  text-align: right;
}

.footer-social p {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: #333;
}

.footer-social .icons a {
  margin-left: 10px;
  font-size: 18px;
  color: #555;
}

.footer-social .icons a:hover {
  color: #d40511;
}

.footer-bottom {
  text-align: center;
  margin-top: 22px;
  font-size: 0.93rem;
  color: #777;
}

.form-box,
.register-form,
.login-form,
.shipments-table,
.contact-wrapper,
.info-box,
.pricing {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.form-box,
.register-form,
.login-form {
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
}

.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.pricing .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: left;
}

.pricing .card h2 {
  margin-bottom: 12px;
}

.pricing .price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin: 18px 0;
}

.pricing .features p {
  margin: 10px 0;
}

.pricing .card button,
.card button {
  min-width: 100%;
}

.popular {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.info-box {
  display: grid;
  gap: 16px;
}

.info-box p {
  margin: 0;
  line-height: 1.7;
}

.login-form {
  max-width: 420px;
}

.login-link {
  text-align: center;
  margin-top: 18px;
}

.logout-btn {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f44336;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}

.dashboard {
  display: none;
}

.dashboard.show {
  display: block;
}

.create-shipment-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 30px;
}

.create-shipment-panel h3 {
  margin-top: 0;
  color: var(--accent);
}

.create-shipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.inline-link {
  color: var(--accent);
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  text-align: center;
}

.stat-card h3 {
  margin-bottom: 16px;
  color: var(--accent);
}

.stat-card .number {
  font-size: 2.2rem;
  font-weight: 700;
}

.shipments-table {
  border-radius: 24px;
  overflow: hidden;
}

.table-card {
  overflow-x: auto;
}

.modal-content {
  width: min(580px, 100%);
}

.alert,
.message,
.note,
.error-message {
  border-radius: 18px;
  padding: 18px 20px;
  background: #fff1f2;
  border: 1px solid #f5c2c7;
  color: #b91c1c;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

th,
td {
  padding: 18px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface-soft);
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

.status-created, .status-shipment-created { background: #e7f1ff; color: #0b3d91; }
.status-in-transit { background: #fff4e6; color: #b45309; }
.status-delivered { background: #e7f9ee; color: #166534; }
.status-out-for-delivery { background: #eaf4ff; color: #0c4a6e; }
.status-delayed { background: #fff1f2; color: #b91c1c; }

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  z-index: 1000;
  padding: 24px;
}

.modal.open {
  display: grid;
  place-items: center;
}

.modal-content {
  width: min(520px, 100%);
}

.footer {
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
}

.small-text {
  color: var(--muted);
  font-size: 0.95rem;
}

.ship-page {
  padding: 16px 0 48px;
}

.ship-hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.ship-hero h1,
.ship-card h2 {
  margin-bottom: 12px;
  color: var(--accent);
}

.subtle {
  color: var(--muted);
}

.mini-card {
  background: linear-gradient(145deg, #0b3d91, #1a4eb8);
  color: white;
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.mini-card h2 {
  color: white;
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.mini-card ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.mini-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.mini-card li::before {
  content: '✓';
  color: #ffd166;
  font-weight: 800;
}

.ship-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.ship-card {
  display: grid;
  gap: 14px;
}

.shipment-form {
  display: grid;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.result-box {
  min-height: 24px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 12px 14px;
}

.result-box p {
  margin: 0;
}

/* Tablet and smaller screens - 960px */
@media (max-width: 960px) {
  .ship-hero,
  .ship-grid,
  .form-row,
  .about .grid,
  .tariff-section .grid,
  .cargo-container,
  .cards-container,
  .info-container {
    grid-template-columns: 1fr;
  }

  .ship-hero {
    gap: 18px;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 36px 0 42px;
  }

  .hero-content {
    gap: 14px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions button {
    width: 100%;
  }

  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-top {
    flex-direction: column;
    gap: 24px;
  }

  .footer-links {
    justify-content: space-around;
  }

  .feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.track-page {
  padding: 20px 0 48px;
}

.track-panel {
  display: grid;
  gap: 18px;
}

.track-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.track-card {
  display: grid;
  gap: 14px;
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: white;
  color: var(--accent);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
}

.map-panel {
  display: grid;
  gap: 10px;
}

.map-frame {
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  min-height: 260px;
  background: var(--surface-soft);
}

.history-card {
  margin-top: 18px;
}

.history-headline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.history-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.history-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--surface-soft);
}

.history-item strong,
.history-item span,
.history-item small {
  display: block;
}

.history-item span {
  color: var(--accent);
  font-weight: 700;
}

.history-item small {
  color: var(--muted);
  margin-top: 4px;
}

.history-empty {
  color: var(--muted);
  padding: 6px 0;
}

.faq-card {
  margin-top: 18px;
}

.faq-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

@media (max-width: 960px) {
  .grid-2,
  .grid-3,
  .track-grid,
  .ship-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .flex-between {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  /* Root container adjustments */
  .container {
    width: 100%;
    padding: 0 8px;
    margin: 0 auto;
  }

  /* Typography scaling */
  .page-title,
  .section-title,
  .header-title {
    font-size: clamp(1rem, 5vw, 1.8rem);
    margin-bottom: 14px;
  }

  h1 {
    font-size: clamp(1.1rem, 5vw, 2.2rem);
  }

  h2 {
    font-size: clamp(1rem, 4.5vw, 1.8rem);
  }

  h3 {
    font-size: clamp(0.95rem, 4vw, 1.4rem);
  }

  .hero-content h1,
  .hero h1,
  .track-hero h1 {
    max-width: 12ch;
    font-size: clamp(2rem, 8vw, 2.9rem);
    line-height: 1.08;
  }

  .hero-copy {
    font-size: 0.95rem;
  }

  .about .grid,
  .tariff-section .grid,
  .cargo-container,
  .cards-container,
  .info-container {
    gap: 16px;
  }

  .services {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .service {
    padding: 12px 10px;
    font-size: 0.9rem;
  }

  .updates-list {
    gap: 10px;
  }

  .updates-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
  }

  .card img {
    border-radius: 12px;
  }

  .info-column ul {
    gap: 8px;
  }

  /* Navigation responsive */
  nav .nav-inner,
  .header-bar .nav-inner,
  .header .nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .navbar,
  .nav-links {
    display: flex;
    gap: 0;
    width: 100%;
    flex-direction: column;
  }

  .navbar a,
  .nav-links a {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
  }

  .navbar a:hover,
  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .site-header .navbar,
  .site-header .navbar:not(.active) {
    display: flex !important;
  }

  .navbar:not(.active),
  .nav-links:not(.active) {
    display: none;
  }

  .site-header {
    background: #f5f5f5;
    border-bottom: 1px solid rgba(16, 24, 40, 0.08);
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.04);
    position: relative;
  }

  .site-header .header-inner {
    display: block;
    min-height: auto;
    padding: 8px 0 0;
    gap: 0;
  }

  .site-header .site-brand {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 10px;
    margin-bottom: 8px;
  }

  .site-header .site-brand > div {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .site-header .site-brand img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .site-header .site-brand h1 {
    color: #1a2b3d;
    font-size: clamp(0.92rem, 4vw, 1.35rem);
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.03em;
    max-width: 100%;
    word-break: break-word;
  }

  .site-header .site-brand p {
    display: none;
    color: #5b6770;
    font-size: 0.72rem;
    line-height: 1.35;
    margin: 2px 0 0;
    max-width: 240px;
    word-break: break-word;
  }

  .site-header .navbar {
    display: flex !important;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    width: 100%;
    margin: 0;
    padding: 6px;
    background: linear-gradient(90deg, #0b3d91, #1a4eb8);
    border-radius: 0;
    position: static;
    box-shadow: none;
    animation: none;
  }

  .site-header .navbar.active {
    display: flex !important;
  }

  .site-header .navbar a {
    flex: 1 1 0;
    text-align: center;
    padding: 10px 6px;
    font-size: 0.75rem;
    line-height: 1.1;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    white-space: nowrap;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .navbar:not(.active),
  .nav-links:not(.active) {
    display: flex !important;
  }

  .site-header .navbar a:hover,
  .site-header .navbar a.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
  }

  .site-header .menu-toggle {
    display: none;
  }

  /* Hamburger menu styles */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }

  .menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  /* Spacing adjustments */
  .section {
    padding: 32px 0;
  }

  .hero {
    padding: 40px 0;
  }

  .hero-content {
    gap: 16px;
  }

  .hero-badge {
    font-size: 0.75rem;
  }

  /* Buttons and inputs */
  button,
  .btn,
  input[type='submit'],
  button.primary {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    min-height: 48px;
    border-radius: 12px;
  }

  input,
  select,
  textarea {
    padding: 14px 14px;
    font-size: 16px;
    border-radius: 12px;
    min-height: 48px;
  }

  label {
    font-size: 0.95rem;
  }

  /* Forms */
  .track-box,
  .flex-between,
  .actions-row {
    flex-direction: column;
    gap: 10px;
  }

  .track-box button,
  .track-box input {
    width: 100%;
    min-width: auto;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .shipment-form {
    gap: 10px;
  }

  .form-group {
    margin-bottom: 16px;
  }

  /* Cards and panels */
  .card,
  .panel,
  .form-card,
  .stat-card,
  .price-card,
  .table-card,
  .modal-content,
  .hero-panel,
  .track-panel,
  .form-box,
  .register-form,
  .login-form,
  .create-shipment-panel {
    padding: 20px 18px;
    border-radius: 16px;
  }

  /* Grid layouts */
  .grid-2,
  .grid-3,
  .track-grid,
  .ship-grid,
  .grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Images */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Hero adjustments */
  .hero-headline {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    line-height: 1.2;
  }

  .hero-copy {
    font-size: 0.95rem;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions button {
    min-width: auto;
  }

  /* Ship page */
  .ship-hero {
    gap: 16px;
  }

  .mini-card {
    padding: 18px;
  }

  .mini-card h2 {
    font-size: 1.1rem;
  }

  .mini-card ul {
    gap: 8px;
  }

  /* Track page */
  .track-page {
    padding: 16px 0 32px;
  }

  .track-card {
    gap: 12px;
  }

  /* Map adjustments */
  .map-frame {
    min-height: 220px;
  }

  /* History card */
  .history-headline {
    flex-direction: column;
    gap: 10px;
  }

  .history-item {
    padding: 10px 12px;
  }

  /* Admin dashboard */
  #loginBox,
  #dashboard {
    padding: 18px;
    border-radius: 18px;
  }

  #loginBox input,
  #loginBox button,
  #dashboard input,
  #dashboard button {
    width: 100%;
  }

  /* Table responsiveness */
  #dashboard table,
  #dashboard thead,
  #dashboard tbody,
  #dashboard tr,
  #dashboard td,
  #dashboard th {
    display: block;
    width: 100%;
  }

  #dashboard thead {
    display: none;
  }

  #dashboard tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(13, 32, 73, 0.06);
    margin-bottom: 12px;
    overflow: hidden;
  }

  #dashboard td {
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
  }

  #dashboard td:last-child {
    border-bottom: none;
  }

  #dashboard td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  #dashboard td button {
    width: 100%;
    margin-bottom: 8px;
    padding: 10px 12px;
  }

  /* Contact page */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .form-box {
    max-width: 100%;
  }

  .info-box {
    padding: 16px;
  }

  /* Footer */
  .footer {
    padding: 28px 0;
  }

  .footer-top {
    flex-direction: column;
    gap: 20px;
  }

  .footer-logo img {
    width: 100px;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
    text-align: left;
  }

  .footer-social {
    text-align: left;
  }

  .footer-bottom {
    margin-top: 16px;
    font-size: 0.9rem;
  }

  /* Status badges */
  .status-badge {
    padding: 4px 10px;
    font-size: 0.85rem;
  }

  /* CTA panel */
  .cta-panel {
    padding: 24px;
  }

  .cta-panel h2 {
    font-size: 1.4rem;
  }

  /* Eyebrow text */
  .eyebrow {
    font-size: 0.7rem;
    margin-bottom: 8px;
  }

  /* Section titles */
  .section-heading {
    margin-bottom: 20px;
  }

  /* Pricing cards */
  .pricing {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .pricing .price {
    font-size: 1.8rem;
  }

  /* FAQ */
  .faq-item {
    padding: 16px;
  }

  .faq-heading {
    gap: 10px;
  }

  .page-backlink {
    margin: 16px 0 12px;
    font-size: 0.95rem;
  }

  /* Auth pages */
  .auth-shell,
  .auth-card {
    border-radius: 16px;
  }

  .auth-heading {
    margin-bottom: 20px;
  }

  .auth-button {
    width: 100%;
  }

  .auth-meta {
    text-align: center;
    font-size: 0.9rem;
  }
}

/* Small phones - 480px and below */
@media (max-width: 480px) {
  .container {
    width: 100%;
    padding: 0 8px;
    margin: 0 auto;
  }

  .page-title,
  .section-title {
    font-size: clamp(1rem, 5vw, 1.6rem);
    margin-bottom: 12px;
  }

  h1 {
    font-size: clamp(1.1rem, 5vw, 1.9rem);
  }

  h2 {
    font-size: clamp(1rem, 4.5vw, 1.6rem);
  }

  .hero {
    padding: 32px 0;
  }

  .hero-content {
    gap: 14px;
  }

  .section {
    padding: 24px 0;
  }

  .card,
  .panel,
  .form-card,
  .track-panel,
  .form-box {
    padding: 16px;
    border-radius: 14px;
  }

  button,
  .btn,
  input[type='submit'] {
    padding: 12px 14px;
    font-size: 0.95rem;
    min-height: 44px;
    border-radius: 10px;
  }

  input,
  select,
  textarea {
    padding: 12px 12px;
    font-size: 16px;
    border-radius: 10px;
    min-height: 44px;
  }

  .form-group {
    margin-bottom: 14px;
  }

  .gap {
    gap: 12px;
  }

  .mini-card {
    padding: 14px;
  }

  .mini-card h2 {
    font-size: 1rem;
  }

  .mini-card li {
    gap: 8px;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-badge {
    font-size: 0.7rem;
  }

  .cta-panel {
    padding: 18px;
  }

  .cta-panel h2 {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }

  .footer {
    padding: 20px 0;
  }

  .footer-logo img {
    width: 90px;
  }

  .eyebrow {
    font-size: 0.65rem;
  }

  #dashboard table th,
  #dashboard table td {
    padding: 8px 10px;
  }

  .history-item {
    padding: 8px 10px;
  }

  .modal-content {
    width: 100%;
  }
}

/* Extra small phones - 360px */
@media (max-width: 360px) {
  .container {
    width: 100%;
    padding: 0 8px;
    margin: 0 auto;
  }

  h1 {
    font-size: clamp(1.2rem, 5vw, 1.7rem);
    line-height: 1.1;
  }

  h2 {
    font-size: clamp(1rem, 4.5vw, 1.4rem);
  }

  .card,
  .panel,
  .form-card {
    padding: 14px;
    border-radius: 12px;
  }

  button,
  .btn {
    padding: 10px 12px;
    font-size: 0.9rem;
    min-height: 38px;
  }

  .track-box {
    gap: 8px;
  }

  .form-row {
    gap: 10px;
  }

  .hero {
    padding: 28px 0;
  }

  .hero-content {
    gap: 12px;
  }

  .section {
    padding: 20px 0;
  }

  .mini-card {
    padding: 12px;
    font-size: 0.9rem;
  }

  .mini-card h2 {
    font-size: 0.95rem;
  }

  .eyebrow {
    font-size: 0.6rem;
    margin-bottom: 6px;
  }

  .cta-panel {
    padding: 16px;
  }

  .cta-panel h2 {
    font-size: 1.1rem;
  }

  .footer {
    padding: 16px 0;
  }

  .footer-logo img {
    width: 80px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }
}
