:root {
  --bg: #f4f6fb;
  --ink: #10131a;
  --muted: #6e7687;
  --line: #e5e9f2;
  --card: #ffffff;
  --surface-soft: #f8faff;
  --surface-raised: #ffffff;
  --text-strong: #1b2536;
  --text-soft: #5f6b82;
  --accent: #f3af68;
  --accent-2: #8ebbe8;
  --accent-soft: #fff1e2;
  --danger: #f15e6f;
  --radius: 18px;
  --shadow: 0 14px 36px rgba(15, 22, 40, 0.10);
  --shadow-neo:
    10px 10px 22px rgba(198, 208, 226, 0.58),
    -10px -10px 20px rgba(255, 255, 255, 0.9);
  --shadow-neo-inset:
    inset 5px 5px 12px rgba(210, 220, 236, 0.6),
    inset -5px -5px 10px rgba(255, 255, 255, 0.9);
}
[data-theme="dark"] {
  --bg: #0f1522;
  --ink: #e8edf6;
  --muted: #a8b3c8;
  --line: #263248;
  --card: #161f30;
  --surface-soft: #1a263d;
  --surface-raised: #1b2a42;
  --text-strong: #edf3ff;
  --text-soft: #aebad0;
  --accent: #f3b77c;
  --accent-2: #8ebbe8;
  --accent-soft: #2a3346;
  --danger: #ff7d90;
  --shadow: 0 18px 34px rgba(2, 6, 16, 0.42);
  --shadow-neo:
    14px 14px 30px rgba(6, 11, 20, 0.72),
    -10px -10px 24px rgba(32, 46, 72, 0.45);
  --shadow-neo-inset:
    inset 6px 6px 12px rgba(9, 14, 25, 0.74),
    inset -5px -5px 10px rgba(40, 57, 86, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.4 "Mulish", ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(800px 260px at 15% -5%, rgba(243, 175, 104, 0.2), transparent 60%),
    radial-gradient(900px 280px at 85% -8%, rgba(142, 187, 232, 0.2), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 246, 251, 0.92)),
    var(--bg);
}
[data-theme="dark"] body {
  background:
    radial-gradient(830px 300px at 15% -8%, rgba(243, 175, 104, 0.16), transparent 60%),
    radial-gradient(900px 320px at 88% -10%, rgba(142, 187, 232, 0.14), transparent 65%),
    linear-gradient(180deg, rgba(13, 20, 33, 0.95), rgba(12, 18, 30, 0.98)),
    var(--bg);
}

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

.app-shell {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.site-top {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(229, 233, 242, 0.9);
  backdrop-filter: blur(12px);
  background: rgba(244, 246, 251, 0.88);
}
.site-top__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand__img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(243, 175, 104, 0.45);
  box-shadow: 0 8px 18px rgba(18, 23, 33, 0.12);
}
.brand__text {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  color: #576074;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  font-size: 18px;
  cursor: pointer;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
}
.site-nav__link {
  border: 1px solid transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
}
.site-nav__link:hover,
.site-nav__link.is-active {
  border-color: var(--line);
  background: #fff;
  color: #1a1e29;
}

.site-actions {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--text-soft);
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 11px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 220ms ease, color 220ms ease;
  box-shadow: var(--shadow-neo);
}
[data-theme="dark"] .theme-toggle {
  border-color: #32415c;
}
.theme-toggle:hover {
  transform: translateY(-1px);
}
.theme-toggle:active {
  transform: translateY(0);
  box-shadow: var(--shadow-neo-inset);
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(142, 187, 232, 0.55);
  background: linear-gradient(145deg, rgba(142, 187, 232, 0.2), rgba(243, 175, 104, 0.18));
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #2a3348;
  overflow: hidden;
}
.avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logout-form { margin: 0; }

.page-wrap {
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px 24px;
}

.hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.hero--visual .hero__content {
  flex: 1 1 auto;
  min-width: 0;
}
.hero__kicker {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 700;
}
.hero__title {
  margin: 4px 0 0;
  color: var(--text-strong);
  font-size: clamp(28px, 3.7vw, 42px);
  line-height: 1.05;
}
.hero__sub {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 62ch;
}
.hero__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.hero-art {
  position: relative;
  width: min(100%, 334px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, var(--surface-soft), var(--surface-raised));
  box-shadow: var(--shadow-neo);
  padding: 14px;
  overflow: hidden;
  transition: transform 280ms ease, box-shadow 280ms ease;
}
.hero-art:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(10, 17, 29, 0.2);
}
.hero-art::before {
  content: "";
  position: absolute;
  top: -34px;
  right: -34px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 175, 104, 0.28), rgba(243, 175, 104, 0));
}
.hero-art__bg {
  width: 100%;
  height: auto;
  display: block;
}
.hero-art__truck-wrap {
  position: absolute;
  left: 14px;
  bottom: 12px;
  width: 130px;
  height: 76px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-raised) 90%, transparent);
  display: grid;
  place-items: center;
  animation: floaty 4s ease-in-out infinite;
}
.hero-art__truck {
  width: 88px;
  height: auto;
}
.hero-art__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 17%, var(--surface-raised));
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
}

