/* ── Studio · «الملصق» design (owner's pick, 2026-09-28) ───────────────────
   Big bold type, rounded colour blocks (teal, yellow, coral, black, cream),
   pill buttons. The layout is unchanged; only the look. */
:root, [data-theme="light"] {
  --bg: #fffdf8; --card: #ffffff; --cream: #f3eee3; --cream-2: #ece6d8; --ink: #141414; --ink-2: #3b3b3b; --muted: #6b6b6b; --line: #ece6d8;
  --teal: #0e9594; --teal-soft: #e3f5f3; --yellow: #ffd23f; --yellow-soft: #fff4d1; --coral: #ff5a36; --coral-soft: #ffe9e3; --sky: #2b8fd6; --sky-soft: #e5f2fc;
  --green: #0e9594; --red: #e0402a; --amber: #d98b12;
  --on-ink: #ffffff; --input: #ffffff;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #111111; --card: #1d1d1d; --cream: #1b1a18; --cream-2: #2a2825; --ink: #f5f1e8; --ink-2: #d6d1c6; --muted: #a09b90; --line: #2d2b27;
  --teal: #18b3b1; --teal-soft: rgba(24,179,177,.16); --yellow: #ffd23f; --yellow-soft: rgba(255,210,63,.14); --coral: #ff6a48; --coral-soft: rgba(255,106,72,.15); --sky: #5aaef0; --sky-soft: rgba(90,174,240,.15);
  --green: #18b3b1; --red: #ff7a64; --amber: #ffd23f;
  --on-ink: #141414; --input: #151515;
  color-scheme: dark;
}
:root { --font: 'Noto Kufi Arabic', 'Segoe UI', Tahoma, sans-serif; --head: 76px; --r: 28px; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.8; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { width: 18px; height: 18px; flex-shrink: 0; }
h1, h2, h3 { margin: 0; line-height: 1.45; }
p { margin: 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .center { text-align: center; } .block { display: block; } .hidden { display: none !important; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace !important; font-size: 13px !important; }
.link { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 40px; width: 100%; }

.boot { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 22px; }
.boot img { width: 72px; height: 72px; border-radius: 50%; }
.spinner { width: 30px; height: 30px; border: 4px solid var(--cream-2); border-top-color: var(--coral); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 999px; font-weight: 800; font-size: 14px; border: 0; background: var(--cream); color: var(--ink); cursor: pointer; transition: transform .15s, filter .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); filter: brightness(.97); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--coral); color: #fff; }
.btn-dark, .top-actions .btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-yellow { background: var(--yellow); color: #141414; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-danger { background: var(--coral-soft); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-ghost { background: var(--cream); }
.btn-soft { background: var(--yellow); color: #141414; }
.btn-glass { background: #fff; color: #141414; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn.loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--cream); border: 0; color: var(--ink); cursor: pointer; transition: background .15s, color .15s; flex-shrink: 0; }
.icon-btn:hover { background: var(--ink); color: var(--on-ink); }
.icon-btn.danger:hover { background: var(--red); color: #fff; }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.sm svg { width: 15px; height: 15px; }

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.input { width: 100%; background: var(--input); border: 2px solid var(--line); color: var(--ink); border-radius: 18px; padding: 12px 17px; font: inherit; font-size: 15px; transition: border-color .15s; }
.input::placeholder { color: var(--muted); opacity: .8; }
.input:focus { outline: none; border-color: var(--ink); }
.input-lg { font-size: 20px; font-weight: 800; padding: 15px 19px; }
textarea.input { resize: vertical; min-height: 48px; line-height: 1.9; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: 20px 52%, 14px 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-left: 40px; }
.input-ico { position: relative; }
.input-ico > svg { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-ico .input { padding-right: 46px; }
.input-btn { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 50%; }
.input-btn:hover { color: var(--ink); }
.input-ico:has(.input-btn) .input { padding-left: 46px; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.field > label, .field > span { font-weight: 800; font-size: 14px; color: var(--ink); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.field label em, .list-head em { font-style: normal; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.req { color: var(--coral); font-style: normal; }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.hint.warn { color: var(--amber); font-weight: 700; }
.hint.sched { color: var(--sky); display: flex; gap: 6px; align-items: center; font-weight: 700; }
.check { display: inline-flex; gap: 9px; align-items: center; cursor: pointer; font-weight: 600; font-size: 14px; }
.check input { width: 19px; height: 19px; accent-color: var(--ink); }
.combo { display: flex; gap: 8px; align-items: stretch; }
.combo .input { flex: 1; }
.combo .btn { border-radius: 18px; }
.combo-top { align-items: flex-start; }
/* Programme name + «الاتحاد في المكتبة» box on its left (2026-10-07) */
.prog-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 12px; align-items: end; }
.prog-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.prog-col > label { font-weight: 800; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.libfed { background: var(--yellow-soft); border: 2px solid color-mix(in srgb, var(--yellow) 55%, transparent); border-radius: 22px; padding: 10px 12px 12px; }
.libfed > label svg { width: 17px; height: 17px; }
.libfed select.input { font-weight: 800; border-color: transparent; }
.libfed select.input:focus { border-color: var(--ink); }
.libfed-warn { color: var(--amber); font-weight: 800; }
@media (max-width: 760px) { .prog-grid { grid-template-columns: 1fr; } }
.alert { padding: 13px 17px; border-radius: 18px; font-size: 14px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.alert-error { background: var(--coral-soft); color: var(--red); }
.alert-info { background: var(--sky-soft); color: var(--sky); }
.alert-ok { background: var(--teal-soft); color: var(--teal); }
.alert[hidden] { display: none; }
kbd { font-family: inherit; font-size: 11px; background: var(--cream); border-radius: 6px; padding: 0 6px; color: var(--muted); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.seg button { border: 0; background: var(--cream); padding: 8px 17px; border-radius: 999px; font-weight: 800; font-size: 13.5px; color: var(--ink); cursor: pointer; transition: background .15s, color .15s; }
.seg button:hover { background: var(--cream-2); }
.seg button.on { background: var(--ink); color: var(--on-ink); }
.seg-sm button { padding: 5px 12px; font-size: 12.5px; }
.switch { appearance: none; width: 50px; height: 28px; border-radius: 999px; background: var(--cream-2); position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.switch:checked { background: var(--teal); }
.switch:checked::after { transform: translateX(-22px); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; background: var(--card); border-radius: 20px; cursor: pointer; }
.toggle-row b { display: block; font-size: 14.5px; font-weight: 800; }
.toggle-row small { display: block; color: var(--muted); font-size: 12.5px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 2px solid var(--line); background: var(--card); color: var(--ink); padding: 7px 16px; border-radius: 999px; font-weight: 800; font-size: 13px; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 999px; line-height: 1.7; }
.tag svg { width: 12px; height: 12px; }
.tag-auto { background: var(--teal-soft); color: var(--teal); }
.tag-manual { background: var(--yellow-soft); color: #8a6500; }
.tag-held, .tag-warn { background: var(--coral-soft); color: var(--red); }
.tag-sched { background: var(--sky-soft); color: var(--sky); }
.pill { font-size: 12.5px; font-weight: 800; padding: 4px 13px; border-radius: 999px; background: var(--yellow); color: #141414; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.local-strip { background: var(--yellow); color: #141414; font-weight: 800; font-size: 12.5px; text-align: center; padding: 5px 12px; }
.topbar { position: sticky; top: 0; z-index: 50; background: var(--bg); }
.topbar-in { display: flex; align-items: center; gap: 28px; height: var(--head); max-width: 1400px; margin: 0 auto; padding: 0 40px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 42px; height: 42px; border-radius: 50%; }
.brand b { display: block; font-size: 20px; font-weight: 900; line-height: 1.2; }
.brand small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tabs { display: flex; align-items: center; gap: 24px; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; color: var(--muted); font-weight: 700; font-size: 14.5px; border: 0; background: none; cursor: pointer; white-space: nowrap; transition: color .15s; }
.tab svg { display: none; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); }
.tab.active::after { content: ""; position: absolute; inset: auto 0 -6px 0; height: 4px; background: var(--coral); border-radius: 4px; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.search { position: relative; display: flex; align-items: center; gap: 8px; background: var(--cream); border-radius: 999px; padding: 0 16px; height: 42px; width: 220px; transition: width .2s, box-shadow .15s; }
.search:focus-within { width: 290px; box-shadow: 0 0 0 2px var(--ink); }
.search > svg { color: var(--muted); width: 16px; height: 16px; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 13.5px; color: var(--ink); }
.search-wide { width: auto; flex: 1; min-width: 240px; height: 46px; }
.search-wide:focus-within { width: auto; }
.search-results { position: absolute; top: calc(100% + 10px); inset-inline: 0; min-width: 360px; background: var(--card); border-radius: 24px; box-shadow: 0 24px 50px -16px rgba(0,0,0,.3); padding: 10px; max-height: 70vh; overflow-y: auto; z-index: 60; }
.search-results[hidden] { display: none; }
.sr { display: flex; gap: 11px; align-items: center; padding: 8px 10px; border-radius: 16px; }
.sr:hover, .sr.active { background: var(--cream); }
.sr img, .sr-noimg { width: 50px; height: 50px; object-fit: cover; border-radius: 14px; background: var(--cream); flex-shrink: 0; }
.sr b { display: block; font-size: 13.5px; line-height: 1.6; font-weight: 800; }
.sr small { color: var(--muted); font-size: 12px; }
.sr small i { font-style: normal; color: var(--c); font-weight: 800; }
.empty-sm { padding: 14px; color: var(--muted); text-align: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 16px; color: #141414; background: var(--yellow); border: 0; cursor: pointer; }
.avatar-lg { width: 60px; height: 60px; font-size: 22px; }
.menu { position: relative; }
.menu-pop { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); min-width: 230px; background: var(--card); border-radius: 24px; box-shadow: 0 24px 50px -16px rgba(0,0,0,.3); padding: 8px; z-index: 60; display: flex; flex-direction: column; gap: 2px; }
.menu-pop.end { left: 0; transform: none; }
.menu-pop[hidden] { display: none; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border-radius: 16px; border: 0; background: none; cursor: pointer; font-weight: 800; font-size: 14px; text-align: right; color: var(--ink); }
.menu-pop a:hover, .menu-pop button:hover { background: var(--cream); }
.menu-pop .danger { color: var(--red); }
.menu-pop i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--c); color: #fff; }
.menu-head { padding: 8px 14px 10px; border-bottom: 2px solid var(--cream); margin-bottom: 4px; }
.menu-head b { display: block; font-weight: 900; } .menu-head small { color: var(--muted); }
.only-mobile { display: none; }

/* ── Pages ───────────────────────────────────────────────────────────────── */
.page { width: 100%; }
.page-in { padding-top: 10px; padding-bottom: 60px; display: flex; flex-direction: column; gap: 22px; }
.page-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.page-title h1 { font-size: 48px; font-weight: 900; line-height: 1.45; margin: 2px 0 4px; }
.page-title p { font-size: 14px; margin-top: 10px; line-height: 1.8; }
.page-title.hello h1 { font-size: 56px; }
.page-title.hello h1 span { color: var(--coral); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* colour blocks (analytics + reused) */
.blk { border-radius: var(--r); padding: 24px 26px; position: relative; overflow: hidden; }
.blk > small, .a-main-head > small { display: block; font-weight: 700; font-size: 14px; opacity: .85; }
.blk > b { display: block; font-size: 58px; font-weight: 900; line-height: 1.1; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.blk > b.b-sm { font-size: 34px; letter-spacing: 0; line-height: 1.45; margin-top: 6px; }
.blk > em { display: block; font-style: normal; font-weight: 800; font-size: 12.5px; margin-top: 4px; }
.blk-teal { background: var(--teal); color: #fff; }
.blk-yellow { background: var(--yellow); color: #141414; }
.blk-coral { background: var(--coral); color: #fff; }
.blk-ink { background: #141414; color: #fff; }
.blk-cream { background: var(--cream); color: var(--ink); }
[data-theme="dark"] .blk-ink { background: #000; outline: 2px solid var(--line); }
.a-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: auto auto; gap: 18px; }
.a-main { grid-row: span 2; display: flex; flex-direction: column; min-height: 330px; }
.a-main-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.a-toggles { display: flex; gap: 8px; }
.mini-seg { display: inline-flex; background: rgba(0,0,0,.18); border-radius: 999px; padding: 3px; }
.mini-seg button { border: 0; background: none; color: #fff; font-weight: 800; font-size: 12px; padding: 3px 11px; border-radius: 999px; cursor: pointer; }
.mini-seg button.on { background: #fff; color: #0e9594; }
.a-svg { margin-top: auto; padding-top: 16px; }
.a-svg svg { width: 100%; height: 170px; display: block; }
.a-svg rect { fill: rgba(255,255,255,.35); } .a-svg rect.now { fill: var(--yellow); }
.analytics-setup { display: grid; gap: 16px; }
.setup-head { display: flex; align-items: center; gap: 12px; }
.setup-head h2 { font-size: 26px; font-weight: 900; }
.setup-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; }
.steps { margin: 0; padding: 0 20px 0 0; display: grid; gap: 8px; line-height: 1.9; }
.steps b { font-weight: 800; }
.setup-form { display: grid; gap: 12px; align-content: start; align-self: start; background: var(--card); border-radius: 22px; padding: 20px; }

.notice { background: var(--yellow-soft); border-radius: 22px; }
.notice > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 20px; }
.notice > summary::-webkit-details-marker { display: none; }
.notice > summary svg { color: var(--coral); }
.notice > summary b { font-weight: 800; }
.notice > summary .muted { margin-right: auto; font-size: 12.5px; }
.notice-list { display: flex; flex-direction: column; padding: 0 12px 12px; gap: 6px; }
.notice-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: var(--card); font-size: 13.5px; }
.notice-row b { font-weight: 800; }
.notice-row small { margin-right: auto; color: var(--muted); font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.ok { background: var(--teal); } .dot.warn { background: var(--yellow); } .dot.bad { background: var(--coral); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { display: flex; align-items: center; gap: 14px; background: var(--cream); border-radius: 24px; padding: 18px 20px; transition: transform .15s; }
.stat:hover { transform: translateY(-3px); }
.stat > i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; }
.stat small { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.stat b { display: block; font-size: 30px; font-weight: 900; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat em { display: block; font-style: normal; font-size: 12px; font-weight: 800; color: var(--muted); }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.panel { background: var(--cream); border-radius: var(--r); padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h2 { font-size: 22px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.panel-head h2 svg { color: var(--coral); }
.panel-head .link { font-size: 12.5px; background: var(--ink); color: var(--on-ink); border-radius: 999px; padding: 5px 14px; text-decoration: none; }
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 10px; background: var(--card); border-radius: 20px; transition: transform .15s; }
.row:hover { transform: translateX(-3px); }
.row-img { width: 58px; height: 58px; border-radius: 16px; overflow: hidden; background: var(--cream); display: block; }
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-main { min-width: 0; display: block; }
.row-main b { display: block; font-size: 13.5px; font-weight: 800; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row-main small { display: block; color: var(--muted); font-size: 12px; }
.row-go { color: var(--muted); }
.row:hover .row-go { color: var(--coral); }
.row-actions { display: flex; gap: 6px; }
/* an item's real views, next to its actions (INCIDENTS #457) */
.row-actions { align-items: center; }
.views-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; margin-inline-end: 6px; border-radius: 999px; background: var(--cream); color: var(--ink); font-size: 13px; white-space: nowrap; }
.views-pill svg { width: 15px; height: 15px; color: var(--teal, #2fb5b0); flex-shrink: 0; }
.views-pill b { font-weight: 800; font-variant-numeric: tabular-nums; }
.views-pill small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.row-rank { grid-template-columns: 40px 1fr auto; }
.rank { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); font-weight: 900; }
.plat-dots { display: flex; gap: 4px; }
.plat-dots i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--cream); }
.plat-dots i svg { width: 13px; height: 13px; }
.plat-dots i.on { color: #fff; background: var(--c); }
.health { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.h-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border-radius: 20px; }
.h-item > i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; }
.h-item b { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; }
.h-item small { display: block; color: var(--muted); font-size: 12px; }
.health > p { grid-column: 1 / -1; }

.filterbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.tile { display: flex; flex-direction: column; gap: 6px; }
.tile.is-pending .tile-img { outline: 3px dashed var(--sky); outline-offset: 3px; }
.tile-img { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--cream); border-radius: 24px; overflow: hidden; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tile:hover .tile-img img { transform: scale(1.04); }
.tile-img > span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.flag { position: absolute; top: 10px; right: 10px; font-style: normal; font-size: 11.5px; font-weight: 800; padding: 3px 11px; border-radius: 999px; }
.flag-sky { background: var(--sky); color: #fff; } .flag-gold { background: var(--yellow); color: #141414; }
.tile-body { display: flex; flex-direction: column; gap: 1px; flex: 1; padding: 0 4px; }
.tile-title { font-weight: 800; font-size: 13.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-title:hover { color: var(--coral); }
.tile-body > small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.tile-actions { display: flex; gap: 5px; }
.more { display: flex; justify-content: center; margin-top: 10px; }
.empty { text-align: center; padding: 60px 20px; display: grid; gap: 12px; justify-items: center; }
.empty h2, .empty h3 { font-weight: 900; font-size: 26px; }
.loading-page { display: grid; place-items: center; gap: 12px; padding: 100px 0; }
.skel-lines { height: 150px; border-radius: var(--r); background: linear-gradient(90deg, var(--cream), var(--cream-2), var(--cream)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Sign in ─────────────────────────────────────────────────────────────── */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 18px; background: var(--bg); }
.auth-top { text-align: center; margin-bottom: 22px; }
.auth-top img { width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 14px; }
.auth-top h1 { font-size: 44px; font-weight: 900; line-height: 1.45; }
.auth-top h1 span { color: var(--coral); }
.auth-top p { color: var(--muted); font-size: 15px; font-weight: 600; margin-top: 6px; }
.auth-card { width: 100%; max-width: 440px; background: var(--cream); border-radius: 32px; padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.auth-card h2 { font-size: 26px; font-weight: 900; }
.auth-card > p.muted { margin-top: -8px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.auth-foot { margin-top: 20px; color: var(--muted); font-size: 13px; }
.meter { height: 6px; background: var(--cream-2); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.meter i { display: block; height: 100%; width: 0; background: var(--coral); transition: width .25s, background .25s; }
.meter i[data-level="2"] { background: var(--yellow); } .meter i[data-level="3"], .meter i[data-level="4"] { background: var(--teal); }

/* ── Editor ──────────────────────────────────────────────────────────────── */
.editor { max-width: 1400px; margin: 0 auto; padding: 0 40px 60px; }
.editor-head { position: sticky; top: var(--head); z-index: 20; background: var(--bg); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0 16px; }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-weight: 800; font-size: 14px; background: var(--cream); padding: 8px 14px; border-radius: 999px; }
.back:hover { color: var(--ink); }
.editor-title { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 12px; }
.editor-title h1 { font-size: 32px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.6; }
.status { font-size: 12px; font-weight: 800; padding: 4px 13px; border-radius: 999px; white-space: nowrap; }
.st-live { background: var(--teal); color: #fff; } .st-new { background: var(--yellow); color: #141414; }
.st-dirty { background: var(--coral); color: #fff; } .st-sched { background: var(--sky); color: #fff; }
.editor-actions { display: flex; gap: 8px; align-items: center; }
.sec-nav { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 18px; scrollbar-width: none; }
.sec-nav a { display: inline-flex; gap: 7px; align-items: center; padding: 9px 18px; border-radius: 999px; background: var(--cream); color: var(--ink); font-weight: 800; font-size: 13.5px; white-space: nowrap; }
.sec-nav a.on { background: var(--ink); color: var(--on-ink); }
.sec-nav a svg { width: 15px; height: 15px; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.editor-main { display: flex; flex-direction: column; gap: 20px; }
.card { background: var(--cream); border-radius: var(--r); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 22px 26px 0; }
.card-head h2 { font-size: 22px; font-weight: 900; display: flex; gap: 10px; align-items: center; }
.card-head h2 svg { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--ink); color: var(--on-ink); box-sizing: border-box; }
.card-body { padding: 18px 26px 26px; }
.ed-sec:nth-child(1) { background: var(--yellow-soft); }
.ed-sec:nth-child(2) { background: var(--teal-soft); }
.ed-sec:nth-child(3) { background: var(--coral-soft); }
.ed-sec { scroll-margin-top: calc(var(--head) + 150px); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fields > * { grid-column: 1 / -1; }
.fields > .field-half { grid-column: auto; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fold { border-radius: 20px; background: var(--card); }
.fold > summary { list-style: none; cursor: pointer; padding: 14px 18px; font-weight: 800; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary svg { transition: transform .2s; color: var(--muted); }
.fold[open] > summary svg { transform: rotate(-90deg); }
.fold-body, .fold > .md { padding: 0 18px 18px; display: grid; gap: 14px; }
.servers { display: flex; flex-direction: column; gap: 8px; }
.server { display: grid; grid-template-columns: 30px auto 1fr auto auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 18px; background: var(--card); }
.server .input { padding: 8px 12px; border-radius: 14px; }
.server .icon-btn { width: 32px; height: 32px; font-size: 11px; }
.server-n { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 900; font-size: 12.5px; }
.host { font-size: 12px; font-weight: 800; color: var(--muted); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.paste-box { border: 2px dashed var(--cream-2); border-radius: 20px; padding: 10px; background: var(--card); }
.paste-box textarea { border: 0; background: none; padding: 4px; }
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
/* «متعدد الجودات»: one box across the top, set apart from the four qualities under it */
.dl-col { display: flex; flex-direction: column; gap: 6px; background: var(--card); border-radius: 20px; padding: 12px; }
.dl-col label { font-weight: 800; font-size: 13.5px; display: flex; justify-content: space-between; align-items: center; }
.dl-col label em { font-style: normal; background: var(--coral); color: #fff; border-radius: 999px; padding: 0 10px; font-size: 12px; font-weight: 800; }
.dl-col textarea { font-size: 12px !important; line-height: 1.7; border-radius: 14px; }
.drop { position: relative; border: 2px dashed var(--cream-2); border-radius: 24px; background: var(--card); min-height: 220px; display: grid; place-items: center; cursor: pointer; overflow: hidden; transition: border-color .15s; }
.drop:hover, .drop.over { border-color: var(--ink); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop-empty { display: grid; justify-items: center; gap: 4px; color: var(--muted); text-align: center; padding: 20px; }
.drop-empty svg { width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: var(--yellow); color: #141414; box-sizing: border-box; }
.drop-empty b { color: var(--ink); font-weight: 800; }
.drop.has .drop-empty { display: none; }
.drop-actions { position: absolute; bottom: 12px; left: 12px; display: none; gap: 6px; }
.drop.has .drop-actions { display: flex; }
.drop.busy::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.drop.busy::before { content: ""; position: absolute; z-index: 2; width: 36px; height: 36px; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 52px; padding: 8px 10px; background: var(--input); border: 2px solid var(--line); border-radius: 18px; cursor: text; }
.tags:focus-within { border-color: var(--ink); }
.tagchip { display: inline-flex; align-items: center; gap: 4px; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 12.5px; padding: 3px 6px 3px 12px; border-radius: 999px; }
.tagchip button { border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; padding: 2px; border-radius: 50%; }
.tagchip button:hover { background: var(--coral); }
.tagchip svg { width: 12px; height: 12px; }
.tags input { flex: 1; min-width: 140px; border: 0; background: none; color: var(--ink); font: inherit; outline: none; padding: 4px; }
.tags-copy { margin-inline-start: auto; flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; transition: background .18s ease, color .18s ease, transform .18s ease; }
.tags-copy svg { width: 17px; height: 17px; }
.tags-copy:hover { background: var(--line); color: var(--ink); }
.tags-copy:active { transform: scale(.92); }
.tags-copy:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tags-copy.done { color: var(--green); background: transparent; }
.tags-copy.done svg { animation: tags-copied .32s ease; }
@keyframes tags-copied { from { transform: scale(.6); opacity: .3; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tags-copy, .tags-copy.done svg { transition: none; animation: none; } }
.md { padding-top: 4px !important; }
.md-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.md-bar > button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--cream); cursor: pointer; font-weight: 900; display: grid; place-items: center; }
.md-bar > button:hover { background: var(--ink); color: var(--on-ink); }
.md-bar svg { width: 15px; height: 15px; }
.md-spacer { flex: 1; }
.md-text { min-height: 240px; font-size: 16px; line-height: 2.05; }
.md-preview { background: var(--input); border: 2px solid var(--line); border-radius: 18px; padding: 16px 18px; min-height: 240px; }
.prose p { margin: 0 0 12px; } .prose h2, .prose h3 { margin: 16px 0 8px; } .prose a { color: var(--coral); }
.embed-ph { padding: 10px 12px; background: var(--cream); border-radius: 12px; font-size: 13px; direction: ltr; text-align: left; }
.source-box { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-radius: 18px; background: var(--card); font-size: 13.5px; }
.source-box a { font-weight: 800; text-decoration: underline; text-decoration-color: var(--coral); }
.list-head { display: flex; justify-content: space-between; align-items: center; }
.editor-side { position: sticky; top: calc(var(--head) + 80px); display: flex; flex-direction: column; gap: 16px; }
.preview-card { overflow: hidden; background: #141414; color: #fff; }
.pv-img { position: relative; aspect-ratio: 16/10; background: #222; display: grid; place-items: center; color: rgba(255,255,255,.4); }
.pv-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-img svg { width: 36px; height: 36px; }
.pv-img .fed { position: absolute; top: 12px; right: 12px; z-index: 1; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: #141414; font-size: 10.5px; font-weight: 900; transform: rotate(-8deg); }
.pv-body { padding: 18px 22px 20px; display: grid; gap: 3px; }
.pv-body > small:first-child { color: var(--yellow); font-weight: 800; font-size: 12px; }
.pv-body b { font-size: 20px; font-weight: 900; line-height: 1.45; }
.pv-body small.muted { color: #b9b3a7; }
.pv-body p { margin-top: 6px; color: #cfc9bd; font-size: 13px; }
.pv-meta { display: flex; gap: 12px; color: #b9b3a7; font-size: 12.5px; margin-top: 8px; }
.pv-meta span { display: inline-flex; gap: 5px; align-items: center; }
.pv-meta svg { width: 14px; height: 14px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.checks li { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 14px; }
.checks li svg { width: 24px; height: 24px; padding: 5px; border-radius: 50%; box-sizing: border-box; }
.checks li.ok svg { background: var(--teal); color: #fff; }
.checks li.warn svg { background: var(--yellow); color: #141414; }
.checks li.bad svg { background: var(--coral); color: #fff; }
.checks li.ok span { color: var(--muted); }
.checks em { margin-right: auto; font-style: normal; font-size: 11.5px; color: #fff; background: var(--coral); border-radius: 999px; padding: 0 9px; font-weight: 800; }
.note { font-size: 13px; padding: 14px 18px; border-radius: 22px; background: var(--cream); display: flex; gap: 8px; align-items: flex-start; color: var(--muted); }

/* ── Settings ────────────────────────────────────────────────────────────── */
.acct { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.acct b { display: block; font-size: 20px; font-weight: 900; } .acct small { display: block; }
.card-body form, form.card-body { display: grid; gap: 14px; }
.sess-list, .log-list { display: grid; gap: 8px; }
.sess { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 20px; background: var(--card); }
.sess.current { outline: 2px solid var(--teal); }
.sess > i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; }
.sess b { display: flex; gap: 8px; align-items: center; font-weight: 800; }
.log { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 16px; background: var(--card); font-weight: 800; font-size: 13.5px; flex-wrap: wrap; }
.log.bad span { color: var(--red); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ── Toasts & modal ──────────────────────────────────────────────────────── */
#toasts { position: fixed; bottom: 24px; left: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 48px)); }
.toast { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-radius: 22px; background: #141414; color: #fff; box-shadow: 0 20px 40px -12px rgba(0,0,0,.4); font-weight: 700; font-size: 14px; transform: translateY(12px); opacity: 0; transition: all .25s; }
.toast.in { transform: none; opacity: 1; }
.toast-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; }
.toast-ok .toast-ico { background: var(--teal); } .toast-error .toast-ico { background: var(--coral); } .toast-info .toast-ico { background: var(--yellow); color: #141414; }
.modal-wrap { position: fixed; inset: 0; z-index: 150; background: rgba(20,20,20,.5); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .2s; }
.modal-wrap.in { opacity: 1; }
.modal { width: 100%; max-width: 460px; background: var(--bg); border-radius: 32px; padding: 28px; display: grid; gap: 14px; transform: scale(.96); transition: transform .2s; }
.modal-wrap.in .modal { transform: none; }
.modal h3 { font-size: 24px; font-weight: 900; }
.modal-body p { margin: 0 0 6px; }
.modal-actions { display: flex; gap: 10px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
/* The tabs grew (التعليقات، الأعضاء): on laptop widths the top bar tightens so nothing runs off the screen */
@media (max-width: 1680px) {
  .topbar-in { gap: 18px; padding: 0 28px; }
  .tabs { gap: 18px; }
  .search { width: 150px; }
  .search:focus-within { width: 230px; }
  .top-actions .site-btn { width: 42px; height: 42px; padding: 0; justify-content: center; }
  .top-actions .site-btn span { display: none; }
}
@media (max-width: 1200px) {
  .tabs { gap: 16px; }
  .search { width: 150px; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-side { position: static; display: grid; grid-template-columns: 1fr 1fr; order: 2; }
  .a-grid { grid-template-columns: 1fr 1fr; }
  .a-main { grid-column: 1 / -1; grid-row: auto; min-height: 280px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
/* Between tablet and wide screens the tabs don't fit next to search (1300px since the comments, members and community tabs): fold them into the menu button */
@media (max-width: 1300px) {
  .topbar-in { gap: 16px; }
  .only-mobile { display: inline-grid; }
  .tabs { display: none; position: absolute; top: var(--head); inset-inline: 12px; background: var(--card); border-radius: 24px; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px; box-shadow: 0 24px 50px -16px rgba(0,0,0,.3); }
  body.nav-open .tabs { display: flex; }
  .tab { padding: 12px 14px; border-radius: 16px; }
  .tab.active { background: var(--cream); }
  .tab.active::after { display: none; }
  .tabs .menu-pop { position: static; transform: none; box-shadow: none; }
}
@media (max-width: 980px) {
  :root { --head: 66px; }
  .wrap, .editor { padding-left: 18px; padding-right: 18px; }
  .topbar-in { padding: 0 18px; gap: 12px; }
  .only-mobile { display: inline-grid; }
  .brand small { display: none; }
  .tabs { display: none; position: absolute; top: var(--head); inset-inline: 12px; background: var(--card); border-radius: 24px; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px; box-shadow: 0 24px 50px -16px rgba(0,0,0,.3); }
  body.nav-open .tabs { display: flex; }
  .tab { padding: 12px 14px; border-radius: 16px; }
  .tab.active { background: var(--cream); }
  .tab.active::after { display: none; }
  .tabs .menu-pop { position: static; transform: none; box-shadow: none; }
  .cols, .grid-2, .setup-grid { grid-template-columns: 1fr; }
  .editor-side, .dl-grid { grid-template-columns: 1fr; }
  .search { width: 150px; }
  .search:focus-within { width: 190px; }
  .top-actions .btn span { display: none; }
  .page-title h1 { font-size: 38px; }
  .page-title.hello h1 { font-size: 40px; }
}
@media (max-width: 560px) {
  html, body { overflow-x: hidden; }
  .search { display: none; }
  #theme-btn { display: none; }
  .page-title h1, .page-title.hello h1 { font-size: 30px; }
  .a-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .blk { padding: 18px; border-radius: 22px; }
  .blk > b { font-size: 36px; }
  .blk > b.b-sm { font-size: 22px; }
  .stats { gap: 10px; }
  .stat { padding: 12px; gap: 10px; border-radius: 20px; }
  .stat > i { width: 36px; height: 36px; }
  .stat b { font-size: 22px; }
  .fields { grid-template-columns: 1fr; }
  .fields > .field-half { grid-column: 1 / -1; }
  .combo { flex-direction: column; }
  .combo .btn { width: 100%; }
  .server { grid-template-columns: 28px 1fr auto auto auto; }
  .server .host { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .row { grid-template-columns: 50px 1fr; }
  .row-img { width: 50px; height: 50px; }
  .row .plat-dots, .row .row-go { display: none; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .editor-title h1 { font-size: 22px; }
  .panel { padding: 16px; border-radius: 22px; }
}
#analytics { display: grid; gap: 18px; }
.name-form { display: grid; gap: 12px; margin-top: 14px; }
.field > span em { font-style: normal; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.avatar { overflow: hidden; padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.avatar-actions label.btn { cursor: pointer; }

/* ── Members & permissions ─────────────────────────────────────────────── */
.wrap.narrow { max-width: 900px; }
#m-form > * + *, .wrap.narrow > .danger-zone { margin-top: 18px; }
#m-form .input:disabled { opacity: .65; }
.page-title .back { margin-bottom: 16px; }
.avatar-cell { display: grid; place-items: center; background: var(--yellow); font-weight: 900; font-size: 20px; color: #141414; }
.avatar-cell img { width: 100%; height: 100%; object-fit: cover; }
.row.member .row-main b { -webkit-line-clamp: unset; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row.member .row-main small + small { margin-top: 1px; }
.row.is-off { opacity: .6; }
.row.act .row-main b { font-weight: 700; -webkit-line-clamp: 3; }
.row.act.bad .avatar-cell { background: var(--coral-soft); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.presets .pill { border: 0; cursor: pointer; background: var(--card); color: var(--ink); font-family: inherit; }
.presets .pill:hover { background: var(--yellow); color: #141414; }
.perm-grid { display: grid; gap: 8px; }
.perm-head, .perm-row { display: grid; grid-template-columns: minmax(90px, 1.3fr) repeat(4, 1fr); gap: 8px; align-items: center; }
.perm-head span { text-align: center; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.perm-row { background: var(--card); border-radius: 18px; padding: 8px 14px; }
.perm-row b { font-weight: 900; }
.perm-cell { display: grid; place-items: center; cursor: pointer; }
.perm-cell input, .perm-extra input { position: absolute; opacity: 0; pointer-events: none; }
.perm-cell i, .perm-extra i { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; border: 2px solid var(--line); color: transparent; background: var(--bg); transition: .15s; flex: none; }
.perm-cell i svg, .perm-extra i svg { width: 18px; height: 18px; }
.perm-cell input:checked + i, .perm-extra input:checked + i { background: var(--teal); border-color: var(--teal); color: #fff; }
.perm-cell.risky input:checked + i, .perm-extra.risky input:checked + i { background: var(--coral); border-color: var(--coral); }
.perm-cell input:focus-visible + i, .perm-extra input:focus-visible + i { outline: 3px solid var(--yellow); outline-offset: 2px; }
.perm-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 16px 0 10px; }
.perm-extra { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 18px; padding: 12px 14px; cursor: pointer; position: relative; }
.perm-extra b { display: block; font-weight: 900; } .perm-extra small { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.form-actions { display: flex; gap: 10px; margin: 6px 0 24px; }
.sec-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.sec-actions > div { background: var(--card); border-radius: 18px; padding: 14px; display: grid; gap: 6px; align-content: start; justify-items: start; }
.sec-actions b { font-weight: 900; }
.secret { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; background: var(--cream); border-radius: 16px; padding: 14px; margin: 12px 0; }
.secret span { font-size: 12.5px; color: var(--muted); font-weight: 800; }
.secret code { font-size: 16px; font-weight: 800; user-select: all; word-break: break-all; }
@media (max-width: 640px) {
  .perm-head, .perm-row { grid-template-columns: 74px repeat(4, 1fr); gap: 4px; }
  .perm-row { padding: 8px; }
  .perm-cell i { width: 30px; height: 30px; }
}

/* Settings → members / activity */
.team-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.team-link { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 20px; padding: 14px 16px; transition: transform .15s; }
.team-link:hover { transform: translateX(-3px); }
.team-link i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--yellow); color: #141414; flex: none; }
.team-link span { flex: 1; min-width: 0; } .team-link b { display: block; font-weight: 900; } .team-link small { display: block; font-size: 12.5px; }
.team-link > svg { color: var(--muted); }

/* Home → stories held off social (same compact rows as the latest shows/news next to it) */
.count-pill { background: var(--coral); color: #fff; font-size: 13px; font-weight: 900; border-radius: 999px; padding: 0 10px; line-height: 1.9; }
.held-row.is-done { opacity: .75; }
.held-row .row-actions { align-items: center; }
.held-pub { background: var(--coral); color: #fff; }
.held-done { margin-top: 12px; }
.held-done summary { cursor: pointer; padding: 6px 2px; }
.held-done .rows { margin-top: 8px; }
@media (max-width: 640px) { .held-row .row-actions { grid-column: auto; } .held-row { grid-template-columns: 50px 1fr auto; } .held-row .plat-dots { display: flex; } }

/* ── Tools (social, sources, pinned, reels) ─────────────────────────────── */
.wrap > .panel + .panel, .wrap > .panel + .rows, .wrap > .filterbar + .batchbar, .wrap > .alert { margin-top: 16px; }
.wrap > .filterbar { margin-bottom: 14px; }
.row.tool-row, .row.src-row { grid-template-columns: 26px 58px 1fr auto; }
.row.src-row { grid-template-columns: 26px 1fr auto; }
.row-check { display: grid; place-items: center; }
.row-check input { width: 18px; height: 18px; accent-color: var(--ink); cursor: pointer; }
.row.is-sel { outline: 3px solid var(--yellow); }
.row-actions { align-items: center; }
.batchbar { position: sticky; top: calc(var(--head) + 8px); z-index: 20; display: flex; gap: 10px; align-items: center; background: var(--ink); color: var(--on-ink); border-radius: 999px; padding: 8px 10px 8px 18px; margin-bottom: 12px; width: fit-content; }
.batchbar .btn-ghost { color: var(--on-ink); }
.plat-pick { display: grid; gap: 10px; margin: 12px 0 14px; }
.pub-progress { position: fixed; inset-inline-start: 18px; bottom: 18px; z-index: 90; background: var(--ink); color: var(--on-ink); border-radius: 20px; padding: 14px 18px; display: grid; gap: 4px; max-width: min(420px, calc(100vw - 36px)); box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); cursor: pointer; }
.pub-progress small { font-size: 12.5px; opacity: .9; }
.pub-progress .r-ok { color: #7ee2b8; } .pub-progress .r-bad { color: #ff9a8a; } .pub-progress .r-warn { color: var(--yellow); }
.add-link { display: flex; gap: 10px; margin: 0 0 16px; }
.add-link .input { flex: 1; }
.src-panel .panel-head { flex-wrap: wrap; }
.src-row .row-main b { -webkit-line-clamp: 2; }
.pin-row { grid-template-columns: 34px 58px 1fr auto; }
.pin-rank { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: #141414; font-weight: 900; }
.pin-badge { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 4px; }
.pin-badge .input { height: 30px; padding: 0 10px; width: 150px; font-size: 13px; }
.reel-thumb { position: relative; border: 0; padding: 0; cursor: pointer; }
.reel-thumb i { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.35); }
.panel .search-wide { margin-bottom: 12px; }
@media (max-width: 640px) {
  .row.tool-row { grid-template-columns: 26px 50px 1fr; }
  .row.src-row { grid-template-columns: 26px 1fr; }
  .pin-row { grid-template-columns: 30px 50px 1fr; }
  .row .row-actions .plat-dots { display: flex; }
  .add-link { flex-direction: column; }
}
.batchbar[hidden] { display: none; }
.clean-tag { color: var(--teal); font-weight: 800; }
.post-preview { background: var(--cream); border-radius: 16px; padding: 12px 14px; margin: 8px 0; display: grid; gap: 6px; }
.post-preview p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* Top bar: «فتح الموقع» next to «جديد»; on small screens both become round icons */
.site-btn { white-space: nowrap; }
@media (max-width: 980px) { .top-actions .site-btn { width: 42px; height: 42px; padding: 0; justify-content: center; } }
@media (max-width: 560px) { .brand > span { display: none; } .top-actions { gap: 8px; } }

/* Sources: the source's own picture; pinned: drag by the number */
.row.src-row { grid-template-columns: 26px 58px 1fr auto; }
.row.src-row .row-main { text-align: right; }
.drag-handle { cursor: grab; touch-action: none; user-select: none; }
.pin-row.dragging { opacity: .85; outline: 3px dashed var(--yellow); transform: scale(1.01); }
.pin-row.dragging .drag-handle { cursor: grabbing; }
.pin-filters { margin-bottom: 12px; }
.pin-filters .search-wide { margin-bottom: 0; flex: 1; min-width: 200px; }
@media (max-width: 640px) { .row.src-row { grid-template-columns: 26px 50px 1fr; } }

.src-reason { color: var(--ink) !important; opacity: .8; }

/* Pinned: carry a row anywhere on the page */
.pin-row { cursor: grab; touch-action: pan-y; }
.pin-row input, .pin-row button { cursor: auto; }
.pin-slot { background: transparent !important; outline: 2px dashed var(--yellow); outline-offset: -2px; }
.pin-slot > * { visibility: hidden; }
.pin-ghost { position: fixed; z-index: 1000; margin: 0; pointer-events: none; cursor: grabbing;
  transform: rotate(-1.2deg) scale(1.03); box-shadow: 0 28px 60px -18px rgba(0,0,0,.55), 0 0 0 3px var(--yellow); opacity: .97; }
.pin-ghost.landing { transform: none; box-shadow: 0 10px 30px -12px rgba(0,0,0,.4); }
body.pin-carrying, body.pin-carrying * { cursor: grabbing !important; user-select: none; }

/* Lists: numbered pages */
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 22px 0 8px; }
.pager-num, .pager-step { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; display: inline-grid; place-items: center; font-weight: 800; background: var(--cream); color: var(--ink); }
.pager-num:hover, .pager-step:hover { background: var(--yellow); color: #141414; }
.pager-num.on { background: var(--ink); color: var(--on-ink); }
.pager-step.off { opacity: .35; }
.pager-gap { padding: 0 4px; color: var(--muted); }

/* ── Bell: notifications (notify.js) ── */
.bell { position: relative; }
#bell-btn { position: relative; }
.bell-count { position: absolute; top: -4px; left: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 900; line-height: 20px; text-align: center; box-shadow: 0 0 0 3px var(--bg); }
.bell-count[hidden] { display: none; }
.bell-pop { width: 380px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.bell-head b { font-size: 18px; font-weight: 900; }
.menu-pop .bell-head button { width: auto; padding: 6px 12px; font-size: 12px; color: var(--teal); background: var(--teal-soft); border-radius: 999px; }
.bell-list { max-height: min(460px, 70vh); overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.menu-pop .bell-item { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 18px; color: var(--ink); text-decoration: none; font-weight: 700; }
.menu-pop a.bell-item:hover { background: var(--cream); }
.menu-pop .bell-ico { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; }
.bell-ico svg { width: 18px; height: 18px; }
.menu-pop .bell-ico.tone-teal { background: var(--teal-soft); color: var(--teal); }
.menu-pop .bell-ico.tone-sky { background: var(--sky-soft); color: var(--sky); }
.menu-pop .bell-ico.tone-yellow { background: var(--yellow-soft); color: var(--amber); }
.menu-pop .bell-ico.tone-coral { background: var(--coral-soft); color: var(--coral); }
.menu-pop .bell-ico.tone-ink { background: var(--cream); color: var(--ink); }
.bell-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bell-text b { font-size: 13.5px; font-weight: 800; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.bell-text small { font-size: 12px; color: var(--muted); font-weight: 700; }
.bell-dot { flex: 0 0 9px; width: 9px; height: 9px; margin-top: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.menu-pop .bell-item.unread { background: color-mix(in srgb, var(--cream) 55%, transparent); }
.bell-day { padding: 10px 12px 4px; font-size: 12px; font-weight: 900; color: var(--muted); letter-spacing: .2px; }
.bell-detail { font-size: 12.5px; font-weight: 700; color: var(--ink-2); line-height: 1.6; }
.bell-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.menu-pop .bell-chip { font-style: normal; font-size: 11px; font-weight: 900; padding: 2px 10px; border-radius: 999px; }
.menu-pop .bell-chip.tone-teal { background: var(--teal-soft); color: var(--teal); }
.menu-pop .bell-chip.tone-yellow { background: var(--yellow-soft); color: var(--amber); }
.menu-pop .bell-chip.tone-coral { background: var(--coral-soft); color: var(--coral); }
.bell-empty { padding: 30px 16px 36px; text-align: center; color: var(--muted); }
.bell-empty svg { width: 34px; height: 34px; opacity: .5; }
.bell-empty p { margin-top: 8px; font-weight: 800; }
@media (max-width: 560px) { .bell-pop { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; } }

/* Switching the theme (app.js switchTheme): no element eases on its own during the switch … */
html.theme-switching, html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: none !important; }
/* … and one cross-fade of the whole panel, old picture into new, all at once */
html.theme-vt::view-transition-old(root), html.theme-vt::view-transition-new(root) {
  animation-duration: .45s; animation-timing-function: cubic-bezier(.4, 0, .2, 1); mix-blend-mode: normal;
}
/* the old picture stays as it is under the new one, which fades in on top: no dimming halfway */
html.theme-vt::view-transition-old(root) { animation: none; }
html.theme-vt::view-transition-new(root) { animation-name: theme-vt-in; }
@keyframes theme-vt-in { from { opacity: 0; } }
.a-pages { margin-top: 18px; }

/* ── Visitors' comments (views/comments.js) ─────────────────────────────── */
.cm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0 18px; }
.cm-stats > div { background: var(--cream); border-radius: 24px; padding: 16px 20px; }
.cm-stats small { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.cm-stats b { display: block; font-size: 30px; font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cm-stats > div.is-new { background: var(--yellow-soft); }
.cm-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.cm-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: start; padding: 16px; background: var(--cream); border-radius: 22px; }
.cm-row.is-new { background: var(--yellow-soft); }
.cm-box { margin-top: 18px; }
.cm-box .panel-head { flex-wrap: wrap; }
.cm-box .rows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panel .cm-row { background: var(--card); padding: 12px; border-radius: 20px; grid-template-columns: 40px 1fr auto; gap: 12px; }
.panel .cm-row.is-new { background: var(--yellow-soft); }
.cm-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 900; font-size: 18px; overflow: hidden; }
.cm-av img { width: 100%; height: 100%; object-fit: cover; }
.panel .cm-av { width: 40px; height: 40px; font-size: 16px; }
.cm-main { min-width: 0; }
.cm-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cm-meta b { font-weight: 900; font-size: 15px; }
.cm-meta .muted { font-size: 12px; }
.cm-flag { font-style: normal; font-size: 11.5px; font-weight: 900; background: var(--yellow); color: #141414; border-radius: 999px; padding: 0 10px; line-height: 1.9; }
.cm-text { margin: 4px 0 8px; font-size: 14.5px; line-height: 1.9; white-space: pre-line; overflow-wrap: anywhere; }
.cm-row.is-compact .cm-text { font-size: 13.5px; margin: 2px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-topic { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cm-topic span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-topic:hover span { color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: 4px; }
.cm-topic i { flex-shrink: 0; font-style: normal; font-size: 11px; font-weight: 900; color: #fff; background: var(--c); border-radius: 999px; padding: 0 9px; line-height: 1.9; }
.cm-actions { display: flex; align-items: center; gap: 6px; }
.cm-del:hover { background: var(--coral-soft); color: var(--red); }
.cm-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 46px 14px; background: var(--cream); border-radius: 22px; font-weight: 700; }
.cm-empty svg { width: 28px; height: 28px; color: var(--muted); }
.cm-mini { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cm-mini span { display: inline-flex; align-items: baseline; gap: 6px; background: var(--card); border-radius: 999px; padding: 4px 14px; }
.cm-mini b { font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.cm-mini small { color: var(--muted); font-size: 12px; font-weight: 700; }
.cm-mini span.is-new { background: var(--yellow); }
.cm-mini span.is-new small, .cm-mini span.is-new b { color: #141414; }
.cm-answered { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 11.5px; font-weight: 900; color: var(--teal); }
.cm-answered svg { width: 13px; height: 13px; }
.cm-reply-btn svg { width: 15px; height: 15px; }
/* where a comment came from: the country's flag and the visitor's address (copied on a click) */
.cm-where { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto; font-size: 12px; color: var(--muted); }
.cm-where i { font-style: normal; font-size: 14px; line-height: 1; }
.cm-ip { font: 600 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); background: var(--cream); border: 0; border-radius: 6px; padding: 1px 7px; cursor: copy; }
.cm-ip:hover { color: var(--ink); }
/* the site's heart on a comment (as YouTube's): an empty heart, then the site's picture with a small red heart */
.cm-heart { color: var(--muted); }
.cm-heart:hover { color: #e8264b; }
.cm-hearted { position: relative; display: inline-flex; width: 24px; height: 24px; }
.cm-hearted img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.cm-hearted svg { position: absolute; inset-block-end: -4px; inset-inline-end: -5px; width: 14px; height: 14px; }
.cm-heart.is-on { background: color-mix(in srgb, #e8264b 10%, transparent); }
.cm-reply { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: start; margin-top: 10px; padding: 10px 12px; border-radius: 18px; background: var(--teal-soft); }
.cm-reply.is-visitor { grid-template-columns: 34px 1fr auto auto; background: var(--cream); } /* a visitor's answer to a comment (they answer each other too) */
.cm-reply .cm-text { margin: 2px 0 0; font-size: 14px; }
.cm-av.cm-av-sm { width: 34px; height: 34px; background: #0e7d7c; }
.cm-badge { display: inline-flex; margin-inline-start: -6px; }
.cm-reply-form { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; margin-top: 10px; }
.cm-reply-form[hidden] { display: none; }
.cm-reply-form textarea { width: 100%; min-height: 64px; resize: vertical; border: 2px solid var(--line); border-radius: 16px; padding: 10px 12px; font: inherit; background: var(--input); color: var(--ink); }
.cm-reply-form textarea:focus { outline: none; border-color: var(--teal); }
.cm-reply-actions { grid-column: 2; display: flex; gap: 8px; }
.tab .tab-count { background: var(--coral); color: #fff; font-size: 11px; font-weight: 900; border-radius: 999px; padding: 0 7px; line-height: 1.8; margin-inline-start: 2px; }
@media (max-width: 980px) { .cm-box .rows { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .cm-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cm-stats b { font-size: 24px; }
  .cm-row, .panel .cm-row { grid-template-columns: 40px 1fr; gap: 10px; padding: 12px; }
  .cm-av, .panel .cm-av { width: 40px; height: 40px; font-size: 16px; }
  .cm-actions { grid-column: 2; justify-content: flex-start; }
}

/* the site's members (studio/js/views/site-members.js) */
.mb-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--cream); border-radius: 22px; }
.mb-row.is-banned { opacity: .62; }
.mb-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mb-user { color: var(--muted); font-size: 13px; font-weight: 700; }
.mb-flag { font-style: normal; font-size: 11.5px; font-weight: 900; color: #c73b2c; background: color-mix(in srgb, #c73b2c 12%, transparent); padding: 2px 8px; border-radius: 99px; }
.mb-ok { font-style: normal; display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 800; color: var(--teal); }
.mb-ok svg { width: 13px; height: 13px; }
.mb-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.btn-danger-soft { color: #c73b2c; }
.mb-row { position: relative; transition: background .15s; }
.mb-row:hover { background: color-mix(in srgb, var(--teal) 7%, var(--cream)); }
.mb-open { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.mb-open:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.mb-row .cm-actions { position: relative; z-index: 2; }
.mb-blue { flex: none; vertical-align: -2px; }
.cm-meta .mb-blue { margin-inline-start: -4px; }
.mb-back { width: fit-content; }
.mb-card { display: grid; grid-template-columns: 84px 1fr auto; gap: 18px; align-items: center; padding: 20px 22px; background: var(--cream); border-radius: 26px; }
.mb-av, .panel .mb-av { width: 84px; height: 84px; font-size: 32px; }
.mb-card-tx { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mb-card-tx h1 { margin: 0; font-size: 26px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mb-card-tx h1 .mb-blue { width: 22px; height: 22px; }
.mb-card-tx p { margin: 0; }
.mb-card .btn, .mb-row .btn { background: var(--card); }
/* the gold «فعّل الاشتراك» keeps its gold on a member's card (it was a dark grey there, unreadable in dark mode) */
.mb-card .btn.pr-btn, .mb-row .btn.pr-btn { background: linear-gradient(135deg, #ffd25a, #e09a12); color: #3b2600; }
.mb-facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.mb-fact { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--cream); border-radius: 18px; min-width: 0; }
.mb-fact small { color: var(--muted); font-size: 12px; font-weight: 800; }
.mb-fact b { font-size: 14.5px; font-weight: 800; overflow-wrap: anywhere; }
.wrap > .panel.mb-sec { margin: 0; }
.mb-sec h2 { margin: 0 0 12px; font-size: 17px; }
.mb-sec > p { margin: 0; line-height: 1.8; white-space: pre-line; }
.mb-devices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mb-devices li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; padding: 10px 14px; background: var(--card); border-radius: 14px; font-size: 14px; }
.mb-comments { display: flex; flex-direction: column; gap: 8px; }
.mb-comment { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--card); border-radius: 16px; color: inherit; text-decoration: none; transition: background .15s; }
.mb-comment:hover { background: color-mix(in srgb, var(--teal) 6%, var(--card)); }
.mb-comment p { margin: 0; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-line; }
.mb-comment.is-deleted { opacity: .55; }
.mb-comment.is-deleted p { text-decoration: line-through; }
@media (max-width: 720px) {
  .mb-card { grid-template-columns: 64px 1fr; padding: 16px; }
  .mb-av, .panel .mb-av { width: 64px; height: 64px; font-size: 24px; }

  .mb-card-tx h1 { font-size: 21px; }
  .mb-facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) { .mb-row { grid-template-columns: 40px 1fr; } .mb-row .cm-actions { grid-column: 2; } }
/* the site's own account on the site (gold badge), the owner's card on the members page */
.mb-off { background: linear-gradient(135deg, color-mix(in srgb, #ffd25a 16%, var(--cream)), var(--cream) 60%); }
.card-head h2 .mb-off-logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.card-head h2 svg.mb-gold { width: 22px; height: 22px; padding: 0; background: none; border-radius: 0; }
.mb-off-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; }
.mb-off-tx { min-width: 0; flex: 1 1 420px; display: flex; flex-direction: column; gap: 6px; }
.mb-off-tx p { margin: 0; line-height: 1.9; }
.mb-off-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mb-off-done { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; padding: 12px 14px; border-radius: 16px; background: var(--teal-soft); color: var(--ink); line-height: 2; }
.mb-off-done > svg { flex: none; width: 18px; height: 18px; margin-top: 6px; color: var(--teal); }
.mb-off-done code { font-size: 15px; font-weight: 800; padding: 2px 8px; border-radius: 8px; background: var(--card); user-select: all; }
.mb-off-err { margin: 0; color: var(--red); font-weight: 800; }
.mb-gold-tag { font-style: normal; font-size: 12px; font-weight: 900; color: #a86d05; background: color-mix(in srgb, #e09a12 15%, transparent); padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
[data-theme="dark"] .mb-gold-tag { color: #f2bd4b; }
.mb-row.is-official { background: color-mix(in srgb, #ffd25a 12%, var(--cream)); }
/* the blue badge, given or taken by the owner */
.mb-badge-btn svg { width: 16px; height: 16px; flex: none; }
.mb-badge-btn:not(.is-on) svg { filter: grayscale(1); opacity: .45; }
.mb-badge-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 99px; background: var(--cream); border: 1px solid var(--line); }
.mb-badge-seg button { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border: 0; border-radius: 99px; background: none; color: var(--muted); font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.mb-badge-seg.is-sm button { height: 28px; padding: 0 9px; font-size: 12px; }
.mb-badge-seg button svg { width: 15px; height: 15px; }
.mb-badge-seg button.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.mb-badge-seg button:not(.is-on) svg { filter: grayscale(1); opacity: .5; }
.mb-row .cm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mb-card-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) { .mb-card .mb-card-acts { grid-column: 1 / -1; justify-content: flex-start; } }
.mb-wait { font-style: normal; font-size: 11.5px; font-weight: 900; color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, transparent); padding: 2px 8px; border-radius: 99px; }
.mb-fact .mb-wait { font-size: 13px; }
.pr-official { font-style: normal; font-size: 11.5px; font-weight: 900; color: #3b2600; background: linear-gradient(135deg, #ffd25a, #e09a12); padding: 2px 8px; border-radius: 99px; }
.mb-fact #mb-verify { margin-top: 4px; align-self: flex-start; }

/* «المجتمع» (studio/js/views/community.js): the rooms, the reports, a room's latest messages */
.cy-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.cy-room { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 2px solid transparent; border-radius: 18px; background: var(--cream); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.cy-room:hover { border-color: var(--line); }
.cy-room.is-on { border-color: var(--teal); background: var(--teal-soft); }
.cy-mark { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, hsl(var(--h) 60% 50%), hsl(var(--h) 62% 31%)); color: #fff; font-weight: 900; font-size: 11.5px; overflow: hidden; flex: none; }
.cy-mark img { width: 100%; height: 100%; object-fit: cover; }
.cy-sec h2 .cy-mark { width: 32px; height: 32px; border-radius: 10px; font-size: 9.5px; }
.cy-room-tx { min-width: 0; display: flex; flex-direction: column; }
.cy-room-tx b { font-size: 14.5px; }
.cy-room-tx small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cy-room-n { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 11.5px; font-weight: 800; }
.cy-room-n em { font-style: normal; color: var(--green); }
.cy-room-n i { font-style: normal; color: var(--muted); }
.wrap > .panel.cy-sec { margin: 0; }
.cy-sec h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 19px; }
.cy-sec h2 > svg { width: 22px; height: 22px; }
.cy-list { display: flex; flex-direction: column; gap: 8px; }
.cy-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 18px; background: var(--card); }
.cy-item.is-report { grid-template-columns: minmax(0, 1fr) auto; border-inline-start: 4px solid var(--coral); }
.cy-item.is-del { opacity: .55; }
.cy-item .cm-av { width: 40px; height: 40px; font-size: 15px; }
.cy-item-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cy-item-main p { margin: 0; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-line; }
.cy-item .cm-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cy-item .cm-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cy-img { max-width: 160px; max-height: 120px; border-radius: 10px; margin-top: 6px; object-fit: cover; }
.cm-stats .is-alert { background: var(--coral-soft); }
.cy-mute-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cy-mute-opts label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--cream); font-weight: 800; cursor: pointer; }
@media (max-width: 720px) { .cy-item { grid-template-columns: 36px minmax(0, 1fr); } .cy-item .cm-actions { grid-column: 1 / -1; justify-content: flex-start; } .cy-item.is-report { grid-template-columns: 1fr; } }

/* «العضوية المميزة» (studio/js/views/premium.js) */
.pr-btn { background: linear-gradient(135deg, #ffd25a, #e09a12); color: #3b2600; }
.pr-btn svg { width: 16px; height: 16px; }
.mb-head-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.pr-tag { display: inline-flex; align-items: center; gap: 3px; }
.pr-tag svg { width: 11px; height: 11px; }
.pr-alert { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; background: var(--yellow-soft); line-height: 1.8; }
.pr-alert > svg { flex: none; width: 22px; height: 22px; color: var(--amber); margin-top: 3px; }
.pr-req.is-done, .pr-req.is-declined { opacity: .7; }
.pr-req-text { width: 100%; margin-top: 4px; font-weight: 700; font-size: 14.5px; line-height: 1.7; resize: vertical; min-height: 44px; }
.pr-states { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pr-states label { cursor: pointer; }
.pr-states input { position: absolute; opacity: 0; pointer-events: none; }
.pr-states span { display: inline-flex; padding: 4px 12px; border-radius: 999px; background: var(--cream); font-weight: 800; font-size: 12.5px; color: var(--muted); }
.pr-states input:checked + span { background: var(--ink); color: var(--on-ink); }
.pr-req-edit { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; margin-top: 8px; }
.pr-req-edit .input { height: 40px; font-size: 13.5px; }
.pr-amt { font-weight: 900; color: var(--green); white-space: nowrap; }
.pr-pay { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 720px) { .pr-req-edit { grid-template-columns: 1fr; } }
.pr-field textarea { font-size: 13px; }
.pr-hint { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--yellow-soft); line-height: 1.8; }
.pr-hint > svg { flex: none; width: 18px; height: 18px; margin-top: 4px; color: var(--amber); }
.pr-state { color: var(--teal); font-weight: 700; }
.pr-early { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 14px; }
.pr-early-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-early-at { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: var(--muted); }
.pr-early-at .input { width: auto; min-width: 220px; }
.pr-early-on { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--teal); font-weight: 700; font-size: 13px; }
.pr-early-on[hidden] { display: none; }

/* «غرف المجتمع» (studio/js/views/community.js renderRoomsEditor) */
.cy-head-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.cy-flag { font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: var(--cream); color: var(--muted); vertical-align: 1px; }
.ry-list { display: flex; flex-direction: column; gap: 12px; }
.ry-room { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.ry-room.is-hidden { opacity: .62; }
.ry-mark { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; overflow: hidden; background: hsl(var(--h) 70% 42%); color: #fff; font: 900 15px 'Cairo', sans-serif; letter-spacing: .02em; }
.ry-mark img { width: 100%; height: 100%; object-fit: cover; }
.ry-fields { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ry-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.ry-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ry-f span, .ry-hue span { font-size: 12px; font-weight: 800; color: var(--muted); }
.ry-f .input { height: 40px; }
.ry-name { flex: 2 1 180px; }
.ry-markf { flex: 0 1 100px; }
.ry-id { flex: 1 1 130px; }
.ry-id input[readonly] { opacity: .65; }
.ry-opts { align-items: center; gap: 16px; }
.ry-hue { display: flex; align-items: center; gap: 8px; }
.ry-hue input { width: 160px; accent-color: var(--teal); }
.ry-tog { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13.5px; cursor: pointer; }
.ry-acts { display: flex; flex-direction: column; gap: 6px; }
.ry-add { margin-top: 14px; width: 100%; justify-content: center; border-style: dashed; }
@media (max-width: 720px) { .ry-room { grid-template-columns: 48px minmax(0, 1fr); } .ry-mark { width: 48px; height: 48px; border-radius: 14px; font-size: 12px; } .ry-acts { grid-column: 1 / -1; flex-direction: row; } }
.mb-edit { display: flex; flex-direction: column; gap: 10px; text-align: right; }
.mb-edit .field { display: flex; flex-direction: column; gap: 4px; }
.mb-edit .field span { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.mb-edit-pic { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13.5px; }
.mb-edit .field small { font-size: 11.5px; line-height: 1.6; }
.mb-edit-pic-row { display: flex; align-items: center; gap: 14px; }
.mb-edit-av { width: 64px; height: 64px; font-size: 26px; flex: none; overflow: hidden; }
.mb-edit-av img { width: 100%; height: 100%; object-fit: cover; }
.mb-edit-pic-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mb-edit-pic-acts .btn { cursor: pointer; }
.mb-edit-pic-acts small { flex-basis: 100%; }
.mb-edit-pw { display: flex; gap: 8px; }
.mb-edit-pw .input { flex: 1; min-width: 0; }
.mb-newpass { font: 800 20px/1.4 ui-monospace, monospace; text-align: center; padding: 12px; border-radius: 12px; background: var(--card-2, rgba(0,0,0,.05)); user-select: all; word-break: break-all; }
.modal .mb-edit { max-height: min(62vh, 560px); overflow-y: auto; padding-inline-end: 4px; }

/* «التوقعات» (studio/js/views/predictions.js) */
.pd-list { display: flex; flex-direction: column; gap: 14px; }
.pd-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pd-card-head h2 { margin: 0 0 4px; font-size: 18px; }
.pd-card-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-card.is-draft { border-style: dashed; }
.pd-card.is-done { border-color: color-mix(in srgb, #e09a12 40%, var(--line)); }
.pd-card-ms { margin: 12px 0 0; padding: 0 18px 0 0; display: flex; flex-direction: column; gap: 6px; }
.pd-card-ms li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.pd-win { font-weight: 800; color: #2f9e5b; }
/* the show's prize (studio/js/views/predictions.js) */
.pd-prize-row { margin: 12px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #e09a12 10%, transparent); border: 1px solid color-mix(in srgb, #e09a12 35%, var(--line)); }
.pd-prize-row > svg { color: #e09a12; flex: none; }
.pd-prize-row > span:first-of-type { flex: 1; min-width: 200px; }
.pd-prize-row.is-none { background: none; border-style: dashed; }
.pd-prize-done { font-weight: 800; color: #2f9e5b; }
.pd-ed-main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pd-ed-main .field { display: flex; flex-direction: column; gap: 6px; }
.pd-ed-main .field span { font-weight: 700; font-size: 13.5px; }
.pd-ed-ms { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.pd-ed-m { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--cream); display: flex; flex-direction: column; gap: 8px; }
.pd-ed-m-top { display: flex; align-items: center; gap: 8px; }
.pd-ed-m-top > b { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--card); }
.pd-ed-m-top .input:first-of-type { flex: 1; min-width: 0; }
.pd-ed-m .pd-pts { width: auto; flex: none; }
.pd-res { margin: 0; padding: 0 18px 0 0; display: flex; flex-direction: column; gap: 14px; }
.pd-res li { display: flex; flex-direction: column; gap: 6px; }
.pd-res-opts { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 700px) { .pd-ed-main { grid-template-columns: 1fr; } }

/* the owner's «فعّل الاشتراك» (views/premium.js premiumPicker): a member found by email, any period */
.pg-find { display: flex; gap: 8px; margin: 12px 0 4px; max-width: 560px; }
.pg-find .input { flex: 1; min-width: 0; }
.pg-who { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, #ffd25a 7%, transparent); }
.pg-who > div { flex: 1; min-width: 0; }
.pg { display: flex; flex-direction: column; gap: 12px; }
.pg-now { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 700; }
.pg-now svg { color: #e09a12; }
.pg-chips { flex-wrap: wrap; }
.pg-custom { display: flex; flex-wrap: wrap; gap: 14px; }
.pg-custom label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pg-row { display: flex; gap: 6px; }
.pg-row .input[type="number"] { width: 96px; }
.pg-row select.input { min-width: 104px; padding-inline: 12px 30px; }
.pg-custom .input { height: 40px; }
.pg-sum { margin: 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.pg-bad { color: #c73b2c; font-weight: 700; margin: 8px 0 0; }
.pg-sum .pg-bad { margin: 0; }
.pg-acts { display: flex; gap: 8px; flex-wrap: wrap; }
/* paid or a gift, picked before a membership is turned on by hand (owner 2026-10-16) */
.pg-kindpick { display: flex; flex-direction: column; gap: 8px; }
.pg-lbl { font-size: 13px; font-weight: 800; color: var(--muted); }
.pg-kinds .chip.active[data-kind="paid"] { background: color-mix(in srgb, #2f9e5b 16%, transparent); color: #1f8a4c; border-color: color-mix(in srgb, #2f9e5b 45%, transparent); }
.pg-kinds .chip.active[data-kind="gift"] { background: color-mix(in srgb, #c2417a 14%, transparent); color: #c2417a; border-color: color-mix(in srgb, #c2417a 40%, transparent); }
.pg-pay { display: flex; flex-wrap: wrap; gap: 14px; }
.pg-pay label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); flex: 1 1 180px; }
.pg-pay .input { height: 40px; }
.pg-pay .pg-row .input[type="number"] { width: 110px; }
.pg-kind-note { margin: 0; }
.pg-swap { margin-inline-start: 6px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer; }
.pg-swap:hover { color: var(--ink); border-color: var(--muted); }
@media (max-width: 600px) { .pg-find { flex-direction: column; } .pg-custom label { flex: 1 1 100%; } }
/* the kind of a membership, and a member's history */
.pg-kind { font-style: normal; font-size: 11.5px; font-weight: 900; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.pg-kind.is-trial { color: #6d5bd0; background: color-mix(in srgb, #7c6ee8 15%, transparent); }
.pg-kind.is-gift { color: #c2417a; background: color-mix(in srgb, #c2417a 13%, transparent); }
.pg-kind.is-paid { color: #1f8a4c; background: color-mix(in srgb, #2f9e5b 15%, transparent); }
.pg-until { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.pg-h3 { margin: 22px 0 10px; font-size: 15px; }
.pg-hist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pg-hist-row { display: flex; gap: 16px; align-items: center; padding: 11px 14px; }
.pg-hist-row + .pg-hist-row { border-top: 1px solid var(--line); }
.pg-hist-row.is-wait { opacity: .75; }
.pg-hist-date { display: flex; flex-direction: column; min-width: 130px; font-weight: 700; font-size: 13.5px; }
.pg-hist-what { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pg-hist-what b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pg-wait { color: var(--muted); }
@media (max-width: 600px) { .pg-hist-row { flex-direction: column; align-items: flex-start; gap: 6px; } }

/* a room's background (views/community.js bgBlock): the picture as the site shows it, messages over it */
.ry-bg { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; border-radius: 14px; border: 1px dashed var(--line); }
.ry-bg.has-bg { border-style: solid; }
.ry-bg.is-busy { opacity: .6; pointer-events: none; }
.ry-bg-prev { position: relative; isolation: isolate; overflow: hidden; height: 132px; border-radius: 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 10px; background: var(--bg); }
.ry-bg-prev::before { content: ""; position: absolute; inset: calc(var(--blur, 12px) * -2.5); z-index: -1; background-image: linear-gradient(rgba(250, 247, 240, var(--dim, .45)), rgba(250, 247, 240, var(--dim, .45))), var(--bgurl, none); background-size: cover; background-position: center; filter: blur(var(--blur, 12px)) saturate(1.15); }
[data-theme="dark"] .ry-bg-prev::before { background-image: linear-gradient(rgba(7, 9, 13, var(--dim, .45)), rgba(7, 9, 13, var(--dim, .45))), var(--bgurl, none); }
.ry-bg-msg { max-width: 78%; padding: 5px 10px; border-radius: 9px; font-size: 12.5px; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); }
.ry-bg-msg.is-in { align-self: flex-start; background: var(--card); color: var(--ink); }
.ry-bg-msg.is-out { align-self: flex-end; background: #0e9594; color: #fff; }
/* no picture yet: the room as it looks today (the site's dotted backdrop), a small «من غير خلفية» in its corner */
.ry-bg:not(.has-bg) .ry-bg-prev { background-color: var(--bg); background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1.2px); background-size: 16px 16px; }
.ry-bg-empty { position: absolute; top: 8px; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 11.5px; font-weight: 800; z-index: 1; pointer-events: none; }
.ry-bg-empty svg { width: 13px; height: 13px; }
.ry-bg-ctl { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ry-bg-t { font-size: 12px; font-weight: 800; color: var(--muted); }
.ry-bg-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ry-bg-btns label.btn { cursor: pointer; }
.ry-bg-range { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 800; color: var(--muted); }
.ry-bg-range span { display: flex; justify-content: space-between; }
.ry-bg-range input { width: 100%; max-width: 260px; accent-color: var(--teal); }
@media (max-width: 640px) { .ry-bg { grid-template-columns: 1fr; } }

/* who sees a room (views/community.js visBlock): everyone, some members, or the owner alone */
.ry-vis { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.ry-vis-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ry-vis .mb-badge-seg button svg { width: 14px; height: 14px; }
.ry-vis .mb-badge-seg button.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.ry-people { display: flex; flex-wrap: wrap; gap: 6px; }
.ry-person { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 99px; background: color-mix(in srgb, #e09a12 14%, var(--card)); border: 1px solid color-mix(in srgb, #e09a12 35%, transparent); font-size: 13px; }
.ry-person b { font-weight: 800; }
.ry-person button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.ry-person button:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.ry-find { position: relative; max-width: 460px; }
.ry-find-res { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 20; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .35); }
.ry-find-res[hidden] { display: none; }
.ry-find-hit { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font-family: inherit; text-align: start; cursor: pointer; }
.ry-find-hit:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.ry-find-hit small { color: var(--muted); font-size: 12px; }

/* «التوقعات»: each match's poster in the list */
.pd-card-mimg { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; object-position: center 15%; align-self: center; flex: none; }

/* who picked what in a show (studio/js/views/predictions.js whoPicked) */
.pd-who-tabs { margin: 0 0 14px; }
.pd-who-ms { display: flex; flex-direction: column; gap: 14px; }
.pd-who-m h2 { font-size: 16px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.pd-who-o { padding: 12px 0; }
.pd-who-o + .pd-who-o { border-top: 1px solid var(--line); }
.pd-who-oh { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pd-who-o.is-win .pd-who-oh b { color: #1f8a4c; }
.pd-who-o.is-lose { opacity: .78; }
.pd-who-bar { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); margin: 7px 0 10px; overflow: hidden; }
.pd-who-bar i { display: block; height: 100%; border-radius: inherit; background: var(--teal, #0e9594); }
.pd-who-o.is-win .pd-who-bar i { background: #2f9e5b; }
.pd-who-ps { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-who-p { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 99px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 700; }
.pd-who-p:hover { border-color: var(--teal, #0e9594); }
.pd-who-p.is-prem span:last-child { color: #a86400; }
.pd-who-av { width: 24px; height: 24px; border-radius: 50%; background: var(--teal, #0e9594); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 900; overflow: hidden; flex: none; }
.pd-who-av img { width: 100%; height: 100%; object-fit: cover; }
.pd-who-tbl { overflow-x: auto; }
.pd-who-tr { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(110px, 1fr); grid-template-columns: minmax(190px, 1.6fr); gap: 8px; align-items: center; padding: 8px 4px; min-width: max-content; }
.pd-who-tr + .pd-who-tr { border-top: 1px solid var(--line); }
.pd-who-tr.is-head { font-size: 12px; font-weight: 900; color: var(--muted); }
.pd-who-tr [role="cell"] { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.pd-who-tr .is-ok { color: #1f8a4c; }
.pd-who-tr .is-no { color: #c73b2c; text-decoration: line-through; opacity: .8; }
.pd-who-rank { font-style: normal; font-weight: 900; color: var(--muted); min-width: 18px; }

/* «سيرفر التفريغ» (views/tools.js renderServerTool) */
.srv-card { margin-bottom: 16px; }
.srv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.srv-state { display: flex; align-items: center; gap: 10px; font-size: 24px; }
.srv-dot { width: 16px; height: 16px; border-radius: 50%; background: #9a9890; display: inline-block; }
.srv-dot.on { background: #3fa34d; box-shadow: 0 0 0 5px rgba(63, 163, 77, .18); }
.srv-sub { margin-top: 6px; }
.srv-steps { margin: 12px 0 0; padding-inline-start: 22px; line-height: 2; }
.srv-job { margin-top: 16px; border-top: 1px solid var(--line, rgba(0,0,0,.08)); padding-top: 14px; }
.srv-job > b { font-size: 18px; }
.srv-bar { background: rgba(0,0,0,.08); border-radius: 8px; height: 20px; overflow: hidden; margin-top: 10px; }
.srv-bar > div { background: #3fa34d; height: 100%; transition: width .6s; }
.srv-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.srv-kpis > div { background: rgba(0,0,0,.04); border-radius: 14px; padding: 10px 12px; }
.srv-kpis small { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.srv-kpis b { display: block; font-size: 22px; font-weight: 900; }
.srv-err { margin-top: 12px; color: #c0392b; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.srv-table { overflow-x: auto; margin-top: 10px; }
.srv-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.srv-table th { text-align: start; color: var(--muted); font-weight: 700; padding: 8px 6px; white-space: nowrap; }
.srv-table td { padding: 9px 6px; border-top: 1px solid var(--line, rgba(0,0,0,.08)); white-space: nowrap; }
.srv-table td.srv-name { white-space: normal; word-break: break-all; min-width: 180px; font-weight: 700; }
.srv-table td.ok { color: #2e8b3e; font-weight: 800; }
.srv-table td.bad { color: #c0392b; font-weight: 800; }
.srv-new input[type=url] { width: 100%; margin: 10px 0; }
.srv-langs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.srv-chip { cursor: pointer; }
.srv-chip input { position: absolute; opacity: 0; pointer-events: none; }
.srv-chip span { display: inline-block; padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,.05); font-weight: 800; }
.srv-chip input:checked + span { background: var(--ink, #141414); color: #fff; }
.srv-note { font-size: 13px; margin-bottom: 10px; }
.srv-new, #srv-shows { margin-bottom: 0; }
section.panel + section.panel { margin-top: 16px; }
.srv-wait { margin-top: 10px; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.srv-show { padding: 14px 0; border-top: 1px solid var(--line, rgba(0,0,0,.08)); }
.srv-show:first-child { border-top: 0; }
.srv-show-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.srv-show .srv-name { word-break: break-all; }
.srv-tag { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.06); white-space: nowrap; }
.srv-tag.ok { background: #e3f3e6; color: #22702f; }
.srv-tag.run { background: #e6f0fb; color: #1c5a9e; }
.srv-tag.wait { background: #fbf1df; color: #8a5a0b; }
.srv-tag.bad { background: #fbe5e3; color: #a3271b; }
.srv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.srv-ar { margin-top: 12px; background: rgba(0,0,0,.03); border-radius: 16px; padding: 12px; }
.srv-ar-title { font-weight: 800; margin-bottom: 8px; }
.srv-pos { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.srv-pos-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px solid transparent; border-radius: 14px; padding: 8px; background: rgba(0,0,0,.04); font-weight: 800; cursor: pointer; font: inherit; }
.srv-pos-btn.on { border-color: #3fa34d; background: #e3f3e6; }
.srv-screen { position: relative; width: 96px; height: 54px; background: #2a2a2a; border-radius: 6px; display: block; }
.srv-screen i { position: absolute; font-style: normal; font-size: 10px; font-weight: 900; background: #f3c230; color: #141414; padding: 1px 4px; border-radius: 3px; }
.srv-screen i.tl { top: 5px; left: 5px; }
.srv-screen i.tr { top: 5px; right: 5px; }
.srv-screen i.br { bottom: 5px; right: 5px; }
.srv-file { cursor: pointer; }
[data-theme="dark"] .srv-tag.ok, [data-theme="dark"] .srv-pos-btn.on { background: rgba(63,163,77,.2); color: #8fd99a; }
[data-theme="dark"] .srv-tag.run { background: rgba(55,138,221,.2); color: #9cc6f2; }
[data-theme="dark"] .srv-tag.wait { background: rgba(186,117,23,.22); color: #f2c37a; }
[data-theme="dark"] .srv-tag.bad { background: rgba(226,75,74,.2); color: #f4a3a2; }
[data-theme="dark"] .srv-chip span, [data-theme="dark"] .srv-ar, [data-theme="dark"] .srv-pos-btn, [data-theme="dark"] .srv-kpis > div, [data-theme="dark"] .srv-tag { background-color: rgba(255,255,255,.06); }
[data-theme="dark"] .srv-chip input:checked + span { background: #f3f1ea; color: #141414; }
[data-theme="dark"] .srv-bar { background: rgba(255,255,255,.1); }
.srv-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 190px 36px; gap: 8px; align-items: center; margin: 8px 0; }
@media (max-width: 760px) { .srv-row { grid-template-columns: 1fr 1fr 36px; } .srv-row .srv-url { grid-column: 1 / -1; } }
.srv-q { border: 2px solid transparent; border-radius: 999px; padding: 7px 14px; background: rgba(0,0,0,.05); font: inherit; font-weight: 800; cursor: pointer; }
.srv-q.on { border-color: #3fa34d; background: #e3f3e6; }
.srv-links { margin-top: 12px; background: rgba(0,0,0,.03); border-radius: 16px; padding: 12px; }
.srv-lq { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.srv-lq b { min-width: 56px; }
.srv-hosts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 12px 0; }
.srv-host { background: rgba(0,0,0,.03); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.srv-host-on { display: flex; align-items: center; gap: 8px; cursor: pointer; }
[data-theme="dark"] .srv-q, [data-theme="dark"] .srv-links, [data-theme="dark"] .srv-host { background-color: rgba(255,255,255,.06); }
[data-theme="dark"] .srv-q.on { background: rgba(63,163,77,.2); color: #8fd99a; }
.srv-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.srv-help { margin-top: 10px; }
.srv-help summary { cursor: pointer; font-weight: 800; }
.srv-help p { margin: 8px 0; line-height: 1.9; }
.srv-lang-pick { align-items: center; margin-top: 8px; }
.srv-job > b, .srv-show .srv-name { overflow-wrap: anywhere; word-break: break-word; }
.srv-keyrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.srv-keyrow .input { max-width: 420px; }
.cy-clear { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.srv-bar-sm { height: 10px; margin: 8px 0 4px; }
button.pager-num, button.pager-step { border: 0; font: inherit; font-weight: 800; cursor: pointer; }
.srv-ctl-row { margin-top: 8px; }
.srv-ctl { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.srv-picked { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; padding: 10px 12px; border-radius: 12px; background: rgba(63,163,77,.12); }
.srv-picked b { word-break: break-all; }
.srv-go { min-width: 180px; }
[data-theme="dark"] .srv-picked { background: rgba(63,163,77,.18); }
.srv-arinfo { margin: 6px 0 2px; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.srv-arinfo b { word-break: break-all; }
/* the rental key stays hidden as dots without being a password field (so the browser doesn't offer saved logins) */
.srv-masked { -webkit-text-security: disc; text-security: disc; }
.srv-drive-opt { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.srv-dls { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.srv-dl { display: flex; flex-direction: column; gap: 4px; }
.srv-dl-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.srv-dl-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pause-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; margin-bottom: 16px; border-radius: 16px; background: var(--card, rgba(255,255,255,.04)); border: 1px solid var(--line, rgba(255,255,255,.08)); }
.pause-card p { margin: 4px 0 0; }
.pause-card.is-off { border-color: rgba(255, 99, 71, .55); background: rgba(255, 99, 71, .08); }
@media (max-width: 640px) { .pause-card { flex-direction: column; align-items: stretch; } }
.srv-needlang { margin: 10px 0; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 196, 0, .5); background: rgba(255, 196, 0, .08); display: flex; flex-direction: column; gap: 8px; }
.srv-needlang .srv-langs { display: flex; flex-wrap: wrap; gap: 8px; }
