.wrapper-track-hero {
    width: 100%;
    background: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 100px;
}

.track-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--light);
    gap: 12px;
    width: 100%;
    max-width: 700px;
}

.track-hero .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.track-hero h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
}

.track-hero p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 480px;
    line-height: 1.7;
}

.track-search-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    margin-top: -44px;
    position: relative;
    z-index: 10;
}

.track-search-card {
    background: var(--light);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(30, 51, 120, 0.14);
    padding: 36px 40px;
    width: 100%;
    max-width: 780px;
}

.track-search-card label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.search-input-row {
    display: flex;
    gap: 12px;
}

.search-input-row input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: "Outfit", sans-serif;
    font-size: 15px;
    color: var(--dark);
    outline: none;
    transition: border-color 0.3s ease;
    background: #fafafa;
}

.search-input-row input::placeholder {
    color: #aaa;
}

.search-input-row input:focus {
    border-color: var(--primary);
    background: var(--light);
}

.search-input-row button {
    padding: 15px 28px;
    background: var(--secondary);
    color: var(--dark);
    border: 2px solid var(--secondary);
    border-radius: 10px;
    font-family: "Outfit", sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.search-input-row button:hover:not(:disabled) {
    background: transparent;
    color: var(--secondary);
}

.search-input-row button:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.track-hint {
    margin-top: 12px;
    font-size: 12.5px;
    color: #999;
    line-height: 1.6;
}

.wrapper-result {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 50px 20px 80px;
}

.result-shell {
    width: 100%;
    max-width: 780px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-container {
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: fadeSlideUp 0.5s ease forwards;
}

.result-container.show {
    display: flex;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-banner {
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--primary);
    color: white;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.18);
}

.status-banner.delivered,
.status-banner.in-transit {
    background: var(--primary);
    color: white;
}

.status-banner.pending {
    background: var(--primary);
    color: white;
}

.status-banner.failed {
    background: var(--primary);
    color: white;
}

.status-banner-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.status-banner.delivered .status-icon-wrap {
    background: var(--secondary);
    color: var(--dark);
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 12px 24px rgba(250, 204, 21, 0.22);
}

.status-banner.delivered .status-badge {
    background: var(--secondary);
    color: var(--dark);
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow: 0 10px 20px rgba(250, 204, 21, 0.18);
}

.status-banner.delivered .status-badge .badge-check-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    flex-shrink: 0;
}

.status-delivery-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.status-delivery-icon svg {
    width: 40px;
    height: 40px;
    display: block;
    fill: currentColor;
}

.status-banner.failed .status-icon-wrap,
.status-banner.failed .status-badge {
    background: #b91c1c;
    border-color: rgba(255, 255, 255, 0.28);
}

.status-banner.pending .status-icon-wrap,
.status-banner.pending .status-badge {
    background: rgba(250, 204, 21, 0.95);
    color: var(--dark);
    border-color: rgba(255, 255, 255, 0.35);
}

.status-banner-text h3 {
    font-size: 20px;
    font-weight: 700;
}

.status-banner-text p {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 3px;
    line-height: 1.5;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.info-card {
    background: var(--light);
    border-radius: 12px;
    padding: 20px 22px;
    border: 1px solid var(--border);
}

.info-card .info-label {
    font-size: 12px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-card .info-label i {
    color: var(--primary);
    font-size: 12px;
}

.info-card .info-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.4;
    word-break: break-word;
}

.info-card .info-value.highlight {
    color: var(--primary);
    font-size: 16px;
}

.route-card {
    background: var(--light);
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 24px 28px 28px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.route-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-visual {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr);
    align-items: start;
    gap: 40px;
    width: 100%;
    position: relative;
}

.route-point {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 9px;
    position: relative;
    z-index: 2;
}

.route-origin {
    grid-column: 1;
}

.route-destination {
    grid-column: 2;
}

.route-dot {
    width: 66px;
    height: 66px;
    border-radius: 20px;
    background: var(--secondary);
    color: var(--primary);
    border: 1px solid rgba(250, 204, 21, 0.75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 12px 24px rgba(250, 204, 21, 0.22);
    flex-shrink: 0;
}

.route-dot i {
    font-size: 28px;
    color: var(--dark);
    line-height: 1;
}

.route-destination .route-dot i {
    font-size: 26px;
}

.route-sub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 800;
    background: rgba(37, 99, 235, 0.10);
    border: 1px solid rgba(37, 99, 235, 0.12);
    backdrop-filter: blur(8px);
    padding: 5px 11px;
    border-radius: 999px;
    line-height: 1;
}

.route-label {
    font-size: 16px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.35;
    word-break: break-word;
    max-width: 220px;
}

.route-line {
    position: absolute;
    top: 32px;
    left: 25%;
    right: 25%;
    height: 3px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: repeating-linear-gradient(
        90deg,
        rgba(37, 99, 235, 0.92) 0,
        rgba(37, 99, 235, 0.92) 9px,
        transparent 9px,
        transparent 17px
    );
    z-index: 1;
    pointer-events: none;
}

.route-line::before,
.route-line::after {
    display: none;
}

/* ---- Timeline ---- */
.timeline-card {
    background: var(--light);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 24px 28px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.timeline-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline {
    position: relative;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    display: grid;
    grid-template-columns: 96px 34px minmax(0, 1fr);
    gap: 0 14px;
    align-items: stretch;
    position: relative;
    padding-bottom: 18px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-time {
    text-align: right;
    padding-top: 16px;
}

.timeline-time .t-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--dark);
}

.timeline-time .t-hour {
    font-size: 11.5px;
    color: #8a8a8a;
    margin-top: 3px;
}

.timeline-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.t-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    z-index: 2;
    margin-top: 18px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.t-dot.active {
    background: #0f6b3a;
    box-shadow: 0 0 0 4px rgba(15, 107, 58, 0.14);
}

.t-dot.done {
    background: var(--primary);
}

.t-dot.pending {
    background: var(--border);
    box-shadow: 0 0 0 4px rgba(229, 231, 235, 0.75);
}

.t-dot.failed {
    background: #b91c1c;
    box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.12);
}

