/* شركتي — النسخة الأونلاين: نفس ألوان البرنامج، وتشتغل على الكمبيوتر والموبايل (عربي/إنجليزي) */
:root {
    --ink: #0E2A33; --ink-2: #143642; --ink-3: #1D4552;
    --gold: #0F8A7E; --gold-light: #7CCFC5; --gold-soft: #E6F5F3; --gold-deep: #0B6B62;
    --bg: #F2F6F7; --card: #FFFFFF; --line: #DCE6E8; --text: #1B2A30; --muted: #6E8389;
    --good: #2E7D32; --bad: #C62828; --info: #1565C0; --warn: #B26A00;
    --radius: 14px; --side: 252px;
    --shadow: 0 1px 2px rgba(14, 42, 51, .05), 0 6px 20px -12px rgba(14, 42, 51, .18);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Cairo", "Segoe UI", Tahoma, sans-serif; font-size: 15px; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--gold-deep); text-decoration: none; }
h1 { font-size: 26px; margin: 0; font-weight: 800; }
h2 { font-size: 18px; margin: 0 0 14px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.good { color: var(--good); } .bad { color: var(--bad); } .info { color: var(--info); } .gold { color: var(--gold); }
.ic { flex: none; }

/* ===== القائمة الجانبية ===== */
.side {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side); z-index: 40;
    background: var(--ink); color: #CFE0E3; display: flex; flex-direction: column;
    transition: transform .25s ease;
}
.side-head { padding: 22px 20px 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold); font-weight: 800; font-size: 22px; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--gold-light), var(--gold) 50%, var(--gold-deep)); color: var(--on-gold, var(--ink)); font-size: 16px; }
.brand-mark.big { width: 64px; height: 64px; border-radius: 18px; font-size: 30px; }
.shop { color: #8FA7AD; font-size: 13px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 12px; display: flex; flex-direction: column; gap: 3px; }
.side-nav a, .side-nav .soon { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #E3EEF0; font-weight: 600; }
.side-nav a:hover { background: var(--ink-3); }
.side-nav a.on { background: var(--gold); color: var(--on-gold, var(--ink)); }
.side-nav .soon { opacity: .45; cursor: default; }
.side-nav .soon small { margin-inline-start: auto; font-size: 11px; border: 1px solid #4F6B73; border-radius: 999px; padding: 0 7px; }
.side-foot { display: flex; align-items: center; gap: 6px; padding: 14px 16px; border-top: 1px solid var(--ink-3); }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who small { color: #8FA7AD; }
.side-foot a { color: #C9C2B2; padding: 6px; border-radius: 8px; display: inline-flex; }
.side-foot a:hover { background: var(--ink-3); color: var(--gold); }
.side-ver { padding: 0 16px 10px; color: #6F8A91; font-size: 11.5px; text-align: center; font-variant-numeric: tabular-nums; }
.side-backdrop { display: none; }

/* ===== المحتوى ===== */
.main { margin-inline-start: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.top {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 24px;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; }
/* الكمبيوتر: زرار القائمة بيقفل / يفتح القائمة الجانبية */
@media (min-width: 1001px) {
    .menu-btn { display: inline-grid; }
    .main { transition: margin .25s ease; }
    body.side-collapsed .side { transform: translateX(105%); }
    [dir="ltr"] body.side-collapsed .side { transform: translateX(-105%); }
    body.side-collapsed .main { margin-inline-start: 0; }
    /* المحتوى ياخد الشاشة كلها (من غير حد الـ 1400 بكسل) */
    body.side-collapsed .content { max-width: none; }
}
.icon-btn { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 800; font-family: inherit; cursor: pointer; }
.ticker { flex: 1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.ticker::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 4px 12px; border-radius: 999px; background: var(--gold-soft); border: 1px solid #F0E2B0; font-size: 14px; font-weight: 700; white-space: nowrap; direction: ltr; }
.chip b { color: var(--gold-deep); margin-inline-end: 4px; }
.chip i { font-style: normal; color: var(--muted); font-weight: 600; }
.branch-pick { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.branch-pick select { border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font-family: inherit; font-size: 14px; background: #fff; max-width: 190px; }
.trial-bar { background: #FFF4D6; color: #7A5A00; text-align: center; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.trial-bar a { font-weight: 800; }
.content { padding: 22px 24px 40px; width: 100%; max-width: 1400px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.section-title { margin: 22px 0 12px; font-size: 17px; }

/* ===== البطاقات والشبكات ===== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.highlight { border-color: var(--gold-light); box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow); }
.card.empty { text-align: center; padding: 48px 20px; }
.card.start ol { margin: 0 0 8px; padding-inline-start: 22px; line-height: 2.1; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + .grid2 { margin-top: 16px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.hero-card {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px;
    background: linear-gradient(135deg, var(--ink), var(--ink-2)); color: #CFE0E3; border-radius: var(--radius); padding: 22px 24px;
    border: 1px solid #3a352c; box-shadow: var(--shadow);
}
.hero-card span { display: block; font-size: 14px; }
.hero-card b { font-size: 30px; color: #fff; font-weight: 800; letter-spacing: .3px; }
.hero-card b.gold { color: var(--gold-light); }
.hero-card small { font-size: 14px; color: #CFC8B8; font-weight: 600; }
.karat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.karat-grid .card { margin: 0; }
.karat-head { display: flex; justify-content: space-between; align-items: center; color: var(--gold-deep); font-size: 17px; }
.karat-w { font-size: 26px; font-weight: 800; margin-top: 6px; }
.karat-w small { font-size: 14px; color: var(--muted); }
.karat-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; font-size: 13.5px; color: var(--muted); }
.karat-foot b { color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.stat-grid .card { margin: 0; }
.stat span { display: block; color: var(--muted); font-size: 14px; }
.stat b { display: block; font-size: 26px; font-weight: 800; margin: 2px 0; }
.stat small { color: var(--muted); }

/* ===== الجداول ===== */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: start; color: var(--muted); font-weight: 700; font-size: 13px; padding: 9px 8px; border-bottom: 1px solid var(--line); background: #FCFAF4; white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid #F1ECE1; vertical-align: middle; }
/* خلية dir="ltr" (رقم فاتورة / موبايل / كود) جوه جدول عربي: الاتجاه للنص بس، المحاذاة زي باقي العمود */
[dir="rtl"] .table td[dir="ltr"]:not(.num) { text-align: right; }
.table tr.dim td { opacity: .55; }
.table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table input, .table select { width: 100%; min-width: 70px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-family: inherit; font-size: 14.5px; background: #fff; }
.table input[type=checkbox] { width: 18px; min-width: 0; height: 18px; }
.table .new-row td { background: #FDFBF5; }
.prices-table .price-in { max-width: 150px; text-align: end; font-weight: 700; font-size: 16px; direction: ltr; }
.spread { color: var(--muted); }

/* ===== النماذج والأزرار ===== */
.form label { display: block; font-size: 13.5px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.form input, .form select, .form textarea {
    display: block; width: 100%; margin-top: 5px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
    font-family: inherit; font-size: 15px; color: var(--text); background: #fff;
}
.form input:focus, .form select:focus, .table input:focus { outline: 2px solid var(--gold-light); border-color: var(--gold); }
.form label.check, label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14.5px; }
.form label.check input, label.check input { width: auto; margin: 0; }
.form.narrow { max-width: 460px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset.perms { border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px 4px; margin: 0 0 12px; }
fieldset.perms legend { font-weight: 800; padding: 0 6px; color: var(--gold-deep); }
fieldset.perms label.check { margin-bottom: 8px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
    font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap; color: var(--text); background: #fff;
}
.btn.gold { background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 86%, #fff), var(--gold)); color: #fff; border-color: var(--gold-deep); }
.btn.gold:hover { filter: brightness(1.05); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.line { border-color: var(--line); }
.btn.line:hover { border-color: var(--gold); }
.btn.small { padding: 5px 12px; font-size: 13.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }
.derive { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); }
.derive select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-family: inherit; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 16px; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--gold-deep); border-color: var(--gold); }

.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; }
.alert.ok { background: #E8F5E9; color: var(--good); }
.alert.err { background: #FDECEA; color: var(--bad); }
.alert.warn { background: #FFF4D6; color: #7A5A00; }
.alert.info { background: #E3F0FD; color: var(--info); }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--gold-soft); color: var(--gold-deep); }
.pill.good { background: #E8F5E9; color: var(--good); }
.pill.bad { background: #FDECEA; color: var(--bad); }
.pill.gold { background: var(--gold); color: var(--on-gold, var(--ink)); }

/* ===== الدخول ===== */
body.bare { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 50% -10%, #3a3226, var(--ink)); }
.bare-box { width: 100%; max-width: 440px; }
.login-brand { text-align: center; color: #E3EEF0; margin-bottom: 18px; }
.login-brand h1 { color: var(--gold); font-size: 32px; margin-top: 10px; }
.login-brand p { margin: 0; color: #B9B1A0; }
.login-card { padding: 26px; }
.login-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.login-top h2 { margin: 0; }
.chip-link { border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 700; }
.owner-login { margin: 14px 0 0; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 16px 0; font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ===== شريط الموبايل السفلي ===== */
.bottom-nav { display: none; }

@media (max-width: 1000px) {
    .side { transform: translateX(105%); box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
    [dir="ltr"] .side { transform: translateX(-105%); }
    body.side-open .side { transform: none; }
    body.side-open .side-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .45); }
    .main { margin-inline-start: 0; }
    .menu-btn { display: inline-grid; }
    .top { padding: 8px 12px; gap: 8px; }
    .content { padding: 16px 14px calc(90px + env(safe-area-inset-bottom)); }
    .grid2, .grid-side { grid-template-columns: minmax(0, 1fr); }
    .bottom-nav {
        display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px -12px rgba(0, 0, 0, .25);
    }
    .bottom-nav a, .bottom-nav button {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 11.5px; font-weight: 700;
        background: none; border: 0; font-family: inherit; padding: 4px 0; cursor: pointer;
    }
    .bottom-nav a:active, .bottom-nav button:active { color: var(--gold-deep); }
    .branch-pick select { max-width: 130px; }
    .branch-pick .ic { display: none; }
    h1 { font-size: 22px; }
    .hero-card b { font-size: 24px; }
}
@media (max-width: 520px) {
    .row2 { grid-template-columns: 1fr; }
    .chip { font-size: 13px; padding: 3px 10px; }
    .card { padding: 16px; }
}
/* ===== فلاتر وشبكات إضافية ===== */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 14px 16px; }
.filters label { font-size: 13px; color: var(--muted); font-weight: 600; }
.filters label.grow { flex: 1; min-width: 200px; }
.filters input:not([type=checkbox]), .filters select { display: block; margin-top: 4px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-family: inherit; font-size: 14.5px; background: #fff; width: 100%; }
.filters label.check { padding-bottom: 9px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.grid3.cards { gap: 16px; align-items: start; }
.grid3.cards > .card { margin: 0; }
.grid3 .span2 { grid-column: span 2; }
.row-actions { white-space: nowrap; }
.row-actions .btn + .btn { margin-inline-start: 4px; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #FCF8EC; }
.table tr.total-row td { border-top: 2px solid var(--line); background: #FCFAF4; }
.tabs.scroll { overflow-x: auto; scrollbar-width: none; }
.tabs.scroll a { white-space: nowrap; }
@media (max-width: 1000px) { .grid3, .grid3.cards { grid-template-columns: 1fr; } .grid3 .span2 { grid-column: auto; } }

/* ===== التقارير والمصروفات ولوحة التحكم ===== */
.reports { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.report-list { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 74px; }
.report-list a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--text); }
.report-list a b { display: block; font-size: 14.5px; }
.report-list a small { color: var(--muted); font-size: 12px; }
.report-list a:hover { background: #FCF8EC; }
.report-list a.on { background: var(--gold-soft); box-shadow: inset 3px 0 0 var(--gold); }
[dir="rtl"] .report-list a.on { box-shadow: inset -3px 0 0 var(--gold); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.quick .btn.on { border-color: var(--gold); background: var(--gold-soft); }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.report-head h2 { margin: 0; font-size: 21px; }
.report-head p { margin: 2px 0 0; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.summary-grid .sum { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: #FDFBF6; }
.summary-grid .sum span { display: block; color: var(--muted); font-size: 13px; }
.summary-grid .sum b { font-size: 18px; font-variant-numeric: tabular-nums; }
.summary-grid .sum.hl { background: var(--ink); border-color: var(--ink); }
.summary-grid .sum.hl span { color: #CFC8B8; }
.summary-grid .sum.hl b { color: var(--gold-light); }
.report-table tr.em td { font-weight: 800; background: #FCFAF4; border-top: 1px solid var(--line); }
.bars { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 110px; gap: 10px; align-items: center; font-size: 13.5px; }
.bar-row b { text-align: end; font-variant-numeric: tabular-nums; }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.bar { display: block; height: 10px; border-radius: 6px; background: #F1ECE0; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--gold-light), var(--gold)); }
.cat-bar { margin-bottom: 12px; }
.cat-bar-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.cat-list { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow-y: auto; }
.cat-list a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--text); font-size: 14px; }
.cat-list a:hover { background: #FCF8EC; }
.cat-list a.dim { opacity: .5; }
.cat-list i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.cat-list small { margin-inline-start: auto; color: var(--muted); }
.sub-title { font-size: 15px; margin: 0 0 10px; }
.total-line { margin: 12px 0 0; font-size: 16px; }
.dash-bottom { margin-top: 16px; }
.vchart { display: flex; align-items: flex-end; gap: 6px; height: 200px; direction: ltr; }
.vcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.vbar { width: 100%; max-width: 32px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--gold), var(--gold-light)); }
.vval { font-size: 10px; color: var(--muted); margin-bottom: 2px; white-space: nowrap; }
.vlbl { font-size: 11px; color: var(--muted); margin-top: 4px; }
.vbar { position: relative; }
.vbar em { position: absolute; bottom: 0; left: 22%; right: 22%; background: var(--good, #2E7D4F); border-radius: 4px 4px 0 0; }
.vchart.hours { height: 140px; gap: 2px; }
.bar-list { display: grid; gap: 9px; }
.bar-list .bar-label { unicode-bidi: plaintext; text-align: start; }
.stats-filter { margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.stats-filter .seg { display: flex; gap: 6px; flex-wrap: wrap; }
.stat-grid + .card, .stat-grid + .grid2 { margin-top: 16px; }
input[type=color] { height: 42px; padding: 4px; }
@media (max-width: 1000px) {
    .reports { grid-template-columns: minmax(0, 1fr); }
    .report-list { position: static; flex-direction: row; overflow-x: auto; }
    .report-list a { flex: none; max-width: 210px; }
    .report-list a small { display: none; }
    .bar-row { grid-template-columns: 100px minmax(0, 1fr) 80px; }
}
@media print {
    .reports { display: block; }
    .report-doc { border: 0; box-shadow: none; padding: 0; }
    .summary-grid .sum.hl, .table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .report-table { font-size: 11px; }
}

/* ===== قارئ الباركود بالكاميرا والتثبيت والميزان ===== */
.scanner { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; color: #fff; }
.scanner-top { width: 100%; max-width: 520px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.scanner-top .icon-btn { font-size: 24px; background: #fff; }
.scanner-view { position: relative; width: 100%; max-width: 520px; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #111; }
.scanner-view video { width: 100%; height: 100%; object-fit: cover; }
.scanner-frame { position: absolute; inset: 22% 10%; border: 3px solid var(--gold); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
.scanner-msg { margin-top: 14px; text-align: center; color: #ddd; }
.scanner-msg.err { color: #ff8a80; }
.input-with-btn { display: flex; gap: 6px; align-items: center; margin-top: 5px; }
.input-with-btn input { margin-top: 0 !important; }
.scale-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; color: var(--muted); }
.scale-bar b { font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }
.scale-bar.stable { border-color: #A5D6A7; background: #F1F8F1; }
.scale-bar.stable #scale-status { color: var(--good); font-weight: 700; }
.install-hero { display: flex; gap: 18px; align-items: center; }
.install-hero img { border-radius: 18px; flex: none; }
.install-hero h2 { margin-bottom: 4px; }
.steps-list { margin: 0; padding-inline-start: 20px; line-height: 2; }
.small-b { font-size: 14px !important; word-break: break-all; }

/* ===== شاشة البيع ===== */
.pos-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; background: #EDE7D8; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; padding: 9px 18px; border-radius: 9px; font-family: inherit; font-size: 15px; font-weight: 800; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--gold-deep); box-shadow: var(--shadow); }
.seg button.on.buy { color: var(--info); }
kbd { font-family: inherit; font-size: 11px; font-weight: 700; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--muted); background: #fff; }
.btn kbd { background: rgba(255, 255, 255, .5); }
.pos-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.pos-main, .pos-side, .grid2 > *, .grid-side > *, .grid3 > * { min-width: 0; }
.pos-main .card, .pos-side .card { margin-bottom: 14px; }
.pos.mode-buy .sell-only, .pos.mode-sell .buy-only { display: none !important; }
.scan { display: flex; align-items: center; gap: 10px; border: 2px dashed var(--gold-light); border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; color: var(--gold-deep); }
.scan input { flex: 1; border: 0; outline: 0; font-family: inherit; font-size: 17px; font-weight: 700; background: transparent; min-width: 0; }
.free summary { cursor: pointer; font-weight: 800; color: var(--gold-deep); padding: 4px 0 10px; }
.pos.mode-buy .free summary { color: var(--info); }
.free-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.free-grid label { font-size: 13px; color: var(--muted); font-weight: 600; }
.free-grid label.wide { grid-column: span 2; }
.free-grid input, .free-grid select { display: block; width: 100%; margin-top: 4px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; font-family: inherit; font-size: 15px; background: #fff; }
.pos-lines .cell-in { width: 92px; min-width: 70px; text-align: end; padding: 6px 8px; }
.icon-btn.danger { min-width: 30px; height: 30px; color: var(--bad); font-size: 20px; line-height: 1; }
.totals .tot-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #F1ECE1; color: var(--muted); }
.totals .tot-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.totals .grand { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 800; }
.totals .grand b { font-size: 24px; color: var(--gold-light); font-variant-numeric: tabular-nums; }
.pos.mode-buy .totals .grand { background: #0D3C73; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.pay-grid label { margin-bottom: 8px; }
.pay-left { margin: 10px 0; font-weight: 700; }
.pay-left .warn { color: var(--warn); } .pay-left .bad { color: var(--bad); } .pay-left .info { color: var(--info); }
.btn.big { padding: 14px 18px; font-size: 17px; margin-top: 6px; }
.btn.block + .btn.block { margin-top: 8px; }
.req { color: var(--bad); }
@media (max-width: 1200px) { .free-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .pos-grid { grid-template-columns: minmax(0, 1fr); } }

/* ===== الفاتورة المطبوعة ===== */
.doc-wrap { display: flex; justify-content: center; margin-bottom: 18px; }
.doc { background: #fff; color: #000; box-shadow: var(--shadow); border: 1px solid var(--line); }
.receipt { width: 80mm; padding: 4mm 4mm 6mm; font-size: 11px; line-height: 1.45; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 1.5px 1px; vertical-align: top; }
.receipt .end { text-align: end; }
.r-shop { text-align: center; font-size: 17px; font-weight: 800; }
.r-soft { text-align: center; color: #555; font-size: 10px; }
.r-band { background: #000; color: #fff; text-align: center; font-weight: 800; font-size: 13px; padding: 3px; margin: 6px 0 4px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.r-info td:first-child { color: #555; font-size: 10px; width: 38%; }
.r-info td:last-child { text-align: end; }
.r-dash { border-top: 1px dashed #000; margin: 5px 0; }
.r-head td { font-weight: 800; font-size: 10px; border-bottom: 1px solid #000; }
.r-desc { font-weight: 800; padding-top: 5px !important; }
.r-detail { color: #555; font-size: 9px; }
.r-sep td { border-bottom: .5px solid #999; padding-bottom: 4px; }
.r-totals td:first-child { color: #555; }
.r-totals { margin-top: 4px; }
.r-grand { display: flex; justify-content: space-between; align-items: center; background: #000; color: #fff; padding: 5px 6px; margin: 4px 0; font-weight: 800; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.r-grand b { font-size: 14px; }
.r-sign { margin-top: 14px; }
.r-footer { text-align: center; font-weight: 700; margin: 4px 0 6px; }
.r-code { text-align: center; font-size: 9px; }
.r-code svg { width: 58mm; height: 11mm; display: block; margin: 0 auto 2px; }
.a4 { width: 210mm; min-height: 297mm; padding: 14mm; font-size: 12.5px; }
.a4 .soft { color: #555; }
.a4 .end { text-align: end; }
.a4-head { display: flex; justify-content: space-between; gap: 20px; }
.a4-shop { font-size: 24px; font-weight: 800; }
.a4-title { font-size: 21px; font-weight: 800; color: #0B6B62; }
.a4-no { font-size: 15px; font-weight: 800; }
.a4-rule { border-top: 2px solid #0B6B62; margin: 10px 0 14px; }
.a4-rule.thin { border-top-width: 1px; margin-top: 22px; }
.a4 table { width: 100%; border-collapse: collapse; }
.a4-who td { padding: 5px 4px; border-bottom: .5px solid #bbb; }
.a4-who { margin-bottom: 14px; }
.a4-items th { background: #24221E; color: #fff; padding: 7px 6px; text-align: start; font-size: 11.5px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.a4-items th.end { text-align: end; }
.a4-items td { padding: 7px 6px; border-bottom: .5px solid #ddd; }
.a4-items tbody tr:nth-child(even) td { background: #F4F1EA; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.a4-items tbody tr:last-child td { border-bottom: 1px solid #000; }
.a4-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 14px; }
.a4-pay td, .a4-tot td { padding: 5px 6px; border-bottom: .5px solid #bbb; }
.a4-tot tr.grand td { background: #24221E; color: #fff; font-weight: 800; font-size: 15px; padding: 9px 8px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.a4-sign { display: flex; justify-content: space-between; margin-top: 40px; }
.a4-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.a4-foot .r-code svg { width: 55mm; }

@media print {
    .side, .top, .bottom-nav, .trial-bar, .actions, .no-print, .alert, .side-backdrop { display: none !important; }
    .main { margin: 0 !important; }
    .content { padding: 0 !important; max-width: none; }
    body { background: #fff; }
    .doc { box-shadow: none; border: 0; }
    .doc-wrap { display: block; margin: 0; }
    .receipt { width: 72mm; padding: 0 2mm; margin: 0; box-sizing: border-box; }
    .a4 { width: auto; min-height: 0; padding: 0; }
}

/* ===== المتجر الإلكتروني ===== */
.nav-badge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-style: normal; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.spread-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #F1ECE1; }
.spread-row:last-of-type { border-bottom: 0; }
.store-link { margin-top: 14px; }
.store-link input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-family: inherit; background: #FCFAF4; }
.steps-list li.done { color: var(--good); }
.steps-list li.done::marker { content: "✓  "; }
.thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; display: block; border: 1px solid var(--line); }
.thumb.none { display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-deep); }
.thumb.big { width: 90px; height: 90px; margin-bottom: 6px; }
.thumb.wide { width: 100%; max-width: 260px; height: 90px; margin-bottom: 6px; }
.pay-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.pay-cards > .card { margin: 0; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.img-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.img-item.is-main { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.img-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.img-actions { display: flex; gap: 6px; padding: 8px; justify-content: space-between; align-items: center; }
.img-actions form { margin: 0; }
.deliver-box { margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--gold-soft); border: 1px solid #F0E2B0; }
.deliver-box h3 { margin: 0 0 4px; font-size: 16px; }
.cancel-box { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.transfer-box { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.transfer-box h3 { margin: 0 0 4px; font-size: 16px; }
.transfer-box p.bad { margin: 4px 0; }
.card.form form + form { margin-top: 10px; }
.btn.bad { color: var(--bad); }
.en-fields { margin: 4px 0 16px; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; }
.en-fields summary { cursor: pointer; font-weight: 700; color: var(--gold-deep); margin-bottom: 8px; }
.table td b + br + .muted, .table td a b { white-space: nowrap; }

form.inline { display: inline; }
.nowrap { white-space: nowrap; }
.einv-box { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.einv-box .grow { flex: 1; min-width: 240px; }
.einv-qr { display: flex; justify-content: center; margin: 8px auto 2px; }
.einv-qr img, .einv-qr canvas { width: 120px !important; height: 120px !important; }
.a4 .einv-qr { margin: 0; }
.a4 .einv-qr img, .a4 .einv-qr canvas { width: 110px !important; height: 110px !important; }
.pos-tax { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #E3F0FD; color: var(--info); font-weight: 700; margin-bottom: 10px; }
.store-box { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px 4px; margin: 6px 0 12px; display: grid; gap: 8px; }
.store-box legend { font-weight: 800; color: var(--gold-deep); padding: 0 6px; display: inline-flex; gap: 6px; align-items: center; }
.branch-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 4px 0 10px; display: grid; gap: 6px; }
.branch-box legend { font-weight: 700; padding: 0 6px; }
.branch-box #branch-list { display: grid; gap: 4px; padding-inline-start: 8px; }

/* ===== المساعد الذكي ===== */
.ai-fab { position: fixed; z-index: 60; inset-inline-end: 22px; bottom: 22px; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; color: #1E1C18;
    background: radial-gradient(circle at 30% 25%, #FFF3C4, #E9C766 45%, #B8892B 100%); box-shadow: 0 10px 28px -8px rgba(120, 88, 20, .65), 0 0 0 4px rgba(233, 199, 102, .22);
    display: grid; place-items: center; transition: transform .2s; animation: ai-glow 3.2s ease-in-out infinite; }
.ai-fab:hover { transform: translateY(-2px) scale(1.04); }
@keyframes ai-glow { 50% { box-shadow: 0 10px 28px -8px rgba(120, 88, 20, .65), 0 0 0 9px rgba(233, 199, 102, .12); } }
body.ai-open .ai-fab { display: none; }
.ai-panel { position: fixed; z-index: 61; inset-inline-end: 22px; bottom: 22px; width: min(430px, calc(100vw - 24px)); height: min(640px, calc(100vh - 44px));
    background: #FFFDF8; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 70px -20px rgba(30, 28, 24, .45); display: flex; flex-direction: column; overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: linear-gradient(135deg, #1E1C18, #3A3226); color: #F6EBC8; }
.ai-head > div { flex: 1; min-width: 0; }
.ai-head b { display: block; font-size: 15.5px; }
.ai-head small { display: block; font-size: 11.5px; color: #B8AF99; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-hbtn { background: rgba(255, 255, 255, .08); border: 0; color: #F6EBC8; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; font-size: 15px; }
.ai-hbtn:hover { background: rgba(255, 255, 255, .16); }
.ai-msgs { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.ai-msg { max-width: 92%; padding: 10px 14px; border-radius: 16px; line-height: 1.75; font-size: 14.5px; overflow-wrap: anywhere; }
.ai-msg.user { align-self: flex-start; background: linear-gradient(135deg, #E9C766, #0F8A7E); color: #1E1C18; border-end-start-radius: 4px; white-space: pre-wrap; }
.ai-msg.bot { align-self: flex-end; background: #fff; border: 1px solid var(--line); border-end-end-radius: 4px; }
[dir="ltr"] .ai-msg.user { align-self: flex-end; } [dir="ltr"] .ai-msg.bot { align-self: flex-start; }
.ai-msg.err { border-color: #F2B8B5; background: #FDECEA; color: var(--bad); }
.ai-msg p { margin: 0 0 8px; } .ai-msg p:last-child { margin: 0; }
.ai-msg ul, .ai-msg ol { margin: 4px 0 8px; padding-inline-start: 20px; }
.ai-msg h4 { margin: 8px 0 4px; font-size: 15px; }
.ai-msg code { background: #F4EFE2; padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.ai-msg .ai-tbl { overflow-x: auto; margin: 6px 0; }
.ai-msg table { border-collapse: collapse; font-size: 13px; width: 100%; }
.ai-msg th, .ai-msg td { border: 1px solid var(--line); padding: 5px 8px; text-align: start; white-space: nowrap; }
.ai-msg th { background: #FBF6E6; }
.ai-copy { display: block; margin-top: 6px; background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0; }
.ai-typing { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); font-size: 13px; }
.ai-typing i { width: 6px; height: 6px; border-radius: 50%; background: #0F8A7E; animation: ai-dot 1s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .15s; } .ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 50% { opacity: .25; transform: translateY(-3px); } }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chips button { border: 1px solid #E8D9A8; background: #FFF8E4; color: #6B5413; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.ai-chips button:hover { background: #FBEFC8; }
.ai-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.ai-form textarea { flex: 1; resize: none; max-height: 120px; min-height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 14.5px; margin: 0; }
.ai-send { flex: none; width: 44px; height: 42px; border-radius: 12px; border: 0; background: #1E1C18; color: #E9C766; cursor: pointer; display: grid; place-items: center; }
[dir="rtl"] .ai-send svg { transform: scaleX(-1); }
.ai-send:disabled { opacity: .5; cursor: default; }
.ai-foot { margin: 0; padding: 0 12px 8px; font-size: 11px; color: var(--muted); background: #fff; text-align: center; }
@media (max-width: 1000px) {
    .ai-fab { bottom: 80px; inset-inline-end: 14px; width: 52px; height: 52px; }
    .ai-panel { bottom: 76px; height: min(640px, calc(100vh - 96px)); }
}
@media (max-width: 600px) {
    .ai-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; z-index: 80; }
}
@media print { .ai-fab, .ai-panel { display: none !important; } }
/* إعدادات المساعد */
.ai-settings .ai-key-actions { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; padding-bottom: 2px; }
.ai-model-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ai-model-tools input[type=search] { flex: 1; min-width: 220px; margin: 0; }
.ai-models { width: 100%; font-size: 13.5px; padding: 6px; border-radius: 10px; }
.ai-models option { padding: 5px 6px; border-radius: 6px; }
.ai-note { background: #FAF7EF; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 12px 0; font-size: 13.5px; }
.ai-note ul { margin: 6px 0 0; padding-inline-start: 18px; color: var(--muted); }
.filters-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters-bar .seg { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-end: auto; }
.filters-bar label { margin: 0; font-size: 13px; }
.filters-bar input, .filters-bar select { margin-top: 2px; }
.ai-bal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 12px; }
.ai-bal { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #FFFDF8; }
.ai-bal h3 { margin: 0 0 8px; font-size: 15px; }
.ai-bal h3 small { color: var(--muted); font-weight: 500; font-size: 12px; }
.ai-bal-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.ai-bal-row.big b { font-size: 19px; color: var(--gold-deep); }
.ai-bar { height: 8px; border-radius: 6px; background: #F1ECE0; overflow: hidden; margin-top: 10px; }
.ai-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #E9C766, #0F8A7E); border-radius: 6px; transition: width .6s; }
.ai-bar i.hot { background: linear-gradient(90deg, #F2A35E, #C62828); }
@media (max-width: 1000px) { .ai-bal-grid { grid-template-columns: minmax(0, 1fr); } }

/* ===== لوحة الملاحظات ===== */
.corkboard { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 30px 26px; align-items: start; padding: 34px 26px 40px; border-radius: 22px; min-height: 360px;
    background-color: #C9A57A;
    background-image: radial-gradient(rgba(120, 82, 40, .35) 1px, transparent 1.4px), radial-gradient(rgba(255, 240, 210, .28) 1px, transparent 1.6px), linear-gradient(135deg, #D2B088, #B88E5F);
    background-size: 7px 7px, 11px 11px, 100% 100%; background-position: 0 0, 3px 4px, 0 0;
    box-shadow: inset 0 0 0 10px #8A5E34, inset 0 0 0 12px #6E4825, inset 0 6px 22px rgba(0, 0, 0, .25), 0 14px 30px -18px rgba(60, 35, 10, .6); }
.note-card { position: relative; padding: 26px 18px 12px; min-height: 170px; display: flex; flex-direction: column; color: #2B2620; border-radius: 3px 3px 18px 3px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .12), 0 12px 18px -10px rgba(0, 0, 0, .45); transition: transform .18s, box-shadow .18s; overflow-wrap: anywhere; }
.note-card::after { content: ""; position: absolute; inset-inline-end: 0; bottom: 0; width: 26px; height: 26px; background: linear-gradient(135deg, rgba(0, 0, 0, .14) 50%, transparent 50%); border-radius: 0 0 16px 0; }
[dir="rtl"] .note-card { border-radius: 3px 3px 3px 18px; } [dir="rtl"] .note-card::after { background: linear-gradient(225deg, rgba(0, 0, 0, .14) 50%, transparent 50%); border-radius: 0 0 0 16px; }
.note-card:hover { transform: rotate(0) translateY(-3px) scale(1.02) !important; box-shadow: 0 2px 2px rgba(0, 0, 0, .12), 0 22px 30px -14px rgba(0, 0, 0, .5); z-index: 2; }
.tilt-0 { transform: rotate(-2deg); } .tilt-1 { transform: rotate(1.5deg); } .tilt-2 { transform: rotate(-.8deg); } .tilt-3 { transform: rotate(2.2deg); } .tilt-4 { transform: rotate(-1.6deg); }
.note-pin { position: absolute; top: -9px; left: 50%; margin-left: -10px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FF8A80, #C62828 60%, #7F1010); box-shadow: 0 3px 4px rgba(0, 0, 0, .4); }
.note-card.pinned .note-pin { background: radial-gradient(circle at 35% 30%, #FFE08A, #0F8A7E 60%, #7A5E10); width: 24px; height: 24px; margin-left: -12px; top: -11px; }
.note-card h3, .note-body { text-align: start; }
.note-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; line-height: 1.4; }
.note-body { font-size: 15px; line-height: 1.75; flex: 1; white-space: normal; }
.note-card footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; padding-top: 8px; border-top: 1px dashed rgba(0, 0, 0, .14); font-size: 11.5px; color: rgba(43, 38, 32, .65); }
.note-actions { display: flex; gap: 2px; opacity: .55; transition: opacity .15s; }
.note-card:hover .note-actions, .note-actions:focus-within { opacity: 1; }
.note-actions form { margin: 0; }
.nbtn { border: 0; background: rgba(255, 255, 255, .45); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: #3A332A; }
.nbtn:hover { background: rgba(255, 255, 255, .85); }
.nbtn.on { color: #0B6B62; background: rgba(255, 255, 255, .8); }
.n-yellow { background: linear-gradient(180deg, #FFF59D, #FFEE7A); }
.n-pink { background: linear-gradient(180deg, #FFCDD9, #FFB6C8); }
.n-blue { background: linear-gradient(180deg, #C8E6FF, #AFD9FF); }
.n-green { background: linear-gradient(180deg, #D4F5C4, #BDEDA8); }
.n-purple { background: linear-gradient(180deg, #E5D4FF, #D6BEFF); }
.n-orange { background: linear-gradient(180deg, #FFDDB3, #FFCB8F); }
.n-white { background: linear-gradient(180deg, #FFFFFF, #F4F1EA); }
.board-empty { grid-column: 1 / -1; display: grid; place-items: center; padding: 30px 0; }
.board-empty .note-card { max-width: 320px; text-align: center; }
.notes-filters { align-items: flex-end; }
.note-swatches { display: flex; gap: 6px; align-items: center; padding-bottom: 6px; }
.sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .12); display: inline-block; cursor: pointer; position: relative; }
.sw.all { background: conic-gradient(#FFEE7A 0 14%, #FFB6C8 0 28%, #AFD9FF 0 42%, #BDEDA8 0 57%, #D6BEFF 0 71%, #FFCB8F 0 85%, #fff 0); }
.sw.on, .note-colors .sw:has(input:checked) { border-color: #1E1C18; box-shadow: 0 0 0 3px rgba(15, 138, 126, .45); }
.note-colors { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.note-colors > span { font-size: 13px; color: var(--muted); margin-inline-end: 4px; }
.note-colors input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.note-opts { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 6px; }
.note-dialog { border: 0; padding: 0; background: transparent; width: min(520px, calc(100vw - 24px)); }
.note-dialog::backdrop { background: rgba(30, 28, 24, .55); backdrop-filter: blur(2px); }
.note-form { padding: 22px; border-radius: 6px 6px 22px 6px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.note-form h2 { margin: 0 0 12px; }
.note-form input:not([type=radio]):not([type=checkbox]), .note-form textarea { background: rgba(255, 255, 255, .72); }
@media (max-width: 600px) { .corkboard { padding: 26px 14px 30px; gap: 26px; grid-template-columns: minmax(0, 1fr); } }
@media print { .corkboard { background: none; box-shadow: none; } .note-actions, .note-pin { display: none; } }

.forgot-box { margin: 4px 0 12px; font-size: 13.5px; }
.forgot-box summary { cursor: pointer; text-align: center; color: var(--gold-deep); font-weight: 700; list-style: none; }
.forgot-box summary::-webkit-details-marker { display: none; }
.forgot-box p { margin: 8px 0 0; color: var(--muted); line-height: 1.8; }
.forgot-box b { color: var(--text); }

/* حسابات الدفع وصورة البطاقة في شاشة البيع */
.pay-grid label { display: flex; flex-direction: column; gap: 4px; }
.pay-grid .acc-pick { font-size: 12px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: #FCFAF4; color: var(--muted); margin: 0; }
.id-image { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 8px; }
.id-pick { cursor: pointer; margin: 0; }
.id-thumb { position: relative; }
.id-thumb img { width: 74px; height: 50px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.id-thumb .nbtn { position: absolute; top: -8px; inset-inline-end: -8px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--line); font-size: 11px; }

.inv-extra { margin-top: 16px; }
.id-view img { max-width: 100%; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); display: block; margin-bottom: 10px; }

/* ===== الخزنة والحسابات ===== */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 16px 0; }
.acc-card { margin: 0; position: relative; overflow: hidden; border-top: 4px solid var(--gold); }
.acc-card.t-bank { border-top-color: #1565C0; } .acc-card.t-wallet { border-top-color: #7B1FA2; }
.acc-card.off { opacity: .55; }
.acc-top { display: flex; gap: 10px; align-items: center; }
.acc-top small { display: block; color: var(--muted); font-size: 12px; }
.acc-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #FBF3D9; color: #0B6B62; flex: none; }
.t-bank .acc-ic { background: #E3EEFB; color: #1565C0; } .t-wallet .acc-ic { background: #F1E4F8; color: #7B1FA2; }
.acc-bal { font-size: 24px; font-weight: 800; margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.acc-bal small { font-size: 13px; color: var(--muted); font-weight: 600; }
.acc-actions { display: flex; gap: 6px; margin-top: 10px; }
.vpair { display: flex; gap: 2px; align-items: flex-end; width: 100%; justify-content: center; height: 100%; }
.vpair .vbar { max-width: 14px; }
.vpair .vbar.out { background: linear-gradient(180deg, #EF9A9A, #C62828); }
tr.total td { border-top: 2px solid var(--line); background: #FCFAF4; }

.brand-pill { font-size: 11px; padding: 1px 8px; background: #F3ECDA; color: #6B5413; vertical-align: middle; }

/* سطر «اسم — قيمة» وحقول الأرقام الصغيرة (تنبيهات المخزون والأمانات وحساب المورد) */
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line, #DCE6E8); }
.kv:last-child { border-bottom: 0; }
.bad-text { color: #c0392b; }
.good-text { color: #2e7d32; }
.inline-num { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; flex-direction: row !important; }
.inline-num input { width: 90px; flex: none; text-align: center; }
.ledger-bal { display: flex; flex-wrap: wrap; gap: 10px; }
.ledger-bal .card.stat b { font-size: 22px; }
.op-fields [data-for] { display: none; }
.pill.warn { background: #FFF4E0; color: #9a6400; }
.row-actions form { display: inline; }
/* سطور القيد في المحاسبة */
.je-line { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(70px, 1fr) minmax(70px, 1fr) minmax(0, 1.4fr); gap: 6px; margin-bottom: 6px; }
.table tr.entry-head td { border-top: 2px solid var(--line, #DCE6E8); }
@media (max-width: 640px) { .je-line { grid-template-columns: 1fr 1fr; } .je-line select { grid-column: 1 / -1; } }

/* ===== البيع أوفلاين ===== */
.net-bar { background: #FFF4D6; color: #7A5A00; text-align: center; padding: 6px 12px; font-size: 14px; font-weight: 700; }
.net-bar.off { background: #33291A; color: #9FE0D8; }
.offline-bar { background: #FDECEA; color: var(--bad); }
.pos.is-offline .pos-head { box-shadow: inset 0 -3px 0 #0F8A7E; }
.off-receipt { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .6); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 16px; overflow: auto; }
.off-receipt[hidden] { display: none; }
.off-receipt .actions { display: flex; gap: 10px; }
.r-note { text-align: center; font-size: 10px; font-weight: 700; }
.offline-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.offline-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.offline-total { margin-inline-start: auto; }
.offline-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.offline-actions input { width: auto; flex: 1; min-width: 160px; margin: 0; }
@media print {
    body.off-printing .content > :not(.off-receipt), body.off-printing .net-bar { display: none !important; }
    body.off-printing .off-receipt { position: static; background: none; padding: 0; overflow: visible; }
    body.off-printing .off-receipt .doc { box-shadow: none; border: 0; }
}

/* ===== نقطة البيع العامة ===== */
.pos2.is-return .sale-only, .pos2:not(.is-return) .return-only { display: none !important; }
.pos2:not(.is-delivery):not(.has-client) .delivery-only, .pos2.is-return .delivery-only { display: none !important; }
.ai-pick { margin-bottom: 12px; }
.ai-pick .lbl { display: block; font-size: 13.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.ai-pick-tools { display: flex; gap: 6px; margin-bottom: 6px; }
.ai-pick-tools input { flex: 1; min-width: 0; }
.ai-pick-tools select { width: auto; }
.ai-pick label.check { margin-bottom: 4px; font-size: 13px; }
.ai-pick #ai-model { width: 100%; font-size: 13px; padding: 4px; margin-top: 4px; }
.ai-pick #ai-model option { padding: 4px 6px; }
.ai-model-info { background: var(--gold-soft); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.ai-model-info:empty { display: none; }
.warn-text { color: var(--warn); }
.addr-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.addr-row form { display: flex; gap: 4px; flex-shrink: 0; }
.addr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 8px; }
.addr-chip { border: 1px solid var(--line, #d9dee5); background: transparent; color: inherit; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12.5px;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.addr-chip.on { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-deep); font-weight: 600; }
.return-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 12px; border-radius: 12px; background: #FDECEA; color: var(--bad); }
.return-bar input { flex: 1; min-width: 140px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-family: inherit; }
.search-results { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow: auto; margin: -4px 0 12px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: var(--card); }
.search-results button { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; text-align: start; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; font-family: inherit; cursor: pointer; }
.search-results button:hover { background: var(--gold-soft); }
.search-results .num { font-weight: 700; }
/* رصيد الفروع */
.branch-stock th.here, .branch-stock td.here { background: var(--gold-soft); }
.branch-stock th small { display: block; font-weight: 600; color: var(--gold-deep); font-size: 11px; }
.branch-stock td.zero b { color: var(--muted); font-weight: 600; }
.branch-stock .bs-actions { display: flex; gap: 4px; justify-content: flex-end; margin-top: 4px; flex-wrap: wrap; }
.search-results button:has(.r-img) { grid-template-columns: 46px 1fr auto; }
.search-results .r-img { grid-row: span 2; width: 46px; height: 46px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); align-self: center; }
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.cat-tabs button { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 14px; font-family: inherit; font-weight: 600; cursor: pointer; border-inline-start: 4px solid var(--c, var(--gold)); }
.cat-tabs button.on { background: var(--ink); color: #fff; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; max-height: 360px; overflow-y: auto; }
.prod-grid button { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 76px; text-align: start; padding: 10px; border-radius: 12px; border: 1px solid var(--line); border-top: 4px solid var(--c, var(--gold)); background: var(--card); font-family: inherit; cursor: pointer; }
.prod-grid button:hover { box-shadow: var(--shadow); }
.prod-grid button b { font-size: 14px; line-height: 1.35; }
.prod-grid button span { color: var(--gold-deep); font-weight: 800; }
.prod-grid button.has-img { padding-top: 6px; }
.prod-grid button img { width: 100%; height: 64px; object-fit: contain; border-radius: 8px; background: #fff; margin-bottom: 4px; }
.prod-grid button i { position: absolute; inset-inline-end: 8px; bottom: 6px; font-style: normal; font-size: 12px; }
.qty-box { display: inline-flex; align-items: center; gap: 2px; }
.qty-box .inline-num { width: 64px; text-align: center; }
.pos-lines .inline-num { width: 84px; }
.line-extra { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.chip-link { border: 0; background: none; color: var(--gold-deep); font-family: inherit; font-size: 12px; cursor: pointer; padding: 0; }
.extra-lines { justify-content: flex-start; flex-wrap: wrap; }
.pos-dialog { border: 0; border-radius: 16px; padding: 20px; width: min(460px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.pos-dialog::backdrop { background: rgba(14, 42, 51, .45); }
.pos-dialog h3 { margin: 0 0 12px; }
.pos-dialog .check { display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.pos-dialog .btn.block { margin-bottom: 6px; text-align: start; }
.alert.ok { background: #E8F5E9; color: var(--good); }
/* الترابيزات */
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.table-card { display: flex; flex-direction: column; gap: 4px; min-height: 110px; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--text); }
.table-card b { font-size: 18px; }
.table-card.busy { border-color: var(--warn); background: #FFF6E5; }
.table-card .tc-total { margin-top: auto; font-weight: 800; color: var(--gold-deep); }
.area-title { margin: 18px 0 8px; color: var(--muted); font-size: 14px; font-weight: 700; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .inline-form input:not([type=checkbox]) { min-width: 90px; flex: 1; }
[hidden] { display: none !important; }

/* عدد طلبات المتجر الجديدة في القائمة */
.side-nav .nav-badge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #E5484D; color: #fff; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; line-height: 1; }

/* ===== ألوان المتجر (إعدادات المتجر) ===== */
.theme-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 14px; margin: 4px 0 12px; display: grid; gap: 10px; min-width: 0; }
.theme-box legend { font-weight: 700; padding: 0 6px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: grid; justify-items: center; gap: 3px; padding: 6px 6px 4px; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; font: inherit; color: inherit; width: 74px; }
.swatch span { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--a) 0 50%, var(--k) 50% 100%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.swatch small { font-size: 11.5px; line-height: 1.3; text-align: center; }
.swatch.on, .swatch:hover { border-color: var(--a); }
.theme-box input[type="color"] { width: 100%; height: 42px; padding: 3px; cursor: pointer; }
.theme-box input[type="range"] { width: 100%; accent-color: var(--k, #0E2A33); }
.theme-prev { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #F4F7F8; }
.tp-hero { padding: 18px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #fff;
    background: linear-gradient(160deg, color-mix(in srgb, var(--k) 86%, #fff), var(--k)); }
.tp-hero.has-cv { background: linear-gradient(270deg, color-mix(in srgb, var(--k) var(--sh), transparent), color-mix(in srgb, var(--k) calc(var(--sh) * .15), transparent)), var(--cv) center / cover; }
.tp-hero b { font-size: 18px; }
.tp-btn { background: var(--a); color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.tp-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.tp-tag { background: color-mix(in srgb, var(--a) 12%, #fff); color: color-mix(in srgb, var(--a) 72%, #000); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.tp-price { font-weight: 800; color: var(--k); margin-inline-start: auto; }
.tp-add { width: 30px; height: 30px; border-radius: 50%; background: var(--a); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* ===== اختيار لون القسم ===== */
.color-field { display: grid; gap: 6px; margin-bottom: 10px; }
.cf-label { font-weight: 600; font-size: 14px; }
.palette { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; direction: ltr; }
.palette .sw { padding: 0; }
.cf-custom { display: inline-flex !important; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 !important; cursor: pointer; }
.cf-custom input[type="color"] { width: 30px; height: 30px; padding: 0; border-radius: 8px; cursor: pointer; }

/* ===== المديولات ===== */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.mod-card { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.mod-card.on { border-color: var(--gold-light); box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow); }
.mod-card p { margin: 0; font-size: 14px; }
.mod-card .btn { align-self: flex-start; margin-top: 6px; }
.mod-top { display: flex; align-items: center; gap: 12px; }
.mod-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-deep); flex: none; }
.mod-card.on .mod-ic { background: var(--gold); color: #fff; }
.mod-title { flex: 1; min-width: 0; }
.mod-title h2 { margin: 0 0 2px; font-size: 17px; }
.mod-list { margin: 4px 0 0; padding-inline-start: 18px; font-size: 13.5px; line-height: 1.9; }
.mod-toggle { margin: 0; }
.switch { position: relative; width: 48px; height: 28px; border-radius: 999px; border: 0; background: #C7D3D6; cursor: pointer; padding: 0; transition: background .2s; }
.switch i { position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s; }
.switch.on { background: var(--gold); }
.switch.on i { inset-inline-start: 23px; }
.switch:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }
/* بطاقات أرقام صغيرة في صفحات المديولات */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpis .card { margin: 0; padding: 14px 16px; }
.kpis span { display: block; color: var(--muted); font-size: 13px; }
.kpis b { font-size: 21px; }
.abc { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-weight: 800; font-size: 13px; }
.abc.A { background: #E8F5E9; color: var(--good); } .abc.B { background: #FFF4E0; color: #9a6400; } .abc.C { background: #FDECEA; color: var(--bad); }
.lines-edit .ln { display: grid; grid-template-columns: minmax(0, 3fr) minmax(80px, 1fr) auto; gap: 8px; margin-bottom: 8px; align-items: end; }
.lines-edit .ln.price { grid-template-columns: minmax(0, 3fr) minmax(70px, 1fr) minmax(70px, 1fr) auto; }
.dash-pick { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.vbar.fc { background: repeating-linear-gradient(135deg, var(--gold-light) 0 6px, var(--gold-soft) 6px 12px); border: 1px dashed var(--gold); }
.ai-asks { display: flex; flex-wrap: wrap; gap: 8px; }
.import-box summary { cursor: pointer; list-style: none; }
.import-box summary::-webkit-details-marker { display: none; }
.import-box summary::before { content: "⬆ "; color: var(--gold-deep); }
.import-box[open] summary { margin-bottom: 10px; }

/* «شاهد الشرح»: فيديو الشرح عند فصل الصفحة */
.guide-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.guide-btn:hover { background: var(--gold-soft); }
@media (max-width: 640px) { .guide-btn span { display: none; } .guide-btn { padding: 6px 10px; } }

/* «ابدأ هنا»: خطوات البداية للمحل الجديد */
.onboard h2 .muted { font-weight: 500; margin-inline-start: 6px; }
.onboard-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 4px 0 12px; }
.onboard-bar i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.onboard-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.onboard-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.onboard-steps li.done { opacity: .65; }
.onboard-steps li.done b { text-decoration: line-through; }
.onboard-steps .tick { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.onboard-steps li.done .tick { background: var(--gold); border-color: var(--gold); color: #fff; }

/* الجرد بالباركود */
.count-scan label { max-width: 520px; }
.count-scan .bad { color: var(--bad, #c0392b); }
@keyframes count-hit { from { background: var(--gold-soft); } to { background: transparent; } }
tr.count-hit td { animation: count-hit 1.6s ease-out; }

/* البحث السريع (Ctrl+K) */
.find-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(15, 20, 25, .45); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.find-panel { width: 100%; max-width: 620px; background: var(--card); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); overflow: hidden; }
.find-panel input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: 17px; outline: none; margin: 0 !important; border-radius: 0; }
.find-results { max-height: 60vh; overflow: auto; padding: 6px 0; }
.find-group { padding: 8px 18px 4px; font-size: 12px; font-weight: 700; color: var(--muted, #7a7a7a); }
.find-results a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 18px; color: inherit; text-decoration: none; }
.find-results a small { color: var(--muted, #7a7a7a); white-space: nowrap; }
.find-results a.on, .find-results a:hover { background: var(--gold-soft); }
.find-none { padding: 14px 18px; color: var(--muted, #7a7a7a); margin: 0; }

/* البيع من غير نت */
.off-bar { padding: 10px 14px; border-radius: 12px; margin-bottom: 10px; font-weight: 600; line-height: 1.7; }
.off-bar.warn { background: #FFF4E0; border: 1px solid #F5C99A; color: #8a5300; }
.off-bar.bad { background: #FDECEA; border: 1px solid #F5B7B1; color: #a93226; }
.off-bar.good { background: #E8F6EF; border: 1px solid #A9DFBF; color: #1e7e4a; }
.off-review { border: 1px solid #F5C99A; }

/* فحص ربط واتساب */
.wa-check { list-style: none; padding: 0; margin: 0 0 12px; line-height: 1.9; }
.wa-check .good { color: #1e7e4a; }
.wa-check .bad { color: #a93226; }

/* QR code المتجر */
.store-qr .qr-row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.store-qr .qr-box { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; flex: none; }
.store-qr .qr-box img { width: 100%; height: 100%; display: block; }
.store-qr .qr-opts { display: flex; flex-direction: column; gap: 10px; min-width: 200px; flex: 1; }
.store-qr .qr-opts input[type=color] { width: 64px; height: 36px; padding: 2px; }

/* صفحات الجداول الطويلة (السابق / التالي) */
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 4px; flex-wrap: wrap; }
.pager .disabled { opacity: .45; pointer-events: none; }

/* اللوجو في الإعدادات: معاينة + رفع من الجهاز أو رابط */
.logo-field { display: flex; gap: 14px; align-items: flex-start; }
.logo-field .grow { flex: 1; min-width: 0; }
.logo-preview { width: 84px; height: 84px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; flex: none; }

/* المحل من غير ضريبة مبيعات: خانات الضريبة بتختفي من شاشة البيع والمشتريات */
.no-tax .tax-col { display: none !important; }

/* ===== المحادثات ===== */
.chat { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 150px); min-height: 460px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.chat-side { border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #FBFDFD; }
.chat-side-head { padding: 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-sound { border: 1px solid var(--line); background: #fff; border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 17px; }
.chat-sound.off { opacity: .55; }
.chat-scroll { overflow-y: auto; flex: 1; min-height: 0; }
.chat-scroll .chat-rooms { overflow: visible; flex: none; }
.chat-people { padding: 8px 0 12px; border-top: 6px solid #EEF3F4; }
.chat-people h3 { font-size: 14px; margin: 6px 14px 8px; display: grid; }
.chat-people h3 small { font-weight: 600; color: var(--muted); font-size: 12px; }
.chat-people input { width: calc(100% - 28px); margin: 0 14px 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.chat-person { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; border: 0; background: none; cursor: pointer; text-align: start; font: inherit; color: inherit; }
.chat-person:hover { background: var(--gold-soft); }
.chat-person .chat-av { width: 36px; height: 36px; font-size: 15px; background: color-mix(in srgb, var(--gold) 70%, #fff); }
.chat-person[hidden] { display: none; }
.chat-side-head h2 { margin: 0; }
.chat-side-head select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.chat-rooms { overflow-y: auto; flex: 1; }
.chat-room { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid #EEF3F4; background: none; cursor: pointer; text-align: start; font: inherit; color: inherit; }
.chat-room:hover { background: var(--gold-soft); }
.chat-room.on { background: var(--gold-soft); box-shadow: inset -3px 0 0 var(--gold); }
[dir="ltr"] .chat-room.on { box-shadow: inset 3px 0 0 var(--gold); }
.chat-av { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 17px; background: var(--gold); color: #fff; }
.chat-av.all, .chat-av.branch { background: var(--ink); font-size: 19px; }
.chat-rinfo { flex: 1; min-width: 0; display: grid; }
.chat-rinfo b, .chat-rinfo small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-rinfo small { color: var(--muted); }
.chat-rmeta { display: grid; justify-items: end; gap: 3px; }
.chat-rmeta small { color: var(--muted); font-size: 11.5px; }
.chat-rmeta i { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-head div { display: grid; }
.chat-back { display: none; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--text); }
[dir="ltr"] .chat-back { transform: scaleX(-1); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px;
    background: #F4F8F8 radial-gradient(circle at 1px 1px, rgba(14, 42, 51, .05) 1px, transparent 0) 0 0 / 18px 18px; }
.chat-empty { margin: auto; color: var(--muted); text-align: center; padding: 20px; }
.chat-day { text-align: center; margin: 8px 0; }
.chat-day span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: 12px; color: var(--muted); }
.chat-older { align-self: center; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 14px; cursor: pointer; font: inherit; font-size: 13px; color: var(--gold-deep); }
.chat-msg { max-width: min(78%, 560px); align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; }
.chat-who { font-size: 12.5px; font-weight: 700; color: var(--gold-deep); margin: 0 6px 2px; }
.chat-who small { color: var(--muted); font-weight: 600; }
.chat-bubble { background: #fff; border: 1px solid var(--line); border-radius: 14px; border-start-start-radius: 4px; padding: 8px 12px 6px; box-shadow: 0 1px 1px rgba(14, 42, 51, .05); overflow-wrap: anywhere; }
.chat-msg.mine .chat-bubble { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 25%, #fff); border-start-start-radius: 14px; border-start-end-radius: 4px; }
.chat-text { line-height: 1.6; }
.chat-bubble img { display: block; max-width: 100%; max-height: 300px; border-radius: 10px; margin-bottom: 4px; }
.chat-bubble audio { display: block; width: 260px; max-width: 100%; height: 40px; }
.chat-filecard { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(14, 42, 51, .04); color: inherit; font-size: 20px; }
.chat-filecard span { display: grid; font-size: 14px; }
.chat-filecard small { color: var(--muted); }
.chat-time { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.chat-del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; opacity: 0; }
.chat-msg:hover .chat-del { opacity: 1; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-input { flex: 1; min-width: 0; display: grid; gap: 4px; }
.chat-input textarea { width: 100%; resize: none; border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px; font: inherit; max-height: 140px; background: #F7FAFA; }
.chat-input textarea:focus { outline: 2px solid var(--gold-light); background: #fff; }
.chat-icon { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: #EEF4F5; color: var(--text); }
.chat-icon:hover { background: var(--gold-soft); color: var(--gold-deep); }
.chat-mic.on { background: var(--bad); color: #fff; animation: chat-pulse 1.2s infinite; }
@keyframes chat-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, .45); } 50% { box-shadow: 0 0 0 8px rgba(198, 40, 40, 0); } }
.chat-send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--gold); color: #fff; }
[dir="rtl"] .chat-send svg { transform: scaleX(-1); }
.chat-send:disabled { opacity: .6; }
.chat-attach, .chat-rec { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 12px; border-radius: 12px; background: var(--gold-soft); }
.chat-attach[hidden], .chat-rec[hidden] { display: none; }
.chat-attach span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-attach button, .chat-rec button { border: 0; background: none; cursor: pointer; font: inherit; color: var(--bad); font-weight: 700; margin-inline-start: auto; }
.chat-rec { background: #FDECEA; padding: 10px 14px; }
.chat-rec i { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: chat-pulse 1.2s infinite; }
.chat-rec span { font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 860px) {
    .chat { grid-template-columns: 1fr; height: calc(100vh - 190px); }
    .chat-main { display: none; }
    .chat.in-room .chat-side { display: none; }
    .chat.in-room .chat-main { display: flex; }
    .chat-back { display: block; }
    .chat-msg { max-width: 88%; }
}

/* ===== لوحة المهام (كانبان) والمشروعات ===== */
.pill.info { background: #E3F0FD; color: var(--info); }
.board-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.board-tools select, .board-tools input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.board-tools input { flex: 1; min-width: 160px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.b-col { background: #EEF4F5; border-radius: 14px; padding: 10px; min-height: 200px; display: flex; flex-direction: column; }
.b-col[data-status="doing"] { background: #E8F1FB; }
.b-col[data-status="review"] { background: #FBF4E6; }
.b-col[data-status="done"] { background: #EAF6EC; }
.b-col header { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.b-col header b { font-size: 15px; }
.b-count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: rgba(14, 42, 51, .08); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.b-plus { margin-inline-start: auto; width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .7); cursor: pointer; font-size: 18px; font-weight: 700; color: var(--gold-deep); }
.b-plus:hover { background: #fff; }
.b-list { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 60px; border-radius: 10px; transition: background .15s; }
.b-list.over { background: rgba(20, 161, 147, .1); outline: 2px dashed var(--gold-light); }
.b-empty { color: var(--muted); text-align: center; font-size: 13px; margin: 14px 0; }
.b-card { background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(14, 42, 51, .08); border-inline-start: 4px solid #B7C6CA; cursor: pointer; user-select: none; }
.b-card[draggable="true"] { cursor: grab; }
.b-card:hover { box-shadow: var(--shadow); }
.b-card.dragging { opacity: .45; }
.b-card.p-high { border-inline-start-color: #F0A020; }
.b-card.p-urgent { border-inline-start-color: var(--bad); }
.b-card.p-low { border-inline-start-color: #CFDADD; }
.b-card.done h4 { text-decoration: line-through; color: var(--muted); }
.b-card h4 { margin: 0 0 6px; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.b-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); }
.b-due.soon { color: #9a6400; font-weight: 700; }
.b-due.late { color: var(--bad); font-weight: 700; }
.b-pri { color: var(--bad); font-weight: 700; }
.b-who { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; font-weight: 600; }
.b-who i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font-size: 11px; }
.b-dialog { border: 0; border-radius: 18px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
.b-dialog::backdrop { background: rgba(8, 27, 33, .45); }
.b-form { padding: 18px 20px; display: grid; gap: 10px; }
.b-form header { display: flex; align-items: center; justify-content: space-between; }
.b-form h3 { margin: 0; }
.b-x { border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--muted); }
.b-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.b-form input, .b-form select, .b-form textarea { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--text); background: #fff; }
.b-form input:disabled, .b-form select:disabled, .b-form textarea:disabled { background: #F4F7F8; }
.b-actions { display: flex; gap: 8px; justify-content: space-between; }
.b-comments { border-top: 1px solid var(--line); padding-top: 10px; }
.b-comments h4 { margin: 0 0 8px; }
.b-clist { display: grid; gap: 8px; max-height: 220px; overflow-y: auto; margin-bottom: 8px; }
.b-c { background: #F4F8F8; border-radius: 10px; padding: 8px 10px; }
.b-c.mine { background: var(--gold-soft); }
.b-c small { color: var(--muted); }
.b-c p { margin: 4px 0 0; white-space: pre-line; }
.b-cadd { display: flex; gap: 6px; }
.b-cadd input { flex: 1; }
.proj-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-inline-end: 8px; vertical-align: middle; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.proj-card { display: grid; gap: 8px; color: inherit; border-top: 4px solid var(--pc, var(--gold)); }
.proj-card:hover { box-shadow: 0 12px 30px -16px rgba(14, 42, 51, .35); }
.proj-bar { height: 8px; border-radius: 6px; background: #E4EEEF; overflow: hidden; }
.proj-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-light), var(--gold)); border-radius: 6px; }
@media (max-width: 860px) { .board { grid-template-columns: repeat(4, minmax(250px, 82vw)); scroll-snap-type: x mandatory; } .b-col { scroll-snap-align: start; } }

/* إشعار طلب المتجر الجديد */
.order-toast { position: fixed; z-index: 9999; inset-inline-end: 16px; bottom: 16px; max-width: min(440px, calc(100vw - 32px)); display: flex; align-items: center; gap: 10px;
    background: var(--card); color: inherit; border: 2px solid var(--gold, #12a37f); border-radius: 14px; padding: 12px 14px; box-shadow: 0 12px 34px rgba(0,0,0,.22); animation: order-pop .35s ease-out; }
.order-toast b { flex: 1; line-height: 1.5; }
@keyframes order-pop { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 1000px) { .order-toast { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); inset-inline: 12px; max-width: none; } }

/* الصيانة */
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .row3 { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip-link { display: inline-flex; gap: 6px; align-items: center; background: var(--card); }
.chips .chip-link.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.rep-steps { list-style: none; display: flex; gap: 4px; padding: 0; margin: 10px 0 16px; }
.rep-steps li { flex: 1; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 10px; border-top: 4px solid var(--line); }
.rep-steps li.done { color: var(--gold-deep); border-top-color: var(--gold); }

/* معرض صور الصنف */
.gal-field { display: grid; gap: 8px; margin: 6px 0 12px; }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.gal.busy { opacity: .6; pointer-events: none; }
.gal-item { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; cursor: grab; user-select: none; }
.gal-item.dragging { opacity: .4; }
.gal-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; pointer-events: none; }
.gal-item.is-main { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.gal-main { display: none; position: absolute; top: 6px; inset-inline-start: 6px; background: var(--gold); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.gal-item.is-main .gal-main { display: block; }
.gal-tools { display: flex; justify-content: space-between; gap: 2px; padding: 4px; }
.gal-tools .icon-btn { min-width: 0; padding: 2px 8px; }

/* الاستيراد من ووكومرس */
.woo-bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.woo-bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .4s; }

/* ===== الحجوزات والعيادة ===== */
.check-grid { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 10px; }
.vitals { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.rx-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.rx-row { display: grid; grid-template-columns: 2.2fr 1fr 1.3fr 1fr 1fr auto; gap: 6px; align-items: center; }
.rx-row input { margin: 0 !important; }
@media (max-width: 760px) { .rx-row { grid-template-columns: 1fr 1fr; } .rx-row input:first-child { grid-column: 1 / -1; } }
.visit-row { border-bottom: 1px solid #F1ECE1; padding: 10px 0; display: grid; gap: 3px; }
.visit-row:last-child { border-bottom: 0; }
.rx { width: 148mm; min-height: 200mm; padding: 10mm 11mm; font-size: 13px; line-height: 1.6; display: flex; flex-direction: column; }
.rx-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #0B6B62; padding-bottom: 8px; }
.rx-doc { font-size: 20px; font-weight: 800; color: #0B6B62; }
.rx-title { color: #444; font-size: 12.5px; }
.rx-clinic { font-weight: 800; }
.rx-patient { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 8px 0; border-bottom: 1px dashed #bbb; }
.rx-dx { padding-top: 6px; color: #333; }
.rx-symbol { font-size: 34px; font-weight: 800; color: #0B6B62; line-height: 1; margin: 10px 0 4px; direction: ltr; text-align: left; }
.rx-list { margin: 0; padding-inline-start: 22px; flex: 1; }
.rx-list li { margin-bottom: 9px; }
.rx-list b { font-size: 14.5px; }
.rx-sig { color: #333; }
.rx-block { margin-top: 8px; }
.rx-foot { border-top: 1px solid #0B6B62; margin-top: 14px; padding-top: 6px; font-size: 11.5px; color: #444; text-align: center; }
.rx { page: rx; }
@page rx { size: A5; margin: 9mm; }
@media print { .rx { width: auto; min-height: 0; padding: 0; } }

/* ===== الإيجارات ===== */
.inline-pay { display: inline-block; }
.inline-pay[open] { display: block; min-width: 280px; }
.inline-pay summary { list-style: none; cursor: pointer; }
.inline-pay summary::-webkit-details-marker { display: none; }
.inline-pay form { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #FCFAF4; }
fieldset.box { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 12px; margin: 4px 0 12px; }
fieldset.box legend { padding: 0 6px; color: var(--muted); font-weight: 700; }
.rent-doc h3 { margin: 16px 0 6px; font-size: 14.5px; color: #0B6B62; border-bottom: 1px solid #ddd; padding-bottom: 3px; }
.rent-doc p { margin: 4px 0; }
.rent-doc .table td { padding: 5px 8px; }
.rent-terms { line-height: 1.9; }
.rent-sign { display: flex; justify-content: space-between; gap: 40px; margin-top: 50px; }
.rent-sign div { flex: 1; text-align: center; border-top: 1px solid #000; padding-top: 6px; }

/* ===== السندات ===== */
.voucher .v-amount { display: flex; justify-content: space-between; align-items: center; margin: 18px 0; padding: 12px 16px; border: 2px solid #0B6B62; border-radius: 10px; font-size: 18px; }
.voucher .v-amount b { font-size: 22px; }
.voucher .v-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.voucher .v-table td { padding: 10px 8px; border-bottom: 1px dotted #999; vertical-align: top; }
.voucher .v-table td:first-child { width: 150px; color: #555; }

/* الهيكل التنظيمي */
.org-tree ul { list-style: none; margin: 0; padding-inline-start: 22px; border-inline-start: 2px solid var(--line); }
.org-tree > ul { border: 0; padding: 0; }
.org-tree li { position: relative; padding: 6px 0; }
.org-tree ul ul li::before { content: ""; position: absolute; inset-inline-start: -22px; top: 26px; width: 18px; border-top: 2px solid var(--line); }
.org-card { display: inline-flex; flex-direction: column; gap: 2px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); min-width: 170px; color: inherit; text-decoration: none; }
.org-card:hover { border-color: var(--gold); }
.org-card span { font-size: 12.5px; color: var(--muted); }
.org-card small { font-size: 11.5px; color: var(--muted); }

/* تأجيل الزيارة: قايمة صغيرة تحت الزرار */
details.inline { display: inline-block; position: relative; }
details.inline > summary { list-style: none; cursor: pointer; }
details.inline > summary::-webkit-details-marker { display: none; }
details.inline[open] > form { margin-top: 6px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }

/* المناديب: كروت خط السير */
.rep-list { display: grid; gap: 10px; margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.rep-card.done { opacity: .72; border-inline-start: 4px solid var(--good); }
.rep-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }

/* النظارات: جدول المقاس */
.rx-table { direction: ltr; }
.rx-table th, .rx-table td { text-align: center; padding: 6px; }
.rx-table input { width: 100%; text-align: center; }

/* الحجز أونلاين وبوابة العميل (صفحات عامة) */
.book-pub { width: 100%; max-width: 720px; margin: 0 auto; display: grid; gap: 12px; }
.book-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.book-grid.slots { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.book-opt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: inherit; cursor: pointer; }
.book-opt span { font-size: 12.5px; color: var(--muted); }
.book-opt.on, .book-opt:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.book-opt input[type=radio] { display: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* صفحة الربط */
.copy-row { display: flex; gap: 6px; margin: 4px 0 8px; }
.copy-row input { flex: 1; min-width: 0; font-size: 12.5px; }
.api-docs pre { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.7; margin: 0; }

/* قالب المتجر حسب المجال */
.store-prof { margin-top: 14px; }
.prof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.prof { position: relative; display: flex !important; flex-direction: column; gap: 4px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card); }
.prof input { position: absolute; opacity: 0; pointer-events: none; }
.prof.on, .prof:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.prof-ic { font-size: 26px; line-height: 1; }
.prof b { font-size: 14.5px; }
.prof small { color: var(--muted); font-size: 12.5px; line-height: 1.5; font-weight: 400; }
.prof-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.prof-tags i { font-style: normal; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }

/* ===== أقسام القايمة الجانبية ===== */
.side-find { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; padding: 0 12px; height: 38px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--ink-3); color: #8FA7AD; }
.side-find:focus-within { border-color: var(--gold); color: var(--gold-light); }
.side-find input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: #fff; font: inherit; font-size: 14px; padding: 0; }
.side-find input::placeholder { color: #7E969C; }
.side-find input::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }
.nav-grp { margin-top: 4px; }
.nav-grp > summary { display: flex; align-items: center; gap: 8px; padding: 9px 12px 7px; border-radius: 8px; cursor: pointer; list-style: none; user-select: none;
    color: #8FA7AD; font-size: 12.5px; font-weight: 700; letter-spacing: .2px; }
.nav-grp > summary::-webkit-details-marker { display: none; }
.nav-grp > summary:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.nav-grp > summary span { flex: 1; }
.nav-grp > summary .ic { opacity: .8; }
.grp-caret { transition: transform .2s; opacity: .7; }
.nav-grp[open] > summary .grp-caret { transform: rotate(180deg); }
.nav-grp[open] > summary { color: var(--gold-light); }
.grp-items { display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; }
.grp-dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: #E5484D; }
.nav-grp:not([open]):has(.nav-badge:not([hidden])) .grp-dot { display: inline-block; }
.side-nav a[hidden], .nav-grp[hidden] { display: none !important; }
.side-none { color: #8FA7AD; font-size: 13.5px; padding: 8px 12px; margin: 0; }
.side-nav { gap: 2px; }
.side-nav a { padding: 9px 12px; }

/* ===== علاقات العملاء (CRM) ===== */
.pill.crm-st-new { background: #EEF2F3; color: #4D666D; }
.pill.crm-st-contacted { background: #E3F0FD; color: #1E63D6; }
.pill.crm-st-qualified { background: #E6F6F4; color: #0F8A7E; }
.pill.crm-st-proposal { background: #FBF4E6; color: #9A6400; }
.pill.crm-st-negotiation { background: #F3E9FB; color: #7B3FC4; }
.pill.crm-st-won { background: #EAF6EC; color: #1F7A35; }
.pill.crm-st-lost { background: #FDECEC; color: #C0392B; }
.crm-due { font-weight: 700; font-size: 13px; white-space: nowrap; }
.crm-due.late { color: var(--bad); }
.crm-due.today { color: #9A6400; }
.crm-due.none { color: var(--muted); font-weight: 600; }
.crm-group h2 { display: flex; align-items: center; gap: 8px; }
.crm-group.late { border-inline-start: 4px solid var(--bad); }
.crm-group.today { border-inline-start: 4px solid #F0A020; }
.crm-group.none { border-inline-start: 4px solid #CFDADD; }
.crm-board { grid-template-columns: repeat(7, minmax(230px, 1fr)); }
@media (max-width: 860px) { .crm-board { grid-template-columns: repeat(7, minmax(240px, 82vw)); } }
.crm-col.crm-st-contacted { background: #E8F1FB; }
.crm-col.crm-st-qualified { background: #E6F4F2; }
.crm-col.crm-st-proposal { background: #FBF4E6; }
.crm-col.crm-st-negotiation { background: #F3ECFA; }
.crm-col.crm-st-won { background: #EAF6EC; }
.crm-col.crm-st-lost { background: #F8EEEE; }
.crm-col-sum { margin-inline-start: auto; font-weight: 700; }
.crm-card .b-meta { justify-content: space-between; margin-top: 4px; }
.crm-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.crm-steps form { margin: 0; }
.crm-step { border: 1px solid var(--line); background: #fff; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 700; padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.crm-step:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-deep); }
.crm-step.done { background: var(--gold-soft); color: var(--gold-deep); border-color: transparent; }
.crm-step.on { background: var(--gold); color: #fff; border-color: var(--gold); cursor: default; }
.crm-step.on.crm-st-won { background: #1F7A35; border-color: #1F7A35; }
.crm-step.on.crm-st-lost { background: var(--bad); border-color: var(--bad); }
.crm-step.lose { color: var(--bad); }
.crm-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.crm-timeline li { position: relative; padding: 10px 12px; border-radius: 10px; background: #F4F8F8; border-inline-start: 3px solid #B7C6CA; }
.crm-timeline li.k-stage { background: #FBFAF4; border-inline-start-color: #F0A020; }
.crm-timeline li.k-created { border-inline-start-color: var(--gold); }
.crm-timeline li.k-note { background: #fff; border: 1px dashed var(--line); }
.crm-timeline li p { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.crm-timeline .spread { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: inherit; }
.crm-next-card.late { border: 2px solid var(--bad); }
.crm-next { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 10px; }
.crm-next legend { font-weight: 700; padding: 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text); }
.chip:hover { border-color: var(--gold); color: var(--gold-deep); }

/* ===== تقويم الحجوزات ===== */
.cal-title { font-size: 16px; min-width: 150px; text-align: center; align-self: center; }
.seg-btns { display: inline-flex; gap: 4px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.cal-legend .cal-ev { display: inline-block; }
.cal { padding: 0; overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { padding: 10px 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; background: #F4F8F8; border-bottom: 1px solid var(--line); }
.cal-day { min-height: 118px; padding: 6px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:nth-child(7n) { border-inline-end: 0; }
.cal-week .cal-day { min-height: 340px; }
.cal-day.out { background: #FAFCFC; }
.cal-day.out .cal-dn b { color: #B7C6CA; }
.cal-day.off { background: repeating-linear-gradient(135deg, #FAFCFC 0 8px, #F3F7F7 8px 16px); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal-dn { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.cal-dn > a:first-child { color: inherit; text-decoration: none; display: flex; align-items: baseline; gap: 6px; }
.cal-dn b { font-size: 15px; }
.cal-day.today .cal-dn b { background: var(--gold); color: #fff; border-radius: 999px; min-width: 26px; height: 26px; display: inline-grid; place-items: center; padding: 0 6px; }
.cal-wd { display: none; font-size: 12.5px; color: var(--muted); }
.cal-week .cal-wd { display: inline; }
.cal-n { font-size: 11.5px; font-weight: 800; background: rgba(14, 42, 51, .08); border-radius: 999px; padding: 1px 7px; }
.cal-add { margin-inline-start: auto; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--gold-deep); font-weight: 800; text-decoration: none; opacity: 0; transition: opacity .15s; }
.cal-day:hover .cal-add, .cal-add:focus { opacity: 1; background: var(--gold-soft); }
.cal-ev { display: block; font-size: 12px; line-height: 1.5; padding: 2px 6px; border-radius: 6px; background: #EEF2F3; color: #17323A; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-inline-start: 3px solid #9FB3B8; }
.cal-ev small { color: var(--muted); }
.cal-ev:hover { filter: brightness(.96); }
.cal-ev.info { background: #E3F0FD; border-color: #1E63D6; }
.cal-ev.warn { background: #FBF4E6; border-color: #F0A020; }
.cal-ev.good { background: #EAF6EC; border-color: #2E9D4A; }
.cal-ev.bad { background: #FDECEC; border-color: var(--bad); text-decoration: line-through; }
.cal-more { font-size: 12px; font-weight: 700; color: var(--gold-deep); }
.cal-offl { color: #9FB3B8; font-size: 12px; margin-top: auto; }
.cal-none { padding: 12px; margin: 0; }
@media (max-width: 760px) {
    /* على الموبايل التقويم بيبقى قايمة أيام */
    .cal-head { display: none; }
    .cal-grid { grid-template-columns: 1fr; }
    .cal-day, .cal-week .cal-day { min-height: 0; border-inline-end: 0; padding: 10px 12px; }
    .cal-day.empty:not(.today), .cal-day.out { display: none; }
    .cal-wd { display: inline; }
    .cal-add { opacity: 1; }
    .cal-ev { font-size: 13.5px; padding: 6px 8px; white-space: normal; }
}
.kpis .kpi-sub { display: block; margin-top: 4px; font-size: 12px; }
.cal-week .cal-head { display: none; }
.cal-week .cal-dn { flex-wrap: wrap; }
.cal-legend .cal-ev { text-decoration: none; }

/* ===== لوحة التحكم (تصميم جديد + حركة) ===== */
@property --dx-sweep { syntax: '<percentage>'; inherits: false; initial-value: 100%; }
@keyframes dx-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dx-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dx-fill { from { width: 0; } }
@keyframes dx-sweep { from { --dx-sweep: 0%; } to { --dx-sweep: 100%; } }
@keyframes dx-pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 157, 74, .55); } 70% { box-shadow: 0 0 0 9px rgba(46, 157, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 157, 74, 0); } }
@keyframes dx-glow { 0%, 100% { transform: translate(0, 0) scale(1); opacity: .55; } 50% { transform: translate(-30px, 18px) scale(1.15); opacity: .8; } }
@keyframes dx-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(0); } }
.dx-in { animation: dx-up .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.dx-head h1 { font-size: 26px; }

/* التنبيهات: ملمومة في كارت واحد */
.dx-alerts { background: #FFF8E6; border: 1px solid #F3DFA8; border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.dx-alerts > summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.dx-alerts > summary::-webkit-details-marker { display: none; }
.dx-alerts > summary .muted { margin-inline-start: auto; }
.dx-alerts[open] > summary .muted { display: none; }
.dx-bell { display: inline-block; animation: dx-ring 2.4s ease-in-out 1s 2; transform-origin: 50% 10%; }
.dx-alert-list { display: grid; gap: 1px; background: #F3DFA8; border-top: 1px solid #F3DFA8; }
.dx-alert { display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: #FFFBF0; color: #6B4E00; font-weight: 600; text-decoration: none; transition: background .15s, padding .15s; }
.dx-alert:hover { background: #FFF3D1; padding-inline-start: 20px; }
.dx-alert span { flex: 1; }
.dx-alert i { font-style: normal; opacity: .6; }

/* الهيرو */
.dx-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr); gap: 22px; padding: 24px 26px; border-radius: 20px; color: #CFE0E3;
    background: radial-gradient(120% 140% at 100% 0%, #13424C 0%, var(--ink) 55%), var(--ink); box-shadow: 0 24px 50px -28px rgba(8, 27, 33, .8); margin-bottom: 16px; }
.dx-hero::before { content: ''; position: absolute; width: 360px; height: 360px; inset-inline-start: -80px; top: -140px; border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 161, 147, .45), transparent 65%); animation: dx-glow 9s ease-in-out infinite; pointer-events: none; }
.dx-hero > * { position: relative; }
.dx-hero span { display: block; font-size: 14px; color: #9FBFC4; }
.dx-big { display: block; font-size: 44px; line-height: 1.15; font-weight: 800; color: var(--gold-light); margin: 4px 0 8px; letter-spacing: .3px; }
.dx-big small { font-size: 17px; color: #CFE0E3; font-weight: 600; }
.dx-hero-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.dx-hero-side > div { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; padding: 14px 16px; transition: background .2s, transform .2s; }
.dx-hero-side > div:hover { background: rgba(255, 255, 255, .09); transform: translateY(-2px); }
.dx-hero-side b { display: block; font-size: 25px; font-weight: 800; color: #fff; margin: 2px 0 6px; }
.dx-hero-side b.gold { color: var(--gold-light); }
.dx-sub { display: block; font-size: 12.5px; color: #8FAFB4; }
.dx-month { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.dx-month-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dx-month-top b { color: #fff; font-size: 17px; }
.dx-month-foot { margin-top: 8px; }
.dx-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #CFE0E3; white-space: nowrap; }
.dx-delta.up { background: rgba(46, 157, 74, .18); color: #6EE39A; }
.dx-delta.down { background: rgba(229, 72, 77, .18); color: #FF9A9D; }
.dx-delta.new { color: var(--gold-light); }

/* شريط التقدم */
.dx-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: 8px; }
.dx-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--gold-light)); animation: dx-fill 1.1s cubic-bezier(.2, .7, .2, 1) .3s both; }
.dx-bar.thin { height: 6px; background: #E8F0F1; margin-top: 6px; }

/* كروت الأرقام */
.dx-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.dx-stat { position: relative; margin: 0; padding: 16px 18px; color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; overflow: hidden; }
a.dx-stat:hover, .dx-stat:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -20px rgba(14, 42, 51, .45); }
.dx-stat span { display: block; color: var(--muted); font-size: 13.5px; }
.dx-stat b { display: block; font-size: 25px; font-weight: 800; margin: 2px 0; }
.dx-stat small { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.dx-stat.bad b { color: var(--bad); }
.dx-stat.info b { color: var(--info, #1E63D6); }
.dx-ic { position: absolute; inset-inline-end: 14px; top: 14px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-deep); font-style: normal; transition: transform .25s; }
.dx-stat:hover .dx-ic { transform: rotate(-8deg) scale(1.08); }
.dx-stat.bad .dx-ic { background: #FDECEC; color: var(--bad); }
.dx-stat.info .dx-ic { background: #E3F0FD; color: #1E63D6; }
.dx-stat.hot { border: 2px solid #F0A020; }
.dx-stat.hot .dx-ic { background: #FBF4E6; color: #9A6400; }
.dx-stat.hot b { color: #9A6400; }

/* الصفوف والكروت */
.dx-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.dx-row > .card { margin: 0; }
.dx-row > .card:only-child { grid-column: 1 / -1; }
.dx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dx-card-head h2 { margin: 0; }
.dx-minis { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.dx-minis b { color: var(--text); }
.dx-empty { padding: 30px 0; text-align: center; }

/* الرسم البياني: الأعمدة بتطلع من تحت */
.dx-vchart .vbar, .dx-hours .vbar { transform-origin: bottom; animation: dx-grow .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d, 0ms) + 250ms); transition: filter .15s; }
.dx-vchart .vcol:hover .vbar, .dx-hours .vcol:hover .vbar { filter: brightness(1.12) saturate(1.2); }
.dx-vchart .vcol.today .vbar, .dx-hours .vcol.today .vbar { background: linear-gradient(180deg, #F0A020, #F7C766); }
.dx-vchart .vcol.today .vlbl, .dx-hours .vcol.today .vlbl { color: #9A6400; font-weight: 800; }
.dx-peak { margin: 0 0 10px; font-weight: 700; color: #9A6400; }

/* الدونات (طرق الدفع) */
.dx-donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; padding: 6px 0; }
.dx-donut { --dx-sweep: 100%; width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: conic-gradient(transparent var(--dx-sweep), #EEF3F4 0), var(--g); animation: dx-sweep 1.2s cubic-bezier(.2, .7, .2, 1) .3s both; }
.dx-donut > div { width: 112px; height: 112px; border-radius: 50%; background: var(--card, #fff); display: grid; place-content: center; text-align: center; box-shadow: inset 0 2px 8px rgba(14, 42, 51, .08); }
.dx-donut b { font-size: 20px; font-weight: 800; }
.dx-donut small { color: var(--muted); }
.dx-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 180px; flex: 1; }
.dx-legend li { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 8px; font-size: 13.5px; }
.dx-legend i { width: 12px; height: 12px; border-radius: 4px; }
.dx-legend small { color: var(--muted); min-width: 34px; text-align: end; }

/* أكثر الأصناف */
.dx-top { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.dx-top li { display: flex; gap: 12px; align-items: center; min-width: 0; }
.dx-rank { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #EEF3F4; color: var(--muted); flex: none; }
.dx-top li:nth-child(1) .dx-rank { background: linear-gradient(135deg, #F7C766, #F0A020); color: #fff; }
.dx-top li:nth-child(2) .dx-rank { background: linear-gradient(135deg, #D5DEE0, #A9B7BB); color: #fff; }
.dx-top li:nth-child(3) .dx-rank { background: linear-gradient(135deg, #E8B58A, #C27C45); color: #fff; }
.dx-top-body { flex: 1; min-width: 0; }
.dx-top-line { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.dx-top-line > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dx-top-line span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.dx-top-line span b { color: var(--text); }
.dx-branch + .dx-branch { margin-top: 12px; }

/* المتجر */
.dx-store { margin-bottom: 16px; padding: 18px; border-radius: 20px; background: linear-gradient(180deg, #EAF6F4, rgba(234, 246, 244, 0)); border: 1px solid #D3ECE8; }
.dx-store-head h2 { display: flex; align-items: center; gap: 8px; color: var(--gold-deep); }
.dx-store .dx-row { margin-bottom: 0; }
.dx-store-stats { margin-bottom: 16px; }
.dx-live { width: 9px; height: 9px; border-radius: 50%; background: #B7C6CA; display: inline-block; }
.dx-live.on { background: #2E9D4A; animation: dx-pulse 1.8s infinite; }
.dx-spark { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: 6px; }
.dx-spark i { flex: 1; height: var(--h); min-height: 2px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--gold), var(--gold-light)); transform-origin: bottom; animation: dx-grow .6s ease both .5s; }
.dx-duo { display: flex; align-items: flex-end; gap: 10px; height: 160px; direction: ltr; }
.dx-duo-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.dx-duo-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.dx-duo-bars span { width: 40%; max-width: 18px; height: var(--h); min-height: 2px; border-radius: 5px 5px 0 0; transform-origin: bottom; animation: dx-grow .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d) + 300ms); }
.dx-duo-bars .v, .dx-duo-key .v { background: linear-gradient(180deg, var(--gold), var(--gold-light)); }
.dx-duo-bars .o, .dx-duo-key .o { background: linear-gradient(180deg, #F0A020, #F7C766); }
.dx-duo-col small { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.dx-duo-key { display: flex; gap: 16px; justify-content: center; font-size: 12.5px; color: var(--muted); margin: 8px 0 4px; }
.dx-duo-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: middle; }
.dx-sub-h { font-size: 14px; margin: 14px 0 8px; }
.dx-src { display: grid; grid-template-columns: minmax(90px, 140px) 1fr 40px; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.dx-src .dx-bar { margin: 0; }
.dx-src b { text-align: end; }
.dx-orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dx-orders a { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; color: inherit; text-decoration: none; transition: background .15s, transform .15s; }
.dx-orders a:hover { background: #F2F8F8; transform: translateX(-2px); }
.dx-orders a > div:nth-child(2) { flex: 1; min-width: 0; }
.dx-orders b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-orders small { color: var(--muted); font-size: 12px; }
.dx-av { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #fff; flex: none; }
.dx-o-end { text-align: end; display: grid; gap: 4px; justify-items: end; }

@media (max-width: 980px) {
    .dx-hero, .dx-row { grid-template-columns: minmax(0, 1fr); }
    .dx-big { font-size: 36px; }
}
@media (max-width: 560px) {
    .dx-hero { padding: 18px; }
    .dx-hero-side { grid-template-columns: 1fr 1fr; }
    .dx-hero-side b { font-size: 20px; }
    .dx-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .dx-stat { padding: 12px 14px; }
    .dx-stat b { font-size: 20px; }
    .dx-ic { width: 30px; height: 30px; border-radius: 10px; top: 10px; inset-inline-end: 10px; }
    .dx-ic svg { width: 16px; height: 16px; }
    .dx-donut { width: 140px; height: 140px; }
    .dx-donut > div { width: 92px; height: 92px; }
}
@media (prefers-reduced-motion: reduce) {
    .dx-in, .dx-bar i, .dx-vchart .vbar, .dx-hours .vbar, .dx-donut, .dx-spark i, .dx-duo-bars span, .dx-hero::before, .dx-bell, .dx-live.on { animation: none !important; }
}

/* اسم ووصف الصنف باللغتين */
.product-form .name-hint { grid-column: 1 / -1; margin: -4px 0 0; }
.desc-field { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 4px 0 12px; }
.desc-field > summary { cursor: pointer; }
.desc-field[open] > summary { margin-bottom: 10px; }
.desc-field .grid2 { gap: 12px; }
.desc-field textarea { width: 100%; }

/* أدوات المتجر في لوحة التاجر */
.variants-card > summary { cursor: pointer; list-style: none; }
.variants-card > summary::-webkit-details-marker { display: none; }
.variants-card[open] > summary { margin-bottom: 8px; }
.variants-gen { margin-bottom: 14px; }
.sale-field { border: 1px dashed #F0A020; border-radius: 12px; padding: 8px 14px 4px; margin: 6px 0 10px; }
.sale-field legend { font-weight: 700; padding: 0 6px; }
.alert-prod { border-top: 1px solid var(--line); padding: 10px 0; }
.alert-prod > summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.review-row { border-top: 1px solid var(--line); padding: 12px 0; }
.review-row.pending { background: #FFFBF0; margin: 0 -12px; padding: 12px; }
.review-row.hidden { opacity: .6; }
.review-row p { margin: 6px 0; white-space: pre-line; }
.stars-a { color: #F5A623; letter-spacing: 1px; }
.review-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.review-acts input { flex: 1; min-width: 180px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }
.feed-urls { display: grid; gap: 10px; max-width: 760px; }
.feed-urls input { width: 100%; }
.steps-list { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; line-height: 1.7; }

/* مركز الإشعارات */
.bell-wrap { position: relative; }
.bell-btn { position: relative; }
.bell-n { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #E5484D; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; animation: bell-pop .4s ease; }
.bell-n[hidden] { display: none; }
@keyframes bell-pop { from { transform: scale(0); } to { transform: scale(1); } }
.bell-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: min(380px, 92vw); max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(8, 27, 33, .45); z-index: 60; }
.bell-panel[hidden] { display: none; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.bell-item { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; color: inherit; text-decoration: none; border-bottom: 1px solid #F0F4F5; font-size: 14px; line-height: 1.6; }
.bell-item:hover { background: #F4F9F9; }
.bell-ic { flex: none; width: 22px; text-align: center; }
.bell-empty { padding: 20px 14px; margin: 0; }
/* أقسام القايمة الجانبية: عناوين أكبر وأوضح */
.nav-grp > summary { font-size: 15px; font-weight: 800; padding: 12px 8px 10px; gap: 6px; color: #C9DCE0; letter-spacing: 0; }
.nav-grp > summary span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nav-grp > summary .ic { width: 20px; height: 20px; opacity: .95; }
.nav-grp > summary .grp-caret { width: 16px; height: 16px; }

/* التبويبات الكتير: على الكمبيوتر بتنزل سطر تاني بدل ما تستخبى، وعلى الموبايل سكرول بشريط باين */
@media (min-width: 900px) {
    .tabs.scroll { flex-wrap: wrap; overflow: visible; row-gap: 2px; }
}
@media (max-width: 899px) {
    .tabs.scroll { scrollbar-width: thin; padding-bottom: 2px; }
    .tabs.scroll::-webkit-scrollbar { height: 4px; }
    .tabs.scroll::-webkit-scrollbar-thumb { background: #C9D6D9; border-radius: 4px; }
}

/* ===== تصميم المتجر (اختيار الهيدر والكروت والسلايدر) ===== */
.dz .card + .card { margin-top: 16px; }
.dz-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dz-head h2 { margin: 0; }
.dz-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.dz-grid.cards { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.dz-opt { align-items: stretch; }
.dz-svg { width: 100%; height: auto; display: block; border-radius: 8px; margin-bottom: 4px; }
.dz-svg.card { width: 70px; margin: 0 auto 6px; background: #EEF3F4; border-radius: 10px; padding: 4px; }
.dz-layouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 12px; }
.dz-lay { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--card); }
.dz-lay b { font-size: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--bg); }
.seg label { position: relative; margin: 0 !important; cursor: pointer; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.seg input:checked + span { background: var(--gold); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--gold-light); }
.dz-slide { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; }
.dz-slide legend { font-weight: 800; padding: 0 6px; }
.dz-slide.new { border-style: dashed; background: var(--bg); }
.dz-slide-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; }
.dz-slide-img img { width: 100%; aspect-ratio: 12 / 5; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 6px; }
.dz-slide-img input { font-size: 12px; }
.check.bad { color: var(--bad); }
.dz-shapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dz-shapes .prof { align-items: center; text-align: center; padding: 10px 6px; }
.dz-shape { position: relative; display: block; width: 54px; height: 44px; margin: 0 auto 6px; }
.dz-shape::before { content: ""; position: absolute; inset: 8px -4px -4px 8px; background: var(--a); border-radius: 8px; }
.dz-shape i { position: absolute; inset: 0; background: linear-gradient(135deg, #C9D9DC, #9DB5BB); border-radius: 8px; }
.dz-shape.s-blob::before { border-radius: 44% 56% 62% 38% / 52% 40% 60% 48%; inset: 4px -4px -4px 4px; }
.dz-shape.s-blob i { border-radius: 58% 42% 46% 54% / 46% 52% 48% 54%; }
.dz-shape.s-tilt::before { inset: 0; transform: rotate(-7deg); }
.dz-shape.s-tilt i { transform: rotate(5deg); }
.dz-shape.s-circle { width: 44px; }
.dz-shape.s-circle::before { inset: -4px; border-radius: 50%; background: none; border: 2px dashed var(--a); }
.dz-shape.s-circle i { border-radius: 50%; }
@media (max-width: 760px) {
    .dz-slide-row { grid-template-columns: 1fr; }
    .dz-shapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* المسوقين بالعمولة */
.aff-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.aff-head h2 { margin: 0; }
.aff-head .input-with-btn { flex: 0 1 440px; min-width: 240px; }
.kpis small { display: block; margin-top: 2px; font-size: 12px; }

/* ترتيب أقسام الرئيسية والبانرات والماركات */
.dz-secs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.dz-secs li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: grab; }
.dz-secs li.dragging { opacity: .5; border-style: dashed; }
.dz-secs li .check { flex: 1; margin: 0 !important; }
.dz-grip { color: var(--muted); letter-spacing: -2px; font-weight: 800; }
.dz-mv { display: inline-flex; gap: 4px; }
.dz-mv button { width: 30px; height: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); cursor: pointer; font-size: 11px; color: var(--muted); }
.dz-mv button:hover { border-color: var(--gold); color: var(--gold-deep); }
.dz-mini { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
.dz-mini img { width: 120px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.dz-brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.dz-brand { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.dz-brand img { width: 100%; height: 60px; object-fit: contain; }
.dz-brand input { font-size: 13px; padding: 6px 8px; }
.dz-font-prev { padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; font-size: 16px; }
.dz-font-prev b { font-size: 20px; }
.cms-edit { font-family: inherit; line-height: 1.8; }
@media (max-width: 760px) { .dz-mini { grid-template-columns: 1fr; } }

/* العروض والهدايا والحملات */
.gc-new { border: 2px solid var(--gold); margin-top: 14px; }
.gc-new textarea { width: 100%; margin-top: 10px; font-size: 13px; }
.cmp-send { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; max-height: 260px; overflow-y: auto; }
.cmp-send .done { opacity: .45; }

/* رصيد الذكاء الاصطناعي وسجله */
.ai-credit { display: flex; align-items: baseline; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--gold-soft); margin-bottom: 8px; }
.ai-credit b { font-size: 30px; color: var(--gold-deep); }
.ai-credit.low { background: #FFF4E0; } .ai-credit.low b { color: #9a6400; }
.ai-credit.empty { background: #FDECEA; } .ai-credit.empty b { color: var(--bad); }
.ai-credit span { color: var(--muted); font-size: 13px; }
.ai-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.ai-pack { cursor: pointer; margin: 0 !important; }
.ai-pack input { position: absolute; opacity: 0; pointer-events: none; }
.ai-pack span { display: grid; gap: 2px; text-align: center; padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; }
.ai-pack b { font-size: 20px; color: var(--gold-deep); }
.ai-pack small { color: var(--muted); }
.ai-pack i { font-style: normal; font-weight: 800; }
.ai-pack input:checked + span { border-color: var(--gold); background: var(--gold-soft); }
.ai-log summary { cursor: pointer; }
.ai-log-a { margin: 6px 0; padding: 8px 10px; background: var(--bg); border-radius: 10px; font-size: 13.5px; max-height: 260px; overflow-y: auto; }

/* زوار المتجر (دردشة الموقع) */
.chat-visitors { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 8px 8px; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); color: var(--text); border: 1px solid var(--line); }
.chat-visitors small { width: 100%; color: var(--muted); font-size: 12px; margin-top: -4px; }
.chat-visitors .count, .vcs-item .count { margin-inline-start: auto; background: var(--bad); color: #fff; border-radius: 999px; min-width: 22px; padding: 0 6px; text-align: center; font-size: 12px; font-weight: 800; }
.vcs { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; align-items: start; }
.vcs-list { padding: 8px; max-height: 72vh; overflow-y: auto; }
.vcs-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: var(--text); }
.vcs-item:hover, .vcs-item.on { background: var(--gold-soft); }
.vcs-i { display: grid; min-width: 0; flex: 1; }
.vcs-i b, .vcs-i small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcs-main { display: flex; flex-direction: column; min-height: 60vh; padding: 0; overflow: hidden; }
.vcs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.vcs-head small { display: block; }
.vcs-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vcs-acts .check { margin: 0 !important; }
.vcs-cart:not(:empty) { margin: 10px 14px 0; padding: 10px 12px; border: 1px dashed var(--gold); border-radius: 12px; background: var(--gold-soft); font-size: 13.5px; }
.vcs-cart ul { margin: 4px 0; padding-inline-start: 18px; }
.vcs-cart p { margin: 4px 0 0; }
.vcs-msgs { flex: 1; overflow-y: auto; max-height: 56vh; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.vcs-msg { max-width: 78%; padding: 8px 12px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.vcs-msg.visitor { align-self: flex-start; }
.vcs-msg.staff, .vcs-msg.ai, .vcs-msg.shop { align-self: flex-end; background: var(--gold-soft); }
.vcs-msg.ai { background: #EEF2FF; }
.vcs-who { display: block; font-size: 11.5px; font-weight: 800; color: var(--gold-deep); }
.vcs-msg small { display: block; font-size: 10.5px; color: var(--muted); }
.vcs-msg em { display: block; font-size: 13px; color: var(--muted); }
.vcs-msg audio { width: 220px; max-width: 100%; height: 34px; }
.vcs-note { align-self: center; font-size: 12px; color: var(--muted); background: #fff; border-radius: 999px; padding: 3px 12px; }
.vcs-form { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.vcs-form textarea { flex: 1; resize: vertical; font: inherit; }
@media (max-width: 900px) { .vcs { grid-template-columns: 1fr; } .vcs-list { max-height: 40vh; } }

/* كتالوج المنتجات (عرض وطباعة) */
.cat-opts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; }
.cat-opts-grid .wide { grid-column: span 2; }
.cat-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 4px; }
.cat-checks .check { margin: 0 !important; }
.cat-opts .actions { align-items: center; }
.cat-doc { --cat-a: var(--gold); background: #fff; border-radius: 18px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); padding: 28px; margin-top: 16px; color: #1d2a30; }
.cat-cover { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "logo head qr" "meta meta qr"; gap: 6px 20px; align-items: center; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 3px solid var(--cat-a); }
.cat-logo { grid-area: logo; width: 84px; height: 84px; object-fit: contain; border-radius: 16px; }
.cat-head { grid-area: head; }
.cat-qr { grid-area: qr; display: grid; justify-items: center; gap: 4px; width: 124px; text-align: center; }
.cat-qr-code img { display: block; width: 112px; height: 112px; padding: 6px; background: #fff; border: 1px solid #e3eaec; border-radius: 12px; }
.cat-qr small { font-size: 11.5px; font-weight: 700; color: var(--gold-deep); line-height: 1.4; }
.cat-head small { color: var(--muted); font-weight: 700; font-size: 14px; }
.cat-head h1 { margin: 2px 0 4px; font-size: 32px; line-height: 1.25; }
.cat-note { margin: 0; color: var(--gold-deep); font-weight: 700; }
.cat-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: #44535a; }
.cat-sec + .cat-sec { margin-top: 22px; }
.cat-sec h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 8px 14px; border-radius: 12px; background: var(--gold-soft); font-size: 19px; }
.cat-sec h2 small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cols-2 .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-4 .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cat-item { display: flex; flex-direction: column; border: 1px solid #e3eaec; border-radius: 14px; overflow: hidden; break-inside: avoid; page-break-inside: avoid; background: #fff; }
.cat-img { aspect-ratio: 1 / 1; background: #f4f7f8; display: grid; place-items: center; overflow: hidden; }
.cols-2 .cat-img { aspect-ratio: 4 / 3; }
.cat-img img { width: 100%; height: 100%; object-fit: contain; }
.cat-img span { font-size: 46px; font-weight: 800; color: #b9c6ca; }
.cat-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cat-name { font-size: 15px; line-height: 1.4; }
.cols-4 .cat-name { font-size: 13.5px; }
.cat-desc { margin: 0; font-size: 12.5px; color: #5b6770; line-height: 1.55; }
.cat-code { font-size: 11.5px; color: #7a878d; letter-spacing: .5px; }
.cat-price { margin-top: auto; padding-top: 4px; color: var(--gold-deep); }
.cat-price b { font-size: 19px; }
.cols-4 .cat-price b { font-size: 16px; }
.cat-price small { color: #5b6770; font-weight: 600; }
.no-img .cat-item { flex-direction: row; align-items: center; }
.no-img .cat-body { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.no-img .cat-desc { flex-basis: 100%; order: 3; }
.no-img .cat-price { margin: 0; padding: 0; }
.cat-foot { margin-top: 22px; padding-top: 12px; border-top: 1px solid #e3eaec; text-align: center; color: #5b6770; font-size: 13px; }
@media (max-width: 700px) { .cat-grid, .cols-4 .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cat-doc { padding: 16px; } .cat-head h1 { font-size: 24px; } .cat-opts-grid .wide { grid-column: auto; }
    .cat-cover { grid-template-columns: auto 1fr; grid-template-areas: "logo head" "meta meta" "qr qr"; } .cat-qr { width: auto; justify-self: center; } }
@media print {
    @page { size: A4; margin: 10mm; }
    .cat-doc { box-shadow: none; border-radius: 0; padding: 0; margin: 0; }
    .cat-doc, .cat-doc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .cat-sec.brk { break-before: page; page-break-before: always; }
    .cat-sec h2 { break-after: avoid; page-break-after: avoid; }
    .cat-grid { gap: 8px; }
    .ai-fab, .chat-fab { display: none !important; }
}

/* روابط الدفع: رصيد العميل المختار */
.pl-bal { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: -4px 0 10px; padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.pl-bal.due { background: #FDECEA; color: #B3261E; }
.pl-bal.ok { background: #E8F6EE; color: #1B7A43; }
/* الأقساط: أزرار الدفع السريع */
.inst-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.inst-quick .chip { cursor: pointer; direction: inherit; font-family: inherit; }
.inst-quick .chip:hover { border-color: var(--gold); }
/* استوديو الصور */
.studio-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.studio-tpl { margin: 0 !important; cursor: pointer; }
.studio-tpl input { position: absolute; opacity: 0; pointer-events: none; }
.studio-tpl span { display: grid; justify-items: center; gap: 4px; padding: 12px 8px; border: 1.5px solid var(--line); border-radius: 14px; text-align: center; transition: border-color .15s, background .15s; height: 100%; }
.studio-tpl b { font-size: 13px; line-height: 1.35; color: var(--text); }
.studio-tpl small { font-size: 11px; color: var(--muted); }
.studio-tpl i { display: block; background: linear-gradient(135deg, var(--gold-soft), #fff); border: 1.5px solid var(--gold); border-radius: 4px; height: 30px; }
.studio-tpl i.ar-1x1 { width: 30px; } .studio-tpl i.ar-9x16 { width: 17px; } .studio-tpl i.ar-16x9 { width: 52px; height: 29px; } .studio-tpl i.ar-4x3 { width: 40px; } .studio-tpl i.ar-4x5 { width: 24px; }
.studio-tpl input:checked + span { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 3px rgba(200, 150, 46, .15); }
.studio-tpl input:focus-visible + span { outline: 2px solid var(--gold-deep); }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; }
.studio-preview { margin-top: 8px; }
.studio-preview img { max-width: 100%; max-height: 220px; border-radius: 12px; border: 1px solid var(--line); }
.studio-busy { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); font-weight: 700; }
.studio-busy i { width: 18px; height: 18px; border: 3px solid var(--gold); border-top-color: transparent; border-radius: 50%; animation: studio-spin .8s linear infinite; }
@keyframes studio-spin { to { transform: rotate(360deg); } }
.studio-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 10px; }
.studio-item { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.studio-item.new { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 150, 46, .25); }
.studio-item img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #f4f7f8; }
.studio-item figcaption { padding: 8px 10px 10px; display: grid; gap: 3px; font-size: 13px; }
.studio-item figcaption span { color: var(--gold-deep); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-acts { display: flex; gap: 6px; margin-top: 4px; }
.studio-acts form { margin: 0; }
@media (max-width: 760px) { .studio-grid { grid-template-columns: 1fr; } }

/* الصنف جزء من صنف تاني */
.portion-quick { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; align-self: end; padding-bottom: 6px; }
.portion-quick > span { font-size: 13px; color: var(--muted); font-weight: 700; }
.portion-quick small { color: var(--muted); }

/* إدارة الدور */
.q-card { margin-top: 14px; }
.q-now { display: flex; align-items: center; gap: 16px; margin: 12px 0; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, var(--gold-soft), #fff); border: 1px solid var(--line); }
.q-now small { display: block; color: var(--muted); font-weight: 700; }
.q-now b { font-size: 19px; display: block; }
.q-num { min-width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; font-weight: 800; background: var(--gold); color: #fff; }
.q-num.idle { background: #E3EAEC; color: var(--muted); }
.q-now .q-acts { margin-inline-start: auto; }
.q-badge { display: inline-grid; place-items: center; min-width: 34px; height: 30px; border-radius: 9px; background: var(--gold-soft); color: var(--gold-deep); }
.q-table td { vertical-align: middle; }
.q-acts form { display: inline; }
.q-more { display: inline-block; position: relative; }
.q-more summary { list-style: none; cursor: pointer; }
.q-more summary::-webkit-details-marker { display: none; }
.q-pop { position: absolute; z-index: 30; inset-inline-end: 0; top: calc(100% + 6px); width: 260px; display: grid; gap: 10px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .35); }
.q-pop label { display: grid; gap: 4px; font-size: 13px; }

.vcs-filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.vcs-filter a { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--text); }
.vcs-filter a.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.vcs-filter form { width: 100%; }
.vcs-filter input { width: 100%; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); font: inherit; font-size: 13px; }

.hc-list li { flex-wrap: wrap; gap: 8px; }
.hc-list li .check { flex: 1; min-width: 180px; }
.hc-list select { width: auto; padding: 5px 8px; font-size: 13px; }

.lim-bars { display: grid; gap: 12px; margin: 14px 0; }
.lim-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.lim-bar { height: 9px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 5px; }
.lim-bar i { display: block; height: 100%; background: var(--good); border-radius: 99px; }
.lim.near .lim-bar i { background: #E8A317; }
.lim.full .lim-bar i { background: var(--bad); }
.lim.full .lim-top span { color: var(--bad); font-weight: 700; }

/* طلب متجر النظارات: العدسات والمقاس على البند */
.lens-box { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: #F4F8FF; border: 1px solid #DCE7FB; font-size: 13px; max-width: 360px; }
.lens-rx { border-collapse: collapse; margin: 6px 0 4px; background: #fff; font-size: 13px; }
.lens-rx th, .lens-rx td { border: 1px solid #E3EAF6; padding: 3px 8px; text-align: center; }

/* محرر الكتابة */
.rich { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; margin-top: 4px; }
.rich.busy { opacity: .6; pointer-events: none; }
.rich-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: #FCFAF4; position: sticky; top: 0; z-index: 2; }
.rich-bar button { min-width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--text); }
.rich-bar button:hover { background: var(--gold-soft); }
.rich-bar button[data-cmd=italic] { font-style: italic; } .rich-bar button[data-cmd=underline] { text-decoration: underline; } .rich-bar button[data-cmd=strikeThrough] { text-decoration: line-through; }
.rich-sep { width: 1px; background: var(--line); margin: 4px 3px; }
.rich-ed { padding: 14px 16px; outline: none; line-height: 1.9; font-size: 15px; max-height: 70vh; overflow-y: auto; }
.rich-ed:focus { box-shadow: inset 0 0 0 2px var(--gold-soft); }
.rich-ed h2 { font-size: 21px; margin: 16px 0 6px; } .rich-ed h3 { font-size: 17px; margin: 12px 0 4px; }
.rich-ed p { margin: 0 0 10px; } .rich-ed ul, .rich-ed ol { padding-inline-start: 22px; margin: 0 0 10px; }
.rich-ed blockquote { margin: 0 0 10px; padding: 6px 14px; border-inline-start: 4px solid var(--gold); background: #FCFAF4; border-radius: 6px; }
.rich-ed img { max-width: 100%; height: auto; border-radius: 10px; }
.rich-ed table { border-collapse: collapse; width: 100%; margin: 0 0 10px; } .rich-ed td, .rich-ed th { border: 1px solid var(--line); padding: 6px 8px; min-width: 40px; }
.rich-ed th { background: #FCFAF4; } .rich-ed a { color: var(--info); text-decoration: underline; }

/* ===================== أشكال شاشة البيع (الموظف بيختار من فوق — بيتحفظ على الجهاز) ===================== */
.skin-pick { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; color: var(--muted); }
.skin-pick select { border: 1px solid var(--line); border-radius: 9px; padding: 5px 8px; font: inherit; font-size: 13.5px; font-weight: 700; background: var(--card); color: var(--text); cursor: pointer; }
.pc-prods .prod-grid:empty::before { content: ""; }

/* الأشكال اللي بتعيد ترتيب الكروت: main و side بيبقوا شفافين والكروت تتوزع على الشبكة */
.pos.skin-split .pos-main, .pos.skin-split .pos-side, .pos.skin-touch .pos-main, .pos.skin-touch .pos-side { display: contents; }
.pos.skin-split .pos-grid, .pos.skin-touch .pos-grid { display: grid; gap: 12px; align-items: start; }
.pos.skin-split .card, .pos.skin-touch .card { margin-bottom: 0; }
.pc-scan { grid-area: scan; } .pc-prods { grid-area: prods; } .pc-lines { grid-area: lines; } .pc-client { grid-area: client; } .pc-totals { grid-area: totals; } .pc-pay { grid-area: pay; }

/* ---------- 1) كاشير سريع: السلة جنب والأصناف كروت كبيرة بالصور (زي أنظمة الكاشير) ---------- */
.pos.skin-split { --sk: #1F3A5F; --sk-2: #2B4C78; --sk-soft: #EAF0F8; }
.pos.skin-split .pos-head { background: var(--sk); color: #fff; padding: 8px 12px; border-radius: 12px; margin-bottom: 12px; }
.pos.skin-split .pos-head .muted, .pos.skin-split .skin-pick { color: #C9D6E8; }
.pos.skin-split .pos-head .seg { background: rgba(255, 255, 255, .12); }
.pos.skin-split .pos-head .seg button { color: #DCE6F3; }
.pos.skin-split .pos-head .seg button.on { background: #fff; color: var(--sk); }
.pos.skin-split .pos-head .btn.line, .pos.skin-split .pos-head select { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.pos.skin-split .pos-head .skin-pick select option { color: #111; }
.pos.skin-split.has-grid .pos-grid {
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
    grid-template-areas: "scan prods" "client prods" "lines prods" "totals prods" "pay prods";
}
.pos.skin-split:not(.has-grid) .pos-grid { grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "scan client" "lines totals" "lines pay"; }
.pos.skin-split .card { padding: 12px; border-radius: 12px; }
.pos.skin-split .scan { margin-bottom: 0; border: 2px solid var(--sk-soft); background: #fff; color: var(--sk); }
.pos.skin-split .pc-client h2, .pos.skin-split .pc-pay h2 { display: none; }
.pos.skin-split .pc-client { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.pos.skin-split .pc-client > *:not(label) { grid-column: 1 / -1; }
.pos.skin-split .pc-client label { margin-bottom: 0; font-size: 12.5px; }
.pos.skin-split .pc-prods { position: sticky; top: 70px; height: calc(100vh - 160px); min-height: 420px; display: flex; flex-direction: column; background: var(--sk-soft); border-color: #D5E0EE; }
.pos.skin-split .cat-tabs { flex: none; }
.pos.skin-split .cat-tabs button { border-radius: 10px; border: 0; border-bottom: 3px solid var(--c, var(--sk)); background: #fff; padding: 7px 16px; }
.pos.skin-split .cat-tabs button.on { background: var(--sk); color: #fff; }
.pos.skin-split .prod-grid { flex: 1; max-height: none; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; align-content: start; padding: 2px; }
.pos.skin-split .prod-grid button { align-items: center; text-align: center; justify-content: flex-start; gap: 4px; min-height: 128px; padding: 10px 8px 8px; border: 1px solid #E1E8F2; border-bottom: 3px solid var(--c, var(--sk)); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(31, 58, 95, .08); transition: transform .12s, box-shadow .12s; }
.pos.skin-split .prod-grid button:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(31, 58, 95, .45); }
.pos.skin-split .prod-grid button img { height: 70px; }
.pos.skin-split .prod-grid button:not(.has-img)::before { content: "▦"; display: grid; place-items: center; width: 52px; height: 52px; margin: 4px auto 6px; border-radius: 50%; background: var(--sk-soft); color: #9AAFCB; font-size: 22px; }
.pos.skin-split .prod-grid button b { font-size: 12.5px; text-transform: uppercase; color: #2C3E55; }
.pos.skin-split .prod-grid button span { color: var(--sk); font-size: 13px; }
.pos.skin-split .pc-lines { min-height: 240px; padding: 0; overflow: hidden; }
.pos.skin-split .pc-lines .table-wrap { max-height: 46vh; overflow-y: auto; }
.pos.skin-split .pos-lines thead th { background: var(--sk); color: #fff; position: sticky; top: 0; z-index: 1; border: 0; }
.pos.skin-split .pc-lines .extra-lines, .pos.skin-split .pc-lines .pos-msg { margin: 8px 10px; }
.pos.skin-split .totals .tot-row { padding: 3px 0; font-size: 13.5px; }
.pos.skin-split .totals .grand { background: var(--sk); border-radius: 10px; }
.pos.skin-split .pay-grid { gap: 6px; }
.pos.skin-split #save { background: linear-gradient(180deg, #34B35E, #23914A); border-color: #1D7B3E; color: #fff; font-size: 18px; padding: 15px; }
.pos.skin-split #hold { background: #8A5A2B; border-color: #8A5A2B; color: #fff; }
.pos.skin-split #clear { background: #D9534F; border-color: #D9534F; color: #fff; }
.pos.skin-split #all-cash { background: #3BA7D9; border-color: #3BA7D9; color: #fff; }

/* ---------- 2) داكن: نفس الترتيب بألوان ليلية مريحة للعين ---------- */
.pos.skin-dark { --card: #18202C; --line: #2A3546; --text: #E6EBF2; --muted: #8C9AAE; --gold: #2DD4BF; --gold-light: #5EEAD4; --gold-deep: #5EEAD4; --gold-soft: rgba(45, 212, 191, .12); --ink: #0B1018; color: var(--text); }
body:has(.pos.skin-dark) .main, body:has(.pos.skin-dark) .top { background: #0E131B; }
body:has(.pos.skin-dark) .top { border-color: #222C3B; }
body:has(.pos.skin-dark) .top .icon-btn, body:has(.pos.skin-dark) .top select { color: #C8D2E0; }
.pos.skin-dark .card { background: var(--card); border-color: var(--line); box-shadow: 0 10px 30px -20px #000; }
.pos.skin-dark input, .pos.skin-dark select, .pos.skin-dark textarea { background: #0F1621 !important; color: var(--text) !important; border-color: var(--line) !important; }
.pos.skin-dark input::placeholder { color: #5E6B7E; }
.pos.skin-dark .seg { background: #0F1621; }
.pos.skin-dark .seg button.on { background: #233044; color: var(--gold-light); }
.pos.skin-dark .btn.line { background: #1E2836; color: var(--text); border-color: var(--line); }
.pos.skin-dark .btn.dark { background: #2A3A52; }
.pos.skin-dark .scan { border-color: #2C6C68; color: var(--gold-light); }
.pos.skin-dark .table th { background: #141B26; color: var(--muted); border-color: var(--line); }
.pos.skin-dark .table td { border-color: #222C3B; }
.pos.skin-dark .cat-tabs button { background: #1E2836; color: var(--text); border-color: var(--line); border-inline-start-color: var(--c, var(--gold)); }
.pos.skin-dark .cat-tabs button.on { background: var(--gold); color: #04231F; }
.pos.skin-dark .prod-grid button { background: linear-gradient(160deg, #1F2A3A, #18212E); border-color: #2A3546; border-top-color: var(--c, var(--gold)); color: var(--text); }
.pos.skin-dark .prod-grid button:hover { box-shadow: 0 0 0 1px var(--gold), 0 10px 24px -14px var(--gold); }
.pos.skin-dark .prod-grid button img { background: #0F1621; }
.pos.skin-dark .prod-grid button span { color: var(--gold-light); }
.pos.skin-dark .totals .tot-row { border-color: #222C3B; }
.pos.skin-dark .totals .grand { background: linear-gradient(135deg, #0F766E, #134E4A); box-shadow: 0 10px 30px -18px #2DD4BF; }
.pos.skin-dark .totals .grand b { color: #fff; }
.pos.skin-dark .search-results { background: #18202C; border-color: var(--line); }
.pos.skin-dark .pay-grid .acc-pick { background: #0F1621; color: var(--muted); }
.pos.skin-dark .alert.err { background: #3A1518; color: #FFB4B4; border-color: #5B2228; }

/* ---------- 3) شاشة لمس: كروت أصناف كبيرة والأقسام عمود جانبي (مطاعم وكافيهات وتابلت) ---------- */
.pos.skin-touch { --tk: #7C3AED; --tk-soft: #F3EEFF; }
.pos.skin-touch.has-grid .pos-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
    grid-template-areas: "prods scan" "prods lines" "prods client" "prods totals" "prods pay";
}
.pos.skin-touch:not(.has-grid) .pos-grid { grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "scan client" "lines totals" "lines pay"; }
.pos.skin-touch .card { border-radius: 18px; }
.pos.skin-touch .pos-head .seg button { padding: 12px 22px; font-size: 16px; }
.pos.skin-touch .pc-prods { position: sticky; top: 70px; height: calc(100vh - 160px); min-height: 440px; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 12px; }
.pos.skin-touch .cat-tabs { flex-direction: column; overflow-x: hidden; overflow-y: auto; margin: 0; padding: 0; gap: 8px; }
.pos.skin-touch .cat-tabs button { border: 0; border-radius: 14px; padding: 14px 10px; font-size: 15px; font-weight: 800; text-align: center; white-space: normal; background: color-mix(in srgb, var(--c, var(--tk)) 12%, #fff); color: color-mix(in srgb, var(--c, var(--tk)) 70%, #000); }
.pos.skin-touch .cat-tabs button.on { background: var(--c, var(--tk)); color: #fff; box-shadow: 0 8px 18px -10px var(--c, var(--tk)); }
.pos.skin-touch .prod-grid { max-height: none; height: 100%; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; }
.pos.skin-touch .prod-grid button { min-height: 140px; border-radius: 18px; border: 0; border-top: 0; padding: 14px; justify-content: flex-end; background: linear-gradient(160deg, color-mix(in srgb, var(--c, var(--tk)) 16%, #fff), #fff 70%); box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 10px 22px -16px color-mix(in srgb, var(--c, var(--tk)) 80%, #000); }
.pos.skin-touch .prod-grid button:active { transform: scale(.97); }
.pos.skin-touch .prod-grid button img { height: 80px; background: transparent; }
.pos.skin-touch .prod-grid button b { font-size: 16px; }
.pos.skin-touch .prod-grid button span { font-size: 17px; color: color-mix(in srgb, var(--c, var(--tk)) 75%, #000); }
.pos.skin-touch .scan { margin: 0; border-style: solid; border-color: var(--tk-soft); color: var(--tk); }
.pos.skin-touch .pc-lines .table-wrap { max-height: 38vh; overflow-y: auto; }
.pos.skin-touch .pos-lines td { padding: 12px 8px; font-size: 15px; }
.pos.skin-touch .pc-client h2, .pos.skin-touch .pc-pay h2 { font-size: 15px; margin-bottom: 8px; }
.pos.skin-touch .totals .grand { background: var(--tk); border-radius: 14px; }
.pos.skin-touch .totals .grand b { color: #fff; font-size: 28px; }
.pos.skin-touch .btn { min-height: 46px; border-radius: 14px; }
.pos.skin-touch #save { background: linear-gradient(180deg, #8B5CF6, #6D28D9); border-color: #5B21B6; font-size: 19px; min-height: 58px; }

/* الشاشات الصغيرة: كل الأشكال بترجع عمود واحد */
@media (max-width: 1000px) {
    .pos.skin-split .pos-grid, .pos.skin-touch .pos-grid { grid-template-columns: minmax(0, 1fr) !important; grid-template-areas: "scan" "prods" "lines" "client" "totals" "pay" !important; }
    .pos.skin-split .pc-prods, .pos.skin-touch .pc-prods { position: static; height: auto; min-height: 0; }
    .pos.skin-touch .pc-prods { grid-template-columns: minmax(0, 1fr); }
    .pos.skin-touch .cat-tabs { flex-direction: row; overflow-x: auto; }
    .pos.skin-split .prod-grid, .pos.skin-touch .prod-grid { max-height: 360px; }
    .skin-pick { margin-inline-start: 0; }
}

/* الإيصال: بيانات المحل أوضح، وصندوق التوصيل بتليفون العميل بخط كبير */
.receipt .r-shop { font-size: 22px; line-height: 1.3; }
.receipt .r-phone { text-align: center; font-size: 15px; font-weight: 800; letter-spacing: .3px; }
.receipt .r-addr { text-align: center; font-size: 12.5px; font-weight: 700; color: #000; }
.receipt .r-soft { font-size: 10.5px; color: #333; }
.r-deliv { border: 2px solid #000; border-radius: 6px; padding: 5px 7px; margin: 4px 0 6px; }
.r-deliv-t { font-weight: 800; font-size: 12px; text-align: center; border-bottom: 1px dashed #000; padding-bottom: 2px; margin-bottom: 3px; }
.r-deliv-n { font-size: 15px; font-weight: 800; text-align: center; }
.r-deliv-p { font-size: 20px; font-weight: 900; text-align: center; letter-spacing: .5px; }
.r-deliv-a { font-size: 13.5px; font-weight: 700; line-height: 1.5; margin-top: 2px; }
.receipt.r58 .r-shop { font-size: 18px; } .receipt.r58 .r-deliv-p { font-size: 17px; }

/* كيبورد على الشاشة */
/* الأيقونة جنب الخانة (مش جواها) عشان ماتغطيش الكلام المكتوب */
.osk-wrap { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.osk-wrap > input { flex: 1; min-width: 0; margin-top: 0 !important; }
.osk-btn { flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--gold-soft); color: var(--gold-deep); font-size: 20px; line-height: 1; cursor: pointer; }
.osk-btn:hover { background: var(--gold); color: #fff; }
.osk { position: fixed; inset: 0; z-index: 200; background: rgba(8, 20, 26, .35); display: flex; align-items: flex-end; justify-content: center; }
.osk[hidden] { display: none; }
.osk-panel { width: min(1100px, 100%); background: #1D2733; border-radius: 18px 18px 0 0; padding: 12px 14px 16px; box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); }
.osk-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.osk-label { color: #9FB3C8; font-size: 14px; white-space: nowrap; }
.osk-preview { flex: 1; min-width: 0; height: 46px; border-radius: 10px; border: 0; padding: 0 14px; font: inherit; font-size: 22px; font-weight: 700; background: #fff; color: #111; }
.osk-x { width: 46px; height: 46px; border: 0; border-radius: 10px; background: #34404F; color: #fff; font-size: 20px; cursor: pointer; }
.osk-keys { display: grid; gap: 8px; }
.osk-row { display: flex; gap: 8px; justify-content: center; }
.osk-k { flex: 1 1 0; min-width: 0; max-width: 92px; height: 62px; border: 0; border-radius: 12px; background: #F4F6F9; color: #111; font: inherit; font-size: 26px; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 #9AA7B6; transition: transform .05s; }
.osk-k:active { transform: translateY(2px); box-shadow: 0 1px 0 #9AA7B6; }
.osk-k.fn { background: #3B4A5C; color: #fff; font-size: 18px; box-shadow: 0 3px 0 #15202B; max-width: 120px; }
.osk-k.wide { max-width: 160px; flex-grow: 1.6; }
.osk-k.space { max-width: none; flex-grow: 5; font-size: 18px; }
.osk-k.done { background: var(--gold); color: #fff; font-size: 20px; max-width: 160px; flex-grow: 1.6; box-shadow: 0 3px 0 var(--gold-deep); }
.osk-keys.num .osk-k { max-width: 150px; height: 70px; font-size: 30px; }
.osk-keys.num { max-width: 520px; margin: 0 auto; }
@media (max-width: 700px) { .osk-k { height: 50px; font-size: 20px; border-radius: 9px; } .osk-row { gap: 4px; } .osk-keys { gap: 5px; } }

/* فترات جاهزة في فلتر الفواتير */
.filters .range-chips { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.range-chips a { padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13.5px; font-weight: 700; color: var(--text); }
.range-chips a:hover { border-color: var(--gold); }
.range-chips a.on { background: var(--gold); border-color: var(--gold); color: #fff; }

/* ترقيم الفواتير في الإعدادات */
.invnum { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.invnum legend { font-weight: 800; padding: 0 6px; }
.invnum .table input { margin: 0; padding: 6px 8px; }

/* ===== مركز الذكاء والذكاء في الشاشات ===== */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.row-gap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-note { background: #EEF7F6; border: 1px solid #BFE3DE; color: var(--text); }
.ai-scan-btn { cursor: pointer; white-space: nowrap; }
.ai-scan-btn.busy { opacity: .6; pointer-events: none; }
.ai-miss { margin: 6px 0 0; padding-inline-start: 18px; font-size: 13px; }
.ai-miss li { margin: 3px 0; }
.ai-watch { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.ai-watch li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ai-watch li div { flex: 1; min-width: 0; }
.ai-watch li.lv-high { border-color: #F3B8B2; background: #FFF6F5; }
.ai-watch li.lv-mid { border-color: #F2D39A; background: #FFFAF0; }
.ai-insight { font-size: 15px; line-height: 1.9; padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; background: #F6FAF9; border: 1px solid var(--line); min-height: 60px; }
.ai-sum { white-space: pre-wrap; font-family: inherit; font-size: 14px; margin: 0; }
.ai-msg.ai-act { border: 1px dashed #0F8A7E; background: #F3FBFA; }
.ai-act-sum { font-weight: 700; margin-bottom: 8px; }
.ai-act.done .ai-act-sum, .ai-act.off .ai-act-sum { margin: 0; font-weight: 600; }
.ai-act.off { opacity: .7; border-style: solid; border-color: var(--line); }
.ai-act-btns { display: flex; gap: 8px; }
.ai-msg a { color: var(--gold-deep); text-decoration: underline; word-break: break-word; }
.icon-btn.ai-mic.on { background: #E53935; color: #fff; border-color: #E53935; animation: ai-pulse 1.2s infinite; }
@keyframes ai-pulse { 50% { box-shadow: 0 0 0 6px rgba(229, 57, 53, .18); } }
.ai-price-btn { display: inline-block; margin-top: 4px; }
.ai-price-out { padding: 10px 12px; border-radius: 12px; background: #F6FAF9; border: 1px solid var(--line); display: grid; gap: 4px; justify-items: start; }
.ai-price-out[hidden] { display: none; }

/* ===== إعداد النظام بالكلام ===== */
.setup-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 14px; flex-wrap: wrap; }
.setup-steps li { padding: 6px 14px; border-radius: 999px; background: #EEF2F3; color: var(--muted); font-weight: 700; font-size: 13px; }
.setup-steps li.on { background: var(--gold); color: var(--on-gold, var(--ink)); }
.setup-steps li.ok { background: #E8F5E9; color: var(--good); }
.setup-form textarea { font-size: 15px; line-height: 1.8; }
.setup-ideas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; margin: 10px 0; }
.setup-ideas span { padding: 3px 10px; border-radius: 999px; background: #F6FAF9; border: 1px solid var(--line); }
#setup-mic.on { background: #E53935; color: #fff; border-color: #E53935; }
.setup-summary { font-size: 15px; }
.setup-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.setup-mod { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.setup-mod div { display: grid; gap: 2px; }
.setup-done li { margin: 4px 0; }

.range-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.range-chips a.on { background: var(--gold); border-color: var(--gold); color: var(--on-gold, var(--ink)); }
.dlv-job .card-head h2 { font-size: 17px; }
.track-map { height: 300px; border-radius: 14px; border: 1px solid var(--line); margin: 10px 0; }
.track-steps { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.track-steps li { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.track-steps li.ok { color: var(--text); font-weight: 700; }
.track-steps li i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #EEF2F3; font-style: normal; font-size: 12px; }
.track-steps li.ok i { background: var(--good); color: #fff; }
.row-bad td { background: #FFF6F5; }
.tk-thread { display: grid; gap: 10px; margin: 12px 0; }
.tk-msg { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; max-width: 92%; }
.tk-msg small { color: var(--muted); margin-inline-start: 6px; }
.tk-msg div { margin-top: 4px; white-space: normal; }
.tk-msg.staff { justify-self: end; background: #EEF7F6; border-color: #BFE3DE; }
.tk-msg.internal { background: #FFFAF0; border-style: dashed; border-color: #F2D39A; }
.auto-step { border-style: dashed; margin-bottom: 10px; }
.bud-grid input { width: 74px; }
.bud-bar { display: inline-block; width: 70px; height: 7px; border-radius: 9px; background: #EEF2F3; overflow: hidden; vertical-align: middle; margin-inline-end: 6px; }
.bud-bar i { display: block; height: 100%; background: var(--good); }
.bud-bar i.near { background: #F2A33A; } .bud-bar i.over { background: var(--bad); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
/* إحصائيات المتجر: الزوار والطلبات عمودين جنب بعض بنفس المقياس (مايطلعوش بره الرسم) */
.vpair2 { display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; max-width: 34px; height: 150px; overflow: hidden; }
.vpair2 .vbar { flex: 1; max-width: 15px; }
.vpair2 .vbar.ord { background: var(--good, #2E7D4F); }
.vchart .vcol { overflow: hidden; }

/* منتقي المقاسات والألوان */
.vpicker { display: grid; gap: 10px; margin: 8px 0; }
.vrow { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 6px 12px; align-items: start; padding: 10px; border: 1px solid var(--line, #e3e6ea); border-radius: 12px; }
.vrow[hidden] { display: none; }
.vrow .vvals { grid-column: 1 / -1; font-size: 13px; }
.vchips { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; min-height: 34px; }
.vchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line, #d9dee5); background: #fff; color: inherit; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.vchip:hover { border-color: var(--gold, #c9a227); }
.vchip.on { background: var(--gold-soft, #fff4d6); border-color: var(--gold, #c9a227); color: var(--gold-deep, #7a5c00); }
.vchip.on::before { content: '✓'; font-weight: 800; }
.vchip.ghost { border-style: dashed; color: var(--muted, #777); font-weight: 500; }
.vchip i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); display: inline-block; }
.vfoot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.variants-new { border: 1px dashed var(--line, #d9dee5); border-radius: 12px; padding: 10px 12px; margin: 6px 0 12px; }
.variants-new summary { cursor: pointer; }
.presets-table textarea { width: 100%; min-height: 44px; }
.presets-table .vchips { margin-top: 6px; min-height: 0; }
.presets-table .vchip { cursor: default; font-size: 12px; padding: 2px 9px; }
@media (max-width: 640px) { .vrow { grid-template-columns: 1fr; } }

/* صورة الصنف من الإنترنت */
.ai-img { margin-top: 8px; }
.ai-img-out { margin-top: 8px; }
.ai-img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ai-img-grid figure { margin: 0; border: 1px solid var(--line, #e3e6ea); border-radius: 12px; padding: 8px; background: #fff; display: grid; gap: 6px; }
.ai-img-grid img { width: 100%; height: 150px; object-fit: contain; background: #f6f7f9; border-radius: 8px; }
.ai-img-grid figcaption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
