/* ============================================================
   Tera Computer — order tracking page
   ============================================================ */

.track-intro {
    max-width: 58ch;
    margin: -10px 0 30px;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--slate);
}

.track-form {
    max-width: 420px;
    padding: 26px 26px 28px;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}

.track-result {
    max-width: 620px;
    padding: 28px;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
}

.track-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.track-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 2px;
}

.track-number {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
}

.track-status {
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--ice-soft);
    color: var(--blue-700);
    border: 1.5px solid var(--line);
}

.track-status--delivered { background: #e8f7ee; color: #1c6b3f; border-color: #bce3cc; }
.track-status--cancelled { background: #fdeef0; color: #a8293a; border-color: #f2c7cd; }
.track-status--pending   { background: #fff3e6; color: var(--amber-deep); border-color: #ffd9b0; }

[data-theme="dark"] .track-status--delivered { background: #123122; color: #7fdba6; border-color: #1e4d33; }
[data-theme="dark"] .track-status--cancelled { background: #331319; color: #ff9aa6; border-color: #522029; }
[data-theme="dark"] .track-status--pending   { background: #33230f; color: #ffc98a; border-color: #533a18; }

.track-placed {
    margin: 10px 0 26px;
    font-size: 0.85rem;
    color: var(--slate);
}

/* ---------- Progress track ---------- */

.track-progress {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: grid;
    gap: 0;
}

.track-progress li {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 0 0 22px 0;
}

/* The connecting rail is drawn from each dot down to the next one, and
   omitted on the last stage so the line doesn't dangle. */
.track-progress li:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 26px;
    bottom: 0;
    width: 1.5px;
    background: var(--line);
}

.track-progress li.is-done:not(:last-child)::before { background: var(--blue-500); }

.track-dot {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 25px; height: 25px;
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--surface);
    color: var(--white);
    border: 1.5px solid var(--line);
    border-radius: 50%;
}

.track-progress .is-done .track-dot { background: var(--blue-500); border-color: var(--blue-500); color: var(--white); }
.track-progress .is-current .track-dot { background: var(--blue-700); border-color: var(--blue-700); }

.track-progress .is-current .track-dot::after {
    content: '';
    width: 7px; height: 7px;
    background: var(--white);
    border-radius: 50%;
}

.track-progress div { display: flex; flex-direction: column; gap: 3px; padding-top: 2px; }
.track-progress strong { font-size: 0.9rem; font-weight: 600; color: var(--slate); }
.track-progress span { font-size: 0.83rem; color: var(--slate); line-height: 1.5; }
.track-progress .is-done strong,
.track-progress .is-current strong { color: var(--ink); }

.track-cancelled {
    padding: 15px 17px;
    margin-bottom: 26px;
    font-size: 0.87rem;
    line-height: 1.6;
    background: #fdeef0;
    color: #8f2331;
    border: 1.5px solid #f2c7cd;
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .track-cancelled { background: #2a1116; color: #ffb3bc; border-color: #522029; }

/* ---------- Items ---------- */

.track-items {
    padding-top: 22px;
    margin-bottom: 24px;
    border-top: 1.5px solid var(--line-soft);
}

.track-items h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.98rem;
    margin: 0 0 14px;
}

.track-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    align-items: baseline;
    padding: 8px 0;
    font-size: 0.87rem;
    border-bottom: 1px solid var(--line-soft);
}

.track-item-name { line-height: 1.4; }
.track-item-qty { font-family: var(--font-mono); font-size: 0.82rem; color: var(--slate); }
.track-item-total { font-family: var(--font-mono); font-weight: 600; }

.track-total {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    font-size: 0.9rem;
    font-weight: 600;
}

.track-total span:last-child {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    color: var(--amber-deep);
}
