/* هوية رسمية فاتحة بلون واحد تختاره من «الإعدادات» — ورق دافئ ودرجات اللون الأساسي */
/* Noto Kufi Arabic (رخصة OFL) — خط متغيّر واحد لكل الأوزان: العربي، واللاتيني للأرقام */
@font-face { font-family: "Noto Kufi Arabic"; src: url("fonts/noto-kufi-arabic.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Kufi Arabic"; src: url("fonts/noto-kufi-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --ink: #1d2430;
  --muted: #687080;
  --line: #e3e0d6;
  --line-strong: #cfcabb;
  --brand: #1f4e5f;
  --brand-ink: #ffffff;
  --on-brand: #ffffff;
  --brand-text: #1f4e5f;
  --brand-soft: #e7eef1;
  --late: #b42318;
  --late-soft: #fdecea;
  --today: #9a5b00;
  --today-soft: #fdf3e1;
  --ok: #1e7a4f;
  --ok-soft: #e6f4ec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(29, 36, 48, 0.05), 0 4px 14px rgba(29, 36, 48, 0.05);
  --font: "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.75; color: var(--ink); background: var(--bg); }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.35; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.pre { white-space: pre-wrap; }

/* ---------- الهيكل ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--brand); color: color-mix(in srgb, var(--on-brand) 86%, transparent); padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; border-bottom: 1px solid color-mix(in srgb, var(--on-brand) 14%, transparent); margin-bottom: 14px; }
.brand .name { font-weight: 600; color: var(--on-brand); font-size: 16px; }
.brand .org { font-size: 12px; color: color-mix(in srgb, var(--on-brand) 68%, transparent); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: inherit; margin-bottom: 2px; }
.nav a:hover { background: color-mix(in srgb, var(--on-brand) 9%, transparent); text-decoration: none; }
.nav a.on { background: #fff; color: var(--brand-text); font-weight: 600; }
.nav a.on .count { background: var(--brand); color: var(--on-brand); }
.nav .count { margin-inline-start: auto; background: var(--on-brand); color: var(--brand); font-size: 12px; border-radius: 999px; padding: 0 8px; }
.nav .count.late, .nav a.on .count.late { background: var(--late); color: #fff; }
.side .foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--on-brand) 14%, transparent); }
.side .foot form { margin: 0; }
.side .foot button { all: unset; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; color: #dfe8ec; width: calc(100% - 20px); }
.side .foot button:hover { background: color-mix(in srgb, var(--on-brand) 9%, transparent); }

.top { display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .crumb { font-weight: 600; font-size: 17px; }
.top .date { color: var(--muted); font-size: 13px; }
.top .search { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; }
.top .search input { border: 0; background: transparent; padding: 7px 4px; width: 220px; font: inherit; outline: none; }
main { padding: 24px 28px 60px; }

/* ---------- عناصر ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card > header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card > header .act { margin-inline-start: auto; display: flex; gap: 8px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.side-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.table-wrap { overflow-x: auto; }
.stat { padding: 14px 16px; }
.stat .v { font-size: 26px; font-weight: 600; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat.late .v { color: var(--late); }
.stat.today .v { color: var(--today); }
a.stat:hover { text-decoration: none; border-color: var(--line-strong); }
.empty { color: var(--muted); padding: 10px 0; }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: start; font-weight: 600; font-size: 13px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
table.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.closed td { color: var(--muted); }
table.list tr.closed .ttl { text-decoration: line-through; text-decoration-color: var(--line-strong); }
table.list td.w-min { white-space: nowrap; width: 1%; }

.badge { display: inline-block; font-size: 12px; padding: 1px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); white-space: nowrap; }
/* «قيد التنفيذ» حالة لا هوية: لونها ثابت مع كل الألوان */
.badge.s-doing { background: #f6efe2; color: #7a5a22; }
.badge.s-done { background: var(--ok-soft); color: var(--ok); }
.badge.s-cancel { background: #eeeeec; color: var(--muted); }
.badge.urgent { background: var(--late-soft); color: var(--late); }
.badge.kind { background: #f1f0eb; color: var(--ink); }
.due { white-space: nowrap; }
.due.late { color: var(--late); font-weight: 600; }
.due.today { color: var(--today); font-weight: 600; }
.due.soon { color: var(--brand-text); }
.ref { font-weight: 600; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chips a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; }
.chips a.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chips a:hover { text-decoration: none; border-color: var(--line-strong); }
.chips .n { opacity: 0.7; margin-inline-start: 4px; }

/* ---------- النماذج ---------- */
form { margin: 0; }
.fields { display: grid; gap: 12px 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fields .span2 { grid-column: span 2; }
.fields .span4 { grid-column: 1 / -1; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input[type="text"], input[type="date"], input[type="time"], input[type="number"], input[type="password"], input[type="search"], input[type="email"], select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; padding: 7px 10px; width: 100%;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 25%, transparent); border-color: var(--brand); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.btn { font: inherit; font-family: var(--font); display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--brand); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 84%, #000); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--late); }
.btn.sm { padding: 3px 10px; font-size: 13px; }
.inline { display: inline; }
details.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 600; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "+"; margin-inline-start: auto; color: var(--muted); font-weight: 400; }
details.fold[open] > summary::after { content: "−"; }
details.fold[open] > summary { margin-bottom: 14px; }
.quick { display: flex; gap: 8px; }
.quick input { flex: 1; }

.log { list-style: none; margin: 0; padding: 0; }
.log li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.log li:last-child { border-bottom: 0; }
.log .at { color: var(--muted); font-size: 12px; display: block; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.toast { position: fixed; bottom: 22px; inset-inline-start: 50%; transform: translateX(50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; box-shadow: var(--shadow); z-index: 50; font-size: 14px; }
.toast.err { background: var(--late); }

/* ---------- الدخول ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 380px; padding: 30px; }
.login .mark { width: 46px; height: 46px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; margin-bottom: 14px; }
.login form { display: grid; gap: 12px; margin-top: 16px; }

/* ---------- الورقة الرسمية (خطاب · محضر · سجل) ---------- */
.paper { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 820px; margin: 0 auto 18px; padding: 48px 56px; min-height: 900px; font-size: 16px; line-height: 2; }
.paper .lh { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--brand); padding-bottom: 12px; margin-bottom: 26px; }
.paper .lh .org { font-size: 20px; font-weight: 700; color: var(--brand-text); }
.paper .lh .meta { font-size: 13px; line-height: 1.9; text-align: start; }
.paper .subject { font-weight: 600; margin-bottom: 18px; }
.paper .body { white-space: pre-wrap; tab-size: 8; }
.paper .sign { margin-top: 60px; text-align: end; padding-inline-end: 40px; line-height: 1.9; }
.paper .sign .n { font-weight: 600; }
.paper h1.doc { text-align: center; font-size: 20px; color: var(--brand-text); margin-bottom: 20px; }
.paper table.list th, .paper table.list td { border: 1px solid #b9b4a6; padding: 6px 8px; font-size: 14px; }
.paper section { margin-bottom: 20px; }
.paper section h3 { color: var(--brand-text); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 8px; }
.ph { background: var(--brand-soft); border-radius: 4px; padding: 0 4px; color: var(--brand-text); }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2, .side-grid { grid-template-columns: minmax(0, 1fr); }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main { padding: 18px 14px 50px; }
  .top { padding: 12px 14px; }
  .top .search input { width: 120px; }
  .paper { padding: 26px 20px; min-height: 0; }
}

@media print {
  @page { size: A4; margin: 16mm; }
  body { background: #fff; font-size: 13px; }
  .shell { display: block; }
  .side, .top, .no-print, .toast, .chips, form.no-print { display: none !important; }
  main { padding: 0; max-width: none; }
  .grid { display: block; }
  .card { box-shadow: none; border: 0; padding: 0; margin-bottom: 14px; break-inside: avoid; }
  .paper { box-shadow: none; border: 0; padding: 0; margin: 0; max-width: none; min-height: 0; }
  table.list th, table.list td { border: 1px solid #999 !important; padding: 5px 7px; }
  .ph { background: none; color: inherit; }
  a { color: inherit; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* ---------- التقويم ---------- */
.cal-card { padding: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.cal-h { padding: 6px 8px; font-size: 12px; color: var(--muted); font-weight: 600; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line-strong); background: #faf9f6; }
.cal-d { min-height: 112px; padding: 4px 5px 6px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-d.wk { background: #faf9f5; }
.cal-d.out { background: #f3f2ed; }
.cal-d.out .cal-n { opacity: 0.45; }
.cal-d.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-d.is-sel { background: var(--brand-soft); }
.cal-n { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink); font-weight: 600; font-size: 13px; padding: 0 2px; }
.cal-n:hover { text-decoration: none; color: var(--brand-text); }
.cal-n .hj { font-weight: 400; font-size: 11px; color: var(--muted); }
.ev { display: block; font-size: 12px; line-height: 1.5; padding: 1px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); border-inline-start: 3px solid; }
.ev:hover { text-decoration: none; filter: brightness(0.97); }
/* أنواع التقويم هوية ثابتة لا تتبع لون الموقع، حتى يبقى كل نوع مميزاً عن غيره */
.ev.meeting { background: #e7eef1; border-color: #1f4e5f; }
.ev.task { background: #f6efe2; border-color: #a8844a; }
.ev.follow { background: #ece9f6; border-color: #6a55a8; }
.ev.mail { background: #fdecea; border-color: #b4553f; }
.ev.date { background: #edf3ea; border-color: #4f7a3a; }
.ev.closed { opacity: 0.5; text-decoration: line-through; }
.ol-dot { color: var(--brand-text); font-size: 9px; vertical-align: middle; }
.more { font-size: 12px; color: var(--muted); padding: 0 6px; }
.legend { margin-inline-start: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.legend .ev { display: inline-block; }
.ol-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ol-state.update { color: var(--today); font-weight: 600; }
.ol-state.cancel { color: var(--late); font-weight: 600; }
@media (max-width: 980px) {
  .cal-d { min-height: 70px; }
  .ev { font-size: 0; padding: 0; height: 6px; border-inline-start-width: 0; }
  .legend .ev { font-size: 12px; height: auto; padding: 1px 6px; border-inline-start-width: 3px; }
}
@media print {
  .cal-d { min-height: 90px; }
  .ev { border: 1px solid #999; }
}

/* ---------- إدارة المهام ---------- */
.bar { height: 7px; background: #ebe8df; border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
a.card.proj { display: grid; gap: 8px; color: var(--ink); margin: 0; }
a.card.proj:hover { text-decoration: none; border-color: var(--line-strong); }
.badge.steps { background: #eef2f3; color: var(--brand-text); }
.star { all: unset; cursor: pointer; color: #c9c3b3; display: inline-grid; place-items: center; padding: 2px; }
.star:hover { color: var(--brand-text); }
.star.on { color: var(--brand-text); }
.star.on svg { fill: var(--brand-text); }
.tick { all: unset; cursor: pointer; width: 18px; height: 18px; border: 1.5px solid var(--line-strong); border-radius: 5px; display: inline-grid; place-items: center; color: #fff; flex: none; }
.tick:hover { border-color: var(--ok); }
li.done .tick { background: var(--ok); border-color: var(--ok); }
.x { all: unset; cursor: pointer; color: var(--muted); padding: 0 6px; font-size: 16px; }
.x:hover { color: var(--late); }
ul.steps, ol.focus { list-style: none; margin: 0; padding: 0; }
ul.steps li, ol.focus li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
ul.steps li:last-child, ol.focus li:last-child { border-bottom: 0; }
ul.steps li .t { flex: 1; }
ul.steps li.done .t, ol.focus li.done a { color: var(--muted); text-decoration: line-through; }
.focus-card { border-color: var(--brand); background: linear-gradient(0deg, #fff, color-mix(in srgb, var(--brand) 5%, #fff)); }
.focus-card h2 svg { color: var(--brand-text); fill: var(--brand-text); vertical-align: -3px; }
ol.focus li { font-size: 15px; }

/* ---------- الإضافة من التقويم ---------- */
.cal-add { opacity: 0; font-size: 15px; line-height: 1; color: var(--brand-text); padding: 0 4px; border-radius: 4px; }
.cal-d:hover .cal-add, .cal-d.is-sel .cal-add { opacity: 1; }
.cal-add:hover { background: var(--brand-soft); text-decoration: none; }
.cal-n-wrap { display: flex; align-items: baseline; gap: 2px; }
.cal-n-wrap .cal-n { flex: 1; }
.add-types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.add-types label { border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 12px; cursor: pointer; font-size: 13px; }
.add-types input { display: none; }
.add-types label:has(input:checked) { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
form[data-add-type="meeting"] .only-follow, form[data-add-type="meeting"] .only-date,
form[data-add-type="task"] .only-meeting, form[data-add-type="task"] .only-follow, form[data-add-type="task"] .only-date,
form[data-add-type="follow"] .only-meeting, form[data-add-type="follow"] .only-date,
form[data-add-type="date"] .only-meeting, form[data-add-type="date"] .only-action, form[data-add-type="date"] .only-follow, form[data-add-type="date"] .only-time { display: none; }
@media (max-width: 980px) { .cal-add { opacity: 1; } }

/* ---------- الإعدادات ---------- */
.set { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.set-nav { padding: 8px; margin: 0; position: sticky; top: 84px; }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--ink); }
.set-nav a svg { color: var(--muted); flex: none; }
.set-nav a:hover { background: var(--bg); text-decoration: none; }
.set-nav a.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.set-nav a.on svg { color: var(--brand-text); }
.set-panel { padding: 0; margin: 0; overflow: hidden; }
.set-group { padding: 16px 22px 6px; font-size: 13px; font-weight: 600; color: var(--brand-text); }
.set-row { display: flex; align-items: center; gap: 16px; min-height: 58px; padding: 9px 22px; border-bottom: 1px solid var(--line); }
.set-row .l, .set-row > .switch { flex: 0 0 230px; color: var(--ink); }
.set-row > input { flex: 1; min-width: 0; max-width: 520px; }
.set-row .ctl { display: flex; align-items: center; gap: 8px; }
.set-row .ctl select { width: 120px; }
.set-row .ctl input[type="time"] { width: 130px; }
.set-row .ctl input[type="number"] { width: 84px; }
.set-block { padding: 8px 22px 18px; border-bottom: 1px solid var(--line); }
.set-foot { display: flex; justify-content: flex-start; gap: 8px; padding: 14px 22px; background: #faf9f6; }
.code-box { display: inline-block; font-size: 20px; letter-spacing: 2px; padding: 8px 16px; background: var(--bg); border: 1px dashed var(--line-strong); border-radius: 9px; direction: ltr; }

/* مفتاح تشغيل */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch i { flex: none; width: 38px; height: 22px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background 0.15s; }
.switch i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: inset-inline-start 0.15s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { inset-inline-start: 19px; }
.switch input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }

/* أيام العمل */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills input { position: absolute; opacity: 0; }
.pills span { display: block; padding: 5px 14px; border: 1px solid var(--line-strong); border-radius: 99px; cursor: pointer; font-size: 13px; }
.pills input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.pills input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* دوائر الألوان */
.colors { display: flex; flex-wrap: wrap; gap: 14px 6px; }
.colors .color { width: 88px; }
.color { display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; font-size: 12.5px; text-align: center; position: relative; }
.color > input { position: absolute; opacity: 0; }
.color i { position: relative; display: block; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.color:hover i { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line-strong); }
.color > input:checked + i { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.color > input:checked ~ span { font-weight: 600; }
.color > input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 5px; }
.color.custom i::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 18px; text-shadow: 0 0 3px rgba(0, 0, 0, 0.6); pointer-events: none; }
.color.custom i input { position: absolute; inset: -8px; width: 60px; height: 60px; opacity: 0; cursor: pointer; padding: 0; border: 0; }

/* الخلفية */
.bgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 520px; }
.bg { cursor: pointer; font-size: 13px; text-align: center; }
.bg input { position: absolute; opacity: 0; }
.bg i { display: block; height: 54px; border-radius: 10px; border: 1px solid var(--line-strong); margin-bottom: 6px; }
.bg input:checked + i { box-shadow: 0 0 0 2px var(--ink); border-color: var(--ink); }
.bg input:checked ~ span { font-weight: 600; }
.bg input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (max-width: 980px) {
  .set { grid-template-columns: minmax(0, 1fr); }
  .set-nav { position: static; display: flex; overflow-x: auto; gap: 2px; }
  .set-nav a { white-space: nowrap; }
  .set-row { flex-wrap: wrap; }
  .set-row .l, .set-row > .switch { flex: 1 0 100%; }
  .set-row > input { max-width: none; flex: 1 0 100%; }
}
