/* ===== Page Header ===== */
.page-head {
    max-width: 800px;
    margin: 0 auto;
    padding: 34px 28px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.head-content {
    flex: 1;
    min-width: 0;
}

.head-content h1 {
    font-size: 2.1rem;
    color: var(--dark);
    font-weight: 400;
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
}

.head-content h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
}

.head-content .sub {
    color: var(--muted);
    font-size: .92rem;
    margin-top: 10px;
    text-transform: none;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1.5px solid var(--red);
    color: var(--red);
    padding: 11px 18px;
    border-radius: 6px;
    font-weight: 800;
    font-size: .74rem;
    letter-spacing: .6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .18s ease;
    flex-shrink: 0;
    text-decoration: none;
}

.btn-back:hover {
    background: var(--red);
    color: #fff;
}

/* ===== Button Styles ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 800;
    font-size: .85rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s ease;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn:not(.outline) {
    background: var(--red);
    color: #fff;
    box-shadow: 0 2px 8px rgba(200,16,46,.3);
}

.btn:not(.outline):hover {
    background: var(--red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200,16,46,.4);
}

.btn:not(.outline):active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(200,16,46,.3);
}

.btn.outline {
    background: transparent;
    border: 1.5px solid var(--red);
    color: var(--red);
}

.btn.outline:hover {
    background: var(--red);
    color: #fff;
}

/* ===== Content Wrap ===== */
.track-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 26px 28px 50px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    flex: 1 0 auto;
    min-height: 60vh;
}

/* ===== Order Card ===== */
.order-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== Order Top Card ===== */
.order-top-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.order-id-block h3 {
    font-size: 1.15rem;
    color: var(--dark);
    font-weight: 800;
    letter-spacing: .3px;
}

.order-id-block h3 .num {
    color: var(--red);
}

.order-id-block .date {
    color: var(--muted);
    font-size: .85rem;
    margin: 6px 0 12px;
    text-transform: none;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: .75rem;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
}

.status-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-badge.status-new,
.status-badge.status-confirmed {
    background: #e3f2fd;
    color: #1565c0;
}
.status-badge.status-new::before,
.status-badge.status-confirmed::before {
    background: #1565c0;
}

.status-badge.status-preparing {
    background: #fff3e0;
    color: #e65100;
}
.status-badge.status-preparing::before {
    background: #e65100;
}

.status-badge.status-ready {
    background: #e8f5e9;
    color: #28733a;
}
.status-badge.status-ready::before {
    background: #28733a;
}

.status-badge.status-completed {
    background: #e3f2fd;
    color: #1565c0;
}
.status-badge.status-completed::before {
    background: #1565c0;
}

.status-badge.status-cancelled {
    background: #ffebee;
    color: #c62828;
}
.status-badge.status-cancelled::before {
    background: #c62828;
}

.ready-block {
    text-align: right;
}

.ready-block .lbl {
    font-size: .82rem;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: none;
}

.ready-block .time {
    font-size: 1.4rem;
    color: var(--green);
    font-weight: 800;
    font-family: 'Archivo Black';
}

/* ===== Stepper ===== */
.stepper-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    padding: 36px 30px 30px;
    overflow: hidden;
}

.stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}

.stepper::before {
    content: "";
    position: absolute;
    top: 26px;
    left: 55px;
    right: 55px;
    height: 3px;
    background: var(--line);
    z-index: 0;
    border-radius: 2px;
}

.stepper .fill-line {
    position: absolute;
    top: 26px;
    left: 55px;
    right: 55px;
    height: 3px;
    background: var(--green);
    z-index: 1;
    border-radius: 2px;
    transform-origin: left center;
    transition: transform 0.5s ease;
}

.step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.step-dot {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--paper);
    border: 3px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #c8bdb5;
    margin-bottom: 14px;
    transition: all 0.3s ease;
}

.step.done .step-dot {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.step.current .step-dot {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 115, 58, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 115, 58, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 115, 58, 0);
    }
}

