@import url('index.css');

:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #2563eb;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.tracking-page {
    max-width: 1360px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(16px, 2.5vw, 36px);
}

.tracking-header {
    margin-bottom: 24px;
}

.brand {
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 700;
    margin: 0 0 6px;
}

h1,
h2,
h3 {
    margin: 0;
}

.subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

.tracking-container {
    display: grid;
    gap: 20px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.hero-card {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.hero-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.label {
    color: var(--muted);
    margin: 0 0 8px;
}

.order-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    color: var(--muted);
    font-size: 14px;
}

.status-pill {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    background: #e2e8f0;
    color: #0f172a;
}

.status-loading {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-progress {
    background: #fef3c7;
    color: #92400e;
}

.status-delivered {
    background: #dcfce7;
    color: #166534;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.message-box {
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 600;
}

.message-box.info {
    background: #eff6ff;
    color: #1d4ed8;
}

.message-box.success {
    background: #dcfce7;
    color: #166534;
}

.message-box.warning {
    background: #fef3c7;
    color: #92400e;
}

.message-box.error {
    background: #fee2e2;
    color: #991b1b;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.info-card h3 {
    margin-bottom: 16px;
}

.info-list {
    display: grid;
    gap: 12px;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 10px;
}

.info-list span {
    color: var(--muted);
}

.address-box {
    line-height: 1.7;
    color: var(--text);
    min-height: 72px;
}

.amount-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 16px;
}

.amount-box strong {
    font-size: 20px;
    color: var(--primary);
}

.table-wrap {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.products-table th,
.products-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.products-table th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 14px;
}

.products-table td {
    color: var(--text);
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 24px !important;
}

.timeline {
    display: grid;
    gap: 14px;
}

.timeline-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.timeline .dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-top: 4px;
    background: #cbd5e1;
    border: 3px solid #e2e8f0;
    flex: 0 0 16px;
}

.timeline-item.done .dot {
    background: var(--success);
    border-color: #bbf7d0;
}

.timeline-item.active .dot {
    background: var(--primary);
    border-color: #bfdbfe;
}

.timeline-item.cancelled .dot {
    background: var(--danger);
    border-color: #fecaca;
}

.timeline-content strong {
    display: block;
    margin-bottom: 4px;
}

.timeline-content span {
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 860px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }

    .order-meta {
        align-items: flex-start;
    }
}

@media (max-width: 600px) {

    .track-container,
    .track-page,
    .order-container {
        width: 100%;
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .table-wrap {
        margin-left: -4px;
        margin-right: -4px;
    }
}