/* أدوات المحتوى بنفس الهوية المعتمدة: كحلي وزعفراني، والكتابة بأبيض الصوف.
   الأحمر يطلع بس في المعاينة عند الجواب الصح. الخطوط والألوان الأساسية من /css/tq.css. */
:root {
  --line: rgba(244, 237, 225, .14);
  --ink-2: rgba(244, 237, 225, .78);
  --ink-3: rgba(244, 237, 225, .55);
  --hover: rgba(244, 237, 225, .06);
}
/* الوضع النهاري (TQ.setTheme): نفس ألوان الموقع بالعكس. */
html.day {
  --line: rgba(30, 36, 82, .14);
  --ink-2: rgba(30, 36, 82, .78);
  --ink-3: rgba(30, 36, 82, .58);
  --hover: rgba(30, 36, 82, .05);
}
.top .theme-top { margin-inline-start: 6px; }
.login .theme-top { position: absolute; top: 46px; left: 18px; }
body { font-size: 15px; line-height: 1.6; }
button, input, select, textarea { font: inherit; color: inherit; }

/* buttons: primary saffron, secondary raised navy, outline for the quiet ones */
.btn { font-size: 17px; border-radius: 12px; padding: 6px 16px; }
.btn.dark { background: var(--up); color: var(--accent-text); box-shadow: inset 0 0 0 2px var(--saffron); }
.btn.ghost { background: transparent; color: var(--wool); box-shadow: inset 0 0 0 1.5px var(--wool-faint); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--saffron); outline-offset: 1px; }
.btn.primary:focus-visible { outline-color: var(--wool); }

/* ---------- sign-in ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; }
.login .band { margin: 16px 16px 0; }
.login .center-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; }
.login .box { width: min(380px, 100%); background: var(--up); border-radius: 18px; padding: 26px 24px; }
.login .tag { color: var(--wool-dim); margin: -4px 0 0; text-align: center; }
.login label { display: block; font-size: 13px; color: var(--wool-dim); margin-bottom: 6px; }
.login input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 0; background: var(--deep); color: var(--wool); margin-bottom: 14px; direction: ltr; text-align: right; }
.login .btn { width: 100%; padding: 11px; font-size: 20px; }
.login .msg { min-height: 22px; font-size: 13px; color: var(--accent-text); margin-top: 10px; }

/* ---------- frame ---------- */
#app > .band { margin: 12px 24px 0; }
.top { display: flex; align-items: center; gap: 16px; padding: 10px 24px 4px; }
.top .section { color: var(--wool-dim); font-size: 15px; border-right: 1px solid var(--wool-faint); padding-right: 14px; }
.top .who { margin-right: auto; font-size: 14px; color: var(--wool-dim); }
.top .who b { color: var(--wool); font-weight: 600; }
.wrap { display: grid; grid-template-columns: 230px 1fr; gap: 20px; padding: 16px 24px 24px; max-width: 1500px; margin: 0 auto; }
.side { background: var(--up); border-radius: 14px; padding: 12px; align-self: start; position: sticky; top: 16px; }
.side h3 { font-size: 13px; color: var(--wool-dim); font-weight: 500; margin: 6px 8px 8px; }
.stage { display: flex; justify-content: space-between; width: 100%; text-align: right; background: none; border: 0; padding: 7px 10px; border-radius: 9px; cursor: pointer; color: var(--wool); }
.stage:hover { background: var(--hover); }
.stage.on { background: var(--saffron); color: var(--on-accent); font-weight: 600; }
.stage small { color: var(--wool-dim); font-size: 12px; }
.stage.on small { color: var(--on-accent); }

.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.bar input[type=search] { flex: 1 1 260px; padding: 9px 14px; border-radius: 12px; border: 0; background: var(--up); color: var(--wool); }
.bar input::placeholder { color: var(--ink-3); }
.tabs { display: flex; gap: 4px; background: var(--up); padding: 4px; border-radius: 12px; }
.tab { border: 0; background: none; padding: 6px 12px; border-radius: 9px; cursor: pointer; color: var(--wool-dim); }
.tab.on { background: var(--saffron); color: var(--on-accent); font-weight: 600; }
.tab span { font-size: 12px; opacity: .8; margin-right: 4px; }

