/* ============ Tokens — هادئ وعصري ============ */
:root {
  /* هوية «بطاقة»: نحاسي · خوخي · كريمي · بني */
  --bg: #fff7f0; --surface: #ffffff; --surface-2: #fbefe5; --surface-3: #f5e3d5;
  --text: #302018; --muted: #7a6556; --line: #f0e1d4;
  --primary: #ba4e2b; --primary-ink: #ffffff; --primary-soft: #fbe6dc; --primary-strong: #9a3e20;
  --accent: #f4bd8d; --accent-soft: #fdebdc; --accent-ink: #6b3a17;
  --ok: #3e8a5a; --ok-soft: #e6f3ea; --warn: #b7791f; --warn-soft: #fdf0d9; --bad: #c0392b; --bad-soft: #fbe7e3; --info-soft: #f6ece4;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(48,32,24,.04), 0 6px 24px -12px rgba(48,32,24,.14);
  --shadow-lg: 0 24px 60px -20px rgba(48,32,24,.38);
  --tabbar-h: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #1a120d; --surface: #231914; --surface-2: #2c201a; --surface-3: #382921; --text: #f6ece4; --muted: #b59e8e; --line: #3a2b22;
    --primary: #e07a55; --primary-ink: #1a120d; --primary-soft: #3a2318; --primary-strong: #ee9a79;
    --accent: #f4bd8d; --accent-soft: #3b2a1c; --accent-ink: #f4bd8d; --ok-soft: #173126; --warn-soft: #362a12; --bad-soft: #3a1915; --info-soft: #172631;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
    --bg: #1a120d; --surface: #231914; --surface-2: #2c201a; --surface-3: #382921; --text: #f6ece4; --muted: #b59e8e; --line: #3a2b22;
    --primary: #e07a55; --primary-ink: #1a120d; --primary-soft: #3a2318; --primary-strong: #ee9a79;
    --accent: #f4bd8d; --accent-soft: #3b2a1c; --accent-ink: #f4bd8d; --ok-soft: #173126; --warn-soft: #362a12; --bad-soft: #3a1915; --info-soft: #172631;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.6);
    color-scheme: dark;
}
:root[data-theme=light] { color-scheme: light; }

/* ============ Base ============ */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; text-rendering: optimizeLegibility; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1.08rem; } h3 { font-size: .98rem; }
p { margin: 0 0 .5rem; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); } .center { text-align: center; } .num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
code { background: var(--surface-2); border-radius: 6px; padding: 1px 6px; font-size: .86em; }
code.block { display: block; padding: 10px 12px; margin-top: 8px; overflow-x: auto; white-space: nowrap; }
::selection { background: var(--primary-soft); }

/* ============ Forms ============ */
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 11px 13px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:hover, select:hover, textarea:hover { background: var(--surface-3); }
input:focus, select:focus, textarea:focus { background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
input[type=color] { padding: 4px; height: 44px; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
input[type=file] { padding: 9px; }
textarea { resize: vertical; }
label { display: block; font-weight: 500; font-size: .88rem; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 6px; font-weight: 400; font-size: .95rem; color: var(--text); }
label > small { display: block; margin-top: 4px; }
label.check, .check { display: flex; gap: 9px; align-items: center; font-weight: 400; color: var(--text); font-size: .92rem; }
label.inline { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; }
label.inline input { width: 80px; padding: 6px 10px; margin: 0; }
.lbl { display: block; color: var(--muted); font-weight: 500; font-size: .88rem; margin-bottom: 8px; }
.form > * + * { margin-top: 14px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .split3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.split > *, .split3 > * { margin-top: 0 !important; }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: .92rem; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer; transition: background .15s, transform .06s, border-color .15s, opacity .15s; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); } .btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 12px; font-size: .84rem; border-radius: 10px; } .btn.lg { padding: 13px 24px; font-size: 1rem; border-radius: 14px; }
.btn.block { width: 100%; } .btn.icon { padding: 8px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ============ Feedback ============ */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; background: var(--info-soft); font-size: .92rem; }
.alert.success { background: var(--ok-soft); color: var(--ok); } .alert.error { background: var(--bad-soft); color: var(--bad); }
.tag { display: inline-flex; align-items: center; font-size: .74rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); margin-inline-end: 4px; white-space: nowrap; }
.tag.ok, .tag.active { background: var(--ok-soft); color: var(--ok); }
.tag.expiring { background: var(--warn-soft); color: var(--warn); }
.tag.expired, .tag.suspended { background: var(--bad-soft); color: var(--bad); }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 28px; font-size: .9rem; flex-wrap: wrap; }
.banner span { display: inline-flex; gap: 6px; align-items: center; }
.banner.imp { background: var(--accent-soft); color: var(--text); } .banner.warn { background: var(--warn-soft); color: var(--warn); }

