:root {
  --ink: #0a1628;
  --forest: #0b2a5c;
  --forest-deep: #071a3a;
  --copper: #1565c8;
  --copper-deep: #0d47a1;
  --gold: #d4a017;
  --parchment: #f3f6fb;
  --paper: #ffffff;
  --mist: #e3eaf4;
  --line: #c5d0e0;
  --muted: #5b6b82;
  --ok: #2f6b4f;
  --warn: #b7791f;
  --alert: #9b3a2f;
  --shadow: 0 18px 40px rgba(7, 26, 58, 0.14);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Figtree", "Noto Naskh Arabic", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--parchment);
  min-height: 100vh;
}

img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.skip { position: absolute; left: -999px; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 6vw;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.brand img { height: 52px; width: auto; max-width: 160px; object-fit: contain; }
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--muted);
}
.nav a.is-active, .nav a:hover { color: var(--forest); }
.nav-cta {
  background: var(--forest);
  color: var(--paper) !important;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
}

.hero-atlas {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  padding: 4.5rem 6vw 3rem;
  align-items: center;
}
.kicker {
  color: var(--copper-deep);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
}
h1, h2, h3 { font-family: var(--serif); letter-spacing: -0.03em; margin: 0.3rem 0 0.8rem; }
h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: 1.05; font-weight: 500; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 38rem; line-height: 1.6; }
.hero-actions { display: flex; gap: 0.8rem; margin-top: 1.6rem; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  text-decoration: none;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
}
.btn-copper { background: var(--copper); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-forest { background: var(--forest); color: var(--gold); }
.btn-wide { width: 100%; }

.atlas-card {
  background: var(--forest-deep);
  color: var(--parchment);
  border-radius: 28px;
  min-height: 360px;
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.atlas-card svg { width: 100%; height: 280px; }
.atlas-chip {
  position: absolute;
  background: rgba(243, 236, 225, 0.12);
  border: 1px solid rgba(231, 194, 122, 0.35);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
}
.atlas-chip b { color: var(--gold); }

.band {
  padding: 3rem 6vw;
}
.band-forest { background: var(--forest); color: var(--parchment); }
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--gold);
}
.grid-3, .grid-2 { display: grid; gap: 1.2rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.3rem;
}
.card h3 { font-size: 1.3rem; }
.muted { color: var(--muted); }
.site-footer {
  padding: 2rem 6vw;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}

.track-form, .stack-form {
  display: flex;
  gap: 0.6rem;
  background: var(--paper);
  padding: 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  max-width: 34rem;
}
.track-form input, .stack-form input, .field input, .field select, .field textarea {
  border: 0;
  background: transparent;
  padding: 0.7rem 0.9rem;
  width: 100%;
  outline: none;
}
.field { display: grid; gap: 0.35rem; margin-bottom: 0.9rem; }
.field label { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.field textarea { min-height: 120px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

.timeline { border-left: 2px solid var(--mist); margin-left: 0.5rem; padding-left: 1.1rem; }
.timeline li { list-style: none; margin-bottom: 1rem; }
.timeline time { display: block; font-size: 0.8rem; color: var(--muted); }

.flash {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}
.flash-ok { background: #e4f0e8; color: var(--ok); }
.flash-error { background: #f7e4e1; color: var(--alert); }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}
.auth-art {
  background: var(--forest-deep);
  color: var(--parchment);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--parchment);
}
.auth-box { width: min(420px, 100%); }
.demo-cred {
  background: var(--mist);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.desk-body { background: #ece4d6; }
.command {
  background: var(--forest-deep);
  color: var(--parchment);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.4rem;
  gap: 1rem;
}
.command nav { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.command a, .command button.linkish {
  color: #cfc4b2;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}
.command a.is-active, .command a:hover { background: rgba(231, 194, 122, 0.14); color: var(--gold); }
.desk-main { padding: 1.4rem; max-width: 1200px; margin: 0 auto; }
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin-bottom: 1.2rem; }
.metric {
  background: var(--paper);
  border-radius: 18px;
  padding: 1rem;
  border-top: 4px solid var(--copper);
}
.metric b { font-family: var(--serif); font-size: 1.8rem; display: block; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.7rem 0.55rem; border-bottom: 1px solid var(--mist); font-size: 0.94rem; }
th { color: var(--muted); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.pill {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--mist);
}
.pill-in_transit, .pill-sent { background: #f3dfc0; color: var(--copper-deep); }
.pill-delivered { background: #dcecdc; color: var(--ok); }
.pill-cancelled { background: #f0d6d3; color: var(--alert); }
.pill-pending, .pill-waiting, .pill-received { background: #d9e4dc; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}
.filters { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters a {
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.85rem;
}
.stub {
  border: 1px dashed var(--copper);
  background: repeating-linear-gradient(135deg, #ffffff, #ffffff 12px, #eaf1fb 12px, #eaf1fb 24px);
  border-radius: 18px;
  padding: 1.4rem;
}
.waybill {
  font-family: ui-monospace, Consolas, monospace;
  letter-spacing: 0.04em;
}

.portal-shell { max-width: 960px; margin: 0 auto; padding: 1.4rem; }
.portal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.lang-switch { display: flex; gap: 0.35rem; }
.lang-switch a {
  text-decoration: none;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.82rem;
  background: var(--paper);
}
.lang-switch a.is-active { background: var(--forest); color: #fff; border-color: var(--forest); }
.functions-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.2rem;
  margin: 0 6vw 1.5rem;
}
.desk-main .functions-box, .portal-shell .functions-box, .auth-box .functions-box {
  margin: 0 0 1.2rem;
}
.functions-box h3 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.functions-box ul { margin: 0; padding-inline-start: 1.2rem; color: var(--muted); }
.functions-box li { margin: 0.25rem 0; }
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.qr-box {
  width: 140px; height: 140px;
  display: grid; place-items: center;
  border: 8px solid var(--forest);
  color: var(--forest);
  font-weight: 700;
  letter-spacing: 0.1em;
}

html[dir="rtl"] body { font-family: "Noto Naskh Arabic", "Figtree", sans-serif; }
html[dir="rtl"] .brand small { letter-spacing: 0.04em; }
html[dir="rtl"] th, html[dir="rtl"] td { text-align: right; }

@media (max-width: 900px) {
  .hero-atlas, .auth-shell, .grid-3, .grid-2, .stat-row, .metric-row, .form-grid, .download-grid {
    grid-template-columns: 1fr;
  }
  .site-header, .nav { flex-wrap: wrap; }
  .command { flex-direction: column; align-items: stretch; }
}
