/* ============================================================
   Kabaten Admin — Design Tokens (مصدر وحيد للألوان)
   هوية اللوجو: بني الخبز · بني الشاورما · ذهبي القشرة · أحمر الطماطم
   ============================================================ */
:root {
    /* ---- Brand / Ember ---- */
    --brand-300:#E8A06B; --brand-400:#DE7F42; --brand-500:#C0562A;
    --brand-600:#A5461F; --brand-700:#833715;

    /* ---- Semantic (الحالات فقط) ---- */
    --gold-500:#E0A44E;    --gold-600:#C9883A;
    --success-500:#2F8F5B; --success-600:#237045;
    --danger-500:#D93A2B;  --danger-600:#BB2C20;
    /* درجات مشتقّة من نفس العائلات (تدرّجات الأشرطة والشارات) */
    --success-400:#3AA76D; --success-50:#DFF3E8;  --success-150:#CBEBDA;
    --danger-400:#E5584A;  --danger-50:#FDE4E0;   --danger-150:#FAD3CD;
    --scroll:#CBD2DA;
    --scrim:rgba(19,25,34,.55);   /* حجاب النوافذ المنبثقة — من عائلة cocoa-900 */

    /* ---- Graphite neutrals ---- */
    --bg:#F3F4F6; --surface:#FFFFFF; --surface-2:#F8F9FB;
    --border:#E6E8EC; --border-2:#EDEFF2;
    --text:#1C2530; --text-muted:#6B7686; --text-soft:#9AA4B2;

    /* ---- Sidebar (فحمي غامق) ---- */
    --side1:#2A3340; --side2:#1B222C; --side-ico:#9DA8B6;
    --cocoa-800:#1B222C; --cocoa-900:#131922;   /* tooltip / أغمق */

    /* ---- أسطح مساعدة ---- */
    --bg-grad: radial-gradient(1100px 460px at 88% -10%, #FBEADD 0%, transparent 55%);
    --grid:#EDEFF2; --barbg:#EDEFF2;
    --icbg1:#FCE7D6; --icbg2:#F6CBAA;
    --topbar1:rgba(255,255,255,.9); --topbar2:rgba(255,255,255,.72);

    /* ---- الشكل والظل والحركة ---- */
    --radius:20px; --radius-card:20px; --radius-ctl:13px;
    --shadow-sm:0 1px 2px rgba(20,28,40,.05), 0 4px 12px rgba(30,41,59,.06);
    --shadow:0 2px 6px rgba(20,28,40,.05), 0 18px 40px -14px rgba(30,41,59,.16);
    --shadow-lg:0 10px 26px -6px rgba(30,41,59,.20), 0 30px 60px -20px rgba(15,23,42,.24);
    --t-fast:160ms; --t-base:220ms; --ease:cubic-bezier(.4,0,.2,1);

    /* ============================================================
       Aliases — الأسماء المستهلكة بالكود تشير للتوكنز أعلاه
       (كل var قائم يظل شغّال بدون لمس بنية الصفحات)
       ============================================================ */
    --brand: var(--brand-500);   --brand-dark: var(--brand-600);
    --caramel: var(--gold-500);  --caramel-soft: var(--icbg1);
    --bread: var(--text-muted);  --bread-dark: var(--text);
    --cocoa: var(--cocoa-900);
    --page-bg: var(--bg);        --bg-base: var(--bg);
    --text-dim: var(--text-muted);
    --text-faint: var(--text-soft);
    --line: var(--border);       --card-border: var(--border-2);
    --card-shadow: var(--shadow);
    --card-shadow-hover: var(--shadow-lg);
    --success: var(--success-600);  --success-100:#E8F3ED;  --success-bg: var(--success-100);
    --danger:  var(--danger-600);   --danger-100:#FDE7E4;   --danger-bg:  var(--danger-100);
    --danger-200: var(--danger-150);
    --warn:    var(--gold-600);     --gold-100:#FBEEDC;     --warn-bg:    var(--gold-100);
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Cairo', 'Poppins', 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--page-bg);
    min-height: 100vh;
}

/* خلفية فاتحة دافئة + توهّجات خفيفة جدًا */
body {
    background: var(--bg-grad), var(--bg);
    background-attachment: fixed;
}

/* ===== كرت مرتفع (Elevated surface) — أبيض بظِل دافي وزوايا كبيرة ===== */
.glass {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
/* شريط علوي 4px بتدرّج brand → gold */
.glass::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-400), var(--gold-500));
    opacity: .9;
    pointer-events: none;
    z-index: 1;
}
.glass:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.glass > * { position: relative; z-index: 2; }

/* ===== كروت الإحصاءات ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.stat-card {
    padding: 24px 26px;
    animation: fadeUp 0.5s ease both;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand-300);
    box-shadow: var(--shadow-lg);
}
.stat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 600;
}
.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--icbg1), var(--icbg2));
    border: none;
    color: var(--brand-600);
}
.stat-value {
    margin-top: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}
.v-brand   { color: var(--brand); }
.v-caramel { color: var(--caramel); }
.v-success { color: var(--success); }
.v-danger  { color: var(--danger); }
.stat-sub {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-dim);
}

/* ===== أزرار العلامة ===== */
.brand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 18px;
    border: none;
    border-radius: var(--radius-ctl);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(145deg, var(--brand-400), var(--brand-600));
    box-shadow: 0 10px 22px -8px rgba(192,86,42,.6), inset 0 1px 0 rgba(255,255,255,.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.brand-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.brand-btn.ghost {
    background: rgba(192, 86, 42, .07);
    color: var(--brand-600);
    border: 1px solid rgba(192, 86, 42, .26);
    box-shadow: none;
}
.brand-btn.ghost:hover { background: rgba(192, 86, 42, .12); }
.brand-btn.caramel {
    background: linear-gradient(145deg, var(--brand-400), var(--brand-600));
    color: #fff;
    box-shadow: 0 10px 22px -8px rgba(192,86,42,.6), inset 0 1px 0 rgba(255,255,255,.2);
}

/* ===== تسجيل الدخول ===== */
.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
/* كرت الدخول: بلا الشريط العلوي (يبان "مقصوص" بكرت واحد) وفراغ مجمّع */
.login-card {
    width: 100%;
    max-width: 400px;
    padding: 34px 36px 30px;
    text-align: center;
    animation: fadeUp 0.6s ease both;
}
.login-card::before { display: none; }
.login-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 19px;
    display: grid;
    place-items: center;
    font-size: 1.9rem;
    color: #fff;
    background: linear-gradient(145deg, var(--brand-400), var(--brand-600));
    box-shadow: 0 12px 26px -8px rgba(192,86,42,.55), inset 0 1px 0 rgba(255,255,255,.25);
}
/* لون صلب — التدرّج بهالحجم بيطلع متقطّع */
.login-title {
    font-size: 1.55rem; font-weight: 800; margin: 0 0 5px;
    color: var(--text);
    background: none; -webkit-text-fill-color: currentColor; letter-spacing: -.3px;
}
.login-sub { color: var(--text-dim); margin: 0 0 26px; font-size: 0.9rem; }
.field { text-align: start; margin-bottom: 18px; }
.field label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 700; }

