* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Plus Jakarta Sans', -apple-system, sans-serif; background: #F8FAFC; color: #0F172A; min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* UI/UX Pro Max: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* UI/UX Pro Max: focus-visible for accessibility */
:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
  border-radius: 4px;
}

:root {
  --primary: #2563EB; --primary-dark: #1D4ED8;
  --bg: #F8FAFC; --bg-card: #FFFFFF;
  --text: #0F172A; --text-sec: #475569; --text-muted: #94A3B8;
  --border: #E2E8F0; --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
}

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.nav-logo-img { height: 36px; width: auto; }
.nav-title { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -0.02em; }
.nav-title-accent { background: linear-gradient(135deg, #2563EB, #7C3AED); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; gap: 0.25rem; }
.nav-link { padding: 0.5rem 0.75rem; border-radius: 8px; font-size: 0.875rem; font-weight: 500; color: var(--text-sec); text-decoration: none; transition: all 0.2s; }
.nav-link:hover { color: var(--text); background: var(--border); }
.nav-link.active { color: var(--primary); background: rgba(37,99,235,0.08); }

/* Hero */
.hero { text-align: center; padding: 3rem 1.5rem 1.5rem; position: relative; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37,99,235,0.08) 0%, transparent 70%); pointer-events: none; }
.hero-content { position: relative; max-width: 600px; margin: 0 auto; }
.hero-badge { display: inline-block; padding: 0.35rem 1rem; background: rgba(37,99,235,0.08); border: 1px solid rgba(37,99,235,0.15); border-radius: 9999px; font-size: 0.8rem; font-weight: 600; color: var(--primary); margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.gradient-text { background: linear-gradient(135deg, #2563EB, #F97316); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-desc { color: var(--text-sec); margin-top: 0.75rem; font-size: 1.05rem; }

/* Search */
.search-section { max-width: 600px; margin: -0.5rem auto 2rem; padding: 0 1.5rem; }
.search-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }

.search-input-wrap { display: flex; align-items: center; gap: 0.5rem; background: #F1F5F9; border: 2px solid var(--border); border-radius: 10px; padding: 0.25rem 1rem; margin-bottom: 0.75rem; transition: border-color 0.2s; }
.search-input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.search-icon { color: var(--text-muted); display: flex; }
.search-input { flex: 1; border: none; background: transparent; font-size: 1rem; font-family: inherit; color: var(--text); padding: 0.75rem 0.5rem; outline: none; }
.search-input::placeholder { color: var(--text-muted); }

.search-bottom { display: flex; gap: 0.75rem; }
.courier-dropdown { flex: 1; background: #F1F5F9; border: 2px solid var(--border); color: var(--text); padding: 0.75rem 1rem; border-radius: 10px; font-size: 0.95rem; font-family: inherit; cursor: pointer; outline: none; transition: border-color 0.2s; appearance: auto; }
.courier-dropdown:focus { border-color: var(--primary); }
.search-btn { flex-shrink: 0; background: var(--primary); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 10px; font-size: 0.95rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 0.5rem; min-height: 44px; }
.search-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.search-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.status-msg { margin-top: 0.75rem; font-size: 0.85rem; min-height: 1.2rem; }
.status-msg.loading { color: var(--primary); }
.status-msg.success { color: #059669; }

.search-hints { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }
.hint-label { font-size: 0.8rem; color: var(--text-muted); }
.hint-chip { background: var(--border); border: none; color: var(--text-sec); padding: 0.25rem 0.65rem; border-radius: 9999px; font-size: 0.75rem; font-family: 'JetBrains Mono', monospace; cursor: pointer; transition: all 0.2s; min-height: 44px; display: inline-flex; align-items: center; }
.hint-chip:hover { background: rgba(37,99,235,0.1); color: var(--primary); }

.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

.error-box { max-width: 600px; margin: 0 auto 1.5rem; padding: 0 1.5rem; }
.error-box > div { background: #FEF2F2; border: 1px solid #FECACA; border-radius: 10px; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.75rem; color: #DC2626; font-size: 0.9rem; }

/* Results */
.results { max-width: 600px; margin: 0 auto 2rem; padding: 0 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.status-banner { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; align-items: center; gap: 1rem; box-shadow: var(--shadow); }
.status-icon { font-size: 2rem; }
.status-info { flex: 1; }
.status-courier { font-weight: 700; }
.status-text { font-size: 0.85rem; color: var(--text-sec); }
.status-badge { padding: 0.35rem 1rem; border-radius: 9999px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.status-badge.on-process { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.status-badge.delivered { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.status-badge.in-transit { background: rgba(37,99,235,0.08); color: #2563EB; border: 1px solid #BFDBFE; }

.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; }
.info-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem; }
.info-card-label { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.info-card-value { font-size: 0.9rem; font-weight: 600; margin-top: 0.2rem; }

.timeline-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.section-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem; }
.section-title svg { color: var(--primary); }
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: linear-gradient(to bottom, var(--primary), var(--border)); border-radius: 1px; }
.timeline-item { position: relative; padding-bottom: 1.25rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -2rem; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: white; border: 2.5px solid var(--border); }
.timeline-item:first-child .timeline-dot { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,0.15); }
.timeline-date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.timeline-desc { font-size: 0.9rem; font-weight: 500; }
.raw-result { background: #F1F5F9; border-radius: 8px; padding: 1rem; }
.raw-result p { font-size: 0.85rem; color: var(--text-sec); margin-bottom: 0.5rem; }
.raw-result p:last-child { margin-bottom: 0; }
.cs-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 1rem; font-size: 0.85rem; color: var(--text-sec); }

/* Couriers */
.couriers-section { max-width: 720px; margin: 3rem auto; padding: 0 1.5rem; text-align: center; }
.section-heading { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.5rem; }
.section-desc { color: var(--text-sec); margin-bottom: 1.5rem; }
.courier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.75rem; }
.courier-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem; text-align: center; transition: all 0.2s; cursor: default; min-height: 44px; }
.courier-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.courier-logo-wrap { width: 40px; height: 40px; margin: 0 auto 0.4rem; display: flex; align-items: center; justify-content: center; background: #F8FAFC; border-radius: 8px; overflow: hidden; }
.courier-logo { max-width: 36px; max-height: 36px; object-fit: contain; }
.courier-logo-fallback { width: 36px; height: 36px; background: var(--primary); color: white; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; }
.courier-name { font-size: 0.75rem; font-weight: 600; color: var(--text-sec); }

/* FAQ */
.faq-section { max-width: 600px; margin: 3rem auto; padding: 0 1.5rem; }
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.faq-item summary { padding: 1rem 1.25rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.25rem; color: var(--text-muted); flex-shrink: 0; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 1.25rem 1rem; font-size: 0.875rem; color: var(--text-sec); line-height: 1.7; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 4rem; padding: 3rem 1.5rem; }
.footer-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.footer-logo-img { height: 28px; width: auto; }
.footer-text { font-size: 0.875rem; color: var(--text-sec); }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-top: 1rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-divider { width: 40px; height: 1px; background: var(--border); margin: 1.5rem auto; }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.8rem; }
  .nav-links { display: none; }
  .search-bottom { flex-direction: column; }
  .search-btn { width: 100%; justify-content: center; }
  .courier-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
