/* dakiya.pk · public tracking page (v2.9) */
:root {
    --navy: #13284A; --navy-2: #1B3762; --navy-3: #0D1D37;
    --orange: #F26A21; --orange-2: #FF8A47;
    --ink: #172033; --muted: #66718A; --line: #E4E8F0; --bg: #F4F6FA;
    --good: #1E9E63; --bad: #D64545; --warn: #E8A317;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Poppins, system-ui, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input { font: inherit; }

/* Top bar */
.tk-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 48px); background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 3; }
.tk-logo img { height: 44px; display: block; }
.tk-mini { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px; width: min(320px, 55vw); transition: border-color .2s, box-shadow .2s; }
.tk-mini:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242,106,33,.14); }
.tk-mini input { flex: 1; min-width: 0; border: 0; background: none; padding: 6px 12px; outline: none; font-size: 14px; }
.tk-mini button { border: 0; background: var(--navy); color: #fff; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px; transition: background .2s, transform .2s; }
.tk-mini button:hover { background: var(--orange); transform: translateX(2px); }

/* Hero */
.tk-hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1200px 500px at 85% 0%, var(--navy-2), var(--navy) 55%, var(--navy-3)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 4vw, 56px); align-items: center; padding: clamp(28px, 5vw, 64px) clamp(16px, 5vw, 72px) clamp(56px, 7vw, 96px); }
.tk-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.tk-hero > * { position: relative; }
.tk-status { animation: tk-up .7s cubic-bezier(.2,.8,.2,1) both; }
.tk-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tk-meta span { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); }
.tk-hero h1 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08; margin: 0 0 10px; font-weight: 800; letter-spacing: -.02em; }
.tk-sub { margin: 0; font-size: clamp(15px, 1.4vw, 17px); color: rgba(255,255,255,.78); max-width: 34em; }
.tk-eta { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 8px 14px; border-radius: 12px; background: rgba(242,106,33,.16); color: #FFD3BA; font-weight: 600; font-size: 14.5px; }
.tk-eta span { font-size: 16px; }

/* Tone accents */
.tk-good h1 { color: #fff; }
.tk-good .tk-tone { background: rgba(30,158,99,.25); border-color: rgba(30,158,99,.5); }
.tk-bad .tk-tone { background: rgba(214,69,69,.25); border-color: rgba(214,69,69,.5); }
.tk-warn .tk-tone { background: rgba(232,163,23,.25); border-color: rgba(232,163,23,.5); }
.tk-meta .tk-tone { display: inline-flex; align-items: center; gap: 7px; }
.tk-meta .tk-tone::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); animation: tk-blink 1.6s infinite; }
.tk-good .tk-tone::before { background: #3DDC97; animation: none; }
.tk-bad .tk-tone::before { background: #FF7B7B; animation: none; }
.tk-warn .tk-tone::before { background: #FFC94A; }

/* Progress steps */
.tk-steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.tk-steps li { position: relative; font-size: 12px; color: rgba(255,255,255,.5); padding-top: 26px; text-align: center; line-height: 1.3; }
.tk-steps li::before { content: ""; position: absolute; top: 8px; right: 50%; width: 100%; height: 3px; background: rgba(255,255,255,.14); }
.tk-steps li:first-child::before { display: none; }
.tk-steps li span { position: absolute; top: 2px; left: 50%; margin-left: -7.5px; width: 15px; height: 15px; border-radius: 50%; background: var(--navy); border: 3px solid rgba(255,255,255,.25); z-index: 1; }
.tk-steps li.is-done { color: #fff; font-weight: 600; }
.tk-steps li.is-done span { border-color: var(--orange); background: var(--orange); animation: tk-pop .4s calc(.5s + var(--i) * .22s) both; }
.tk-steps li.is-done::before { background: linear-gradient(90deg, var(--orange), var(--orange-2)); transform-origin: left; animation: tk-grow .35s calc(.35s + var(--i) * .22s) both; }
.tk-steps li.is-done:not(:has(+ .is-done)) span::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--orange); animation: tk-ring 1.8s 1.6s infinite; }
.tk-good .tk-steps li.is-done span, .tk-good .tk-steps li.is-done::before { background: var(--good); border-color: var(--good); }

/* Actions */
.tk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tk-btn { border: 0; cursor: pointer; padding: 11px 20px; border-radius: 12px; background: var(--orange); color: #fff; font-weight: 600; font-size: 14px; transition: transform .2s, box-shadow .2s, background .2s; box-shadow: 0 8px 22px rgba(242,106,33,.35); }
.tk-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(242,106,33,.45); }
.tk-btn-ghost { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); box-shadow: none; }
.tk-btn-ghost:hover { background: rgba(255,255,255,.16); box-shadow: none; }

/* Map */
.tk-map-wrap { animation: tk-fade 1s .15s both; }
.tk-map { width: 100%; max-width: 520px; display: block; margin: 0 auto; overflow: visible; }
.tk-land { fill: rgba(255,255,255,.06); stroke: rgba(255,255,255,.35); stroke-width: 1.4; stroke-linejoin: round; }
.tk-route-bg { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.tk-route { fill: none; stroke: var(--orange); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 6px rgba(242,106,33,.7)); }
.tk-pin circle { fill: #fff; }
.tk-pin text { fill: #fff; font-size: 13px; font-weight: 600; paint-order: stroke; stroke: var(--navy); stroke-width: 4px; stroke-linejoin: round; }
.tk-from circle { fill: #9FB4D8; }
.tk-to > circle:not(.tk-to-ring) { fill: var(--orange); }
.tk-to-ring { fill: none !important; stroke: var(--orange); stroke-width: 2; transform-origin: center; transform-box: fill-box; animation: tk-ring 2s infinite; }
.tk-parcel rect { fill: var(--orange); stroke: #fff; stroke-width: 2; }
.tk-parcel path { stroke: #fff; stroke-width: 1.6; fill: none; }
.tk-parcel { opacity: 0; filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.tk-bad .tk-parcel rect { fill: #fff; stroke: var(--bad); }
.tk-bad .tk-parcel path { stroke: var(--bad); }
.tk-bad .tk-route { stroke: #fff; filter: none; opacity: .7; stroke-width: 2.5; stroke-dasharray: none; }
.tk-warn .tk-parcel rect { fill: var(--warn); }
.tk-good .tk-to > circle:not(.tk-to-ring) { fill: var(--good); }
.tk-good .tk-to-ring { stroke: var(--good); }
.tk-good .tk-parcel rect { fill: var(--good); }
.tk-burst circle { fill: none; stroke: var(--good); stroke-width: 3; }
.tk-burst line { stroke: var(--good); stroke-width: 3; stroke-linecap: round; }
.tk-legend { display: flex; justify-content: center; gap: 18px; font-size: 12.5px; color: rgba(255,255,255,.7); margin-top: 6px; }
.tk-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.tk-legend .o { background: #9FB4D8; }
.tk-legend .d { background: var(--orange); }

/* Body cards */
.tk-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; max-width: 1120px; margin: -48px auto 0; padding: 0 clamp(16px, 4vw, 32px) 40px; position: relative; z-index: 2; }
.tk-card { background: #fff; border-radius: 20px; padding: 24px; box-shadow: 0 18px 40px rgba(19,40,74,.1); border: 1px solid var(--line); animation: tk-up .6s .3s cubic-bezier(.2,.8,.2,1) both; }
.tk-card + .tk-card { animation-delay: .42s; }
.tk-card h2 { margin: 0 0 16px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tk-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 18px; margin: 0; font-size: 14.5px; }
.tk-dl dt { color: var(--muted); }
.tk-dl dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.tk-cod { color: var(--orange); font-size: 17px; }
.tk-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; }
.tk-alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; line-height: 1.5; }
.tk-alert-warn { background: #FFF6E0; color: #7A5300; border: 1px solid #F5DC9A; }
.tk-alert-go { background: #FFF0E7; color: #8A3A0C; border: 1px solid #FBCDB1; }
.tk-muted { color: var(--muted); margin: 0; }

/* Timeline */
.tk-line { list-style: none; margin: 0; padding: 0; position: relative; }
.tk-line li { display: flex; gap: 14px; position: relative; padding-bottom: 20px; animation: tk-slide .5s calc(.55s + var(--i) * .1s) both; }
.tk-line li:last-child { padding-bottom: 0; }
.tk-line li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--line); }
.tk-line li:last-child::before { display: none; }
.tk-dot { flex: 0 0 16px; height: 16px; border-radius: 50%; border: 3px solid #C9D1DF; background: #fff; margin-top: 3px; position: relative; z-index: 1; }
.tk-line li:first-child .tk-dot { border-color: var(--orange); background: var(--orange); box-shadow: 0 0 0 5px rgba(242,106,33,.16); }
.tk-line li:first-child.tk-ev-delivered .tk-dot { border-color: var(--good); background: var(--good); box-shadow: 0 0 0 5px rgba(30,158,99,.16); }
.tk-line li:first-child.tk-ev-returned .tk-dot, .tk-line li:first-child.tk-ev-cancelled .tk-dot { border-color: var(--bad); background: var(--bad); box-shadow: 0 0 0 5px rgba(214,69,69,.14); }
.tk-line strong { display: block; font-size: 14.5px; font-weight: 600; }
.tk-line li:not(:first-child) strong { font-weight: 500; color: #3A4560; }
.tk-line small { color: var(--muted); font-size: 12.5px; }

/* Search state */
.tk-search { min-height: calc(100vh - 150px); grid-template-columns: 1fr; place-items: center; text-align: center; }
.tk-map-bg { position: absolute !important; width: min(720px, 120vw); max-width: none; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: .35; }
.tk-cap-dot { fill: var(--orange); }
.tk-cap-ring { fill: none; stroke: var(--orange); stroke-width: 2; transform-origin: center; transform-box: fill-box; animation: tk-ring 3s var(--d) infinite; }
.tk-search-box { width: min(600px, 100%); animation: tk-up .7s both; }
.tk-search-box p { color: rgba(255,255,255,.75); margin: 0 auto 26px; max-width: 30em; }
.tk-big { display: flex; gap: 8px; background: #fff; padding: 8px; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.tk-big input { flex: 1; min-width: 0; border: 0; outline: none; padding: 12px 14px; font-size: 16px; color: var(--ink); background: none; }
.tk-big button { border: 0; cursor: pointer; background: var(--orange); color: #fff; font-weight: 700; padding: 0 26px; border-radius: 12px; font-size: 15px; transition: background .2s; }
.tk-big button:hover { background: #E05A12; }
.tk-notfound { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: rgba(214,69,69,.16); border: 1px solid rgba(214,69,69,.45); color: #FFDCDC; font-size: 14px; animation: tk-shake .5s .2s both; }

/* Footer & toast */
.tk-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 22px 16px 30px; font-size: 13px; color: var(--muted); }
.tk-foot a { color: var(--navy); font-weight: 600; text-decoration: none; }
.tk-search ~ .tk-foot { background: var(--navy-3); color: rgba(255,255,255,.55); }
.tk-search ~ .tk-foot a { color: #fff; }
.tk-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.25); animation: tk-up .3s both; z-index: 10; }

/* Animations */
@keyframes tk-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes tk-fade { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes tk-slide { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes tk-pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes tk-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tk-ring { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes tk-blink { 50% { opacity: .35; } }
@keyframes tk-shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Mobile */
@media (max-width: 860px) {
    .tk-hero { grid-template-columns: minmax(0, 1fr); }
    .tk-map-wrap { order: -1; margin: -10px auto -6px; width: min(380px, 100%); }
    .tk-body { grid-template-columns: minmax(0, 1fr); margin-top: -36px; }
    .tk-steps li { font-size: 10.5px; }
}
@media (max-width: 480px) {
    .tk-logo img { height: 36px; }
    .tk-mini { width: 50vw; }
    .tk-card { padding: 20px 18px; }
    .tk-big button { padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
    .tk-route { stroke-dashoffset: 0; }
}
.tk-good .tk-steps li.is-done span::after { border-color: var(--good); }
