/* ============================================================================
 * ALURA TRACKING - STYLESHEET
 * ============================================================================
 * All styles for the tracking app. Loaded after leaflet.css so our overrides
 * can win when needed. Mobile breakpoints at 640px and 380px.
 *
 * SECTIONS
 *   1. Reset + base
 *   2. Home / search page
 *   3. Result page (tracking detail)
 *   4. Cards (countdown, map, order, help)
 *   5. Customer/order header + steps bar
 *   6. Timeline
 *   7. Support banner + agents badge
 *   8. Mobile breakpoints
 *   9. Investigation modal + animations
 * ============================================================================ */

    * { margin: 0; padding: 0; box-sizing: border-box; }
    body {
      font-family: 'Inter', -apple-system, sans-serif;
      background: #f6f7fb; color: #1a1a1a; min-height: 100vh;
      -webkit-font-smoothing: antialiased;
      position: relative; overflow-x: hidden;
    }
    body::before {
      content: ''; position: fixed; top: -200px; left: -200px; width: 600px; height: 600px;
      background: radial-gradient(circle, rgba(232,97,44,0.18), transparent 70%);
      border-radius: 50%; z-index: 0; pointer-events: none;
    }
    body::after {
      content: ''; position: fixed; bottom: -300px; right: -200px; width: 700px; height: 700px;
      background: radial-gradient(circle, rgba(232,97,44,0.10), transparent 70%);
      border-radius: 50%; z-index: 0; pointer-events: none;
    }

    .nav {
      display: flex; align-items: center; justify-content: center;
      padding: 16px 32px; background: #1a1a1a; border-bottom: 3px solid #E8612C;
      box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    }
    .nav-brand img { height: 32px; width: auto; filter: brightness(0) invert(1); }
    .nav-link { display: none; }

    /* ── HOMEPAGE HERO ── */
    .home-wrap { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 56px 24px 80px; }
    .trust-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(255,255,255,0.9); border: 1px solid rgba(232,97,44,0.25); border-radius: 100px; font-size: 12px; font-weight: 600; color: #1a1a1a; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
    .trust-pill .dot { width: 6px; height: 6px; background: #20a366; border-radius: 50%; box-shadow: 0 0 8px #20a366; animation: pulse 2s infinite; }

    .search-section { max-width: 640px; margin: 0 auto; padding: 0; text-align: center; position: relative; z-index: 1; }
    .search-section .trust-pill { margin-bottom: 24px; }
    .search-section h1 { font-size: 44px; font-weight: 800; letter-spacing: -1.5px; margin-bottom: 12px; color: #0f0f0f; line-height: 1.05; }
    .search-section h1 .accent { background: linear-gradient(135deg, #E8612C, #F07A3A); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
    .search-section .lede { font-size: 16px; color: #5a5a66; margin-bottom: 36px; max-width: 480px; margin-left: auto; margin-right: auto; line-height: 1.5; }

    .search-card { background: #fff; padding: 28px; border-radius: 24px; box-shadow: 0 20px 60px rgba(15, 15, 20, 0.08), 0 4px 12px rgba(15, 15, 20, 0.04); border: 1px solid rgba(0,0,0,0.04); }
    .search-form { display: flex; flex-direction: column; gap: 12px; }
    .input-wrap { position: relative; }
    .input-wrap svg.input-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #9b9ba8; pointer-events: none; }
    .search-form input {
      width: 100%; padding: 18px 20px 18px 48px; border: 1.5px solid #e5e7ef;
      border-radius: 14px; font-size: 15px; font-family: inherit; background: #fafbff;
      color: #1a1a1a; transition: all 0.2s; outline: none;
    }
    .search-form input:focus { border-color: #E8612C; background: #fff; box-shadow: 0 0 0 4px rgba(232, 97, 44, 0.1); }
    .search-form input::placeholder { color: #9b9ba8; }
    .search-btn {
      width: 100%; padding: 18px; background: linear-gradient(135deg, #E8612C, #F07A3A); color: #fff; border: none;
      border-radius: 14px; font-size: 16px; font-weight: 700; font-family: inherit;
      cursor: pointer; transition: all 0.2s; box-shadow: 0 8px 24px rgba(232, 97, 44, 0.35);
      display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    }
    .search-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(232, 97, 44, 0.45); }
    .search-btn svg { width: 18px; height: 18px; }

    .secure-line { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; font-size: 12px; color: #8a8a96; }
    .secure-line svg { width: 12px; height: 12px; color: #20a366; }

    /* Features row */
    .features-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 48px auto 0; max-width: 640px; }
    .feature { background: rgba(255,255,255,0.7); backdrop-filter: blur(8px); padding: 20px 16px; border-radius: 16px; border: 1px solid rgba(0,0,0,0.04); text-align: center; }
    .feature-icon { width: 40px; height: 40px; margin: 0 auto 10px; background: linear-gradient(135deg, rgba(232,97,44,0.12), rgba(232,97,44,0.06)); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #E8612C; }
    .feature-icon svg { width: 20px; height: 20px; }
    .feature h4 { font-size: 13px; font-weight: 700; color: #1a1a1a; margin-bottom: 2px; }
    .feature p { font-size: 11px !important; color: #777 !important; margin: 0 !important; line-height: 1.4; }

    /* Carrier strip */
    .carriers-strip { margin: 48px auto 0; text-align: center; padding: 0 20px; }
    .carriers-label { font-size: 11px; font-weight: 700; color: #9b9ba8; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 18px; }
    .carriers-logos { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: nowrap; }
    .carrier-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; background: #fff; border: 1px solid rgba(0,0,0,0.06); border-radius: 12px; font-size: 13px; font-weight: 800; color: #1a1a1a; letter-spacing: 0.3px; box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
    .carriers-logos img { height: 38px; width: auto; object-fit: contain; flex-shrink: 0; }

    /* FAQ section */
    .faq-section { max-width: 640px; margin: 48px auto 0; }
    .faq-title { font-size: 20px; font-weight: 800; color: #1a1a1a; margin-bottom: 20px; text-align: center; }
    .faq-item { background: #fff; border: 1px solid rgba(0,0,0,0.06); border-radius: 12px; margin-bottom: 8px; overflow: hidden; cursor: pointer; transition: all 0.2s; }
    .faq-item:hover { border-color: rgba(232,97,44,0.2); }
    .faq-question { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 15px; color: #1a1a1a; user-select: none; }
    .faq-toggle { font-size: 20px; color: #E8612C; transition: transform 0.2s; }
    .faq-item.open .faq-toggle { transform: rotate(45deg); }
    .faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; padding: 0 20px; color: #666; font-size: 14px; line-height: 1.6; }
    .faq-item.open .faq-answer { max-height: 500px; padding: 0 20px 16px; }

    /* Footer */
    .home-footer { max-width: 1080px; margin: 64px auto 0; padding: 32px 24px 0; border-top: 1px solid rgba(0,0,0,0.06); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; position: relative; z-index: 1; font-size: 12px; color: #8a8a96; }
    .home-footer .left { display: flex; align-items: center; gap: 8px; justify-content: center; }
    .home-footer .left strong { color: #1a1a1a; font-weight: 700; }
    .home-footer a { color: #E8612C; text-decoration: none; font-weight: 600; }
    .home-footer a:hover { text-decoration: underline; }

    /* LOADING */
    .loading-screen { display: none; max-width: 560px; margin: 60px auto 0; padding: 0 20px; text-align: center; }
    .loading-screen.active { display: block; }
    .loading-icon { width: 64px; height: 64px; margin: 0 auto 24px; font-size: 48px; animation: bounce 1s ease-in-out infinite; }
    @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
    .loading-text { font-size: 17px; font-weight: 600; color: #1a1a1a; margin-bottom: 8px; min-height: 28px; transition: opacity 0.3s; }
    .loading-sub { font-size: 13px; color: #888; margin-bottom: 24px; min-height: 20px; }
    .loading-progress-wrap { width: 100%; max-width: 400px; margin: 0 auto; height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; }
    .loading-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #E8612C, #F07A3A); border-radius: 4px; transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 0 12px rgba(232, 97, 44, 0.5); }
    .loading-steps { display: flex; justify-content: space-between; max-width: 400px; margin: 12px auto 0; font-size: 10px; color: #666; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
    .loading-steps span.done { color: #E8612C; }
    .loading-steps span.active { color: #1a1a1a; }

    /* RESULT */
    .result-section { display: none; max-width: 800px; margin: 40px auto 60px; padding: 0 20px; }
    .result-section.active { display: block; }

    .card { background: rgba(255, 255, 255, 0.98); border-radius: 28px; margin-bottom: 16px; border: 1px solid rgba(232, 97, 44, 0.12); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06); backdrop-filter: blur(10px); }

    .status-header { padding: 32px; background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(255,255,255,0.94)); }
    .status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
    .status-badge.shipped { background: rgba(232, 97, 44, 0.15); color: #E8612C; border: 1px solid rgba(232, 97, 44, 0.3); }
    .status-badge.in_transit { background: rgba(232, 97, 44, 0.15); color: #E8612C; border: 1px solid rgba(232, 97, 44, 0.3); }
    .status-badge.out_for_delivery { background: rgba(46, 125, 50, 0.2); color: #66bb6a; border: 1px solid rgba(46, 125, 50, 0.4); }
    .status-badge.delivered { background: rgba(46, 125, 50, 0.2); color: #66bb6a; border: 1px solid rgba(46, 125, 50, 0.4); }
    .status-badge.failed_attempt { background: rgba(229, 57, 53, 0.2); color: #ef5350; border: 1px solid rgba(229, 57, 53, 0.4); }
    .status-badge.replacement_on_way { background: rgba(66, 133, 244, 0.2); color: #64b5f6; border: 1px solid rgba(66, 133, 244, 0.4); }
    .status-title { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 4px; color: #1a1a1a; }
    .status-sub { font-size: 14px; color: #777; }

    .progress-wrap { margin-top: 24px; }
    .progress-steps { display: flex; justify-content: space-between; margin-bottom: 8px; }
    .progress-step { font-size: 11px; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: 0.5px; text-align: center; flex: 1; }
    .progress-step.active { color: #E8612C; }
    .progress-step.done { color: #1a1a1a; }
    .progress-bar { width: 100%; height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; }
    .progress-fill { height: 100%; background: linear-gradient(90deg, #E8612C, #F07A3A); border-radius: 3px; transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1); width: 0%; box-shadow: 0 0 12px rgba(232, 97, 44, 0.6); }

    .delivery-estimate { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(232, 97, 44, 0.1); }
    .est-label { font-size: 13px; color: #888; }
    .est-date { font-size: 18px; font-weight: 800; color: #1a1a1a; }
    .est-carrier-wrap { display: flex; align-items: center; gap: 12px; text-align: right; }
    .carrier-logo { height: 28px; width: auto; opacity: 1; }
    .est-carrier { font-size: 14px; color: #ccc; font-weight: 600; }

    /* COUNTDOWN */
    .countdown-card { padding: 24px; text-align: center; }
    .countdown-label { font-size: 14px; color: #1a1a1a; margin-bottom: 6px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
    .countdown-label .spinner { width: 16px; height: 16px; border: 2px solid rgba(232, 97, 44, 0.2); border-top: 2px solid #E8612C; border-right: 2px solid #E8612C; border-radius: 50%; animation: spin 1s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .countdown-text-sub { font-size: 12px; color: #999; font-weight: 400; }
    .countdown-timer { display: flex; justify-content: center; gap: 16px; }
    .countdown-unit { text-align: center; }
    .countdown-num { font-size: 32px; font-weight: 800; color: #E8612C; line-height: 1; text-shadow: 0 0 16px rgba(232, 97, 44, 0.3); }
    .countdown-text { font-size: 10px; color: #777; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
    .countdown-sep { font-size: 28px; font-weight: 300; color: #444; line-height: 1; }

    /* VERIFIED BADGE */
    .verified-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #66bb6a; font-weight: 600; margin-left: 8px; }
    .verified-badge svg { width: 14px; height: 14px; }

    .map-card { overflow: hidden; }
    .map-header { padding: 20px 24px 12px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: #1a1a1a; }
    .map-header .pulse { width: 8px; height: 8px; background: #E8612C; border-radius: 50%; animation: pulse 2s infinite; box-shadow: 0 0 12px rgba(232, 97, 44, 0.7); }
    @keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.5); } }
    #map { width: 100%; height: 340px; background: linear-gradient(135deg, #f5f5f5, #efefef); }

    .timeline-card { padding: 24px 32px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
    .timeline-card.waiting { padding: 40px 32px; }
    .timeline-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: #1a1a1a; letter-spacing: -0.3px; display: flex; align-items: center; justify-content: center; gap: 8px; }
    .timeline-title::before { content: '⏳'; font-size: 16px; }
    .timeline-subtitle { font-size: 12px; color: #999; font-weight: 400; }
    .timeline-item { display: flex; gap: 16px; padding: 0; margin: 0; position: relative; }
    .timeline-item:last-child { padding: 0; margin: 0; }
    .timeline-dot-wrap { display: none; }
    .timeline-dot { width: 12px; height: 12px; border-radius: 50%; background: #ccc; border: none; flex-shrink: 0; z-index: 1; font-size: 8px; display: flex; align-items: center; justify-content: center; color: #888; }
    .timeline-dot.active { background: #E8612C; border-color: rgba(232, 97, 44, 0.5); box-shadow: 0 0 8px rgba(232, 97, 44, 0.4); }
    .timeline-dot.latest { background: #E8612C; border-color: rgba(232, 97, 44, 0.5); animation: pulse 2s infinite; box-shadow: 0 0 12px rgba(232, 97, 44, 0.6); }
    .timeline-line { display: none; }
    .timeline-content { flex: 1; padding: 0; }
    .timeline-emoji { display: none; }
    .timeline-status { font-size: 13px; font-weight: 600; margin: 0 0 2px 0; color: #1a1a1a; display: flex; align-items: center; }
    .timeline-description { font-size: 12px; color: #777; margin: 0 0 1px 0; line-height: 1.2; }
    .timeline-meta { font-size: 11px; color: #999; margin: 0; }

    /* SETUP GUIDE */
    .setup-card { padding: 28px; text-align: center; }
    .setup-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: #1a1a1a; }
    .setup-card p { font-size: 13px; color: #777; margin-bottom: 16px; }
    .setup-steps { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; text-align: center; }
    .setup-step { flex: 1; min-width: 100px; padding: 16px 8px; background: rgba(232, 97, 44, 0.08); border-radius: 12px; border: 1px solid rgba(232, 97, 44, 0.15); }
    .setup-step-num { font-size: 20px; margin-bottom: 6px; }
    .setup-step-text { font-size: 11px; color: #666; font-weight: 600; }

    /* UPSELL */
    .upsell-card { padding: 28px; display: flex; align-items: center; gap: 20px; background: linear-gradient(135deg, rgba(232, 97, 44, 0.12), rgba(232, 97, 44, 0.06)); border: 1px solid rgba(232, 97, 44, 0.15); }
    .upsell-icon { font-size: 40px; flex-shrink: 0; }
    .upsell-text { flex: 1; }
    .upsell-text h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: #1a1a1a; }
    .upsell-text p { font-size: 13px; color: #666; margin-bottom: 12px; }
    .upsell-btn { display: inline-flex; padding: 10px 20px; background: linear-gradient(135deg, #E8612C, #F07A3A); color: #fff; border-radius: 10px; font-size: 13px; font-weight: 700; text-decoration: none; transition: all 0.2s; box-shadow: 0 4px 12px rgba(232, 97, 44, 0.35); }
    .upsell-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(232, 97, 44, 0.45); }
    .upsell-badge { display: inline-block; background: rgba(46, 125, 50, 0.8); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }

    .help-card { padding: 24px; text-align: center; }
    .help-card .help-headline { font-size: 14px; color: #777; margin-bottom: 12px; }
    .help-card .help-cta { display: inline-flex; align-items: center; gap: 6px; color: #E8612C; font-size: 14px; font-weight: 600; text-decoration: none; transition: all 0.2s; }
    .help-card .help-cta:hover { text-decoration: underline; color: #F07A3A; }
    .help-card .help-spam { margin: 16px 0 0; padding: 12px 14px; background: rgba(232, 97, 44, 0.08); border: 1px solid rgba(232, 97, 44, 0.18); border-radius: 10px; font-size: 12px; color: #5a3a2c; line-height: 1.45; }
    .help-card .help-spam strong { color: #b34a1c; font-weight: 700; }
    .help-card .help-availability { margin: 10px 0 0; font-size: 12px; color: #888; line-height: 1.45; }

    .back-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #777; text-decoration: none; font-weight: 500; margin-bottom: 20px; cursor: pointer; border: none; background: none; font-family: inherit; transition: color 0.2s; }
    .back-btn:hover { color: #E8612C; }

    /* Support banner now flows in-document (was position:fixed) so it sits
     * flush against the nav below with zero gap. Still respects iOS notch via
     * extra top padding when safe-area-inset-top is available. */
    #supportBanner { padding-top: calc(12px + env(safe-area-inset-top)); }
    @media (max-width: 640px) {
      #supportBanner { padding: calc(10px + env(safe-area-inset-top)) 16px 10px; font-size: 12px; }
    }

    /* CUSTOMER/ORDER HEADER */
    .customer-order-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 24px; margin-bottom: 20px; background: rgba(255,255,255,0.98); border-radius: 16px; border: 1px solid rgba(232, 97, 44, 0.12); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
    .coh-block { display: flex; flex-direction: column; gap: 4px; }
    .coh-block.right { text-align: right; align-items: flex-end; }
    .coh-label { font-size: 11px; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: 0.8px; }
    .coh-value { font-size: 16px; font-weight: 700; color: #1a1a1a; letter-spacing: -0.3px; }

    /* STEP INDICATOR */
    .steps-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; padding: 0 20px; position: relative; }
    .steps-bar::before { content: ''; position: absolute; top: 23px; left: 50px; right: 50px; height: 2px; background: linear-gradient(90deg, #20a366 0%, #20a366 var(--progress-percent, 25%), #ddd var(--progress-percent, 25%), #ddd 100%); z-index: 0; pointer-events: none; transition: all 0.3s ease; }
    .step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; text-align: center; position: relative; z-index: 1; }
    .step-circle { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; background: #e0e0e0; color: #666; border: 2px solid #e0e0e0; transition: all 0.2s; }
    .step-circle.active { background: #E8612C; color: white; border-color: #E8612C; }
    .step-circle.done { background: #333; color: white; border-color: #333; }
    .step-label { font-size: 12px; font-weight: 600; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
    .step-label.active { color: #E8612C; }
    .step-label.done { color: #333; }
    .step-line { display: none !important; }
    
    /* LAST UPDATE HIGHLIGHT */
    .last-update-section { background: linear-gradient(135deg, #d4f1e5, #e0f7f4); border-radius: 16px; padding: 20px; margin-bottom: 24px; border-left: 4px solid #20a366; display: flex; gap: 16px; align-items: flex-start; }
    .last-update-icon { width: 44px; height: 44px; border-radius: 50%; background: #20a366; display: flex; align-items: center; justify-content: center; color: white; font-size: 20px; flex-shrink: 0; }
    .last-update-content { flex: 1; }
    .last-update-label { font-size: 11px; font-weight: 700; color: #20a366; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
    .last-update-title { font-size: 14px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
    .last-update-desc { font-size: 13px; color: #555; margin-bottom: 8px; line-height: 1.4; }
    .last-update-meta { font-size: 12px; color: #888; margin-bottom: 8px; }
    .last-update-next { font-size: 12px; color: #20a366; font-weight: 600; display: flex; align-items: center; gap: 4px; }
    .last-update-next::before { content: '⏱'; }
    
    /* ORDER DETAILS */
    .order-header-row { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 16px; border-bottom: 1px solid rgba(232, 97, 44, 0.1); }
    .order-header-title { font-size: 13px; font-weight: 800; letter-spacing: 1.5px; color: #1a1a1a; text-transform: uppercase; }
    .order-header-link { color: #E8612C; font-weight: 600; text-decoration: none; font-size: 13px; }
    .order-header-link:hover { text-decoration: underline; }
    .order-details { padding: 20px 24px 24px; }
    .order-ship-to { padding: 14px 0 18px; border-bottom: 1px solid rgba(0,0,0,0.06); margin-bottom: 6px; }
    .order-ship-label { font-size: 13px; font-weight: 700; color: #1a1a1a; margin-bottom: 6px; }
    .order-ship-value { font-size: 14px; color: #4a4a4a; line-height: 1.5; }
    .order-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
    .order-row:last-child { border-bottom: none; }
    .order-row-label { font-size: 14px; font-weight: 700; color: #1a1a1a; }
    .order-row-value { font-size: 14px; color: #4a4a4a; text-align: right; font-variant-numeric: tabular-nums; }
    .order-row.total .order-row-label,
    .order-row.total .order-row-value { font-weight: 800; color: #1a1a1a; }

    @media (max-width: 640px) {
      .home-wrap { padding: 28px 16px 60px; }
      .search-section h1 { font-size: 30px; letter-spacing: -1px; }
      .search-section .lede { font-size: 14px; margin-bottom: 24px; }
      .search-card { padding: 20px; border-radius: 20px; }
      .features-row { grid-template-columns: 1fr; gap: 10px; margin-top: 32px; }
      .feature { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; }
      .feature-icon { margin: 0; flex-shrink: 0; }
      .carriers-strip { margin-top: 32px; }
      .carriers-logos { gap: 12px; }
      .carriers-logos img { height: 28px; }
      .status-header { padding: 24px 20px; }
      .status-title { font-size: 20px; }
      .delivery-estimate { flex-direction: column; gap: 12px; text-align: center; }
      .est-carrier-wrap { justify-content: center; }
      #map { height: 260px; }
      .timeline-card { padding: 20px; }
      .upsell-card { flex-direction: column; text-align: center; }
      .countdown-num { font-size: 24px; }
      .setup-steps { flex-direction: column; }
      .steps-bar { gap: 8px; }
      .step-circle { width: 40px; height: 40px; font-size: 16px; }
      .step-label { font-size: 10px; }
      .last-update-section { gap: 12px; padding: 16px; }
      .last-update-icon { width: 36px; height: 36px; font-size: 16px; }
      .order-details { padding: 14px 18px 18px; }
      .order-header-row { padding: 18px 18px 14px; }
      .customer-order-header { padding: 16px; gap: 12px; }
      .coh-value { font-size: 14px; }
      .faq-section { margin-top: 32px; }
      .faq-question { padding: 14px 16px; font-size: 14px; }

      /* --- Mobile polish (additive, no logic changes) --- */
      .result-section { margin: 20px auto 40px; padding: 0 14px; }
      .back-btn { margin-bottom: 14px; font-size: 12px; }

      /* Support banner: tighter so it doesn't eat the viewport */
      #supportBanner { padding: calc(8px + env(safe-area-inset-top)) 12px 8px !important; font-size: 11px !important; gap: 6px !important; line-height: 1.35; }
      #supportBanner span:first-child { font-size: 13px !important; }

      /* Customer / Order header */
      .customer-order-header { padding: 14px 16px; gap: 10px; border-radius: 14px; margin-bottom: 14px; }
      .coh-label { font-size: 10px; letter-spacing: 0.6px; }
      .coh-value { font-size: 13px; letter-spacing: -0.2px; word-break: break-all; }

      /* Steps bar: 4 circles need to fit in ~340px */
      .steps-bar { padding: 0 8px; gap: 4px; margin-bottom: 24px; }
      .steps-bar::before { left: 32px; right: 32px; top: 19px; }
      .step-circle { width: 36px; height: 36px; font-size: 14px; border-width: 2px; }
      .step-label { font-size: 9px; letter-spacing: 0.3px; line-height: 1.25; }
      .step { gap: 6px; }

      /* Cards: tighter padding so content has more room */
      .card { padding: 16px !important; border-radius: 14px !important; margin-bottom: 12px !important; }
      .countdown-card { padding: 16px !important; }
      .countdown-label { font-size: 13px; }
      .countdown-text-sub { font-size: 11px; }

      /* Map card */
      .map-card { padding: 0 !important; }
      .map-header { padding: 14px 16px 10px; font-size: 13px; }
      #map { height: 220px; border-radius: 0 0 14px 14px; }

      /* Order details */
      .order-header-row { padding: 14px 16px 10px; }
      .order-header-title { font-size: 12px; letter-spacing: 1.2px; }
      .order-header-link { font-size: 12px; }
      .order-details { padding: 10px 16px 16px; }
      .order-ship-to { padding: 10px 0 14px; }
      .order-ship-label { font-size: 12px; }
      .order-ship-value { font-size: 13px; line-height: 1.45; word-break: break-word; }
      .order-row { padding: 10px 0; gap: 10px; }
      .order-row-label { font-size: 13px; }
      .order-row-value { font-size: 13px; }
      .order-row.total .order-row-label,
      .order-row.total .order-row-value { font-size: 14px; }

      /* Status badge */
      .status-badge { font-size: 11px; padding: 5px 12px; margin-bottom: 12px; }

      /* Setup card: 5 steps wrap to grid instead of cramped row */
      .setup-card { padding: 18px 14px !important; }
      .setup-steps { display: grid !important; grid-template-columns: repeat(5, 1fr); flex-direction: row !important; gap: 4px; }
      .setup-step { padding: 10px 4px; }
      .setup-step-num { font-size: 18px; }
      .setup-step-text { font-size: 10px; line-height: 1.2; }

      /* Upsell card: stacked, contained, tappable button */
      .upsell-card { padding: 18px 16px !important; gap: 8px; }
      .upsell-icon { font-size: 32px; }
      .upsell-text { font-size: 14px; line-height: 1.4; }
      .upsell-badge { font-size: 9px; padding: 2px 6px; }
      .upsell-btn { padding: 12px 22px; font-size: 13px; min-height: 44px; }

      /* Help card */
      .help-card { padding: 18px 16px; }
      .help-card .help-headline { font-size: 13px; margin-bottom: 10px; }
      .help-card .help-cta { font-size: 13px; }
      .help-card .help-spam { font-size: 11px; padding: 10px 12px; margin-top: 14px; line-height: 1.4; }
      .help-card .help-availability { font-size: 11px; margin-top: 8px; line-height: 1.4; }

      /* Inputs: prevent iOS zoom-on-focus by forcing >=16px font */
      input[type="email"], input[type="text"], input[type="number"], textarea, select { font-size: 16px !important; }
    }

    /* Extra-small phones (iPhone SE, ~360px) */
    @media (max-width: 380px) {
      .home-wrap { padding: 24px 12px 50px; }
      .result-section { padding: 0 12px; }
      .search-section h1 { font-size: 26px; }
      .step-circle { width: 32px; height: 32px; font-size: 13px; }
      .step-label { font-size: 8px; }
      .steps-bar::before { left: 28px; right: 28px; top: 17px; }
      .coh-value { font-size: 12px; }
      .order-row-label, .order-row-value { font-size: 12px; }
      .setup-step-num { font-size: 16px; }
      .setup-step-text { font-size: 9px; }
      #map { height: 200px; }
    }

    /* Tablet-only refinements (641-900) */
    @media (min-width: 641px) and (max-width: 900px) {
      .result-section { max-width: 680px; padding: 0 24px; }
    }

    @keyframes agentPulse {
      0%   { box-shadow: 0 0 0 0   rgba(32,163,102,0.6); }
      70%  { box-shadow: 0 0 0 10px rgba(32,163,102,0);   }
      100% { box-shadow: 0 0 0 0   rgba(32,163,102,0);   }
    }
    /* Mobile override for agents badge: previously dead code (inline style won
     * before extraction). After class extraction, this rule would activate and
     * shrink the badge on mobile, changing baseline behavior. Removed to match
     * what users have always actually seen. To re-enable, add specificity, e.g.
     * 'a.aw-agents-badge' selector. */

      @keyframes invSpin { to { transform: rotate(360deg); } }
      @keyframes invDots { 0%,20%{content:''} 40%{content:'.'} 60%{content:'..'} 80%,100%{content:'...'} }
      .inv-dots::after { content: ''; animation: invDots 1.4s steps(4, end) infinite; }

    #investigationModal .inv-input,
    #investigationModal .inv-textarea {
      width:100%; padding:14px 16px; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.1); border-radius:12px; font-size:14px; font-family:inherit; outline:none; color:#fff; transition:all 0.2s; box-sizing:border-box;
    }
    #investigationModal .inv-input::placeholder,
    #investigationModal .inv-textarea::placeholder { color:#666; }
    #investigationModal .inv-input:focus,
    #investigationModal .inv-textarea:focus { border-color:#db5e1f; background:rgba(219,94,31,0.06); box-shadow:0 0 0 3px rgba(219,94,31,0.12); }
    #investigationModal .inv-textarea { resize:vertical; min-height:90px; }
    #investigationModal .inv-close {
      position:absolute; top:14px; right:14px; width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.1); color:#ccc; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:20px; line-height:1; padding:0; transition:all 0.2s; z-index:2;
    }
    #investigationModal .inv-close:hover { background:rgba(219,94,31,0.18); border-color:rgba(219,94,31,0.4); color:#fff; transform:rotate(90deg); }
    #investigationModal .inv-submit { width:100%; background:linear-gradient(135deg, #db5e1f, #e8844e); color:#fff; border:none; padding:15px; border-radius:12px; font-size:14px; font-weight:700; cursor:pointer; transition:all 0.2s; box-shadow:0 4px 16px rgba(219,94,31,0.3); letter-spacing:0.3px; }
    #investigationModal .inv-submit:hover:not(:disabled) { transform:translateY(-1px); box-shadow:0 6px 20px rgba(219,94,31,0.45); }
    #investigationModal .inv-submit:disabled { opacity:0.6; cursor:not-allowed; transform:none; }
    @keyframes invModalIn { from { opacity:0; transform:translateY(20px) scale(0.96); } to { opacity:1; transform:translateY(0) scale(1); } }
    @keyframes invBackdropIn { from { opacity:0; } to { opacity:1; } }

/* ============================================================================
 * SECTION 10: Component classes (extracted from inline styles, no behavior change)
 * ============================================================================
 * These classes were created during a code-organization pass to replace
 * inline styles. Each class exactly matches the inline style it replaces,
 * including all colors, paddings, shadows, and animations.
 *
 * Naming: aw- prefix (Alura Web) to avoid collision with legacy classes.
 * ============================================================================ */

/* Peak volume banner. Horizontal flex layout (icon + text on one row). */
.aw-peak-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff4e6, #fffaf3);
  border: 1px solid rgba(232, 97, 44, 0.18);
  border-radius: 12px;
  font-size: 13px;
  color: #7a4a25;
  line-height: 1.4;
}
.aw-peak-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
}

/* Sync fallback inline card */
.aw-sync-card {
  display: none;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #eef5ff, #f5f9ff);
  border: 1px solid rgba(60, 110, 200, 0.18);
  border-radius: 12px;
  font-size: 13px;
  color: #2a4a78;
  line-height: 1.45;
}
.aw-sync-card-row { display: flex; align-items: flex-start; gap: 12px; }
.aw-sync-card-icon { font-size: 18px; flex-shrink: 0; line-height: 1.2; }
.aw-sync-card-title { font-weight: 700; margin-bottom: 4px; }
.aw-sync-card a { color: #3c6ec8; font-weight: 700; text-decoration: none; }

/* No-match view */
.aw-nomatch-card { background: #fff; border-radius: 20px; padding: 32px 28px; box-shadow: 0 12px 40px rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.04); }
.aw-nomatch-icon {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #fff4e6, #ffe6d1);
  margin: 0 auto 16px; font-size: 30px;
}
.aw-nomatch-head { text-align: center; font-size: 22px; font-weight: 800; color: #1a1a1a; margin-bottom: 8px; letter-spacing: -0.4px; }
.aw-nomatch-body { text-align: center; font-size: 13px; color: #666; line-height: 1.55; margin-bottom: 18px; max-width: 460px; margin-left: auto; margin-right: auto; }
.aw-nomatch-pill { display: none; max-width: 200px; margin: 0 auto 16px; padding: 6px 12px; background: rgba(232, 97, 44, 0.1); border: 1px solid rgba(232, 97, 44, 0.18); border-radius: 999px; font-size: 11px; color: #b34a1c; font-weight: 700; text-align: center; letter-spacing: 0.4px; }
.aw-nomatch-checklist { max-width: 460px; margin: 0 auto 20px; padding: 16px 18px; background: #fafafa; border: 1px solid #eee; border-radius: 12px; }
.aw-nomatch-checklist-label { font-size: 11px; font-weight: 700; color: #888; letter-spacing: 0.6px; margin-bottom: 12px; text-transform: uppercase; }
.aw-nomatch-checklist ul { list-style: none; padding: 0; margin: 0; font-size: 13px; color: #333; line-height: 1.55; }
.aw-nomatch-checklist li { padding: 6px 0; display: flex; align-items: flex-start; gap: 10px; }
.aw-nomatch-check { color: #E8612C; font-weight: 700; flex-shrink: 0; }
.aw-nomatch-code { background: #eee; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.aw-nomatch-retry { max-width: 460px; margin: 0 auto 8px; }
.aw-nomatch-retry-label { display: block; font-size: 11px; font-weight: 700; color: #888; letter-spacing: 0.8px; margin-bottom: 8px; text-transform: uppercase; }
.aw-nomatch-retry-row { display: flex; gap: 8px; }
.aw-nomatch-retry-input { flex: 1; min-width: 0; padding: 14px; border: 1.5px solid #ddd; border-radius: 10px; font-size: 16px; outline: none; transition: border-color 0.15s; }
.aw-nomatch-retry-input:focus { border-color: #E8612C; }
.aw-nomatch-retry-btn { background: #E8612C; color: #fff; border: none; padding: 0 22px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background 0.15s; }
.aw-nomatch-retry-btn:hover { background: #d4541e; }
.aw-nomatch-same-warning { display: none; margin-top: 10px; padding: 8px 12px; background: #fff4e6; border: 1px solid #ffd5a8; border-radius: 8px; font-size: 12px; color: #7a4a25; }
.aw-nomatch-support { display: none; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(0,0,0,0.06); text-align: center; }
.aw-nomatch-support-pre { font-size: 12px; color: #888; margin-bottom: 10px; line-height: 1.5; }
.aw-nomatch-support-link { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; background: #1a1a1a; color: #fff; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; }
.aw-nomatch-support-meta { margin-top: 12px; font-size: 11px; color: #aaa; }
.aw-nomatch-support-spam { margin-top: 6px; font-size: 11px; color: #b34a1c; font-weight: 600; }
.aw-nomatch-hint { margin-top: 14px; text-align: center; font-size: 11px; color: #aaa; }

/* Agents online badge */
.aw-agents-badge {
  position: fixed; right: 14px; bottom: 14px; z-index: 99;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 12px;
  background: rgba(26,26,26,0.95); color: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  font-size: 12px; font-weight: 600;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  transition: transform 0.15s ease;
}
.aw-agents-badge:hover { transform: translateY(-2px); }
.aw-agents-dot { width: 8px; height: 8px; border-radius: 50%; background: #20a366; box-shadow: 0 0 0 0 rgba(32,163,102,0.6); animation: agentPulse 2s infinite; }
.aw-agents-meta { color: #999; font-weight: 500; }
