/* =============================================================
   Suivi Colis - feuille de style unique (public + admin)
   ============================================================= */

@font-face {
  font-family: 'Manrope';
  src: url('/assets/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ink: #2f332e;
  --ink-2: #3f453f;
  --muted: #6a6a62;
  --soft: #73736a;
  --line: #e2e2d9;
  --paper: #f4f4ef;
  --card: #ffffff;
  --accent: #006b39;
  --accent-dark: #00542c;
  --accent-soft: #e9f3ec;
  --ok: #16713f;
  --ok-soft: #e7f2ea;
  --warn: #b45309;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(47, 51, 46, .06), 0 4px 12px rgba(47, 51, 46, .05);
  --shadow-md: 0 12px 34px rgba(47, 51, 46, .10);
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
img, svg { vertical-align: middle; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.ico { flex: 0 0 auto; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; }

/* ---------------- elements de base ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 6px 16px rgba(0, 107, 57, .22);
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
  font-weight: 600;
}
.btn-ghost:hover { background: #f7f7f2; border-color: #c3c3b8; color: var(--ink); }
.btn-dark { background: var(--ink); box-shadow: none; }
.btn-dark:hover { background: #3b4038; }
.btn-sm { padding: 9px 14px; font-size: 13.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.field { margin-bottom: 16px; }
.field label, .label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 107, 57, .12);
}
.textarea { min-height: 92px; resize: vertical; }
.hint { font-size: 12.5px; color: #6f6f66; margin-top: 6px; }
::placeholder { color: #7a7a70; opacity: 1; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.req { color: var(--accent); }

.flash {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.flash.ok { background: var(--ok-soft); color: #1d5c34; border-color: #c3ddcb; }
.flash.err { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.flash.info { background: #eef2ec; color: #2c4034; border-color: #d7e2d8; }

/* =============================================================
   PAGE PUBLIQUE
   ============================================================= */

body.pub {
  border-top: 4px solid var(--accent);
  background:
    radial-gradient(1100px 420px at 50% -160px, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #f7f7f2 0%, var(--paper) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.pub-top {
  padding: 22px 0 18px;
}
.pub-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brandline { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brandline .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--ink);
  box-shadow: 0 6px 14px rgba(47, 51, 46, .18);
}
.brandline b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.brandline span.tag { display: block; font-size: 11.5px; color: var(--soft); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.pub-top .mini-link { font-size: 13.5px; font-weight: 700; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.pub-top .mini-link:hover { color: var(--accent); }

.hero { padding: 54px 0 10px; text-align: center; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 99px;
  box-shadow: var(--shadow-sm);
}
.hero .eyebrow .dotlive { width: 7px; height: 7px; border-radius: 99px; background: var(--ok); box-shadow: 0 0 0 3px rgba(21, 128, 61, .16); }
.hero h1 { margin: 20px auto 14px; font-size: clamp(30px, 4.4vw, 50px); font-weight: 800; letter-spacing: -.035em; max-width: 15em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { color: var(--muted); font-size: 17px; max-width: 34em; margin: 0 auto; }

.search-card {
  margin: 30px auto 0;
  max-width: 660px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow-md);
}
.track-form { display: flex; gap: 10px; }
.track-form .input-icon { position: relative; flex: 1 1 auto; }
.track-form .input-icon svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--soft); }
.track-form input {
  width: 100%;
  padding: 15px 16px 15px 44px;
  border: 1px solid transparent;
  background: #f3f3ed;
  border-radius: 12px;
  font-size: 16px;
  letter-spacing: .02em;
  outline: none;
  transition: background .15s ease, border-color .15s ease;
}
.track-form input:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 107, 57, .12); }
.track-form button { padding: 0 26px; border-radius: 12px; white-space: nowrap; }
.search-note { margin: 12px 4px 2px; font-size: 12.5px; color: var(--soft); text-align: center; }

.pub-main { flex: 1 0 auto; padding-bottom: 40px; }

/* ---------------- carte resultat ---------------- */

.result { margin-top: 34px; animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.result-head .ref { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.result-head h2 { font-size: clamp(22px, 3vw, 30px); margin-top: 4px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 14px;
  border: 1px solid #cfe3d6;
}
.status-pill.is-done { background: var(--ok-soft); color: #1d5c34; border-color: #c3ddcb; }
.status-pill .pulse { width: 8px; height: 8px; border-radius: 99px; background: currentColor; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; } 50% { box-shadow: 0 0 0 5px rgba(214,80,30,0); opacity: .65; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }

.tl-card { padding: 26px 22px 18px; overflow: hidden; }
.tl-card .card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.tl-card .card-title h3 { font-size: 15px; letter-spacing: 0; }
.tl-card .pct { font-size: 13px; color: var(--muted); font-weight: 700; }

/* ---------------- timeline horizontale ---------------- */

.tl-h { position: relative; height: 142px; margin: 44px 4px 0; }
.tl-rail {
  position: absolute;
  left: 6%; right: 6%;
  top: 27px;
  height: 4px;
  border-radius: 99px;
  background: repeating-linear-gradient(90deg, #dcdcd2 0 12px, transparent 12px 20px);
}
.tl-fill { position: absolute; left: 0; top: 0; height: 4px; border-radius: 99px; background: linear-gradient(90deg, #3f9163, var(--accent)); transition: width 1.6s cubic-bezier(.2,.7,.2,1); }
.tl-truck {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  transition: left 1.7s cubic-bezier(.2,.7,.2,1);
  filter: drop-shadow(0 6px 10px rgba(47, 51, 46, .18));
  animation: bob 2.6s ease-in-out infinite;
  z-index: 2;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -3px); } }

.tl-steps { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.tl-step { position: absolute; top: 18px; transform: translateX(-50%); width: 118px; margin-left: 0; text-align: center; }
.tl-dot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  margin: 0 auto;
  border-radius: 99px;
  background: #fff;
  border: 2px solid #cfcfc4;
  color: #fff;
  z-index: 1;
}
.tl-step.is-done .tl-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 107, 57, .12); }
.tl-step.is-current .tl-dot { box-shadow: 0 0 0 6px rgba(0, 107, 57, .16); }
.tl-lbl { display: block; margin-top: 10px; font-size: 11.5px; font-weight: 700; color: var(--muted); line-height: 1.3; }
.tl-lbl em { display: block; font-style: normal; font-weight: 600; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.tl-lbl em.eta { color: #9aa5b4; font-weight: 600; }
.tl-step.is-done .tl-lbl { color: var(--ink); }
.tl-step.is-current .tl-lbl { color: var(--accent-dark); }

/* ---------------- timeline verticale ---------------- */

.tl-v { display: none; list-style: none; margin: 6px 0 0; padding: 0 0 0 26px; position: relative; }
.tl-v::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 16px; width: 2px; background: linear-gradient(180deg, var(--accent) 0%, #dcdcd2 60%); }
.v-step { position: relative; padding: 0 0 22px 6px; }
.v-step:last-child { padding-bottom: 0; }
.v-dot {
  position: absolute;
  left: -26px; top: 1px;
  width: 18px; height: 18px;
  border-radius: 99px;
  background: #fff;
  border: 2px solid #cfcfc4;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.v-step.is-done .v-dot { background: var(--accent); border-color: var(--accent); }
.v-step.is-current .v-dot { box-shadow: 0 0 0 5px rgba(0, 107, 57, .14); }
.v-label { font-weight: 800; font-size: 14.5px; color: #3f453f; }
.v-now { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); border: 1px solid #c6dfcf; color: #0a5230; border-radius: 99px; padding: 2px 9px 2px 3px; font-size: 10.5px; font-weight: 800; margin-left: 7px; vertical-align: middle; letter-spacing: .02em; }
.v-now svg { display: block; }
.v-step.is-done .v-label { color: var(--ink); }
.v-step.is-current .v-label { color: var(--accent-dark); }
.v-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.v-date { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 700; }

/* ---------------- infos commande ---------------- */

.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.meta-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.meta {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
}
.meta .k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); display: flex; align-items: center; gap: 6px; }
.meta .v { font-size: 16px; font-weight: 800; margin-top: 5px; }
.meta .v.mono { font-family: var(--mono); font-size: 15px; letter-spacing: .04em; word-break: break-all; }

.note-box { margin-top: 16px; display: flex; gap: 12px; padding: 15px 16px; border-radius: 13px; background: #fdf8ec; border: 1px solid #ead9b4; color: #78350f; font-size: 14px; }
.note-box .ico { color: #b45309; margin-top: 2px; }

.pub-foot { padding: 26px 0 34px; border-top: 1px solid var(--line); color: var(--soft); font-size: 12.5px; }
.pub-foot .wrap { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.pub-foot a { color: var(--muted); text-decoration: none; font-weight: 600; }
.pub-foot a:hover { color: var(--accent); }

.empty-state { text-align: center; padding: 46px 20px; }
.empty-state .big { width: 62px; height: 62px; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--accent); box-shadow: var(--shadow-sm); }
.empty-state h3 { margin-top: 14px; font-size: 19px; }
.empty-state p { color: var(--muted); font-size: 14.5px; margin-top: 6px; max-width: 34em; margin-inline: auto; }

/* =============================================================
   ADMINISTRATION
   ============================================================= */

body.admin { background: #f0f0ea; }

.shell { display: flex; min-height: 100vh; }

.side {
  width: 248px;
  flex: 0 0 248px;
  background: #23271f;
  color: #c3c3b8;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side .brandline { color: #fff; padding: 4px 8px 18px; }
.side .brandline .mark { background: var(--accent); box-shadow: none; }
.side .brandline span.tag { color: #9aa39a; }
.side .who { font-size: 12px; color: #9aa39a; padding: 0 9px 16px; word-break: break-word; }
.nav-label { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #8b948b; font-weight: 800; padding: 10px 9px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px;
  border-radius: 9px;
  color: #c3c3b8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(0, 107, 57, .16); color: #fff; }
.nav-item.active .ico { color: #7fd4a2; }
.side .spacer { flex: 1; }
.side .foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }

.main { flex: 1 1 auto; min-width: 0; padding: 30px 34px 60px; }
.main-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.main-head h1 { font-size: 26px; }
.main-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.main-wrap { max-width: 1080px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat .k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.stat .n { font-size: 27px; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; }
.stat .n small { font-size: 13px; font-weight: 700; color: var(--soft); letter-spacing: 0; }
.stat.accent .n { color: var(--accent); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 16px; }
.panel-body { padding: 20px; }
.panel-tools { display: flex; gap: 8px; align-items: center; }
.panel-tools .input { padding: 9px 12px; font-size: 13.5px; width: 220px; }

.o-list { display: flex; flex-direction: column; }
.o-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr .9fr .8fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #eeeee6;
  text-decoration: none;
  color: inherit;
  transition: background .12s ease;
}
.o-row:last-child { border-bottom: 0; }
.o-row:hover { background: #f9f9f4; }
.o-row .ref { font-weight: 800; font-size: 14.5px; }
.o-row .ref small { display: block; font-weight: 600; color: var(--soft); font-size: 11.5px; margin-top: 2px; }
.o-row .trk { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); word-break: break-all; }
.o-row .cust { font-size: 13px; color: var(--muted); }
.o-row .cust b { display: block; color: var(--ink); font-size: 13.5px; }
.o-row .arrow { color: var(--soft); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; background: #eeeee6; color: var(--ink-2); white-space: nowrap; }
.chip.warm { background: var(--accent-soft); color: var(--accent-dark); }
.chip.ok { background: var(--ok-soft); color: #1d5c34; }
.chip.idle { background: #eeeee6; color: var(--muted); }
.chip.warn { background: #fef3c7; color: #92400e; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }

.steps-editor { display: flex; flex-direction: column; gap: 8px; }
.step-line {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafaf6;
}
.step-line.on { background: #fff; border-color: #cfe3d6; }
.step-line .box {
  width: 26px; height: 26px; border-radius: 8px;
  border: 1.5px solid #cfd8e3; background: #fff;
  display: flex; align-items: center; justify-content: center; color: #fff;
  cursor: pointer;
  transition: all .15s ease;
}
.step-line.on .box { background: var(--accent); border-color: var(--accent); }
.step-line .sl-label { font-weight: 700; font-size: 14px; }
.step-line .sl-desc { font-size: 12px; color: var(--soft); }
.steps-editor.compact .step-line { padding: 8px 11px; }
.steps-editor.compact .sl-desc { display: none; }
.steps-editor.compact .sl-label { font-size: 13.5px; }
.step-line input[type="datetime-local"] { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 12.5px; background: #fff; }
.step-line input[type="text"] { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 12.5px; background: #fff; }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.kv div.k { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--soft); font-weight: 800; }
.kv div.v { font-size: 14.5px; font-weight: 600; margin-top: -8px; word-break: break-word; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { padding: 9px 14px; font-size: 13.5px; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.tab.active { color: var(--accent-dark); border-bottom-color: var(--accent); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr); gap: 16px; align-items: start; }
.detail-grid > div > .card:first-child, .detail-grid > div > .panel:first-child { margin-top: 0; }

/* login */
body.login-page {
  min-height: 100vh;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 400px at 20% 0%, #33382f 0%, rgba(11,18,32,0) 60%),
    #23271f;
  padding: 24px;
}
.login-card { width: 100%; max-width: 404px; background: #fff; border-radius: 18px; padding: 30px 28px; box-shadow: 0 30px 80px rgba(2, 6, 23, .45); }
.login-card .mark { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent); }
.login-card h1 { font-size: 22px; margin-top: 16px; }
.login-card .sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.login-card form { margin-top: 22px; }
.login-help { margin-top: 18px; font-size: 12.5px; color: var(--soft); text-align: center; }

/* modale email */
.modal-back { position: fixed; inset: 0; background: rgba(47, 51, 46, .55); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal-back.show { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 720px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(2,6,23,.4); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15px; }
.modal-body { overflow: auto; padding: 0; background: #f0f0ea; }
.modal-body iframe { width: 100%; height: 62vh; border: 0; background: #f0f0ea; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); }

/* divers */
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.copy-btn { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 8px; padding: 6px 9px; font-size: 12px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .22s ease; z-index: 90; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 980px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .meta-grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .o-row { grid-template-columns: 1.2fr 1fr auto; }
  .o-row .cust, .o-row .trk { display: none; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .main { padding: 22px 18px 46px; }
}

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: 100%; flex: none; height: auto; position: relative; padding: 10px 12px 8px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; }
  .side .brandline { order: 1; padding: 0; flex: 1 1 auto; }
  .side .who, .nav-label, .side .spacer { display: none; }
  .side .foot { order: 2; border: 0; padding: 0; display: flex; gap: 2px; }
  .side .foot .nav-item span.txt { display: none; }
  .side > .nav-item { order: 3; flex: 0 0 auto; justify-content: center; padding: 9px 8px; font-size: 11.5px; gap: 4px; white-space: nowrap; }
  .side > .nav-item .ico { width: 17px; height: 17px; }
  .tl-h { display: none; }
  .tl-v { display: block; }
  .tl-card { padding: 20px 18px 22px; }
}

@media (max-width: 640px) {
  .hero { padding: 26px 0 4px; }
  .hero h1 { font-size: 30px; }
  .hero p.lead { font-size: 15.5px; }
  .track-form { flex-direction: column; }
  .track-form button { padding: 15px; }
  .search-card { padding: 8px; }
  .meta-grid, .meta-grid.cols-4 { grid-template-columns: 1fr; }
  .row-2, .form-grid, .kv { grid-template-columns: 1fr; }
  .result-head { align-items: flex-start; }
  .pub-top { padding: 16px 0; }
  .pub-top .mini-link span.txt { display: none; }
  .stat-row { gap: 10px; }
  .stat .n { font-size: 23px; }
  .o-row { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .o-row .chip-cell { grid-column: 1; grid-row: 2; }
  .o-row .arrow { display: none; }
  .hide-sm { display: none !important; }
  .panel-head { padding: 14px; }
  .panel-body { padding: 14px; }
  .panel-tools { width: 100%; flex-direction: column; align-items: stretch; }
  .panel-tools form { width: 100%; }
  .panel-tools .input { width: 100%; }
  .panel-tools .btn { white-space: nowrap; }
  .step-line { grid-template-columns: 26px 1fr; }
  .step-line .sl-right { grid-column: 2; }
  .main-head h1 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
