/* ==========================================================================
   TRACK ORDER PAGE STYLES
   ========================================================================== */

body {
    background-color: #fdfbf9;
}

/* --- Breadcrumbs --- */
.breadcrumbs-trackorder {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
    padding: 20px 0;
}
.breadcrumbs-trackorder a {
    color: #4a2f1d;
    text-decoration: none;
    font-weight: 500;
}
.breadcrumbs-trackorder svg {
    width: 14px;
    height: 14px;
}

/* --- Hero Banner --- */
.track-hero {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fffaf6 0%, #fae6cb 100%);
    border-radius: 20px;
    padding: 40px 60px;
    gap: 40px;
    box-shadow: 0 10px 30px rgba(232, 93, 4, 0.04);
    margin-bottom: 30px;
    overflow: hidden;
}
.track-hero-content {
    flex: 1.5;
}
.track-hero-content .hero-title {
    font-size: 38px;
    font-weight: 800;
    color: #4a2f1d;
    margin-bottom: 12px;
}
.track-hero-content .highlight-orange {
    color: #e85d04;
}
.track-hero-content .hero-desc {
    font-size: 15px;
    color: #666;
    max-width: 500px;
    line-height: 1.5;
}
.track-hero-graphic {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
.graphic-device-wrapper {
    background: white;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    width: 280px;
    overflow: hidden;
}
.tablet-mock {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
}

/* --- Track Actions (Single/Multiple Input Block) --- */
.track-actions-container {
    display: flex;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    margin-bottom: 40px;
    align-items: stretch;
    padding: 40px;
    gap: 40px;
}
.track-action-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.track-action-box h3 {
    font-size: 18px;
    font-weight: 800;
    color: #4a2f1d;
    margin-bottom: 6px;
}
.action-subtitle {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

/* Single Form */
.single-track-form {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.track-input-field {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
    height: 48px;
    transition: border-color 0.2s;
}
.track-input-field:focus {
    border-color: #e85d04;
}
.btn-track-submit {
    background: #e85d04;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 600;
    height: 48px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-track-submit:hover {
    background: #dc2f02;
}
.track-example {
    font-size: 12px;
    color: #999;
}

/* OR Divider */
.track-divider-or {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.track-divider-or span {
    background: white;
    border: 1px solid #eee;
    color: #888;
    font-size: 12px;
    font-weight: 700;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.track-divider-or::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: #eee;
    z-index: 1;
}

/* Excel Multiple Track */
.excel-drag-zone {
    border: 2px dashed #fae6cb;
    border-radius: 12px;
    background: #fffdfb;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}
.excel-drag-zone:hover {
    border-color: #e85d04;
    background: #fffbf7;
}
.upload-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff0eb;
    color: #e85d04;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.upload-icon-circle i {
    width: 20px;
    height: 20px;
}
.excel-drag-zone h4 {
    font-size: 14px;
    font-weight: 700;
    color: #4a2f1d;
    margin-bottom: 4px;
}
.file-limits {
    font-size: 11px;
    color: #999;
}
.download-template-row {
    display: flex;
    justify-content: center;
}
.btn-download-template {
    background: white;
    border: 1px solid #ddd;
    color: #666;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.btn-download-template:hover {
    border-color: #e85d04;
    color: #e85d04;
}

/* --- Benefits Bar --- */
.track-benefits-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    margin-bottom: 40px;
}
.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.benefit-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #fff5f6;
    color: #e54d60;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.benefit-icon i {
    width: 18px;
    height: 18px;
}
.benefit-item h4 {
    font-size: 13px;
    font-weight: 800;
    color: #4a2f1d;
    margin-bottom: 2px;
}
.benefit-item p {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}

/* --- Tabs & Filter Section --- */
.track-filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 0;
    margin-bottom: 30px;
}
.filter-tabs {
    display: flex;
    gap: 30px;
}
.tab-btn {
    background: transparent;
    border: none;
    padding: 16px 0;
    font-size: 14px;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.tab-btn:hover {
    color: #e54d60;
}
.tab-btn.active {
    color: #e54d60;
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e54d60;
}
.btn-filter-orders {
    background: white;
    border: 1px solid #ddd;
    color: #666;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-filter-orders:hover {
    border-color: #888;
    color: #333;
}

/* --- Order status cards --- */
.order-card-wrapper {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    overflow: hidden;
}
.order-card-header {
    background: #fffdfb;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.order-id {
    font-size: 15px;
    color: #4a2f1d;
}
.badge-transit {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #3b82f6;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
}
.badge-delivered {
    background: #eefbf4;
    border: 1px solid #c2ebd0;
    color: #10b981;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
}
.header-meta {
    font-size: 13px;
    color: #666;
}
.header-meta strong {
    color: #333;
}
.badge-payment-success {
    color: #10b981;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.btn-view-invoice {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 6px;
}
.btn-view-invoice:hover {
    border-color: #ef4444;
    color: #ef4444;
}
.collapse-icon {
    color: #888;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

/* Card Body */
.order-card-body {
    padding: 28px;
}
.details-top-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 28px;
    margin-bottom: 24px;
}
.col-title {
    font-size: 14px;
    font-weight: 800;
    color: #4a2f1d;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.col-title i {
    width: 16px;
    height: 16px;
    color: #e85d04;
}
.address-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}
.address-text strong {
    color: #333;
    font-size: 14px;
}
.address-text .mobile {
    display: block;
    margin-top: 8px;
    font-weight: 600;
    color: #4a2f1d;
}

/* Timeline */
.progress-col {
    display: flex;
    align-items: center;
}
.progress-timeline {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}
.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 120px;
    position: relative;
}
.node-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f4f4f5;
    border: 2px solid #e4e4e7;
    color: #a1a1aa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 2;
    transition: all 0.2s;
}
.node-circle i {
    width: 14px;
    height: 14px;
}
.node-info {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
}
.node-title {
    font-size: 12px;
    font-weight: 700;
    color: #71717a;
}
.node-date, .node-time {
    font-size: 11px;
    color: #a1a1aa;
}