/* حقل بأيقونة جوّاه — خلفية بيضا وحد واضح */
.input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-radius: var(--radius-ctl);
    border: 1.5px solid var(--border);
    background: var(--surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-wrap .mud-icon-root { color: var(--text-soft); flex-shrink: 0; font-size: 1.15rem; transition: color .2s ease; }
.input-wrap input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 14px 0;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
}
.input-wrap input::placeholder { color: var(--text-soft); }
.input-wrap:focus-within {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(192, 86, 42, .12);
}
.input-wrap:focus-within .mud-icon-root { color: var(--brand-500); }

.login-btn { margin-top: 22px; padding: 15px; font-size: 1.02rem; }
/* نلغي خلفية المتصفّح الزرقا للملء التلقائي — تكسر لون الثيم */
.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover,
.input-wrap input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 40px var(--surface) inset;
    caret-color: var(--text);
}
.login-error {
    display: flex;
    align-items: center;
    gap: 7px;
    justify-content: center;
    background: var(--danger-bg);
    border: 1px solid rgba(187, 44, 32, .22);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    margin-bottom: 16px;
}

/* ===== الشريط الجانبي + الرأس ===== */
.admin-shell { display: flex; min-height: 100vh; }
.side-rail {
    width: 88px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    background: linear-gradient(180deg, var(--side1), var(--side2));
    border-right: none;
    box-shadow: -6px 0 30px -10px rgba(15, 23, 42, .40);   /* الظل يقع باتجاه المحتوى (يسار) */
    position: relative;
    z-index: 5;
}
.rail-logo {
    width: 52px; height: 52px; border-radius: 16px;
    display: grid; place-items: center; margin-bottom: 18px;
    background: linear-gradient(145deg, var(--brand-400), var(--brand-600));
    color: #fff; font-weight: 900; font-size: 15px; letter-spacing: .5px;
    box-shadow: 0 8px 20px -6px rgba(192,86,42,.6), inset 0 1px 0 rgba(255,255,255,.25);
}
.rail-item {
    width: 50px; height: 50px; border-radius: 15px;
    display: grid; place-items: center; color: var(--side-ico);
    cursor: pointer; text-decoration: none; position: relative;
    transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.rail-item:hover { color: #fff; background: rgba(255,255,255,.08); }
.rail-item.active {
    color: #fff;
    background: linear-gradient(145deg, var(--brand-400), var(--brand-600));
    box-shadow: 0 8px 18px -5px rgba(192,86,42,.7), inset 0 1px 0 rgba(255,255,255,.25);
}
/* مؤشّر على الحافة الداخلية (جهة المحتوى) */
.rail-item.active::after {
    content: "";
    position: absolute; inset-inline-end: -20px; top: 50%;
    transform: translateY(-50%);
    width: 5px; height: 26px; border-radius: 5px;
    background: var(--brand-400);
    box-shadow: 0 0 14px 1px rgba(222,127,66,.8);
}
.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.top-bar {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    background: linear-gradient(180deg, var(--topbar1), var(--topbar2));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-2);
    box-shadow: 0 6px 22px -14px rgba(30,41,59,.30);
    position: sticky; top: 0; z-index: 4;
}
.top-title { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: 0; }
/* مجموعتان بالتوب بار (العنوان+الجرس بجنب بعض، وأدوات الجلسة بالطرف التاني) —
   بدل ما كل العناصر تتوزع لحالها بمسافات متساوية وتخلي الجرس معلّق لحاله. */
.top-bar-start, .top-bar-end { display: flex; align-items: center; gap: 14px; }
/* اسم المطعم الرئيسي بلوحة المطعم: أيقونة حرف + سطرين (لوحة المطعم / الاسم) */
.brand-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-title-mark {
    width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center;
    font-size: 20px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--brand-500, #d9713a), var(--brand-600, #c0562a));
    box-shadow: 0 6px 14px rgba(192, 86, 42, .28);
}
.brand-title-logo, .rail-logo-img { object-fit: contain; background: #fff; padding: 3px; }
.brand-title-mark.brand-title-logo { width: 60px; height: 60px; border-radius: 16px; }
.side-rail.wide .rail-logo.rail-logo-img { width: 52px; height: 52px; border-radius: 14px; }
.brand-title-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-title-eyebrow { font-size: 11px; font-weight: 600; color: var(--text-muted, #8a7a70); letter-spacing: .02em; }
.brand-title-name {
    font-size: 20px; font-weight: 800; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px;
}
@media (max-width: 720px) { .brand-title-name { max-width: 180px; } }
/* قائمة تبديل الفرع (BranchSwitcher) */
.branch-switch { min-width: 180px; }
/* موبايل: الشريط العلوي بيلتف لسطرين (الاسم فوق، والأدوات تحته) بدل ما يطلع برا الشاشة */
@media (max-width: 720px) {
    .top-bar { height: auto; min-height: 64px; flex-wrap: wrap; row-gap: 8px; padding: 10px 12px; }
    .top-bar-end { gap: 8px; flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
    .branch-switch { min-width: 0; flex: 1 1 auto; max-width: 200px; }
}
/* افتراضيًا على خلفية فاتحة (داخل الصفحات) */
.icon-btn {
    width: 42px; height: 42px; border-radius: var(--radius-ctl); border: none;
    display: grid; place-items: center; cursor: pointer;
    background: rgba(192, 86, 42, .08); color: var(--brand-600);
    transition: background var(--t-base) var(--ease), transform var(--t-base) var(--ease);
    text-decoration: none;
}
.icon-btn:hover { background: rgba(192, 86, 42, .16); transform: scale(1.04); }
/* زر الطاقة بالتوب بار — برتقالي متدرّج */
.top-bar .icon-btn {
    width: 46px; height: 46px; border-radius: 14px;
    background: linear-gradient(145deg, var(--brand-400), var(--brand-600));
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(192,86,42,.55);
}
.top-bar .icon-btn:hover { background: linear-gradient(145deg, var(--brand-400), var(--brand-700)); }
/* زر تبديل اللغة (ع / EN) — حبة صغيرة، اللغة الحالية مظلّلة */
.lang-toggle {
    display: inline-flex; align-items: center; gap: 2px; padding: 4px; height: 46px; box-sizing: border-box;
    border-radius: 14px; background: var(--surface, #fff); border: 1px solid rgba(192,86,42,.25);
    text-decoration: none; flex-shrink: 0; direction: ltr;
    transition: border-color var(--t-base) var(--ease);
}
.lang-toggle:hover { border-color: var(--brand-500); }
.lang-toggle span {
    min-width: 34px; height: 36px; display: grid; place-items: center; border-radius: 10px;
    font: 800 .82rem/1 "Poppins", "Cairo", sans-serif; color: var(--text-dim);
}
.lang-toggle span.on { background: linear-gradient(145deg, var(--brand-400), var(--brand-600)); color: #fff; }
/* بعرض الشاشة كامل — بلا حد أقصى (كان 1500px وبيترك فراغ عالأطراف بالشاشات العريضة) */
.page-body { padding: 30px 34px 40px; flex: 1; width: 100%; min-width: 0; box-sizing: border-box; }

/* ===== أدوات ===== */
.section-title {
    font-size: 1.05rem; font-weight: 700; color: var(--text);
    margin: 6px 0 16px; display: flex; align-items: center; gap: 10px;
}
.chip-date {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 16px; border-radius: 14px;
    background: var(--surface); color: var(--cocoa);
    border: 1px solid var(--line);
    font-weight: 700; font-size: 0.95rem;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   التايبوغرافي — تدرّج واضح + أرقام جدولية
   ============================================================ */
.page-h1 {
    font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.35rem);
    font-weight: 800; letter-spacing: -.5px; line-height: 1.1;
    background: linear-gradient(120deg, var(--text), var(--brand-500));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    width: fit-content;
}
.hero-value, .kpi-value, .stat-value, .quick-num, .pay-value, .cell-num, .cell-money {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}
.hero-value { font-size: clamp(2.8rem, 2rem + 3vw, 4.4rem); }
.section-title, .cell-title { color: var(--text); }

/* ============================================================
   الحركة — هادفة فقط، مع احترام تفضيل تقليل الحركة
   ============================================================ */
.stat-card, .setting-btn, .quick-link, .brand-btn, .icon-btn, .rail-item,
.filter-field, .form-input, .form-textarea, .field input, .seg button {
    transition-duration: var(--t-base);
    transition-timing-function: var(--ease);
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .stat-card:hover, .setting-btn:hover, .quick-link:hover,
    .brand-btn:hover, .icon-btn:hover { transform: none !important; }
}

/* زر أيقونة بحالة خطر (حذف) */
.icon-btn.danger { background: var(--danger-100); color: var(--danger-600); }
.icon-btn.danger:hover { background: var(--danger-200); }

/* شريط تمرير رفيع */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 20px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== شبكة Bento ===== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.bento-grid > .span2 { grid-column: span 2; }
@media (max-width: 1100px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-grid > .span2 { grid-column: span 2; }
}
@media (max-width: 640px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-grid > .span2 { grid-column: span 1; }
}

/* ===== كرت HERO (الرقم البطل) ===== */
.hero {
    padding: 28px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 210px;
    animation: fadeUp 0.5s ease both;
    /* تدرّج دافي خفيف بدل التوهّج الداكن */
    background-image: none;
}
.hero-label { display: flex; align-items: center; gap: 12px; color: var(--text-dim); font-weight: 600; }
.hero-value {
    font-family: 'Poppins', sans-serif;
    font-size: 4.6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    color: var(--brand-500);
    text-shadow: 0 10px 30px rgba(192, 86, 42, .22);
}
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }

/* شارة الفرق (delta) */
.delta {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px; border-radius: 999px;
    font-size: 0.82rem; font-weight: 800;
}
.delta { padding: 7px 12px; border-radius: 11px; font-size: 13px; }
.delta.up   { background: linear-gradient(145deg, var(--success-50), var(--success-150)); color: var(--success-600); }
.delta.down { background: linear-gradient(145deg, var(--danger-50), var(--danger-150)); color: var(--danger-600); }
.delta.flat { background: var(--surface-2); color: var(--text-muted); }

/* ===== كرت KPI صغير + شريط نسبة ===== */
.kpi { padding: 22px 24px; animation: fadeUp 0.5s ease both; display: flex; flex-direction: column; gap: 0; }
.kpi::before { display: none; }          /* كروت الحالة بدون شريط علوي — زي المرجع */
.kpi-head { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 15px; font-weight: 700; }
.kpi-dot { width: 11px; height: 11px; border-radius: 50%; }
.kpi-value { font-size: 44px; font-weight: 900; line-height: 1; margin: 16px 0 14px; }
.share-bar { height: 7px; border-radius: 6px; background: var(--barbg); overflow: hidden; }
.share-fill { height: 100%; border-radius: 6px; transition: width .9s var(--ease); }
.share-sub { margin-top: 12px; font-size: 13px; color: var(--text-muted); font-weight: 600; }

.c-brand   { color: var(--brand-500); }
.c-caramel { color: var(--gold-600); }
.c-success { color: var(--success-600); }
.c-danger  { color: var(--danger-500); }
.bg-brand   { background: var(--brand-500); }
.bg-caramel { background: linear-gradient(90deg, var(--gold-500), var(--gold-600)); }
.bg-success { background: linear-gradient(90deg, var(--success-400), var(--success-600)); }
.bg-danger  { background: linear-gradient(90deg, var(--danger-400), var(--danger-600)); }
/* نقطة الحالة تاخذ لون الحالة الفاتح */
.kpi-dot.bg-caramel { background: var(--gold-500); }
.kpi-dot.bg-success { background: var(--success-500); }
.kpi-dot.bg-danger  { background: var(--danger-500); }

/* كرت الرسم/الرابط داخل البنتو */
.bento-cell { padding: 22px 24px; animation: fadeUp 0.5s ease both; display: flex; flex-direction: column; }
.bento-cell .cell-title { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; margin-bottom: 12px; }

/* رابط سريع */
/* كرت المستخدمين — hero برتقالي متدرّج بنص أبيض */
.quick-link {
    padding: 26px; animation: fadeUp 0.5s ease both;
    display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
    text-decoration: none; cursor: pointer; position: relative; overflow: hidden;
    background: linear-gradient(150deg, var(--brand-500), var(--brand-700));
    border: none; color: #fff;
    transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.quick-link::before { display: none; }
/* دائرة توهّج بالزاوية */
.quick-link::after {
    content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.22), transparent 65%);
    top: -60px; inset-inline-start: -40px; pointer-events: none;
}
.quick-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.quick-link .kpi-head { color: #fff; font-size: 16px; }
.quick-link .stat-icon { background: rgba(255,255,255,.16); border: none; color: #fff; width: 48px; height: 48px; border-radius: 14px; }
.quick-link .share-sub { color: #fff; opacity: .95; font-size: 14px; font-weight: 700; margin-top: 0; }
.quick-num { font-size: 46px; font-weight: 900; color: #fff; text-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* ===== رأس الصفحة ===== */
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.page-h1 { font-size: 1.8rem; font-weight: 800; margin: 0; }
.page-hint { color: var(--text-dim); font-size: .85rem; margin-top: 2px; }

/* ===== شريط الفلاتر ===== */
.filter-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
    padding: 16px 18px; margin-bottom: 20px;
}
.filter-bar .mud-input-control { min-width: 200px; }
.filter-field {
    padding: 11px 15px; border-radius: var(--radius-ctl);
    border: 1px solid var(--border);
    background: var(--surface); color: var(--text);
    box-shadow: var(--shadow-sm);
    font-family: inherit; font-size: 14px; outline: none; min-width: 190px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.filter-field:focus { border-color: var(--brand-500); background: var(--surface); box-shadow: 0 0 0 3px rgba(192, 86, 42, .13); }
.filter-field::placeholder { color: var(--text-faint); }
/* حقل التاريخ الأصلي — تقويم فاتح */
.date-input { color-scheme: light; min-width: 160px; cursor: pointer; }
.date-label { display: flex; flex-direction: column; gap: 4px; font-size: .76rem; color: var(--text-dim); font-weight: 700; }

/* فلتر الحالة (شرائح) */
.seg { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: var(--radius-ctl); border: 1px solid var(--border); }
.seg button {
    border: none; background: transparent; color: var(--text-dim);
    padding: 8px 14px; border-radius: 9px; cursor: pointer; font-family: inherit;
    font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; gap: 6px;
    transition: all .2s ease;
}
.seg button:hover { color: var(--text); }
.seg button.on { color: #fff; background: linear-gradient(145deg, var(--brand-400), var(--brand-600)); box-shadow: 0 6px 14px -6px rgba(192,86,42,.6); }

/* ===== الجدول ===== */
.table-wrap { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data-table thead th {
    /* start = يمين بالعربي، يسار بالإنجليزي — نفس محاذاة الخلايا تحتها بالضبط */
    text-align: start; padding: 15px 18px; white-space: nowrap;
    background: var(--surface-2);
    color: var(--text-muted); font-weight: 800; font-size: .82rem;
    text-transform: uppercase; letter-spacing: .4px;
    position: sticky; top: 0; z-index: 1;
    border-bottom: 1px solid var(--line);
}
table.data-table tbody td { text-align: start; padding: 14px 18px; color: var(--text); white-space: nowrap; border-bottom: 1px solid var(--border-2); }
table.data-table tbody tr { transition: background .18s ease; }
table.data-table tbody tr:nth-child(even) { background: var(--surface-2); }
table.data-table tbody tr:hover { background: var(--surface-2); }
.cell-num { font-family: 'Poppins'; font-weight: 700; color: var(--brand); }
.cell-money { font-family: 'Poppins'; font-weight: 700; }
.cell-muted { color: var(--text-dim); }
.table-empty { padding: 50px; text-align: center; color: var(--text-dim); }

/* شارات الحالة/النوع */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge { padding: 5px 12px; border-radius: 11px; font-weight: 700; }
.badge.b-pending  { background: var(--gold-100);    color: var(--gold-600); }
.badge.b-accepted { background: var(--success-100); color: var(--success-600); }
.badge.b-rejected { background: var(--danger-100);  color: var(--danger-600); }
.badge.b-neutral  { background: var(--surface-2);   color: var(--text-muted); }
.badge.b-delivery { background: var(--icbg1);       color: var(--brand-600); }
.badge.b-pickup   { background: var(--surface-2);   color: var(--text-muted); }

/* ===== مركز التقارير ===== */
.report-tabs, .report-presets { flex-wrap: wrap; max-width: 100%; }
.filter-bar .form-hint { white-space: normal; min-width: 0; }
.email-status { padding: 11px 14px; border-radius: 12px; margin-bottom: 16px; font-weight: 700; font-size: .88rem; }
.email-status.on { background: var(--success-100); color: var(--success-600); }
.email-status.off { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* رقم المطعم كبادج قبل اسمه */
.rest-tag { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.rest-id { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border);
    color: var(--text-muted); font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.5; white-space: nowrap; }
/* شرائط تنبيه ثابتة فوق الشاشة: انقطاع الاتصال + الصوت مقفول (AlarmWatcher) */
.conn-banner, .sound-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 2000; padding: 10px 16px; text-align: center;
    font-weight: 800; font-size: .9rem; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.conn-banner { background: var(--danger-600); }
.sound-banner { background: #B7791F; cursor: pointer; top: auto; bottom: 0; }

/* حسابات الـPOS: صندوق كلمة السر المؤقت */
.pos-secret { background: var(--warning-100, #FFF8E6); border: 1px solid color-mix(in srgb, #E0A100 45%, transparent); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: .88rem; }
.pos-secret-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pos-secret-row code { font-size: 1.15rem; font-weight: 800; letter-spacing: 1px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px 12px; user-select: all; }
.pos-timer { font-size: .78rem; color: var(--text-muted); }

/* رقم المطعم (العلامة) — بلون البراند عشان ما يختلط برقم الفرع الرمادي */
.rest-id.brand-no { background: color-mix(in srgb, var(--brand-500) 16%, var(--surface)); border-color: color-mix(in srgb, var(--brand-500) 45%, transparent); color: var(--brand-600); }
/* ===== المدفوعات + كشف الدفعة ===== */
.payout-preview { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 10px 14px; margin: -4px 0 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .86rem; }
.payout-confirm { padding: 12px 14px; margin-bottom: 20px; border-radius: 12px; background: var(--gold-100); border: 1px solid var(--gold-500); }
.email-preview { width: 100%; height: 440px; border: 1px solid var(--border); border-radius: 12px; background: #fff; margin-bottom: 10px; }
.stmt .section-title { margin: 18px 0 8px; }
.stmt-paid { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; border-radius: 12px; background: var(--success-100); color: var(--success-600); font-weight: 700; }
.stmt-paid b { font-size: 1.7rem; font-weight: 900; }
table.data-table.stmt-kv tbody td { padding: 9px 14px; white-space: normal; }
table.data-table.stmt-kv tbody td:first-child { color: var(--text-muted); width: 55%; }
.item-parts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.item-parts-label { font-size: .78rem; font-weight: 800; color: var(--text-muted); margin-inline-end: 4px; }
.report-section-title { font-weight: 800; font-size: .92rem; color: var(--text); }
.report-section-title small { font-weight: 600; color: var(--text-dim); font-size: .8rem; }
.report-split { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; margin-top: 2px; border-top: 1px dashed var(--border); }
.report-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 16px; margin-bottom: 18px; }
.report-charts { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 18px; }
.report-charts > .bento-cell { min-width: 0; }
@media (max-width: 900px) { .report-charts { grid-template-columns: 1fr; } }
.report-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border-2); }
table.data-table tbody tr.report-total td { background: var(--surface-2); border-top: 2px solid var(--line); font-weight: 800; }
table.data-table tbody tr.report-total small { color: var(--text-muted); }

/* نجوم التقييم */
.stars { color: var(--gold-500); letter-spacing: 2px; font-size: 1rem; }
.stars .off { color: var(--border-2); }

/* ===== قائمة الإعدادات (أزرار) ===== */
.settings-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; max-width: 860px; margin: 0 auto; }
.setting-btn {
    display: flex; align-items: center; gap: 16px; text-align: start;
    padding: 22px 24px; cursor: pointer; text-decoration: none; color: var(--text);
    animation: fadeUp .5s ease both;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.setting-btn:hover { transform: translateY(-3px); border-color: var(--brand-300); box-shadow: var(--shadow-lg); }
.setting-btn[disabled], .setting-btn.soon { opacity: .5; pointer-events: none; }
.setting-ic {
    width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0;
    display: grid; place-items: center;
    background: linear-gradient(145deg, var(--icbg1), var(--icbg2));
    border: none; color: var(--brand-600);
}
.setting-txt b { display: block; font-size: 1.05rem; font-weight: 800; }
.setting-txt span { font-size: .8rem; color: var(--text-dim); }

/* ===== نماذج ===== */
.form-card { max-width: 640px; margin: 0 auto; padding: 30px 32px; animation: fadeUp .5s ease both; }
.form-row { margin-bottom: 20px; }
.form-row > label { display: block; font-size: .88rem; color: var(--text-dim); font-weight: 700; margin-bottom: 7px; }
.form-input, .form-textarea {
    width: 100%; box-sizing: border-box; padding: 13px 15px; border-radius: var(--radius-ctl);
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    box-shadow: var(--shadow-sm);
    font-family: inherit; font-size: 1rem; outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-input:disabled, .form-textarea:disabled { background: var(--surface-2); color: var(--text-muted); cursor: not-allowed; opacity: .6; }
.form-input:focus, .form-textarea:focus { border-color: var(--brand-500); background: var(--surface); box-shadow: 0 0 0 3px rgba(192, 86, 42, .13); }
.form-hint { font-size: .76rem; color: var(--text-dim); margin-top: 6px; }
/* حقل اختيار صورة */
.file-input { cursor: pointer; padding: 10px 12px; }
.file-input::file-selector-button {
    margin-inline-end: 12px; padding: 8px 16px; border: none; border-radius: 9px;
    background: var(--brand-500);
    color: #fff; font-family: inherit; font-weight: 700; cursor: pointer;
}
.file-input::file-selector-button:hover { filter: brightness(1.08); }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-grid2 { grid-template-columns: 1fr; } }

/* مفتاح تبديل (toggle) */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
/* المفاتيح تظل تشتغل شمال→يمين حتى داخل صفحة RTL */
.switch { position: relative; width: 58px; height: 32px; flex-shrink: 0; direction: ltr; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--barbg); transition: background var(--t-base) var(--ease); cursor: pointer; }
.switch .track::before { content: ""; position: absolute; width: 24px; height: 24px; left: 4px; top: 4px; border-radius: 50%; background: #fff; transition: transform .25s ease; }
.switch input:checked + .track { background: var(--success-500); }
.switch input:checked + .track::before { transform: translateX(26px); }

/* حالة الحفظ */
.save-toast { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: .88rem; animation: fadeUp .3s ease both; }
.save-toast.ok { background: var(--success-bg); color: var(--success); }
.save-toast.err { background: var(--danger-bg); color: var(--danger); }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); text-decoration: none; font-weight: 700; margin-bottom: 18px; }
.back-link:hover { color: var(--bread-dark); }

/* كروت المدفوعات */
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.pay-card { padding: 28px 30px; animation: fadeUp .5s ease both; }
.pay-card.big { grid-column: 1 / -1; text-align: center; }
.pay-label { color: var(--text-dim); font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.pay-value { font-family: 'Poppins'; font-weight: 800; line-height: 1; }
.pay-card.big .pay-value { font-size: 3.6rem; }
.pay-card:not(.big) .pay-value { font-size: 2.2rem; }
/* العملة بعد الرقم ("9.50 د.أ") — المسافة من جهة الرقم */
.egp { font-size: .5em; color: var(--text-dim); font-weight: 700; margin-inline-start: 6px; }

/* ===== نافذة منبثقة: اختيار الفروع (Selected shops) ===== */
.kabaten-modal { position: fixed; inset: 0; z-index: 1400; display: grid; place-items: center; padding: 20px; background: var(--scrim); backdrop-filter: blur(4px); animation: fadeUp .22s var(--ease) both; }
.kabaten-modal-card { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-lg); padding: 32px 34px 28px; max-height: 86vh; overflow-y: auto; }
.kabaten-modal-title { font-family: 'Poppins'; font-weight: 800; font-size: 1.25rem; text-align: center; margin-bottom: 26px; background: linear-gradient(135deg, var(--text), var(--brand-500)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.kabaten-modal-actions { display: flex; gap: 12px; margin-top: 28px; }
.shop-row { display: flex; align-items: center; gap: 16px; padding: 15px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 12px; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.shop-row:hover { border-color: var(--brand-300); background: var(--surface); }
.shop-row .shop-name { flex: 1; min-width: 0; font-weight: 700; line-height: 1.6; }
.shop-row .shop-addr { display: block; font-size: .82rem; font-weight: 600; color: var(--text-dim); }
.shop-hint { font-size: .82rem; color: var(--text-dim); text-align: center; margin-top: 4px; }

/* ===== عزل الرسوم البيانية عن اتجاه الصفحة (RTL) ===== */
/* مكتبات الشارت ترسم إحداثياتها فيزيائيًا — نخلّيها LTR حتى ما تنقلب المحاور */
.apexcharts-canvas, .apexcharts-canvas * { direction: ltr; }

/* ===== صف قابل للضغط + نافذة تفاصيل التقييم ===== */
tr.row-click { cursor: pointer; }
tr.row-click:hover { background: var(--icbg1) !important; }
.rv-block { text-align: center; padding: 16px 0; border-bottom: 1px solid var(--border-2); }
.rv-block:last-child { border-bottom: none; padding-bottom: 4px; }
.rv-label { font-size: .78rem; font-weight: 800; color: var(--text-soft); letter-spacing: .5px; margin-bottom: 6px; }
.rv-value { font-size: 1.02rem; font-weight: 700; color: var(--text); }
.rv-sub { font-size: .88rem; color: var(--text-dim); margin-top: 4px; }

/* ============================================================
   الشاشة الحيّة (Orders Monitor)
   حالات العمر: اللون طبقة تعزيز فقط — الرقم والأيقونة والكلمة
   هي الإشارة الأساسية (لأن ثلاثية أخضر/ذهبي/أحمر ترسب في عمى الألوان)
   ============================================================ */
.live-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 18px; }
.live-stat { display: flex; flex-direction: column; gap: 2px; padding-inline-end: 20px; border-inline-end: 1px solid var(--border-2); }
.live-stat:last-of-type { border-inline-end: none; }
.live-stat-n { font-family: 'Poppins'; font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--brand-500); }
.live-stat-l { font-size: .74rem; font-weight: 700; color: var(--text-soft); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success-500); flex-shrink: 0; }
.live-dot.off { background: var(--danger-500); }

/* شريط انقطاع الاتصال */
.live-offline { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px;
  background: var(--danger-50); color: var(--danger-600); border: 1px solid var(--danger-150);
  border-radius: var(--radius-ctl); font-weight: 800; margin-bottom: 16px; }

/* اللوحة */
.live-board { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .live-board { grid-template-columns: 1fr; } }
.live-col { padding: 0; overflow: hidden; }
.live-col-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 15px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.live-col-title { font-weight: 800; font-size: .95rem; }
.live-count { font-family: 'Poppins'; font-weight: 800; font-size: .82rem; padding: 3px 11px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.live-list { padding: 14px; display: flex; flex-direction: column; gap: 12px; max-height: 68vh; overflow-y: auto; }
.live-empty { padding: 34px 14px; text-align: center; color: var(--text-soft); font-size: .88rem; }

/* كرت الطلب */
.live-card { border: 1px solid var(--border); border-radius: 14px; padding: 14px 15px; background: var(--surface); }
.live-card.calm  { border-inline-start: 4px solid var(--border); }
.live-card.warn  { border-inline-start: 4px solid var(--gold-700); background: var(--warn-bg); }
.live-card.late  { border-inline-start: 5px solid var(--danger-600); background: var(--danger-50); animation: livePulse 1.8s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(187,44,32,.34); } 50% { box-shadow: 0 0 0 7px rgba(187,44,32,0); } }

.live-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.live-id { font-family: 'Poppins'; font-weight: 800; font-size: 1.06rem; color: var(--brand-500); }
/* شارة العمر: أيقونة + رقم + كلمة — ثلاث إشارات غير لونية */
.live-age { display: inline-flex; align-items: center; gap: 6px; font-family: 'Poppins'; font-weight: 800;
  font-size: .95rem; padding: 4px 10px; border-radius: 10px; background: var(--surface); border: 1px solid currentColor; }
.live-age.calm { color: var(--text-muted); }
.live-age.warn { color: var(--gold-700); }
.live-age.late { color: var(--danger-600); }
.live-age-word { font-family: 'Cairo'; font-size: .74rem; font-weight: 800; }

.live-row { display: flex; align-items: center; gap: 7px; font-size: .87rem; margin-top: 5px; color: var(--text); }
.live-row .k { color: var(--text-soft); font-size: .8rem; font-weight: 700; }
.live-note { margin-top: 8px; padding: 8px 10px; border-radius: 9px; background: var(--surface-2);
  border: 1px dashed var(--border); font-size: .83rem; line-height: 1.6; white-space: normal; }
.live-actions { display: flex; gap: 9px; margin-top: 13px; }
.live-actions .brand-btn { padding: 12px 10px; font-size: .92rem; }
.live-actions .reject { background: var(--surface); color: var(--danger-600); border: 1px solid var(--danger-150); box-shadow: none; }
.live-actions .reject:hover { background: var(--danger-50); }

/* وضع الشاشة الكبيرة — يكبّر كل إشي للعرض من بعيد */
body.tv .side-rail, body.tv .top-bar { display: none; }
body.tv .live-card { padding: 18px 20px; }
body.tv .live-id { font-size: 1.35rem; }
body.tv .live-age { font-size: 1.2rem; padding: 6px 13px; }
body.tv .live-row { font-size: 1rem; }
body.tv .live-col-title { font-size: 1.15rem; }
body.tv .live-list { max-height: 82vh; }

/* ===== نافذة تفاصيل الطلب (مشتركة) ===== */
.od-card { width: min(620px, 100%); }
.od-loading { padding: 40px; text-align: center; color: var(--text-dim); }
.od-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.od-id { font-family: 'Poppins'; font-weight: 800; font-size: 1.5rem; color: var(--brand-500); line-height: 1.1; }
.od-when { font-size: .84rem; color: var(--text-dim); margin-top: 4px; }

.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .od-grid { grid-template-columns: 1fr; } }
.od-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.od-field.od-wide { margin-top: 12px; }
.od-k { font-size: .74rem; font-weight: 800; color: var(--text-soft); }
.od-v { font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.od-note { margin-top: 14px; padding: 11px 13px; border-radius: 11px; background: var(--surface-2);
  border: 1px dashed var(--border); font-size: .88rem; line-height: 1.7; }

.od-section { margin: 20px 0 10px; font-weight: 800; font-size: .82rem; color: var(--text-soft);
  padding-bottom: 7px; border-bottom: 1px solid var(--border-2); }
.od-empty { padding: 18px; text-align: center; color: var(--text-soft); font-size: .85rem;
  background: var(--surface-2); border-radius: 11px; }

.od-items { display: flex; flex-direction: column; gap: 9px; }
.od-item { display: flex; align-items: flex-start; gap: 11px; padding: 11px 13px;
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 11px; }
.od-qty { font-family: 'Poppins'; font-weight: 800; color: var(--brand-500); flex-shrink: 0; }
.od-sub { font-size: .82rem; color: var(--text-dim); line-height: 1.6; }
.od-line { font-family: 'Poppins'; font-size: .88rem; white-space: nowrap; flex-shrink: 0; }

.od-sum { padding: 13px 15px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 12px; }
.od-sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; padding: 4px 0; }
.od-sum-row.total { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border);
  font-weight: 800; font-size: 1.06rem; color: var(--brand-500); }

.od-reject { background: var(--surface); color: var(--danger-600); border: 1px solid var(--danger-150); box-shadow: none; }
.od-reject:hover:not(:disabled) { background: var(--danger-50); }
.kabaten-modal-actions .brand-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
/* أي زر معطّل بكل اللوحة يبين باهت (مش بس جوا النوافذ) — عشان ما ينكبس وما يصير اشي */
.brand-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; box-shadow: none; }

/* حقل قابل للنسخ بضغطة (الزبون / الهاتف / العنوان) */
.od-copy { cursor: pointer; border-radius: 8px; padding: 2px 6px; margin-inline-start: -6px;
  transition: background var(--t-fast) var(--ease); }
.od-copy:hover { background: var(--surface-2); }
.od-copy-ico { font-size: .95rem !important; color: var(--text-soft); flex-shrink: 0; }
.od-copy:hover .od-copy-ico { color: var(--brand-500); }
.od-copy-ico.ok { color: var(--success-600); }

/* ===== نافذة تأكيد مخصّصة (بدل confirm المتصفّح) ===== */
.kabaten-confirm-scrim { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center;
  padding: 20px; background: var(--scrim); backdrop-filter: blur(5px); animation: fadeUp .18s var(--ease) both; }
.kabaten-confirm { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-lg); padding: 30px 28px 24px; text-align: center; }
.kabaten-confirm-icon { width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-2); color: var(--brand-500); }
.kabaten-confirm-icon.danger { background: var(--danger-50); color: var(--danger-600); }
.kabaten-confirm-icon .mud-icon-root { font-size: 2rem; }
.kabaten-confirm-msg { font-weight: 700; font-size: 1.04rem; line-height: 1.75; color: var(--text); margin-bottom: 24px; }
.kabaten-confirm-actions { display: flex; gap: 10px; }
.kabaten-confirm-actions .brand-btn { flex: 1; }
/* كرت قابل للضغط بالشاشة الحيّة */
.od-clickable { cursor: pointer; transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.od-clickable:hover { border-color: var(--brand-300); transform: translateY(-2px); }
/* دروب داون الفرع — نفس ارتفاع حقول التاريخ بشريط الفلاتر */
.shop-select select { min-width: 190px; cursor: pointer; }

/* شارة الطلبات المنتظرة بالتوب بار (مع التنبيه الصوتي) */
.alarm-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  background: var(--danger-50); color: var(--danger-600); border: 1px solid var(--danger-150);
  font-weight: 800; font-size: .83rem; margin-inline-start: 14px;
  animation: alarmPulse 1.8s ease-in-out infinite; }
@keyframes alarmPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(187,44,32,.32); } 50% { box-shadow: 0 0 0 7px rgba(187,44,32,0); } }
@media (prefers-reduced-motion: reduce) { .alarm-pill { animation: none; } }

/* جرس إشعارات مراجعة المنيو (لوحة المنصة ولوحة المطعم) */
.bell-wrap { position: relative; }
.bell-badge {
    position: absolute; top: -2px; inset-inline-end: -2px;
    min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
    background: var(--danger-600); color: #fff; font-size: .68rem; font-weight: 800;
    display: grid; place-items: center; border: 2px solid var(--surface);
}
.bell-panel {
    /* end (شمال بالـRTL) — الجرس هلأ بالطرف الشمالي بعيد عن الشريط الجانبي
       (يمين الشاشة)، فبيفتح ناحية المساحة الفاضية بمنتصف الصفحة بدل ما يروح
       تحت الشريط الجانبي وينقص. */
    position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 30;
    width: min(360px, 90vw); max-height: 420px; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border-2); border-radius: 16px;
    box-shadow: 0 20px 50px -20px rgba(30,41,59,.45); padding: 8px;
}
.bell-panel-title { font-weight: 800; font-size: .85rem; padding: 8px 10px; color: var(--text-dim); }
.bell-item { display: block; padding: 10px 10px; border-radius: 10px; text-decoration: none; color: var(--text); }
.bell-item:hover { background: var(--surface-2); }
/* نفس مظهر .bell-item بس لعنصر <button> (قائمة إجراءات الصف بدل إشعار) —
   إعادة تصفير خصائص الزر الافتراضية عشان يبين نص عادي بعرض كامل. */
.row-menu-item {
    width: 100%; display: flex; align-items: center; justify-content: flex-start; gap: 8px; box-sizing: border-box;
    background: none; border: none; cursor: pointer; font-size: .85rem;
    font-family: inherit; text-align: start;
}
.bell-item-title { font-weight: 700; font-size: .87rem; display: flex; align-items: center; gap: 6px; }
.bell-item-sub { font-size: .78rem; color: var(--text-dim); margin-top: 2px; }
.bell-empty { padding: 22px 10px; text-align: center; color: var(--text-dim); font-size: .85rem; }
.bell-overlay { position: fixed; inset: 0; z-index: 25; background: transparent; }

/* ============================================================
   لوحة المنصة (Platform)
   ⚠️ موك-اب المرحلة ١ — يُراجَع مع الصفحات قبل ربط البيانات
   ============================================================ */

/* شارة تُذكّر إن الأرقام وهمية — تُحذف لما تنربط البيانات الفعلية */
.mock-chip { display: inline-flex; align-items: center; padding: 6px 13px; border-radius: 999px;
  background: var(--gold-50, #FDF3E2); color: var(--gold-700, #A06B22); border: 1px dashed var(--gold-600, #C9883A);
  font-weight: 800; font-size: .76rem; margin-inline-start: 14px; }

/* مبدّل الدولة */
.country-scope { display: inline-flex; gap: 6px; margin-inline-start: 18px; }
.scope-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
  font-family: inherit; font-weight: 800; font-size: .83rem; cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.scope-btn:hover { border-color: var(--brand-300); color: var(--text); }
.scope-btn.on { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
/* خيار معطّل (مثلًا «الكابتن» بطلب استلام) — باهت وواضح إنه ما بينضغط */
.scope-btn:disabled { opacity: .45; cursor: not-allowed; border-color: var(--border); color: var(--text-muted); }
.scope-cur { font-size: .72em; opacity: .75; font-weight: 700; }

/* مبلغ مالي — العملة دايمًا جنب الرقم، والاتجاه LTR */
.money-val { font-weight: 700; white-space: nowrap; }
.money-cur { font-size: .68em; color: var(--text-dim); font-weight: 700; margin-inline-start: 5px; }
.money-val.pos { color: var(--success); }
.money-val.neg { color: var(--danger); }
.money-val.big { font-family: 'Poppins'; font-size: 1.9rem; font-weight: 800; }

/* صف إجماليات مفصولة بالعملة — البديل عن رقم واحد مجموع */
.cur-totals { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.cur-total { display: flex; flex-direction: column; gap: 2px; }
.cur-total .ct-label { font-size: .74rem; font-weight: 800; color: var(--text-soft); letter-spacing: .3px; }

/* شبكة كروت المنصة */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-bottom: 24px; }
.pf-card { padding: 22px 24px; animation: fadeUp .45s ease both; }
.pf-card .pf-label { display: flex; align-items: center; gap: 9px; color: var(--text-dim); font-weight: 700; font-size: .86rem; margin-bottom: 14px; }
.pf-card .pf-val { font-family: 'Poppins'; font-weight: 800; font-size: 1.75rem; line-height: 1.15; }
.pf-card .pf-sub { color: var(--text-soft); font-size: .78rem; margin-top: 7px; }

/* أزرار الإجراءات داخل صفوف الجدول */
.row-actions { display: inline-flex; gap: 6px; }
.mini-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
  font-family: inherit; font-weight: 700; font-size: .78rem; cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.mini-btn:hover { border-color: var(--brand-300); color: var(--text); background: var(--surface); }
.mini-btn.danger:hover { border-color: var(--danger-600); color: var(--danger-600); background: var(--danger-50); }
.mini-btn.ok:hover { border-color: var(--success-500); color: var(--success); background: var(--success-bg); }

/* بنود الحساب — ترتيب المعادلة */
.fee-seq { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px;
  background: var(--brand-50, #FBEFE8); color: var(--brand-600); font-weight: 800; font-size: .82rem; }
.fee-base { font-family: 'Poppins'; font-size: .78rem; color: var(--text-dim); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 7px; padding: 3px 9px; display: inline-block; }
.fee-bearer { font-weight: 800; font-size: .78rem; padding: 4px 10px; border-radius: 999px; }
.fee-bearer.merchant { background: var(--brand-50, #FBEFE8); color: var(--brand-600); }
.fee-bearer.platform { background: var(--success-bg); color: var(--success); }
.fee-bearer.driver { background: var(--surface-2); color: var(--text-dim); }

/* زر الدخول للوحة المنصة من شريط لوحة المطعم */
.platform-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px;
  background: var(--cocoa-800); color: #fff; text-decoration: none;
  font-weight: 800; font-size: .83rem; margin-inline-start: 14px; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.platform-link:hover { background: var(--brand-500); transform: translateY(-1px); }

/* شريط جانبي عريض بأسماء — بديل الأيقونات الصمّاء لما تكثر الأقسام */
.side-rail.wide { width: 216px; align-items: stretch; padding: 20px 14px; gap: 4px; }
.side-rail.wide .rail-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding-inline-start: 2px; }
.side-rail.wide .rail-logo { width: 42px; height: 42px; border-radius: 13px; margin-bottom: 0; font-size: 13px; flex-shrink: 0; }
.side-rail.wide .rail-brand-txt { color: #fff; font-weight: 800; font-size: .95rem; white-space: nowrap; }
.side-rail.wide .rail-item {
    width: 100%; height: auto; border-radius: 12px;
    display: flex; align-items: center; gap: 12px;
    padding: 11px 13px; font-weight: 700; font-size: .89rem;
    place-items: unset;
}
.side-rail.wide .rail-item span { white-space: nowrap; }
/* المؤشّر الجانبي ما إله معنى بالشريط العريض — العنصر كله مضلّل */
.side-rail.wide .rail-item.active::after { display: none; }

@media (max-width: 900px) {
    .side-rail.wide { width: 74px; padding: 18px 10px; }
    .side-rail.wide .rail-item span,
    .side-rail.wide .rail-brand-txt { display: none; }
    .side-rail.wide .rail-item { justify-content: center; padding: 12px 0; }
}

/* لافتة تحذير/معلومة عريضة */
.pf-note { display: flex; align-items: flex-start; gap: 12px; padding: 15px 18px; border-radius: 14px;
  font-weight: 600; font-size: .87rem; line-height: 1.75; margin-bottom: 20px; }
.pf-note.info { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); }
.pf-note.warn { background: var(--gold-50, #FDF3E2); border: 1px solid var(--gold-600, #C9883A); color: var(--gold-700, #A06B22); }
.pf-note.danger { background: var(--danger-50); border: 1px solid var(--danger-150); color: var(--danger-600); }

/* ===== تفصيل مرحلة الطلب (لوحة المنصة › الطلبات) ===== */
.row-click { cursor: pointer; }
.row-click:hover td { background: var(--surface-2); }
.row-open td { background: var(--surface-2); }
.stage-sub { margin-top: 5px; font-size: .74rem; color: var(--text-dim); line-height: 1.5; max-width: 260px; }
.stage-row td { padding: 0 !important; background: var(--surface-2); }
.steps { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 14px 20px 16px; }
.step { display: flex; align-items: flex-start; gap: 9px; min-width: 150px; }
.step-dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--border, #d9d2c7); }
.step-title { font-size: .84rem; font-weight: 700; color: var(--text-dim); }
.step-note { font-size: .74rem; color: var(--text-dim); }
.step-done .step-dot { background: var(--success-600); }
.step-done .step-title { color: var(--text); }
.step-wait .step-dot { background: var(--gold-600); box-shadow: 0 0 0 4px var(--gold-100); }
.step-wait .step-title { color: var(--gold-600); }
.step-bad .step-dot { background: var(--danger-600); }
.step-bad .step-title { color: var(--danger-600); }

/* الإنجليزي (ltr): ظل الشريط الجانبي باتجاه المحتوى (يمين) */
html[dir="ltr"] .side-rail { box-shadow: 6px 0 30px -10px rgba(15, 23, 42, .40); }
/* موبايل: زر اللغة بيعرض بس اللغة اللي بتحوّل لها، والأزرار أصغر شوي عشان الشريط يساع */
@media (max-width: 720px) {
    .lang-toggle { height: 40px; padding: 3px; }
    .lang-toggle span { min-width: 32px; height: 32px; }
    .lang-toggle span.on { display: none; }
    .top-bar .icon-btn { width: 40px; height: 40px; }
    .top-bar-end .branch-switch { width: auto; min-width: 0; flex: 1 1 0; }
}
/* الإشعار الخاص: مربعات اختيار المطاعم والجمهور */
.notif-shops { display: flex; flex-wrap: wrap; gap: 8px; }
.notif-shop {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; cursor: pointer;
    border: 1px solid var(--border); border-radius: var(--radius-ctl); background: var(--surface);
    font-weight: 600; font-size: .9rem; transition: border-color .2s ease, background .2s ease;
}
.notif-shop:hover { border-color: var(--brand-400); }
.notif-shop.on { border-color: var(--brand-500); background: rgba(192, 86, 42, .07); }
.notif-shop input { width: 17px; height: 17px; accent-color: var(--brand-600); margin: 0; }
.notif-shop.disabled { opacity: .5; cursor: not-allowed; }
