/* ==================== GROCESTA ORDER TRACKING v2.4 - COMPLETE FIX ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f5f6fa;
    color: #212121;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c8e6c9;
    border-radius: 3px;
}

/* ========== NAVBAR ========== */
.navbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 12px 25px;
    background: linear-gradient(135deg, #1b5e20, #2e7d32, #43a047);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    gap: 12px;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.6rem;
    color: #fff;
}

.site-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.nav-center {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.page-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-right {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.home-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    padding: 20px 15px 40px;
    min-height: calc(100vh - 65px);
}

.container {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.tracking-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ========== ANIMATIONS ========== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes activeDotPulse {
    0%, 100% { box-shadow: 0 0 0 5px rgba(46, 125, 50, 0.15); }
    50% { box-shadow: 0 0 0 10px rgba(46, 125, 50, 0.05); }
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== ORDER HEADER CARD ========== */
.order-header-card {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    border-radius: 16px;
    padding: 22px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(46, 125, 50, 0.3);
    animation: slideDown 0.5s ease;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.order-id-section {
    min-width: 0;
    flex: 1;
}

.order-label {
    display: block;
    font-size: 0.72rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.order-id-text {
    font-size: 1.15rem;
    font-weight: 700;
    word-break: break-all;
    line-height: 1.3;
}

/* Status Pill */
.order-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    animation: dotPulse 1.5s infinite;
    flex-shrink: 0;
}

.order-status-pill.confirmed .status-dot { background: #4caf50; }
.order-status-pill.packed .status-dot { background: #2196f3; }
.order-status-pill.shipped .status-dot,
.order-status-pill.out_for_delivery .status-dot { background: #ff9800; }
.order-status-pill.delivered .status-dot { background: #4caf50; animation: none; }
.order-status-pill.cancelled .status-dot { background: #f44336; animation: none; }

.header-bottom {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.header-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    opacity: 0.9;
}

.header-info-item i {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ========== PROGRESS BAR ========== */
.progress-bar-section {
    background: #fff;
    border-radius: 14px;
    padding: 24px 22px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.6s ease 0.15s both;
}

.progress-track {
    position: relative;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin: 16px 16px 14px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2e7d32, #66bb6a);
    border-radius: 3px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-vehicle {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    box-shadow: 0 3px 12px rgba(46, 125, 50, 0.35);
    transition: left 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #757575;
    padding: 0 4px;
}

.progress-labels span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.progress-labels i {
    color: #2e7d32;
    font-size: 0.7rem;
}

/* ========== TIMELINE SECTION ========== */
.timeline-section {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.6s ease 0.25s both;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212121;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: #2e7d32;
    font-size: 0.95rem;
}

.timeline {
    display: flex;
    flex-direction: column;
}

/* ===== Timeline Step ===== */
.timeline-step {
    display: flex;
    gap: 14px;
    opacity: 0.4;
    transition: opacity 0.4s ease, transform 0.3s ease;
}

.timeline-step.completed,
.timeline-step.active {
    opacity: 1;
}

/* Step Dot Area */
.step-dot-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30px;
    flex-shrink: 0;
}

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.6rem;
    z-index: 1;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.timeline-step.completed .step-dot {
    background: #2e7d32;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.timeline-step.active .step-dot {
    background: #2e7d32;
    box-shadow: 0 0 0 5px rgba(46, 125, 50, 0.15);
    animation: activeDotPulse 2s infinite;
}

/* Step Line */
.step-line {
    width: 3px;
    flex: 1;
    min-height: 20px;
    background: #e0e0e0;
    transition: background 0.4s ease;
}

.timeline-step.completed .step-line {
    background: #2e7d32;
}

.timeline-step.active .step-line {
    background: linear-gradient(to bottom, #2e7d32, #e0e0e0);
}

/* FIXED: Hide last step's connector line */
.timeline-step:last-child .step-line {
    display: none;
}

/* Step Card */
.step-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

.timeline-step.active .step-card {
    background: rgba(46, 125, 50, 0.04);
    border-color: rgba(46, 125, 50, 0.15);
    box-shadow: 0 2px 12px rgba(46, 125, 50, 0.08);
}

.timeline-step.completed .step-card {
    background: #fff;
    border-color: rgba(46, 125, 50, 0.08);
}

/* Step Icon */
.step-icon-wrap {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9e9e9e;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.timeline-step.completed .step-icon-wrap,
.timeline-step.active .step-icon-wrap {
    background: linear-gradient(135deg, #2e7d32, #66bb6a);
    color: #fff;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.25);
}

/* Step Info */
.step-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.step-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #757575;
    margin-bottom: 1px;
    transition: color 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-step.completed .step-info h4,
.timeline-step.active .step-info h4 {
    color: #212121;
}

.step-info p {
    font-size: 0.75rem;
    color: #9e9e9e;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-time {
    font-size: 0.72rem;
    color: #bdbdbd;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.timeline-step.completed .step-time,
.timeline-step.active .step-time {
    color: #2e7d32;
    font-weight: 500;
}

/* Step Badge */
.step-badge {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #f0f0f0;
    color: #9e9e9e;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
    min-width: fit-content;
}

.step-badge.done {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
}

.step-badge.current {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    animation: badgePulse 2s infinite;
}

/* ========== CANCELLED CARD ========== */
.cancelled-card {
    background: #fff;
    border-radius: 14px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid #ffcdd2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.5s ease;
}

.cancelled-icon-wrap {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #e53935, #ef5350);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
}

.cancelled-card h3 {
    color: #e53935;
    font-size: 1.2rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.cancelled-card p {
    color: #757575;
    font-size: 0.88rem;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

.cancelled-time {
    font-size: 0.78rem;
    color: #9e9e9e;
    display: block;
    margin-top: 10px;
}

/* ========== DELIVERY PARTNER CARD ========== */
.partner-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    border: 1px solid rgba(46, 125, 50, 0.12);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.5s ease 0.3s both;
}

.partner-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.partner-card-top h3 {
    font-size: 0.9rem;
    color: #1b5e20;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #2e7d32;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.live-blink {
    width: 6px;
    height: 6px;
    background: #2e7d32;
    border-radius: 50%;
    animation: dotPulse 1.5s infinite;
    flex-shrink: 0;
}

.partner-body {
    display: flex;
    align-items: center;
    gap: 14px;
}

.partner-avatar {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, #2e7d32, #66bb6a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
    overflow: hidden;
}

.partner-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.partner-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.partner-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #212121;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.partner-vehicle-info {
    font-size: 0.78rem;
    color: #757575;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.partner-vehicle-info i {
    color: #2e7d32;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.partner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.partner-call-btn,
.partner-chat-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.partner-call-btn {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: #fff;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.3);
}

.partner-call-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.4);
}

.partner-chat-btn {
    background: #25d366;
    color: #fff;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
}

.partner-chat-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

/* ========== ORDER ITEMS CARD ========== */
.items-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.6s ease 0.35s both;
}

/* ========== ADDRESS CARD ========== */
.address-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.6s ease 0.4s both;
}

/* Shared Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 10px;
}

.card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #212121;
}

.card-header h3 i {
    color: #2e7d32;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.item-count-tag {
    font-size: 0.72rem;
    padding: 3px 10px;
    background: rgba(46, 125, 50, 0.08);
    color: #2e7d32;
    border-radius: 50px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Items List */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c8e6c9 transparent;
    padding-right: 2px;
}

.items-list::-webkit-scrollbar {
    width: 4px;
}

.items-list::-webkit-scrollbar-thumb {
    background: #c8e6c9;
    border-radius: 2px;
}

/* Order Item Row */
.order-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
    transition: border-color 0.2s;
}

.order-item-row:hover {
    border-color: #c8e6c9;
}

.item-img {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
}

.item-img-placeholder {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2e7d32, #66bb6a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.item-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #212121;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta {
    font-size: 0.72rem;
    color: #9e9e9e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-price {
    font-weight: 600;
    color: #1b5e20;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========== BILL SECTION ========== */
.bill-section {
    border-top: 1px dashed #e0e0e0;
    padding-top: 14px;
}

.bill-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.85rem;
    color: #616161;
}

.bill-row span:first-child {
    flex: 1;
    min-width: 0;
}

.bill-row span:last-child {
    flex-shrink: 0;
    text-align: right;
}

.total-bill-row {
    border-top: 2px solid #e0e0e0;
    margin-top: 8px;
    padding-top: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1b5e20;
}

.green-text {
    color: #2e7d32;
    font-weight: 600;
}

/* Payment Info */
.payment-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-top: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #616161;
    flex-wrap: wrap;
}

.payment-info-row i {
    color: #2e7d32;
    flex-shrink: 0;
}

.pay-tag {
    margin-left: auto;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.pay-tag.paid {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
}

.pay-tag.pending {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.pay-tag.cod {
    background: rgba(25, 118, 210, 0.1);
    color: #1976d2;
}

/* Skeleton Loading */
.loading-skeleton {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-row {
    height: 55px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: shimmer 1.5s infinite;
}

/* ========== ADDRESS SECTION ========== */
.address-body {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
    align-items: flex-start;
}

.address-icon-box {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: linear-gradient(135deg, #2e7d32, #66bb6a);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.address-text {
    flex: 1;
    font-size: 0.85rem;
    color: #616161;
    line-height: 1.6;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.address-text strong {
    display: block;
    color: #212121;
    font-size: 0.9rem;
    margin-bottom: 3px;
    font-weight: 600;
}

.address-phone {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    color: #2e7d32;
    font-weight: 500;
    font-size: 0.82rem;
}

.address-phone i {
    font-size: 0.72rem;
}

/* ========== BOTTOM ACTION BUTTONS ========== */
.bottom-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 130px;
    padding: 13px 16px;
    border: none;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    outline: none;
}

.action-btn:active {
    transform: scale(0.97);
}

.help-btn {
    background: linear-gradient(135deg, #2e7d32, #66bb6a);
    color: #fff;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

.help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.reorder-btn {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
}

.reorder-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.home-action-btn {
    background: #fff;
    color: #2e7d32;
    border: 2px solid #2e7d32;
}

.home-action-btn:hover {
    background: #2e7d32;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.2);
}

/* ========== TOAST ========== */
.toast-wrap {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    pointer-events: none;
    width: 90%;
    max-width: 420px;
}

.toast-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #2e7d32;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    width: 100%;
}

.toast-box.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-box.success { border-left-color: #2e7d32; }
.toast-box.error { border-left-color: #e53935; }
.toast-box.info { border-left-color: #1976d2; }

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast-box.success .toast-icon { color: #2e7d32; }
.toast-box.error .toast-icon { color: #e53935; }
.toast-box.info .toast-icon { color: #1976d2; }

.toast-text {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: #424242;
    min-width: 0;
    word-wrap: break-word;
}

.toast-dismiss {
    background: none;
    border: none;
    color: #bdbdbd;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    transition: all 0.2s;
}

.toast-dismiss:hover {
    background: #f5f5f5;
    color: #757575;
}

/* ========== LOADING SCREEN ========== */
.loading-screen {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.loading-inner {
    text-align: center;
}

.loader-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #e0e0e0;
    border-top-color: #2e7d32;
    border-radius: 50%;
    margin: 0 auto 14px;
    animation: spin 0.8s linear infinite;
}

.loading-inner p {
    color: #757575;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========== RESPONSIVE - TABLET ========== */
@media (max-width: 768px) {
    .navbar {
        grid-template-columns: 1fr;
        padding: 10px 15px;
        gap: 8px;
    }

    .nav-left {
        display: none;
    }

    .nav-center {
        order: -1;
        justify-content: center;
    }

    .nav-right {
        justify-content: center;
    }

    .page-title {
        font-size: 0.95rem;
    }

    .btn-text {
        display: none;
    }

    .nav-btn {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .main-content {
        padding: 12px 10px 30px;
    }

    .tracking-wrapper {
        gap: 12px;
    }

    /* Header Card */
    .order-header-card {
        padding: 18px;
        border-radius: 14px;
    }

    .header-top {
        flex-direction: column;
        gap: 10px;
    }

    .order-status-pill {
        align-self: flex-start;
    }

    .header-bottom {
        gap: 14px;
    }

    /* Progress Bar */
    .progress-bar-section {
        padding: 18px 16px 14px;
    }

    .progress-track {
        margin: 14px 12px 12px;
    }

    /* Timeline */
    .timeline-section {
        padding: 18px;
    }

    .step-card {
        padding: 12px;
        gap: 10px;
    }

    .step-icon-wrap {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 0.95rem;
    }

    .step-badge {
        font-size: 0.6rem;
        padding: 2px 8px;
    }

    /* Partner Card */
    .partner-card {
        padding: 16px;
    }

    .partner-body {
        flex-wrap: wrap;
        gap: 12px;
    }

    .partner-details {
        flex: 1;
        min-width: calc(100% - 130px);
    }

    .partner-actions {
        width: 100%;
        justify-content: flex-start;
        padding-left: 64px;
        margin-top: 2px;
    }

    /* Items Card */
    .items-card,
    .address-card {
        padding: 16px;
    }

    .items-list {
        max-height: 280px;
    }

    /* Buttons */
    .bottom-actions {
        flex-direction: column;
        gap: 8px;
    }

    .action-btn {
        min-width: unset;
        width: 100%;
    }

    /* Toast */
    .toast-wrap {
        bottom: 16px;
        width: 94%;
    }
}

/* ========== RESPONSIVE - SMALL MOBILE ========== */
@media (max-width: 400px) {
    .navbar {
        padding: 8px 12px;
    }

    .page-title {
        font-size: 0.88rem;
    }

    .order-header-card {
        padding: 14px;
        border-radius: 12px;
    }

    .order-id-text {
        font-size: 1.05rem;
    }

    .order-status-pill {
        font-size: 0.72rem;
        padding: 4px 10px;
    }

    .header-info-item {
        font-size: 0.75rem;
    }

    .header-bottom {
        gap: 10px;
    }

    /* Timeline small */
    .timeline-step {
        gap: 10px;
    }

    .step-dot-area {
        width: 24px;
    }

    .step-dot {
        width: 24px;
        height: 24px;
        font-size: 0.5rem;
    }

    .step-card {
        padding: 10px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .step-icon-wrap {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .step-info h4 {
        font-size: 0.8rem;
    }

    .step-info p {
        font-size: 0.68rem;
    }

    .step-time {
        font-size: 0.68rem;
    }

    .step-badge {
        font-size: 0.58rem;
        padding: 2px 7px;
    }

    /* Progress small */
    .progress-track {
        margin: 12px 8px 10px;
    }

    .progress-vehicle {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .progress-labels {
        font-size: 0.68rem;
    }

    /* Partner small */
    .partner-avatar {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 1.1rem;
    }

    .partner-name {
        font-size: 0.88rem;
    }

    .partner-actions {
        padding-left: 56px;
    }

    .partner-call-btn,
    .partner-chat-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 0.9rem;
    }

    /* Items small */
    .order-item-row {
        padding: 8px 10px;
        gap: 10px;
    }

    .item-img,
    .item-img-placeholder {
        width: 38px;
        height: 38px;
        min-width: 38px;
        border-radius: 6px;
    }

    .item-name {
        font-size: 0.8rem;
    }

    .item-meta {
        font-size: 0.68rem;
    }

    .item-price {
        font-size: 0.82rem;
    }

    /* Bill small */
    .bill-row {
        font-size: 0.8rem;
    }

    .total-bill-row {
        font-size: 0.95rem;
    }

    .payment-info-row {
        font-size: 0.75rem;
        padding: 8px 10px;
    }

    /* Address small */
    .address-body {
        padding: 12px;
        gap: 10px;
    }

    .address-icon-box {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .address-text {
        font-size: 0.8rem;
    }

    .address-text strong {
        font-size: 0.85rem;
    }

    /* Buttons small */
    .action-btn {
        padding: 12px 14px;
        font-size: 0.82rem;
    }

    /* Cancelled small */
    .cancelled-card {
        padding: 24px 16px;
    }

    .cancelled-icon-wrap {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .cancelled-card h3 {
        font-size: 1.1rem;
    }

    .cancelled-card p {
        font-size: 0.82rem;
    }

    /* Section title small */
    .section-title {
        font-size: 0.9rem;
    }

    .card-header h3 {
        font-size: 0.88rem;
    }
}

/* ========== RESPONSIVE - VERY SMALL ========== */
@media (max-width: 340px) {
    .order-header-card {
        padding: 12px;
    }

    .order-id-text {
        font-size: 0.95rem;
    }

    .step-card {
        padding: 8px;
    }

    .step-icon-wrap {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 0.75rem;
    }

    .partner-actions {
        padding-left: 0;
        justify-content: center;
    }

    .items-list {
        max-height: 220px;
    }
}

/* ========== PRINT ========== */
@media print {
    .navbar,
    .bottom-actions,
    .toast-wrap,
    .loading-screen,
    .partner-actions,
    .progress-bar-section {
        display: none !important;
    }

    .main-content {
        padding: 0;
    }

    body {
        background: #fff;
    }

    .order-header-card {
        box-shadow: none;
        border: 1px solid #ddd;
        color: #212121;
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .order-header-card .status-dot {
        animation: none;
    }

    .items-card,
    .address-card,
    .timeline-section,
    .partner-card,
    .cancelled-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .items-list {
        max-height: none;
        overflow: visible;
    }

    .timeline-step {
        opacity: 1 !important;
    }
}