/* Lines */
.timeline-line {
    flex: 1;
    height: 2px;
    background: #e4e4e7;
    margin-top: -46px;
    z-index: 1;
}

/* Timeline State Rules */
.timeline-step.completed .node-circle {
    background: #eefbf4;
    border-color: #22c55e;
    color: #22c55e;
}
.timeline-step.completed .node-title {
    color: #1e293b;
}
.timeline-step.completed .node-date, .timeline-step.completed .node-time {
    color: #64748b;
}
.timeline-line.completed {
    background: #22c55e;
}

.timeline-step.active .node-circle {
    background: #fff0eb;
    border-color: #e85d04;
    color: #e85d04;
    box-shadow: 0 0 0 4px #ffe6de;
}
.timeline-step.active .active-truck {
    background: #e85d04;
    color: white;
}
.timeline-step.active .node-title {
    color: #e85d04;
    font-weight: 800;
}
.timeline-step.active .node-date, .timeline-step.active .node-time {
    color: #e85d04;
}

/* Details Bottom Grid */
.details-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 240px 240px;
    gap: 40px;
}
.items-row {
    display: flex;
    gap: 20px;
}
.item-thumbnails {
    display: grid;
    grid-template-columns: repeat(2, 44px);
    gap: 8px;
}
.item-thumbnails img {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: #fdfbf9;
    border: 1px solid #eee;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.items-text-list {
    list-style: none;
    font-size: 13px;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.items-text-list li {
    font-weight: 500;
}
.more-items {
    color: #e85d04;
    font-weight: 700 !important;
}

.partner-info-text, .eta-date-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}
.partner-name {
    color: #333;
}
.btn-track-map {
    margin-top: 14px;
    background: white;
    border: 1px solid #e85d04;
    color: #e85d04;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-track-map:hover {
    background: #fff5f2;
}

.mt-4 { margin-top: 30px; }

/* --- Bottom Layout Cards --- */
.track-bottom-cards {
    display: grid;
    grid-template-columns: 280px 1fr 340px;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
    align-items: stretch;
}
.bottom-card {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.bottom-card h3 {
    font-size: 16px;
    font-weight: 800;
    color: #4a2f1d;
    margin-bottom: 16px;
}

/* Why Track List */
.why-track-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.why-track-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}
.why-track-list li i {
    width: 15px;
    height: 15px;
    color: #10b981;
    flex-shrink: 0;
}