.stats-strip {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.stat-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, var(--surface-raised), var(--surface-soft));
  box-shadow: var(--shadow-neo);
  padding: 11px 12px;
  transition: transform 180ms ease, box-shadow 220ms ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(10, 16, 27, 0.2);
}
.stat-card__label {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}
.stat-card__value {
  margin: 5px 0 0;
  color: var(--text-strong);
  font-size: clamp(24px, 2.8vw, 30px);
  font-weight: 800;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
}
.dashboard-grid--detail {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.9fr);
}
.stack {
  display: grid;
  gap: 16px;
}

.card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(14, 21, 33, 0.16);
}
.card--padded { padding: 16px; }
.card__title { margin: 0; font-size: 24px; line-height: 1.1; }
.card__sub { margin: 7px 0 0; color: var(--muted); }

.section-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.section-hd__meta { color: var(--muted); font-size: 13px; font-weight: 700; }

.ship-list { display: grid; gap: 10px; }
.ship-list--past .ship-card { opacity: 0.68; }
.ship-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, var(--surface-raised), var(--surface-soft));
  box-shadow: var(--shadow-neo);
  padding: 10px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
  transition: transform 170ms ease, box-shadow 190ms ease, border-color 180ms ease;
}

.add-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.add-card__img {
  width: 74px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(20, 29, 45, 0.12));
}

.empty-state {
  border: 1px dashed color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--surface-raised), var(--surface-soft));
  text-align: center;
  padding: 18px 14px;
}
.empty-state--muted {
  opacity: 0.88;
}
.empty-state__img {
  width: min(100%, 160px);
  height: auto;
}
.empty-state__title {
  margin: 10px 0 0;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 800;
}
.empty-state__text {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}
.ship-card:hover {
  transform: translateY(-3px) scale(1.004);
  box-shadow: 0 16px 28px rgba(10, 16, 27, 0.22);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.ship-card__thumb {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 82%, var(--surface-raised));
  display: grid;
  place-items: center;
}
.ship-card__thumb img {
  width: 38px;
  height: 30px;
  object-fit: contain;
}
.ship-card__thumb--muted img { filter: grayscale(1); }
.ship-card__title {
  display: block;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ship-card__meta {
  margin-top: 3px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.form { margin-top: 12px; }
.lbl {
  display: block;
  color: var(--text-soft);
  margin: 10px 0 5px;
  font-size: 13px;
  font-weight: 700;
}
.in {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  color: var(--ink);
  padding: 10px 11px;
  font: inherit;
  outline: none;
}
.in:focus {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent),
    var(--shadow-neo-inset);
}
textarea.in { min-height: 92px; resize: vertical; }
.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.row--2 { grid-template-columns: 1fr 1fr; }
.actions { margin-top: 12px; display: flex; gap: 10px; }

.btn {
  border: 1px solid #f3d3ad;
  background: #fef0df;
  color: #86531f;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  padding: 9px 13px;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 190ms ease, filter 180ms ease, background 220ms ease;
  box-shadow: var(--shadow-neo);
}
.btn:hover {
  filter: brightness(0.99);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-neo-inset);
}
.btn--ghost {
  border-color: var(--line);
  background: var(--surface-raised);
  color: var(--text-soft);
}
.btn--danger {
  border-color: #f7c0c8;
  background: #ffecef;
  color: #a63d4d;
}
.btn.is-active,
.btn--ghost.is-active {
  border-color: rgba(243, 175, 104, 0.55);
}

