:root {
    --brand-dark: #1a1a2e;
    --brand-accent: #6c63ff;
    --bg: #f2f0eb;
    --card: #ffffff;
    --border: #e4e1d8;
    --border-light: #f0ede6;
    --text-primary: #1a1917;
    --text-secondary: #78756e;
    --text-muted: #b0ada6;
    --green-bg: #eaf4de;
    --green-text: #2c5a08;
    --green-border: #c2dfa0;
    --amber-bg: #fdf0dc;
    --amber-text: #7a4908;
    --amber-border: #f0d4a0;
    --purple-bg: #eeedfe;
    --purple-text: #433bb3;
    --blue-bg: #e4effe;
    --blue-text: #1a4fa8;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
  }

  /* ─── MERCHANT HEADER ─── */
  .m-header {
    background: var(--brand-dark);
    padding: 0 32px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .m-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.2px;
    text-decoration: none;
  }
  .m-logo-mark {
    width: 30px;
    height: 30px;
    background: var(--brand-accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
  }
  .m-powered {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.2px;
  }

  /* ─── HERO / LOOKUP ─── */
  .hero {
    background: var(--brand-dark);
    padding: 52px 32px 68px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(108,99,255,0.18) 0%, transparent 70%);
    pointer-events: none;
  }
  .hero-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 12px;
  }
  .hero-title {
    font-family: var(--font-display);
    font-size: 38px;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 10px;
  }
  .hero-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 32px;
    line-height: 1.6;
  }

  /* ─── LOOKUP CARD ─── */
  .lookup-card {
    background: rgba(255,255,255,0.06);
    border: 0.5px solid rgba(255,255,255,0.13);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 540px;
    margin: 0 auto;
    text-align: left;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
  }
  .lookup-powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 16px;
    color: rgba(255,255,255,0.38);
    font-size: 13px;
    letter-spacing: 0.2px;
    position: relative;
    z-index: 1;
  }
  .lookup-powered img {
    height: 22px;
    width: auto;
    max-width: 112px;
    object-fit: contain;
    opacity: 0.72;
    filter: brightness(0) invert(1);
  }
  .lookup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }
  .lf label {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.42);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
  }
  .lf input {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 0.5px solid rgba(255,255,255,0.14);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: #fff;
    font-size: 14px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.15s;
  }
  .lf input:focus { border-color: rgba(108,99,255,0.6); }
  .lf input::placeholder { color: rgba(255,255,255,0.25); }
  .otp-note {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    margin-bottom: 16px;
  }
  .lookup-btn {
    width: 100%;
    background: var(--brand-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.15s, transform 0.1s;
    letter-spacing: -0.1px;
  }
  .lookup-btn:hover { opacity: 0.9; transform: translateY(-1px); }
  .lookup-btn:active { transform: translateY(0); }

  /* ─── RESULTS WRAP ─── */
  .results {
    max-width: 720px;
    margin: -32px auto 0;
    padding: 0 20px 60px;
    position: relative;
    z-index: 2;
    scroll-margin-top: 76px;
  }

  /* ─── ORDER HERO CARD ─── */
  .order-hero {
    background: var(--card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-card);
  }
  .tracking-skeleton { animation: fadeUp 0.28s ease both; }
  .tracking-skeleton .skeleton-card,
  .tracking-skeleton .sk-package {
    pointer-events: none;
  }
  .sk-line,
  .sk-pill,
  .sk-circle,
  .sk-dot,
  .sk-thumb,
  .sk-tab {
    position: relative;
    overflow: hidden;
    background: #eee9df;
  }
  .sk-line::after,
  .sk-pill::after,
  .sk-circle::after,
  .sk-dot::after,
  .sk-thumb::after,
  .sk-tab::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.68), transparent);
    animation: skeletonShimmer 1.25s ease-in-out infinite;
  }
  .sk-block { min-width: 180px; }
  .sk-grow { flex: 1; }
  .sk-line { height: 12px; border-radius: 999px; }
  .sk-store { width: 112px; height: 10px; margin-bottom: 9px; }
  .sk-title { width: 210px; height: 27px; border-radius: 8px; margin-bottom: 9px; }
  .sk-date { width: 168px; height: 11px; }
  .sk-pills { display: flex; gap: 7px; align-items: center; }
  .sk-pill { width: 86px; height: 24px; border-radius: 999px; }
  .sk-pill-short { width: 62px; }
  .sk-status {
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 0.5px solid #e6e1d8;
    background: #f7f4ee;
  }
  .sk-circle { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; }
  .sk-status-title { width: 210px; height: 15px; margin-top: 4px; }
  .sk-status-sub { width: min(100%, 360px); height: 11px; margin-top: 9px; }
  .sk-tabs { pointer-events: none; }
  .sk-tab { width: 148px; height: 34px; border-radius: 999px; }
  .sk-tab-short { width: 176px; }
  .sk-package-title { width: 180px; height: 16px; }
  .sk-track { width: 118px; height: 28px; }
  .sk-timeline {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 12px;
    padding: 18px;
    border-top: 0.5px solid var(--border-light);
  }
  .sk-dot { width: 16px; height: 16px; border-radius: 50%; }
  .sk-timeline-line { width: 68%; height: 13px; margin-top: 2px; }
  .sk-timeline-line.short { width: 44%; }
  .sk-item { gap: 12px; }
  .sk-thumb { width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0; }
  .sk-item-title { width: min(100%, 230px); height: 14px; margin-bottom: 8px; }
  .sk-item-sub { width: 96px; height: 11px; }
  .sk-qty { width: 42px; height: 12px; }
  .sk-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .oh-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
  }
  .oh-store {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .oh-num {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1;
  }
  .oh-date { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
  .oh-pills { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
  .pill {
    font-size: 12px;
    padding: 4px 11px;
    border-radius: 20px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .pill-grey { background: #f0ede6; color: var(--text-secondary); }
  .pill-platform { background: var(--purple-bg); color: var(--purple-text); }

  /* ─── STATUS BANNER ─── */
  .status-banner {
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 0.5px solid;
  }
  .sb-transit { background: #e8f3fc; border-color: #aacfee; }
  .sb-delivered { background: var(--green-bg); border-color: var(--green-border); }
  .sb-returning { background: var(--amber-bg); border-color: var(--amber-border); }
  .sb-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
  }
  .sb-icon-transit { background: #c0dff5; }
  .sb-icon-delivered { background: #c5e39a; }
  .sb-icon-returning { background: #fce6c0; }
  .sb-body { flex: 1; }
  .sb-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 3px; letter-spacing: -0.2px; }
  .sb-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

  /* ─── TABS ─── */
  .tabs {
    display: flex;
    gap: 4px;
    background: var(--card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-card);
  }
  .tab {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    user-select: none;
    transition: all 0.15s;
    font-family: var(--font-body);
    font-weight: 400;
  }
  .tab.active { background: var(--brand-dark); color: #fff; font-weight: 500; }
  .tab:not(.active):hover { background: var(--border-light); }
  .tbadge {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    background: #f0ede6;
    color: var(--text-secondary);
    line-height: 1.6;
  }
  .tab.active .tbadge { background: rgba(255,255,255,0.16); color: rgba(255,255,255,0.85); }

  /* ─── PACKAGE CARD ─── */
  .pkg-card {
    background: var(--card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
  }
  .pkg-hdr {
    padding: 16px 22px;
    border-bottom: 0.5px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }
  .pkg-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
  }
  .pkg-title-sub { font-size: 12px; color: var(--text-muted); font-weight: 400; }
  .courier-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--blue-text);
    background: var(--blue-bg);
    border-radius: 7px;
    padding: 6px 11px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: var(--font-body);
    border: none;
  }
  .courier-btn:hover { opacity: 0.8; }

  /* ─── VERTICAL TIMELINE ─── */
  .vtl { padding: 18px 22px; border-bottom: 0.5px solid var(--border-light); }
  .vtl-inner { display: flex; flex-direction: column; gap: 0; }
  .vtl-row { display: flex; gap: 14px; }
  .vtl-spine { display: flex; flex-direction: column; align-items: center; width: 22px; flex-shrink: 0; }
  .vtl-dot {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
    z-index: 1;
    position: relative;
  }
  .vd-done { background: #c5e39a; color: #265308; }
  .vd-now { background: var(--brand-dark); color: #fff; }
  .vd-next { background: #f0ede6; color: var(--text-muted); border: 1.5px dashed #d0cdc4; }
  .vtl-line { width: 1.5px; flex: 1; min-height: 16px; margin: 3px 0; }
  .vl-done { background: #a8d876; }
  .vl-pending { background: #dddbd3; }
  .vtl-content { flex: 1; padding-bottom: 20px; padding-top: 1px; }
  .vtl-row:last-child .vtl-content { padding-bottom: 0; }
  .vtl-label { font-size: 13px; font-weight: 500; color: var(--text-primary); line-height: 1.35; }
  .vtl-label.muted { color: var(--text-muted); font-weight: 400; }
  .vtl-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.5; }
  .vtl-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

  /* ─── LINE ITEMS ─── */
  .pkg-items {}
  .pkg-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 22px;
    border-top: 0.5px solid var(--border-light);
    transition: background 0.12s;
  }
  .pkg-item:hover { background: #fafaf7; }
  .pi-thumb {
    width: 50px; height: 50px;
    border-radius: 10px;
    background: #f0ede6;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
  }
  .pi-info { flex: 1; min-width: 0; }
  .pi-name { font-size: 13px; font-weight: 500; color: var(--text-primary); line-height: 1.3; }
  .pi-variant { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
  .pi-tags { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
  .pi-tag {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
  }
  .pt-ret { background: var(--amber-bg); color: var(--amber-text); }
  .pt-exc { background: var(--purple-bg); color: var(--purple-text); }
  .pt-ok { background: var(--green-bg); color: var(--green-text); }
  .pi-right { text-align: right; flex-shrink: 0; }
  .pi-price { font-size: 13px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.2px; }
  .pi-qty { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

  /* ─── RETURN / EXCHANGE CARDS ─── */
  .rex-card {
    background: var(--card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
  }
  .rex-hdr {
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 0.5px solid var(--border-light);
  }
  .rex-hdr-ret { background: #fffbf5; border-bottom-color: #f0e0c0; }
  .rex-hdr-exc { background: #f9f8ff; border-bottom-color: #dddafa; }
  .rex-id-wrap { display: flex; align-items: center; gap: 11px; }
  .rex-ico {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
  }
  .rico-ret { background: var(--amber-bg); color: var(--amber-text); }
  .rico-exc { background: var(--purple-bg); color: var(--purple-text); }
  .rex-title { font-size: 14px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.2px; }
  .rex-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
  .spill {
    font-size: 11px;
    padding: 5px 11px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.1px;
  }
  .sp-amber { background: var(--amber-bg); color: var(--amber-text); }
  .sp-purple { background: var(--purple-bg); color: var(--purple-text); }
  .sp-green { background: var(--green-bg); color: var(--green-text); }

  .rex-body { padding: 18px 22px; }
  .meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 0.5px solid var(--border-light);
  }
  .mf label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
  }
  .mf .mv {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.4;
  }
  .mv a {
    color: var(--blue-text);
    text-decoration: none;
    font-weight: 400;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .mv a:hover { text-decoration: underline; }

  .section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-muted);
    margin-bottom: 12px;
  }

  .ri-rows {}
  .ri-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 0.5px solid var(--border-light);
  }
  .ri-thumb {
    width: 38px; height: 38px;
    border-radius: 8px;
    background: #f0ede6;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
  }
  .ri-info { flex: 1; }
  .ri-name { font-size: 12px; font-weight: 500; color: var(--text-primary); line-height: 1.3; }
  .ri-reason { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
  .ri-amt { font-size: 13px; font-weight: 600; color: var(--green-text); white-space: nowrap; letter-spacing: -0.2px; }

  /* ─── EXCHANGE SWAP ─── */
  .exc-swap {
    border-top: 0.5px solid #dddafa;
    background: #f6f5ff;
    padding: 14px 22px 16px;
  }
  .exc-swap-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #8078dd;
    margin-bottom: 10px;
  }
  .exc-swap-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .ec {
    font-size: 13px;
    font-weight: 500;
    padding: 6px 13px;
    border-radius: 8px;
  }
  .ec-from { background: var(--amber-bg); color: var(--amber-text); }
  .ec-arr { color: var(--text-muted); font-size: 18px; line-height: 1; }
  .ec-to { background: var(--green-bg); color: var(--green-text); }

  /* ─── PANELS ─── */
  .panel { display: none; }
  .panel.active { display: block; }

  /* ─── RESPONSIVE ─── */
  @media (max-width: 600px) {
    .m-header { padding: 0 18px; }
    .hero { padding: 40px 18px 58px; }
    .hero-title { font-size: 28px; }
    .lookup-grid { grid-template-columns: 1fr; }
    .results { padding: 0 14px 48px; }
    .oh-num { font-size: 22px; }
    .meta-grid { grid-template-columns: 1fr; gap: 10px; }
    .pkg-hdr { gap: 8px; }
    .vtl { padding: 14px 16px; }
    .pkg-item { padding: 12px 16px; }
    .rex-body { padding: 14px 16px; }
    .rex-hdr { padding: 13px 16px; }
  }

  /* ─── ANIMATIONS ─── */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes skeletonShimmer {
    100% { transform: translateX(100%); }
  }
  .order-hero { animation: fadeUp 0.4s ease both; }
  .tabs { animation: fadeUp 0.4s 0.05s ease both; }
  .pkg-card, .rex-card { animation: fadeUp 0.35s ease both; }
  .pkg-card:nth-child(2) { animation-delay: 0.07s; }
.lookup-err{color:#fecaca;font-size:13px;margin:10px 0 0;text-align:left;}
.results[hidden]{display:none !important;}
.lookup-btn:disabled{opacity:0.55;cursor:not-allowed;}
.saara-tracking-embed{font-family:var(--font-body);background:var(--bg);color:var(--text-primary);border-radius:12px;overflow:hidden;}