.step h4 {
    font-size: .9rem;
    color: var(--dark);
    font-weight: 800;
    text-transform: none;
    font-family: 'Inter';
    margin-bottom: 4px;
}

.step span {
    font-size: .8rem;
    color: var(--muted);
    text-transform: none;
}

.status-msg {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #e8f5e9;
    border: 1px solid #cdeacf;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 28px;
}

.status-msg i {
    color: var(--green);
    font-size: 1.3rem;
    margin-top: 2px;
    flex: none;
}

.status-msg strong {
    display: block;
    color: var(--dark);
    font-size: .92rem;
    margin-bottom: 2px;
    text-transform: none;
    font-family: 'Inter';
}

.status-msg p {
    font-size: .85rem;
    color: var(--muted);
    margin-top: 4px;
}

/* ===== Order Grid ===== */
.order-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    align-items: start;
}

/* ===== Order Items ===== */
.order-items-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    padding: 24px 26px;
}

.order-items-card h3 {
    font-size: 1rem;
    color: var(--dark);
    font-weight: 800;
    letter-spacing: .5px;
    margin-bottom: 16px;
}

.oi-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.oi-row:last-of-type {
    border-bottom: none;
}

.oi-info {
    flex: 1;
    min-width: 0;
}

.oi-info h4 {
    font-family: 'Inter';
    font-weight: 800;
    font-size: .92rem;
    text-transform: none;
    margin-bottom: 3px;
    color: var(--dark);
}

.oi-info .tag {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    margin-top: 2px;
    line-height: 1.3;
}

.tag-sauce {
    color: #1565c0;
}

.tag-extra {
    color: var(--red);
}

.oi-price {
    width: 75px;
    text-align: right;
    font-weight: 800;
    color: var(--red);
    font-size: .92rem;
    flex: none;
    padding-top: 4px;
}

/* ===== Side Cards ===== */
.order-side-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.summary-card,
.details-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    padding: 22px 24px;
}

.summary-card h3,
.details-card h3 {
    font-size: 1rem;
    color: var(--dark);
    font-weight: 800;
    letter-spacing: .5px;
    margin-bottom: 14px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: .88rem;
    color: var(--text);
    padding: 8px 0;
}

.summary-line span:first-child {
    color: var(--muted);
}

.total-line {
    border-top: 1px solid var(--line);
    margin-top: 6px;
    padding-top: 14px;
    font-weight: 800;
    font-size: 1.05rem;
}

.total-line span:first-child {
    color: var(--dark);
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: .4px;
}

.total-price {
    color: var(--red);
    font-weight: 800;
}

.detail-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item i {
    color: var(--red);
    font-size: .95rem;
    margin-top: 3px;
    width: 16px;
    flex: none;
}

.detail-item .lbl {
    font-size: .74rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 2px;
    display: block;
}

.detail-item .val {
    font-size: .88rem;
    color: var(--dark);
    font-weight: 600;
    line-height: 1.4;
}

/* ===== Notification Banner ===== */
.notify-banner {
    background: #fff3d6;
    border: 1px solid #f5d896;
    border-radius: 14px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.notify-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.notify-left > i {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    font-size: 1.2rem;
    flex: none;
    box-shadow: var(--shadow-sm);
}

.notify-left strong {
    display: block;
    color: var(--dark);
    font-size: .92rem;
    margin-bottom: 2px;
}

.notify-left p {
    color: var(--muted);
    font-size: .82rem;
}

.heart-icon {
    color: var(--red);
    font-size: 1.3rem;
}

/* ===== Empty State ===== */
.empty-orders {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-orders i {
    font-size: 64px;
    color: var(--line);
    margin-bottom: 20px;
    display: block;
}

.empty-orders h3 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 8px;
    text-transform: none;
    font-family: 'Inter';
}

.empty-orders p {
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* ===== Search form ===== */
.track-search-wrap {
    max-width: 800px;
    margin: 20px auto 0;
    padding: 0 28px;
}

.track-search-form {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
}

.search-input-group {
    display: flex;
    gap: 10px;
    position: relative;
}

.search-input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    z-index: 2;
    pointer-events: none;
}

.search-input-group .field {
    flex: 1;
    padding: 14px 16px 14px 44px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    font-size: .9rem;
    width: 100%;
    background: var(--cream);
    transition: all .2s ease;
    font-family: inherit;
}

.search-input-group .field:focus {
    outline: none;
    border-color: var(--red);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(200,16,46,.1);
}

.search-input-group .field::placeholder {
    color: var(--muted);
}

.search-input-group .btn {
    flex-shrink: 0;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 800;
    font-size: .82rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s ease;
    border: none;
    background: var(--red);
    color: #fff;
    box-shadow: 0 2px 8px rgba(200,16,46,.3);
}

.search-input-group .btn:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200,16,46,.4);
}