table.list { width: 100%; border-collapse: collapse; background: var(--up); border-radius: 14px; overflow: hidden; }
table.list th { text-align: right; font-weight: 500; font-size: 13px; color: var(--wool-dim); padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover td { background: var(--hover); }
.title-cell { font-weight: 500; }
.title-cell small { display: block; color: var(--wool-dim); font-weight: 400; }
.empty { text-align: center; color: var(--wool-dim); padding: 40px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; color: var(--wool-dim); font-size: 13px; }

/* status: told apart by fill and outline, in the two identity colours */
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.chip.draft { box-shadow: inset 0 0 0 1.5px var(--wool-faint); color: var(--wool-dim); }
/* «للمراجعة» needs someone to act, so it is the filled one; «منشور» is the usual state and stays quiet. */
.chip.review { background: var(--saffron); color: var(--on-accent); }
.chip.published { box-shadow: inset 0 0 0 1.5px var(--saffron); color: var(--accent-text); }
.chip.paused { border: 1.5px dashed var(--wool-dim); color: var(--wool-dim); padding: 1px 9px; }

/* ---------- editor drawer ---------- */
.shade { position: fixed; inset: 0; background: rgba(22, 27, 63, .75); }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(640px, 100vw); background: var(--navy); overflow-y: auto; box-shadow: 1px 0 0 var(--line); }
.drawer header { position: sticky; top: 0; background: var(--deep); color: var(--wool); padding: 14px 20px; display: flex; align-items: center; gap: 12px; z-index: 2; }
.drawer header h2 { margin: 0; font-family: "Lalezar"; font-weight: 400; font-size: 26px; }
.drawer header .x, .modal header .x { margin-right: auto; background: none; border: 0; color: var(--wool); font-size: 26px; cursor: pointer; line-height: 1; }
.drawer .body { padding: 18px 20px 120px; }
.note { background: var(--up); color: var(--wool); border-right: 4px solid var(--saffron); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.note b { color: var(--accent-text); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--wool-dim); margin-bottom: 5px; font-weight: 500; }
.field label i { font-style: normal; color: var(--ink-3); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1.5px solid transparent; background: var(--deep); color: var(--wool); }
.field select option { background: var(--deep); }
.field textarea { resize: vertical; min-height: 70px; }
.field .ltr { direction: ltr; text-align: left; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.field .help { display: block; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.field input.num { text-align: right; font-variant-numeric: tabular-nums; }
.field input[type=date] { color-scheme: dark; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 14px; }
.check input, .choice-row input[type=radio] { accent-color: var(--accent-text); width: 18px; height: 18px; }
.choice-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.choice-row input[type=text] { flex: 1; }
.choice-row .btn { padding: 4px 12px; }
.err { color: var(--accent-text); font-size: 13px; min-height: 20px; }
.err.ok { color: var(--wool); }
.section-title { font-size: 13px; color: var(--wool-dim); margin: 22px 0 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.siblings a { display: block; color: var(--accent-text); font-size: 14px; padding: 3px 0; cursor: pointer; }
.history { list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--wool-dim); }
.history li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.history b { color: var(--wool); }
.actions { position: fixed; bottom: 0; left: 0; width: min(640px, 100vw); background: var(--deep); border-top: 1px solid var(--line); padding: 12px 20px; display: flex; flex-wrap: wrap; gap: 8px; z-index: 3; }
.actions textarea { background: var(--navy); color: var(--wool); }

/* preview in the game look: the one place red appears, on the right answer */
.preview { background: var(--deep); border-radius: 14px; padding: 16px 18px; color: var(--wool); margin-bottom: 18px; }
.preview .stage-pill { display: inline-block; background: var(--up); color: var(--accent-text); font-size: 12px; padding: 2px 12px; border-radius: 99px; }
.preview .q { font-family: "Lalezar"; font-size: 26px; line-height: 1.3; margin: 8px 0; }
.preview .ans { display: inline-block; background: var(--truth); color: var(--wool); font-weight: 600; padding: 2px 12px; border-radius: 99px; font-size: 14px; }
.preview .fact { color: var(--wool-dim); font-size: 13px; margin-top: 8px; }
.preview .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.preview .opts div { background: var(--up); border-radius: 10px; padding: 6px 10px; font-size: 14px; }
.preview .opts div.right { box-shadow: inset 0 0 0 2px var(--truth); }
.preview svg, .preview img { display: block; margin: 8px auto 0; }

/* ---------- import ---------- */
.modal { position: fixed; top: 6vh; left: 50%; transform: translateX(-50%); width: min(820px, 94vw); max-height: 88vh; overflow-y: auto; background: var(--navy); border-radius: 18px; box-shadow: 0 0 0 1px var(--line); }
.modal header { background: var(--deep); color: var(--wool); padding: 14px 20px; display: flex; align-items: center; border-radius: 18px 18px 0 0; position: sticky; top: 0; }
.modal header h2 { margin: 0; font-family: "Lalezar"; font-weight: 400; font-size: 26px; }
.modal .body { padding: 18px 20px; }
.modal code { background: var(--deep); color: var(--accent-text); padding: 1px 6px; border-radius: 6px; font-size: 13px; direction: ltr; display: inline-block; }
.modal input[type=file] { color: var(--wool-dim); }
.report td.bad { color: var(--accent-text); }
.report td.good { color: var(--wool); }

/* narrow screens: the stage list becomes a scrolling row above the table */
@media (max-width: 820px) {
  .top { padding: 10px 16px 4px; gap: 10px; }
  .top .section { display: none; }
  #app > .band { margin: 10px 16px 0; }
  .wrap { grid-template-columns: 1fr; padding: 12px 16px; gap: 12px; }
  .wrap > main, .side { min-width: 0; }
  .side { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; }
  .side h3 { display: none; }
  #stages { display: flex; gap: 4px; }
  .stage { width: auto; white-space: nowrap; gap: 8px; }
  .tabs { overflow-x: auto; max-width: 100%; }
  table.list th:nth-child(2), table.list td:nth-child(2), table.list th:nth-child(n+4), table.list td:nth-child(n+4) { display: none; }
  .row3 { grid-template-columns: 1fr 1fr; }
}

/* ---------- the board: home and users ---------- */
.views { display: flex; gap: 4px; background: var(--up); padding: 4px; border-radius: 12px; }
.views a { color: var(--wool-dim); text-decoration: none; padding: 5px 14px; border-radius: 9px; font-size: 15px; }
.views a.on { background: var(--saffron); color: var(--on-accent); font-weight: 600; }
.ops { padding: 16px 24px 40px; max-width: 1200px; margin: 0 auto; }
.ops-title { font-family: "Lalezar"; font-weight: 400; font-size: 30px; margin: 4px 0 14px; line-height: 1.3; }
.ops-h { font-size: 15px; font-weight: 600; color: var(--wool-dim); margin: 22px 0 10px; }
.calm { color: var(--wool-dim); font-size: 14px; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--up); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: "Lalezar"; font-weight: 400; font-size: 28px; color: var(--accent-text); line-height: 1.2; }
.stat span { font-size: 14px; }
.stat small { font-size: 12px; color: var(--wool-dim); }
.attention { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.attention li { background: var(--up); border-radius: 12px; padding: 10px 14px; border-right: 4px solid var(--saffron); display: flex; gap: 8px; align-items: center; }
.attention li b { color: var(--accent-text); font-size: 18px; }
.attention li a { margin-right: auto; color: var(--accent-text); }
.ops .bar input[type=search] { flex: 1 1 100%; }
.chip.u-active { box-shadow: inset 0 0 0 1.5px var(--saffron); color: var(--accent-text); }
.chip.u-suspended { background: var(--saffron); color: var(--on-accent); }
.chip.u-deleted { border: 1.5px dashed var(--wool-dim); color: var(--wool-dim); padding: 1px 9px; }
.back { color: var(--accent-text); text-decoration: none; font-size: 14px; }
.back::before { content: "‹ "; }
.user-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; justify-content: space-between; margin-top: 6px; }
.user-head .ops-title { margin-bottom: 4px; overflow-wrap: anywhere; }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.user-actions .btn { font-size: 15px; }
.user-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.panel .ops-h { border-top: 1px solid var(--line); padding-top: 14px; }
.kvs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.kv small { display: block; font-size: 12px; color: var(--wool-dim); }
.kv b { font-weight: 500; overflow-wrap: anywhere; }
ul.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.rows li { background: var(--up); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 1px; }
ul.rows li b { font-weight: 500; }
.note-add { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.note-add textarea, .ask textarea, .ask input { width: 100%; padding: 9px 12px; border-radius: 10px; border: 0; background: var(--deep); color: var(--wool); }
.modal.ask { width: min(480px, 94vw); top: 14vh; z-index: 5; }
.shade { z-index: 4; }
/* The panels and windows sit above their dark overlay (it once covered the «سؤال جديد» panel and blocked it). */
.drawer, .modal { z-index: 5; }
.actions { z-index: 6; } /* the panel's buttons (publish, save, send back) stay above the panel */
.modal.ask { z-index: 7; }
.ask .body { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 820px) {
  .ops { padding: 12px 16px 32px; }
  .views a { padding: 5px 10px; font-size: 14px; }
  .user-grid, .kvs { grid-template-columns: 1fr; }
}

/* ---------- payments and approvals ---------- */
.views .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-right: 4px; border-radius: 99px; background: var(--saffron); color: var(--on-accent); font-size: 12px; font-weight: 700; text-align: center; }
.views a.on .count { background: var(--navy); color: var(--accent-text); }
.title-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.ops .bar select, .ops .bar input.date { padding: 9px 12px; border-radius: 12px; border: 0; background: var(--up); color: var(--wool); }
.ops .bar input.date { width: 150px; }
.ops .bar select option { background: var(--deep); }
.chip.p-paid { box-shadow: inset 0 0 0 1.5px var(--saffron); color: var(--accent-text); }
.chip.p-refunded, .chip.p-partially_refunded { background: var(--saffron); color: var(--on-accent); }
.chip.p-pending, .chip.p-expired, .chip.p-failed { border: 1.5px dashed var(--wool-dim); color: var(--wool-dim); padding: 1px 9px; }
ul.rows li.link { cursor: pointer; }
ul.rows li.link:hover { background: var(--hover); }
.doc-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; font-size: 14px; }
.doc-actions a { color: var(--accent-text); text-decoration: none; }
.doc-actions a.yes { font-weight: 700; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
ol.timeline { list-style: none; margin: 0; padding: 0 14px 0 0; border-right: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
ol.timeline li { position: relative; display: flex; flex-direction: column; font-size: 14px; }
ol.timeline li::before { content: ""; position: absolute; right: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--up); box-shadow: inset 0 0 0 2px var(--saffron); }
ol.timeline li.t-refund::before, ol.timeline li.t-grant::before { background: var(--saffron); }
ol.timeline small { color: var(--wool-dim); font-size: 12px; }
.approvals li.a-pending { border-right: 4px solid var(--saffron); }
.check input { accent-color: var(--accent-text); }

/* ---------- tickets and compensations ---------- */
.views .count.urgent { background: var(--wool); color: var(--navy); }
.chip.t-urgent { background: var(--saffron); color: var(--on-accent); font-weight: 700; }
.chip.t-normal { box-shadow: inset 0 0 0 1.5px var(--wool-faint); color: var(--wool-dim); }
.chip.t-low { border: 1.5px dashed var(--wool-dim); color: var(--wool-dim); padding: 1px 9px; }
.chip.ts-new, .chip.ts-open { box-shadow: inset 0 0 0 1.5px var(--saffron); color: var(--accent-text); }
.chip.ts-waiting { box-shadow: inset 0 0 0 1.5px var(--wool-faint); color: var(--wool); }
.chip.ts-solved, .chip.ts-closed { border: 1.5px dashed var(--wool-dim); color: var(--wool-dim); padding: 1px 9px; }
table.list tr.urgent td:first-child { box-shadow: inset -4px 0 0 var(--saffron); }
.ours { color: var(--accent-text); font-weight: 600; }
.flag { color: var(--on-accent); background: var(--saffron); border-radius: 10px; padding: 8px 12px; font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.kvs.one { grid-template-columns: 1fr; }
.ticket-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 16px; }
.ticket-controls label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--wool-dim); }
.ticket-controls select, .composer select { padding: 8px 12px; border-radius: 10px; border: 0; background: var(--up); color: var(--wool); font-size: 14px; }
.ticket-controls select option, .composer select option { background: var(--deep); }
.ticket-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.ticket-side .panel:first-child .ops-h { border-top: 0; padding-top: 0; margin-top: 0; }
/* The conversation: the customer on the right, the team on the left, notes and system lines dashed and quiet. */
ol.thread { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ol.thread li { max-width: 86%; border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
ol.thread li p { margin: 0; white-space: pre-wrap; line-height: 1.8; overflow-wrap: anywhere; }
ol.thread li small { font-size: 12px; color: var(--wool-dim); }
ol.thread li.m-customer { align-self: flex-start; background: var(--up); }
ol.thread li.m-staff { align-self: flex-end; background: var(--deep); box-shadow: inset -3px 0 0 var(--saffron); }
ol.thread li.m-system { align-self: center; max-width: 100%; background: transparent; padding: 2px 10px; text-align: center; }
ol.thread li.m-system:not(.internal) { background: var(--deep); box-shadow: inset 0 0 0 1.5px var(--saffron); }
ol.thread li.m-system p { font-size: 13px; color: var(--wool-dim); }
ol.thread li.m-system:not(.internal) p { color: var(--wool); }
ol.thread li.internal.m-staff { background: transparent; box-shadow: inset 0 0 0 1.5px var(--wool-faint); border: 1.5px dashed var(--saffron); }
.composer { background: var(--up); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.composer textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: var(--deep); color: var(--wool); font: inherit; resize: vertical; }
.composer-top, .composer-bottom { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.composer select { background: var(--deep); }
.composer .btn { font-size: 15px; }
@media (max-width: 980px) {
  .ticket-grid { grid-template-columns: 1fr; }
  ol.thread li { max-width: 100%; }
}
.kv a, .ticket-side a { color: var(--accent-text); }

/* ---------- two-step sign-in ---------- */
.login .step-note { font-size: 14px; line-height: 1.8; margin: 0 0 12px; }
.login .step-note.small { font-size: 13px; color: var(--wool-dim); margin: 10px 0 6px; }
.login .setup-steps { margin: 0 0 8px; padding: 0 20px 0 0; font-size: 14px; line-height: 1.8; }
.login .qr { display: flex; justify-content: center; }
.login .qr img { width: 200px; height: 200px; border-radius: 12px; background: var(--wool); }
.login .secret { display: block; background: var(--deep); color: var(--accent-text); border-radius: 10px; padding: 10px; font: 600 15px ui-monospace, Consolas, monospace; text-align: center; letter-spacing: .06em; margin-bottom: 14px; user-select: all; overflow-wrap: anywhere; }
.login .link-btn { display: block; width: 100%; background: none; border: 0; color: var(--accent-text); font: 500 13px "Readex", sans-serif; margin-top: 10px; cursor: pointer; padding: 6px; }
.login #recoveryBox { margin-top: 10px; }
.login .codes { columns: 2; margin: 0 0 14px; padding: 12px 28px 12px 12px; background: var(--deep); border-radius: 12px; font: 600 15px ui-monospace, Consolas, monospace; color: var(--accent-text); line-height: 2; }
.login #stepCodes .btn { margin-bottom: 8px; }

/* ---------- live rooms, audit log, team ---------- */
.views { flex-wrap: wrap; }
table.list tr.quiet td { color: var(--wool-dim); }
.danger-link { color: var(--accent-text); text-decoration: underline; font-size: 14px; }
table.list.audit tr.link { cursor: pointer; }
tr.audit-detail td { background: var(--deep); }
tr.audit-detail.hidden { display: none; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff small { color: var(--wool-dim); font-size: 12px; }
.diff pre { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 ui-monospace, Consolas, monospace; color: var(--wool); text-align: left; }
.ops .pager { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
@media (max-width: 820px) { .diff { grid-template-columns: 1fr; } }
.login #copyCodes { background: var(--deep); }
.ops table a, .ops ul.rows a { color: var(--accent-text); }
.views a { padding: 5px 11px; font-size: 14px; }
.diff dl.fields { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 6px 0 0; font-size: 13px; }
.diff dl.fields dt { color: var(--wool-dim); }
.diff dl.fields dd { margin: 0; overflow-wrap: anywhere; }
.diff dl.fields dd { text-align: right; }
.diff { max-width: 760px; }

/* ---------- marketing ---------- */
.mk-period { width: max-content; margin: 0 0 14px; }
.mk-period button { border: 0; background: none; color: var(--wool-dim); font: 500 14px "Readex", sans-serif; padding: 6px 14px; border-radius: 9px; cursor: pointer; }
.mk-period button.on { background: var(--saffron); color: var(--on-accent); font-weight: 600; }
.mk-table td, .mk-table th { white-space: nowrap; }
.mk-table { display: block; overflow-x: auto; }
.mk-link td { background: rgba(0, 0, 0, .08); font-size: 13px; }
.mk-link .title-cell span { padding-inline-start: 14px; }
.chip.urgent { background: var(--saffron); color: var(--on-accent); }
.mk-h { font-size: 16px; margin: 18px 0 8px; }
.mk-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; margin: 10px 0 12px; }
.mk-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--wool-dim); }
.mk-field input, .mk-field select { font: 15px "Readex", sans-serif; padding: 9px 11px; border-radius: 10px; border: 0; background: var(--deep); color: var(--wool); }
.login { position: relative; }

/* The menu's second row: the sections of the open group («الدعم» or «الأسئلة»). */
.subviews { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 24px 4px; }
.subviews a { color: var(--wool-dim); text-decoration: none; padding: 5px 14px; border-radius: 99px; font-size: 14px; box-shadow: inset 0 0 0 1.5px var(--line); }
.subviews a:hover { color: var(--wool); }
.subviews a.on { color: var(--accent-text); font-weight: 600; box-shadow: inset 0 0 0 2px var(--saffron); }
.subviews .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-right: 4px; border-radius: 99px; background: var(--saffron); color: var(--on-accent); font-size: 12px; font-weight: 700; text-align: center; }
.subviews .count.urgent { background: var(--wool); color: var(--navy); }
@media (max-width: 820px) { .subviews { padding: 6px 12px 4px; } .subviews a { padding: 4px 10px; font-size: 13px; } }

/* The library page setting: one choice per row. */
.lib-modes { display: flex; flex-direction: column; gap: 8px; max-width: 720px; margin: 12px 0; }
.lib-mode { display: flex; gap: 12px; align-items: flex-start; background: var(--up); border-radius: 12px; padding: 12px 14px; cursor: pointer; box-shadow: inset 0 0 0 1.5px transparent; }
.lib-mode.on { box-shadow: inset 0 0 0 2px var(--saffron); }
.lib-mode input { accent-color: var(--saffron); width: 18px; height: 18px; margin-top: 3px; flex: none; }
.lib-mode span { display: flex; flex-direction: column; gap: 2px; }
.lib-mode small { color: var(--ink-3); font-size: 13px; }
/* The real photo of a size item: a small thumbnail with its file name and a remove button. */
.photo-state { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; flex-wrap: wrap; }
.photo-thumb { width: 72px; height: 72px; object-fit: contain; background: var(--deep); border-radius: 10px; padding: 4px; }