/* ============ Shell ============ */
.shell { display: flex; min-height: 100vh; }
.bq-rail { width: 248px; flex-shrink: 0; background: var(--surface); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; z-index: 30; }
.brand { display: flex; gap: 11px; align-items: center; padding: 2px 8px 22px; }
.brand b { display: block; font-size: 1.08rem; } .brand small { color: var(--muted); display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--primary-strong)); color: var(--primary-ink); display: grid; place-items: center; flex-shrink: 0; }
.bq-rail nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.bq-rail nav a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; transition: background .15s, color .15s; }
.bq-rail nav a:hover { background: var(--surface-2); color: var(--text); }
.bq-rail nav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.bq-rail-foot { border-top: 1px solid var(--line); padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.me { display: flex; gap: 10px; align-items: center; min-width: 0; } .me b { display: block; font-size: .9rem; } .me small { color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.avatar.sm { width: 30px; height: 30px; font-size: .85rem; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 18px 28px 8px; position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); }
.top h1 { font-size: 1.3rem; margin: 0; flex: 1; }
.menu-btn { display: none; }
.content { padding: 10px 28px 60px; width: 100%; max-width: 1240px; }
.scrim { display: none; }
.tabbar { display: none; }

/* ============ Panels & layout ============ */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.panel.flush { padding: 0; overflow-x: auto; } .pad { padding: 18px 20px 0; }
.panel.narrow { max-width: 520px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; } .panel-h h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; align-items: start; }
.grid2 > .panel, .grid2 > div > .panel:last-child { margin-bottom: 0; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.row-start { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-center { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar p { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; align-items: center; }
.filters input { max-width: 300px; } .filters select { max-width: 190px; width: auto; }
.empty { text-align: center; padding: 48px 20px; border: 1.5px dashed var(--line); border-radius: var(--radius); margin-bottom: 18px; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .88rem; margin-bottom: 12px; }
[dir=rtl] .back svg { transform: scaleX(-1); }
.kv { margin: 0; display: grid; gap: 2px; } .kv div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); } .kv div:last-child { border: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; }

/* ============ Stats & lists ============ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: inherit; }
a.stat:hover { border-color: var(--primary); }
.stat small { color: var(--muted); } .stat b { display: block; font-size: 1.75rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.35; } .stat span { font-size: .8rem; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar i { display: block; width: 100%; max-width: 24px; min-height: 3px; border-radius: 6px 6px 3px 3px; background: linear-gradient(var(--primary), color-mix(in srgb, var(--primary) 60%, transparent)); }
.bar small { color: var(--muted); font-size: .68rem; }
.feed { list-style: none; margin: 0; padding: 0; } .feed li { padding: 10px 0; border-bottom: 1px solid var(--line); } .feed li:last-child { border: 0; }
.feed small { display: block; }
.list { list-style: none; margin: 0 0 6px; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li small { display: block; } .list li > a { display: flex; align-items: center; gap: 10px; color: inherit; min-width: 0; }
.who-row { display: flex; gap: 10px; align-items: center; min-width: 0; }
.status-list { list-style: none; padding: 0; margin: 0; } .status-list li { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: .9rem; }
.status-list li b { display: block; } .status-list .ok { background: var(--ok-soft); } .status-list .bad { background: var(--bad-soft); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 13px 16px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .78rem; color: var(--muted); font-weight: 600; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); } .table tr[data-href] { cursor: pointer; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; overflow-x: auto; padding: 4px; background: var(--surface-2); border-radius: 14px; width: fit-content; max-width: 100%; scrollbar-width: none; }
.tabs a { padding: 8px 16px; color: var(--muted); font-weight: 600; font-size: .9rem; border-radius: 10px; white-space: nowrap; }
.tabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; margin-bottom: 16px; }
.seg-tabs a { padding: 6px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: .88rem; }
.seg-tabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ============ Dashboard ============ */
.greet { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.greet h2 { font-size: 1.35rem; margin: 0; } .greet p { margin: 0; }
.quick { display: flex; gap: 10px; flex-wrap: wrap; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; padding: 14px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--text); font-size: .82rem; font-weight: 600; transition: border-color .15s, transform .15s; }
.qa svg { color: var(--primary); } .qa:hover { border-color: var(--primary); transform: translateY(-1px); }
.onboard { background: linear-gradient(135deg, var(--primary-soft), var(--surface) 70%); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.ob-head { display: flex; justify-content: space-between; align-items: center; } .ob-head h2 { margin: 0; }
.ob-bar { height: 6px; background: var(--surface-2); border-radius: 99px; margin: 10px 0 16px; overflow: hidden; } .ob-bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.ob-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ob-steps a { display: block; height: 100%; background: var(--surface); border-radius: 14px; padding: 14px; color: var(--text); border: 1px solid var(--line); }
.ob-steps a:hover { border-color: var(--primary); } .ob-steps b, .ob-steps small { display: block; } .ob-steps small { color: var(--muted); }
.ob-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-weight: 700; margin-bottom: 8px; font-size: .88rem; }
.ob-steps .done a { opacity: .6; } .ob-steps .done .ob-n { background: var(--ok); color: #fff; }

/* ============ Admin ============ */
.cat { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); display: inline-grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.cat.big { width: 52px; height: 52px; font-size: 1.6rem; border-radius: 16px; }
.biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.biz-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--text); transition: border-color .15s, transform .15s; }
.biz-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.bc-top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 6px; }
.biz-card > b { font-size: 1.02rem; } .biz-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-meta { display: flex; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.hero-card { display: flex; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; flex-wrap: wrap; }
.hc-body { flex: 1; min-width: 200px; } .hc-body h2 { font-size: 1.25rem; margin: 0 0 2px; } .hc-body p { margin: 0; }
.hc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.creds { background: var(--accent-soft); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; display: grid; gap: 8px; }
.creds-row { display: flex; gap: 12px; align-items: center; } .creds-row span { width: 80px; color: var(--muted); font-size: .88rem; } .creds-row code { background: var(--surface); padding: 4px 10px; }
.creds .btn { justify-self: start; }
.quick-extend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.cat-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt input { position: absolute; opacity: 0; }
.chip-opt span { display: inline-block; padding: 7px 14px; border-radius: 99px; background: var(--surface-2); color: var(--text); font-weight: 500; cursor: pointer; border: 1.5px solid transparent; font-size: .9rem; }
.chip-opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.chip-opt input:focus-visible + span { outline: 2px solid var(--primary); }
.step-mini { display: grid; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.step-mini h3 { margin: 0; color: var(--muted); font-size: .85rem; font-weight: 600; }

/* ============ Tasks ============ */
.quick-add { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.quick-add input[name=title] { flex: 1 1 260px; }
.quick-add select, .quick-add input[type=date], .quick-add .dt-wrap { width: auto; flex: 0 1 160px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--surface-2); border-radius: var(--radius); padding: 12px; min-height: 120px; }
.col h3 { display: flex; align-items: center; gap: 8px; font-size: .92rem; padding: 4px 6px 10px; margin: 0; }
.col h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.col-doing h3::before { background: var(--accent); } .col-done h3::before { background: var(--ok); }
.count { font-size: .75rem; color: var(--muted); background: var(--surface); padding: 0 8px; border-radius: 99px; }
.col-empty { color: var(--muted); font-size: .85rem; text-align: center; padding: 18px 0; margin: 0; }
.task { background: var(--surface); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-inline-start: 3px solid var(--line); }
.task.prio-high { border-inline-start-color: var(--bad); } .task.prio-low { opacity: .85; }
.col-done .task { opacity: .7; } .col-done .task b { text-decoration: line-through; text-decoration-color: var(--muted); }
.task-h { display: flex; justify-content: space-between; align-items: start; gap: 6px; } .task-h b { font-weight: 600; font-size: .94rem; }
.task-d { color: var(--muted); font-size: .85rem; margin: 4px 0 0; }
.task-m { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: .8rem; color: var(--muted); }
.who { display: inline-flex; align-items: center; gap: 5px; } .who i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: .7rem; font-weight: 700; }
.due.over { color: var(--bad); font-weight: 600; }
.task-a { display: flex; gap: 6px; margin-top: 10px; }

/* ============ Card editor ============ */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.preview-col .sticky { position: sticky; top: 84px; }
.preview-col .wpass { margin: 0 0 12px; }
.steps { display: grid; gap: 14px; } .steps > * + * { margin-top: 0; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 14px; }
.step h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.02rem; }
.step h3 span { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: .82rem; }
details.more-step { display: block; } details.more-step[open] > *:not(summary) { margin-top: 14px; }
details summary { cursor: pointer; list-style: none; } details summary::-webkit-details-marker { display: none; }
.more summary { color: var(--primary); font-size: .86rem; margin-top: 4px; font-weight: 500; }
.more[open] > * + * { margin-top: 12px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.sw { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--surface); cursor: pointer; padding: 0; background: linear-gradient(135deg, var(--a) 55%, var(--b) 55%); box-shadow: 0 0 0 1px var(--line); transition: transform .12s; }
.sw:hover { transform: scale(1.08); } .sw.on { box-shadow: 0 0 0 2px var(--primary); }
.savebar { position: sticky; bottom: var(--tabbar-h); display: flex; align-items: center; gap: 14px; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 40%); z-index: 5; }
.autos { display: grid; gap: 10px; }
.auto { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.auto summary { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.auto-t { min-width: 0; flex: 1; } .auto-t b { display: block; font-weight: 600; }
.auto-t small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auto:not(.on) .auto-t { opacity: .5; }
.auto-body { padding: 0 16px 16px; display: grid; gap: 10px; }
.push-end { margin-inline-start: auto; }
.lead { font-size: 1rem; color: var(--muted); margin: 0 0 16px; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
button.var { font: inherit; font-size: .8rem; border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 99px; padding: 4px 11px; cursor: pointer; }
button.var:hover { color: var(--primary); border-color: var(--primary); }
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: var(--surface-3); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--primary); } .switch input:checked + i::after { inset-inline-start: 21px; }
.map { height: 320px; border-radius: 14px; border: 1px solid var(--line); z-index: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.card-tile { display: block; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px; transition: transform .15s, border-color .15s; }
.card-tile:hover { transform: translateY(-2px); border-color: var(--primary); }
.ct-meta { padding: 12px 4px 2px; } .ct-meta b { margin-inline-end: 6px; } .ct-meta small { display: block; }

.modal { border: 0; border-radius: 22px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.modal.wide { width: min(760px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(17,21,19,.45); backdrop-filter: blur(4px); }
.modal form { padding: 22px; } .modal form > * + * { margin-top: 14px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; } .modal-h h2 { margin: 0; }
.modal[open] { animation: pop .18s ease-out; } @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.type-opt input { position: absolute; opacity: 0; }
.type-opt span { display: block; height: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 8px; cursor: pointer; text-align: center; color: var(--text); font-weight: 400; transition: border-color .15s, background .15s; }
.type-opt em { font-style: normal; font-size: 1.5rem; display: block; } .type-opt b { display: block; } .type-opt small { color: var(--muted); display: block; line-height: 1.4; }
.type-opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); }

.copy { display: flex; gap: 8px; margin-top: 10px; } .copy input { flex: 1; min-width: 0; }
.qr { display: inline-block; background: #fff; padding: 10px; border-radius: 12px; line-height: 0; }
.qr img, .qr canvas { width: 100%; height: auto; image-rendering: pixelated; }
.qr.big { width: 250px; margin: 12px auto; display: block; }
.seg { display: flex; gap: 18px; } .seg label { display: flex; gap: 6px; align-items: center; font-weight: 400; color: var(--text); }
.when-later { display: none; } #campForm.later .when-later { display: block; }
.lock { background: linear-gradient(160deg, #302018, #ba4e2b 58%, #f4bd8d); border-radius: 30px; padding: 30px 14px 60px; color: #fff; text-align: center; }
.lock-time { font-size: 3.2rem; font-weight: 300; margin-bottom: 18px; direction: ltr; }
.notif { background: rgba(255,255,255,.85); color: #111; text-align: start; border-radius: 16px; padding: 10px 12px; backdrop-filter: blur(10px); }
.notif b, .notif span, .notif small { display: block; } .notif small { color: #555; font-size: .72rem; } .notif span { font-size: .9rem; word-break: break-word; }
.pass-row { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.pr-body > * + * { margin-top: 10px; }

/* ============ Scanner ============ */
.scan-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.cam { position: relative; aspect-ratio: 1; background: #141a18; border-radius: 18px; overflow: hidden; display: grid; place-items: center; margin-bottom: 10px; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-frame { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.9); border-radius: 22px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.cam .btn { position: relative; z-index: 2; } .cam.live .btn { display: none; }
.sr-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.sr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 14px 0; }
.sr-stats div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; } .sr-stats small { color: var(--muted); display: block; } .sr-stats b { font-size: 1.25rem; }
.sr-actions { display: grid; gap: 10px; margin-bottom: 12px; }
.sr-act { display: flex; gap: 8px; } .sr-act input { max-width: 150px; } .sr-act .btn { flex: 1; padding: 15px; font-size: 1.05rem; }
.flash-ok { animation: okpulse .6s; } @keyframes okpulse { 0% { box-shadow: 0 0 0 0 rgba(47,138,90,.45); } 100% { box-shadow: 0 0 0 18px rgba(47,138,90,0); } }

/* ============ Pass preview ============ */
.wpass { --pbg: #1f2937; --pfg: #fff; --plabel: #fbbf24; background: var(--pbg); color: var(--pfg); border-radius: 18px; padding: 14px 16px 16px; box-shadow: 0 14px 34px -14px rgba(0,0,0,.4); max-width: 340px; margin-inline: auto; font-size: 14px; overflow: hidden; }
.wp-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 34px; }
.wp-logo { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.wp-logo img { max-height: 30px; max-width: 90px; object-fit: contain; } .wp-logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-header { display: flex; gap: 12px; text-align: end; }
.wpass small { display: block; color: var(--plabel); font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.wpass b { font-weight: 500; font-size: 15px; }
.wp-strip { margin: 12px -16px; min-height: 90px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.wp-strip img { width: 100%; height: 110px; object-fit: cover; }
.wp-strip.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 12px 18px; background: rgba(0,0,0,.12); }
.wp-strip.stamps[data-required="6"], .wp-strip.stamps[data-required="12"] { grid-template-columns: repeat(6, 1fr); }
.wp-strip.stamps[data-required="8"], .wp-strip.stamps[data-required="4"] { grid-template-columns: repeat(4, 1fr); }
.wp-strip.stamps i { aspect-ratio: 1; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--pfg) 45%, transparent); background: color-mix(in srgb, var(--pfg) 10%, transparent); position: relative; max-width: 46px; justify-self: center; width: 100%; }
.wp-strip.stamps i.on { background: var(--plabel); border-color: var(--plabel); }
.wp-strip.stamps i.on::after { content: ""; position: absolute; inset: 18% 39% 30% 37%; border: solid var(--pbg); border-width: 0 3px 3px 0; border-radius: 1px; transform: rotate(45deg); }
.wp-strip.stamps i.last:not(.on)::after { content: "★"; position: absolute; inset: 0; display: grid; place-items: center; color: color-mix(in srgb, var(--pfg) 55%, transparent); font-size: 15px; }
.wp-primary { margin: 14px 0 8px; } .wp-primary b { font-size: 28px; font-weight: 400; line-height: 1.2; }
.wp-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-top: 10px; }
.wp-f b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-qr { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wp-qr .qr { width: 150px; } .wp-qr small { color: var(--pfg); opacity: .8; letter-spacing: .15em; direction: ltr; }
.qr-ph { width: 104px; height: 104px; background: #fff; border-radius: 10px; padding: 10px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.qr-ph i { background: #111; border-radius: 1px; } .qr-ph i:nth-child(3n), .qr-ph i:nth-child(5n+1) { background: transparent; }

/* ============ Public / auth ============ */
.public, .auth, .landing { background: radial-gradient(900px 500px at 85% -10%, var(--primary-soft), transparent 70%), radial-gradient(700px 400px at -10% 20%, var(--accent-soft), transparent 70%), var(--bg); min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 30px 26px; box-shadow: var(--shadow); }
.auth-box > * + * { margin-top: 16px; } .auth-box h1 { font-size: 1.45rem; margin: 0; } .auth-box p { margin: 4px 0 0; }
.auth > .auth-box { margin: 10vh auto; }
.lock-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--bad-soft); color: var(--bad); display: grid; place-items: center; margin: 0 auto; }
.l-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.12rem; color: var(--text); }
.pub { max-width: 960px; margin: 0 auto; padding: 40px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; min-height: 100vh; }
.pub-form { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px; box-shadow: var(--shadow); }
.pub-form > * + * { margin-top: 14px; } .pub-form h1 { font-size: 1.45rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.wallet-btns { display: grid; gap: 10px; }
.wallet-btn { display: flex; align-items: center; justify-content: center; gap: 12px; background: #000; color: #fff; border-radius: 14px; padding: 10px 18px; min-height: 56px; font-weight: 600; font-size: 1.1rem; }
.wallet-btn span { display: flex; flex-direction: column; line-height: 1.15; text-align: start; } .wallet-btn small { font-size: .72rem; font-weight: 400; opacity: .85; }
.wallet-btn.google { background: #1f1f1f; }
.help summary { color: var(--muted); }

/* Landing */
.l-nav { max-width: 1160px; margin: 0 auto; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.l-nav-links { display: flex; gap: 6px; align-items: center; }
.hero { max-width: 1160px; margin: 0 auto; padding: 40px 20px 70px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px; font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.22; font-weight: 700; letter-spacing: -.02em; } .hero h1 span { color: var(--primary); }
.hero p.lead-lg { font-size: 1.12rem; color: var(--muted); max-width: 560px; margin-top: 14px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-art { position: relative; }
.hero-art .wpass { transform: rotate(-3deg); }
.hero-art .float-note { position: absolute; bottom: -18px; inset-inline-start: -10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow-lg); max-width: 250px; font-size: .86rem; }
.hero-art .float-note b { display: block; }
.section { max-width: 1160px; margin: 0 auto; padding: 60px 20px; }
.section-h { text-align: center; max-width: 640px; margin: 0 auto 36px; } .section-h h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; } .section-h p { color: var(--muted); }
.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: how; }
.how-step { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; position: relative; }
.how-step::before { counter-increment: how; content: counter(how); position: absolute; top: 18px; inset-inline-end: 20px; font-size: 2.2rem; font-weight: 700; color: var(--surface-3); line-height: 1; }
.how-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 14px; }
.how-step p { color: var(--muted); margin: 0; font-size: .92rem; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.role { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.role h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; } .role ul { margin: 12px 0 0; padding-inline-start: 18px; color: var(--muted); } .role li { margin-bottom: 6px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; } .feat p { margin: 0; color: var(--muted); }
.feat em { font-style: normal; font-size: 1.5rem; display: block; margin-bottom: 8px; }
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; }
.faq summary { font-weight: 600; display: flex; justify-content: space-between; gap: 10px; } .faq summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; } .faq details p { margin: 10px 0 0; color: var(--muted); }
.cta-band { background: linear-gradient(135deg, var(--primary), var(--primary-strong)); color: var(--primary-ink); border-radius: 28px; padding: 44px 28px; text-align: center; }
.cta-band h2 { font-size: clamp(1.4rem, 3vw, 2rem); } .cta-band p { opacity: .85; } .cta-band .btn { background: var(--primary-ink); color: var(--primary); border: 0; margin-top: 12px; }
.l-foot { text-align: center; color: var(--muted); padding: 30px; font-size: .88rem; }


/* ============ اللغات والخطوط ============ */
.lang-ar { font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; }
.lang-ckb { font-family: "Vazirmatn", "Noto Sans Arabic", system-ui, -apple-system, Tahoma, sans-serif; line-height: 1.8; }
.lang-ckb h1, .lang-ckb h2, .lang-ckb h3 { line-height: 1.5; letter-spacing: 0; }
.lang-en { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.55; font-feature-settings: "cv11", "ss01"; }
.lang-en h1, .lang-en h2 { letter-spacing: -.02em; }
.lang-en .hero h1 { line-height: 1.12; }
[dir=ltr] .bq-rail { border-inline-start: 0; border-inline-end: 1px solid var(--line); }
.lang-sw { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 12px; font-size: .8rem; }
.lang-sw a { padding: 4px 10px; border-radius: 9px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.lang-sw a:hover { color: var(--text); } .lang-sw a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.lang-sw a[lang=ckb] { font-family: "Vazirmatn", Tahoma, sans-serif; } .lang-sw a[lang=ar] { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; } .lang-sw a[lang=en] { font-family: "Inter", system-ui, sans-serif; }
.lang-sw.center { display: flex; justify-content: center; width: fit-content; margin-inline: auto; }
.bq-rail-lang { display: flex; margin: 10px 4px 12px; } .bq-rail-lang a { flex: 1; text-align: center; }
.lang-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lang-card input { position: absolute; opacity: 0; }
.lang-card span { display: block; text-align: center; padding: 14px 6px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--text); }
.lang-card b { display: block; font-size: 1.05rem; } .lang-card small { color: var(--muted); font-size: .72rem; }
.lang-card.lang-ckb b { font-family: "Vazirmatn", Tahoma, sans-serif; } .lang-card.lang-en b { font-family: "Inter", system-ui, sans-serif; } .lang-card.lang-ar b { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.lang-card input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.lang-card input:focus-visible + span { outline: 2px solid var(--primary); }

/* ============ مكوّنات إضافية ============ */
.crumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .86rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--primary); } .crumbs b { color: var(--text); font-weight: 600; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; align-content: start; }
.person.off { opacity: .6; } .person .who-row b { display: block; } .person .who-row small { display: block; overflow: hidden; text-overflow: ellipsis; }
.person-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.person-a { display: flex; flex-wrap: wrap; gap: 4px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-opt input { position: absolute; opacity: 0; }
.role-opt span { display: block; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--text); height: 100%; }
.role-opt b { display: block; } .role-opt small { color: var(--muted); }
.role-opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.wizard-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; font-size: .8rem; flex-wrap: wrap; }
.wizard-steps li { padding: 4px 12px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.wizard-steps li.on { background: var(--primary-soft); color: var(--primary); }
.hint-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px dashed var(--primary); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; color: var(--text); }
.hint-card b, .hint-card small { display: block; } .hint-card .cat { color: var(--primary); background: var(--primary-soft); }
.stats.three { grid-template-columns: repeat(3, 1fr); } .stat b.sm { font-size: 1rem; padding-top: 6px; }
.panel.span2 { grid-column: 1 / -1; }
.seg-tabs.wrap { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.pw { position: relative; display: block; margin-top: 6px; } .pw input { margin: 0; padding-inline-end: 44px; }
.pw-eye { position: absolute; inset-block: 0; inset-inline-end: 4px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 8px; }
.share .copy { max-width: 440px; margin-inline: auto; }
@media (max-width: 760px) {
  [dir=ltr] .bq-rail { inset: 0 auto 0 0; transform: translateX(-100%); }
  [dir=ltr] .bq-rail.open { transform: none; }
  .stats.three { grid-template-columns: 1fr 1fr 1fr; }
  .role-pick, .lang-cards { grid-template-columns: 1fr; }
  .l-nav-links .lang-sw { display: none; }
}

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .editor, .scan-wrap, .pass-row { grid-template-columns: minmax(0, 1fr); }
  .preview-col .sticky { position: static; }
  .how { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .grid2, .board, .roles { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .ob-steps, .type-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --tabbar-h: calc(64px + env(safe-area-inset-bottom)); }
  .bq-rail { position: fixed; inset: 0 0 0 auto; height: 100%; transform: translateX(100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); width: min(290px, 86vw); }
  .bq-rail.open { transform: none; }
  .bq-rail.open + .scrim { display: block; position: fixed; inset: 0; background: rgba(17,21,19,.4); z-index: 25; }
  .menu-btn { display: inline-flex; }
  .top { padding: 12px 16px 6px; } .top h1 { font-size: 1.12rem; } .top-scan { display: none; }
  .banner { padding: 10px 16px; }
  .content { padding: 8px 16px calc(var(--tabbar-h) + 28px); }
  .tabbar { display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 20; height: var(--tabbar-h); padding: 6px 6px env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font: inherit; font-size: .7rem; font-weight: 600; background: none; border: 0; cursor: pointer; border-radius: 12px; }
  .tabbar a.on { color: var(--primary); }
  .tabbar a.fab svg { background: var(--primary); color: var(--primary-ink); border-radius: 14px; padding: 7px; width: 38px; height: 38px; margin-top: -10px; box-shadow: 0 6px 16px -6px var(--primary); }
  .split, .split3, .pub, .hero, .features, .how, .quick-extend { grid-template-columns: minmax(0, 1fr); }
  .stats { gap: 10px; } .stat { padding: 14px; } .stat b { font-size: 1.45rem; }
  .panel { padding: 16px; border-radius: 16px; }
  .greet { align-items: flex-start; } .quick { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .qa { width: auto; padding: 12px 4px; }
  .pub { min-height: 0; padding-top: 24px; gap: 20px; }
  .hero { padding-top: 16px; gap: 30px; } .hero-art { order: -1; max-width: 340px; margin: 0 auto; } .hero-art .float-note { display: none; }
  .section { padding: 40px 16px; }
  .table th, .table td { padding: 10px 12px; }
  .filters input, .filters select { max-width: none; flex: 1 1 140px; }
  .quick-add select, .quick-add input[type=date] { flex: 1 1 120px; }
  .tabs { width: 100%; }
  .modal { border-radius: 22px 22px 0 0; margin: auto auto 0; width: 100vw; max-width: 100vw; max-height: 92vh; }
  .l-nav-links .btn.ghost { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===================================================================
   v4 — لوحات عائمة: قائمة جانبية وشريط علوي منفصلان بمسافة بينهما
   =================================================================== */
:root { --gap: 16px; --panel-shadow: 0 1px 2px rgba(31,41,37,.04), 0 10px 30px -18px rgba(31,41,37,.18); }
.shell { gap: var(--gap); padding: var(--gap); align-items: flex-start; background:
  radial-gradient(800px 400px at 100% 0, color-mix(in srgb, var(--primary-soft) 70%, transparent), transparent 70%), var(--bg); }

/* القائمة الجانبية */
.bq-rail { position: sticky; top: var(--gap); height: calc(100vh - var(--gap) * 2); width: 252px; padding: 18px 12px 12px;
  border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--panel-shadow); background: var(--surface); }
[dir=ltr] .bq-rail { border-inline-end: 1px solid var(--line); }
.brand { padding: 2px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; position: relative; }
.bq-rail-close { display: none; margin-inline-start: auto; }
.nav-cap { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; padding: 0 12px 6px; text-transform: uppercase; }
.bq-rail nav { gap: 3px; }
.bq-rail nav a { padding: 10px 12px; border-radius: 14px; position: relative; }
.bq-rail nav a.on { background: var(--primary); color: var(--primary-ink); box-shadow: 0 8px 18px -10px var(--primary); }
.bq-rail nav a.on svg { color: var(--primary-ink); }
.bq-rail-card { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 16px; background: var(--surface-2); margin-top: 12px; }
.bq-rail-card .cat { background: var(--surface); width: 36px; height: 36px; font-size: 1.05rem; color: var(--primary); }
.bq-rail-card b { display: block; font-size: .88rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.bq-rail-card small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .74rem; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.active { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); } .dot.expiring { background: var(--warn); } .dot.expired, .dot.suspended { background: var(--bad); }

/* المحتوى */
.main { gap: 0; }
.content { padding: 0 4px 40px; max-width: 1240px; }

/* الشريط العلوي — شريط واحد هادئ: العنوان يميناً، والإجراءات في مجموعة مدمجة يساراً */
.top { position: sticky; top: var(--gap); z-index: 15; margin-bottom: var(--gap); padding: 8px 10px 8px 20px; gap: 16px; min-height: 60px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 20px; box-shadow: 0 1px 2px rgb(0 0 0 / .03), 0 8px 24px -14px rgb(0 0 0 / .12); }
[dir=rtl] .top { padding: 8px 20px 8px 10px; }
.top-title { flex: 1; min-width: 0; line-height: 1.2; display: grid; gap: 2px; }
.top-title small { display: block; color: var(--muted); font-size: .72rem; font-weight: 500; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-title h1 { font-size: 1.14rem; font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.top-cta { border-radius: 12px; padding: 8px 14px; margin-inline-end: 4px; box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
.tb-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.tb-btn, .tb-user { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; border-radius: 12px; color: var(--text); transition: background .15s, color .15s; user-select: none; }
.tb-btn { height: 40px; padding: 0 12px; color: var(--muted); }
.tb-btn::-webkit-details-marker, .tb-user::-webkit-details-marker { display: none; }
.tb-btn:hover, .tb-user:hover, .dd[open] > .tb-btn, .dd[open] > .tb-user { background: var(--surface-2); color: var(--text); }
.tb-btn:focus-visible, .tb-user:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tb-lbl { font-weight: 600; font-size: .85rem; color: var(--text); }
.tb-user, [dir=rtl] .tb-user { position: relative; padding: 3px; border-radius: 50%; }
.tb-user .avatar.sm { width: 38px; height: 38px; font-size: .95rem; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line); transition: box-shadow .2s, transform .15s; }
.tb-user:hover .avatar.sm, .dd[open] > .tb-user .avatar.sm { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px color-mix(in srgb, var(--primary) 55%, transparent); }
.tb-user:active .avatar.sm { transform: scale(.95); }
.tb-user:hover, .dd[open] > .tb-user { background: none !important; }
.tb-dot { position: absolute; bottom: 3px; inset-inline-end: 3px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--surface); }
.tb-who { line-height: 1.2; display: grid; } .tb-who b { font-size: .86rem; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-who small { color: var(--muted); font-size: .72rem; }

/* الصورة الشخصية */
.avatar { --h: 160; width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; object-fit: cover;
  font-weight: 700; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 45% 52%), hsl(calc(var(--h) + 40) 50% 42%)); }
img.avatar { background: var(--surface-2); }
.avatar.sm { width: 34px; height: 34px; font-size: .88rem; box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent); }
.avatar.lg { width: 48px; height: 48px; font-size: 1.15rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 2rem; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5.5px var(--line); }
.photo-field { display: flex; gap: 18px; align-items: center; }
.photo-field > div { display: grid; gap: 8px; justify-items: start; }
.photo-field .lbl { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* القوائم المنسدلة */
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 6px; box-shadow: var(--shadow-lg); z-index: 40; animation: ddin .16s ease-out; }
.dd-menu.wide { min-width: 270px; }
@keyframes ddin { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.dd-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dd-head b { display: block; } .dd-head small { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 4px; }
.dd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; color: var(--text); font: inherit; font-size: .9rem;
  background: none; border: 0; cursor: pointer; text-align: start; }
.dd-item:hover { background: var(--surface-2); } .dd-item svg { color: var(--muted); }
.dd-item.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.dd-item.danger { color: var(--bad); } .dd-item.danger svg { color: var(--bad); }
.dd-badge { width: 28px; height: 28px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; font-size: .78rem; font-weight: 700; }
.dd-item.on .dd-badge { background: var(--surface); }
.dd-check { margin-inline-start: auto; color: var(--primary); }
.dd-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.dd-item.lang-ckb { font-family: "Vazirmatn", Tahoma, sans-serif; } .dd-item.lang-en { font-family: "Inter", system-ui, sans-serif; } .dd-item.lang-ar { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.tb-lbl[lang=ckb] { font-family: "Vazirmatn", Tahoma, sans-serif; }

/* اللافتات كبطاقات */
.banner { border-radius: 16px; margin-bottom: 14px; padding: 10px 16px; }

@media (max-width: 1080px) { .tb-lbl { display: none; } .tb-btn { padding: 0 10px; } }
@media (max-width: 760px) {
  :root { --gap: 10px; }
  .shell { padding: 0 var(--gap); display: block; }
  .bq-rail { position: fixed; top: 0; bottom: 0; height: auto; margin: 10px; border-radius: 24px; width: min(290px, calc(100vw - 40px)); }
  [dir=rtl] .bq-rail { inset-inline-start: auto; right: 0; transform: translateX(calc(100% + 20px)); }
  [dir=ltr] .bq-rail { left: 0; right: auto; transform: translateX(calc(-100% - 20px)); }
  .bq-rail.open, [dir=rtl] .bq-rail.open, [dir=ltr] .bq-rail.open { transform: none; }
  .bq-rail-close { display: inline-flex; }
  .top { top: var(--gap); margin-top: var(--gap); padding: 8px 10px; min-height: 56px; border-radius: 18px; gap: 8px; }
  .top-title small { display: none; } .top-title h1 { font-size: 1.05rem; }
  .tb-sep { display: none; } .top-cta span { display: none; } .top-cta { padding: 8px 10px; margin: 0; }
  .content { padding: 0 0 calc(var(--tabbar-h) + 24px); }
  .tabbar { margin: 0 10px 10px; bottom: 0; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--panel-shadow); height: 64px; padding: 6px; }
  :root { --tabbar-h: calc(74px + env(safe-area-inset-bottom)); }
  .tabbar { bottom: env(safe-area-inset-bottom); }
  .dd-menu { position: fixed; top: 76px; inset-inline: 10px; min-width: 0; }
  .photo-field { flex-direction: column; align-items: flex-start; }
}

/* ===================================================================
   v5 — مركز إعدادات المنصة + الهوية
   =================================================================== */
.brand-logo { max-height: 40px; max-width: 150px; object-fit: contain; display: block; }
.l-brand .brand-logo { max-height: 36px; }
.settings-wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { position: sticky; top: 100px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 8px; box-shadow: var(--panel-shadow); }
.settings-nav a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 13px; color: var(--muted); font-weight: 500; font-size: .92rem; }
.settings-nav a:hover { background: var(--surface-2); color: var(--text); }
.settings-nav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.settings-body > .panel:last-child, .settings-body form > .panel:last-of-type { margin-bottom: 0; }
.lang-fields { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.lang-fields legend { font-weight: 500; font-size: .88rem; color: var(--muted); margin-bottom: 8px; padding: 0; }
.lf { display: flex; gap: 10px; align-items: flex-start; }
.lf input, .lf textarea { margin: 0; flex: 1; }
.lf-tag { flex-shrink: 0; width: 72px; padding: 11px 8px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 600; text-align: center; }
.lf-tag.lang-ckb { font-family: "Vazirmatn", Tahoma, sans-serif; } .lf-tag.lang-en { font-family: "Inter", system-ui, sans-serif; } .lf-tag.lang-ar { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.lf textarea[lang=ckb], .lf input[lang=ckb] { font-family: "Vazirmatn", Tahoma, sans-serif; } .lf textarea[lang=en], .lf input[lang=en] { font-family: "Inter", system-ui, sans-serif; }
.img-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.img-tile { display: flex; gap: 14px; align-items: center; border: 1.5px dashed var(--line); border-radius: 18px; padding: 12px; }
.img-prev { width: 120px; height: 84px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; overflow: hidden; color: var(--muted);
  background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; }
.img-tile.square .img-prev { width: 84px; }
.img-prev img { width: 100%; height: 100%; object-fit: contain; }
.img-meta { display: grid; gap: 4px; min-width: 0; } .img-meta b { font-size: .92rem; } .img-meta .row-start { margin-top: 4px; }
.sw.solid { background: var(--a); }
.sw-custom { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 99px; font-size: .82rem; color: var(--muted); cursor: pointer; }
[dir=rtl] .sw-custom { padding: 4px 4px 4px 10px; }
.sw-custom input { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 0; margin: 0; background: none; }
.toggles { display: grid; gap: 4px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); color: var(--text); font-weight: 400; cursor: pointer; }
.toggle-row b, .toggle-row small { display: block; } .toggle-row b { font-weight: 600; font-size: .94rem; }
.warn-panel { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }
.sec-checks { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sec-checks li { display: flex; gap: 8px; align-items: center; font-size: .86rem; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.sec-checks li::before { content: "✓"; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; background: var(--ok-soft); color: var(--ok); flex-shrink: 0; }
.sec-checks li.bad::before { content: "!"; background: var(--bad-soft); color: var(--bad); } .sec-checks li.info::before { content: "i"; background: var(--info-soft); color: var(--muted); }
.status-list .info { background: var(--info-soft); }
.int-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.int-card { display: grid; gap: 12px; align-content: start; margin-bottom: 18px; }
.int-h { display: flex; gap: 12px; align-items: center; } .int-h h2 { margin: 0 0 2px; }
.int-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; }
.int-ico.apple { background: #111; color: #fff; } .int-ico.google { background: var(--surface-2); color: #4285F4; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
pre.log { background: #1f1510; color: #f3e2d4; border-radius: 14px; padding: 14px; font-size: .78rem; line-height: 1.6; max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 10px 0; }
.lock-ico.warn { background: var(--warn-soft); color: var(--warn); }
.hero-photo img { width: 100%; height: auto; border-radius: 28px; box-shadow: var(--shadow-lg); object-fit: cover; aspect-ratio: 1 / 1; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.foot-links a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: .86rem; }
.foot-links a:hover { border-color: var(--primary); color: var(--primary); }
.l-foot p { margin: 4px 0; }
@media (max-width: 980px) {
  .settings-wrap { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; padding: 6px; }
  .settings-nav a { white-space: nowrap; }
  .int-grid, .img-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .lf { flex-direction: column; gap: 4px; } .lf-tag { width: auto; padding: 2px 10px; }
  .sec-checks { grid-template-columns: minmax(0, 1fr); }
  .img-tile { flex-direction: column; align-items: stretch; } .img-prev, .img-tile.square .img-prev { width: 100%; height: 120px; }
}

/* ===== v7 — هوية نحاسية دافئة ===== */
.shell { background: radial-gradient(900px 420px at 100% 0, color-mix(in srgb, var(--primary-soft) 75%, transparent), transparent 70%),
  radial-gradient(700px 380px at 0 100%, color-mix(in srgb, var(--accent-soft) 90%, transparent), transparent 70%), var(--bg); }
.public, .auth, .landing { background: radial-gradient(900px 500px at 85% -10%, var(--primary-soft), transparent 70%),
  radial-gradient(700px 400px at -10% 30%, var(--accent-soft), transparent 70%), var(--bg); }
/* علامة المنصة: بطاقة نحاسية مع ختم خوخي */
.brand-mark { background: linear-gradient(140deg, var(--primary) 0%, var(--primary-strong) 100%); position: relative; box-shadow: 0 8px 18px -10px var(--primary); }
.brand-mark::after { content: ""; position: absolute; bottom: -3px; inset-inline-start: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
/* القائمة النشطة */
.bq-rail nav a.on { background: linear-gradient(135deg, var(--primary), var(--primary-strong)); box-shadow: 0 10px 22px -12px var(--primary); }
/* الأزرار الأساسية بتدرج خفيف ولمعة */
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff), var(--primary)); border-color: var(--primary-strong);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 16px -10px var(--primary); }
.btn.primary:hover { background: var(--primary-strong); }
/* الخوخي للمكافآت والتلميحات */
.hint-card { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
.hint-card .cat { background: var(--accent); color: var(--accent-ink); }
.onboard { background: linear-gradient(135deg, var(--accent-soft), var(--primary-soft) 120%); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.ob-steps .done .ob-n { background: var(--accent); color: var(--accent-ink); }
.eyebrow i { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hero h1 span { background: linear-gradient(transparent 64%, var(--accent-soft) 64%); color: var(--primary); }
.tag.expiring { background: var(--accent-soft); color: var(--accent-ink); }
.creds { background: var(--accent-soft); }
.stat { position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; width: 70px; height: 70px; border-radius: 50%; inset-inline-end: -24px; top: -24px; background: var(--accent-soft); opacity: .7; }
.stat > * { position: relative; z-index: 1; }
/* شريط CTA: بطاقة نحاسية بدوائر أختام مثل التصميم */
.cta-band { background: linear-gradient(135deg, var(--primary), var(--primary-strong)); position: relative; overflow: hidden; }
.cta-band::before, .cta-band::after { content: ""; position: absolute; border-radius: 50%; }
.cta-band::before { width: 64px; height: 64px; bottom: 26px; inset-inline-start: 34px; background: var(--accent); opacity: .9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23302018' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11h16v9H4zM3 7h18v4H3zM12 7v13M12 7c-2-3-5-3-5 0M12 7c2-3 5-3 5 0'/%3E%3C/svg%3E");
  background-size: 30px; background-repeat: no-repeat; background-position: center; }
.cta-band::after { width: 64px; height: 64px; bottom: 26px; inset-inline-start: 112px; border: 2px dashed rgba(255,255,255,.55); }
.cta-band .btn { background: var(--accent); color: #302018; }
.cta-band .btn:hover { background: #fff; }
.feat em, .how-ico { filter: none; }
.how-ico { background: var(--accent-soft); color: var(--primary); }
.how-step:hover, .feat:hover, .role:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); transform: translateY(-2px); }
.how-step, .feat, .role { transition: transform .2s, border-color .2s; }
.tabbar a.fab svg { background: linear-gradient(140deg, var(--primary), var(--primary-strong)); }
::selection { background: var(--accent-soft); color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .cta-band .btn { color: #1a120d; } :root:not([data-theme=light]) .stat::after { opacity: .35; } }
:root[data-theme=dark] .cta-band .btn { color: #1a120d; } :root[data-theme=dark] .stat::after { opacity: .35; }

/* ===== منتقي السمات ===== */
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.theme-opt input { position: absolute; opacity: 0; }
.theme-card { display: grid; gap: 10px; padding: 10px; border-radius: 20px; background: var(--t-bg); border: 2px solid transparent; cursor: pointer;
  box-shadow: 0 0 0 1px var(--line); transition: transform .15s, border-color .15s; }
.theme-card:hover { transform: translateY(-2px); }
.theme-opt input:checked + .theme-card { border-color: var(--t-p); box-shadow: 0 10px 24px -14px var(--t-p); }
.theme-opt input:focus-visible + .theme-card { outline: 2px solid var(--t-p); outline-offset: 2px; }
.tc-pass { display: grid; gap: 2px; background: var(--t-p); color: #fff; border-radius: 14px; padding: 12px 14px 12px; min-height: 96px; position: relative; }
.tc-pass b { font-family: "Inter", system-ui, sans-serif; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.tc-pass small { opacity: .85; font-size: .7rem; }
.tc-stamps { display: flex; gap: 5px; margin-top: auto; padding-top: 10px; }
.tc-stamps i { width: 18px; height: 18px; border-radius: 50%; display: inline-block; }
.tc-stamps i.on { background: rgba(255,255,255,.28); }
.tc-stamps i.void { border: 1.5px dashed rgba(255,255,255,.6); }
.tc-stamps i.gift { background: var(--t-a); }
.tc-sw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.tc-sw i { height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.tc-name { color: var(--t-tx); font-weight: 700; font-size: .9rem; text-align: center; }
.custom-colors { display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.custom-colors.show { display: grid; animation: ddin .18s ease-out; }
.cc { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); cursor: pointer; }
.cc input { width: 40px; height: 40px; padding: 2px; border-radius: 10px; margin: 0; flex-shrink: 0; }
.cc b { display: block; font-size: .85rem; } .cc code { font-size: .74rem; background: none; padding: 0; color: var(--muted); }
@media (max-width: 760px) { .theme-grid { grid-template-columns: 1fr 1fr; } .custom-colors.show { grid-template-columns: 1fr 1fr; } }

/* ===================================================================
   معالج إضافة نشاط
   =================================================================== */
.wizard { display: grid; grid-template-columns: 230px minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.wz-steps { list-style: none; margin: 0; padding: 10px; display: grid; gap: 4px; position: sticky; top: 100px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--panel-shadow); }
.wz-steps li { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; cursor: pointer; position: relative; transition: background .15s; }
.wz-steps li:hover { background: var(--surface-2); }
.wz-steps li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 29px; top: 48px; height: 12px; width: 2px; background: var(--line); }
.wz-n { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex-shrink: 0; transition: .2s; }
.wz-l small { display: block; font-size: .7rem; color: var(--muted); } .wz-l b { font-size: .9rem; font-weight: 600; }
.wz-steps li.on { background: var(--primary-soft); } .wz-steps li.on .wz-n { background: var(--primary); color: var(--primary-ink); box-shadow: 0 8px 16px -8px var(--primary); }
.wz-steps li.on b { color: var(--primary); }
.wz-steps li.done .wz-n { background: var(--accent); color: var(--accent-ink); }
.wz-steps li.done::after { background: var(--accent); }
.wz-main { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--panel-shadow); padding: 26px; min-height: 520px; display: flex; flex-direction: column; }
.wz-panel { display: none; gap: 16px; animation: wzin .25s ease-out; } .wz-panel.on { display: grid; }
@keyframes wzin { from { opacity: 0; transform: translateX(var(--wz-dx, -10px)); } }
[dir=ltr] .wz-panel { --wz-dx: 10px; }
.wz-panel header h2 { font-size: 1.3rem; margin: 0; } .wz-panel header p { margin: 2px 0 0; }
.req { color: var(--primary); font-style: normal; }
.wz-nav { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); }
.wz-nav [data-wz=next], .wz-nav [data-wz=submit] { margin-inline-start: auto; padding: 11px 22px; }
.wz-count { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.cat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cat-card input { position: absolute; opacity: 0; }
.cat-card > span { display: grid; justify-items: center; gap: 4px; padding: 16px 8px; border-radius: 16px; border: 1.5px solid var(--line); cursor: pointer; transition: .15s; background: var(--surface); }
.cat-card em { font-style: normal; font-size: 1.8rem; line-height: 1; } .cat-card b { font-size: .88rem; font-weight: 600; color: var(--text); }
.cat-card > span:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); transform: translateY(-1px); }
.cat-card input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 8px 18px -12px var(--primary); }
.cat-card input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.up-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; }
.drop { position: relative; display: grid; place-items: center; min-height: 150px; border: 2px dashed var(--line); border-radius: 18px; cursor: pointer; overflow: hidden;
  background: var(--surface-2); transition: border-color .15s, background .15s; color: var(--muted); }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.drop-in { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 10px; }
.drop-in b { color: var(--text); font-size: .9rem; } .drop-in small { font-size: .75rem; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop[data-drop=logo] img { object-fit: contain; padding: 14px; background: var(--surface); }
.drop.has .drop-in { opacity: 0; } .drop.has:hover .drop-in { opacity: 1; position: relative; z-index: 2; background: color-mix(in srgb, var(--surface) 85%, transparent); border-radius: 12px; }
.drop.gallery { min-height: 92px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumbs img { width: 78px; height: 78px; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); animation: ddin .2s ease-out; }
.ico-in > span { position: relative; display: block; margin-top: 6px; }
.ico-in > span svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ico-in > span input { margin: 0; padding-inline-start: 40px; }
.hours-box summary { display: inline-flex; gap: 6px; align-items: center; }
.hours { display: grid; gap: 6px; margin-top: 10px; }
.hr-row { display: grid; grid-template-columns: auto 90px 1fr auto 1fr; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); }
.hr-row b { font-size: .88rem; font-weight: 600; } .hr-row input { margin: 0; padding: 7px 10px; background: var(--surface); } .hr-row span { color: var(--muted); }
.hr-row:has(input[type=checkbox]:not(:checked)) input[type=time], .hr-row:has(input[type=checkbox]:not(:checked)) b { opacity: .4; }
.pw-meter { display: block; height: 5px; border-radius: 99px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--bad); border-radius: 99px; transition: width .2s, background .2s; }
.pw-meter i[data-level="2"] { background: var(--warn); } .pw-meter i[data-level="3"], .pw-meter i[data-level="4"] { background: var(--ok); }
.plan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-card input { position: absolute; opacity: 0; }
.plan-card > span { display: grid; gap: 4px; padding: 16px; border-radius: 18px; border: 1.5px solid var(--line); cursor: pointer; height: 100%; transition: .15s; }
.plan-card em { font-style: normal; font-size: 1.5rem; } .plan-card b { font-size: 1.05rem; } .plan-card small { color: var(--muted); }
.plan-card ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 3px; font-size: .84rem; color: var(--muted); }
.plan-card li::before { content: "✓ "; color: var(--primary); font-weight: 700; }
.plan-card input:checked + span { border-color: var(--primary); background: linear-gradient(160deg, var(--primary-soft), var(--surface)); box-shadow: 0 10px 22px -14px var(--primary); }
.review div { padding: 11px 0; } .review dd { text-align: end; }
.wz-preview .sticky { position: sticky; top: 100px; display: grid; gap: 8px; }
.biz-prev { --bc: var(--primary); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--panel-shadow); }
.bp-cover { height: 110px; background: linear-gradient(135deg, var(--bc), color-mix(in srgb, var(--bc) 55%, #000)); position: relative; }
.bp-cover img { width: 100%; height: 100%; object-fit: cover; }
.bp-logo { width: 72px; height: 72px; border-radius: 20px; background: var(--surface); margin: -36px 18px 0; position: relative; display: grid; place-items: center;
  box-shadow: 0 0 0 4px var(--surface), 0 10px 20px -10px rgba(0,0,0,.4); overflow: hidden; }
.bp-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; } .bp-logo em { font-style: normal; font-size: 2rem; }
.bp-body { padding: 10px 18px 14px; display: grid; gap: 2px; }
.bp-body b { font-size: 1.1rem; } .bp-body small { color: var(--bc); font-weight: 600; } .bp-body p { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }
.bp-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 6px; } .bp-meta span:empty { display: none; }
.bp-pass { margin: 0 14px 14px; padding: 14px; border-radius: 16px; background: var(--bc); color: #fff; display: flex; justify-content: space-between; align-items: center; font-size: .82rem; }
.bp-pass .tc-stamps { padding: 0; margin: 0; } .bp-pass .tc-stamps i.gift { background: var(--accent); }
/* صفحة النشاط: غلاف وشعار */
.hero-card.has-cover { padding: 0; overflow: hidden; display: block; }
.hc-cover { height: 150px; background: var(--hc-bg, var(--primary)); background-size: cover; background-position: center; }
.hero-card.has-cover .hc-row { display: flex; gap: 16px; align-items: flex-end; padding: 0 20px 18px; margin-top: -34px; flex-wrap: wrap; }
.hc-logo { width: 76px; height: 76px; border-radius: 20px; background: var(--surface); display: grid; place-items: center; box-shadow: 0 0 0 4px var(--surface), var(--panel-shadow); overflow: hidden; flex-shrink: 0; font-size: 2rem; }
.hc-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.biz-card .bc-cover { height: 70px; margin: -16px -18px 8px; background: var(--bc, var(--surface-2)); background-size: cover; background-position: center; border-radius: 18px 18px 0 0; }
.biz-card .bc-logo { width: 46px; height: 46px; border-radius: 14px; background: var(--surface); margin-top: -32px; box-shadow: 0 0 0 3px var(--surface); display: grid; place-items: center; overflow: hidden; font-size: 1.4rem; }
.biz-card .bc-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.gallery-grid figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }
.gallery-grid form { position: absolute; top: 6px; inset-inline-end: 6px; }
.gallery-grid button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
@media (max-width: 1180px) { .wizard { grid-template-columns: 210px minmax(0, 1fr); } .wz-preview { display: none; } }
@media (max-width: 860px) {
  .wizard { grid-template-columns: minmax(0, 1fr); }
  .wz-steps { position: static; display: flex; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .wz-steps li { flex: 0 0 auto; padding: 6px; } .wz-steps li .wz-l { display: none; } .wz-steps li.on .wz-l { display: block; } .wz-steps li::after { display: none; }
  .wz-main { padding: 18px; }
  .cat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .up-grid, .plan-cards { grid-template-columns: minmax(0, 1fr); }
  .hr-row { grid-template-columns: auto 1fr; } .hr-row span { display: none; }
}
[hidden] { display: none !important; }

/* ===================================================================
   v9 — الصفحة العامة، التقييم، الملصق، الفواتير، التقارير، الاستيراد
   =================================================================== */
.open-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; vertical-align: middle; }
.open-badge i { width: 7px; height: 7px; border-radius: 50%; }
.open-badge small { font-weight: 400; opacity: .85; }
.open-badge.is-open { background: var(--ok-soft); color: var(--ok); } .open-badge.is-open i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); animation: pulse 2s infinite; }
.open-badge.is-closed { background: var(--bad-soft); color: var(--bad); } .open-badge.is-closed i { background: var(--bad); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.hours-note { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.share-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; text-align: start; }
.share-tile { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); color: var(--text); transition: .15s; }
.share-tile:hover { border-color: var(--primary); background: var(--primary-soft); }
.share-tile svg { color: var(--primary); flex-shrink: 0; } .share-tile b, .share-tile small { display: block; } .share-tile small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; }
.ref-note { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--accent-soft); border: 1px dashed var(--accent); }
.ref-note > span { font-size: 1.6rem; } .ref-note b, .ref-note small { display: block; }

/* الصفحة العامة للنشاط */
.bizpage { background: var(--bg); }
.bz { --bc: var(--primary); max-width: 980px; margin: 0 auto; padding: 0 16px 40px; }
.bz-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; }
.bz-plat { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.bz-plat .brand-mark { width: 28px; height: 28px; border-radius: 9px; } .bz-plat .brand-mark::after { display: none; }
.bz-hero { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: var(--panel-shadow); }
.bz-cover { height: clamp(170px, 32vw, 300px); background: linear-gradient(135deg, var(--bc), color-mix(in srgb, var(--bc) 50%, #000)); background-size: cover; background-position: center; position: relative; }
.bz-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.25)); }
.bz-id { display: flex; gap: 16px; align-items: flex-end; padding: 0 24px; margin-top: -46px; position: relative; flex-wrap: wrap; }
.bz-logo { width: 104px; height: 104px; border-radius: 28px; background: var(--surface); display: grid; place-items: center; font-size: 2.6rem; overflow: hidden; flex-shrink: 0;
  box-shadow: 0 0 0 5px var(--surface), 0 14px 30px -14px rgba(0,0,0,.45); }
.bz-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.bz-name { flex: 1; min-width: 200px; padding-bottom: 6px; } .bz-name h1 { margin: 0; font-size: clamp(1.4rem, 3.4vw, 2rem); } .bz-name p { margin: 0; color: var(--muted); }
.bz-open { display: inline-flex; flex-direction: column; padding: 8px 14px; border-radius: 14px; font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.bz-open i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 6px; }
.bz-open small { font-weight: 400; font-size: .76rem; opacity: .85; }
.bz-open.is-open { background: var(--ok-soft); color: var(--ok); } .bz-open.is-open i { background: var(--ok); animation: pulse 2s infinite; }
.bz-open.is-closed { background: var(--bad-soft); color: var(--bad); } .bz-open.is-closed i { background: var(--bad); }
.bz-desc { padding: 14px 24px 0; margin: 0; color: var(--text); line-height: 1.8; }
.bz-actions { display: flex; gap: 8px; padding: 18px 24px 24px; flex-wrap: wrap; }
.bz-actions a { flex: 1 1 110px; display: grid; justify-items: center; gap: 4px; padding: 12px 8px; border-radius: 16px; background: var(--surface-2); color: var(--text); font-size: .84rem; font-weight: 600; transition: .15s; }
.bz-actions a svg { color: var(--bc); } .bz-actions a:hover { background: color-mix(in srgb, var(--bc) 12%, var(--surface)); transform: translateY(-1px); }
.bz-sec { margin-top: 26px; } .bz-sec > h2 { font-size: 1.25rem; margin-bottom: 2px; }
.bz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 14px; }
.bz-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 16px; display: grid; gap: 12px; }
.bz-card > div b { display: block; } .bz-card .btn.primary { background: var(--bc); border-color: var(--bc); }
.bz-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; gap: 10px; margin-top: 12px; }
.bz-gallery button { padding: 0; border: 0; border-radius: 18px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.bz-gallery button.big { grid-column: span 2; grid-row: span 2; }
.bz-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; } .bz-gallery button:hover img { transform: scale(1.05); }
.bz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bz-grid .bz-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; }
.bz-hours, .bz-branches { list-style: none; padding: 0; margin: 10px 0 0; }
.bz-hours li { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 10px; }
.bz-hours li.today { background: color-mix(in srgb, var(--bc) 10%, var(--surface)); font-weight: 700; color: var(--bc); }
.bz-branches li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); } .bz-branches li:last-child { border: 0; }
.bz-branches li > div { flex: 1; } .bz-branches b, .bz-branches small { display: block; }
.bz-foot { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 30px; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(10,8,6,.85); }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 16px; display: block; }
.lightbox button { position: fixed; top: 16px; inset-inline-end: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 1.2rem; cursor: pointer; }
@media (max-width: 760px) { .bz-grid { grid-template-columns: 1fr; } .bz-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; } .bz-id { padding: 0 16px; } .bz-actions, .bz-desc { padding-inline: 16px; } .share-more { grid-template-columns: 1fr; } }

