@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@500;600;700;800&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --navy: #3B0764;
    --navy-2: #4C1D95;
    --blue: #6D28D9;
    --blue-hover: #5B21B6;
    --blue-soft: rgba(109, 40, 217, 0.11);
    --orange: #F59E0B;
    --orange-soft: rgba(245, 158, 11, 0.14);
    --paper: #F5F3FF;
    --bg: #F5F3FF;
    --surface: #FFFFFF;
    --ink: #1E1B4B;
    --muted: #6B6385;
    --line: rgba(109, 40, 217, 0.16);
    --ok: #059669;
    --ok-soft: #DCFCE7;
    --warn: #D97706;
    --warn-soft: #FEF3C7;
    --danger: #DC2626;
    --danger-soft: #FEE2E2;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 10px rgba(59, 7, 100, 0.05);
    --shadow-md: 0 8px 26px rgba(59, 7, 100, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
    font-family: 'Cairo', 'Tajawal', system-ui, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

.w-head {
    position: sticky; top: 0; z-index: 60;
    background: rgba(59, 7, 100, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    border-bottom: 1.5px solid var(--orange);
}
.w-wrap { max-width: 1180px; margin: 0 auto; padding: 0 14px; }
.w-head-in { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 10px; }
.w-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.w-brand svg { width: 38px; height: 34px; flex-shrink: 0; }
.w-brand-txt { display: flex; flex-direction: column; gap: 2px; }
.w-brand-ar { font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.w-brand-en { font-size: 0.6rem; color: #DDD6FE; letter-spacing: 0.16em; font-weight: 700; }
.w-badge-new {
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    color: #3B0764; font-size: 0.7rem; font-weight: 800;
    padding: 4px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
}

/* أزرار بنمط تطبيقات الهاتف الحديثة */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 40px; padding: 0 16px; border-radius: 13px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink); font-family: inherit; font-size: 0.85rem; font-weight: 700;
    cursor: pointer; text-decoration: none; transition: transform .14s ease, box-shadow .18s ease, background .18s ease;
    box-shadow: var(--shadow-sm);
}
.btn:active { transform: scale(0.96); }
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary {
    background: linear-gradient(135deg, #4C1D95 0%, #6D28D9 100%);
    border-color: transparent; color: #fff;
    box-shadow: 0 6px 16px rgba(109, 40, 217, 0.28);
}
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.orange {
    background: linear-gradient(135deg, #FBBF24 0%, #D97706 100%);
    border-color: transparent; color: #3B0764;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.30);
}
.btn.sm { min-height: 33px; padding: 0 12px; font-size: 0.76rem; border-radius: 10px; }

/* بطاقات أنيقة ناعمة */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-md);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 1rem; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 8px; }

/* شارات الحالات والمنصات */
.pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
}
.pill.pending { background: #FEF3C7; color: #B45309; }
.pill.shipped, .pill.warehouse { background: #DBEAFE; color: #1D4ED8; }
.pill.ready { background: #F3E8FF; color: #6D28D9; }
.pill.delivered { background: var(--ok-soft); color: var(--ok); }

.plat-chip {
    display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 8px;
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.03em; color: #fff;
}
.plat-SHEIN { background: #1E1B4B; }
.plat-TEMU { background: #EA580C; }
.plat-Trendyol { background: #D97706; }
.plat-AliExpress { background: #DC2626; }
.plat-Amazon { background: #3B0764; }
.plat-other { background: #6D28D9; }

.input, select.input, textarea.input {
    width: 100%; min-height: 42px; padding: 8px 13px;
    border: 1.5px solid #E9D5FF; border-radius: 12px;
    background: #FAF8FF; color: var(--ink); font-family: inherit; font-size: 0.86rem; font-weight: 600;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.input:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.14); }
.f { display: flex; flex-direction: column; gap: 5px; font-size: 0.78rem; font-weight: 700; color: var(--ink); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 820px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
table.t th { text-align: right; padding: 9px 8px; background: #F8FAFC; border-bottom: 1.5px solid var(--line); color: var(--muted); font-weight: 700; white-space: nowrap; }
table.t td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.num { font-family: 'Tajawal', ui-monospace, monospace; direction: ltr; unicode-bidi: isolate; font-weight: 700; }
