/* =========================================================
   منصة العرب — نظام تصميم اللوحة (RTL، فاتح/داكن)
   ========================================================= */
:root {
  --brand: #0ea5e9;
  --brand-2: #6366f1;
  --brand-ink: #0369a1;
  --grad: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e5eaf2;
  --text: #0f172a;
  --muted: #64748b;
  --ok: #059669;  --ok-bg: #ecfdf5;  --ok-line: #a7f3d0;
  --bad: #dc2626; --bad-bg: #fef2f2; --bad-line: #fecaca;
  --warn: #b45309; --warn-bg: #fffbeb; --warn-line: #fde68a;
  --info: #0369a1; --info-bg: #f0f9ff; --info-line: #bae6fd;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --side-w: 260px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; --surface: #111a2e; --surface-2: #0f172a; --line: #1e293b;
    --text: #e2e8f0; --muted: #94a3b8; --brand-ink: #7dd3fc;
    --ok-bg: rgba(5,150,105,.12); --ok-line: rgba(5,150,105,.35); --ok: #34d399;
    --bad-bg: rgba(220,38,38,.12); --bad-line: rgba(220,38,38,.35); --bad: #f87171;
    --warn-bg: rgba(180,83,9,.14); --warn-line: rgba(180,83,9,.4); --warn: #fbbf24;
    --info-bg: rgba(14,165,233,.12); --info-line: rgba(14,165,233,.35); --info: #7dd3fc;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-size: 15px; line-height: 1.7;
}
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.35; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.08rem; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; direction: ltr; unicode-bidi: embed; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: .5rem } .mt-2 { margin-top: 1rem } .mt-3 { margin-top: 1.5rem }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: .5rem } .mb-2 { margin-bottom: 1rem }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
@media (max-width: 960px) { .grid-main, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- البطاقات ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.card + .card { margin-top: 1rem; }
.card-title { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.05rem; margin-bottom: 1rem; }
.card-title i { color: var(--brand); }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-title { padding: 1rem 1.25rem 0; }
.section-anchor { scroll-margin-top: 80px; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .7rem 1.15rem; border-radius: 11px; border: 1px solid transparent;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(14,165,233,.35); outline-offset: 1px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(99,102,241,.25); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(99,102,241,.35); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.btn-danger:hover { background: var(--bad); color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-sm { padding: .4rem .75rem; font-size: .85rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-google { background: #fff; color: #1f2937; border-color: #dadce0; }
.btn-google:hover { background: #f8fafc; }
.btn-google .g { width: 18px; height: 18px; }

/* ---------- النماذج ---------- */
.field { margin-bottom: 1rem; }
.field > label, .label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .35rem; }
.hint { color: var(--muted); font-size: .82rem; margin-top: .3rem; }
.input, select.input, textarea.input {
  width: 100%; padding: .72rem .9rem; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface-2); color: var(--text); font: inherit; transition: border-color .15s, background .15s;
}
.input:focus { border-color: var(--brand); background: var(--surface); outline: none; }
textarea.input { min-height: 110px; resize: vertical; }
.input[readonly] { opacity: .85; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 0 11px 11px 0; }
.input-group .addon { display: flex; align-items: center; padding: 0 .8rem; border: 1px solid var(--line); border-left: 0;
  background: var(--surface); border-radius: 0 11px 11px 0; color: var(--muted); font-weight: 700; }
.input-group .addon + .input { border-radius: 11px 0 0 11px; }
.input-group .btn-addon { border-radius: 11px 0 0 11px; border: 1px solid var(--line); border-right: 0; background: var(--surface); color: var(--muted); padding: 0 .9rem; cursor: pointer; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: .35rem; width: 17px; height: 17px; accent-color: var(--brand); }
.otp-input { text-align: center; font-size: 1.9rem; letter-spacing: .6em; font-weight: 800; direction: ltr; padding-left: 1.2em; }
.strength { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: .45rem; }
.strength > span { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }

/* ---------- التنبيهات ---------- */
.alert { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem 1rem; border-radius: 12px; border: 1px solid; margin-bottom: 1rem; font-weight: 600; }
.alert i { margin-top: .3rem; }
.alert .x { margin-inline-start: auto; background: none; border: 0; color: inherit; cursor: pointer; font-size: 1.1rem; opacity: .6; }
.alert-success { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.alert-danger { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.alert-warning { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.alert-info { background: var(--info-bg); border-color: var(--info-line); color: var(--info); }

/* ---------- الشارات ---------- */
.badge { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 800; border: 1px solid transparent; white-space: nowrap; }
.st-Pending, .st-Processing { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.st-In-progress { background: #eef2ff; color: #4f46e5; border-color: #c7d2fe; }
.st-Completed { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.st-Partial { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.st-Canceled { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.badge-muted { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
@media (prefers-color-scheme: dark) { .st-In-progress { background: rgba(99,102,241,.15); color: #a5b4fc; border-color: rgba(99,102,241,.4); } }

/* ---------- الجداول ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: right; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; color: var(--muted);
  background: var(--surface-2); padding: .7rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .75rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .link-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: left; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .5; }

/* ---------- التبويبات والصفحات ---------- */
.tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs a { padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; font-size: .88rem; text-decoration: none; }
.tabs a.active { background: var(--grad); color: #fff; border-color: transparent; }
.pagination { display: flex; gap: .35rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; text-align: center; padding: .4rem .7rem; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- الإحصائيات ---------- */
.stat { display: flex; gap: .9rem; align-items: center; }
.stat .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; color: #fff; background: var(--grad); flex: none; }
.stat .val { font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.stat .lbl { color: var(--muted); font-size: .84rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; word-break: break-word; }

.desc-box { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: .9rem 1rem; white-space: pre-line; font-size: .9rem; max-height: 220px; overflow: auto; }
.charge-box { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1rem; border-radius: 12px; background: var(--info-bg); border: 1px solid var(--info-line); font-weight: 800; }
.charge-box .amount { font-size: 1.35rem; color: var(--brand-ink); direction: ltr; }
.keybox { display: flex; gap: .5rem; align-items: center; padding: .75rem .9rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); direction: ltr; font-family: ui-monospace, monospace; word-break: break-all; }
pre.code { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: 12px; overflow-x: auto; direction: ltr; text-align: left; font-size: .84rem; line-height: 1.6; margin: .5rem 0 1rem; }

/* ---------- تخطيط اللوحة ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  position: fixed; inset-block: 0; right: 0; width: var(--side-w); background: var(--surface);
  border-left: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; transition: transform .25s ease;
}
.side .brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.2rem; font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.side .brand img { width: 34px; height: 34px; border-radius: 10px; }
.side nav { padding: .75rem; overflow-y: auto; flex: 1; }
.side nav .group { font-size: .74rem; font-weight: 800; color: var(--muted); padding: .9rem .75rem .35rem; }
.side nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 10px; color: var(--text); font-weight: 700; text-decoration: none; margin-bottom: 2px; }
.side nav a i { width: 20px; text-align: center; color: var(--muted); }
.side nav a:hover { background: var(--surface-2); }
.side nav a.active { background: var(--info-bg); color: var(--brand-ink); }
.side nav a.active i { color: var(--brand); }
.side .side-foot { padding: .9rem 1.2rem; border-top: 1px solid var(--line); font-size: .85rem; }
.main { flex: 1; margin-right: var(--side-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .75rem; padding: .75rem 1.5rem;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .burger { display: none; background: none; border: 0; font-size: 1.3rem; color: var(--text); cursor: pointer; padding: .3rem; }
.topbar .page-title { font-weight: 800; font-size: 1.1rem; }
.balance-pill { margin-inline-start: auto; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 800; text-decoration: none !important; }
.user-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none !important; }
.content { padding: 1.5rem; max-width: 1200px; width: 100%; margin: 0 auto; flex: 1; }
.overlay { display: none; }
@media (max-width: 900px) {
  .side { transform: translateX(100%); }
  body.nav-open .side { transform: none; box-shadow: -10px 0 30px rgba(0,0,0,.15); }
  body.nav-open .overlay { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 35; }
  .main { margin-right: 0; }
  .topbar .burger { display: block; }
  .content { padding: 1rem; }
  .user-chip span { display: none; }
}
.foot { text-align: center; padding: 1.2rem; color: var(--muted); font-size: .84rem; }

/* ---------- صفحات الدخول ---------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem;
  background: radial-gradient(1200px 600px at 100% -10%, rgba(99,102,241,.18), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(14,165,233,.18), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card { padding: 1.75rem; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin-bottom: 1.25rem; text-decoration: none !important; color: var(--text); }
.auth-brand img { width: 64px; height: 64px; border-radius: 18px; box-shadow: var(--shadow); }
.auth-brand b { font-size: 1.2rem; }
.auth-title { text-align: center; margin-bottom: .25rem; font-size: 1.35rem; }
.auth-sub { text-align: center; color: var(--muted); margin-bottom: 1.25rem; font-size: .92rem; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .82rem; margin: 1.1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social { display: grid; gap: .6rem; }
.tg-wrap { display: flex; justify-content: center; min-height: 40px; }
.auth-foot { text-align: center; margin-top: 1rem; font-size: .92rem; }
.auth-links { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; font-size: .82rem; }
.auth-links a { color: var(--muted); }
.pending-tg { display: flex; gap: .6rem; align-items: center; padding: .7rem .9rem; border-radius: 12px; background: var(--info-bg); border: 1px solid var(--info-line); color: var(--info); margin-bottom: 1rem; font-weight: 700; font-size: .9rem; }

/* ---------- الجلسات والمحادثة ---------- */
.session-item { display: flex; gap: .9rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.session-item:last-child { border-bottom: 0; }
.session-item .dev { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--brand); font-size: 1.1rem; flex: none; border: 1px solid var(--line); }
.session-item .current { color: var(--ok); font-weight: 800; font-size: .8rem; }
.thread { display: flex; flex-direction: column; gap: .75rem; }
.msg { max-width: 85%; padding: .75rem 1rem; border-radius: 14px; white-space: pre-wrap; word-break: break-word; }
.msg.me { align-self: flex-start; background: var(--info-bg); border: 1px solid var(--info-line); }
.msg.staff { align-self: flex-end; background: var(--surface-2); border: 1px solid var(--line); }
.msg .meta { font-size: .76rem; color: var(--muted); margin-top: .35rem; }

.service-group summary { cursor: pointer; font-weight: 800; padding: .9rem 1.25rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.service-group summary::-webkit-details-marker { display: none; }
.service-group[open] summary { border-bottom: 1px solid var(--line); }
.svc-desc { white-space: pre-line; color: var(--muted); font-size: .84rem; max-width: 420px; }

/* إصلاحات */
.table td.ltr, .table th.ltr { display: table-cell; text-align: right; }
dd.ltr { display: block; }
@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stat { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .stat .val { font-size: 1.1rem; }
  .card { padding: 1rem; }
}

/* ---------- البحث المنسدل ---------- */
.ac-wrap { position: relative; }
.ac-results { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 50; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; padding: .3rem; }
.ac-item { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; width: 100%; text-align: right; background: none; border: 0;
  padding: .55rem .7rem; border-radius: 9px; cursor: pointer; font: inherit; color: var(--text); }
.ac-item:hover, .ac-item.active { background: var(--info-bg); }
.ac-name { font-weight: 700; font-size: .9rem; }
.ac-meta { color: var(--muted); font-size: .78rem; }
.ac-empty { padding: .7rem; color: var(--muted); text-align: center; font-size: .88rem; }

/* ---------- اختيارات على شكل أزرار ---------- */
.pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pills label { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface-2); cursor: pointer; font-weight: 700; font-size: .9rem; }
.pills input { accent-color: var(--brand); }
.pills label:has(input:checked) { border-color: var(--brand); background: var(--info-bg); color: var(--brand-ink); }
.kind-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 700; font-size: .88rem; cursor: pointer; }
.kind-tab input { display: none; }
.kind-tab.active, .kind-tab:has(input:checked) { background: var(--grad); color: #fff; border-color: transparent; }
input[type=range] { width: 100%; accent-color: var(--brand); margin-top: .5rem; }

/* ---------- نافذة منبثقة ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; background: rgba(15,23,42,.45); }
.modal-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 18px; padding: 1.5rem; box-shadow: 0 20px 50px rgba(0,0,0,.25); text-align: center; }
.modal-card .big { font-size: 2.2rem; margin-bottom: .3rem; }

/* ---------- نافذة المستويات ---------- */
.pop { position: relative; cursor: pointer; }
.pop-body { display: none; position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 60; width: 270px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: .8rem; cursor: default; }
.pop:hover .pop-body, .pop.open .pop-body { display: block; }
.tier-row { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem .5rem; border-radius: 9px; font-size: .86rem; }
.tier-row.current { background: var(--info-bg); font-weight: 800; }
.tier-row .muted { font-size: .78rem; }

/* ---------- مجموعات القائمة القابلة للطي ---------- */
.nav-group summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary i { font-size: .7rem; transition: transform .2s; }
.nav-group[open] summary i { transform: rotate(180deg); }

/* ---------- الصفحات العامة ---------- */
.cookie { position: fixed; inset-inline: 0; bottom: 0; z-index: 90; background: rgba(15,23,42,.95); color: #fff; padding: 1rem 1.2rem;
  text-align: center; font-size: .9rem; }
.cookie a { color: #7dd3fc; }
.hero { text-align: center; padding: 1.5rem 1rem 1rem; }
.hero img { width: 96px; height: 96px; border-radius: 26px; box-shadow: var(--shadow); }
.hero h1 { font-size: 1.8rem; margin: .8rem 0 .4rem; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 1rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.bot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.bot-card { display: flex; flex-direction: column; gap: .5rem; }
.bot-card .head { display: flex; align-items: center; gap: .7rem; }
.bot-card .emoji { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--info-bg); flex: none; }
.bot-card h3 { margin: 0; font-size: 1.05rem; }
.bot-card .handle { font-size: .82rem; color: var(--brand-ink); direction: ltr; }
.bot-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.bot-card details summary { cursor: pointer; color: var(--brand-ink); font-weight: 700; font-size: .88rem; }
.bot-card details div { white-space: pre-line; font-size: .9rem; margin-top: .5rem; }
.bot-card .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: auto; padding-top: .4rem; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.check-list li::before { content: "✅ "; }
.prose { line-height: 1.95; }
.prose h3 { margin-top: 1.3rem; color: var(--brand-ink); }
.prose ul { padding-inline-start: 1.2rem; }
.video-frame { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gift-number { font-size: 2rem; font-weight: 800; color: var(--brand-ink); text-align: center; margin-top: 1rem; }
.gift-number.final { color: var(--ok); }

/* ===== الدفع بالعملات المشفرة ===== */
.coin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.coin { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.coin input { position: absolute; opacity: 0; pointer-events: none; }
.coin:has(input:checked) { border-color: var(--brand); background: var(--info-bg); box-shadow: 0 0 0 2px var(--info-line); }
.coin span small { display: block; color: var(--muted); font-size: .75rem; }
.coin-ico { background: var(--brand); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .68rem; color: #fff; flex: none; }
.coin-usdt { background: #26a17b; } .coin-trx { background: #e50914; } .coin-ltc { background: #345d9d; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 .8rem; border: 1px solid var(--line); border-left: 0; border-radius: 0 10px 10px 0; background: var(--surface-2); font-weight: 800; }
.input-group .input { border-radius: 10px 0 0 10px; }
.quick-amounts { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.inv-list { list-style: none; margin: 0; padding: 0; }
.inv-list li a { display: flex; align-items: center; gap: .4rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); color: inherit; text-decoration: none; font-size: .9rem; }
.inv-list li .badge { margin-inline-start: auto; }
.inv-waiting { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.inv-confirming { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.inv-paid { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.inv-expired, .inv-failed { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.invoice .card-title .badge { margin-inline-start: auto; }
.inv-grid { display: grid; grid-template-columns: 260px 1fr; gap: 1.25rem; align-items: start; }
.qr-box { text-align: center; padding: .8rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.qr-box img { display: block; width: 100%; max-width: 230px; height: auto; margin: 0 auto; image-rendering: pixelated; }
.qr-box .muted { color: #666; }
.copy-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.copy-row code { flex: 1 1 auto; min-width: 0; word-break: break-all; font-weight: 800; background: none; }
.copy-row code.big { font-size: 1.35rem; }
.copy-row .coin-tag { font-weight: 900; color: var(--brand-ink); }
.paid-box { text-align: center; padding: 1.5rem .5rem; }
.paid-box > i { font-size: 3.5rem; color: var(--ok); }
@media (max-width: 720px) { .inv-grid { grid-template-columns: 1fr; } .qr-box { max-width: 280px; margin: 0 auto; } }

/* ===== التحقق بخطوتين ===== */
.tfa-grid { display: grid; grid-template-columns: 210px 1fr; gap: 1rem; align-items: start; }
.recovery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .35rem; font-family: ui-monospace, monospace; font-weight: 800; padding: .7rem; border: 1px dashed var(--line); border-radius: 12px; }
@media (max-width: 640px) { .tfa-grid { grid-template-columns: 1fr; } }
.notif-box { padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.notif-box .row.between { gap: .8rem; align-items: center; }
.refill-Pending { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.refill-In-progress { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.refill-Completed { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.refill-Rejected { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }

.per-page { gap: .4rem; align-items: center; flex-wrap: nowrap; }
.per-page select { width: auto; padding: .3rem 1.6rem .3rem .5rem; }
.orders-foot { flex-wrap: wrap; gap: .5rem; }

/* ===== الخصومات ===== */
.old-price { color: var(--muted); font-weight: 600; text-decoration-thickness: 2px; text-decoration-color: var(--bad); }
.new-price { color: var(--ok); }
.save-note { display: block; font-size: .72rem; color: var(--ok); font-weight: 700; }
.discount-banner { font-size: .9rem; }
.bonus-table td, .bonus-table th { padding: .45rem .6rem; }
.bonus-preview { margin-top: .5rem; padding: .55rem .75rem; border-radius: 10px; background: var(--ok-bg); color: var(--ok); border: 1px dashed var(--ok-line); font-weight: 700; font-size: .88rem; }

.coin-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin-bottom: .55rem; }
.coin-chip { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: start; font: inherit; color: inherit; }
.coin-chip small { display: block; color: var(--muted); font-size: .72rem; }
.coin-chip.active { border-color: var(--brand); background: var(--info-bg); box-shadow: 0 0 0 2px var(--info-line); }
.coin-chip .coin-ico { width: 32px; height: 32px; font-size: .6rem; }
@media (max-width: 640px) { .coin-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.timer { font-size: 1.05rem; } .timer.low { color: var(--bad); }
.claim-box { border-style: dashed; margin-top: 1rem; }

.inv-details-row td { padding-top: 0; border-top: 0; }
.inv-details-row pre { max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-all; }

/* بطاقات العملات (كل عملات OxaPay) */
.coin-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-height: 360px; overflow-y: auto; padding: 2px; }
.coin .coin-ico { position: relative; overflow: hidden; }
.coin .coin-ico img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.coin .coin-ico.has-img { background: #fff; box-shadow: 0 0 0 1px var(--line); }
.coin .coin-ico.has-img .coin-letters { visibility: hidden; }
.coin-text { min-width: 0; } .coin-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-search { max-width: 220px; padding: .35rem .6rem; font-size: .85rem; }
.coin-btc { background: #f7931a; } .coin-eth { background: #627eea; } .coin-bnb { background: #f3ba2f; } .coin-ton { background: #0098ea; }
.coin-sol { background: #9945ff; } .coin-usdc { background: #2775ca; } .coin-doge { background: #c2a633; } .coin-xrp { background: #23292f; }
.coin { position: relative; }

/* اسم الشبكة كامل + شارة الشبكة في زاوية أيقونة العملة */
.coin { align-items: center; min-height: 64px; }
.coin .coin-ico { overflow: visible; }
.coin .coin-ico img[data-coin-img] { border-radius: 50%; }
.coin-text b { display: flex; align-items: baseline; gap: .3rem; flex-wrap: wrap; line-height: 1.25; }
.net-short { font-size: .72rem; font-weight: 800; color: var(--brand-ink); background: var(--info-bg); border: 1px solid var(--info-line);
             padding: 0 .35rem; border-radius: 6px; white-space: nowrap; }
.coin-text small { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.3; word-break: break-word; }
.net-badge { position: absolute; bottom: -4px; inset-inline-start: -4px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
             box-shadow: 0 0 0 2px var(--surface); display: grid; place-items: center; z-index: 1; }
.net-badge img { width: 16px; height: 16px; position: static !important; border-radius: 50%; }

/* ===== محادثة التذاكر ===== */
.thread { gap: 1.1rem; }
.tmsg { display: flex; flex-direction: column; max-width: 82%; }
.tmsg.customer { align-self: flex-start; align-items: flex-start; }
.tmsg.staff { align-self: flex-end; align-items: flex-end; }
.tmsg-bubble { padding: .8rem 1rem; border-radius: 16px; white-space: pre-wrap; word-break: break-word; line-height: 1.75; font-size: .95rem; }
.tmsg.customer .tmsg-bubble { background: var(--info-bg); border: 1px solid var(--info-line); border-start-start-radius: 6px; }
.tmsg.staff .tmsg-bubble { background: var(--surface); border: 1px solid var(--line); border-start-end-radius: 6px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.tmsg-meta { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; padding: 0 .25rem; font-size: .76rem; color: var(--muted); }
.tmsg-avatar { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .66rem; font-weight: 800;
               background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); flex: none; }
.tmsg-avatar.staff { background: linear-gradient(135deg, var(--brand), #6366f1); color: #fff; border: 0; }
.tmsg-name { font-weight: 600; color: var(--muted); opacity: .95; }
.tmsg-role { display: inline-flex; align-items: center; gap: .25rem; font-size: .68rem; font-weight: 700; color: var(--brand-ink);
             background: var(--info-bg); border-radius: 999px; padding: .05rem .45rem; opacity: .85; }
.tmsg-role i { font-size: .62rem; }
.tmsg-dot { opacity: .5; }
.tmsg-time { opacity: .8; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .tmsg { max-width: 94%; } }

.brand-logo { border-radius: 22%; box-shadow: 0 2px 8px rgba(15,23,42,.15); }
.hero-logo { box-shadow: 0 12px 30px rgba(31,78,95,.35); }