.t-line {
    width: 2px;
    flex: 1;
    min-height: 44px;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.55), rgba(37, 99, 235, 0.12));
    margin: 6px 0 -6px;
}

.timeline-item:last-child .t-line {
    display: none;
}

.timeline-body {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 15px 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.timeline-body::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 22px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: rotate(45deg);
}

.timeline-body .t-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.35;
}

.timeline-item.is-active .t-title {
    color: #0f6b3a;
}

.timeline-item.is-failed .t-title {
    color: #b91c1c;
}

.timeline-body .t-desc {
    font-size: 13px;
    color: #727272;
    margin-top: 5px;
    line-height: 1.55;
}

.timeline-body .t-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    background: rgba(37, 99, 235, 0.07);
    padding: 4px 10px;
    border-radius: 50px;
}

/* ---- POD ---- */
.pod-card {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.14);
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.pod-preview {
    width: 116px;
    height: 92px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(37, 99, 235, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pod-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pod-preview-fallback {
    color: var(--primary);
    font-size: 28px;
}

.pod-content strong {
    display: block;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 10px;
}

.pod-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pod-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--primary);
    background: var(--primary);
    color: var(--light);
    border-radius: 8px;
    padding: 9px 12px;
    font-family: "Outfit", sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pod-action-btn.secondary {
    background: var(--light);
    color: var(--primary);
}

.pod-action-btn:hover {
    transform: translateY(-1px);
}

.pod-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
}

.pod-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pod-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(3px);
}

.pod-modal-card {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    background: var(--light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.30);
    display: flex;
    flex-direction: column;
}

.pod-modal-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.pod-modal-header span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #999;
    margin-bottom: 3px;
}

.pod-modal-header strong {
    font-size: 16px;
    color: var(--primary);
}

.pod-modal-header button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.pod-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px;
    overflow: hidden;
    background: #f8fafc;
}

.pod-modal-media {
    width: 100%;
    height: min(68vh, 640px);
    min-height: 360px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pod-modal-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #fff;
}

.pod-modal-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
    overflow: hidden;
}

body.pod-preview-open {
    overflow: hidden;
}


.not-found {
    display: none;
    text-align: center;
    padding: 50px 24px;
    background: var(--light);
    border-radius: 14px;
    border: 1px solid var(--border);
}

.not-found.show {
    display: block;
    animation: fadeSlideUp 0.4s ease forwards;
}

.not-found i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.not-found h3 {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 8px;
}

.not-found p {
    font-size: 14px;
    color: #999;
    line-height: 1.6;
}


.loading-spinner {
    display: none;
    text-align: center;
    padding: 50px 24px;
}

.loading-spinner.show {
    display: block;
}

.spinner-ring {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    font-size: 14px;
    color: #999;
}

@media (max-width: 900px) {
    .track-hero h1 {
        font-size: 30px;
    }

    .track-search-card {
        padding: 28px 24px;
    }

    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-item {
        grid-template-columns: 90px 28px 1fr;
    }
}

