/*
 |--------------------------------------------------------------------------
 | صفحة تتبع الشحنة العلنية
 |--------------------------------------------------------------------------
 | صفحة مستقلة عن لوحة Filament ولا تحتاج أي عملية بناء (npm).
 | ألوان الهوية: أخضر داكن #0D4231 ، ذهبي #B79034 ، كريمي #F8F4EC
 */

:root {
    --green: #0D4231;
    --gold: #B79034;
    --cream: #F8F4EC;
    --ink: #18181B;
    --muted: #71717A;
    --line: #E7E5E0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(1200px 400px at 50% -160px, rgba(13, 66, 49, .10), transparent),
        var(--cream);
    color: var(--ink);
    font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Arial", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem;
}

/* ───────────────── الترويسة ───────────────── */

.head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(13, 66, 49, .18);
}

.head h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--green);
    letter-spacing: -.02em;
}

.head-sub {
    margin: .15rem 0 0;
    color: var(--muted);
    font-size: .9rem;
}

/* ───────────────── البحث ───────────────── */

.search {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.search input {
    flex: 1;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: .75rem;
    padding: .8rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.search input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(13, 66, 49, .12);
}

.search button {
    background: var(--green);
    color: #fff;
    border: 0;
    border-radius: .75rem;
    padding: .8rem 1.6rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}

.search button:hover {
    background: #0a3527;
}

.search button:active {
    transform: translateY(1px);
}

/* ───────────────── البطاقات ───────────────── */

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.5rem;
}

.card-title {
    margin: 0 0 1.15rem;
    font-size: 1.05rem;
    color: var(--green);
}

.tracking-no {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
}

.muted {
    color: var(--muted);
    font-size: .8125rem;
}

.status-badge {
    color: #fff;
    border-radius: 9999px;
    padding: .4rem 1.1rem;
    font-size: .875rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ───────────────── شريط الخطوات ───────────────── */

.steps {
    display: flex;
    align-items: center;
    margin-bottom: 1.75rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    flex-shrink: 0;
}

.step-dot {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 2px solid var(--line);
    color: var(--muted);
    font-weight: 700;
    font-size: .9rem;
    transition: all .2s ease;
}

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

.step-label {
    font-size: .75rem;
    color: var(--muted);
    text-align: center;
    white-space: nowrap;
}

.step-done .step-label {
    color: var(--green);
    font-weight: 600;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--line);
    margin: 0 .35rem;
    margin-bottom: 1.35rem;
}

.step-line-done {
    background: var(--green);
}

/* ───────────────── تفاصيل ───────────────── */

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem 1.25rem;
}

.fact {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.fact strong {
    font-size: .95rem;
    font-weight: 600;
}

/* ───────────────── الخط الزمني ───────────────── */

.timeline {
    position: relative;
    padding-inline-start: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    inset-inline-start: .3125rem;
    inset-block: .5rem;
    width: 2px;
    background: var(--line);
}

.tl-row {
    position: relative;
    padding-bottom: 1.25rem;
}

.tl-row:last-child {
    padding-bottom: 0;
}

.tl-dot {
    position: absolute;
    inset-inline-start: -1.5rem;
    inset-block-start: .35rem;
    width: .75rem;
    height: .75rem;
    border-radius: 9999px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--line);
}

.tl-title {
    font-weight: 600;
    font-size: .95rem;
}

.tl-time {
    font-size: .75rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.tl-note {
    margin-top: .35rem;
    font-size: .8125rem;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: .5rem;
    padding: .45rem .65rem;
}

/* ───────────────── حالات أخرى ───────────────── */

.alert {
    border-radius: .75rem;
    padding: .8rem 1rem;
    font-size: .875rem;
    margin-bottom: 1.25rem;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.alert-warn {
    background: #FEF3C7;
    color: #854D0E;
    border: 1px solid #FCD34D;
    margin-bottom: 1.5rem;
}

.empty {
    text-align: center;
}

.empty-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background: var(--cream);
    color: var(--gold);
    font-size: 1.75rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
}

.empty h2 {
    margin: 0 0 .35rem;
    font-size: 1.15rem;
}

.empty p {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}

.foot {
    text-align: center;
    color: var(--muted);
    font-size: .8125rem;
    padding-top: 1rem;
}

/* ───────────────── QR + إثبات التسليم + تواصل (المرحلة الأولى) ───────────────── */

.qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    margin: 1.25rem 0;
    padding: 1rem;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: .75rem;
    text-align: center;
}

.qr-box svg {
    width: 120px;
    height: 120px;
}

.qr-box .muted {
    font-size: .8125rem;
}

.proof {
    margin: 1.25rem 0;
}

.proof .muted {
    display: block;
    margin-bottom: .5rem;
    font-size: .8125rem;
}

.proof img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: .75rem;
    border: 1px solid var(--line);
    display: block;
}

.support {
    display: block;
    text-align: center;
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #86EFAC;
    border-radius: .75rem;
    padding: .8rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.25rem;
}

.support:hover {
    background: #BBF7D0;
}