/* صفحة التقييم */
.review-box { --bc: var(--primary); text-align: center; }
.rv-biz { display: inline-flex; align-items: center; gap: 8px; } .rv-biz img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; }
.stars { display: flex; flex-direction: row-reverse; justify-content: center; gap: 6px; direction: ltr; margin: 10px 0; }
.stars input { position: absolute; opacity: 0; }
.stars label { font-size: 2.8rem; line-height: 1; color: var(--surface-3); cursor: pointer; transition: transform .15s, color .15s; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: #f5b301; }
.stars label:hover { transform: scale(1.15); }
.stars input:focus-visible + label { outline: 2px solid var(--primary); border-radius: 6px; }
.rv-done em { font-style: normal; font-size: 3rem; display: block; } .rv-done { display: grid; gap: 10px; }
.rv-stars { display: inline-block; font-size: 1.4rem; letter-spacing: 2px; background: linear-gradient(90deg, #f5b301 var(--r), var(--surface-3) var(--r)); -webkit-background-clip: text; background-clip: text; color: transparent; direction: ltr; }
.rv-stars.sm { font-size: 1rem; }
.rv-summary { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.rv-summary > p { grid-column: 1 / -1; margin: 0; }
.rv-avg { display: grid; justify-items: center; } .rv-avg b { font-size: 2.8rem; line-height: 1; }
.rv-dist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.rv-dist li { display: grid; grid-template-columns: 34px 1fr 30px; gap: 8px; align-items: center; font-size: .82rem; }
.rv-list { display: grid; gap: 10px; }
.rv-item { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: grid; gap: 6px; }
.rv-item.low { border-inline-start: 4px solid var(--bad); } .rv-item p { margin: 0; }

/* الترتيب والأشرطة */
.rank { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rank li { display: flex; gap: 12px; align-items: center; } .rank li > div { flex: 1; min-width: 0; } .rank b, .rank small { display: block; }
.rk { width: 28px; height: 28px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: .82rem; flex-shrink: 0; }
.rank li:first-child .rk { background: var(--accent); color: var(--accent-ink); }
.rbar { display: block; height: 7px; border-radius: 99px; background: var(--surface-2); margin: 5px 0 3px; overflow: hidden; }
.rbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.hours-bars .bar i { background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 50%, transparent)); }

/* الاستيراد */
.map-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.table.mini th, .table.mini td { padding: 8px 10px; font-size: .84rem; white-space: nowrap; }
.import-done { text-align: center; display: grid; gap: 12px; justify-items: center; } .import-done em { font-style: normal; font-size: 2.6rem; }
.import-done .stats { width: 100%; }
@media (max-width: 900px) { .map-cols { grid-template-columns: 1fr 1fr; } }

/* الملصق والفاتورة */
.poster-page { background: var(--surface-2); }
.poster-tools { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 16px; }
.poster-hint { text-align: center; margin: 0 0 10px; }
.poster { --pc: #ba4e2b; --pa: #f4bd8d; margin: 0 auto 30px; background: #fff; color: #2a1d16; box-shadow: var(--shadow-lg); display: grid; justify-items: center; text-align: center;
  position: relative; overflow: hidden; font-family: inherit; }
.poster.size-a4 { width: 210mm; min-height: 297mm; padding: 18mm 16mm; gap: 8mm; }
.poster.size-a5 { width: 148mm; min-height: 210mm; padding: 12mm 11mm; gap: 5mm; font-size: 12px; }
.poster.size-tent { width: 120mm; min-height: 160mm; padding: 9mm; gap: 4mm; font-size: 10.5px; }
.poster::before { content: ""; position: absolute; inset: 0 0 auto; height: 38%; background: var(--pc); border-radius: 0 0 50% 50% / 0 0 14% 14%; }
.poster > * { position: relative; }
.ps-head { display: grid; justify-items: center; gap: 3mm; color: #fff; }
.ps-logo { max-height: 22mm; max-width: 60mm; background: #fff; padding: 3mm 5mm; border-radius: 6mm; object-fit: contain; }
.ps-emoji { font-size: 3.2em; background: #fff; border-radius: 50%; width: 1.7em; height: 1.7em; display: grid; place-items: center; }
.ps-head b { font-size: 1.6em; }
.poster h1 { color: #fff; font-size: 2.6em; line-height: 1.25; margin: 0; max-width: 90%; }
.ps-sub { color: rgba(255,255,255,.9); font-size: 1.15em; margin: 0; }
.ps-qr { background: #fff; padding: 6mm; border-radius: 8mm; box-shadow: 0 6mm 14mm -6mm rgba(0,0,0,.35); border: 1.5mm solid var(--pa); }
.ps-qr .qr { width: 78mm; padding: 0; display: block; line-height: 0; } .size-a5 .ps-qr .qr { width: 62mm; } .size-tent .ps-qr .qr { width: 52mm; }
.ps-qr svg { width: 100%; height: auto; display: block; }
.ps-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; width: 100%; font-size: 1.05em; }
.ps-steps li { display: grid; justify-items: center; gap: 2mm; }
.ps-steps span { width: 2.2em; height: 2.2em; border-radius: 50%; background: var(--pa); color: #2a1d16; display: grid; place-items: center; font-weight: 800; }
.ps-foot { margin-top: auto; display: grid; gap: 1mm; color: #6b5a50; } .ps-wallets { font-weight: 700; color: #2a1d16; }
.invoice { width: 210mm; min-height: 297mm; margin: 0 auto 30px; background: #fff; color: #222; padding: 18mm; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 10mm; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--primary); padding-bottom: 6mm; }
.inv-brand { display: flex; gap: 10px; align-items: center; } .inv-brand b, .inv-brand small { display: block; } .inv-brand small { color: #777; }
.inv-meta { text-align: end; } .inv-meta h1 { margin: 0; color: var(--primary); font-size: 2em; } .inv-meta b, .inv-meta small { display: block; }
.inv-to { display: grid; gap: 2px; } .inv-to small { color: #888; }
.inv-table { width: 100%; border-collapse: collapse; } .inv-table th { background: #f6efe9; text-align: start; padding: 10px; font-size: .85rem; }
.inv-table td { padding: 12px 10px; border-bottom: 1px solid #eee; } .inv-table tfoot td { font-size: 1.1rem; border: 0; }
.inv-status { align-self: flex-start; padding: 8px 18px; border-radius: 10px; font-weight: 800; letter-spacing: .02em; border: 2px solid; display: grid; transform: rotate(-3deg); }
.inv-status small { font-weight: 400; } .inv-status.paid { color: #2f8a5a; border-color: #2f8a5a; } .inv-status.unpaid { color: #c0392b; border-color: #c0392b; }
.inv-notes { color: #555; } .inv-foot { margin-top: auto; color: #999; text-align: center; font-size: .85rem; }
@media print {
  @page { margin: 0; }
  .no-print, .poster-tools, .poster-hint { display: none !important; }
  body, .poster-page { background: #fff !important; }
  .poster, .invoice { box-shadow: none; margin: 0; }
  .poster.size-a4 { height: 297mm; } .poster.size-a5 { height: 210mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media screen and (max-width: 860px) { .poster.size-a4, .invoice { transform-origin: top center; zoom: .45; } .poster.size-a5 { zoom: .6; } }
.bars { overflow: hidden; } .bar { min-width: 0; } .bar small { font-size: .62rem; white-space: nowrap; }

/* ===== v10 — صفحة الأنشطة + تثبيت القائمة الجانبية ===== */
@media (min-width: 761px) {
  .bq-rail { position: sticky !important; transform: none !important; inset: auto !important; display: flex !important; visibility: visible !important; }
}
.shell, .main { overflow-x: clip; }
html, body { max-width: 100%; }
.biz-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.state-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: .88rem; transition: .15s; }
.chip span { min-width: 22px; padding: 0 7px; border-radius: 99px; background: var(--surface-2); font-size: .76rem; text-align: center; color: var(--text); }
.chip:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); } .chip.on span { background: color-mix(in srgb, var(--bg) 20%, transparent); color: var(--bg); }
.chip.expiring span { background: var(--accent-soft); color: var(--accent-ink); } .chip.expired span, .chip.suspended span { background: var(--bad-soft); color: var(--bad); }
.chip.on.expiring span, .chip.on.expired span, .chip.on.suspended span { background: color-mix(in srgb, var(--bg) 20%, transparent); color: var(--bg); }
.biz-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.search-in { position: relative; flex: 1 1 260px; margin: 0; } .search-in svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-in input { margin: 0; padding-inline-start: 42px; background: var(--surface); border-color: var(--line); }
.biz-tools select { width: auto; flex: 0 0 auto; background: var(--surface); border-color: var(--line); }
.view-toggle { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.view-toggle a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); } .view-toggle a.on { background: var(--primary-soft); color: var(--primary); }
.biz-grid.v2 { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.bcard { --bc: var(--primary); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; color: var(--text); transition: transform .18s, box-shadow .18s, border-color .18s; }
.bcard:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -24px var(--bc); border-color: color-mix(in srgb, var(--bc) 35%, var(--line)); }
.bcard-cover { height: 78px; position: relative; background: linear-gradient(135deg, var(--bc), color-mix(in srgb, var(--bc) 55%, #000)); background-size: cover; background-position: center; }
.bcard-cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120px 60px at 85% 30%, rgba(255,255,255,.18), transparent 70%); }
.bcard-cover .tag { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 1; backdrop-filter: blur(8px); }
.bcard-cover .tag.active { background: rgba(255,255,255,.9); }
.bcard-id { display: flex; gap: 12px; align-items: flex-end; padding: 0 16px; margin-top: -26px; position: relative; }
.bcard-id > span:last-child { min-width: 0; padding-bottom: 2px; } .bcard-id b { display: block; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-id small { color: var(--muted); font-size: .8rem; }
.bl { width: 58px; height: 58px; border-radius: 18px; background: var(--surface); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; box-shadow: 0 0 0 3px var(--surface), 0 8px 18px -10px rgba(0,0,0,.4); }
.bl img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.bl.letter { background: linear-gradient(140deg, var(--bc), color-mix(in srgb, var(--bc) 60%, #000)); color: #fff; font-weight: 800; font-size: 1.5rem; }
.bl.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 1.05rem; box-shadow: none; }
.bcard-owner { display: flex; gap: 6px; align-items: center; padding: 10px 16px 0; color: var(--muted); font-size: .82rem; min-width: 0; }
.bcard-owner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px 16px; }
.bcard-stats > span { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 7px; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.bcard-stats b { color: var(--text); font-size: .95rem; }
.bcard-sub { display: grid; gap: 5px; padding: 12px 16px 14px; margin-top: auto; border-top: 1px solid var(--line); font-size: .8rem; }
.bcard-sub > .row-between small:first-child { color: var(--muted); }
.sub-bar { display: block; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.sub-bar i { display: block; height: 100%; border-radius: 99px; background: var(--ok); } .sub-bar.mid i { background: var(--accent); } .sub-bar.low i { background: var(--bad); }
.bt-name { display: flex; gap: 10px; align-items: center; color: var(--text); } .bt-name b, .bt-name small { display: block; }
.big-empty { display: grid; justify-items: center; gap: 10px; padding: 60px 20px; background: var(--surface); }
.big-empty h3 { margin: 0; color: var(--text); }
@media (max-width: 760px) { .biz-head { flex-direction: column-reverse; align-items: stretch; } .biz-head .btn.primary { justify-content: center; } .state-chips { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; } .chip { flex-shrink: 0; } .biz-tools select { flex: 1 1 40%; } }
.bcard-id { margin-top: -29px; } .bcard-id > span:last-child { padding-top: 36px; }

/* v11 اسم المستخدم والرابط العام */
.handle-field{display:grid;gap:6px}
.handle-field .lbl{font-weight:600;font-size:.92rem}
.handle-in{display:flex;align-items:center;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden;transition:border-color .15s,box-shadow .15s}
.handle-in:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 18%,transparent)}
.handle-in .hp-pre{padding:0 1px 0 12px;color:var(--muted);font-size:.88rem;white-space:nowrap;max-width:55%;overflow:hidden;text-overflow:ellipsis;direction:ltr}
.handle-in input{border:0!important;box-shadow:none!important;background:transparent;padding-inline-start:0;flex:1;min-width:0;font-weight:600;direction:ltr;text-align:left}
.hp-state{width:22px;height:22px;margin:0 10px;flex:none;border-radius:50%;display:grid;place-items:center;font-size:.8rem}
.hp-state.ok{background:color-mix(in srgb,#16a34a 15%,transparent);color:#16a34a}.hp-state.ok::after{content:'✓'}
.hp-state.bad{background:color-mix(in srgb,#dc2626 15%,transparent);color:#dc2626}.hp-state.bad::after{content:'✕'}
.hp-state.busy{border:2px solid var(--line);border-top-color:var(--primary);animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
#handleMsg.err{color:#dc2626;cursor:pointer}
.bp-link{display:block;margin-top:8px;font-size:.8rem;color:var(--bc,var(--primary));font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hc-link{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:ltr}
.public-link .copy{display:flex;gap:8px;flex-wrap:wrap}.public-link .copy input{flex:1;min-width:200px;font-weight:600}

/* v12 — المحتوى يتوسّط ويستفيد من الشاشات العريضة */
.content { max-width: 1440px; margin-inline: auto; width: 100%; }

/* ===== v13 — أيقونات بنمط iPhone + معالج أخف ===== */
label > small:has(+ input, + textarea, + select) { display: inline; margin: 0; }
.ios-ic { --s: 40px; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .27); display: inline-grid; place-items: center; flex-shrink: 0; position: relative; overflow: hidden;
  color: #fff; background: linear-gradient(165deg, var(--g1), var(--g2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.08), 0 6px 14px -8px var(--g2); }
.ios-ic::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.22), transparent 55%); pointer-events: none; }
.ios-ic svg { width: 56%; height: 56%; position: relative; filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }
.hc-logo .ios-ic, .bz-logo .ios-ic, .bp-logo .ios-ic { width: 100%; height: 100%; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
#pvIcon { display: block; width: 100%; height: 100%; border-radius: inherit; }
#pvIcon[hidden] { display: none; }
.bp-logo, .hc-logo, .bz-logo { overflow: hidden; }

/* بطاقات النوع */
.cat-cards { gap: 12px; }
.cat-card { position: relative; }
.cat-card > span { position: relative; gap: 10px; padding: 18px 8px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), border-color .2s, box-shadow .2s; }
.cat-card > span:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.cat-card > span:active { transform: scale(.96); }
.cat-card .ios-ic { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.cat-card input:checked + span { border-color: var(--primary); background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent), 0 12px 26px -16px var(--primary); }
.cat-card input:checked + span .ios-ic { transform: scale(1.08); }
.cc-check { position: absolute; top: 8px; inset-inline-end: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; transform: scale(0); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.cat-card input:checked + span .cc-check { transform: scale(1); }

/* مفتاح مقسّم بنمط iOS */
.ios-seg { display: flex; padding: 3px; border-radius: 12px; background: var(--surface-3); gap: 2px; margin-top: 6px; max-width: 440px; }
.ios-seg label { flex: 1; margin: 0; }
.ios-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ios-seg span { display: block; text-align: center; padding: 8px 10px; border-radius: 9px; font-weight: 600; color: var(--text); font-size: .9rem; cursor: pointer; transition: background .2s, box-shadow .2s; }
.ios-seg input:checked + span { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 3px 8px -2px rgba(0,0,0,.12); }
.ios-seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .cat-card > span, .cat-card .ios-ic, .cc-check { transition: none; } }

/* ===== v14 — معالج من 3 مراحل + إصلاحات ===== */
/* الحقول والعناوين لا تختفي خلف الشريط العلوي الثابت */
input, select, textarea, .wz-panel, .wz-panel header, .panel h2, [id] { scroll-margin-top: 110px; }
@media (max-width: 760px) { input, select, textarea, .wz-panel, .wz-panel header, .panel h2, [id] { scroll-margin-top: 90px; } }
/* تباين أوضح لعناوين الأقسام ونصوصها الفرعية */
.wz-panel header h2, .panel h2 { color: var(--text); letter-spacing: -.01em; }
.wz-panel header p { color: color-mix(in srgb, var(--text) 68%, var(--surface)); font-size: .92rem; }
/* الخطوات المكتملة ✓ */
.wz-n .wz-ok { display: none; } .wz-n .wz-ic, .wz-n .wz-ok { display: grid; place-items: center; }
.wz-steps li.done .wz-ic { display: none; } .wz-steps li.done .wz-ok { display: grid; }
.wz-steps li:not(.done) .wz-ok { display: none; }
.wz-steps li.done .wz-n { background: var(--ok, #16a34a); color: #fff; }
.wz-steps li.done::after { background: var(--ok, #16a34a); }
/* أقسام اختيارية قابلة للطي */
.opt-box { border: 1px solid var(--line); border-radius: 16px; padding: 0; background: var(--surface); }
.opt-box > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 13px 16px; margin: 0; color: var(--text); font-weight: 600; font-size: .92rem; }
.opt-box > summary::-webkit-details-marker { display: none; }
.opt-box > summary::after { content: ""; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); margin-inline-start: auto; transition: transform .2s; }
.opt-box[open] > summary::after { transform: rotate(-135deg); }
.opt-box[open] > summary { border-bottom: 1px solid var(--line); }
.opt-box > :not(summary) { margin: 14px 16px; }
.opt-grid { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; align-items: start; }
.drop.sq { min-height: 130px; }
@media (max-width: 760px) { .opt-grid { grid-template-columns: 1fr; } }
/* الباقات بأيقونات iOS */
.plan-card > span { position: relative; justify-items: start; gap: 6px; transition: transform .3s cubic-bezier(.34,1.56,.64,1), border-color .2s, box-shadow .2s; }
.plan-card > span:active { transform: scale(.98); }
.plan-card input:checked + span .cc-check { transform: scale(1); }
.plan-card input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.end-note { margin: -4px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--primary-soft); color: var(--text); font-weight: 600; font-size: .9rem; }
/* المراجعة */
.review dt { color: var(--muted); } .review dd { font-weight: 600; }
.rv-sw { display: inline-block; width: 14px; height: 14px; border-radius: 5px; vertical-align: -2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
/* مفتاح بحالة واضحة */
.sw-wrap { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sw-state { font-size: .82rem; font-weight: 700; min-width: 44px; text-align: end; }
.sw-state .is-on { color: var(--ok, #16a34a); display: none; } .sw-state .is-off { color: var(--muted); }
.sw-wrap:has(input:checked) .is-on { display: inline; } .sw-wrap:has(input:checked) .is-off { display: none; }
.switch i { background: #c9c3bd; } .switch input:checked + i { background: var(--ok, #16a34a); }
.switch input:focus-visible + i { outline: 2px solid var(--primary); outline-offset: 2px; }
/* أيقونة توليد كلمة السر لا تغطي النص */
.pw input { padding-left: 44px !important; padding-right: 44px !important; }
/* مسودة محفوظة */
.draft-note { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--accent-soft, var(--surface-2)); margin-bottom: 14px; font-size: .9rem; }
.draft-note .btn { margin-inline-start: auto; }
.draft-note[hidden] { display: none; }
/* أيقونة المعاينة تأخذ لون النشاط */
.bp-logo .ios-ic { --g1: color-mix(in srgb, var(--bc) 72%, #fff); --g2: var(--bc); }
.bp-link { direction: ltr; text-align: start; }
.wz-nav [data-wz=quick] { margin-inline-start: auto; }
.wz-nav [data-wz=quick]:not([hidden]) + [data-wz=next] { margin-inline-start: 0; }

/* ===== v15 — صفحة الأنشطة: إجراءات، تحديد جماعي، بحث فوري ===== */
[hidden] { display: none !important; }
/* بطاقة النشاط: رابط ممتد + عناصر تفاعلية فوقه */
.bcard { position: relative; }
.bcard-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.bcard-link:focus-visible { outline: 2px solid var(--bc); outline-offset: 2px; }
.bcard-cover .tag, .bcard-sel, .bcard .act-menu { z-index: 3; }
.bcard-cover { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 10px 10px 0; }
.bcard-cover .tag { position: static; margin-inline-start: auto; }
.bcard .act-menu > summary { background: rgba(255,255,255,.88); color: #302018; backdrop-filter: blur(8px); width: 30px; height: 30px; }
.bcard-sel { position: relative; width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.bcard-sel input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.bcard-sel i { width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.9); box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.18); display: grid; place-items: center; }
.bcard-sel input:checked + i { background: var(--primary); box-shadow: none; }
.bcard-sel input:checked + i::after { content: "✓"; color: #fff; font-size: .8rem; font-weight: 800; }
.bcard-sel input:focus-visible + i { outline: 2px solid #fff; }
.bcard:hover .bcard-sel, .bcard-sel:has(input:checked), .has-bulk .bcard-sel, .bcard:focus-within .bcard-sel { opacity: 1; }
@media (hover: none) { .bcard-sel { opacity: 1; } }
.bcard.picked { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
/* أرقام بعناوين */
.bcard-stats > span { flex-direction: column; gap: 1px; padding: 8px 4px; }
.bcard-stats b { font-size: 1.05rem; line-height: 1.2; }
.bcard-stats small { font-size: .7rem; color: var(--muted); font-weight: 500; }
/* اكتمال الملف */
.bcard-pc { display: flex; align-items: center; gap: 8px; padding: 0 16px 12px; font-size: .75rem; color: var(--muted); }
.pc-bar { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pc-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.pc-badge { display: inline-block; margin-inline-start: 6px; font-size: .72rem; color: var(--muted); background: var(--surface-2); padding: 1px 7px; border-radius: 99px; }
/* ارتفاع موحّد للجزء السفلي */
.bcard-sub { min-height: 84px; align-content: end; }
.sub-bar.inf i { background: repeating-linear-gradient(45deg, var(--ok), var(--ok) 6px, color-mix(in srgb, var(--ok) 70%, #fff) 6px, color-mix(in srgb, var(--ok) 70%, #fff) 12px); opacity: .55; }
/* الشعار كأيقونة */
.bl.ic { background: none; padding: 0; }
.bl.ic .ios-ic { width: 100%; height: 100%; border-radius: inherit; }
/* قائمة ⋯ */
.act-menu { position: relative; }
.act-menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; }
.act-menu > summary::-webkit-details-marker { display: none; }
.act-list { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 210px; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.35); display: grid; gap: 1px; animation: actIn .14s ease-out; }
@keyframes actIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.act-list form { margin: 0; }
.act-list button, .act-list a { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: 10px; color: var(--text); font: inherit; font-size: .88rem; text-align: start; cursor: pointer; }
.act-list button:hover, .act-list a:hover, .act-list button:focus-visible, .act-list a:focus-visible { background: var(--surface-2); outline: 0; }
.act-list svg { color: var(--muted); flex-shrink: 0; }
.act-list .danger, .act-list .danger svg { color: var(--bad); }
.act-list hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
/* الجدول */
.table-wrap { overflow-x: auto; }
.biz-table td.act { width: 44px; text-align: end; } .biz-table .sel { width: 36px; }
.biz-table input[type=checkbox], .bulk-bar input { width: 18px; height: 18px; accent-color: var(--primary); }
.biz-table .act-list { min-width: 220px; }
/* البحث */
.search-in input { padding-inline-end: 40px; }
.search-clear { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--surface-3); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.search-clear:hover { background: var(--line); }
/* شريط الإجراءات الجماعية */
.bulk-bar { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px;
  background: var(--text); color: var(--surface); border-radius: 18px; box-shadow: 0 20px 40px -12px rgba(0,0,0,.45); max-width: calc(100vw - 24px); animation: bbIn .2s cubic-bezier(.34,1.56,.64,1); }
@keyframes bbIn { from { transform: translate(-50%, 20px); opacity: 0; } }
.bulk-bar .bulk-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.bulk-bar .btn { background: rgba(255,255,255,.12); color: inherit; border-color: transparent; }
.bulk-bar .btn:hover { background: rgba(255,255,255,.22); }
.bulk-bar .btn.danger { color: #ffb4a8; }
.bulk-bar b { white-space: nowrap; font-size: .9rem; }
@media (max-width: 760px) { .bulk-bar { bottom: calc(var(--tabbar-h, 64px) + 12px); flex-wrap: wrap; justify-content: center; } }
/* تنبيه الاشتراكات القريبة */
.soon-bar { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 18px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--warn, #f59e0b) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn, #f59e0b) 35%, var(--line)); }
.sb-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--warn, #f59e0b) 22%, var(--surface)); color: color-mix(in srgb, var(--warn, #f59e0b) 75%, #000); flex-shrink: 0; }
.sb-body { flex: 1; min-width: 0; display: grid; gap: 8px; }
.sb-list { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-item { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; }
[dir=rtl] .sb-item { padding: 4px 12px 4px 4px; }
.sb-item a { color: var(--text); font-weight: 600; } .sb-item small { color: var(--muted); }
.sb-item form { margin: 0; }
/* رأس صفحة النشاط */
.hc-row { min-width: 0; } .hc-body { min-width: 0; }
.hc-body h2 { overflow-wrap: anywhere; }
.hc-handle { flex-basis: 100%; display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: .88rem; }
.hc-handle a { color: var(--primary); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-handle .btn.icon { width: 28px; height: 28px; }
.btn.copied { color: var(--ok, #16a34a); }
/* اكتمال الملف (نظرة عامة) */
.profile-meter { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.profile-meter > div { flex: 1; min-width: 200px; } .profile-meter h3 { margin: 0; font-size: 1rem; } .profile-meter p { margin: 2px 0 0; font-size: .88rem; }
.pm-ring { --p: 0; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-2) 0); }
.pm-ring b { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: .82rem; }
.creds-row b { font-weight: 600; }
.creds .row-start form { margin: 0; }

/* ===== v16 — إصلاحات الهاتف ===== */
@media (max-width: 760px) {
  .biz-head { flex-wrap: nowrap; }
  .biz-head > * { min-width: 0; max-width: 100%; }
  .tabbar a, .tabbar button { min-width: 0; }
  .tabbar span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
  /* أنواع النشاط بنمط شاشة iPhone الرئيسية */
  .cat-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .cat-card > span { padding: 10px 2px 8px; gap: 6px; border-radius: 16px; border-color: transparent; background: none; }
  .cat-card > span:hover { transform: none; }
  .cat-card .ios-ic { --s: 52px !important; }
  .cat-card b { font-size: .74rem; line-height: 1.25; text-align: center; }
  .cat-card input:checked + span { background: var(--primary-soft); box-shadow: none; border-color: transparent; }
  .cc-check { top: 4px; inset-inline-end: 6px; }
  .wz-panel header p { font-size: .86rem; }
  .bcard-sub { min-height: 0; }
}
/* الجداول العريضة تتمرّر أفقياً بدل أن تُقصّ */
.panel:has(> table.table), section:has(> table.table), div:has(> table.table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { min-width: 100%; }

/* ===== v17 — ملاحظات المراجعة + أدوات الإدارة ===== */
/* الحقول اللاتينية دائماً من اليسار ولا تُقصّ */
input[type=email], input[type=tel], input[type=url], input[dir=ltr] { direction: ltr; text-align: left; }
input[type=email]::placeholder, input[type=tel]::placeholder, input[type=url]::placeholder { text-align: left; }
bdi.pct { unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
/* أيقونة المعاينة تتبع اللون المختار (تغلب لون النوع المضمَّن) */
.bp-logo .ios-ic { background: linear-gradient(165deg, color-mix(in srgb, var(--bc) 70%, #fff), var(--bc)) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.35) !important; }
/* أخطاء الحقول */
.field-err { display: block; color: var(--bad); font-size: .8rem; font-weight: 600; margin-top: 5px; }
.field-err::before { content: "⚠ "; }
.is-invalid, .is-invalid:focus { border-color: var(--bad) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent) !important; }
.handle-in:has(.is-invalid) { border-color: var(--bad); }
/* حوار التأكيد بالاسم */
.confirm-dlg { max-width: 420px; }
.confirm-dlg h2 { margin: 0 0 4px; font-size: 1.1rem; }
.btn.danger-solid { background: var(--bad); color: #fff; border-color: transparent; }
.btn.danger-solid:disabled { opacity: .45; cursor: not-allowed; }
/* جاهزية النشاط */
.ready-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; }
.rc-body { flex: 1; min-width: 0; } .rc-body h3 { margin: 0 0 8px; font-size: 1rem; } .rc-body h3 small { font-weight: 500; }
.rc-todo { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-todo a { padding: 5px 11px; border-radius: 99px; background: var(--surface-2); color: var(--text); font-size: .82rem; font-weight: 600; transition: background .15s; }
.rc-todo a:hover { background: var(--primary-soft); color: var(--primary); }
/* استهلاك الباقة */
.use-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-bottom: 12px; font-size: .9rem; }
.use-row .sub-bar { grid-column: 1 / -1; }
.upsell { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); font-size: .86rem; }
.upsell span { flex: 1; } .upsell svg { color: var(--warn); }
/* الملاحظات */
.note-form textarea { margin: 0 0 8px; }
.inline-date { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; }
.inline-date input { margin: 0; width: auto; padding: 6px 10px; }
.notes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.notes li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.notes li form { margin: 0; } .notes p { margin: 0 0 2px; font-size: .9rem; }
.notes li.done p { text-decoration: line-through; color: var(--muted); }
.note-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: #fff; cursor: pointer; display: grid; place-items: center; font-size: .75rem; font-weight: 800; }
.notes li.done .note-check { background: var(--ok); border-color: var(--ok); }
/* مؤشرات صفحة الأنشطة */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color .15s, transform .15s; }
a.kpi:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); transform: translateY(-1px); }
.kpi.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.kpi-ic { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.kpi-ic.ok { background: var(--ok-soft); color: var(--ok); } .kpi-ic.warn { background: var(--warn-soft); color: var(--warn); } .kpi-ic.bad { background: var(--bad-soft); color: var(--bad); }
.kpi small { color: var(--muted); font-size: .8rem; } .kpi b { font-size: 1.25rem; line-height: 1.2; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.kpi b em { font-style: normal; color: var(--muted); font-weight: 400; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .kpi { padding: 12px; } .kpi b { font-size: 1.05rem; } .kpi-ic { width: 34px; height: 34px; } }
/* العروض المحفوظة */
.views-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -8px 0 14px; }
.views-row:empty { display: none; }
.view-chip { display: inline-flex; align-items: center; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: .84rem; }
.view-chip.on { border-color: var(--primary); background: var(--primary-soft); }
.view-chip a { display: inline-flex; gap: 5px; align-items: center; padding: 5px 4px 5px 12px; color: var(--text); font-weight: 600; }
[dir=rtl] .view-chip a { padding: 5px 12px 5px 4px; }
.view-chip form { margin: 0; } .view-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 10px; font-size: 1rem; }
.view-save { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.view-save input { margin: 0; width: 210px; padding: 6px 12px; font-size: .84rem; background: var(--surface); }
/* وسوم وعلامات */
.bcard-tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 16px 0; position: relative; z-index: 2; pointer-events: none; }
.flag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--text); font-size: .72rem; font-weight: 600; }
.flag.idle { background: color-mix(in srgb, #8b5cf6 14%, var(--surface)); color: #7c3aed; }
.flag.arch { background: var(--bad-soft); color: var(--bad); }
:root[data-theme=dark] .flag.idle { color: #c4b5fd; }
.hc-archived { flex-basis: 100%; display: flex; align-items: center; gap: 6px; color: var(--bad); font-size: .86rem; font-weight: 600; }
/* لوحة المدير */
.rev-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; font-size: .9rem; }
.rev-bars { height: 120px; margin-bottom: 14px; }
.rev-bars .bar i.USD { background: linear-gradient(var(--ok), color-mix(in srgb, var(--ok) 55%, transparent)); }
.rank li > a { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rank-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: .78rem; font-weight: 800; flex-shrink: 0; }
.rank li:first-child .rank-n { background: #f5c542; color: #3b2a00; }
/* المظهر في قائمة المستخدم */
.dd-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; font-size: .86rem; color: var(--muted); }
.dd-theme > span { display: inline-flex; gap: 6px; align-items: center; }
.ios-seg.mini { margin: 0; padding: 2px; border-radius: 10px; }
.ios-seg.mini span { padding: 4px 9px; font-size: .78rem; border-radius: 8px; }
/* الخريطة */
.map-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.map-wrap { position: relative; overflow: hidden; }
.bizmap { height: calc(100vh - 170px); min-height: 420px; }
.map-legend { position: absolute; bottom: 12px; inset-inline-start: 12px; z-index: 500; display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); font-size: .78rem; box-shadow: var(--shadow); }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; } .map-legend i { width: 10px; height: 10px; border-radius: 50%; }
.bm-pin i { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.bm-cluster span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 30%, transparent), 0 4px 12px rgba(0,0,0,.3); }
.bm-pop { display: grid; gap: 3px; font-family: inherit; min-width: 170px; } .bm-pop small { color: #777; }
.bm-st { justify-self: start; padding: 1px 8px; border-radius: 99px; color: #fff; background: var(--c); font-size: .75rem; }
.city-panel h2 { margin-top: 0; } .city-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.city-list li { display: grid; gap: 4px; } .bad-t { color: var(--bad); }
@media (max-width: 980px) { .map-page { grid-template-columns: 1fr; } .bizmap { height: 60vh; } }
/* الخرائط في الوضع الداكن */
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); } }
:root[data-theme=dark] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
.view-save { max-width: 100%; flex-wrap: wrap; } .view-save input { flex: 1 1 150px; min-width: 0; max-width: 260px; }

/* ===== v18 — بطاقات أنشطة أنظف ومؤشرات مدمجة ===== */
/* المؤشرات: سطر واحد مدمج */
.kpis { gap: 10px; margin-bottom: 14px; }
.kpi { padding: 10px 14px; border-radius: 16px; column-gap: 10px; box-shadow: none; }
.kpi-ic { width: 34px; height: 34px; border-radius: 10px; }
.kpi-ic svg { width: 16px; height: 16px; }
.kpi small { font-size: .76rem; }
.kpi b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.kpi.zero b { color: var(--muted); font-weight: 600; }

/* شريط الأدوات */
.biz-tools { gap: 8px; }
.biz-tools .search-in { flex: 1 1 320px; }
.flt-pop { position: relative; }
.flt-pop > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; background: var(--surface); border: 1px solid var(--line); }
.flt-pop > summary::-webkit-details-marker { display: none; }
.flt-pop[open] > summary { border-color: var(--primary); color: var(--primary); }
.flt-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--primary); color: var(--primary-ink); font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; }
.flt-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 45; width: 290px; padding: 14px; display: grid; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 44px -18px rgba(0,0,0,.35); animation: actIn .14s ease-out; }
.flt-f { display: grid; gap: 4px; font-size: .8rem; color: var(--muted); margin: 0; }
.flt-f select { width: 100%; margin: 0; background: var(--surface-2); border-color: transparent; }
.flt-f.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: .88rem; cursor: pointer; }
.flt-f.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.flt-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 14px; }
.flt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-size: .82rem; font-weight: 600; }
.flt-chip span { font-size: 1rem; line-height: 1; opacity: .7; } .flt-chip:hover span { opacity: 1; }
.flt-clear { font-size: .82rem; color: var(--muted); padding: 4px 6px; } .flt-clear:hover { color: var(--bad); }

/* بطاقة النشاط الجديدة */
.bz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.bz-card { --bc: var(--primary); position: relative; display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  transition: border-color .18s, box-shadow .18s, transform .18s; }
.bz-card::before { content: ""; position: absolute; inset: 0 18px auto; height: 3px; border-radius: 0 0 4px 4px; background: var(--bc); opacity: .85; }
.bz-card:hover { border-color: color-mix(in srgb, var(--bc) 35%, var(--line)); box-shadow: 0 14px 30px -22px color-mix(in srgb, var(--bc) 80%, #000); transform: translateY(-2px); }
.bz-card.picked { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.bz-card.st-archived, .bz-card.st-suspended { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.bz-card.st-archived .bz-name b, .bz-card.st-suspended .bz-name b { color: var(--muted); }
.bz-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.bz-link:focus-visible { outline: 2px solid var(--bc); outline-offset: 2px; }
.bz-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bz-head .bl { width: 46px; height: 46px; border-radius: 14px; box-shadow: none; }
.bz-head .bl:not(.ic) { border: 1px solid var(--line); }
.bz-name { flex: 1; min-width: 0; }
.bz-name b { display: block; font-size: 1rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-name small { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-card .act-menu, .bz-sel { position: relative; z-index: 3; }
.bz-card .act-menu > summary { width: 32px; height: 32px; color: var(--muted); }
.bz-card .act-menu > summary:hover { background: var(--surface-2); color: var(--text); }
/* تحديد */
.bz-sel { position: absolute; top: 10px; inset-inline-start: 10px; width: 22px; height: 22px; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.bz-sel input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.bz-sel i { width: 20px; height: 20px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line), 0 2px 6px rgba(0,0,0,.12); display: grid; place-items: center; }
.bz-sel input:checked + i { background: var(--primary); box-shadow: none; }
.bz-sel input:checked + i::after { content: "✓"; color: #fff; font-size: .75rem; font-weight: 800; }
.bz-sel input:focus-visible + i { outline: 2px solid var(--primary); }
.bz-card:hover .bz-sel, .bz-sel:has(input:checked), .has-bulk .bz-sel, .bz-card:focus-within .bz-sel { opacity: 1; }
@media (hover: none) { .bz-sel { opacity: 1; } }
/* الحالة والوسوم */
.bz-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 24px; position: relative; z-index: 2; pointer-events: none; }
.bz-meta [title] { pointer-events: auto; }
.st-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 9px; border-radius: 99px; font-size: .76rem; font-weight: 600; background: var(--surface-2); color: var(--text); }
.st-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-pill.active { background: var(--ok-soft); color: var(--ok); }
.st-pill.expiring { background: var(--warn-soft); color: var(--warn); }
.st-pill.expired, .st-pill.archived { background: var(--bad-soft); color: var(--bad); }
.st-pill.suspended { background: var(--surface-3); color: var(--muted); }
.st-pill.idle { background: color-mix(in srgb, #8b5cf6 13%, var(--surface)); color: #7c3aed; }
:root[data-theme=dark] .st-pill.idle { color: #c4b5fd; }
.bz-tag { padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 600; border: 1px solid var(--line); color: var(--muted); }
.bz-pc { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; font-size: .74rem; color: var(--muted); }
.bz-pc svg { width: 16px; height: 16px; transform: rotate(-90deg); }
.bz-pc circle { fill: none; stroke: var(--surface-3); stroke-width: 3; }
.bz-pc circle + circle { stroke: var(--accent); stroke-linecap: round; }
/* الأرقام */
.bz-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 10px 0; border-block: 1px solid var(--line); }
.bz-stats div { text-align: center; } .bz-stats div + div { border-inline-start: 1px solid var(--line); }
.bz-stats dt { font-size: .72rem; color: var(--muted); }
.bz-stats dd { margin: 0; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
/* الاشتراك */
.bz-foot { display: grid; gap: 8px; margin-top: auto; min-height: 36px; align-content: end; }
.bz-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8rem; }
.bz-plan { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.bz-plan .ios-ic { border-radius: 6px; }
.bz-sub small { color: var(--muted); font-size: .78rem; } .bz-sub .warn-t { color: var(--warn); font-weight: 700; }
.bz-bar { display: block; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bz-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.bz-bar.mid i { background: var(--warn); } .bz-bar.low i { background: var(--bad); }
@media (max-width: 760px) {
  .bz-grid { grid-template-columns: 1fr; gap: 10px; }
  .flt-panel { position: fixed; inset: auto 10px calc(var(--tabbar-h, 64px) + 10px); width: auto; }
  .biz-tools .search-in { flex-basis: 100%; }
}
.bz-card .act-menu > summary { color: var(--text); opacity: .6; } .bz-card .act-menu > summary:hover, .bz-card .act-menu[open] > summary { opacity: 1; }
@media (max-width: 760px) {
  .kpis { display: flex; overflow-x: auto; scrollbar-width: none; margin-inline: -10px; padding: 2px 10px; scroll-snap-type: x mandatory; }
  .kpis::-webkit-scrollbar { display: none; }
  .kpi { flex: 0 0 auto; min-width: 158px; scroll-snap-align: start; }
}

/* ===== v19 — صفحة النشاط بنفس الأسلوب ===== */
input[type=date], input[type=time], input[type=datetime-local] { direction: ltr; text-align: left; }
.bh { --bc: var(--primary); position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; margin-bottom: 16px; overflow: hidden; }
.bh::before { content: ""; position: absolute; inset: 0 24px auto; height: 3px; border-radius: 0 0 4px 4px; background: var(--bc); z-index: 1; }
.bh-cover { height: 110px; background-size: cover; background-position: center; }
.bh-main { display: flex; align-items: center; gap: 16px; padding: 20px 22px 16px; flex-wrap: wrap; }
.bh-cover + .bh-main { padding-top: 0; } .bh-cover + .bh-main .bh-logo { margin-top: -30px; box-shadow: 0 0 0 4px var(--surface), 0 10px 24px -12px rgba(0,0,0,.4); }
.bh-logo { width: 64px; height: 64px; border-radius: 18px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; background: var(--surface); }
.bh-logo.img { border: 1px solid var(--line); } .bh-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.bh-logo .ios-ic { width: 100%; height: 100%; border-radius: inherit; }
.bh-id { flex: 1; min-width: 220px; }
.bh-id h2 { margin: 0 0 6px; font-size: 1.35rem; line-height: 1.3; overflow-wrap: anywhere; }
.bh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .86rem; }
.bh-handle { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 99px; background: var(--surface-2); min-width: 0; max-width: 100%; }
[dir=rtl] .bh-handle { padding: 2px 10px 2px 4px; }
.bh-handle a { font-weight: 600; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-copy { border: 0; background: none; color: var(--muted); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.bh-copy:hover { background: var(--surface); color: var(--text); }
.bh-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bh-actions form { margin: 0; }
.btn.danger-t { color: var(--bad); }
.bh-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.bh-facts > div { padding: 12px 22px; min-width: 0; }
.bh-facts > div + div { border-inline-start: 1px solid var(--line); }
.bh-facts small { display: block; color: var(--muted); font-size: .74rem; margin-bottom: 2px; }
.bh-facts b { display: flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; flex-wrap: wrap; }
.bh-facts b.ell { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-facts em { font-style: normal; font-weight: 500; color: var(--muted); font-size: .8rem; }
.bh-facts .ios-ic { border-radius: 6px; }
.warn-t { color: var(--warn) !important; font-weight: 700 !important; }
.bh-arch { padding: 10px 22px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .bh-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bh-facts > div:nth-child(3) { border-inline-start: 0; } .bh-facts > div:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) {
  .bh-main { padding: 16px; gap: 12px; } .bh-logo { width: 54px; height: 54px; border-radius: 16px; }
  .bh-actions { width: 100%; } .bh-actions form { flex: 1; } .bh-actions .btn { width: 100%; justify-content: center; }
  .bh-facts > div { padding: 10px 16px; }
}
/* التبويبات */
.tabs { max-width: 100%; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 14px; transition: color .15s, background .15s; } .tabs a:not(.on):hover { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); }
/* المؤشرات داخل صفحة النشاط */
.kpi b em { font-style: normal; font-size: .8rem; color: var(--muted); font-weight: 500; margin-inline-start: 2px; }
/* الجاهزية */
.ready-card { padding: 14px 18px; gap: 14px; }
.ready-card .pm-ring { width: 50px; height: 50px; } .ready-card .pm-ring b { width: 40px; height: 40px; font-size: .74rem; }
.rc-todo a.more { background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
/* الملاحظات: سطر واحد */
.note-form { display: flex; gap: 8px; align-items: center; }
.note-form input { margin: 0; }
.note-form input[name=body] { flex: 1; min-width: 0; }
.note-form input[type=date] { width: 150px; flex-shrink: 0; }
.note-form .btn.icon { width: 42px; height: 42px; flex-shrink: 0; }
@media (max-width: 560px) { .note-form { flex-wrap: wrap; } .note-form input[name=body] { flex-basis: 100%; } .note-form input[type=date] { flex: 1; width: auto; } }
.note-form input[name=follow_up] { flex: 0 0 170px; width: 170px; }
@media (max-width: 560px) { .note-form input[name=follow_up] { flex: 1 1 auto; width: auto; } }

/* ===== v20 — معالج الإضافة بنفس الأسلوب ===== */
.wz-main { border-radius: 22px; box-shadow: none; }
.wz-steps { border-radius: 20px; box-shadow: none; }
/* أنواع النشاط: مربعات خفيفة بلا حدود (نمط شاشة iPhone) */
.cat-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cat-card > span { padding: 14px 6px 12px; gap: 8px; border: 1px solid transparent; background: var(--surface-2); border-radius: 18px; }
.cat-card > span:hover { background: color-mix(in srgb, var(--surface-2) 60%, var(--line)); border-color: transparent; transform: none; }
.cat-card .ios-ic { --s: 44px !important; }
.cat-card b { font-size: .84rem; }
.cat-card input:checked + span { background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.cat-card input:checked + span .ios-ic { transform: scale(1.06); }
/* المعاينة مثل بطاقة النشاط في القائمة */
.biz-prev { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; padding: 18px 16px 16px; border-radius: 20px; box-shadow: none; position: relative; }
.biz-prev::before { content: ""; position: absolute; inset: 0 18px auto; height: 3px; border-radius: 0 0 4px 4px; background: var(--bc); }
.bp-cover { display: none; }
.bp-logo { width: 54px; height: 54px; margin: 0; border-radius: 16px; box-shadow: none; }
.bp-body { padding: 0; min-width: 0; gap: 0; }
.bp-body b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-body small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.bp-body p:empty { display: none; } .bp-body p { font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bp-link { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 99px; background: var(--surface-2); color: var(--primary); font-size: .78rem; max-width: 100%; }
.bp-link:empty { display: none; }
.bp-meta { margin-top: 4px; }
.bp-pass { grid-column: 1 / -1; margin: 16px 0 0; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, var(--bc), color-mix(in srgb, var(--bc) 70%, #000)); box-shadow: 0 12px 24px -16px var(--bc); }
.wz-preview .sticky > small { font-weight: 600; }
/* حقل اسم المستخدم: البادئة أخف */
.handle-in { background: var(--surface-2); border-color: transparent; }
.handle-in .hp-pre { font-size: .8rem; opacity: .8; }
@media (max-width: 760px) {
  .cat-card > span { background: none; }
  .cat-card input:checked + span { background: var(--primary-soft); border-color: transparent; box-shadow: none; }
}

/* ===== v21 — لوحة المدير بنفس الأسلوب ===== */
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.dash-head h2 { margin: 0; font-size: 1.35rem; } .dash-head p { margin: 2px 0 0; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.dash-main, .dash-side { display: grid; gap: 16px; min-width: 0; }
.dash-grid .panel { margin: 0; box-shadow: none; border-radius: 20px; }
.dash-grid .panel-h { margin-bottom: 8px; }
.empty-line { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: .88rem; }
.empty-line svg { flex-shrink: 0; opacity: .7; } .empty-line.ok { background: var(--ok-soft); color: var(--ok); }
.dlist { list-style: none; margin: 0; padding: 0; display: grid; }
.dlist li + li { border-top: 1px solid var(--line); }
.dlist li > a { display: flex; align-items: center; gap: 12px; padding: 10px 4px; color: var(--text); border-radius: 12px; min-width: 0; }
.dlist li > a:hover { background: var(--surface-2); }
.dlist .ios-ic { border-radius: 11px; }
.dl-t { flex: 1; min-width: 0; } .dl-t b { display: block; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-t small { display: block; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-n { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.dlist .st-pill { flex-shrink: 0; white-space: nowrap; }
.attn-n { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 99px; background: var(--bad-soft); color: var(--bad); font-weight: 800; font-size: .8rem; display: inline-grid; place-items: center; }
.sys { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sys li { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 8px 4px; }
.sys li i { grid-row: 1 / 3; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.sys li.bad i { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.sys b { font-size: .9rem; } .sys small { color: var(--muted); font-size: .78rem; } .sys li.bad small { color: var(--bad); }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } .dash-side { order: -1; } }
.dash-grid .rev-bars { height: 90px; margin-bottom: 10px; } .dash-grid .rev-head { margin-top: 2px; }

/* ===== v22 — سجل العمليات كخط زمني ===== */
.log-chips { margin-bottom: 16px; }
.log-chips .chip { gap: 6px; }
.timeline { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 6px 18px 12px; }
.tl-day { margin: 14px 0 4px; font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; position: sticky; top: 92px; background: var(--surface); padding: 4px 0; z-index: 2; }
.tl-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; position: relative; }
.tl-row + .tl-row { border-top: 1px solid var(--line); }
.tl-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.tl-ic.ok { background: var(--ok-soft); color: var(--ok); } .tl-ic.warn { background: var(--warn-soft); color: var(--warn); } .tl-ic.bad { background: var(--bad-soft); color: var(--bad); }
.tl-body { min-width: 0; } .tl-body p { margin: 0; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-body a { font-weight: 600; }
.tl-det { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-meta { display: grid; justify-items: end; font-size: .78rem; color: var(--muted); text-align: end; }
.tl-meta time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.pager { display: flex; align-items: center; gap: 8px; margin-top: 14px; } .pager small { margin-inline-end: auto; }
@media (max-width: 560px) { .timeline { padding: 4px 12px 8px; } .tl-body p { white-space: normal; } }

/* ===== v23 — صفحة انضمام الزبون ===== */
/* حقل الفخ المخفي: بلا إزاحة (كان يسبب تمريراً أفقياً بعرض 10000px في الصفحات العربية) */
.hp { position: absolute !important; left: auto !important; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
.jn { --bc: var(--primary); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 1000px; margin: 0 auto; padding: 16px; }
.jn-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0 18px; }
.jn-biz { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.jn-biz b { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .jn-biz small { color: var(--muted); font-size: .78rem; }
.jn-logo { width: 42px; height: 42px; border-radius: 13px; overflow: hidden; display: grid; place-items: center; background: var(--surface); flex-shrink: 0; border: 1px solid var(--line); }
.jn-logo .ios-ic { width: 100%; height: 100%; border-radius: inherit; } .jn-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.jn-logo:has(.ios-ic) { border: 0; }
.jn-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; align-items: center; }
.jn-card { display: grid; justify-items: center; gap: 18px; }
.jn-pass { width: 100%; max-width: 340px; transform: rotate(-3deg); filter: drop-shadow(0 30px 40px color-mix(in srgb, var(--bc) 35%, transparent)); transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
[dir=ltr] .jn-pass { transform: rotate(3deg); }
.jn-card:hover .jn-pass { transform: rotate(0) translateY(-4px); }
.jn-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.jn-perks li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; }
.jn-perks svg { color: var(--bc); }
.jn-form { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px; display: grid; gap: 14px; position: relative; overflow: hidden; }
.jn-form::before { content: ""; position: absolute; inset: 0 24px auto; height: 3px; border-radius: 0 0 4px 4px; background: var(--bc); }
.jn-form h1 { margin: 0; font-size: 1.45rem; line-height: 1.3; }
.jn-sub { margin: -8px 0 4px; color: var(--muted); font-size: .92rem; }
.jn-form label { margin: 0; }
.jn-opt { display: grid; gap: 14px; padding-top: 2px; }
.jn-consent { display: flex !important; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--surface-2); font-size: .84rem; color: var(--text); cursor: pointer; }
.jn-consent input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--bc); }
.jn-cta { background: var(--bc) !important; border-color: transparent !important; box-shadow: 0 14px 28px -14px var(--bc) !important; gap: 8px; }
.jn-wallets { display: flex; justify-content: center; gap: 16px; margin: -4px 0 0; color: var(--muted); font-size: .76rem; font-weight: 600; }
.jn-wallets span + span::before { content: "·"; margin-inline-end: 16px; }
.jn-foot { text-align: center; padding: 22px 0 8px; color: var(--muted); font-size: .8rem; }
@media (max-width: 820px) {
  .jn { padding: 12px 14px; }
  .jn-main { grid-template-columns: 1fr; gap: 22px; align-items: start; }
  .jn-pass { max-width: 300px; }
  .jn-form { padding: 20px; border-radius: 22px; }
}
@media (max-width: 820px) {
  .jn-pass { max-width: 232px; transform: rotate(-2deg); }
  [dir=ltr] .jn-pass { transform: rotate(2deg); }
  .jn-perks { display: none; }
  .jn-main { gap: 16px; }
  .jn-top { padding-bottom: 12px; }
}

/* ===== v24 — صفحة الانضمام: حركات عصرية بنمط الهاتف ===== */
body.joinpage { overflow-x: hidden; }
body.joinpage::before { content: ""; position: fixed; inset: -20% -20% auto; height: 70vh; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 40%, color-mix(in srgb, var(--pbg, var(--primary)) 22%, transparent), transparent 70%); animation: jxGlow 8s ease-in-out infinite alternate; }
@keyframes jxGlow { to { transform: translateY(4vh) scale(1.08); opacity: .7; } }
.jx { --pbg: var(--primary); --pfg: #fff; --plb: #f5c27a; --ease: cubic-bezier(.22,1,.36,1); --spring: cubic-bezier(.34,1.56,.64,1);
  position: relative; z-index: 1; max-width: 460px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); }
.jx-in { opacity: 0; transform: translateY(14px); animation: jxUp .6s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 80ms + 120ms); }
@keyframes jxUp { to { opacity: 1; transform: none; } }
/* الشريط العلوي */
.jx-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.jx-biz { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.jx-biz b { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .jx-biz small { color: var(--muted); font-size: .76rem; }
.jx-logo { width: 42px; height: 42px; border-radius: 13px; overflow: hidden; display: grid; place-items: center; background: var(--surface); flex-shrink: 0; box-shadow: 0 4px 14px rgba(60,30,10,.08); }
.jx-logo .ios-ic { width: 100%; height: 100%; border-radius: inherit; } .jx-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.jx-lang { position: relative; display: flex; padding: 3px; border-radius: 99px; background: var(--surface); box-shadow: 0 2px 10px rgba(60,30,10,.07); flex-shrink: 0; }
.jx-lang a { position: relative; z-index: 1; padding: 6px 10px; border-radius: 99px; font-size: .76rem; font-weight: 600; color: var(--muted); transition: color .3s; background: none !important; }
.jx-lang a.on { color: #fff; }
.jx-lang .pill { position: absolute; top: 3px; bottom: 3px; border-radius: 99px; background: var(--pbg); transition: all .45s var(--spring); }
.jx-lang:not(.ready) a.on { background: var(--pbg) !important; }
/* العنوان */
.jx-hero { text-align: center; margin: 22px 0 6px; }
.jx-eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--pbg); background: color-mix(in srgb, var(--pbg) 10%, transparent); padding: 3px 12px; border-radius: 99px; }
.jx-hero h1 { margin: 8px 0 0; font-size: 1.65rem; line-height: 1.35; letter-spacing: -.02em; font-weight: 700; }
.jx-hero p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
/* البطاقة */
.jx-stage { perspective: 1000px; margin: 18px auto 0; touch-action: pan-y; }
.jx-pass { position: relative; border-radius: 22px; padding: 16px 18px 14px; background: var(--pbg); color: var(--pfg); overflow: hidden;
  box-shadow: 0 28px 50px -22px color-mix(in srgb, var(--pbg) 75%, #000), 0 8px 20px rgba(0,0,0,.08);
  transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out;
  animation: jxCard .55s var(--spring) .15s both; }
@keyframes jxCard { from { opacity: 0; transform: translateY(18px) rotate(-3deg) scale(.96); } }
.jx-pass.float { animation: jxFloat 5s ease-in-out infinite; }
@keyframes jxFloat { 50% { translate: 0 -6px; } }
.jx-pass::before { content: ""; position: absolute; inset: -85px -125px auto auto; width: 250px; height: 250px; border: 35px solid rgba(255,255,255,.05); border-radius: 50%; pointer-events: none; }
.jx-pass::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.25) 48%, transparent 60%); transform: translateX(120%); animation: jxShine 5s ease-in-out 1.6s infinite; }
[dir=rtl] .jx-pass::after { animation-name: jxShineR; }
@keyframes jxShine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes jxShineR { 0%, 60% { transform: translateX(120%); } 100% { transform: translateX(-120%); } }
.jx-pass-top, .jx-pass-bottom { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jx-pass-brand { display: flex; align-items: center; gap: 8px; min-width: 0; } .jx-pass-brand img { height: 26px; max-width: 80px; object-fit: contain; }
.jx-pass-brand b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jx-badge { font-size: .66rem; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.14); color: var(--plb); white-space: nowrap; }
.jx-stamps { position: relative; display: grid; grid-template-columns: repeat(var(--cols, 8), minmax(0, 1fr)); gap: 7px; margin: 18px 0 14px; }
.jx-stamps i { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--pfg) 40%, transparent); display: grid; place-items: center; font-style: normal; font-size: .66rem; color: color-mix(in srgb, var(--pfg) 65%, transparent);
  opacity: 0; transform: scale(.4); animation: jxPop .45s var(--spring) forwards; animation-delay: calc(var(--i) * 55ms + 550ms); }
.jx-stamps i.gift { background: var(--plb); border-color: transparent; color: var(--pbg); animation: jxPop .45s var(--spring) forwards, jxTwinkle 2.4s ease-in-out 1.8s infinite; animation-delay: calc(var(--i) * 55ms + 550ms), 1.8s; }
@keyframes jxPop { to { opacity: 1; transform: scale(1); } }
@keyframes jxTwinkle { 50% { transform: scale(1.12) rotate(10deg); } }
.jx-big { position: relative; margin: 16px 0 12px; } .jx-big small { display: block; font-size: .7rem; color: var(--plb); } .jx-big b { font-size: 1.5rem; line-height: 1.3; }
.jx-pass-bottom b { font-size: .8rem; font-weight: 500; max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jx-pass-bottom span { font-size: .74rem; color: var(--plb); white-space: nowrap; }
/* النموذج */
.jx-sheet { margin-top: 20px; padding: 20px 18px 16px; border-radius: 26px; background: var(--surface); box-shadow: 0 -10px 40px rgba(60,30,10,.05), 0 10px 30px rgba(60,30,10,.05); border: 1px solid var(--line); }
.jx-sheet form { display: grid; gap: 12px; }
.jx-f { position: relative; }
.jx-f input { width: 100%; height: 56px; margin: 0; padding: 20px 16px 6px; border: 1.5px solid transparent; border-radius: 16px; background: var(--surface-2); font: inherit; font-size: 16px; color: var(--text); outline: none; transition: border-color .25s, background .25s, box-shadow .25s; }
.jx-f label { position: absolute; inset-inline-start: 16px; top: 17px; font-size: .94rem; color: var(--muted); pointer-events: none; transition: all .25s var(--ease); margin: 0; }
.jx-f input:focus { border-color: var(--pbg); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pbg) 14%, transparent); }
.jx-f input:focus ~ label, .jx-f input:not(:placeholder-shown) ~ label, .jx-f.date input[type=date] ~ label { top: 7px; font-size: .7rem; font-weight: 700; color: var(--pbg); }
.jx-f input[dir=ltr] { text-align: right; } [dir=ltr] .jx-f input[dir=ltr] { text-align: left; }
.jx-hint { position: absolute; inset-inline-end: 16px; top: 18px; font-size: .86rem; color: var(--muted); opacity: .6; pointer-events: none; transition: opacity .2s; }
.jx-f input:focus ~ .jx-hint, .jx-f input:not(:placeholder-shown) ~ .jx-hint { opacity: 0; }
.jx-f .field-err { margin-top: 6px; }
.jx-f.shake input { animation: jxShake .4s; }
@keyframes jxShake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.jx-more { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .86rem; cursor: pointer; }
.jx-more > span { display: inline-flex; align-items: center; gap: 7px; } .jx-more small { font-size: .74rem; opacity: .8; }
.jx-more > svg:last-child { transition: transform .25s var(--ease); } .jx-more[aria-expanded=true] > svg:last-child { transform: rotate(180deg); }
.jx-more > span svg { color: var(--pbg); }
.jx-opt { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s var(--ease); margin-top: -8px; }
.jx-opt.open { grid-template-rows: 1fr; }
.jx-opt-in { overflow: hidden; display: grid; gap: 12px; min-height: 0; }
.jx-opt.open .jx-opt-in { padding-top: 2px; }
.jx-cta { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; margin-top: 4px; border: 0; border-radius: 18px;
  background: var(--pbg); color: var(--pfg); font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--pbg) 85%, transparent); transition: transform .2s var(--spring), filter .2s; }
.jx-cta:hover { filter: brightness(1.05); } .jx-cta:active { transform: scale(.97); }
.jx-cta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.3) 50%, transparent 70%); transform: translateX(100%); animation: jxSweep 3.2s ease-in-out 2.4s infinite; }
@keyframes jxSweep { 0%, 70% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
.jx-cta .spin { display: none; width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.jx-cta.loading .txt, .jx-cta.loading > svg { display: none; } .jx-cta.loading .spin { display: block; }
.jx-cta.sm { height: 50px; font-size: .98rem; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.4); transform: scale(0); animation: jxRip .6s ease-out forwards; pointer-events: none; }
@keyframes jxRip { to { transform: scale(4); opacity: 0; } }
.jx-note { margin: 0; text-align: center; color: var(--muted); font-size: .76rem; line-height: 1.6; }
.jx-wallets { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.jx-wallets span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 10px; background: #111; color: #fff; font-size: .72rem; font-weight: 600; direction: ltr; }
:root[data-theme=dark] .jx-wallets span { background: #000; border: 1px solid #333; }
.jx-how { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px auto 0; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 99px; background: none; color: var(--text); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.jx-how:hover { background: var(--surface); } .jx-how svg { color: var(--pbg); }
.jx-foot { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 8px; }
/* اللوح السفلي */
.jx-layer { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.jx-scrim { position: absolute; inset: 0; background: rgba(20,12,8,.45); backdrop-filter: blur(2px); animation: jxFade .22s ease-out; }
.jx-bottom { position: relative; width: 100%; max-width: 460px; padding: 10px 22px calc(20px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--surface);
  box-shadow: 0 -20px 40px -20px rgba(0,0,0,.35); animation: jxSheetUp .32s var(--ease); transition: transform .2s; }
.jx-layer.closing .jx-scrim { animation: jxFade .22s ease-in reverse forwards; } .jx-layer.closing .jx-bottom { animation: jxSheetDown .22s ease-in forwards; }
@keyframes jxFade { from { opacity: 0; } } @keyframes jxSheetUp { from { transform: translateY(100%); } } @keyframes jxSheetDown { to { transform: translateY(100%); } }
.jx-handle { display: block; width: 42px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 12px; }
.jx-bottom-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; } .jx-bottom-h h2 { margin: 0; font-size: 1.15rem; }
.jx-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.jx-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 4px; }
.jx-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; opacity: 0; transform: translateY(10px); animation: jxUp .4s var(--ease) forwards; animation-delay: calc(var(--i) * 80ms + 120ms); }
.jx-steps li + li { border-top: 1px solid var(--line); }
.jx-steps li > span { width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--pbg) 12%, transparent); color: var(--pbg); }
.jx-steps b { display: block; font-size: .95rem; } .jx-steps p { margin: 2px 0 0; color: var(--muted); font-size: .84rem; }
@media (min-width: 900px) { .jx { padding-top: 36px; } .jx-hero h1 { font-size: 1.9rem; } }
@media (max-width: 370px) { .jx { padding-inline: 14px; } .jx-hero h1 { font-size: 1.4rem; } .jx-lang a { padding: 6px 8px; } .jx-stamps { gap: 5px; } }
@media (prefers-reduced-motion: reduce) { .jx *, .jx *::before, .jx *::after, body.joinpage::before { animation: none !important; transition: none !important; opacity: 1 !important; } .jx-in, .jx-stamps i { transform: none !important; } }
[dir=rtl] .jx-hint { left: 16px; right: auto; } [dir=ltr] .jx-hint { right: 16px; left: auto; }
/* لون مميّز يبقى مقروءاً في الوضع الداكن حتى لو كان لون البطاقة غامقاً */
.jx { --pac: var(--pbg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .jx { --pac: color-mix(in srgb, var(--pbg) 45%, #fff); } }
:root[data-theme=dark] .jx { --pac: color-mix(in srgb, var(--pbg) 45%, #fff); }
.jx-eyebrow { color: var(--pac); background: color-mix(in srgb, var(--pac) 14%, transparent); }
.jx-f input:focus ~ label, .jx-f input:not(:placeholder-shown) ~ label, .jx-f.date input[type=date] ~ label { color: var(--pac); }
.jx-f input:focus { border-color: var(--pac); }
.jx-more > span svg, .jx-how svg, .jx-steps li > span { color: var(--pac); }
.jx-steps li > span { background: color-mix(in srgb, var(--pac) 14%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .jx-pass { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 28px 50px -22px #000; } }
:root[data-theme=dark] .jx-pass { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 28px 50px -22px #000; }
/* احتفال بعد التسجيل */
.celebrate { --pbg: var(--primary); display: grid; justify-items: center; gap: 4px; text-align: center; padding: 6px 0 4px; animation: jxUp .5s cubic-bezier(.22,1,.36,1) both; }
.celebrate b { font-size: 1.15rem; } .celebrate small { color: var(--muted); }
.cel-check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--pbg) 14%, var(--surface)); animation: jxPop .6s cubic-bezier(.34,1.56,.64,1) both; transform: scale(.4); opacity: 0; }
.cel-check svg { width: 32px; fill: none; stroke: var(--pbg); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: celDraw .5s ease .35s forwards; }
@keyframes celDraw { to { stroke-dashoffset: 0; } }
.confetti { position: fixed; top: -20px; width: 8px; height: 14px; border-radius: 2px; z-index: 200; pointer-events: none; animation: confFall linear forwards; }
@keyframes confFall { to { transform: translate3d(var(--x), 105vh, 0) rotate(var(--r)); opacity: .9; } }
/* حركات هادئة: تعمل عند الدخول فقط، وتتوقف أثناء الكتابة */
body.joinpage::before { animation: none; }
.jx-pass::after, [dir=rtl] .jx-pass::after { animation-iteration-count: 1; animation-duration: 1.6s; animation-delay: .9s; animation-fill-mode: both; }
.jx-pass.float { animation: jxFloat 5s ease-in-out 2; }
.jx-stamps i.gift { animation: jxPop .45s var(--spring) forwards, jxTwinkle 1.2s ease-in-out 1.8s 2; }
.jx-cta::before { animation-iteration-count: 1; animation-delay: 1.8s; }
.jx.typing .jx-pass, .jx.typing .jx-pass.float { animation-play-state: paused; transform: none; }
.jx.typing .jx-stage { opacity: .92; transition: opacity .3s; }

/* ===== v25 — صفحة البطاقة: فتح المحفظة تلقائياً ===== */
.pw .celebrate { margin: 18px 0 4px; }
.pw-title { text-align: center; margin: 20px 0 6px; } .pw-title h1 { margin: 0; font-size: 1.5rem; } .pw-title p { margin: 4px 0 0; font-size: .9rem; }
.pw-box { margin-top: 16px; padding: 18px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; box-shadow: 0 10px 30px rgba(60,30,10,.05); }
.pw-ok { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--ok-soft); color: var(--ok); }
.pw-ok b, .pw-ok small { display: block; } .pw-ok small { color: var(--text); opacity: .75; font-size: .8rem; }
.pw-btns { display: grid; gap: 10px; }
.wl-btn { display: flex; align-items: center; justify-content: center; gap: 12px; height: 58px; border-radius: 16px; background: #111; color: #fff !important; font-weight: 700; font-size: 1.05rem; direction: ltr; transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; }
.wl-btn span { display: grid; line-height: 1.15; text-align: left; } .wl-btn small { font-size: .68rem; font-weight: 500; opacity: .8; }
.wl-btn:active { transform: scale(.97); }
.wl-btn.google { background: #fff; color: #1f1f1f !important; border: 1px solid #dadce0; }
:root[data-theme=dark] .wl-btn.google { background: #202124; color: #fff !important; border-color: #3c4043; }
.pw-btns.has-main .wl-btn:not(.is-main) { height: 46px; font-size: .9rem; opacity: .85; }
.pw-btns.has-main .wl-btn:not(.is-main) svg { width: 18px; height: 18px; }
.wl-btn.is-main { box-shadow: 0 12px 26px -12px rgba(0,0,0,.55); }
.wl-btn.pulse { animation: wlPulse 1.2s ease-in-out 3; }
@keyframes wlPulse { 50% { transform: scale(1.03); box-shadow: 0 0 0 6px color-mix(in srgb, var(--pbg) 25%, transparent); } }
.pw-btns.dim { opacity: .45; }
/* الفتح التلقائي */
.pw-auto { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); animation: jxUp .4s cubic-bezier(.22,1,.36,1) both; }
.pw-auto > div { flex: 1; min-width: 0; } .pw-auto b, .pw-auto small { display: block; } .pw-auto small { color: var(--muted); font-size: .8rem; }
.pw-ring { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.pw-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pw-ring circle { fill: none; stroke: var(--line); stroke-width: 3; }
.pw-ring .pw-ring-p { stroke: var(--pbg); stroke-linecap: round; stroke-dasharray: 100.5; stroke-dashoffset: 100.5; animation: pwRing 1.6s linear forwards; }
@keyframes pwRing { to { stroke-dashoffset: 0; } }
.pw-ring-ic { position: absolute; inset: 0; display: grid; place-items: center; } .pw-ring-ic svg { width: 20px; height: 20px; transform: none; }
.pw-auto.done .pw-ring { display: none; }
.pw-cancel { border: 0; background: none; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; padding: 6px; }
.pw-auto.fired .pw-cancel { visibility: hidden; }
/* متصفح التطبيقات */
.pw-inapp { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: var(--warn-soft); }
.pw-warn { color: var(--warn); flex-shrink: 0; } .pw-inapp b, .pw-inapp small { display: block; } .pw-inapp small { font-size: .8rem; color: var(--muted); }
.pw-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; } .pw-tip { font-size: .76rem; }
/* الكمبيوتر */
.pw-desk { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; background: var(--surface-2); }
.pw-desk .qr { width: 104px; height: 104px; flex-shrink: 0; padding: 8px; background: #fff; border-radius: 12px; }
.pw-desk .qr img, .pw-desk .qr svg { width: 100%; height: 100%; display: block; }
.pw-desk b, .pw-desk small { display: block; } .pw-desk small { color: var(--muted); font-size: .8rem; }
/* بطاقة الويب */
.pw-web { margin-top: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.pw-web > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; font-weight: 600; font-size: .92rem; }
.pw-web > summary::-webkit-details-marker { display: none; }
.pw-web > summary span { flex: 1; } .pw-web > summary small { display: block; font-weight: 400; color: var(--muted); font-size: .76rem; }
.pw-web > summary > svg:last-child { transition: transform .25s; } .pw-web[open] > summary > svg:last-child { transform: rotate(180deg); }
.pw-web-in { padding: 0 16px 16px; animation: jxUp .3s cubic-bezier(.22,1,.36,1); }
.pw-pass { max-width: 320px; margin: 0 auto 8px; }

/* ===== v27 — بطاقاتي + طريقة الكسب ===== */
.cd-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cd-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .88rem; }
.cd-tabs a.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.cd-tabs i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.cd-hero { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 28px; align-items: center; padding: 24px; margin-bottom: 16px; border-radius: 24px; border: 1px solid var(--line);
  background: radial-gradient(500px 260px at 0% 0%, color-mix(in srgb, var(--pbg) 14%, transparent), transparent 70%), var(--surface); }
.cd-pass { filter: drop-shadow(0 22px 30px color-mix(in srgb, var(--pbg) 30%, transparent)); transform: rotate(-2deg); transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
[dir=ltr] .cd-pass { transform: rotate(2deg); } .cd-hero:hover .cd-pass { transform: none; }
.cd-info h2 { margin: 10px 0 2px; font-size: 1.45rem; } .cd-info > p { margin: 0; }
.cd-rule { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: .88rem; }
.cd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 18px 0 0; }
.cd-stats div { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); }
.cd-stats dt { font-size: .76rem; color: var(--muted); } .cd-stats dd { margin: 2px 0 0; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .cd-hero { grid-template-columns: 1fr; padding: 18px; gap: 18px; } .cd-pass { max-width: 300px; margin: 0 auto; } }
/* نموذج طريقة الكسب */
.cd-earn { display: grid; gap: 16px; }
.cd-earn .panel-h h2 { margin: 0; } .cd-earn .panel-h p { margin: 2px 0 0; }
.earn { display: grid; gap: 14px; }
.earn-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.earn-mode { position: relative; margin: 0; }
.earn-mode input { position: absolute; opacity: 0; }
.earn-mode > span { position: relative; display: grid; gap: 4px; padding: 16px; height: 100%; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .3s cubic-bezier(.34,1.56,.64,1); }
.earn-mode > span:active { transform: scale(.98); }
.earn-mode i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); margin-bottom: 4px; transition: .2s; }
.earn-mode b { font-size: .98rem; color: var(--text); } .earn-mode small { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.earn-mode input:checked + span { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.earn-mode input:checked + span i { background: var(--primary); color: var(--primary-ink); }
.earn-mode input:checked + span .cc-check { transform: scale(1); }
.earn-mode input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.earn-pane { display: grid; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface-2); animation: jxUp .3s cubic-bezier(.22,1,.36,1); }
.earn-eq { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; }
.earn-eq input { width: 90px; margin: 0; text-align: center; font-weight: 700; font-size: 1.05rem; background: var(--surface); }
.earn-eq input.wide { width: 150px; }
.earn-eq b { font-size: 1.3rem; color: var(--primary); }
.earn-check { display: flex !important; gap: 10px; align-items: flex-start; cursor: pointer; margin: 0; }
.earn-check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--primary); flex-shrink: 0; }
.earn-check b, .earn-check small { display: block; } .earn-check b { color: var(--text); font-size: .9rem; } .earn-check small { color: var(--muted); font-size: .8rem; }
.earn-pane .split { margin: 0; } .earn-pane label input { background: var(--surface); }
.earn-try { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px dashed var(--line); }
.et-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.earn-try > div { flex: 1; min-width: 0; } .earn-try small { color: var(--muted); font-size: .76rem; }
.et-in { display: flex; align-items: center; gap: 8px; } .et-in input { width: 130px; margin: 0; padding: 6px 10px; }
.et-in span { color: var(--muted); font-size: .86rem; }
.et-out { font-size: 1.05rem; color: var(--muted); white-space: nowrap; transition: color .2s, transform .3s cubic-bezier(.34,1.56,.64,1); }
.et-out.ok { color: var(--ok); }
.earn-more { margin: 0; }
.earn-mult { max-width: 280px; margin: 0 0 12px !important; }
.earn-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px !important; }
.earn-days label { margin: 0; } .earn-days input { position: absolute; opacity: 0; }
.earn-days span { display: inline-block; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--muted); }
.earn-days input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.earn-days input:focus-visible + span { outline: 2px solid var(--primary); }
@media (max-width: 760px) { .earn-modes { grid-template-columns: 1fr; } .earn-mode > span { grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; } .earn-mode i { grid-row: 1 / 3; margin: 0; } .earn-try { flex-wrap: wrap; } }
/* الماسح */
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 1.3rem; font-weight: 700; cursor: pointer; color: var(--text); }
.qty input { width: 80px; margin: 0; text-align: center; font-size: 1.1rem; font-weight: 700; }
.earn-prev { display: block; font-size: .84rem; color: var(--muted); margin-top: 6px; font-weight: 600; }
.earn-prev.ok { color: var(--ok); }
/* الماسح: الحقل ثم المعاينة ثم الزر بعرض كامل */
.sr-act:has(input[name=amount]) { display: grid !important; grid-template-columns: 1fr; gap: 8px; }
.sr-act:has(input[name=amount]) > input, .sr-act .qty { width: 100%; }
.sr-act .qty input { flex: 1; width: auto; }
.sr-act:has(input[name=amount]) .btn { width: 100%; justify-content: center; min-height: 50px; }
.sr-act .earn-prev { margin: 0; text-align: center; font-size: .9rem; }
.sr-act:has(input[name=amount]) > input { max-width: none; }

/* ===== v28 — القائمة الجانبية: ثابتة أثناء التمرير، قابلة للطي، بحث سريع ===== */
@media (min-width: 761px) {
  /* إصلاح: «inset:auto» القديمة كانت تلغي top فلا تثبت القائمة */
  .bq-rail { position: sticky !important; top: var(--gap) !important; align-self: flex-start; height: calc(100dvh - var(--gap) * 2) !important; max-height: calc(100vh - var(--gap) * 2);
    display: flex !important; flex-direction: column; transition: width .28s cubic-bezier(.22,1,.36,1), padding .28s; z-index: 30; }
  .bq-rail nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; margin-inline: -4px; padding-inline: 4px; }
}
.bq-rail { box-shadow: 0 10px 40px -24px rgba(60,30,10,.35); }
.bq-rail .brand { position: relative; gap: 10px; }
.rail-fold { margin-inline-start: auto; width: 30px; height: 30px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: transform .28s cubic-bezier(.22,1,.36,1), color .2s, background .2s; }
.rail-fold:hover { color: var(--text); background: var(--surface-2); }
[dir=ltr] .rail-fold svg { transform: rotate(180deg); }
@media (max-width: 760px) { .rail-fold { display: none; } }
/* زر البحث */
.rail-search { display: flex; align-items: center; gap: 10px; width: 100%; margin: 12px 0 6px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font: inherit; font-size: .86rem; cursor: pointer; transition: border-color .2s, background .2s; }
.rail-search:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); background: var(--surface); }
.rail-search kbd, .palette kbd { margin-inline-start: auto; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font: 600 .7rem/1.6 system-ui, sans-serif; color: var(--muted); }
/* العناصر */
.bq-rail nav a { position: relative; transition: background .18s, color .18s, transform .18s; }
.bq-rail nav a:not(.on):hover { transform: translateX(-2px); }
[dir=ltr] .bq-rail nav a:not(.on):hover { transform: translateX(2px); }
.bq-rail nav a .nav-ic { position: relative; display: grid; place-items: center; flex-shrink: 0; transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.bq-rail nav a:hover .nav-ic { transform: scale(1.1); }
.bq-rail nav a .rail-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .7rem; font-weight: 800; display: inline-grid; place-items: center; line-height: 1; }
.bq-rail nav a.on .nb { background: #fff; color: var(--primary); }
.nb-dot { position: absolute; top: -3px; inset-inline-end: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--surface); display: none; }
/* الوضع المطوي */
@media (min-width: 761px) {
  .rail-mini .bq-rail { width: 76px !important; padding-inline: 10px; }
  .rail-mini .bq-rail .rail-txt, .rail-mini .bq-rail .nb { display: none !important; }
  .rail-mini .bq-rail .brand { flex-direction: column; gap: 10px; padding-bottom: 12px; }
  .rail-mini .rail-fold svg { transform: rotate(180deg); } [dir=ltr] .rail-mini .rail-fold svg { transform: none; }
  .rail-mini .rail-search { justify-content: center; padding: 10px 0; }
  .rail-mini .bq-rail nav { overflow: visible; }
  .rail-mini .bq-rail nav a { justify-content: center; padding: 11px 0; }
  .rail-mini .bq-rail nav a:hover { transform: none; }
  .rail-mini .nb-dot { display: block; }
  .rail-mini .bq-rail-card { justify-content: center; padding: 10px 0; background: none; }
  /* تلميح عند المرور */
  .rail-mini [data-tip] { position: relative; }
  .rail-mini [data-tip]:hover::after { content: attr(data-tip); position: absolute; top: 50%; inset-inline-start: calc(100% + 12px); transform: translateY(-50%); padding: 6px 10px; border-radius: 9px; background: var(--text); color: var(--surface);
    font-size: .8rem; font-weight: 600; white-space: nowrap; pointer-events: none; z-index: 60; box-shadow: 0 8px 20px -8px rgba(0,0,0,.4); animation: tipIn .15s ease-out; }
}
@keyframes tipIn { from { opacity: 0; } }
/* لوحة البحث السريع */
.palette { width: min(560px, calc(100vw - 24px)); max-height: min(520px, 80vh); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); overflow: hidden; }
.palette[open] { animation: palIn .18s cubic-bezier(.22,1,.36,1); }
@keyframes palIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.palette::backdrop { background: rgba(20,12,8,.4); backdrop-filter: blur(3px); }
.pal-in { display: flex; flex-direction: column; max-height: inherit; }
.pal-search { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-search input { flex: 1; margin: 0; border: 0 !important; box-shadow: none !important; background: none; font-size: 1rem; color: var(--text); padding: 4px 0; outline: none; }
.pal-search kbd { margin: 0; }
.pal-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.pal-list li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text); }
.pal-list li[aria-selected=true] a { background: var(--primary-soft); color: var(--primary); }
.pal-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex-shrink: 0; }
.pal-list li[aria-selected=true] .pal-ic { background: var(--primary); color: var(--primary-ink); }
.pal-t { min-width: 0; } .pal-t b { display: block; font-size: .92rem; font-weight: 600; } .pal-t small { display: block; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-empty { padding: 18px; text-align: center; color: var(--muted); }
.pal-foot { display: flex; gap: 16px; margin: 0; padding: 8px 16px; border-top: 1px solid var(--line); font-size: .74rem; color: var(--muted); }
.pal-foot kbd { margin: 0 2px; }
@media (max-width: 760px) { .rail-search kbd { display: none; } .palette { margin-top: 8vh; } }
/* لا حركة للسهم قبل أول رسم */
body:not(.ready) .opt-box > summary::after, body:not(.ready) .pw-web > summary > svg:last-child { transition: none !important; }
.earn-night { display: flex; align-items: center; gap: 6px; margin: -4px 0 8px !important; color: var(--warn); font-weight: 600; }
.earn-night[hidden] { display: none; }
.sub-alert { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--info-soft); color: var(--text); border: 1px solid var(--line); }
.sub-alert > span { flex: 1; min-width: 200px; } .sub-alert svg { color: var(--warn); flex-shrink: 0; }
.sub-alert.urgent { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.cd-pass { position: relative; }
.cd-demo { position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(2deg); z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 99px; background: var(--text); color: var(--surface); font-size: .72rem; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 14px -6px rgba(0,0,0,.4); }
[dir=ltr] .cd-demo { transform: translateX(-50%) rotate(-2deg); }
.cd-stats small { display: block; color: var(--muted); font-size: .7rem; margin-top: 2px; }
/* رابط المشاركة: يظهر من البداية ولا يُقصّ */
.share .copy input { text-align: left; direction: ltr; font-weight: 600; text-overflow: ellipsis; }

/* ===== v30 — نجاح الإضافة للمحفظة + منع التكرار ===== */
.pw-done { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(20,12,8,0); backdrop-filter: blur(0); transition: background .3s, backdrop-filter .3s; }
.pw-done.on { background: rgba(20,12,8,.45); backdrop-filter: blur(6px); }
.pw-done-card { width: min(380px, 100%); padding: 28px 22px 20px; border-radius: 28px; background: var(--surface); text-align: center; display: grid; gap: 10px; justify-items: center;
  box-shadow: 0 40px 80px -24px rgba(0,0,0,.5); transform: translateY(30px) scale(.94); opacity: 0; transition: transform .45s cubic-bezier(.34,1.56,.64,1), opacity .25s; }
.pw-done.on .pw-done-card { transform: none; opacity: 1; }
.pw-done-ring { width: 84px; height: 84px; }
.pw-done-ring svg { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pw-done-ring circle { stroke: var(--ok); stroke-width: 3; fill: color-mix(in srgb, var(--ok) 12%, transparent); stroke-dasharray: 151; stroke-dashoffset: 151; }
.pw-done-ring path { stroke: var(--ok); stroke-width: 4; stroke-dasharray: 40; stroke-dashoffset: 40; }
.pw-done.on .pw-done-ring circle { animation: dnRing .6s cubic-bezier(.65,0,.35,1) .15s forwards; }
.pw-done.on .pw-done-ring path { animation: dnRing .35s cubic-bezier(.65,0,.35,1) .65s forwards; }
@keyframes dnRing { to { stroke-dashoffset: 0; } }
.pw-done-card b { font-size: 1.3rem; } .pw-done-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.pw-done-tips { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 6px; width: 100%; text-align: start; }
.pw-done-tips li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: .84rem; }
.pw-done-tips svg { color: var(--ok); flex-shrink: 0; }
.pw-done .jx-cta { margin-top: 6px; }
/* لديك بطاقة بالفعل */
.jx-mine { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 6px 0; }
.jx-mine-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.jx-mine b { font-size: 1.1rem; display: block; } .jx-mine small { color: var(--muted); }
.jx-mine .jx-cta { text-decoration: none; }
.jx-other { font-size: .84rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
/* تأكيد الرقم */
.jx-confirm { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); }
.jx-confirm b { color: var(--warn); } .jx-confirm small { color: var(--text); font-size: .84rem; }
.jx-num { font-size: 1.35rem; font-weight: 800; letter-spacing: .04em; text-align: center; padding: 6px; border-radius: 12px; background: var(--surface); }
.jx-confirm .jx-consent { background: var(--surface); }
/* الزبائن المكررون */
.dup-box { margin-bottom: 14px; padding: 14px 16px; border-radius: 18px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line)); }
.dup-box h3 { margin: 0 0 4px; font-size: .98rem; display: flex; gap: 8px; align-items: center; } .dup-box h3 svg { color: var(--warn); }
.dup-box > p { margin: 0 0 10px; font-size: .84rem; color: var(--muted); }
.dup-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: var(--surface); margin-top: 8px; }
.dup-row .dup-c { flex: 1; min-width: 180px; display: grid; } .dup-row .dup-c small { color: var(--muted); }
.dup-row form { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.dup-vs { color: var(--muted); font-weight: 700; }
.jx-confirm .jx-consent { padding: 12px; border-radius: 12px; gap: 10px; align-items: center; } .jx-confirm .jx-consent input { width: 20px; height: 20px; margin: 0; accent-color: var(--warn); }

/* ===== v31 — تقرير الفحص ===== */
/* المخطط: محور قيم + تلميح عند المرور + أيام فارغة */
.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: stretch; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; padding: 10px 0 20px; font-size: .66rem; color: var(--muted); text-align: end; font-variant-numeric: tabular-nums; min-width: 22px; }
.chart .bars { position: relative; background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(50% - 1px), var(--line) calc(50% - 1px), var(--line) 50%); background-size: 100% calc(100% - 20px); background-repeat: no-repeat; overflow: visible; }
.chart .bar { position: relative; cursor: default; outline: none; }
.chart .bar.zero i { min-height: 0; height: 0 !important; }
.chart .bar:hover i, .chart .bar:focus-visible i { filter: brightness(1.15); }
.chart .bar[data-tip]:hover::after, .chart .bar[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% - 6px); left: 50%; transform: translateX(-50%); padding: 5px 9px; border-radius: 8px;
  background: var(--text); color: var(--surface); font-size: .74rem; font-weight: 600; white-space: nowrap; z-index: 5; pointer-events: none; direction: rtl; }
[dir=ltr] .chart .bar[data-tip]:hover::after { direction: ltr; }
.chart-empty { margin-top: 6px; }
/* الماسح: لم يتم العثور */
.sr-none { display: grid; justify-items: center; gap: 4px; padding: 14px; text-align: center; color: var(--bad); }
.sr-none small { color: var(--muted); } .sr-none[hidden] { display: none; }
/* الزبائن: ترتيب الأعمدة */
.th-sort { color: inherit; display: inline-flex; gap: 4px; align-items: center; } .th-sort.on { color: var(--primary); }
/* تحذير الحماية */
.earn-warn { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); }
.earn-warn > svg { color: var(--warn); flex-shrink: 0; } .earn-warn span { flex: 1; min-width: 200px; } .earn-warn b, .earn-warn small { display: block; } .earn-warn small { color: var(--muted); font-size: .8rem; }
.earn-warn[hidden] { display: none; }
/* التقارير */
.rep-tools { flex-wrap: wrap; gap: 10px; } .rep-range { display: flex; align-items: center; gap: 6px; margin: 0; } .rep-range label { margin: 0; } .rep-range input { margin: 0; padding: 6px 10px; width: auto; }
/* الإعدادات: الشعار */
.logo-up { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .logo-up small { flex-basis: 100%; }
.logo-prev { width: 64px; height: 64px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); }
.logo-prev img { width: 100%; height: 100%; object-fit: contain; padding: 4px; } .logo-prev .ios-ic { width: 100%; height: 100%; border-radius: inherit; }
.pw-eye.on { color: var(--primary); }
/* المهام: السحب */
.task[draggable=true] { cursor: grab; } .task.dragging { opacity: .45; } .col.drop-on { outline: 2px dashed var(--primary); outline-offset: -4px; background: var(--primary-soft); }
.task.dropped { animation: jxUp .3s ease; }
/* الخصوصية */
.legal { max-width: 720px; margin: 0 auto; padding: 28px 18px 60px; } .legal h1 { margin: 6px 0 2px; } .legal section { margin-top: 20px; }
.legal h2 { font-size: 1.05rem; margin: 0 0 4px; } .legal p { margin: 0; line-height: 1.8; } .legal-back { font-size: .86rem; }
.cd-scope { margin: 10px 0 -8px; }

/* ===== v32 — مسار الكاونتر الأسرع ===== */
.auto-add { display: flex !important; gap: 12px; align-items: center; margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); cursor: pointer; color: var(--text); }
.auto-add b, .auto-add small { display: block; } .auto-add b { font-size: .9rem; } .auto-add small { font-size: .76rem; }
.sr-actions { display: flex; flex-direction: column; }
.sr-act.is-reward .btn { background: linear-gradient(135deg, #f5b301, #e58a06); color: #3b2a00; border-color: transparent; box-shadow: 0 12px 24px -12px #e58a06; font-weight: 800; animation: rwPulse 1.6s ease-in-out 2; }
@keyframes rwPulse { 50% { transform: scale(1.02); } }
.sr-act .btn[disabled] { opacity: .45; cursor: not-allowed; }
.sr-hint { display: block; text-align: center; color: var(--muted); font-size: .76rem; margin-top: 4px; }
.sr-act:not(:has(input)) { flex-wrap: wrap; } .sr-act:not(:has(input)) .sr-hint { flex-basis: 100%; }
.undo-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin: 10px 0; border-radius: 14px; background: var(--text); color: var(--surface); animation: jxUp .25s ease; }
.undo-bar .btn { background: rgba(255,255,255,.15); color: inherit; border-color: transparent; }
.undo-bar[hidden] { display: none; }
/* حقول التاريخ: تلميح واضح بدل نص Chrome المقلوب */
.dt-wrap { position: relative; display: block; }
.dt-wrap > input { width: 100%; margin: 0; cursor: pointer; }
label > .dt-wrap { margin-top: 6px; }
.dt-wrap.dt-empty > input::-webkit-datetime-edit { color: transparent; opacity: 0; }
.dt-wrap.dt-empty::before { content: attr(data-ph); position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; pointer-events: none; z-index: 1; white-space: nowrap; }
.note-form .dt-wrap { flex: 0 0 170px; } .rep-range .dt-wrap, .inline-date .dt-wrap { display: inline-block; }
.jx-f.date > label { top: 7px; font-size: .7rem; font-weight: 700; color: var(--pac, var(--primary)); }
.jx-f.date .dt-wrap.dt-empty::before { top: auto; bottom: 9px; transform: none; inset-inline-start: 16px; }
.jx-f .dt-wrap > input { width: 100%; }
.dt-wrap.dt-empty > input::-webkit-datetime-edit-day-field:focus, .dt-wrap.dt-empty > input::-webkit-datetime-edit-month-field:focus, .dt-wrap.dt-empty > input::-webkit-datetime-edit-year-field:focus, .dt-wrap.dt-empty > input::-webkit-datetime-edit-hour-field:focus, .dt-wrap.dt-empty > input::-webkit-datetime-edit-minute-field:focus { background: transparent; color: transparent; }
.cp-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); }
.cp-act { display: flex; gap: 6px; margin: 0; } .cp-act input { width: 110px; margin: 0; }
.btn.reward { background: linear-gradient(135deg, #f5b301, #e58a06); color: #3b2a00; border-color: transparent; font-weight: 700; }
.attn-strip { margin-bottom: 16px; } .attn-strip h2 { font-size: 1rem; margin: 0 0 8px; }
.attn-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.attn-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: transform .15s, border-color .15s; }
.attn-item:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.attn-item b, .attn-item small { display: block; } .attn-item b { font-size: .9rem; } .attn-item small { color: var(--muted); font-size: .76rem; }
.attn-item > span:nth-child(2) { flex: 1; min-width: 0; }
.ai-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); }
.attn-item.warn .ai-ic { background: var(--warn-soft); color: var(--warn); } .attn-item.ok .ai-ic { background: var(--ok-soft); color: var(--ok); } .attn-item.bad .ai-ic { background: var(--bad-soft); color: var(--bad); }
.ai-go { color: var(--muted); font-size: 1.3rem; } [dir=rtl] .ai-go { transform: scaleX(-1); }
.cust-bulk input[name=message] { width: min(320px, 50vw); margin: 0; padding: 7px 12px; border-radius: 10px; background: rgba(255,255,255,.12); color: inherit; border: 0; } .cust-bulk input::placeholder { color: rgba(255,255,255,.6); } .cust-bulk[hidden] { display: none; }
.wl-other { border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px; justify-self: center; } .wl-btn[hidden] { display: none; }

/* ===== محرّر الصفحة الرئيسية ===== */
.ed-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.ed-kpi { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; min-width: 0; }
.ed-kpi small { display: block; color: var(--muted); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ed-kpi b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.ed-kpi > span:nth-child(2) { min-width: 0; flex: 1; }
.ed-kpi-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.ed-kpi.link:hover { border-color: var(--primary); } .ed-kpi.link > svg { color: var(--muted); }
.ed-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
.ed-bar { position: sticky; top: calc(var(--gap) + 76px); z-index: 5; display: grid; gap: 8px; margin-bottom: 12px; padding: 8px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px); border: 1px solid var(--line); }
.ed-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.ed-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 11px; color: var(--muted); text-decoration: none; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.ed-tabs a:hover { color: var(--text); background: var(--surface-2); } .ed-tabs a.on { background: var(--primary-soft); color: var(--primary); }
.ed-el { display: flex; align-items: center; gap: 4px; padding-inline: 6px; flex-wrap: wrap; }
.ed-el > span { margin-inline-end: 6px; }
.ed-el button { font: inherit; font-size: .82rem; font-weight: 600; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.ed-el button.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.ed-el button[lang=ckb] { font-family: "Vazirmatn", Tahoma, sans-serif; } .ed-el button[lang=en] { font-family: "Inter", system-ui, sans-serif; }
.ed-form { display: grid; gap: 12px; }
.ed-form .panel { margin: 0; display: grid; gap: 12px; } .ed-form h3 { font-size: 1rem; margin: 0; } .ed-form h3 small { font-weight: 400; }
.ed-f { display: grid; gap: 6px; } .ed-l { font-size: .86rem; font-weight: 600; } .ed-l small { color: var(--muted); font-weight: 400; }
[data-el=ar] .ed-f [data-el]:not([data-el=ar]), [data-el=en] .ed-f [data-el]:not([data-el=en]), [data-el=ckb] .ed-f [data-el]:not([data-el=ckb]) { display: none; }
.ed-f [lang=ckb] { font-family: "Vazirmatn", Tahoma, sans-serif; } .ed-f [lang=en] { font-family: "Inter", system-ui, sans-serif; }
.ed-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .ed-split3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ed-save { position: sticky; bottom: 12px; z-index: 4; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: var(--panel-shadow); }
.ed-save [data-dirty-note] { color: var(--warn); font-weight: 600; }
.ed-list { gap: 10px !important; } .ed-list-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ed-items { display: grid; gap: 8px; }
.ed-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ed-item[open] { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.ed-item > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 6px 8px; cursor: pointer; min-height: 46px; }
.ed-item > summary::-webkit-details-marker { display: none; }
.ed-item > summary b { flex: 1; min-width: 0; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-item-body { display: grid; gap: 12px; padding: 4px 14px 14px; }
.ed-item-act { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.ed-item-act .danger { color: var(--bad); }
.ed-drag { display: grid; place-items: center; width: 28px; height: 32px; color: var(--muted); cursor: grab; touch-action: none; border-radius: 8px; }
.ed-drag:hover { background: var(--surface-2); }
.dragging { opacity: .6; box-shadow: var(--shadow-lg); }
.ed-reset { justify-self: start; color: var(--muted); }
.ed-empty-note { margin: 0; }
.ed-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-icons label { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; color: var(--muted); }
.ed-icons input { position: absolute; opacity: 0; width: 0; height: 0; }
.ed-icons label:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.ed-icons label:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.ed-secs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ed-sec { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); min-height: 52px; }
.ed-sec.fixed { background: var(--surface-2); border-style: dashed; } .ed-sec.fixed .ed-drag { cursor: default; }
.ed-sec b { font-size: .92rem; } .ed-sec .ed-item-act .switch { margin-inline-start: 8px; }
.ed-sec-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.ed-sec:has(.switch input:not(:checked)) b, .ed-sec:has(.switch input:not(:checked)) .ed-sec-ic { opacity: .45; }
.ed-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ed-choice label { cursor: pointer; } .ed-choice input { position: absolute; opacity: 0; }
.ed-choice span { display: grid; gap: 4px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); height: 100%; } .ed-choice span svg { color: var(--primary); }
.ed-choice small { color: var(--muted); }
.ed-choice input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.ed-choice input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.ed-colors { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ed-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.ed-preset { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: .84rem; cursor: pointer; color: var(--text); }
.ed-preset span { display: flex; } .ed-preset i { width: 14px; height: 14px; border-radius: 50%; margin-inline-end: -4px; box-shadow: 0 0 0 2px var(--surface); }
.ed-preset:hover { border-color: var(--primary); }
.ed-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .ed-shots > div { display: grid; gap: 8px; }
.ed-serp { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; color: #202124; font-family: Arial, sans-serif; }
.ed-serp small { color: #4d5156; font-size: .78rem; } .ed-serp b { display: block; color: #1a0dab; font-size: 1.15rem; font-weight: 400; margin: 2px 0; } .ed-serp p { margin: 0; color: #4d5156; font-size: .86rem; }
.ed-preview { position: sticky; top: calc(var(--gap) + 76px); display: grid; gap: 10px; }
.ed-pv-bar { display: flex; align-items: center; gap: 8px; } .ed-pv-bar .ios-seg { margin: 0; } .ed-pv-state { flex: 1; }
.ed-pv-stage { position: relative; height: calc(100vh - 250px); min-height: 420px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.ed-pv-stage iframe { position: absolute; top: 0; inset-inline-start: 0; border: 0; transform-origin: top left; background: #fff; }
[dir=rtl] .ed-pv-stage iframe { transform-origin: top right; }
.ed-pv-stage.mobile { background: repeating-linear-gradient(45deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); }
.ed-pv-stage.mobile iframe { inset-inline-start: 50%; translate: 50% 0; border-inline: 1px solid var(--line); }
[dir=ltr] .ed-pv-stage.mobile iframe { translate: -50% 0; }
.ed-pv-chart { padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.ed-pv-chart .chart { height: 90px; }
.ed-toast { position: fixed; bottom: 24px; left: 50%; translate: -50% 20px; z-index: 90; padding: 10px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s; box-shadow: var(--shadow-lg); }
.ed-toast.on { opacity: 1; translate: -50% 0; } .ed-toast.bad { background: var(--bad); color: #fff; }
@media (max-width: 1280px) { .ed-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .ed-wrap { grid-template-columns: 1fr; } .ed-preview { position: static; order: -1; } .ed-pv-stage { height: 460px; }
  .ed-bar { top: calc(var(--gap) + 66px); }
}
@media (max-width: 760px) {
  .ed-kpis { grid-template-columns: 1fr 1fr; } .ed-split, .ed-split3, .ed-choice, .ed-shots { grid-template-columns: 1fr; }
  .ed-pv-stage { height: 380px; min-height: 0; } .ed-pv-chart { display: none; }
}

/* ===== طلبات الحساب ===== */
.ld-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ld-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--muted); font-weight: 600; font-size: .86rem; }
.ld-tabs a.on { background: var(--text); color: var(--bg); border-color: var(--text); } .ld-tabs a em { font-style: normal; opacity: .7; font-variant-numeric: tabular-nums; }
.ld-list { display: grid; gap: 10px; }
.ld-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.ld-row.new { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); box-shadow: inset 3px 0 0 var(--primary); }
[dir=rtl] .ld-row.new { box-shadow: inset -3px 0 0 var(--primary); }
.ld-main b { font-size: 1rem; } .ld-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.ld-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ld-act select { width: auto; padding: 7px 10px; font-size: .85rem; }
.ld-note { grid-column: 2 / -1; display: flex; gap: 8px; } .ld-note input { padding: 8px 12px; font-size: .88rem; }
@media (max-width: 760px) { .ld-row { grid-template-columns: auto 1fr; } .ld-act { grid-column: 1 / -1; justify-content: flex-start; } .ld-note { grid-column: 1 / -1; } }

/* ===== القائمة الجانبية v2: شعار واحد، مجموعات، زر الطي في الأسفل ===== */
.bq-rail .brand { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 2px 8px 16px; margin-bottom: 12px; text-decoration: none; color: var(--text); }
.bq-rail .brand.has-logo .brand-logo { max-height: 42px; max-width: 170px; width: auto; }
.brand-mini { display: none; }
.brand-fav { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; display: block; flex-shrink: 0; }
.bq-rail .brand .rail-txt b { font-size: 1.05rem; }
.bq-rail .rail-search { margin-top: 0; }
.bq-rail .nav-cap { display: block; padding: 14px 12px 6px; font-size: .7rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; text-transform: none; }
.bq-rail nav a.on { box-shadow: 0 6px 14px -10px var(--primary); }
.rail-fold { display: flex; align-items: center; gap: 10px; width: 100%; height: auto; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; border: 0;
  background: none; color: var(--muted); font: inherit; font-size: .86rem; font-weight: 500; cursor: pointer; }
.rail-fold:hover { background: var(--surface-2); color: var(--text); }
.bq-rail-card + .rail-fold { margin-top: 6px; }
.bq-rail-card { margin-top: 10px; }
@media (min-width: 761px) {
  .rail-mini .bq-rail .brand { justify-content: center; padding: 2px 0 14px; flex-direction: row; }
  .rail-mini .bq-rail .brand.has-logo .brand-mini { display: block; }
  .rail-mini .bq-rail .brand .brand-logo { display: none !important; }
  .rail-mini .bq-rail .nav-cap { font-size: 0; padding: 0; height: 1px; background: var(--line); margin: 10px 14px; }
  .rail-mini .rail-fold { justify-content: center; padding: 10px 0; }
  .rail-mini .rail-fold svg { transform: rotate(180deg); }
  [dir=ltr] .rail-mini .rail-fold svg { transform: none; }
}
@media (max-width: 760px) { .rail-fold { display: none !important; } }
/* سهم زر الطي يشير لاتجاه الحركة: للطي نحو حافة القائمة، وللتوسيع عكسها */
[dir=rtl] .rail-fold svg { transform: rotate(180deg) !important; }
[dir=ltr] .rail-fold svg { transform: none !important; }
[dir=rtl] .rail-mini .rail-fold svg { transform: none !important; }
[dir=ltr] .rail-mini .rail-fold svg { transform: rotate(180deg) !important; }
/* شروط الاشتراك */
.terms .legal-body h2 { font-size: 1.12rem; margin: 26px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.terms .legal-body h2:first-child { border-top: 0; padding-top: 0; margin-top: 8px; }
.terms .legal-body p + p { margin-top: 8px; }
.terms .legal-body ul { margin: 8px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; line-height: 1.8; }
.terms-toc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; margin: 18px 0 8px; padding: 16px 18px; border-radius: 16px; background: var(--surface-2); font-size: .9rem; }
.terms-toc a { color: var(--text); text-decoration: none; } .terms-toc a:hover { color: var(--primary); }
@media (max-width: 600px) { .terms-toc { grid-template-columns: 1fr; } }
.ed-videos { display: grid; gap: 10px; }
