/* AWJAN SMART — واجهة ثنائية الاتجاه (RTL/LTR) باستخدام الخصائص المنطقية */
:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --ink: #0b1b3a;
  --ink-2: #44526e;
  --ink-3: #7a869e;
  --line: #e2e8f3;
  --primary: #0a5bd8;
  --primary-ink: #ffffff;
  --primary-soft: #e8f1fe;
  --accent: #17b4f0;
  --accent-soft: #e2f6fe;
  --danger: #b23b3b;
  --danger-soft: #fbe9e9;
  --warn: #a86a0b;
  --warn-soft: #fdf2dc;
  --ok: #1f7a46;
  --ok-soft: #e4f4ea;
  --info: #2f5f9e;
  --info-soft: #e7eef9;
  --side: #061a42;
  --side-ink: #c4d4f0;
  --side-hover: #0d2b62;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 27, 58, .05), 0 8px 24px rgba(11, 27, 58, .06);
  --grad: linear-gradient(135deg, #0a3fb0 0%, #0a5bd8 45%, #19b6f2 100%);
  --navy: #0b2357;
  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1224; --surface: #101b33; --surface-2: #14223f; --ink: #e8eefb; --ink-2: #b3c0da; --ink-3: #8592ad;
    --line: #22314f; --primary: #4b8ef5; --primary-ink: #ffffff; --primary-soft: #16294f; --accent: #3fc6f5;
    --accent-soft: #10324a; --danger: #ef7d7d; --danger-soft: #3d1d1d; --warn: #f0b85a; --warn-soft: #3a2c12;
    --ok: #5fd08f; --ok-soft: #173826; --info: #8ab4ef; --info-soft: #1b2b44; --side: #050f26; --side-hover: #0f2149;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.3; font-weight: 700; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
.muted { color: var(--ink-3); } .small { font-size: .85rem; } .mono { font-family: ui-monospace, Menlo, monospace; direction: ltr; unicode-bidi: embed; }
.ic { vertical-align: middle; flex-shrink: 0; }
.ltr { direction: ltr; unicode-bidi: embed; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------ layout */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { background: linear-gradient(180deg, #061a42 0%, #08245a 100%); color: var(--side-ink); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.1rem; padding: 4px 8px 16px; }
.brand-mark { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }
.brand-mark.on-dark { filter: drop-shadow(0 2px 8px rgba(25,182,242,.35)); }
.brand small { display: block; font-weight: 400; font-size: .72rem; color: #8fb0e3; letter-spacing: .02em; }
.tenant-switch select { width: 100%; background: var(--side-hover); color: #fff; border: 1px solid #1f3f7a; border-radius: 9px; padding: 8px; font: inherit; font-size: .88rem; }
.nav { list-style: none; margin: 14px 0 0; padding: 0; }
.nav .sec { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #6f8fc6; margin: 16px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--side-ink); font-size: .93rem; }
.nav a:hover { background: var(--side-hover); text-decoration: none; color: #fff; }
.nav a.on { background: linear-gradient(90deg, rgba(25,182,242,.22), rgba(10,91,216,.28)); color: #fff; box-shadow: inset 3px 0 0 #19b6f2; }
[dir=rtl] .nav a.on { box-shadow: inset -3px 0 0 #19b6f2; }
.nav .count { margin-inline-start: auto; background: #19b6f2; color: #04203f; border-radius: 99px; font-size: .72rem; padding: 0 7px; font-weight: 700; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .crumbs { flex: 1; min-width: 0; color: var(--ink-3); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .crumbs b { color: var(--ink); }
.content { padding: 26px 28px 60px; max-width: 1280px; width: 100%; }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }

/* ------------------------------------------------ public */
.public-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 6vw; }
.public-top .brand { color: var(--ink); padding: 0; }
.hero { padding: 56px 6vw 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.01em; }
.hero p.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 46ch; }
.hero-card { background: var(--side); color: var(--side-ink); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.hero-card .row-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #2c4b47; font-size: .92rem; }
.hero-card .row-item:last-child { border: 0; }
.section { padding: 34px 6vw; }
.section h2 { font-size: 1.5rem; margin-bottom: 18px; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card.wide { max-width: 640px; }

/* ------------------------------------------------ components */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.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)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 2px 0 0; color: var(--ink-3); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .k { color: var(--ink-3); font-size: .85rem; }
.stat .v { font-size: 1.7rem; font-weight: 700; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat.warn .v { color: var(--warn); } .stat.danger .v { color: var(--danger); } .stat.ok .v { color: var(--ok); }
.tile { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-1px); }
.tile .ib { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.tile h3 { margin: 0 0 2px; font-size: 1rem; }
.tile p { margin: 0; color: var(--ink-3); font-size: .87rem; }
.tile.off { opacity: .55; }

.btn { transition: transform .12s, box-shadow .15s, filter .15s; display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 9px; padding: 8px 14px; font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; background: var(--primary); color: var(--primary-ink); white-space: nowrap; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink-3); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.accent { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(10,91,216,.28); }
.btn.accent:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(10,91,216,.34); }
.btn.sm { padding: 5px 10px; font-size: .84rem; }
.btn.block { width: 100%; justify-content: center; padding: 11px; }
.btn.link { background: none; border: 0; color: var(--primary); padding: 0; font-weight: 500; }
form.inline { display: inline; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.exp-valid, .st-issued, .st-active, .st-done, .st-paid, .st-approved, .st-won, .st-cleared, .st-delivered, .st-closed, .st-completed, .st-sent, .st-received { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.exp-expiring, .st-pending, .st-pending_approval, .st-review, .st-quoted, .st-docs_pending, .st-negotiation, .st-trialing, .st-customs, .st-issued_inv, .st-high { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.exp-expired, .st-rejected, .st-expired, .st-failed, .st-cancelled, .st-lost, .st-terminated, .st-held, .st-missed, .st-past_due, .st-urgent, .st-void { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.st-in_progress, .st-submitted, .st-under_review, .st-in_transit, .st-new, .st-proposal, .st-planned, .st-arrived, .st-shipped, .st-production, .st-confirmed { background: var(--info-soft); color: var(--info); border-color: transparent; }
.bool.yes { color: var(--ok); font-weight: 700; } .bool.no { color: var(--ink-3); }

table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
.t th { text-align: start; font-weight: 600; color: var(--ink-3); font-size: .8rem; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--surface-2); }
.t td.num, .t th.num { text-align: end; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.empty { padding: 34px; text-align: center; color: var(--ink-3); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .search .ic { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.toolbar .search input { padding-inline-start: 36px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 8px 14px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a.on { color: var(--primary); border-color: var(--primary); }
.tabs a:hover { text-decoration: none; color: var(--ink); }

/* forms */
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=tel], input[type=file], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; font-size: .94rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
textarea { resize: vertical; }
.field { margin-bottom: 14px; }
.field .help { color: var(--ink-3); font-size: .8rem; margin-top: 4px; }
.field .err { color: var(--danger); font-size: .83rem; margin-top: 4px; }
.field.check { display: flex; align-items: center; gap: 9px; }
.field.check label { margin: 0; font-weight: 500; }
.field.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.checks label { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; }
ul.errorlist { list-style: none; padding: 0; margin: 4px 0; color: var(--danger); font-size: .85rem; }

.messages { margin-bottom: 18px; display: grid; gap: 8px; }
.msg { padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.msg.success { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.msg.error { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.msg.warning { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.msg.info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--accent-soft); border-radius: 10px; margin-bottom: 18px; flex-wrap: wrap; }

dl.kv { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; margin: 0; }
dl.kv dt { color: var(--ink-3); font-size: .87rem; padding: 9px 0; border-bottom: 1px solid var(--line); }
dl.kv dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); white-space: pre-line; overflow-wrap: anywhere; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.summary div { background: var(--primary-soft); border-radius: 10px; padding: 12px; }
.summary span { display: block; font-size: .8rem; color: var(--ink-2); }
.summary b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding-inline-start: 22px; padding-bottom: 14px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 9px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }

.plan { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; position: relative; }
.plan.featured { border: 2px solid var(--primary); }
.plan .price { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: .9rem; font-weight: 500; color: var(--ink-3); }
.plan ul { padding-inline-start: 18px; margin: 6px 0 0; color: var(--ink-2); font-size: .92rem; }
.plan input[type=radio] { position: absolute; inset-inline-end: 16px; top: 18px; width: 20px; height: 20px; accent-color: var(--primary); }
.module-pick { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; align-items: flex-start; font-weight: 500; }
.module-pick:hover { border-color: var(--primary); }
.module-pick input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--primary); }
.module-pick small { display: block; color: var(--ink-3); font-weight: 400; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 16px; align-items: center; }
.stars { color: var(--accent); letter-spacing: 2px; }
.invoice { max-width: 820px; margin: 0 auto; }
.invoice .totals { margin-inline-start: auto; max-width: 320px; }
.invoice .totals div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.invoice .totals div:last-child { font-weight: 800; font-size: 1.1rem; border: 0; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; background: var(--primary); }
footer.public { padding: 30px 6vw; color: var(--ink-3); font-size: .88rem; border-top: 1px solid var(--line); }

@media (max-width: 1000px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 270px; z-index: 30; transform: translateX(-110%); transition: transform .2s; }
  [dir=rtl] .side { transform: translateX(110%); }
  .side.open { transform: none !important; }
  .menu-btn { display: inline-flex; }
  .top { padding: 12px 16px; }
  .content { padding: 18px 16px 50px; }
  .g2, .g3, .g4, .form-grid { grid-template-columns: 1fr; }
  dl.kv { grid-template-columns: 1fr; }
  dl.kv dt { border: 0; padding-bottom: 0; }
  .public-top, .hero, .section { padding-inline: 16px; }
}
@media print {
  .side, .top, .no-print, .messages { display: none !important; }
  .shell { display: block; } .content { padding: 0; } body { background: #fff; }
  .card { box-shadow: none; border: 0; }
}

/* auth pages */
.auth-wrap { background: radial-gradient(900px 420px at 80% -10%, rgba(25,182,242,.18), transparent 60%),
  radial-gradient(700px 380px at 0% 110%, rgba(10,91,216,.14), transparent 60%), var(--bg); }
.auth-card .card { border-radius: 18px; padding: 28px; box-shadow: 0 20px 50px rgba(11,27,58,.08); }
.auth-card h1 { color: var(--ink); }
.btn.block { background: var(--grad); }
.btn.block.ghost { background: transparent; }

/* ================= v2 components ================= */
.top-search { position: relative; width: 260px; max-width: 34vw; }
.top-search .ic { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.top-search input { padding: 7px 10px; padding-inline-start: 34px; border-radius: 99px; background: var(--surface-2); font-size: .88rem; }
.avatar.sm { width: 28px; height: 28px; font-size: .7rem; flex-shrink: 0; }
.ltr-num { direction: ltr; unicode-bidi: plaintext; }
.badge.red { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.orange { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.green { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.blue { background: var(--info-soft); color: var(--info); border-color: transparent; }

/* module hero & nav */
.mod-hero { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: 18px; color: #fff; margin-bottom: 16px;
  background: radial-gradient(500px 200px at 10% 0%, rgba(255,255,255,.16), transparent 60%), linear-gradient(120deg, #061a42, #0a3f9e 60%, #1590e8); box-shadow: 0 14px 34px rgba(10,63,158,.22); flex-wrap: wrap; }
.mod-hero-ic { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); }
.mod-hero-t { flex: 1; min-width: 200px; } .mod-hero h1 { color: #fff; margin: 0; } .mod-hero p { margin: 2px 0 0; color: #c9dbf8; }
.mod-hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.35); } .mod-hero .btn.accent { background: #fff; color: #0a3f9e; box-shadow: none; }
.mod-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.mod-tab { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .9rem; }
.mod-tab b { background: var(--primary-soft); color: var(--primary); border-radius: 99px; padding: 0 9px; font-size: .8rem; }
.mod-tab:hover { border-color: var(--primary); text-decoration: none; } .mod-tab.alt { color: var(--ink-2); font-weight: 500; }
.kpis { margin-bottom: 18px; } a.stat.kpi { color: inherit; } a.stat.kpi:hover { border-color: var(--primary); text-decoration: none; }
.stat.blue .v { color: var(--primary); } .stat.orange .v { color: var(--warn); } .stat.red .v { color: var(--danger); } .stat.green .v { color: var(--ok); }

/* widgets grid */
.w-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.w-grid .card + .card { margin-top: 0; }
.w-card h3 { font-size: 1rem; }
.wbar { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: .88rem; }
.wbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.wbar-t { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.wbar-t span { display: block; height: 100%; border-radius: 99px; }
.wbar-v { font-variant-numeric: tabular-nums; font-size: .85rem; }
.wdonut { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.wdonut-c { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.wdonut-c > div { width: 98px; height: 98px; border-radius: 50%; background: var(--surface); display: grid; place-content: center; text-align: center; }
.wdonut-c b { font-size: 1.5rem; line-height: 1; } .wdonut-c small { color: var(--ink-3); font-size: .72rem; }
.wlegend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; display: grid; gap: 7px; }
.wlegend li { display: grid; grid-template-columns: 12px 1fr auto 40px; gap: 8px; align-items: center; font-size: .86rem; }
.wlegend i { width: 12px; height: 12px; border-radius: 4px; } .wlegend small { color: var(--ink-3); text-align: end; }
.witem { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: space-between; }
.witem:last-child { border: 0; } .witem .small { flex-basis: 100%; }
.wprog { padding: 7px 0; } .wprog-h { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: 4px; }
.wgauge-card { text-align: center; }
.wgauge { width: 150px; height: 150px; border-radius: 50%; margin: 6px auto 8px; display: grid; place-items: center; }
.wgauge > div { width: 112px; height: 112px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.wgauge b { font-size: 1.9rem; }

/* insights */
.insights h3 { display: flex; align-items: center; gap: 8px; }
.insights .ic { color: var(--accent); }
.ins { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; margin-top: 8px; color: var(--ink); font-size: .9rem; background: var(--surface-2); border: 1px solid var(--line); }
a.ins[href]:hover { text-decoration: none; border-color: var(--primary); }
.ins-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; background: var(--info); }
.ins-danger { background: var(--danger-soft); border-color: transparent; } .ins-danger .ins-dot { background: var(--danger); }
.ins-warn { background: var(--warn-soft); border-color: transparent; } .ins-warn .ins-dot { background: var(--warn); }
.ins-ok .ins-dot { background: var(--ok); }

/* list extras */
.viewsw { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.viewsw a { padding: 7px 12px; color: var(--ink-2); font-size: .86rem; display: inline-flex; gap: 6px; align-items: center; }
.viewsw a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; } .viewsw a:hover { text-decoration: none; }
.dd { position: relative; } .dd-menu { display: none; position: absolute; inset-inline-end: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 200px; z-index: 20; padding: 6px; }
.dd.open .dd-menu { display: block; } .dd-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); } .dd-menu a:hover { background: var(--surface-2); text-decoration: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { padding: 5px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .85rem; }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); } .chip:hover { text-decoration: none; border-color: var(--primary); }
.totals-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.totals-bar div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; }
.totals-bar span { display: block; font-size: .78rem; color: var(--ink-3); } .totals-bar b { font-variant-numeric: tabular-nums; }
.t th a.sort { color: inherit; } .empty-ic { color: var(--primary); opacity: .5; margin-bottom: 6px; }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 200px; transition: background .15s; }
.kcol.over { background: var(--primary-soft); border-color: var(--primary); }
.kcol header { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 10px; }
.kcol header b { font-size: .85rem; color: var(--ink-3); }
.kcards { display: grid; gap: 8px; min-height: 60px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; box-shadow: 0 1px 2px rgba(11,27,58,.04); cursor: grab; }
.kcard[draggable=false] { cursor: default; } .kcard.dragging { opacity: .5; }
.kcard a { color: var(--ink); display: block; margin-bottom: 4px; } .kcard a:hover { color: var(--primary); text-decoration: none; }
.kf { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--ink-3); padding-top: 3px; }
.kf bdi { color: var(--ink-2); text-align: end; } .kempty { text-align: center; color: var(--ink-3); padding: 14px; }

/* calendar */
.cal-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cal-h { padding: 9px; font-size: .78rem; font-weight: 700; color: var(--ink-3); text-align: center; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-d { min-height: 112px; padding: 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.out { background: var(--surface-2); opacity: .6; } .cal-d.today { background: var(--primary-soft); }
.cal-n { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.cal-d.today .cal-n { color: #fff; background: var(--primary); border-radius: 99px; width: 24px; height: 24px; display: grid; place-items: center; }
.cal-e { font-size: .72rem; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--info-soft); color: var(--info); }
.cal-e i { font-style: normal; opacity: .75; } .cal-e:hover { text-decoration: none; filter: brightness(.95); }
.tone-red.cal-e { background: var(--danger-soft); color: var(--danger); } .tone-orange.cal-e { background: var(--warn-soft); color: var(--warn); } .tone-green.cal-e { background: var(--ok-soft); color: var(--ok); }
.cal-more { font-size: .7rem; color: var(--ink-3); } .cal-title { font-size: 1.05rem; min-width: 130px; text-align: center; }
.agenda { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.agenda:last-child { border: 0; } .agenda:hover { text-decoration: none; } .agenda:hover b { color: var(--primary); }
.agenda b { display: block; font-size: .9rem; font-weight: 600; } .agenda small { color: var(--ink-3); font-size: .78rem; }
.ag-d { width: 44px; height: 46px; border-radius: 10px; background: var(--info-soft); color: var(--info); display: grid; place-content: center; text-align: center; font-weight: 800; flex-shrink: 0; line-height: 1.1; }
.ag-d small { font-weight: 500; font-size: .66rem; color: inherit; }
.tone-red .ag-d { background: var(--danger-soft); color: var(--danger); } .tone-orange .ag-d { background: var(--warn-soft); color: var(--warn); } .tone-green .ag-d { background: var(--ok-soft); color: var(--ok); }

/* search */
.search-big { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.search-big input { border: 0; font-size: 1.05rem; } .search-big input:focus { outline: 0; } .search-big .ic { color: var(--ink-3); }

/* attachments & comments */
.att { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.att-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: .66rem; font-weight: 800; flex-shrink: 0; }
.att-t { flex: 1; min-width: 0; } .att-t small { display: block; color: var(--ink-3); font-size: .76rem; }
.att-form { display: flex; gap: 8px; margin-top: 12px; align-items: center; } .att-form input { font-size: .82rem; }
.cmt { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cmt-b { flex: 1; min-width: 0; } .cmt-h { display: flex; gap: 8px; align-items: center; } .cmt-h small { color: var(--ink-3); font-size: .76rem; margin-inline-end: auto; }
.cmt p { margin: 4px 0 0; white-space: normal; overflow-wrap: anywhere; font-size: .92rem; }
.cmt-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; } .cmt-form textarea { flex: 1; }
.child-add { margin-top: 10px; } .child-add summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: .88rem; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.child-add summary::-webkit-details-marker { display: none; } .child-add form { margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; }

@media (max-width: 1000px) { .cal-wrap { grid-template-columns: 1fr; } .top-search { display: none; } }
@media (max-width: 760px) {
  .cal-d { min-height: 64px; } .cal-e { display: none; } .cal-d:has(.cal-e)::after { content: "•"; color: var(--primary); font-size: 1.4rem; line-height: .6; }
  .w-grid { grid-template-columns: 1fr; } .kanban { grid-auto-columns: 82vw; }
}
@media print { .actions, .att-form, .cmt-form, .child-add, #comments form { display: none !important; } }

.w-card.wide { grid-column: 1 / -1; }
.wdonut-c b { font-size: 1.25rem; }

/* Emtithal */
.sec-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.sec-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); transition: border-color .15s, transform .15s; }
.sec-card:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-2px); }
.sec-card h3 { font-size: .95rem; margin: 0; min-height: 2.6em; }
.sec-top { display: flex; justify-content: space-between; align-items: center; }
.sec-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--grad); }
.sec-pct { font-size: 1.4rem; } .sec-pct.ok { color: var(--ok); } .sec-pct.warn { color: var(--warn); } .sec-pct.bad { color: var(--danger); }
.sec-stats { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .8rem; color: var(--ink-3); }
.itm-panel { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.itm-risk { width: 120px; height: 120px; border-radius: 18px; display: grid; place-content: center; text-align: center; color: #fff; flex-shrink: 0; }
.itm-risk small { font-size: .72rem; opacity: .9; } .itm-risk b { font-size: 2.2rem; line-height: 1.1; } .itm-risk span { font-size: .85rem; font-weight: 700; }
.risk-critical { background: linear-gradient(135deg, #b42323, #e05252); } .risk-high { background: linear-gradient(135deg, #c46c00, #f0a03a); }
.risk-medium { background: linear-gradient(135deg, #0a5bd8, #19b6f2); } .risk-low { background: linear-gradient(135deg, #1a7f45, #34b36b); }
.itm-body { flex: 1; min-width: 240px; display: grid; gap: 8px; } .itm-days { font-size: 1.1rem; font-weight: 700; margin: 0; }
.itm-row { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 1100px) { .sec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .sec-grid { grid-template-columns: 1fr; } }

/* ===== عقودي CLM ===== */
.clm-steps { list-style: none; display: flex; gap: 4px; margin: 0 0 14px; padding: 0; overflow-x: auto; }
.clm-steps li { flex: 1; min-width: 86px; text-align: center; position: relative; padding-top: 4px; }
.clm-steps li span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--line, #e3e9f3); color: var(--muted, #5b6884); font-weight: 700; font-size: .85rem; }
.clm-steps li small { display: block; margin-top: 6px; font-size: .76rem; color: var(--muted, #5b6884); }
.clm-steps li.done span { background: var(--ok); color: #fff; }
.clm-steps li.now span { background: var(--primary); color: #fff; box-shadow: 0 0 0 5px rgba(10,91,216,.15); }
.clm-steps li.now small { color: var(--primary); font-weight: 700; }
.clm-grid { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: start; }
.clm-body h4, .clm-box h4 { margin: 0 0 8px; }
.clm-find { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; font-size: .9rem; }
.clm-find .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 8px; background: var(--info); }
.clm-find .dot.red { background: var(--danger); } .clm-find .dot.orange { background: var(--warn); } .clm-find .dot.green { background: var(--ok); }
.clm-box { border-top: 1px dashed var(--line, #e3e9f3); margin-top: 14px; padding-top: 12px; }
.clm-appr { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.clm-decide { display: flex; gap: 8px; flex-wrap: wrap; } .clm-decide input { flex: 1; min-width: 200px; }
.clm-sug { padding: 10px 0; border-bottom: 1px solid var(--line, #e3e9f3); } .clm-sug:last-child { border: 0; }
.clm-libitem { display: flex; gap: 12px; justify-content: space-between; align-items: start; margin-top: 8px; }
.clm-cl { border: 1px solid var(--line, #e3e9f3); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.clm-cl summary { cursor: pointer; font-weight: 600; }
.clm-ai { background: var(--info-soft); border-radius: 10px; padding: 12px 16px; margin-top: 12px; }
.st-requested, .st-drafting, .st-archived { background: #eef2f8; color: #5b6884; border-color: transparent; }
.st-approval { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.st-signing { background: var(--info-soft); color: var(--info); border-color: transparent; }
@media (max-width: 640px) { .clm-grid { grid-template-columns: 1fr; } }

/* ===== v4: مستويات الانتهاء الموحدة (90 أصفر · 60 برتقالي · 30 أحمر · منتهي) ===== */
:root { --x-exp: #8f1d1d; --x-exp-soft: #f9dede; --x-30: #d63a3a; --x-30-soft: #fde8e8; --x-60: #e2780f; --x-60-soft: #fff0df;
        --x-90: #b58d00; --x-90-soft: #fff8d6; --x-ok: #1f8a4c; --x-ok-soft: #e3f5ea; }
.xb { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; line-height: 1.5; }
.xb i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.x-expired { background: var(--x-exp); color: #fff; } .x-expired i { background: #fff; animation: xpulse 1.4s infinite; }
.x-d30 { background: var(--x-30-soft); color: var(--x-30); } .x-d30 i { animation: xpulse 1.6s infinite; }
.x-d60 { background: var(--x-60-soft); color: var(--x-60); }
.x-d90 { background: var(--x-90-soft); color: var(--x-90); }
.x-valid { background: var(--x-ok-soft); color: var(--x-ok); }
@keyframes xpulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
table.t tr.row-expired td:first-child { box-shadow: inset -4px 0 0 var(--x-exp); }
table.t tr.row-d30 td:first-child { box-shadow: inset -4px 0 0 var(--x-30); }
table.t tr.row-d60 td:first-child { box-shadow: inset -4px 0 0 var(--x-60); }
table.t tr.row-d90 td:first-child { box-shadow: inset -4px 0 0 var(--x-90); }
[dir="ltr"] table.t tr.row-expired td:first-child { box-shadow: inset 4px 0 0 var(--x-exp); }
[dir="ltr"] table.t tr.row-d30 td:first-child { box-shadow: inset 4px 0 0 var(--x-30); }
[dir="ltr"] table.t tr.row-d60 td:first-child { box-shadow: inset 4px 0 0 var(--x-60); }
[dir="ltr"] table.t tr.row-d90 td:first-child { box-shadow: inset 4px 0 0 var(--x-90); }
table.t tr.row-expired { background: #fff6f6; } table.t tr.row-d30 { background: #fffafa; }
.x-legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .8rem; color: var(--ink-3); }

/* مركز الانتهاءات */
.xc-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.xc-tile { border-radius: 16px; padding: 16px 18px; color: inherit; text-decoration: none !important; border: 2px solid transparent; transition: transform .15s, box-shadow .15s; display: block; }
.xc-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.xc-tile.on { border-color: currentColor; }
.xc-tile small { display: block; font-weight: 700; font-size: .82rem; opacity: .9; }
.xc-tile b { display: block; font-size: 2.1rem; line-height: 1.15; margin: 4px 0 2px; }
.xc-tile span { font-size: .78rem; opacity: .85; }
.xc-tile.t-expired { background: var(--x-exp); color: #fff; }
.xc-tile.t-d30 { background: var(--x-30-soft); color: var(--x-30); }
.xc-tile.t-d60 { background: var(--x-60-soft); color: var(--x-60); }
.xc-tile.t-d90 { background: var(--x-90-soft); color: var(--x-90); }
.xc-tile.t-all { background: var(--primary-soft); color: var(--primary); }
.xc-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 6px 0 14px; }
.xc-bar span { display: block; height: 100%; }
.xc-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.xc-filters a { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .85rem; text-decoration: none; }
.xc-filters a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.xc-list { display: grid; gap: 10px; }
.xc-item { display: grid; grid-template-columns: 6px 44px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border-radius: 14px; padding: 12px 16px 12px 0; box-shadow: var(--shadow); text-decoration: none !important; color: inherit; }
[dir="ltr"] .xc-item { padding: 12px 0 12px 0; }
.xc-item .stripe { align-self: stretch; border-radius: 0 6px 6px 0; }
.xc-item .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.xc-item h4 { margin: 0; font-size: .98rem; } .xc-item p { margin: 2px 0 0; font-size: .82rem; color: var(--ink-3); }
.xc-item .end { text-align: end; padding-inline-end: 16px; } .xc-item .end small { display: block; color: var(--ink-3); font-size: .78rem; margin-top: 4px; }
.lvl-expired .stripe { background: var(--x-exp); } .lvl-d30 .stripe { background: var(--x-30); }
.lvl-d60 .stripe { background: var(--x-60); } .lvl-d90 .stripe { background: var(--x-90); } .lvl-valid .stripe { background: var(--x-ok); }
.xc-group h3 { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 1rem; }
@media (max-width: 900px) { .xc-tiles { grid-template-columns: repeat(2, 1fr); } .xc-item { grid-template-columns: 6px 1fr; } .xc-item .ico { display: none; } .xc-item .end { grid-column: 2; text-align: start; padding: 0 0 4px; } }

/* بطاقات الإشعارات */
.nt-list { display: grid; gap: 10px; }
.nt { display: grid; grid-template-columns: 5px 40px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px 12px 0; }
.nt .stripe { align-self: stretch; border-radius: 0 6px 6px 0; background: var(--primary); }
.nt .ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.nt.unread { background: linear-gradient(90deg, var(--surface) 0%, #f5f9ff 100%); }
.nt.unread h4::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-inline-start: 8px; vertical-align: middle; }
.nt h4 { margin: 0; font-size: .95rem; } .nt p { margin: 3px 0 0; font-size: .83rem; color: var(--ink-2); white-space: pre-line; } .nt time { font-size: .76rem; color: var(--ink-3); }
.nt.l-expired .stripe { background: var(--x-exp); } .nt.l-expired .ico { background: var(--x-exp-soft); color: var(--x-exp); }
.nt.l-d30 .stripe { background: var(--x-30); } .nt.l-d30 .ico { background: var(--x-30-soft); color: var(--x-30); }
.nt.l-d60 .stripe { background: var(--x-60); } .nt.l-d60 .ico { background: var(--x-60-soft); color: var(--x-60); }
.nt.l-d90 .stripe { background: var(--x-90); } .nt.l-d90 .ico { background: var(--x-90-soft); color: var(--x-90); }
.nt.l-success .stripe { background: var(--x-ok); } .nt.l-success .ico { background: var(--x-ok-soft); color: var(--x-ok); }
.top-bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); }
.top-bell .dot { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--x-30); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.nav .count.hot { background: var(--x-30); color: #fff; }

/* ملف الموظف / الأصل */
.pf { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; }
.pf-av { width: 96px; height: 96px; border-radius: 24px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
.pf h2 { margin: 0 0 4px; } .pf .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; color: var(--ink-2); }
.pf-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 16px; }
.pf-doc { border-radius: 14px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none !important; color: inherit; display: block; position: relative; overflow: hidden; }
.pf-doc::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--x-ok); }
.pf-doc.lvl-expired::before { background: var(--x-exp); } .pf-doc.lvl-d30::before { background: var(--x-30); }
.pf-doc.lvl-d60::before { background: var(--x-60); } .pf-doc.lvl-d90::before { background: var(--x-90); }
.pf-doc.missing { border-style: dashed; background: #fff; color: var(--ink-3); } .pf-doc.missing::before { background: var(--line); }
.pf-doc small { display: block; color: var(--ink-3); font-size: .76rem; } .pf-doc b { display: block; margin: 2px 0 6px; font-size: .92rem; }
.mx { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .84rem; }
.mx th, .mx td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.mx th:first-child, .mx td:first-child { text-align: start; position: sticky; inset-inline-start: 0; background: var(--surface); }
.mx .cell { display: inline-block; min-width: 64px; padding: 3px 8px; border-radius: 8px; font-weight: 700; font-size: .76rem; text-decoration: none; }
.mx .c-missing { background: #f1f3f7; color: #9aa4b6; border: 1px dashed #c9d1de; }