.msg {
  margin: 12px 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
  font-size: 14px;
}
.msg--ok { border-color: #d2e5fb; background: #f3f8ff; }
.msg--err { border-color: #fac6ce; background: #fff1f3; }

.code {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding: 3px 7px;
}
.dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #9ba4b3;
  margin: 0 7px;
}
.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f9fd;
  color: #4a556d;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  text-transform: capitalize;
}
.chip--delivered { background: #edf4ff; border-color: #d6e4fb; }
.chip--in_transit { background: #fff4e7; border-color: #f7ddbb; }
.chip--out_for_delivery { background: #fff2e3; border-color: #f5d5ae; }
.chip--exception { background: #ffeef1; border-color: #f8ccd3; }

.back-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text-soft);
  font-weight: 700;
  font-size: 12px;
  padding: 7px 10px;
}
.detail-head {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin-bottom: 12px;
}
.detail-head--visual {
  border: 1px solid #e4e9f4;
  border-radius: 18px;
  background: linear-gradient(150deg, var(--surface-raised), var(--surface-soft));
  padding: 14px;
  box-shadow: var(--shadow-neo);
}
.detail-head__title {
  margin: 10px 0 0;
  color: var(--text-strong);
  font-size: clamp(24px, 3vw, 36px);
}
.detail-head__sub {
  margin: 8px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-head__img {
  width: 100%;
  max-width: 180px;
  height: 130px;
  justify-self: end;
  object-fit: contain;
  animation: floaty 5s ease-in-out infinite;
}
.detail-stats {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.detail-stat {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(150deg, var(--surface-raised), var(--surface-soft));
  box-shadow: var(--shadow-neo);
  padding: 10px 11px;
  transition: transform 180ms ease, box-shadow 220ms ease;
}
.detail-stat:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(11, 17, 29, 0.22);
}
.detail-stat__label {
  margin: 0;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.detail-stat__value {
  margin: 5px 0 0;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline__item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  position: relative;
  padding: 8px 0;
}
.timeline__item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 23px;
  bottom: -8px;
  width: 2px;
  background: linear-gradient(180deg, rgba(243, 175, 104, 0.36), rgba(224, 229, 239, 0.84));
}
.timeline__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #f3af68;
  background: var(--surface-raised);
  margin-top: 2px;
}
.timeline__meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.timeline__time {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
}
.timeline__loc {
  font-size: 12px;
  color: color-mix(in srgb, var(--text-soft) 84%, var(--muted));
}
.timeline__desc {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong);
}

.auth-wrap {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: center;
  gap: 24px;
  padding: 18px 0 10px;
}
.auth-brand {
  position: relative;
  display: grid;
  place-items: center;
  gap: 9px;
  text-align: center;
  padding: 14px 14px 0;
}
.auth-brand__halo {
  position: absolute;
  top: -20px;
  width: min(82vw, 280px);
  height: 110px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(243, 175, 104, 0.26) 0%, rgba(243, 175, 104, 0.06) 46%, transparent 72%);
  filter: blur(2px);
  pointer-events: none;
}
.auth-brand__logo {
  width: clamp(118px, 14vw, 162px);
  height: clamp(118px, 14vw, 162px);
  border-radius: 30px;
  object-fit: cover;
  border: 1px solid rgba(243, 175, 104, 0.58);
  box-shadow:
    0 20px 44px rgba(16, 22, 32, 0.16),
    0 0 0 10px rgba(255, 241, 226, 0.85);
  position: relative;
  z-index: 1;
}
.auth-brand__name {
  margin: 0;
  font-size: clamp(23px, 2.8vw, 31px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.015em;
  color: var(--text-strong);
}
.auth-brand__tagline {
  margin: 0;
  max-width: 44ch;
  color: var(--text-soft);
  font-size: 14px;
}
.auth-card {
  width: min(100%, 560px);
}
.auth-card__switch {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.auth-card__switch a {
  color: #6a4b2a;
  text-decoration: underline;
  text-decoration-color: rgba(243, 175, 104, 0.6);
}
.sync-form {
  margin-top: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.sync-form__btn {
  position: relative;
  gap: 8px;
  min-width: 212px;
}
.sync-form__busy {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #d4dcea;
  border-top-color: #f3af68;
  display: none;
  animation: spin 0.9s linear infinite;
}
.sync-form__btn.is-loading {
  pointer-events: none;
  opacity: 0.88;
}
.sync-form__btn.is-loading .sync-form__busy {
  display: inline-block;
}
.sync-form__hint {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}
.sync-form__hint--warn {
  color: #995249;
}
.sync-visual[hidden] {
  display: none;
}
.sync-visual {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(150deg, var(--surface-raised), var(--surface-soft));
  box-shadow: var(--shadow-neo);
  padding: 10px 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 280ms ease, transform 280ms ease;
}
.sync-visual.is-active {
  opacity: 1;
  transform: translateY(0);
}
.sync-visual__text {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}
.sync-visual__lane {
  position: relative;
  padding-top: 8px;
  height: 46px;
}
.sync-visual__track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 86%, transparent);
  overflow: hidden;
}
.sync-visual__track::before {
  content: "";
  position: absolute;
  top: 0;
  left: -45%;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, rgba(243, 175, 104, 0), rgba(243, 175, 104, 0.72), rgba(243, 175, 104, 0));
  animation: syncProgress 1.6s linear infinite;
}
.sync-visual__truck {
  position: absolute;
  bottom: 14px;
  left: 0;
  width: 52px;
  height: auto;
  filter: drop-shadow(0 4px 9px rgba(20, 30, 45, 0.2));
  animation: syncDrive 1.8s ease-in-out infinite;
}
.oauth {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 12px;
}
.oauth__label {
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.oauth__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.oauth__btn {
  min-width: 120px;
  justify-content: center;
  text-align: center;
}

.foot {
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 16px 20px;
  text-align: center;
  display: grid;
  gap: 6px;
  justify-items: center;
}
.foot__muted {
  color: #808798;
  font-size: 12px;
}
.foot__muted a {
  color: var(--text-soft);
  text-decoration: underline;
  text-decoration-color: rgba(89, 98, 122, 0.35);
}

.tour[hidden] { display: none; }
.tour {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.tour__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 15, 23, 0.56);
}
.tour__card {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(92vw, 390px);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  box-shadow: 0 16px 34px rgba(14, 20, 29, 0.28);
  padding: 14px;
}
.tour__step { margin: 0; color: #858c9a; font-size: 11px; font-weight: 800; }
.tour__title { margin: 5px 0 0; font-size: 19px; }
.tour__text { margin: 7px 0 0; color: #606a7b; font-size: 13px; }
.tour__actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.tour__btn {
  border: 1px solid #f2cfaa;
  background: #fef1e2;
  color: #8b5823;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 11px;
  cursor: pointer;
}
.tour__btn--ghost {
  border-color: var(--line);
  background: var(--surface-raised);
  color: var(--text-soft);
}

.tour-target {
  position: relative;
  z-index: 1201;
  border-radius: 14px;
  box-shadow: 0 0 0 4px rgba(243, 175, 104, 0.56), 0 0 0 10px rgba(243, 175, 104, 0.2);
}

.pwa-ui[hidden],
.pwa-update[hidden] {
  display: none;
}
.pwa-ui {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1500;
}
.pwa-install {
  border: 1px solid #f3d3ad;
  background: linear-gradient(145deg, #fef0df, #ffe7cc);
  color: #8a5825;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 14px;
  box-shadow: 0 12px 28px rgba(14, 22, 36, 0.2);
  cursor: pointer;
}
.pwa-update {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 1600;
  border: 1px solid #dce5f4;
  background: var(--surface-raised);
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.2);
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.pwa-update__text {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}
.pwa-update__btn {
  border: 1px solid #f3d3ad;
  background: #fef0df;
  color: #8a5825;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
}

.add-modal[hidden] {
  display: none;
}
.add-modal {
  position: fixed;
  inset: 0;
  z-index: 1700;
}
.add-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 12, 20, 0.58);
}
.add-modal__card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 560px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 26px 56px rgba(6, 12, 22, 0.35);
  padding: 16px;
}
.add-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.add-modal__title {
  margin: 0;
  font-size: 24px;
}
.add-modal__close {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.add-modal__sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.view-transition {
  position: fixed;
  inset: 0;
  z-index: 1800;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 240ms ease, transform 240ms ease;
}
.view-transition.is-active {
  opacity: 1;
  transform: translateY(0);
}
.view-transition__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(243, 175, 104, 0.2), rgba(11, 18, 30, 0.74) 64%);
  backdrop-filter: blur(6px);
}
.view-transition__card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 430px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(150deg, var(--surface-raised), var(--surface-soft));
  box-shadow: 0 24px 48px rgba(10, 17, 28, 0.3);
  padding: 14px;
  overflow: hidden;
}
.view-transition__map {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.9;
}
.view-transition__truck {
  position: absolute;
  left: 12px;
  bottom: 36px;
  width: 80px;
  height: auto;
  animation: transitionDrive 1.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(11, 18, 28, 0.3));
}
.view-transition__text {
  margin: 8px 0 0;
  text-align: center;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
[data-theme="dark"] .view-transition__bg {
  background: radial-gradient(circle at 50% 0%, rgba(243, 175, 104, 0.12), rgba(6, 10, 18, 0.84) 64%);
}
[data-theme="dark"] .site-top {
  border-bottom-color: rgba(38, 50, 72, 0.88);
  background: rgba(11, 17, 29, 0.86);
}
[data-theme="dark"] .site-nav__link:hover,
[data-theme="dark"] .site-nav__link.is-active {
  background: #182338;
  color: #dbe5f7;
  border-color: #31405b;
}
[data-theme="dark"] .site-nav__link {
  color: #b6c4dc;
}
[data-theme="dark"] .btn--ghost {
  border-color: #31415e;
}
[data-theme="dark"] .code {
  border-color: #33435f;
}
[data-theme="dark"] .chip {
  border-color: #344561;
}
[data-theme="dark"] .in {
  border-color: #32415d;
}
[data-theme="dark"] .msg {
  background: #18253a;
}
[data-theme="dark"] .msg--ok {
  border-color: #375784;
  background: #142742;
}
[data-theme="dark"] .msg--err {
  border-color: #7a3d48;
  background: #3b2027;
}
[data-theme="dark"] .detail-head--visual,
[data-theme="dark"] .hero-art,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .detail-stat,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .sync-visual {
  border-color: #2d3d59;
}
[data-theme="dark"] .ship-card {
  border-color: #2f405f;
}
[data-theme="dark"] .ship-card__thumb {
  border-color: #3f4f68;
  background: #20304b;
}
[data-theme="dark"] .ship-card__meta,
[data-theme="dark"] .section-hd__meta,
[data-theme="dark"] .card__sub,
[data-theme="dark"] .lbl,
[data-theme="dark"] .sync-form__hint,
[data-theme="dark"] .sync-visual__text,
[data-theme="dark"] .foot__muted,
[data-theme="dark"] .tour__text,
[data-theme="dark"] .add-modal__sub,
[data-theme="dark"] .pwa-update__text {
  color: #aebad0;
}
[data-theme="dark"] .hero-art__badge {
  background: #223656;
  border-color: #344761;
  color: #d8e4f7;
}
[data-theme="dark"] .pwa-update {
  border-color: #33445f;
}
[data-theme="dark"] .foot__muted a {
  text-decoration-color: rgba(191, 202, 224, 0.35);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms ease, transform 420ms ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-delay="1"] {
  transition-delay: 70ms;
}
[data-reveal-delay="2"] {
  transition-delay: 130ms;
}
[data-reveal-delay="3"] {
  transition-delay: 190ms;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes syncProgress {
  from { transform: translateX(0); }
  to { transform: translateX(320%); }
}
@keyframes syncDrive {
  0% { transform: translateX(0); }
  50% { transform: translateX(calc(100% - 56px)); }
  100% { transform: translateX(0); }
}
@keyframes transitionDrive {
  0% { transform: translateX(0); }
  45% { transform: translateX(calc(100% + 14px)); }
  46% { opacity: 0; transform: translateX(-74px); }
  48% { opacity: 1; }
  100% { transform: translateX(0); }
}

@media (max-width: 980px) {
  .dashboard-grid,
  .dashboard-grid--detail {
    grid-template-columns: 1fr;
  }
  .detail-head {
    grid-template-columns: 1fr;
  }
  .detail-head__img {
    justify-self: start;
    max-width: 170px;
  }
  .stats-strip,
  .detail-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .site-top__inner {
    grid-template-columns: auto auto 1fr;
  }
  .nav-toggle { display: inline-grid; place-items: center; }
  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-self: stretch;
  }
  .site-nav.is-open { display: flex; }
  .site-actions {
    justify-self: end;
  }
  .theme-toggle {
    padding: 7px 10px;
    font-size: 11px;
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-art {
    width: 100%;
  }
  .hero__actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .stats-strip,
  .detail-stats {
    grid-template-columns: 1fr;
  }
  .row--2 { grid-template-columns: 1fr; }
  .sync-form__btn {
    min-width: 0;
    width: 100%;
  }
  .auth-wrap {
    gap: 16px;
    padding-top: 6px;
  }
  .auth-brand__logo {
    width: 102px;
    height: 102px;
    border-radius: 24px;
  }
  .auth-brand__name {
    font-size: 23px;
  }
  .pwa-ui {
    right: 12px;
    bottom: 12px;
  }
  .pwa-install {
    width: calc(100vw - 24px);
    max-width: 240px;
  }
  .pwa-update {
    width: calc(100vw - 24px);
    justify-content: space-between;
    border-radius: 14px;
  }
  .add-modal__card {
    width: calc(100vw - 24px);
    top: auto;
    bottom: 10px;
    transform: translateX(-50%);
    max-height: calc(100vh - 24px);
    overflow: auto;
    border-radius: 16px;
  }
  .view-transition__card {
    width: calc(100vw - 24px);
    border-radius: 14px;
  }
  .view-transition__truck {
    width: 68px;
    bottom: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
