:root {
  --primary: #0f766e;
  --primary-700: #0b5f59;
  --primary-900: #083d3a;
  --primary-50: #e7f5f3;
  --primary-100: #cdebe7;
  --accent: #f59e0b;
  --accent-50: #fff7e6;
  --danger: #dc2626;
  --bg: #f3f6f6;
  --surface: #ffffff;
  --text: #0f1f1d;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e3e9ea;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 31, 29, .04), 0 6px 20px rgba(15, 31, 29, .06);
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  font-family: var(--font);
  background: #dbe5e4;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------- Device frame ---------- */
.device {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  overflow-x: clip;
}
@media (min-width: 480px) {
  body { padding: 24px 0; }
  .device {
    min-height: calc(100dvh - 48px);
    border-radius: 34px;
    box-shadow: 0 30px 80px rgba(15, 31, 29, .18), 0 0 0 10px #0f1f1d;
    overflow: clip;
  }
}

.screen { min-height: 100dvh; display: flex; flex-direction: column; }
@media (min-width: 480px) { .screen { min-height: calc(100dvh - 48px); } }
.content { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.muted { color: var(--muted); }
.sm { font-size: 13px; }
.center { text-align: center; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  height: 58px; padding: 0 8px;
  background: rgba(243, 246, 246, .85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.topbar h1 { font-size: 17px; font-weight: 700; text-align: center; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center; color: var(--text);
  transition: background .15s;
}
.icon-btn:hover { background: rgba(15, 31, 29, .06); }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 10px; color: var(--primary); }

/* ---------- Buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 48px; padding: 0 18px;
  border-radius: 14px; font-weight: 600; font-size: 15px;
  transition: transform .1s, background .15s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-lg { height: 56px; font-size: 16px; border-radius: 16px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(15, 118, 110, .28); }
.btn-primary:hover { background: var(--primary-700); }
.btn-accent { background: var(--accent); color: #3b2500; box-shadow: 0 8px 20px rgba(245, 158, 11, .28); }
.btn-outline { background: var(--surface); color: var(--primary); border: 1.5px solid var(--primary-100); }
.btn-ghost { color: var(--muted); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { color: var(--danger); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #3b2500; }

/* ---------- Welcome ---------- */
.welcome-hero {
  position: relative; overflow: hidden;
  padding: 56px 24px 64px; text-align: center; color: #fff;
  background: linear-gradient(160deg, #14b8a6 0%, var(--primary) 45%, var(--primary-900) 100%);
  border-radius: 0 0 36px 36px;
}
.welcome-hero::before, .welcome-hero::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .14);
}
.welcome-hero::before { width: 320px; height: 320px; top: -60px; left: -120px; }
.welcome-hero::after { width: 220px; height: 220px; bottom: -90px; right: -60px; }
.logo-mark {
  width: 88px; height: 88px; margin: 0 auto 18px;
  border-radius: 28px; display: grid; place-items: center;
  background: #fff; color: var(--primary);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
}
.logo-mark.sm { width: 60px; height: 60px; border-radius: 20px; margin-bottom: 14px; background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(15, 118, 110, .3); }
.brand { font-size: 46px; font-weight: 700; line-height: 1.2; }
.tagline { font-size: 17px; opacity: .9; margin-top: 4px; }
.hero-chips { display: flex; justify-content: center; gap: 8px; margin-top: 20px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-chips span { background: rgba(255, 255, 255, .16); padding: 5px 12px; border-radius: 999px; font-size: 13px; }

.features { list-style: none; padding: 0 16px; margin-top: -28px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.features li {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.features b { display: block; font-size: 15px; }
.features small { color: var(--muted); font-size: 13px; }
.f-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.welcome-actions { margin-top: auto; padding: 24px 16px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 6px; }

/* ---------- Auth ---------- */
.auth-head { text-align: center; padding: 8px 0 6px; }
.auth-head h2 { font-size: 24px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: #e5ecec; padding: 4px; border-radius: 14px; }
.tab { height: 42px; border-radius: 11px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 6px rgba(0, 0, 0, .06); }
.hint { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--muted); text-align: center; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field textarea {
  width: 100%; height: 50px; padding: 0 14px;
  border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s; font-size: 15px;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field small { font-size: 12px; }
.field.error input, .field.error textarea { border-color: var(--danger); box-shadow: 0 0 0 4px #fdecec; }
.group { background: var(--surface); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.group-title { font-size: 14px; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block; text-align: center; padding: 12px; border-radius: 14px;
  border: 1.5px solid var(--border); font-weight: 600; font-size: 14px; cursor: pointer; transition: all .15s;
}
.segmented input:checked + span { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.privacy-note { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--muted); background: var(--bg); padding: 10px 12px; border-radius: 12px; }
.privacy-note svg { flex: none; margin-top: 3px; }

.photo-picker { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0; }
.photo-circle {
  position: relative; width: 116px; height: 116px; border-radius: 36px; cursor: pointer;
  background: var(--primary-50); border: 2px dashed var(--primary-100);
  display: grid; place-items: center; color: var(--primary);
}
.photo-circle img { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; }
.photo-badge {
  position: absolute; bottom: -6px; left: -6px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center; border: 3px solid var(--bg);
}

/* ---------- Dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 16px 4px; }
.dash-head h1 { font-size: 24px; line-height: 1.3; }
.summary-card {
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-900) 100%);
  color: #fff; border-radius: 22px; padding: 18px 20px; box-shadow: 0 12px 30px rgba(15, 118, 110, .25);
}
.summary-num { font-size: 36px; font-weight: 700; display: block; line-height: 1.1; }
.summary-card .sm { opacity: .85; }
.plan-pill { display: inline-flex; align-items: center; gap: 5px; background: rgba(255, 255, 255, .16); color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.plan-pill.premium { background: var(--accent); color: #3b2500; }
.section-title { font-size: 16px; font-weight: 700; margin-top: 6px; display: flex; justify-content: space-between; align-items: center; }
.section-title small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.profile-list { display: flex; flex-direction: column; gap: 10px; }
.profile-card {
  width: 100%; display: flex; gap: 12px; align-items: center; text-align: start;
  background: var(--surface); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
  transition: transform .1s;
}
.profile-card:active { transform: scale(.985); }
.avatar { width: 62px; height: 62px; border-radius: 18px; object-fit: cover; flex: none; background: var(--primary-50); }
.avatar.xl { width: 116px; height: 116px; border-radius: 34px; border: 4px solid #fff; box-shadow: var(--shadow); }
.avatar.xxl { width: 148px; height: 148px; border-radius: 42px; border: 5px solid #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .12); margin: -88px auto 0; }
.pc-body { flex: 1; min-width: 0; }
.pc-top { display: flex; align-items: center; gap: 8px; }
.pc-top b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-notes {
  font-size: 12.5px; color: #b45309; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.pc-notes svg { vertical-align: -2px; margin-inline-end: 4px; }
.pc-arrow { color: #a3b1b3; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #eef2f3; color: #475569; white-space: nowrap; }
.chip.child { background: #e0f2fe; color: #0369a1; }
.chip.elderly { background: #fef3c7; color: #92400e; }
.chip.ok { background: #dcfce7; color: #166534; }
.empty { text-align: center; padding: 36px 20px; background: var(--surface); border-radius: var(--radius); color: var(--muted); }
.empty .f-ic { margin: 0 auto 10px; width: 56px; height: 56px; }

.fab {
  position: sticky; bottom: calc(82px + var(--safe-b)); z-index: 9;
  align-self: flex-end; margin: 0 16px 14px;
  display: inline-flex; align-items: center; gap: 8px; height: 54px; padding: 0 22px;
  border-radius: 999px; background: var(--primary); color: #fff; font-weight: 600;
  box-shadow: 0 12px 28px rgba(15, 118, 110, .4);
}
.bottom-nav {
  position: sticky; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 8px 8px calc(8px + var(--safe-b));
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.nav-item.active { color: var(--primary); }

/* ---------- Details ---------- */
.detail-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.detail-hero h2 { font-size: 22px; margin-top: 6px; }
.qr-card { background: var(--surface); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); text-align: center; }
.qr-box { display: inline-block; padding: 14px; border-radius: 20px; border: 1.5px solid var(--border); background: #fff; }
.qr-box canvas { width: 196px; height: 196px; display: block; }
.qr-caption { font-size: 13.5px; color: var(--muted); margin: 12px 0; }
.link-row { display: flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 12px; padding: 4px 12px 4px 4px; }
.link-row code { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--surface); border-radius: 16px; padding: 14px 4px; box-shadow: var(--shadow);
  font-size: 11.5px; font-weight: 600; line-height: 1.3;
}
.action svg { color: var(--primary); }
.info-card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.info-card h3 { font-size: 14px; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--text-2); }
.info-card p { font-size: 14.5px; line-height: 1.8; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-top: 1px solid var(--border); }
.kv:first-of-type { border-top: 0; }
.kv span { color: var(--muted); }

/* ---------- Public scan page ---------- */
.scan { padding-bottom: calc(24px + var(--safe-b)); }
.scan > * + * { margin-top: 14px; }
.preview-banner {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--text); color: #fff; font-size: 12.5px; padding: 8px 14px;
}
.preview-banner span { display: flex; align-items: center; gap: 6px; }
.preview-banner button { background: rgba(255, 255, 255, .16); color: #fff; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; }
.scan-top {
  background: linear-gradient(160deg, #14b8a6 0%, var(--primary) 50%, var(--primary-900) 100%);
  color: #fff; text-align: center; padding: 22px 22px 150px; border-radius: 0 0 32px 32px;
}
.scan > .scan-top { margin-top: 0; }
.scan-brand { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .16); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.scan-top h1 { font-size: 21px; margin-top: 14px; }
.scan-top p { opacity: .9; font-size: 14.5px; }
.scan-card { margin: -72px 16px 0; background: var(--surface); border-radius: 26px; padding: 20px 20px 18px; text-align: center; box-shadow: var(--shadow); position: relative; }
.scan > .scan-card { margin-top: -72px; }
.scan-card h2 { font-size: 26px; margin: 12px 0 6px; }
.notes-alert { margin-inline: 16px; background: var(--accent-50); border: 1px solid #fde3a7; border-radius: 20px; padding: 14px 16px; }
.notes-alert h3 { color: #92400e; font-size: 14px; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.notes-alert p { color: #4a3410; font-size: 15px; line-height: 1.85; }
.scan-actions { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.steps { margin-inline: 16px; background: var(--surface); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); }
.steps ol { list-style: none; counter-reset: s; }
.steps h3 { font-size: 14px; margin-bottom: 6px; }
.steps li { counter-increment: s; display: flex; gap: 10px; align-items: center; font-size: 14px; padding: 5px 0; }
.steps li::before { content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-50); color: var(--primary); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.privacy-foot { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); text-align: center; padding: 4px 24px; }
.invalid { text-align: center; padding: 80px 24px; }
.invalid .f-ic { margin: 0 auto 14px; width: 64px; height: 64px; }
.map-link { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: 14px; background: var(--primary-50); border-radius: 12px; padding: 10px; }

/* ---------- Pricing ---------- */
.pricing-head { text-align: center; }
.pricing-head h2 { font-size: 21px; }
.cycle { display: grid; grid-template-columns: 1fr 1fr; background: #e5ecec; padding: 4px; border-radius: 14px; }
.cycle em { font-style: normal; font-size: 11px; background: var(--accent); color: #3b2500; padding: 1px 7px; border-radius: 999px; margin-inline-start: 4px; }
.plan-card { position: relative; background: var(--surface); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); border: 2px solid transparent; }
.plan-card.current { border-color: var(--primary-100); }
.plan-card.premium { background: linear-gradient(150deg, #115e59 0%, var(--primary-900) 100%); color: #fff; }
.plan-card.premium.current { border-color: var(--accent); }
.plan-top { display: flex; align-items: center; gap: 8px; }
.plan-top h3 { font-size: 18px; display: flex; align-items: center; gap: 6px; }
.badge { font-size: 11px; font-weight: 600; background: var(--primary-50); color: var(--primary); padding: 2px 10px; border-radius: 999px; }
.premium .badge { background: rgba(255, 255, 255, .16); color: #fff; }
.ribbon { position: absolute; top: 18px; left: 18px; font-size: 11px; font-weight: 700; background: var(--accent); color: #3b2500; padding: 3px 10px; border-radius: 999px; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 12px; }
.price b { font-size: 38px; line-height: 1; }
.price span { font-size: 13px; opacity: .75; }
.feat { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.feat li { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.feat li svg { flex: none; color: var(--primary); }
.premium .feat li svg { color: var(--accent); }
.feat li.off { opacity: .45; }

/* ---------- Sheet, toast, misc ---------- */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(15, 31, 29, .45); opacity: 0; transition: opacity .2s;
}
.sheet-overlay.open { opacity: 1; }
.sheet {
  width: 100%; max-width: 420px; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(20px + var(--safe-b));
  display: flex; flex-direction: column; gap: 10px;
  transform: translateY(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.sheet-overlay.open .sheet { transform: none; }
.sheet-handle { width: 40px; height: 5px; border-radius: 99px; background: #d5dddd; margin: 0 auto 6px; }
.sheet-title { font-size: 18px; text-align: center; }
.sheet-icon { margin: 4px auto 0; }
.design-preview { width: 100%; border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.design-preview.sticker { max-width: 240px; margin: 0 auto; }

#toast {
  position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; white-space: nowrap; transition: all .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Print ---------- */
#print-area { display: none; }
@media print {
  @page { margin: 10mm; }
  body { background: #fff; padding: 0; }
  .device, #toast, .sheet-overlay { display: none !important; }
  #print-area { display: block; }
  .print-sheet { display: flex; flex-wrap: wrap; gap: 8mm; align-items: flex-start; }
  .print-sheet img { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-card { width: 85.6mm; }
  .print-sticker { width: 50mm; }
}

/* =========================================================
   أمان v2 additions
   ========================================================= */
.bottom-nav { grid-template-columns: repeat(5, 1fr); }
.nav-item { position: relative; }
.nav-dot { position: absolute; top: 2px; left: calc(50% - 18px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; }
.chip.lost { background: #fee2e2; color: #b91c1c; }
.chip.face { background: #ede9fe; color: #6d28d9; }

/* Lost mode */
.lost-card { border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; align-items: center; background: var(--surface); box-shadow: var(--shadow); }
.lost-card.on { background: #fef2f2; border: 1.5px solid #fecaca; }
.lost-card .f-ic { background: #fee2e2; color: var(--danger); }
.lost-card div { flex: 1; min-width: 0; }
.lost-card b { display: block; font-size: 15px; }
.lost-card small { color: var(--muted); font-size: 12.5px; display: block; line-height: 1.6; }
.switch { position: relative; flex: none; width: 52px; height: 30px; border-radius: 99px; background: #cbd5e1; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch.on { background: var(--danger); }
.switch.on::after { transform: translateX(-22px); }
.lost-banner { margin-inline: 16px; background: var(--danger); color: #fff; border-radius: 16px; padding: 12px 14px; display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }

/* Tags list */
.tag-list { display: flex; flex-direction: column; }
.tag-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.tag-row:first-of-type { border-top: 0; }
.tag-row .f-ic { width: 38px; height: 38px; border-radius: 12px; }
.tag-row div { flex: 1; min-width: 0; }
.tag-row b { font-size: 14px; display: block; }
.tag-row code { font-size: 11.5px; color: var(--muted); }
.tag-row.off { opacity: .5; }
.mini-btn { font-size: 12.5px; font-weight: 600; color: var(--primary); background: var(--primary-50); padding: 5px 10px; border-radius: 10px; white-space: nowrap; }
.mini-btn.danger { color: var(--danger); background: #fef2f2; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-head h3 { margin: 0; }
.qr-box img { width: 196px; height: 196px; display: block; }

/* Face */
.face-meter { display: flex; gap: 4px; margin: 8px 0; }
.face-meter i { flex: 1; height: 6px; border-radius: 99px; background: var(--border); }
.face-meter i.on { background: #7c3aed; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); background: var(--bg); padding: 12px; border-radius: 12px; cursor: pointer; }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.progress-note { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13.5px; color: var(--muted); padding: 8px; }

.find-hero { text-align: center; padding: 8px 8px 0; }
.find-hero .f-ic { width: 72px; height: 72px; border-radius: 24px; margin: 0 auto 10px; }
.find-hero h2 { font-size: 21px; }
.find-preview { width: 100%; max-height: 300px; object-fit: contain; border-radius: 18px; background: #0f1f1d; }
.result-card { background: var(--surface); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }

/* Alerts */
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item { display: flex; gap: 12px; background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.alert-item.unread { border-inline-start: 4px solid var(--accent); }
.alert-item .f-ic { width: 40px; height: 40px; border-radius: 12px; }
.alert-item .f-ic.red { background: #fee2e2; color: var(--danger); }
.alert-item .f-ic.purple { background: #ede9fe; color: #6d28d9; }
.alert-item div { flex: 1; min-width: 0; }
.alert-item b { font-size: 14.5px; display: block; }
.alert-item p { font-size: 13.5px; color: var(--text-2); }
.alert-item small { color: var(--muted); font-size: 12px; }
.alert-item a { color: var(--primary); font-weight: 600; font-size: 13px; }
.field select { width: 100%; height: 50px; padding: 0 12px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); font: inherit; }
.row-check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.row-check input { width: 18px; height: 18px; accent-color: var(--primary); }

/* =========================================================
   Pets & cars
   ========================================================= */
.chip.pet { background: #fce7f3; color: #9d174d; }
.chip.car { background: #e2e8f0; color: #334155; }
.chip.item { background: #ede9fe; color: #5b21b6; }
.chip.plate { background: #fff; color: #0f1f1d; border: 1.5px solid #0f1f1d; font-weight: 700; letter-spacing: .5px; }
.design-preview.collar { max-width: 220px; margin: 0 auto; border-radius: 50%; }
.design-preview.windshield { max-width: 260px; margin: 0 auto; }
.filter-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filter-tabs button { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--border); font-size: 13px; font-weight: 600; color: var(--muted); }
.filter-tabs button.active { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.filter-tabs i { font-style: normal; font-size: 11px; opacity: .7; }
.type-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.type-grid input { position: absolute; opacity: 0; pointer-events: none; }
.type-grid span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 1.5px solid var(--border); font-size: 11.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.type-grid span b { font-size: 22px; line-height: 1.2; }
.type-grid input:checked + span { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.field select { appearance: auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plate-input input { font-size: 20px !important; font-weight: 700; letter-spacing: 1px; text-align: center !important; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery .slot { position: relative; aspect-ratio: 1; border-radius: 14px; border: 2px dashed var(--primary-100); background: var(--primary-50); display: grid; place-items: center; color: var(--primary); cursor: pointer; overflow: hidden; }
.gallery .slot img { width: 100%; height: 100%; object-fit: cover; }
.gallery .slot .rm { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(15,31,29,.7); color: #fff; display: grid; place-items: center; }
.gallery-view { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.gallery-view img { flex: none; width: 120px; height: 120px; border-radius: 14px; object-fit: cover; }
.scan .gallery-view { padding: 0 16px; }
.reason-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reason-grid button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--border); font-size: 13px; font-weight: 600; line-height: 1.4; }
.reason-grid button b { font-size: 24px; }
.reason-grid button.on { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.scan .reason-grid { padding: 0 16px; }
.find-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.find-tabs button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--border); font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.find-tabs button.active { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.car-hero { background: linear-gradient(160deg, #475569 0%, #1e293b 100%); }
.pet-hero { background: linear-gradient(160deg, #f472b6 0%, #be185d 55%, #831843 100%); }
.item-hero { background: linear-gradient(160deg, #8b5cf6 0%, #6d28d9 55%, #4c1d95 100%); }
.reward-banner { margin-inline: 16px; background: #fef3c7; color: #92400e; border: 1.5px solid #fcd34d; border-radius: 16px; padding: 12px 14px; display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }
.field-hint { display: block; margin-top: -6px; font-size: 12px; }
@media print {
  .print-collar { width: 30mm; border-radius: 50%; }
  .print-windshield { width: 100mm; }
}

/* =========================================================
   In-app scanner & automatic location
   ========================================================= */
.scanner { position: relative; width: 100%; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: #0f1f1d; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.9); border-radius: 20px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.auto-loc { margin-inline: 16px; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--primary-50); color: var(--primary-900); border: 1.5px solid var(--primary-100); }
.auto-loc div { flex: 1; min-width: 0; }
.auto-loc b { display: block; font-size: 14px; }
.auto-loc small { display: block; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.auto-loc.ok { background: #ecfdf5; border-color: #bbf7d0; color: #166534; }
.auto-loc.off { background: var(--accent-50); border-color: #fde3a7; color: #92400e; }
.auto-loc > svg { flex: none; }

/* "Get the app" bar pinned to the top of every page (like Facebook / Instagram) */
:root { --banner-h: 0px; }
body.has-banner { --banner-h: 60px; }
.app-banner {
  position: sticky; top: 0; z-index: 40;
  height: var(--banner-h); display: flex; align-items: center; gap: 10px;
  padding: 0 max(12px, calc((100% - 720px) / 2));
  background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(15, 31, 29, .06);
}
.app-banner img { width: 40px; height: 40px; border-radius: 11px; flex: none; }
.ab-text { flex: 1; min-width: 0; }
.ab-text b { display: block; font-size: 15px; line-height: 1.3; }
.ab-text small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-get {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; font-weight: 600; font-size: 13.5px;
  padding: 8px 16px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 6px 14px rgba(15, 118, 110, .25);
}
.ab-get:hover { background: var(--primary-700); }
.ab-close { flex: none; color: var(--muted); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.ab-close:hover { background: var(--bg); }
/* sticky headers inside pages sit below the bar instead of under it */
.topbar, .preview-banner { top: var(--banner-h); }
@media (min-width: 480px) {
  body.has-banner { padding-top: 0; }
  body.has-banner .device { margin-top: 24px; }
}

/* =========================================================
   Admin panel (wide layout)
   ========================================================= */
body.wide .device { max-width: 1040px; }
@media (min-width: 480px) { body.wide .device { border-radius: 24px; box-shadow: 0 30px 80px rgba(15, 31, 29, .12); } }
.admin { padding: 20px; gap: 14px; display: flex; flex-direction: column; }
.admin-head { display: flex; align-items: center; justify-content: space-between; }
.admin-head b { display: block; font-size: 22px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; line-height: 1.2; color: var(--primary); }
.stat small { color: var(--muted); font-size: 12.5px; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.admin-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--muted); }
.admin-tabs button.active { background: var(--primary-50); color: var(--primary); }
.admin-body { display: flex; flex-direction: column; gap: 12px; }
.admin-card { background: var(--surface); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.ac-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ac-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ac-grid p { font-size: 14px; line-height: 1.8; }
.ac-items { list-style: none; font-size: 14px; line-height: 1.9; }
.ac-actions { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.pf-img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: start; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 6px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); }

/* ---------- Privacy, terms, support, delete account ---------- */
.legal { line-height: 1.9; }
.legal h2 { font-size: 17px; margin: 18px 0 4px; color: var(--primary); }
.legal h3 { font-size: 15px; margin: 10px 0 2px; }
.legal p, .legal li { font-size: 14.5px; color: var(--text-2); }
.legal ul, .legal-list { padding-inline-start: 20px; display: grid; gap: 4px; }
.legal a { color: var(--primary); font-weight: 600; }
.legal-warn { display: flex; gap: 8px; align-items: flex-start; background: #fff7ed; color: #9a3412; border-radius: 14px; padding: 12px; font-size: 14px; }
.legal-warn svg { flex: none; margin-top: 5px; }
.legal-links { text-align: center; font-size: 12.5px; color: var(--muted); padding: 16px 16px 24px; }
.legal-links a { color: var(--muted); text-decoration: underline; }
.faq { background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.faq summary { font-weight: 700; cursor: pointer; font-size: 14.5px; }
.faq p { margin-top: 6px; }
.link-btn { background: none; border: 0; color: var(--primary); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; align-self: flex-start; padding: 0; }
.alert-item .alert-more { flex: none; align-self: flex-start; color: var(--muted); font-size: 20px; line-height: 1; }

/* ---------- Left-to-right languages (English, French) ---------- */
/* arrows are drawn for right-to-left; mirror them */
[dir="ltr"] .pc-arrow svg, [dir="ltr"] .icon-btn.back svg { transform: scaleX(-1); }
[dir="ltr"] .switch::after { right: auto; left: 3px; }
[dir="ltr"] .switch.on::after { transform: translateX(22px); }
[dir="ltr"] .ribbon, [dir="ltr"] .gallery .slot .rm { left: auto; right: 4px; }
[dir="ltr"] .ribbon { right: 18px; }
/* the Arabic font has Latin letters too; Urdu reads better a little larger */
[lang="ur"] body { font-size: 1.04em; line-height: 1.8; }
.lang-pick { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 6px 8px; border-radius: 10px; }
.lang-pick:hover { background: rgba(0,0,0,.05); }

/* =========================================================
   Shipments
   ========================================================= */
.chip.ship-created { background: #e0f2fe; color: #0369a1; }
.chip.ship-way { background: #fef3c7; color: #92400e; }
.chip.ship-partial { background: #ede9fe; color: #5b21b6; }
.chip.ship-done { background: #dcfce7; color: #166534; }
.chip.fragile { background: #fee2e2; color: #b91c1c; }
.f-ic.green { background: #dcfce7; color: #16a34a; }
.alert-item[data-go] { cursor: pointer; }
.nav-dot.static { position: static; flex: none; }

.ship-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ship-stats div { background: linear-gradient(160deg, #f59e0b, #ea580c); color: #fff; border-radius: 18px; padding: 12px 8px; text-align: center; box-shadow: 0 8px 20px rgba(234, 88, 12, .2); }
.ship-stats div.ok { background: linear-gradient(160deg, #22c55e, #15803d); box-shadow: 0 8px 20px rgba(21, 128, 61, .2); }
.ship-stats div:last-child { background: var(--surface); color: var(--text-2); box-shadow: var(--shadow); }
.ship-stats div.bad { background: linear-gradient(160deg, #ef4444, #b91c1c); color: #fff; }
.ship-stats b { display: block; font-size: 26px; line-height: 1.2; }
.ship-stats span { font-size: 12.5px; opacity: .92; }

.ship-list { display: flex; flex-direction: column; gap: 10px; }
.ship-card { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: start; background: var(--surface); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); border: 1.5px solid transparent; transition: transform .12s; }
.ship-card:active { transform: scale(.985); }
.ship-card.late { border-color: #fecaca; }
.sc-top { display: flex; align-items: center; gap: 12px; }
.sc-ic { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; background: #e0f2fe; }
.sc-ic.way { background: #fef3c7; } .sc-ic.partial { background: #ede9fe; } .sc-ic.done { background: #dcfce7; }
.sc-main { flex: 1; min-width: 0; }
.sc-main b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-main small { color: var(--muted); font-size: 13px; }
.sc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sc-foot .chips { justify-content: flex-start; flex-wrap: wrap; gap: 4px; }
.sc-foot small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ship-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ship-bar i { height: 6px; border-radius: 99px; background: #e8eef0; }
.ship-bar.at-0 i:nth-child(1), .ship-bar.at-1 i:nth-child(-n+2) { background: linear-gradient(90deg, #f59e0b, #ea580c); }
.ship-bar.half i:nth-child(3) { background: linear-gradient(90deg, #e8eef0 50%, #8b5cf6 50%); }
[dir="ltr"] .ship-bar.half i:nth-child(3) { background: linear-gradient(90deg, #8b5cf6 50%, #e8eef0 50%); }
.ship-bar.at-2 i { background: linear-gradient(90deg, #22c55e, #15803d); }

.ship-empty { text-align: center; background: var(--surface); border-radius: 24px; padding: 26px 18px 18px; box-shadow: var(--shadow); }
.se-art { position: relative; font-size: 56px; line-height: 1; width: 120px; margin: 0 auto 12px; }
.se-art span { position: absolute; font-size: 26px; }
.se-art span:first-of-type { inset-inline-start: -14px; bottom: -4px; }
.se-art span:last-of-type { inset-inline-end: -10px; top: -6px; }
.ship-empty > b { font-size: 18px; display: block; }
.se-how { list-style: none; text-align: start; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.se-how li { display: flex; gap: 12px; align-items: center; background: #fff8ef; border-radius: 16px; padding: 10px 12px; }
.se-how li > span { flex: none; width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; font-size: 20px; box-shadow: var(--shadow); }
.se-how b { display: block; font-size: 14px; }
.se-how small { color: var(--muted); font-size: 12.5px; }
.ship-fab { background: linear-gradient(160deg, #f59e0b, #ea580c); box-shadow: 0 10px 24px rgba(234, 88, 12, .35); }

.ship-form-hero { display: flex; gap: 12px; align-items: center; background: linear-gradient(160deg, #fff7e6, #ffedd5); border: 1px solid #fed7aa; border-radius: 18px; padding: 12px 14px; }
.ship-form-hero span { font-size: 34px; }
.ship-form-hero p { font-size: 13.5px; color: #7c2d12; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 50px; height: 50px; border-radius: 14px; background: var(--primary-50); color: var(--primary); font-size: 24px; font-weight: 700; }
.stepper input { flex: 1; text-align: center; font-size: 20px; font-weight: 700; height: 50px; border: 1.5px solid var(--border); border-radius: 14px; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.fragile-check { background: #fef2f2; border-radius: 14px; padding: 12px; color: #991b1b; font-weight: 600; }
.fragile-check input { accent-color: #dc2626; }

.ship-hero { text-align: center; color: #fff; border-radius: 26px; padding: 22px 16px 16px; background: linear-gradient(160deg, #0ea5e9 0%, #0369a1 100%); box-shadow: 0 12px 28px rgba(3, 105, 161, .25); }
.ship-hero.way { background: linear-gradient(160deg, #f59e0b 0%, #ea580c 60%, #9a3412 100%); box-shadow: 0 12px 28px rgba(234, 88, 12, .28); }
.ship-hero.partial { background: linear-gradient(160deg, #8b5cf6 0%, #6d28d9 55%, #4c1d95 100%); box-shadow: 0 12px 28px rgba(109, 40, 217, .25); }
.ship-hero.done { background: linear-gradient(160deg, #22c55e 0%, #15803d 60%, #14532d 100%); box-shadow: 0 12px 28px rgba(21, 128, 61, .28); }
.sh-ic { width: 70px; height: 70px; margin: 0 auto; border-radius: 22px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 38px; }
.ship-hero h2 { font-size: 21px; margin-top: 10px; }
.ship-hero > p { opacity: .92; font-size: 14px; }
.ship-hero .chips { margin-top: 8px; }
.ship-hero .chip { background: rgba(255, 255, 255, .92); }
.sh-due { display: inline-flex; gap: 4px; align-items: center; margin-top: 10px; font-size: 12.5px; background: rgba(0, 0, 0, .14); padding: 3px 12px; border-radius: 99px; }

.ship-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; position: relative; }
.ship-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12.5px; z-index: 1; }
.ship-steps li::before { content: ""; position: absolute; top: 15px; inset-inline-start: 50%; width: 100%; height: 3px; background: rgba(255, 255, 255, .3); z-index: -1; }
.ship-steps li:last-child::before { display: none; }
.ship-steps li.done::before { background: rgba(255, 255, 255, .95); }
.ship-steps .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: rgba(255, 255, 255, .25); color: #fff; border: 2px solid rgba(255, 255, 255, .5); }
.ship-steps li.done .dot { background: #fff; color: #15803d; border-color: #fff; }
.ship-steps li.now .dot { background: #fff; color: #ea580c; border-color: #fff; box-shadow: 0 0 0 6px rgba(255, 255, 255, .25); animation: ship-pulse 1.6s infinite; }
.ship-steps small { opacity: .85; font-size: 11px; }
@keyframes ship-pulse { 50% { box-shadow: 0 0 0 10px rgba(255, 255, 255, .08); } }
/* on a white card (the public page) */
.parcel-card .ship-steps { color: var(--text); }
.parcel-card .ship-steps li::before { background: #e8eef0; }
.parcel-card .ship-steps li.done::before { background: #22c55e; }
.parcel-card .ship-steps .dot { background: #f1f5f9; color: var(--muted); border-color: #e2e8f0; }
.parcel-card .ship-steps li.done .dot { background: #22c55e; color: #fff; border-color: #22c55e; }
.parcel-card .ship-steps li.now .dot { background: #f59e0b; color: #fff; border-color: #f59e0b; box-shadow: 0 0 0 6px #fef3c7; }
.parcel-card .ship-steps small { color: var(--muted); }

.pin-card { background: var(--surface); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); border: 1.5px dashed #fdba74; }
.pin-head { display: flex; gap: 10px; align-items: center; }
.pin-head > span { font-size: 28px; }
.pin-head b { display: block; font-size: 15px; }
.pin-head small { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.pin-digits { display: flex; justify-content: center; gap: 10px; margin: 14px 0; }
.pin-digits span { width: 58px; height: 68px; border-radius: 16px; background: linear-gradient(160deg, #fff7e6, #ffedd5); border: 1.5px solid #fed7aa; display: grid; place-items: center; font-size: 34px; font-weight: 700; color: #9a3412; }
.pin-actions { display: flex; flex-direction: column; gap: 8px; }
.proof-card { display: flex; gap: 12px; align-items: center; background: #ecfdf5; border: 1.5px solid #bbf7d0; border-radius: 20px; padding: 12px; }
.proof-card img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; }
.proof-card .pc-ic { font-size: 36px; width: 56px; text-align: center; }
.proof-card b { display: block; color: #166534; font-size: 16px; }
.proof-card small { color: #166534; font-size: 13px; }

.label-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 4px; }
.label-thumb { aspect-ratio: 2 / 3; border-radius: 12px; background: #f1f5f9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px; overflow: hidden; border: 1px solid var(--border); }
.label-thumb img { width: 100%; flex: 1; min-height: 0; object-fit: contain; }
.label-thumb i { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.design-preview.parcel { max-width: 250px; margin: 0 auto; }
.danger-text { color: var(--danger); }

.timeline { list-style: none; margin-top: 6px; }
.timeline li { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; top: 36px; bottom: 2px; inset-inline-start: 17px; width: 2px; background: #e8eef0; }
.tl-dot { flex: none; width: 36px; height: 36px; border-radius: 12px; background: #f1f5f9; display: grid; place-items: center; font-size: 17px; }
.timeline li.ship_delivered .tl-dot { background: #dcfce7; }
.timeline li.ship_late .tl-dot { background: #fee2e2; }
.timeline li.ship_check .tl-dot, .timeline li.ship_scan .tl-dot { background: #fef3c7; }
.timeline li > div { min-width: 0; padding-top: 6px; }
.timeline b { display: block; font-size: 14px; }
.timeline p { font-size: 13.5px; color: var(--text-2); }
.timeline a { font-size: 12.5px; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.timeline small { display: block; color: var(--muted); font-size: 12px; }

/* public parcel page */
.ship-top { background: linear-gradient(160deg, #f59e0b 0%, #ea580c 55%, #9a3412 100%); }
.ship-top.done { background: linear-gradient(160deg, #22c55e 0%, #15803d 60%, #14532d 100%); }
.parcel-card h2 { margin-top: 0; }
.parcel-badge { display: inline-block; background: #fff7e6; color: #9a3412; border: 1.5px solid #fed7aa; border-radius: 99px; padding: 3px 14px; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.fragile-banner { margin-inline: 16px; background: #dc2626; color: #fff; border-radius: 16px; padding: 12px 14px; display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 15px; }
.pin-input { height: 72px; border: 2px solid var(--border); border-radius: 18px; text-align: center; font-size: 38px; font-weight: 700; letter-spacing: 18px; padding-inline-start: 18px; background: #fffaf3; }
.pin-input:focus { outline: none; border-color: #f59e0b; box-shadow: 0 0 0 4px #fef3c7; }
.photo-pick { display: flex; align-items: center; gap: 8px; justify-content: center; border: 1.5px dashed var(--border); border-radius: 14px; padding: 12px; color: var(--text-2); font-size: 14px; cursor: pointer; }
.photo-pick img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.celebrate { margin: 76px 16px 0; text-align: center; background: var(--surface); border-radius: 28px; padding: 34px 20px 24px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.cel-ic { font-size: 70px; animation: cel-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.celebrate h1 { font-size: 24px; color: #15803d; margin-top: 6px; }
.celebrate p { color: var(--text-2); margin-top: 6px; }
.cel-confetti { display: flex; justify-content: center; gap: 10px; margin-top: 16px; font-size: 24px; }
.cel-confetti i { font-style: normal; animation: cel-float 2.4s ease-in-out infinite; }
.cel-confetti i:nth-child(2n) { animation-delay: .4s; }
.cel-confetti i:nth-child(3n) { animation-delay: .8s; }
@keyframes cel-pop { from { transform: scale(.2); opacity: 0; } }
@keyframes cel-float { 50% { transform: translateY(-10px) rotate(12deg); } }
@media print {
  .print-sheet.parcels { gap: 5mm; }
  .print-parcel { width: 90mm; }
}

/* ---------- Fixed customers (one label for every order) ---------- */
.cust-entry { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; background: linear-gradient(160deg, #ecfeff, #ccfbf1); border: 1px solid #99f6e4; border-radius: 18px; padding: 12px 14px; color: #134e4a; cursor: pointer; font: inherit; }
.cust-entry .ce-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-size: 24px; box-shadow: 0 4px 12px rgba(13, 148, 136, .15); }
.cust-entry div { flex: 1; min-width: 0; }
.cust-entry b { display: block; font-size: 15px; }
.cust-entry small { display: block; font-size: 12.5px; opacity: .85; line-height: 1.5; }
.cust-entry svg { flex: none; opacity: .6; }
.sc-ic.cust { background: #ccfbf1; }
.cust-card .sc-top svg { opacity: .45; flex: none; }
.ship-hero.cust { background: linear-gradient(160deg, #14b8a6 0%, #0f766e 60%, #134e4a 100%); box-shadow: 0 12px 28px rgba(15, 118, 110, .28); }
.cust-chip { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.cust-chip > span { font-size: 30px; }
.cust-chip small { display: block; color: var(--text-2); font-size: 12.5px; }
.cust-chip b { display: block; font-size: 17px; }
.dest-label { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; margin: 10px 0; }
.dest-label .label-thumb { width: 120px; aspect-ratio: 2 / 3; }
.dest-print { display: flex; flex-direction: column; gap: 8px; }
.dest-print .field { margin: 0; }
