/* ==========================================================
   سلتي SALTI — نظام التصميم
   ألوان سوق الشام: زعفران + باذنجاني + رمّان + زيتون
   ========================================================== */
@font-face { font-family: "Readex"; src: url("../vendor/fonts/Readex.ttf") format("truetype"); font-weight: 160 700; font-display: swap; }
@font-face { font-family: "Baloo"; src: url("../vendor/fonts/Baloo.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }

:root {
  /* الهوية */
  --yellow: #FFC20E;          /* زعفران — لون اللافتة */
  --yellow-600: #F0A800;
  --yellow-soft: #FFF3C9;
  --ink: #22163A;             /* باذنجاني — بديل الأسود */
  --ink-2: #2F2150;
  --ink-3: #3E2E66;
  --red: #E0303F;             /* رمّان */
  --red-soft: #FDE6E8;
  --green: #2E9E4F;           /* زيتون */
  --green-soft: #DFF4E5;
  --blue: #3B5BDB;  --blue-soft: #E5EBFF;
  --violet: #7B4DD8; --violet-soft: #EFE6FF;
  --cyan: #0E8FA8;  --cyan-soft: #DCF4F8;
  --amber: #B86E00; --amber-soft: #FFEDCC;
  --peach: #FFE3D3; --mint: #D8F3E4; --lilac: #E9E2FA;

  --black: var(--ink);
  --bg: #F2F0F7;
  --surface: #FFFFFF;
  --surface-2: #F8F6FC;
  --surface-3: #EEEAF6;
  --border: #E5E0F0;
  --text: #1E1433;
  --text-2: #43385E;
  --muted: #7D7493;
  --sidebar: var(--ink);
  --sidebar-2: #2E2049;
  --sidebar-text: #CFC6E6;
  --ring: rgba(255, 194, 14, .5);

  --font: "Readex", "Segoe UI", Tahoma, sans-serif;
  --display: "Baloo", "Readex", sans-serif;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(34, 22, 58, .04), 0 6px 18px -10px rgba(34, 22, 58, .12);
  --shadow-lg: 0 24px 60px -18px rgba(34, 22, 58, .35);
  --sidebar-w: 268px;
  --top-h: 70px;
}

:root[data-theme="dark"] {
  --bg: #130C20;
  --surface: #1C1330;
  --surface-2: #22183A;
  --surface-3: #2B2045;
  --border: #352A52;
  --text: #F3F0FA;
  --text-2: #D9D1EE;
  --muted: #A096BB;
  --yellow-soft: rgba(255, 194, 14, .14);
  --red-soft: rgba(224, 48, 63, .18);
  --green-soft: rgba(46, 158, 79, .2);
  --blue-soft: rgba(59, 91, 219, .22);
  --violet-soft: rgba(123, 77, 216, .24);
  --cyan-soft: rgba(14, 143, 168, .24);
  --amber-soft: rgba(184, 110, 0, .24);
  --peach: rgba(255, 140, 90, .16); --mint: rgba(46, 158, 79, .16); --lilac: rgba(123, 77, 216, .2);
  --sidebar: #0D0817;
  --sidebar-2: #1E1531;
  --shadow: 0 1px 0 rgba(0,0,0,.3);
  --shadow-lg: 0 24px 60px -18px rgba(0,0,0,.7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; direction: ltr; unicode-bidi: embed; }
.num { font-variant-numeric: tabular-nums; }
::selection { background: var(--yellow); color: #111; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* ---------------- Layout ---------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar-w);
  background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column;
  z-index: 40; transition: transform .25s ease;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 12px; padding: 18px 20px; height: var(--top-h);
  border-bottom: 1px solid rgba(255,255,255,.06); position: relative; overflow: hidden;
}
.brand img { width: 42px; height: 42px; }
.brand .name { font-weight: 900; font-size: 24px; color: var(--yellow); letter-spacing: -.5px; line-height: 1; }
.brand .en { font-size: 10.5px; color: #fff; letter-spacing: 3.5px; font-weight: 800; margin-top: 3px; }
.sidebar .brand::after {
  content: ""; position: absolute; inset-inline-end: -30px; bottom: -22px; width: 120px; height: 40px;
  background: linear-gradient(90deg, var(--red), var(--yellow)); transform: rotate(-12deg); opacity: .9; border-radius: 40px;
}
.nav { flex: 1; overflow-y: auto; padding: 14px 12px 24px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.nav-group { margin-top: 16px; }
.nav-title { font-size: 11px; font-weight: 800; color: #6E6E78; padding: 0 12px 6px; letter-spacing: .5px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; font-weight: 600;
  color: var(--sidebar-text); margin-bottom: 2px; transition: background .15s, color .15s; position: relative;
}
.nav a i { font-size: 20px; opacity: .9; }
.nav a:hover { background: var(--sidebar-2); color: #fff; }
.nav a.active { background: var(--yellow); color: #111; font-weight: 800; }
.nav a.active i { opacity: 1; }
.nav a .count {
  margin-inline-start: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px;
}
.nav a.pos-link { background: linear-gradient(135deg, #222, #1a1a1a); border: 1px solid #2c2c2c; color: #fff; margin-bottom: 8px; }
.nav a.pos-link i { color: var(--yellow); }
.nav a.pos-link:hover { border-color: var(--yellow); }
.sidebar .me {
  border-top: 1px solid rgba(255,255,255,.06); padding: 14px 16px; display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 38px; height: 38px; border-radius: 12px; background: var(--yellow); color: #111; font-weight: 900;
  display: grid; place-items: center; flex-shrink: 0;
}
.sidebar .me .who { flex: 1; min-width: 0; }
.sidebar .me .who b { color: #fff; display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .me .who small { color: #8b8b95; font-size: 12px; }

.main { flex: 1; margin-inline-start: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 14px;
  padding: 0 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .menu-btn { display: none; }
.search-box { position: relative; flex: 1; max-width: 460px; }
.search-box i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }
.search-box input { padding-inline-start: 42px; background: var(--surface); }
.search-box kbd { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); }
.search-results {
  position: absolute; top: calc(100% + 6px); inset-inline: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: none; max-height: 420px; overflow: auto;
}
.search-results.open { display: block; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; }
.search-results a:hover, .search-results a.hl { background: var(--surface-3); }
.search-results .type { font-size: 11px; font-weight: 700; background: var(--yellow-soft); color: var(--amber); padding: 2px 8px; border-radius: 6px; }
.search-results .sub { margin-inline-start: auto; color: var(--muted); font-size: 12.5px; }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface);
  border: 1px solid var(--border); color: var(--text-2); cursor: pointer; position: relative; font-size: 20px;
  transition: border-color .15s, transform .1s;
}
.icon-btn:hover { border-color: var(--yellow); }
.icon-btn:active { transform: scale(.96); }
.icon-btn .dot {
  position: absolute; top: -5px; inset-inline-end: -5px; background: var(--red); color: #fff; font-size: 10.5px;
  font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center;
  border: 2px solid var(--bg); padding: 0 5px;
}
.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 900; letter-spacing: -.3px; display: flex; align-items: center; gap: 10px; }
.page-head h1 i { background: var(--yellow); color: #111; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.crumbs a:hover { color: var(--text); }

/* ---------------- Grid ---------------- */
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 18px; }
.mt { margin-top: 18px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 18px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .bold { font-weight: 800; }
.right { text-align: end; } .center { text-align: center; }
.text-red { color: var(--red); } .text-green { color: var(--green); } .text-amber { color: var(--amber); }
.hide, [hidden] { display: none !important; }

/* ---------------- Cards ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-h h3 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.card-h h3 i { color: var(--yellow-600); font-size: 20px; }
.card-b { padding: 20px; }
.card-b.p0 { padding: 0; }
.card-f { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi .label { color: var(--muted); font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.kpi .value { font-size: 27px; font-weight: 900; letter-spacing: -.5px; }
.kpi .value small { font-size: 13px; color: var(--muted); font-weight: 700; margin-inline-start: 4px; }
.kpi .ic { position: absolute; inset-inline-end: 16px; top: 16px; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; }
.kpi .trend { font-size: 12.5px; font-weight: 700; }
.kpi.hero { background: var(--black); color: #fff; border-color: #000; }
.kpi.hero .label { color: #b5b5bd; }
.kpi.hero .value { color: var(--yellow); }
.kpi.hero > * { position: relative; z-index: 1; }
:root[data-theme="dark"] .kpi.hero { background: linear-gradient(135deg, #2a2108, #141414 60%); border-color: rgba(255,194,14,.35); }
.table td.center { white-space: nowrap; }
.kpi.hero::after {
  content: ""; position: absolute; inset-inline-start: -50px; bottom: -34px; width: 150px; height: 46px;
  background: linear-gradient(90deg, var(--yellow), var(--red)); border-radius: 50px; transform: rotate(-14deg); opacity: .9;
}
.tone-yellow { background: var(--yellow-soft); color: var(--amber); }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-violet { background: var(--violet-soft); color: var(--violet); }
.tone-cyan { background: var(--cyan-soft); color: var(--cyan); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 12px; font-family: inherit; font-weight: 800; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
  white-space: nowrap; background: var(--surface); color: var(--text); border-color: var(--border);
}
.btn i { font-size: 19px; }
.btn:hover { border-color: var(--text-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--yellow); color: #111; border-color: var(--yellow); box-shadow: 0 4px 14px rgba(255,194,14,.35); }
.btn-primary:hover { background: var(--yellow-600); border-color: var(--yellow-600); }
.btn-dark { background: var(--black); color: #fff; border-color: var(--black); }
:root[data-theme="dark"] .btn-dark { background: #F4F4F5; color: #111; border-color: #F4F4F5; }
.btn-dark:hover { opacity: .9; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-sm i { font-size: 17px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-icon { width: 36px; padding: 0; height: 36px; }
.btn-block { width: 100%; }

/* ---------------- Forms ---------------- */
.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea.input { height: auto; padding: 10px 14px; resize: vertical; }
.input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px var(--ring); background: var(--surface); }
.input.file { padding: 9px 12px; height: auto; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A7A85' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; padding-inline-end: 36px; }
input[type="color"].input { padding: 4px; width: 80px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 13.5px; color: var(--text-2); }
.field .help { color: var(--muted); font-size: 12px; }
.field .err { color: var(--red); font-size: 12.5px; font-weight: 700; }
.field.has-err .input { border-color: var(--red); }
.field.check { flex-direction: row; align-items: center; justify-content: space-between; background: var(--surface-2); border: 1px solid var(--border); padding: 10px 14px; border-radius: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { margin-bottom: 18px; }
.form-section > h4 { font-size: 14px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.form-section > h4::before { content: ""; width: 4px; height: 18px; background: var(--yellow); border-radius: 4px; }

.switch { appearance: none; width: 46px; height: 26px; border-radius: 20px; background: var(--border); position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: inset-inline-start .2s; }
.switch:checked { background: var(--green); }
.switch:checked::after { inset-inline-start: 23px; }

.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 0 12px 12px 0; }
.input-group .btn { border-radius: 12px 0 0 12px; height: 44px; }
kbd { font-family: inherit; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border); border-bottom-width: 2px; color: var(--muted); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.filters .input { height: 40px; width: auto; min-width: 160px; }
.filters .grow { flex: 1; min-width: 200px; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-size: 12.5px; color: var(--muted); font-weight: 800; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .actions { display: flex; gap: 4px; justify-content: flex-end; }
.table tfoot td { font-weight: 900; background: var(--surface-2); }
.prod-cell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.thumb { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; font-size: 20px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-cell b { display: block; font-weight: 800; }
.prod-cell small { color: var(--muted); font-size: 12px; }

/* ---------------- Badges ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 8px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-cyan { background: var(--cyan-soft); color: var(--cyan); }
.badge-gray { background: var(--surface-3); color: var(--muted); }
.badge-yellow { background: var(--yellow); color: #111; }
.badge.pulse::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.code { background: var(--surface-3); padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 13px; }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--border); }

/* ---------------- Tabs / chips ---------------- */
.tabs { display: flex; gap: 4px; background: var(--surface-3); padding: 4px; border-radius: 13px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 7px 14px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--muted); white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tabs a .n { background: var(--border); color: var(--text-2); border-radius: 6px; padding: 0 6px; font-size: 11.5px; }
.tabs a.active .n { background: var(--yellow); color: #111; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 30px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; cursor: pointer; white-space: nowrap; font-size: 13.5px; font-family: inherit; color: var(--text); }
.chip.active, .chip:hover { background: var(--black); color: #fff; border-color: var(--black); }
:root[data-theme="dark"] .chip.active { background: var(--yellow); color: #111; border-color: var(--yellow); }

/* ---------------- Alerts / Toasts ---------------- */
.alert { padding: 12px 16px; border-radius: 12px; font-weight: 700; display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.alert-success { background: var(--green-soft); color: var(--green); }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-info, .alert-warning { background: var(--yellow-soft); color: var(--amber); }
.toasts { position: fixed; bottom: 22px; inset-inline-start: 50%; transform: translateX(50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
[dir="ltr"] .toasts { transform: translateX(-50%); }
.toast { pointer-events: auto; background: var(--black); color: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 700; display: flex; gap: 10px; align-items: center; animation: toast-in .25s ease; min-width: 260px; }
.toast.error { background: var(--red); }
.toast.success i { color: var(--yellow); }
.toast.order { background: var(--yellow); color: #111; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------------- Modal ---------------- */
.modal-back { position: fixed; inset: 0; background: rgba(10,10,10,.55); backdrop-filter: blur(3px); z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-back.open { display: flex; }
.modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); animation: toast-in .2s ease; }
.modal.lg { max-width: 760px; }
.modal-h { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-h h3 { font-weight: 900; font-size: 18px; }
.modal-b { padding: 22px; }
.modal-f { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ---------------- Empty / misc ---------------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty i { font-size: 46px; color: var(--border); display: block; margin-bottom: 8px; }
.empty b { color: var(--text); display: block; font-size: 16px; margin-bottom: 4px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item b { display: block; font-weight: 800; }
.progress { height: 8px; background: var(--surface-3); border-radius: 8px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--yellow); border-radius: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; }
.kv dt { color: var(--muted); font-weight: 700; }
.kv dd { margin: 0; font-weight: 700; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.pagination { display: flex; gap: 6px; justify-content: center; padding: 16px; align-items: center; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-weight: 700; padding: 0 10px; }
.pagination .current { background: var(--yellow); border-color: var(--yellow); color: #111; }
.stock-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.stock-pill { display: flex; flex-direction: column; align-items: center; padding: 8px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); min-width: 84px; }
.stock-pill b { font-size: 22px; font-weight: 900; }
.stock-pill small { color: var(--muted); font-weight: 700; font-size: 11.5px; }

/* Category tree */
.cat-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.cat-emoji { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; flex-shrink: 0; overflow: hidden; }
.cat-emoji img { width: 100%; height: 100%; object-fit: cover; }
.subcats { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 16px; }
.subcat { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; font-weight: 700; font-size: 13px; }
.subcat a.e { color: var(--muted); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; }
.subcat a.e:hover { background: var(--surface-3); color: var(--text); }

/* Orders board */
.board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface-3); border-radius: var(--radius); padding: 10px; min-height: 300px; }
.col-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; font-weight: 800; }
.ocard { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.ocard:hover { border-color: var(--yellow); transform: translateY(-1px); }
.ocard .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ocard .no { font-weight: 900; font-size: 13px; }
.ocard .meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.ocard .total { font-weight: 900; font-size: 17px; margin-top: 6px; }
.ocard.new { border-inline-start: 4px solid var(--red); }

/* Timeline */
.timeline { position: relative; padding-inline-start: 22px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 14px; }
.tl-item::before { content: ""; position: absolute; inset-inline-start: -21px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--yellow); }
.tl-item b { display: block; }

/* Login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--black); }
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 60px; color: #fff; }
.auth-art::before { content: ""; position: absolute; inset-inline-start: -120px; bottom: -120px; width: 620px; height: 240px; background: var(--yellow); border-radius: 200px; transform: rotate(-16deg); }
.auth-art::after { content: ""; position: absolute; inset-inline-start: -160px; bottom: -40px; width: 620px; height: 70px; background: var(--red); border-radius: 200px; transform: rotate(-16deg); }
.auth-art .logo-xl { width: 130px; height: 130px; margin-bottom: 24px; }
.auth-art h1 { font-size: 64px; font-weight: 900; color: var(--yellow); line-height: 1; }
.auth-art .en { letter-spacing: 12px; font-weight: 900; font-size: 22px; margin-top: 8px; }
.auth-art p { font-size: 20px; color: #d4d4d8; margin-top: 18px; font-weight: 600; position: relative; z-index: 1; }
.auth-art .feat { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; position: relative; z-index: 1; }
.auth-art .feat span { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); padding: 6px 14px; border-radius: 30px; font-size: 13.5px; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.auth-art .feat i { color: var(--yellow); }
.auth-form { background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 40px 24px; border-start-start-radius: 40px; border-end-start-radius: 40px; }
.auth-form .box { width: 100%; max-width: 400px; }
.auth-form h2 { font-size: 28px; font-weight: 900; }

/* Receipt & labels (print) */
.print-only { display: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(100%); box-shadow: var(--shadow-lg); }
  [dir="ltr"] .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main { margin-inline-start: 0; }
  .topbar { padding: 0 16px; }
  .topbar .menu-btn { display: grid; }
  .content { padding: 18px 16px 60px; }
  .g-3, .g-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 36px 24px 70px; }
  .auth-art h1 { font-size: 46px; }
  .auth-form { border-radius: 30px 30px 0 0; margin-top: -30px; position: relative; }
  .search-box kbd { display: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; display: none; }
  .scrim.open { display: block; }
}
@media (max-width: 560px) {
  .g-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .value { font-size: 21px; }
  .kpi .ic { display: none; }
  .page-head h1 { font-size: 21px; }
  .top-actions .hide-sm { display: none; }
}
@media print {
  .sidebar, .topbar, .no-print, .toasts { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0 !important; }
  .card { box-shadow: none; border: 0; }
  body { background: #fff; }
  .print-only { display: block; }
}

/* ==========================================================
   طبقة الهوية — سلتي v2
   ========================================================== */
h1, h2, h3, .kpi .value, .grand b, .brand .name, .stock-pill b, .success-big, .ocard .total, .pp { font-family: var(--display); letter-spacing: 0; }
.kpi .value, .grand b, .pp, .ocard .total { font-weight: 700; }
::selection { background: var(--yellow); color: var(--ink); }

/* الشريط الجانبي: باذنجاني مع عناصر على شكل بطاقة سعر */
.sidebar { background: linear-gradient(180deg, var(--sidebar) 0%, #1A1030 100%); }
:root[data-theme="dark"] .sidebar { background: var(--sidebar); border-inline-end: 1px solid var(--border); }
.sidebar .brand { border-bottom-color: rgba(255,255,255,.07); }
.sidebar .brand::after { background: linear-gradient(90deg, var(--red) 0 30%, var(--yellow) 30%); height: 30px; bottom: -16px; opacity: 1; }
.brand .name { font-size: 28px; font-weight: 800; }
.nav-title { color: #8D82AA; font-weight: 600; font-size: 12px; letter-spacing: 0; }
.nav a { color: var(--sidebar-text); font-weight: 500; border-radius: 12px; }
.nav a i { color: #9F93C2; }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a:hover i { color: var(--yellow); }
.nav a.active {
  background: var(--yellow); color: var(--ink); font-weight: 700;
  border-radius: 12px 4px 4px 12px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
  padding-inline-start: 14px;
}
[dir="rtl"] .nav a.active { border-radius: 4px 12px 12px 4px; clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%); padding-inline-end: 22px; }
.nav a.active i { color: var(--ink); }
.nav a.pos-link { background: rgba(255,194,14,.1); border: 1px dashed rgba(255,194,14,.45); }
.nav a.pos-link i { color: var(--yellow); }
.nav a .count { background: var(--red); box-shadow: 0 0 0 3px rgba(224,48,63,.25); }
.sidebar .me { border-top-color: rgba(255,255,255,.07); }
.avatar { background: var(--yellow); color: var(--ink); font-family: var(--display); font-weight: 700; }

.topbar { background: color-mix(in srgb, var(--bg) 85%, transparent); border-bottom: 0; }
.icon-btn { border-radius: 14px; }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
:root[data-theme="dark"] .icon-btn:hover { border-color: var(--yellow); color: var(--yellow); }

/* ★ العنصر المميز: ترويسة الصفحة بلون الليل وشريط اللافتة المائل */
.page-head {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: #fff;
  border-radius: 26px; padding: 26px 30px; margin-bottom: 24px; align-items: center;
}
:root[data-theme="dark"] .page-head { background: linear-gradient(120deg, #2A1C47, #1C1330); border: 1px solid var(--border); }
.page-head::before, .page-head::after {
  content: ""; position: absolute; z-index: -1; transform: rotate(-11deg); border-radius: 60px;
}
.page-head::before { width: 340px; height: 44px; background: var(--yellow); inset-inline-end: -70px; bottom: 6px; }
.page-head::after  { width: 340px; height: 16px; background: var(--red); inset-inline-end: -64px; bottom: -14px; }
.page-head h1 { color: #fff; font-size: 30px; font-weight: 700; line-height: 1.25; }
.page-head h1 i { background: var(--yellow); color: var(--ink); border-radius: 14px; width: 44px; height: 44px; }
.page-head h1 .badge { font-family: var(--font); font-size: 13px; }
.page-head p { color: #C9BFE3; }
.page-head p b, .page-head p a { color: #fff; }
.page-head .crumbs { color: #A99DC9; }
.page-head .crumbs a:hover { color: var(--yellow); }
.page-head .actions { position: relative; z-index: 1; }
.page-head .btn:not(.btn-primary):not(.btn-danger) { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.16); }
.page-head .btn:not(.btn-primary):not(.btn-danger):hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); }
.page-head .btn-dark { background: #fff !important; color: var(--ink) !important; }
.page-head .tabs { background: rgba(255,255,255,.08); }
.page-head .tabs a { color: #C9BFE3; }
.page-head .tabs a.active { background: var(--yellow); color: var(--ink); }
.page-head .input { background: rgba(255,255,255,.95); border-color: transparent; }
.page-head .text-red { color: #FF8A94 !important; }

/* البطاقات */
.card { border-radius: var(--radius); border-color: var(--border); }
.card-h { border-bottom: 1px dashed var(--border); padding: 16px 20px; }
.card-h h3 { font-size: 17px; font-weight: 700; }
.card-h h3 i { color: var(--ink); background: var(--yellow-soft); width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 18px; }
:root[data-theme="dark"] .card-h h3 i { color: var(--yellow); }
.card-f { border-top: 1px dashed var(--border); background: var(--surface-2); }

/* مؤشرات الأداء: أرقام كبيرة بخط اللافتة */
.kpi { padding: 20px 22px; }
.kpi .label { font-weight: 500; color: var(--muted); }
.kpi .value { font-size: 34px; line-height: 1.15; color: var(--text); }
.kpi .ic { border-radius: 16px; }
.kpi.hero { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.kpi.hero .label, .kpi.hero .trend { color: rgba(34,22,58,.72) !important; }
.kpi.hero .value, .kpi.hero .value small { color: var(--ink); }
.kpi.hero::after { background: var(--ink); opacity: .9; height: 18px; width: 140px; bottom: -6px; inset-inline-start: -30px; }
:root[data-theme="dark"] .kpi.hero { background: var(--yellow); border-color: var(--yellow); }
.tone-yellow { background: var(--yellow-soft); color: var(--amber); }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-green { background: var(--mint); color: var(--green); }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-violet { background: var(--lilac); color: var(--violet); }
.tone-cyan { background: var(--cyan-soft); color: var(--cyan); }

/* الأزرار */
.btn { border-radius: 14px; font-weight: 600; }
.btn-primary { background: var(--yellow); border-color: var(--yellow); color: var(--ink); box-shadow: 0 6px 16px -6px rgba(240,168,0,.65); }
.btn-primary:hover { background: var(--yellow-600); border-color: var(--yellow-600); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* الحقول */
.input { border-radius: 14px; background: var(--surface); }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px var(--ring); }
:root[data-theme="dark"] .input:focus { border-color: var(--yellow); }
.form-section > h4 { font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--text); }
.form-section > h4::before { background: var(--red); width: 6px; border-radius: 3px; }
.field label { font-weight: 600; }

/* الجداول */
.table th { font-weight: 600; color: var(--muted); background: var(--surface-2); }
.table tbody tr:hover { background: color-mix(in srgb, var(--yellow) 7%, var(--surface)); }
.thumb { background: var(--surface-3); border-radius: 14px; }

/* التبويبات والشارات */
.tabs { background: var(--surface-3); border-radius: 14px; }
.tabs a { font-weight: 600; border-radius: 11px; }
.tabs a.active { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .tabs a.active { background: var(--yellow); color: var(--ink); }
.tabs a.active .n { background: var(--yellow); color: var(--ink); }
.badge { font-weight: 600; border-radius: 8px; }
.badge-yellow { background: var(--yellow); color: var(--ink); }
.chip { font-weight: 600; }
.chip.active, .chip:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* لوحة الطلبات */
.col { background: var(--surface-3); border-radius: 22px; }
.col-h { font-family: var(--display); font-size: 17px; font-weight: 700; }
.ocard { border-radius: 16px; }
.ocard:hover { border-color: var(--ink); }
.ocard.new { border-inline-start: 5px solid var(--red); }

/* شاشة الدخول */
.auth { background: var(--ink); }
.auth-art h1 { font-family: var(--display); font-size: 84px; font-weight: 800; }
.auth-art .feat span { background: rgba(255,255,255,.07); }
.auth-form h2 { font-family: var(--display); font-size: 34px; font-weight: 700; }

.toast { background: var(--ink); border-radius: 16px; }
.toast.order { background: var(--yellow); color: var(--ink); }
.progress > span { background: linear-gradient(90deg, var(--yellow), var(--yellow-600)); }
.pagination .current { background: var(--ink); border-color: var(--ink); color: #fff; }
.empty i { color: var(--surface-3); }

@media (max-width: 960px) {
  .page-head { padding: 20px; border-radius: 22px; }
  .page-head h1 { font-size: 24px; }
  .page-head::before { width: 200px; height: 30px; }
}

/* ==========================================================
   مركز التسويق
   ========================================================== */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.promo {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 20px; display: flex; flex-direction: column; gap: 12px; overflow: hidden;
}
.promo.off { opacity: .62; }
.promo .reward {
  align-self: flex-start; font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.2;
  padding: 6px 14px 4px; border-radius: 12px;
}
.promo .reward.free_delivery { background: var(--mint); color: var(--green); }
.promo .reward.percent { background: var(--yellow-soft); color: var(--amber); }
.promo .reward.fixed { background: var(--lilac); color: var(--violet); }
.promo h4 { margin: 0; font-size: 16px; font-weight: 700; }
.promo .cond { display: flex; flex-wrap: wrap; gap: 6px; }
.promo .cond span { font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 2px 9px; color: var(--text-2); }
.promo .foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed var(--border); padding-top: 12px; margin-top: auto; }
.promo .live { position: absolute; top: 18px; inset-inline-end: 18px; }
/* تذكرة الكوبون: حواف مثقبة */
.ticket {
  position: relative; display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
}
.ticket .stub {
  width: 132px; flex-shrink: 0; background: var(--ink); color: var(--yellow); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 14px 8px; font-family: var(--display); text-align: center;
}
.ticket .stub b { font-size: 26px; line-height: 1.1; font-weight: 700; }
.ticket .stub small { color: #C9BFE3; font-family: var(--font); font-size: 11.5px; }
.ticket .stub::after {
  content: ""; position: absolute; inset-block: 10px; inset-inline-start: 131px; border-inline-start: 2px dashed var(--border);
}
.ticket .body { flex: 1; padding: 14px 16px; min-width: 0; }
.ticket .code { font-size: 15px; letter-spacing: 1px; background: var(--yellow-soft); color: var(--ink); }
:root[data-theme="dark"] .ticket .code { color: var(--yellow); }
.ticket.off { opacity: .55; }
.ad-row { display: grid; grid-template-columns: 88px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.ad-row:last-child { border-bottom: 0; }
.ad-thumb { width: 88px; height: 64px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; color: #fff; font-family: var(--display); font-size: 13px; text-align: center; padding: 4px; line-height: 1.2; }
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; }
.meter { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.meter b { color: var(--text); font-family: var(--display); font-size: 15px; }

/* معاينة الهاتف */
.phone {
  width: 300px; height: 610px; border-radius: 46px; background: #0d0817; padding: 12px; position: sticky; top: 90px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #2a2040; margin-inline: auto;
}
.phone .screen { width: 100%; height: 100%; border-radius: 36px; overflow: hidden; position: relative; background: #F2F0F7; }
.phone .notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; background: #0d0817; border-radius: 20px; z-index: 5; }
.phone .fake-home { padding: 44px 14px 0; }
.phone .fake-head { background: var(--ink); border-radius: 0 0 22px 22px; margin: -44px -14px 12px; padding: 50px 14px 16px; color: #fff; font-family: var(--display); font-size: 18px; }
.phone .fake-search { height: 32px; background: #fff; border-radius: 10px; margin-top: 10px; }
.phone .fake-block { height: 70px; background: #E8E3F2; border-radius: 14px; margin-bottom: 10px; }
.phone .scrim { position: absolute; inset: 0; background: rgba(13, 8, 23, .55); display: grid; place-items: center; padding: 22px; }
.pv-popup { width: 100%; border-radius: 26px; overflow: hidden; box-shadow: 0 20px 40px -10px rgba(0,0,0,.5); position: relative; }
.pv-popup .pv-img { height: 190px; background: rgba(255,255,255,.08) center/cover no-repeat; display: grid; place-items: center; font-size: 50px; }
.pv-popup .pv-body { padding: 16px 18px 18px; text-align: center; }
.pv-popup h5 { margin: 0 0 4px; font-family: var(--display); font-size: 21px; line-height: 1.25; }
.pv-popup p { margin: 0 0 14px; font-size: 13px; opacity: .85; }
.pv-popup .pv-btn { background: var(--yellow); color: var(--ink); border-radius: 14px; padding: 10px; font-weight: 700; font-size: 14px; }
.pv-popup .pv-x { position: absolute; top: 10px; inset-inline-start: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; display: grid; place-items: center; }
.pv-banner { border-radius: 18px; height: 128px; padding: 16px; position: relative; overflow: hidden; background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: center; }
.pv-banner h5 { margin: 0; font-family: var(--display); font-size: 19px; line-height: 1.2; max-width: 70%; }
.pv-banner p { margin: 4px 0 0; font-size: 12px; max-width: 70%; }
.pv-link { margin-top: 12px; font-size: 12.5px; color: var(--muted); text-align: center; }
.check-list { display: flex; flex-wrap: wrap; gap: 6px; }
.check-list label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 30px; cursor: pointer; font-weight: 500; font-size: 13.5px; background: var(--surface); }
.check-list label:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.check-list input { accent-color: var(--yellow); }
.reward-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.reward-pick label { border: 2px solid var(--border); border-radius: 18px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.reward-pick label i { font-size: 26px; }
.reward-pick label b { font-family: var(--display); font-size: 17px; font-weight: 700; }
.reward-pick label small { color: var(--muted); }
.reward-pick label:has(input:checked) { border-color: var(--ink); background: var(--yellow-soft); }
.reward-pick input { display: none; }
.sentence { font-family: var(--display); font-size: 22px; line-height: 1.5; background: var(--ink); color: #fff; border-radius: 20px; padding: 18px 22px; }
.sentence b { color: var(--yellow); font-weight: 700; }
@media (max-width: 1100px) { .phone { position: static; } }
@media (max-width: 560px) { .reward-pick { grid-template-columns: 1fr; } .ad-row { grid-template-columns: 64px 1fr; } .ad-row > :last-child { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .kpi .value { font-size: 23px; word-break: break-all; }
  .kpi .value small { display: none; }
  .page-head .actions .btn { flex: 1; }
}

.page-head .btn:not(.btn-primary):not(.btn-danger):not(.btn-dark) { background: var(--ink-2); border-color: rgba(255,255,255,.18); }
.page-head .btn:not(.btn-primary):not(.btn-danger):not(.btn-dark):hover { background: var(--ink-3); }

/* سعر الصرف في الإعدادات */
.rate-now { display: flex; align-items: baseline; gap: 8px; font-weight: 700; color: var(--text-2); }
.rate-now b { font-family: var(--display); font-size: 40px; font-weight: 800; color: var(--text); letter-spacing: -.5px; }

/* الجرد */
.count-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 18px 0; }
.count-search { position: relative; flex: 1 1 320px; }
.count-search i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 20px; }
.count-search .input { padding-inline-start: 40px; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; cursor: pointer; }
.count-sum { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 18px; margin: 12px 18px 0; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.count-sum b { font-family: var(--display); font-size: 16px; }
.count-table .cnt { width: 92px; text-align: center; font-weight: 700; }
.count-table .cnt.is-bad { border-color: var(--red); background: var(--red-soft); }
.count-table tr.done td:first-child { box-shadow: inset -4px 0 0 var(--green); }
.count-table tr.has-diff td:first-child { box-shadow: inset -4px 0 0 var(--amber); }
.count-table tr.flash { animation: rowflash 1.2s; }
@keyframes rowflash { 0%, 60% { background: var(--yellow-soft); } }

/* حقوق المطوّر */
.dev-credit { display: flex; align-items: center; gap: 8px; margin: 8px 14px; padding: 6px 10px; border-radius: 12px; color: var(--sidebar-text); font-size: 11.5px; opacity: .75; transition: opacity .2s, background .2s; }
.dev-credit:hover { opacity: 1; background: rgba(255,255,255,.06); }
.dev-credit b { direction: ltr; unicode-bidi: isolate; }
.dev-credit.login { justify-content: center; margin: 14px 0 0; color: var(--muted); opacity: .9; }
