/* QR وصل — نظام التصميم. اتجاه RTL، خط Reem Kufi للعناوين وIBM Plex Sans Arabic للنص */

:root {
  --ink: #10252a;
  --ink-2: #3d555b;
  --muted: #5b7076;
  --line: #dce5e4;
  --line-strong: #b9c9c7;
  --paper: #f4f7f6;
  --surface: #ffffff;
  --brand: #0b6b63;
  --brand-strong: #07504a;
  --brand-soft: #e3f2f0;
  --saffron: #f2b33d;
  --saffron-soft: #fdf1d6;
  --danger: #b83227;
  --danger-soft: #fbe9e7;
  --ok: #1e7b4f;
  --ok-soft: #e1f4ea;
  --warn-ink: #7a5200;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --font-display: 'Reem Kufi', 'IBM Plex Sans Arabic', Tahoma, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  --container: 1120px;
  --focus: 0 0 0 3px rgba(11, 107, 99, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.35; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 700; letter-spacing: 0; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.num, .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.narrow { width: min(100% - 40px, 760px); margin-inline: auto; }

/* ------------------------------------------------------------------ الشعار */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-text { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; line-height: 1; }
.logo-qr { direction: ltr; unicode-bidi: isolate; letter-spacing: 0.02em; }
.logo-ar { color: var(--brand); }

/* ------------------------------------------------------------------ الرأس */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .bar { display: flex; align-items: center; gap: 28px; min-height: 66px; }
.nav { display: flex; gap: 22px; align-items: center; margin-inline-end: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--saffron); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.btn.menu-toggle { display: none; }

/* ------------------------------------------------------------------ الأزرار */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  padding: 12px 22px; border-radius: var(--radius-m); border: 2px solid var(--ink);
  background: var(--surface); color: var(--ink); transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { background: var(--brand-soft); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand-strong); color: #fff; box-shadow: 0 3px 0 var(--brand-strong); }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
.btn-primary:active { box-shadow: 0 1px 0 var(--brand-strong); transform: translateY(2px); }
.btn-ghost { border-color: var(--line-strong); background: transparent; }
.btn-danger { border-color: var(--danger); color: var(--danger); background: var(--surface); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 7px 14px; font-size: 0.9rem; border-width: 1.5px; border-radius: var(--radius-s); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ النماذج */
.field { margin-bottom: 18px; }
.field label, .label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--muted); font-size: 0.85rem; margin-inline-start: 6px; }
input[type='text'], input[type='email'], input[type='password'], input[type='url'], input[type='tel'], input[type='search'], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-s); padding: 11px 14px; min-height: 46px;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.7; }
input::placeholder, textarea::placeholder { color: #8a9c9f; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input[dir='ltr'], .ltr-input { direction: ltr; text-align: left; }
input[type='color'] { width: 46px; height: 46px; padding: 3px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; }
.hint { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.field-error, .form-error { color: var(--danger); font-size: 0.9rem; margin-top: 6px; }
.form-error { background: var(--danger-soft); border: 1px solid #f0c4be; padding: 10px 14px; border-radius: var(--radius-s); margin: 0 0 16px; }
.form-ok { background: var(--ok-soft); border: 1px solid #b7e0c9; color: var(--ok); padding: 10px 14px; border-radius: var(--radius-s); margin: 0 0 16px; }
.row { display: grid; gap: 16px; }
.row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }

.segmented { display: inline-flex; background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: var(--radius-m); padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { font: inherit; font-weight: 600; font-size: 0.92rem; border: 0; background: transparent; color: var(--ink-2); padding: 8px 16px; border-radius: 7px; cursor: pointer; }
.segmented button[aria-pressed='true'], .segmented button[aria-selected='true'] { background: var(--ink); color: #fff; }
.segmented button:hover:not([aria-pressed='true']):not([aria-selected='true']) { background: var(--brand-soft); }

/* ------------------------------------------------------------------ اللوحات */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 28px; }
.panel + .panel { margin-top: 20px; }
.panel h2, .panel h3 { margin-bottom: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.sheet { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius-l); box-shadow: 10px 10px 0 var(--brand-soft), 10px 10px 0 2px var(--ink); padding: 28px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; padding: 3px 11px; border-radius: 999px; background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: #b7e0c9; }
.badge-warn { background: var(--saffron-soft); color: var(--warn-ink); border-color: #f0d596; }
.badge-off { background: #eceff0; color: #5b6b6e; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: #f0c4be; }
.badge-brand { background: var(--brand); color: #fff; border-color: var(--brand); }
.badge-brand::before, .badge-plain::before { display: none; }

.notice { border-radius: var(--radius-m); padding: 14px 18px; background: var(--saffron-soft); border: 1px solid #f0d596; color: #5c3f00; margin-bottom: 20px; }
.notice a { color: inherit; font-weight: 600; }
.notice-info { background: var(--brand-soft); border-color: #bfdcd8; color: var(--brand-strong); }

.empty { text-align: center; padding: 56px 24px; border: 2px dashed var(--line-strong); border-radius: var(--radius-l); background: var(--surface); }
.empty h3 { margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 420px; margin-inline: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.data th { text-align: start; font-weight: 600; color: var(--muted); font-size: 0.85rem; padding: 8px 12px; border-bottom: 1.5px solid var(--line-strong); }
table.data td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

dialog { border: 2px solid var(--ink); border-radius: var(--radius-l); padding: 28px; max-width: 460px; width: calc(100% - 32px); color: var(--ink); font-family: var(--font-body); box-shadow: 10px 10px 0 rgba(16, 37, 42, 0.12); }
dialog::backdrop { background: rgba(16, 37, 42, 0.5); }
dialog h3 { margin-bottom: 10px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-start; margin-top: 20px; }

.toasts { position: fixed; inset-inline-start: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius-m); font-weight: 500; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); animation: toast-in .2s ease-out; }
.toast-error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.skeleton { background: linear-gradient(90deg, #e9efee 25%, #f4f7f6 50%, #e9efee 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius-s); min-height: 20px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ الصفحة الرئيسية */
.hero { position: relative; padding: 64px 0 80px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(#dfe9e7 1px, transparent 1px), linear-gradient(90deg, #dfe9e7 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; }
.hero-copy .lead { font-size: 1.18rem; color: var(--ink-2); max-width: 34em; margin: 18px 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 20px; color: var(--muted); font-size: 0.95rem; }

.studio { }
.studio-tabs { margin-bottom: 18px; }
.studio-body { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 22px; align-items: start; }
.studio-preview { text-align: center; }
.qr-frame { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 8px; aspect-ratio: 1; display: grid; place-items: center; width: 100%; }
.qr-frame svg { width: 100%; height: auto; display: block; }
.qr-frame.is-placeholder svg { opacity: 0.16; }
.qr-frame.is-large { max-width: 320px; margin-inline: auto; }
.studio-downloads { display: grid; gap: 8px; margin-top: 12px; }
.studio-options { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-top: 4px; }
.studio-options .field { margin: 0; }
.color-pair { display: flex; gap: 8px; }
.counter { font-size: 0.8rem; color: var(--muted); float: left; font-weight: 400; }

.section { padding: 80px 0; }
.section-white { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--ink-2); font-size: 1.08rem; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 2px solid var(--ink); border-radius: var(--radius-l); overflow: hidden; background: var(--surface); }
.compare > div { padding: 32px; }
.compare > div + div { border-inline-start: 2px solid var(--ink); background: var(--brand-soft); }
.compare h3 { display: flex; align-items: center; gap: 10px; }
.compare ul { margin: 14px 0 0; padding-inline-start: 20px; color: var(--ink-2); }
.compare li { margin-bottom: 6px; }
.flow { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px; }
.flow svg { width: 100%; height: auto; display: block; }
.flow text { font-family: var(--font-body); fill: var(--ink); }
.flow .mono { font-family: Consolas, 'Courier New', monospace; direction: ltr; }

.uses { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.use { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--line-strong); }
.use h3 { margin: 0; font-size: 1.5rem; }
.use p { margin: 0; color: var(--ink-2); max-width: 46em; }
.use .eg { display: block; margin-top: 8px; color: var(--muted); font-size: 0.95rem; }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 56px; }
.feature { border-top: 3px solid var(--saffron); padding-top: 16px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--ink-2); margin: 0; }

.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; max-width: 880px; }
.price-card { background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-l); padding: 32px; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--brand-soft), 8px 8px 0 2px var(--ink); }
.price-card .price { font-family: var(--font-display); font-size: 3rem; font-weight: 700; line-height: 1.1; margin: 8px 0 4px; }
.price-card .price small { font-family: var(--font-body); font-size: 1rem; font-weight: 400; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 10px; flex: 1; }
.price-card li { position: relative; padding-inline-start: 28px; }
.price-card li::before { content: ''; position: absolute; inset-inline-start: 0; top: 0.55em; width: 14px; height: 8px; border-inline-start: 3px solid var(--brand); border-bottom: 3px solid var(--brand); transform: rotate(-45deg) scaleX(-1); }
.price-card li.no { color: var(--muted); }
.price-card li.no::before { border: 0; width: 12px; height: 3px; background: var(--line-strong); transform: none; top: 0.85em; }

.faq details { border-bottom: 1px solid var(--line-strong); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--brand); font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); max-width: 46em; }

.cta-band { background: var(--ink); color: #fff; padding: 64px 0; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: #c7d6d4; margin-bottom: 24px; }
.cta-band .btn-primary { background: var(--saffron); border-color: var(--saffron); color: var(--ink); box-shadow: 0 3px 0 #b8841c; }
.cta-band .btn-primary:hover { background: #f7c35e; }

/* ------------------------------------------------------------------ التذييل */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 44px 0 28px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: 1rem; margin-bottom: 10px; font-family: var(--font-body); font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--brand); text-decoration: underline; }
.footer-note { color: var(--muted); font-size: 0.9rem; margin-top: 10px; max-width: 28em; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ الدخول والتسجيل */
.auth { padding: 56px 0 80px; }
.auth .sheet { width: min(100%, 480px); margin-inline: auto; }
.auth h1 { font-size: 1.9rem; margin-bottom: 6px; }
.auth .sub { color: var(--ink-2); margin-bottom: 24px; }
.auth .alt { text-align: center; margin: 22px 0 0; color: var(--ink-2); }
.company-fields { border: 1.5px dashed var(--line-strong); border-radius: var(--radius-m); padding: 16px 16px 2px; margin-bottom: 18px; background: var(--paper); }

/* ------------------------------------------------------------------ لوحة التحكم */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 66px); }
.sidebar { min-width: 0; background: var(--surface); border-inline-end: 1px solid var(--line); padding: 24px 16px; position: sticky; top: 66px; align-self: start; height: calc(100vh - 66px); display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.sidebar a.side-link { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-m); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.sidebar a.side-link:hover { background: var(--brand-soft); color: var(--ink); }
.sidebar a.side-link[aria-current='page'] { background: var(--ink); color: #fff; }
.side-link svg { width: 20px; height: 20px; flex: none; }
.side-foot { margin-top: auto; padding: 14px; border-radius: var(--radius-m); background: var(--paper); border: 1px solid var(--line); font-size: 0.9rem; }
.side-foot strong { display: block; word-break: break-all; }
.app-main { padding: 36px clamp(20px, 4vw, 48px) 80px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: 1.9rem; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--muted); }

.meter { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.meter.is-full > i { background: var(--saffron); }
.usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.usage .panel { padding: 18px 22px; margin: 0; }
.usage strong { font-size: 1.4rem; font-family: var(--font-display); }
.usage small { color: var(--muted); }

.qr-list { display: grid; gap: 12px; }
.qr-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 18px; text-decoration: none; color: inherit; }
.qr-row:hover { border-color: var(--brand); color: inherit; }
.qr-row .thumb { width: 76px; height: 76px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.qr-row .thumb svg { width: 100%; height: 100%; display: block; }
.qr-row h3 { margin: 0 0 2px; font-size: 1.1rem; font-family: var(--font-body); font-weight: 600; }
.qr-row .meta { color: var(--muted); font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-row .stat { text-align: center; min-width: 90px; }
.qr-row .stat b { display: block; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; }
.qr-row .stat span { font-size: 0.8rem; color: var(--muted); }
.qr-row .side { display: flex; align-items: center; gap: 18px; }

.type-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.type-card { text-align: start; font: inherit; color: inherit; cursor: pointer; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-l); padding: 22px; }
.type-card:hover { border-color: var(--brand); }
.type-card[aria-pressed='true'] { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--brand-soft), 6px 6px 0 2px var(--ink); }
.type-card h3 { margin-bottom: 4px; }
.type-card p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.new-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.sticky { position: sticky; top: 90px; }

.detail-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
.short-link { display: flex; gap: 8px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; margin-top: 14px; direction: ltr; }
.short-link code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.dl-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dl-row select { width: auto; min-height: 38px; padding: 6px 10px; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 18px; background: var(--surface); }
.tile small { color: var(--muted); display: block; }
.tile b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: 0.85rem; color: var(--muted); font-family: var(--font-body); font-weight: 400; }

.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar { fill: var(--brand); }
.chart .bar:hover, .chart .bar.is-hot { fill: var(--brand-strong); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 0.82rem; white-space: nowrap; transform: translate(-50%, -110%); z-index: 3; }
.breakdowns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 36px; }
.hbar { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hbar li { display: grid; grid-template-columns: minmax(80px, 36%) minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 0.92rem; }
.hbar .track { height: 10px; background: var(--paper); border-radius: 99px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--brand); border-radius: 99px; min-width: 4px; }
.hbar .v { text-align: end; font-variant-numeric: tabular-nums; font-weight: 600; }
.locked { border: 1.5px dashed var(--line-strong); border-radius: var(--radius-m); padding: 18px 20px; background: var(--paper); color: var(--ink-2); }
.locked strong { display: block; color: var(--ink); }

.bar-upload { height: 10px; background: var(--paper); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.bar-upload i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius-l); padding: 36px 20px; text-align: center; background: var(--surface); cursor: pointer; }
.dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }

.receipt { background: #fff; max-width: 720px; margin: 0 auto; border: 1px solid var(--line-strong); border-radius: var(--radius-l); padding: 40px; }
.receipt dl { display: grid; grid-template-columns: 160px 1fr; gap: 12px 20px; margin: 24px 0; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 600; }

.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-inline-start: 22px; }
.page-top { padding: 56px 0 24px; }
.page-top p { color: var(--ink-2); font-size: 1.1rem; max-width: 40em; }

.compare-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: start; border-bottom: 1px solid var(--line); }
.compare-table th { background: var(--paper); font-weight: 600; }
.compare-table td:not(:first-child), .compare-table th:not(:first-child) { width: 24%; }

/* ------------------------------------------------------------------ استجابة */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 10px 12px; border-inline-end: 0; border-bottom: 1px solid var(--line); gap: 6px; }
  .sidebar a.side-link { white-space: nowrap; padding: 9px 14px; }
  .side-foot { display: none; }
  .new-grid, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .use { grid-template-columns: 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .nav.is-open { display: grid; position: absolute; top: 66px; inset-inline: 0; background: var(--surface); padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 8px; }
  .btn.menu-toggle { display: inline-flex; margin-inline-start: auto; }
  .site-header .bar { gap: 12px; }
  .header-actions { margin-inline-start: 0; }
  .section { padding: 56px 0; }
  .compare, .features, .price-grid, .row-2, .row-3, .breakdowns, .type-pick { grid-template-columns: 1fr; }
  .compare > div + div { border-inline-start: 0; border-top: 2px solid var(--ink); }
  .studio-body { grid-template-columns: 1fr; }
  .studio-preview { max-width: 280px; margin-inline: auto; width: 100%; }
  .tiles { grid-template-columns: 1fr; }
  .qr-row { grid-template-columns: 60px minmax(0, 1fr); }
  .qr-row .thumb { width: 60px; height: 60px; }
  .qr-row .side { grid-column: 1 / -1; justify-content: space-between; }
  .receipt dl { grid-template-columns: 1fr; gap: 2px; }
  .receipt dd { margin-bottom: 10px; }
  .sheet { padding: 22px; box-shadow: 6px 6px 0 var(--brand-soft), 6px 6px 0 2px var(--ink); }
  .footer-grid { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .sidebar, .no-print, .toasts { display: none !important; }
  body { background: #fff; }
  .app { display: block; }
  .app-main { padding: 0; }
  .receipt { border: 0; padding: 0; }
}