@media (max-width: 600px) {
    .wrapper-track-hero {
        padding: 60px 20px 80px;
    }

    .track-hero h1 {
        font-size: 24px;
    }

    .track-search-wrapper {
        margin-top: -36px;
    }

    .track-search-card {
        padding: 24px 18px;
        border-radius: 12px;
    }

    .search-input-row {
        flex-direction: column;
    }

    .search-input-row button {
        justify-content: center;
    }

    .info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .status-banner {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .route-card,
    .timeline-card {
        padding: 20px 18px;
    }

    .route-visual {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 18px;
    }

    .route-label {
        font-size: 12.5px;
    }

    .route-sub {
        font-size: 10.5px;
    }

    .timeline-item {
        grid-template-columns: 68px 24px 1fr;
        gap: 0 9px;
    }

    .timeline-time .t-date {
        font-size: 11px;
    }

    .timeline-time .t-hour {
        font-size: 10.5px;
    }

    .timeline-body .t-title {
        font-size: 13.5px;
    }

    .wrapper-result {
        padding: 40px 16px 60px;
    }

    .pod-card {
        grid-template-columns: 1fr;
    }

    .pod-preview {
        width: 100%;
        height: 140px;
    }

    .pod-actions {
        flex-direction: column;
    }

    .pod-action-btn {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 400px) {
    .track-hero h1 {
        font-size: 21px;
    }

    .info-card {
        padding: 14px 12px;
    }

    .info-card .info-label {
        font-size: 10px;
        letter-spacing: 0.35px;
    }

    .info-card .info-value {
        font-size: 12.5px;
    }

    .timeline-time {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .route-card {
        padding: 22px 18px 24px;
    }

    .route-visual {
        grid-template-columns: minmax(96px, 1fr) minmax(96px, 1fr);
        gap: 18px;
    }

    .route-dot {
        width: 54px;
        height: 54px;
        border-radius: 16px;
    }

    .route-dot i {
        font-size: 23px;
    }

    .route-destination .route-dot i {
        font-size: 22px;
    }

    .route-line {
        top: 27px;
        left: calc(25% + 27px);
        right: calc(25% + 27px);
        border-top-width: 2px;
    }

    .route-label {
        font-size: 12.5px;
        max-width: 120px;
    }

    .route-sub {
        font-size: 10px;
        padding: 5px 9px;
    }

    .status-banner.delivered .status-badge {
        align-self: flex-start;
    }
}

.status-icon-wrap,
.status-banner.delivered .status-icon-wrap,
.status-banner.pending .status-icon-wrap,
.status-banner.failed .status-icon-wrap {
    background: rgba(37, 99, 235, 0.12) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(37, 99, 235, 0.18) !important;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.10) !important;
}

.status-delivery-icon svg {
    fill: currentColor !important;
}

.route-dot,
.route-dot.end {
    background: rgba(37, 99, 235, 0.12) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(37, 99, 235, 0.18) !important;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.10) !important;
}

.route-dot i,
.route-destination .route-dot i {
    color: var(--primary) !important;
}

.route-line {
    top: 33px !important;
    left: 25% !important;
    right: 25% !important;
    height: 0 !important;
    border: 0 !important;
    border-top: 3px dashed rgba(37, 99, 235, 0.34) !important;
    background: transparent !important;
    border-radius: 0 !important;
    z-index: 1 !important;
}

.route-point {
    z-index: 2 !important;
}

.route-sub {
    background: rgba(37, 99, 235, 0.10) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(37, 99, 235, 0.14) !important;
}

@media (max-width: 600px) {
    .route-line {
        top: 27px !important;
        left: 25% !important;
        right: 25% !important;
        border-top: 2px dashed rgba(37, 99, 235, 0.34) !important;
    }
}

.status-banner.delivered .status-icon-wrap {
    background: var(--secondary) !important;
    color: var(--dark) !important;
    border: 1px solid rgba(250, 204, 21, 0.78) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 12px 24px rgba(250, 204, 21, 0.22) !important;
}

.status-banner.delivered .status-delivery-icon svg {
    fill: var(--dark) !important;
}

.status-banner.delivered .status-badge {
    background: var(--secondary) !important;
    color: var(--dark) !important;
    border-color: rgba(255, 255, 255, 0.34) !important;
    box-shadow: 0 10px 20px rgba(250, 204, 21, 0.18) !important;
}

.status-banner.delivered .status-badge .badge-check-dot {
    background: #16a34a !important;
    color: #fff !important;
}

.route-line {
    top: 33px !important;
    left: calc(25% + 33px) !important;
    right: calc(25% + 33px) !important;
    height: 3px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: repeating-linear-gradient(
        90deg,
        rgba(37, 99, 235, 0.34) 0,
        rgba(37, 99, 235, 0.34) 10px,
        transparent 10px,
        transparent 18px
    ) !important;
    z-index: 1 !important;
}

@media (max-width: 600px) {
    .route-line {
        top: 27px !important;
        left: calc(25% + 27px) !important;
        right: calc(25% + 27px) !important;
        height: 2px !important;
        background: repeating-linear-gradient(
            90deg,
            rgba(37, 99, 235, 0.34) 0,
            rgba(37, 99, 235, 0.34) 8px,
            transparent 8px,
            transparent 14px
        ) !important;
    }
}