.search-input-group .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(200,16,46,.3);
}

.error-message {
    background: #fdeceb;
    border: 1px solid #f6cfcc;
    color: var(--red);
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: .85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .page-head {
        flex-direction: column;
        gap: 16px;
    }
    
    .btn-back {
        align-self: flex-start;
        padding: 10px 16px;
        font-size: .7rem;
    }
    
    .order-grid {
        grid-template-columns: 1fr;
    }
    
    .order-side-cards {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .summary-card,
    .details-card {
        flex: 1;
        min-width: 250px;
    }
}

@media (max-width: 560px) {
    .page-head {
        padding: 24px 16px 0;
    }
    
    .head-content h1 {
        font-size: 1.6rem;
    }
    
    .head-content .sub {
        font-size: .85rem;
        line-height: 1.4;
    }
    
    .btn-back {
        padding: 8px 14px;
        font-size: .68rem;
    }
    
    .track-wrap {
        padding: 18px 16px 24px;
        gap: 16px;
        min-height: 50vh;
    }
    
    .track-search-wrap {
        padding: 0 16px;
        margin: 16px auto 0;
    }
    
    .track-search-form {
        padding: 16px;
        border-radius: 10px;
    }
    
    .search-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input-group i {
        left: 14px;
        top: 22px;
    }
    
    .search-input-group .field {
        padding: 14px 16px 14px 40px;
        font-size: .85rem;
    }
    
    .search-input-group .btn {
        width: 100%;
        padding: 14px 20px;
        font-size: .8rem;
        justify-content: center;
    }
    
    .order-top-card {
        padding: 18px;
        flex-direction: column;
        gap: 16px;
    }
    
    .order-id-block h3 {
        font-size: 1rem;
    }
    
    .ready-block {
        text-align: left;
    }
    
    .ready-block .time {
        font-size: 1.2rem;
    }
    
    .stepper-card {
        padding: 22px 16px 18px;
    }
    
    .stepper::before,
    .stepper .fill-line {
        left: 30px;
        right: 30px;
        top: 20px;
    }
    
    .step-dot {
        width: 40px;
        height: 40px;
        font-size: .95rem;
        margin-bottom: 8px;
    }
    
    .step h4 {
        font-size: .72rem;
    }
    
    .step span {
        font-size: .65rem;
    }
    
    .status-msg {
        padding: 14px 16px;
        margin-top: 20px;
    }
    
    .order-items-card,
    .summary-card,
    .details-card {
        padding: 18px;
        border-radius: 10px;
    }
    
    .oi-row {
        gap: 10px;
        padding: 12px 0;
    }
    
    .oi-info h4 {
        font-size: .85rem;
    }
    
    .oi-price {
        width: 65px;
        font-size: .85rem;
    }
    
    .order-side-cards {
        flex-direction: column;
        gap: 16px;
    }
    
    .notify-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    
    .heart-icon {
        display: none;
    }
    
    .error-message {
        font-size: .8rem;
        padding: 10px 12px;
    }
}

@media (max-width: 360px) {
    .head-content h1 {
        font-size: 1.4rem;
    }
    
    .step h4 {
        font-size: .65rem;
    }
    
    .step-dot {
        width: 35px;
        height: 35px;
        font-size: .85rem;
    }
    
    .stepper::before,
    .stepper .fill-line {
        left: 25px;
        right: 25px;
    }
}