/* Track Multiple promo card */
.track-multiple-promo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fffcf9;
    border-color: #fae6cb;
    gap: 20px;
}
.promo-text {
    flex: 1.5;
}
.promo-text p {
    font-size: 12px;
    color: #888;
    margin-bottom: 20px;
    line-height: 1.5;
}
.btn-upload-promo {
    background: #e85d04;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    margin-bottom: 12px;
}
.btn-upload-promo:hover {
    background: #dc2f02;
}
.promo-download-link {
    font-size: 12px;
    color: #e85d04;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.promo-graphic-sheet {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.dummy-doc {
    width: 80px;
    height: 90px;
    background: white;
    border: 1px solid #fae6cb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 20px rgba(232, 93, 4, 0.05);
}
.dummy-doc .doc-icon {
    width: 32px;
    height: 32px;
    color: #10b981;
}
.dummy-doc .doc-badge {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #22c55e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}
.dummy-doc .doc-badge i {
    width: 12px;
    height: 12px;
}

/* Contact support card */
.track-help-card {
    display: flex;
    flex-direction: column;
}
.help-desc-text {
    font-size: 12px;
    color: #666;
    margin-bottom: 16px;
}
.help-contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.help-contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #4a2f1d;
    font-weight: 600;
}
.help-contact-list li i {
    width: 16px;
    height: 16px;
    color: #e85d04;
}
.help-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 16px;
}
.btn-contact-support {
    flex: 1;
    background: white;
    border: 1px solid #ddd;
    color: #666;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-contact-support:hover {
    border-color: #e85d04;
    color: #e85d04;
}
.box-thumb {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 6px;
    background: #fdfbf9;
    border: 1px solid #eee;
    mix-blend-mode: multiply;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 992px) {
    .track-hero {
        flex-direction: column;
        padding: 40px 30px;
        text-align: center;
        gap: 30px;
    }
    .track-hero-content .hero-desc {
        margin: 0 auto;
    }
    .track-actions-container {
        flex-direction: column;
        padding: 30px;
        gap: 30px;
    }
    .track-divider-or {
        margin: 10px 0;
    }
    .track-divider-or::before {
        top: 50%;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: 1px;
    }
    .track-benefits-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    .details-top-grid, .details-bottom-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .track-bottom-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .track-benefits-bar {
        grid-template-columns: 1fr;
    }
    .single-track-form {
        flex-direction: column;
        align-items: stretch;
    }
    .track-input-field {
        width: 100%;
        box-sizing: border-box;
        height: 50px;
        min-height: 50px;
        flex: none; /* Prevent flex collapsing in column mode */
    }
    .btn-track-submit {
        width: 100%;
        height: 50px;
        min-height: 50px;
    }
    .track-hero {
        padding: 30px 20px;
    }
    .track-hero-content .hero-title {
        font-size: 28px;
    }
    
    /* Vertical Timeline for Mobile */
    .progress-col {
        overflow-x: visible;
        padding-bottom: 0;
        width: 100%;
    }
    .progress-timeline {
        min-width: 0;
        flex-direction: column;
        align-items: flex-start;
    }
    .timeline-step {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        width: 100%;
        gap: 16px;
    }
    .node-circle {
        flex-shrink: 0;
    }
    .node-info {
        margin-top: 0;
        align-items: flex-start;
    }
    .timeline-line {
        width: 2px;
        height: 30px;
        margin: 4px 0 4px 15px; /* aligns line to center of 32px circle */
        flex: none;
    }
    
    /* Order Header & Tabs */
    .track-filter-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .filter-tabs {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        gap: 20px;
        padding-bottom: 8px; /* Room for scrollbar */
    }
    .btn-filter-orders {
        width: 100%;
        justify-content: center;
    }
    .order-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Order Items */
    .items-row {
        flex-direction: column;
        gap: 16px;
    }
    .item-thumbnails {
        grid-template-columns: repeat(4, 44px);
    }
}
