/*
  هوية بصرية مستوحاة من دمشق:
  البازلت والحجر الكلسي (الأبلق)، نجمة الزخرفة الهندسية الثمانية.
*/
:root {
  --basalt: #1e262d;
  --basalt-2: #2a343d;
  --basalt-3: #3a4651;
  --stone: #e9ece6;
  --stone-2: #f3f5f1;
  --paper: #fcfdfb;
  --line: #d9ddd5;
  --line-strong: #bfc5bb;
  --text: #1e262d;
  --muted: #66707a;
  --faint: #8d959c;

  /* الأحمر الدمشقي: لون الأزرار والأختام والعنصر النشط */
  --ink: #9b1c2e;
  --ink-600: #7e1524;
  --ink-50: #f7e4e6;
  --ink-deep: #5e1019;

  --blue: #2b5aa8;    --blue-bg: #e5ecf7;
  --olive: #4d7548;   --olive-bg: #e4ece0;
  --apricot: #a8680f; --apricot-bg: #f6ead6; --apricot-mid: #c9821b;
  --pom: #c0392b;     --pom-bg: #fbe5e1;
  --plum: #6a4a8c;    --plum-bg: #ece6f3;
  --slate: #4f5b66;   --slate-bg: #e6e9ec;

  --r-panel: 14px;
  --r-ctl: 9px;
  --r-tile: 6px;
  --shadow-float: 0 18px 48px rgba(30, 38, 45, .22);

  --f-kufi: 'Readex Pro', system-ui, sans-serif; /* خط العناوين: نفس خط الواجهة بوزن أثقل */
  --f-ui: 'Readex Pro', system-ui, sans-serif;

  --girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23e9ece6' stroke-opacity='.07' stroke-width='1'%3E%3Crect x='17' y='17' width='22' height='22'/%3E%3Crect x='17' y='17' width='22' height='22' transform='rotate(45 28 28)'/%3E%3Cpath d='M0 28h9.5M46.5 28H56M28 0v9.5M28 46.5V56'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--f-ui);
  font-weight: 400;
  background: var(--stone);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; direction: ltr; unicode-bidi: isolate; color: var(--slate); font-size: 13px; }

/* ───── Shell ───── */
.app { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--basalt) var(--girih);
  color: #b9c2c9;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; color: #fff; }
.brand-mark {
  width: 40px; height: 40px; flex: none;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  font-family: var(--f-kufi); font-size: 19px; font-weight: 700;
}
.brand b { display: block; font-family: var(--f-kufi); font-size: 18px; font-weight: 600; line-height: 1.3; }
.brand small { color: #8d99a3; font-size: 11.5px; }
.nav-group { padding: 4px 14px 8px; }
.nav-group h6 { margin: 14px 10px 6px; font-size: 11.5px; font-weight: 500; color: #7f8b95; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8px 12px; border-radius: var(--r-ctl); border: 0; background: none;
  color: #c3cbd1; cursor: pointer; text-align: start; font-size: 14px;
}
.nav-item svg { opacity: .75; }
.nav-item:hover { background: var(--basalt-2); color: #fff; }
.nav-item.active { background: var(--stone); color: var(--ink); font-weight: 600; box-shadow: inset -4px 0 0 var(--ink); }
.nav-item.active svg { opacity: 1; }
.nav-item .count { margin-inline-start: auto; background: var(--ink); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 600; padding: 0 7px; }
.nav-fold {
  display: flex; align-items: center; justify-content: space-between; width: calc(100% - 20px); margin: 14px 10px 6px;
  padding: 0; border: 0; background: none; color: #7f8b95; font-size: 11.5px; font-weight: 500; cursor: pointer;
}
.nav-fold:hover { color: #fff; }
.nav-fold[aria-expanded="true"] svg { transform: rotate(180deg); }
.side-foot { margin-top: auto; padding: 16px 24px; font-size: 11.5px; color: #75818b; border-top: 1px solid var(--basalt-2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 32px;
  position: sticky; top: 0; z-index: 20;
  background: rgba(233, 236, 230, .86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .search { flex: 1; max-width: 440px; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--r-ctl); border: 1px solid var(--line);
  background: var(--paper); display: grid; place-items: center; cursor: pointer; position: relative; color: var(--basalt);
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn .dot { position: absolute; top: 7px; inset-inline-end: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--paper); }
.menu-btn { display: none; }
.me { display: flex; align-items: center; gap: 10px; }
.me b { display: block; font-size: 13.5px; font-weight: 500; }
.me small { color: var(--muted); font-size: 12px; }
.content { padding: 30px 32px 48px; max-width: 1480px; width: 100%; }

.search-pop { position: absolute; top: 44px; inset-inline: 0; z-index: 30; padding: 6px; box-shadow: var(--shadow-float); }
.search-pop button { display: block; width: 100%; text-align: start; border: 0; background: none; padding: 8px 10px; border-radius: var(--r-tile); cursor: pointer; }
.search-pop button:hover { background: var(--stone-2); }
.search-pop small { display: block; color: var(--muted); font-size: 12px; }

/* ───── Page header ───── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-family: var(--f-kufi); font-size: 34px; font-weight: 600; line-height: 1.25; letter-spacing: -.005em; }
.page-head h1:empty { display: none; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 64ch; }
.crumbs { font-size: 13px; color: var(--faint); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.crumbs a { color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ───── Controls ───── */
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px;
  border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: var(--paper);
  cursor: pointer; font-weight: 500; white-space: nowrap; color: var(--basalt);
}
.btn:hover { border-color: var(--basalt-3); text-decoration: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-600); border-color: var(--ink-600); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink); }
.btn.ghost:hover { background: var(--ink-50); }
.btn.sm { height: 31px; padding: 0 11px; font-size: 13px; }
.input, .select, .textarea {
  width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  padding: 0 12px; background: var(--paper);
}
.textarea { height: auto; min-height: 84px; padding: 9px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--ink-50); }
.input:disabled { background: var(--stone-2); color: var(--faint); }
.input-icon { position: relative; }
.input-icon svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.input-icon .input { padding-inline-start: 36px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters .input-icon { flex: 1; min-width: 240px; }
.filters .select { width: auto; min-width: 160px; }

/* ───── Panels ───── */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel); }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 15.5px; font-weight: 600; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.card-head .sub { color: var(--faint); font-size: 12.5px; font-weight: 400; }
.card-body { padding: 18px 20px; }
.card-body.flush { padding: 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)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.split-l { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt { margin-top: 18px; }

/* ───── Stats (secondary pages) ───── */
.stat { padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; }
.stat-head { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.stat .value { font-family: var(--f-kufi); font-size: 32px; font-weight: 600; line-height: 1.2; }
.stat .hint { font-size: 12px; color: var(--faint); }
.tone-green { background: var(--olive-bg); color: var(--olive); }
.tone-amber { background: var(--apricot-bg); color: var(--apricot); }
.tone-red { background: var(--pom-bg); color: var(--pom); }
.tone-blue { background: var(--blue-bg); color: var(--blue); }
.tone-violet { background: var(--plum-bg); color: var(--plum); }
.tone-gray { background: var(--slate-bg); color: var(--slate); }
.tone-primary { background: var(--ink-50); color: var(--ink); }
.ink-green { color: var(--olive); } .ink-amber { color: var(--apricot); } .ink-red { color: var(--pom); }
.ink-blue { color: var(--blue); } .ink-primary { color: var(--ink); } .ink-violet { color: var(--plum); } .ink-gray { color: var(--slate); }

/* ───── Badges ───── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1.8; }
.badge.green { background: var(--olive-bg); color: var(--olive); }
.badge.amber { background: var(--apricot-bg); color: var(--apricot); }
.badge.red { background: var(--pom-bg); color: var(--pom); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.violet { background: var(--plum-bg); color: var(--plum); }
.badge.gray { background: var(--slate-bg); color: var(--slate); }

/* رقم المعاملة نص عادي صغير */
.tr {
  display: inline-block; direction: ltr; unicode-bidi: isolate; white-space: nowrap;
  font-size: 12px; font-weight: 500; color: var(--slate); font-variant-numeric: tabular-nums;
}

/* ───── Tables ───── */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: start; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 11px 16px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--stone-2); }
.tbl tr.dim td { color: var(--faint); }
.tbl td.num, .tbl th.num { text-align: end; font-variant-numeric: tabular-nums; }
.empty { padding: 36px; text-align: center; color: var(--muted); }

/* ───── Tabs ───── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-strong); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 12px; border: 0; background: none; cursor: pointer; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 7px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tab .n { font-size: 11px; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; color: var(--muted); font-weight: 500; }
.seg { display: inline-flex; background: var(--stone); border-radius: var(--r-ctl); padding: 3px; }
.seg button { border: 0; background: none; padding: 4px 14px; cursor: pointer; border-radius: 7px; color: var(--muted); }
.seg button.on { background: var(--paper); color: var(--basalt); font-weight: 500; box-shadow: 0 1px 2px rgba(30, 38, 45, .12); }

/* ───── Info lists ───── */
.info { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px 24px; margin: 0; }
.info dt { color: var(--faint); font-size: 12.5px; margin-bottom: 2px; }
.info dd { margin: 0; font-weight: 500; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv > span:first-child { color: var(--muted); }

/* ───── Progress ───── */
.progress { height: 6px; background: var(--stone); border-radius: 99px; overflow: hidden; min-width: 60px; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--basalt-3); }
.progress.amber > i { background: var(--apricot-mid); }
.progress.red > i { background: var(--pom); }
.progress.green > i { background: var(--olive); }
.range { position: relative; height: 8px; background: var(--stone); border-radius: 99px; }
.range > i { position: absolute; top: 0; bottom: 0; background: var(--ink); border-radius: 99px; opacity: .85; }

/* ───── People ───── */
.avatar { border-radius: 30%; display: grid; place-items: center; font-family: var(--f-kufi); font-weight: 600; color: #fff; flex: none; }
.person { display: flex; align-items: center; gap: 10px; }
.person b { display: block; font-weight: 500; }
.person small { color: var(--faint); font-size: 12px; }

/* ───── Dashboard: seat map ───── */
.desk { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.desk-map { padding: 22px 26px; }
.desk-map h2 { margin: 0; font-family: var(--f-kufi); font-size: 22px; font-weight: 600; }
.desk-map > p { margin: 4px 0 16px; color: var(--muted); }
.cap-list { display: flex; flex-direction: column; }
.cap-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 60px; gap: 16px; align-items: center; padding: 9px 10px; border-radius: 10px; }
.cap-row + .cap-row { border-top: 1px solid var(--line); }
.cap-row:hover { background: var(--stone-2); }
.cap-dept { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap-track { display: flex; gap: 3px; height: 20px; }
.cap-seat {
  flex: 1 1 0; min-width: 9px; max-width: 46px; border: 0; padding: 0; cursor: pointer;
  border-radius: 4px; background: var(--ink); transition: transform .12s ease, filter .12s ease;
}
.cap-seat:hover { transform: translateY(-2px); filter: brightness(1.15); }
.cap-seat.acting { background: repeating-linear-gradient(135deg, var(--ink) 0 5px, #c9636e 5px 9px); }
.cap-seat.vacant { background: var(--stone); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.cap-seat.vacant:hover { box-shadow: inset 0 0 0 1.5px var(--ink); background: var(--ink-50); }
.cap-count { display: flex; align-items: center; justify-content: flex-end; gap: 7px; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.cap-count i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cap-count i.full { background: var(--olive); }
.cap-count i.partial { background: var(--apricot-mid); }
.cap-count i.empty { background: var(--pom); }
.seat-legend { display: flex; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.seat-legend span { display: inline-flex; align-items: center; gap: 7px; }
.seat-legend i { width: 16px; height: 14px; border-radius: 4px; flex: none; }
.seat-legend i.filled { background: var(--ink); }
.seat-legend i.acting { background: repeating-linear-gradient(135deg, var(--ink) 0 5px, #c9636e 5px 9px); }
.seat-legend i.vacant { background: var(--stone); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.ledger { background: var(--ink-deep) var(--girih); color: #fff; padding: 22px 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.ledger div { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.ledger div:last-child { border-bottom: 0; }
.ledger b { display: block; font-family: var(--f-kufi); font-size: 34px; font-weight: 600; line-height: 1.15; }
.ledger span { color: #e8c3c7; font-size: 13px; }
.ledger .warn b { color: #f0b860; }

.greet { margin-bottom: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.greet h1 { margin: 0; font-family: var(--f-kufi); font-size: 34px; font-weight: 600; line-height: 1.25; }
.greet p { margin: 4px 0 0; color: var(--muted); }

/* ───── Alerts ───── */
.alert-row { display: flex; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--line); align-items: center; }
.alert-row:last-child { border-bottom: 0; }
.alert-row .ic { width: 34px; height: 34px; border-radius: var(--r-ctl); display: grid; place-items: center; flex: none; }
.alert-row .txt { flex: 1; min-width: 0; }
.alert-row .txt b { font-weight: 500; }
.alert-row .txt div { color: var(--muted); font-size: 12.5px; }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-ctl); font-size: 13px; align-items: flex-start; line-height: 1.7; }
.callout svg { flex: none; margin-top: 3px; }

/* ───── Org tree ───── */
.tree { list-style: none; margin: 0; padding: 0; }
.tree .tree { padding-inline-start: 22px; border-inline-start: 1px solid var(--line); margin-inline-start: 13px; }
.tree-node { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-ctl); cursor: pointer; }
.tree-node:hover { background: var(--stone-2); }
.tree-node.sel { background: var(--ink); color: #fff; }
.tree-node.sel .mono, .tree-node.sel .muted { color: #f1cfd3; }
.tree-node.sel .badge { background: rgba(255,255,255,.18); color: #fff; }
.tree-toggle { width: 22px; height: 22px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: inherit; opacity: .6; border-radius: 5px; flex: none; }
.tree-toggle:hover { opacity: 1; }
.tree-node .nm { font-weight: 500; }
.tree-node .meta { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; }

.chart-wrap { overflow-x: auto; padding: 20px 8px 8px; }
.chart-wrap > .ochart { width: max-content; min-width: 100%; }
.ochart, .ochart ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.ochart ul { padding-top: 20px; position: relative; }
.ochart li { position: relative; padding: 20px 6px 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.ochart li::before, .ochart li::after { content: ''; position: absolute; top: 0; inset-inline-end: 50%; width: 50%; height: 20px; border-top: 1px solid var(--line-strong); }
.ochart li::after { inset-inline-end: auto; inset-inline-start: 50%; border-inline-start: 1px solid var(--line-strong); }
.ochart li:only-child::before, .ochart li:only-child::after { display: none; }
.ochart li:only-child { padding-top: 0; }
.ochart li:first-child::before, .ochart li:last-child::after { border: 0 none; }
.ochart li:last-child::before { border-inline-end: 1px solid var(--line-strong); border-start-end-radius: 6px; }
.ochart li:first-child::after { border-start-start-radius: 6px; }
.ochart li > ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 20px; border-left: 1px solid var(--line-strong); }
.ochart > li { padding-top: 0; }
.obox { background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); padding: 9px 14px; min-width: 150px; cursor: pointer; }
.obox:hover { border-color: var(--basalt); }
.obox.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.obox.sel small { color: #f1cfd3; }
.obox b { display: block; font-size: 13px; font-weight: 600; }
.obox small { color: var(--muted); font-size: 11.5px; display: block; }
.obox.t1 { border-width: 2px; border-color: var(--basalt); }
.obox.t4 { border-style: dashed; }

/* ───── Drawer / modal ───── */
.overlay { position: fixed; inset: 0; background: rgba(30, 38, 45, .5); z-index: 50; animation: fade .15s ease; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(580px, 100vw); background: var(--stone); z-index: 51; display: flex; flex-direction: column; box-shadow: var(--shadow-float); animation: slide .22s ease; }
.drawer-head { background: var(--paper); padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer-head h2 { margin: 0; font-family: var(--f-kufi); font-size: 23px; font-weight: 600; }
.drawer-body { padding: 18px 22px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(840px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--paper); border-radius: var(--r-panel); z-index: 51; display: flex; flex-direction: column; box-shadow: var(--shadow-float); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font-family: var(--f-kufi); font-size: 22px; font-weight: 600; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--stone-2); border-radius: 0 0 var(--r-panel) var(--r-panel); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(-24px); opacity: 0; } }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.field label .req { color: var(--pom); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { accent-color: var(--ink); width: 16px; height: 16px; }

.steps { display: flex; margin-bottom: 24px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 12.5px; color: var(--faint); text-align: center; }
.step::before { content: ''; position: absolute; top: 15px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step .dot { width: 32px; height: 32px; border-radius: 30%; border: 1.5px solid var(--line-strong); background: var(--paper); display: grid; place-items: center; font-weight: 600; z-index: 1; }
.step.done .dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.step.done::before, .step.cur::before { background: var(--ink); }
.step.cur .dot { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 4px var(--ink-50); }
.step.cur { color: var(--text); font-weight: 600; }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--basalt); color: #fff; padding: 11px 20px; border-radius: var(--r-ctl); z-index: 60; box-shadow: var(--shadow-float); display: flex; gap: 9px; align-items: center; animation: fade .2s; }

/* ───── Profile ───── */
.profile-head { padding: 24px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-head h2 { margin: 0; font-family: var(--f-kufi); font-size: 30px; font-weight: 600; line-height: 1.3; }
.profile-meta { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 6px; }
.profile-meta span { display: inline-flex; gap: 6px; align-items: center; }

.timeline { list-style: none; margin: 0 0 14px; padding: 0; }
.timeline li { position: relative; padding-inline-start: 28px; padding-bottom: 18px; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: 6px; top: 10px; bottom: -6px; width: 1.5px; background: var(--line-strong); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; inset-inline-start: 1px; top: 6px; width: 12px; height: 12px; background: var(--ink); transform: rotate(45deg); border-radius: 2px; }
.timeline li.off::after { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-strong); }

.flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.flow-step { border: 1px solid var(--line-strong); background: var(--paper); padding: 8px 14px; border-radius: var(--r-ctl); text-align: center; }
.flow-step b { display: block; font-size: 13px; font-weight: 600; }
.flow-step small { color: var(--muted); font-size: 11.5px; }
.flow-arrow { color: var(--faint); align-self: center; }

.ladder { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ladder .rung { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 6px 12px; background: var(--stone-2); font-size: 13px; }
.ladder .rung b { color: var(--basalt); margin-inline-end: 6px; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: 3px 4px 3px 12px; font-size: 13px; background: var(--paper); display: inline-flex; gap: 7px; align-items: center; }
[dir="rtl"] .chip { padding: 3px 12px 3px 4px; }

.bars .bar-row { display: grid; grid-template-columns: 150px 1fr 40px; gap: 12px; align-items: center; padding: 6px 0; font-size: 13px; }
.bars .bar-row .progress { height: 8px; }
.bars .bar-row b { text-align: end; font-weight: 500; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -2px; border: 1px solid var(--line-strong); }

/* ───── CRUD controls ───── */
.row-acts { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.act { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 7px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--muted); flex: none; }
.act:hover { background: var(--stone); color: var(--basalt); border-color: var(--line); }
.act.danger:hover { background: var(--pom-bg); color: var(--pom); border-color: transparent; }
.btn.danger-solid { background: var(--pom); border-color: var(--pom); color: #fff; }
.btn.danger-solid:hover { background: #a32d21; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.form-error { display: flex; gap: 8px; align-items: flex-start; background: var(--pom-bg); color: var(--pom); border-radius: var(--r-ctl); padding: 10px 14px; margin-bottom: 16px; font-weight: 500; }
.form-error svg { flex: none; margin-top: 3px; }
.field.err .input, .field.err .select, .field.err .textarea { border-color: var(--pom); box-shadow: 0 0 0 3px var(--pom-bg); }
.field.err label { color: var(--pom); }
.file-in { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.sub-h { margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.doc-row { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.item-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.item-row:last-child { border-bottom: 0; }
.clear-list { margin: 0; padding-inline-start: 20px; line-height: 2; }
.menu { position: relative; }
.menu-pop { position: absolute; top: 44px; inset-inline-end: 0; z-index: 35; min-width: 220px; padding: 6px; box-shadow: var(--shadow-float); }
.menu-pop button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 10px; border-radius: var(--r-tile); cursor: pointer; text-align: start; }
.menu-pop button:hover { background: var(--ink-50); color: var(--ink); }
.modal.small { width: min(520px, calc(100vw - 32px)); }
.overlay.top { z-index: 52; }
.modal { z-index: 53; }
.toast.error { background: var(--pom); }
.toast { max-width: calc(100vw - 32px); }
.tree-node.off .nm { color: var(--faint); text-decoration: line-through; }
button.chip { cursor: pointer; font: inherit; color: inherit; }
button.chip:hover { border-color: var(--ink); color: var(--ink); }
button.obox { font: inherit; color: inherit; text-align: center; }
.chip .row-acts .act { width: 24px; height: 24px; }
.rung { display: inline-flex; align-items: center; gap: 4px; }
.rung .row-acts .act { width: 24px; height: 24px; }
a.icon-btn { color: var(--basalt); }

/* ───── الموديول الثالث: الحضور والانصراف ───── */
/* ألوان الورديات: كل وردية تحمل لونها في متغيرين يستخدمهما أي عنصر */
.k1 { --k: var(--olive); --kb: var(--olive-bg); }
.k2 { --k: var(--apricot); --kb: var(--apricot-bg); }
.k3 { --k: var(--basalt); --kb: #dde1e6; }
.k4 { --k: var(--blue); --kb: var(--blue-bg); }
.k5 { --k: var(--plum); --kb: var(--plum-bg); }

.att-grid { border-collapse: separate; border-spacing: 3px; font-size: 12px; margin: 8px 12px; }
.att-grid th { font-weight: 500; color: var(--muted); padding: 4px 0; text-align: center; min-width: 26px; font-variant-numeric: tabular-nums; }
.att-grid th.we { color: var(--faint); font-weight: 400; }
.att-grid th.today { color: var(--ink); font-weight: 700; }
.att-grid td { padding: 0; text-align: center; }
.att-grid .sticky { position: sticky; inset-inline-start: 0; background: var(--paper); z-index: 1; text-align: start; padding: 4px 10px 4px 12px; white-space: nowrap; min-width: 140px; }
.att-grid .num { padding: 0 10px; text-align: end; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell { width: 26px; height: 26px; border: 0; border-radius: 6px; padding: 0; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; position: relative; vertical-align: middle; }
button.cell:hover { box-shadow: 0 0 0 2px var(--basalt); }
.cell.s-PRESENT { background: var(--olive-bg); color: var(--olive); }
.cell.s-ABSENT { background: var(--pom); color: #fff; }
.cell.s-ON_LEAVE { background: var(--blue-bg); color: var(--blue); }
.cell.s-ON_MISSION { background: var(--plum-bg); color: var(--plum); }
.cell.s-REST_DAY { background: var(--stone); color: var(--faint); font-weight: 400; }
.cell.s-HOLIDAY { background: repeating-linear-gradient(135deg, var(--stone) 0 4px, var(--paper) 4px 8px); color: var(--slate); }
.cell.late { background: var(--apricot-bg); color: var(--apricot); box-shadow: inset 0 -3px 0 var(--apricot-mid); }
.cell.miss::after { content: ''; position: absolute; top: 3px; inset-inline-end: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--pom); box-shadow: 0 0 0 1.5px var(--paper); }
.cell.none { background: none; box-shadow: inset 0 0 0 1px var(--line); cursor: default; color: var(--faint); font-weight: 400; }
.att-legend { flex-wrap: wrap; gap: 8px 18px; }
.att-legend i.cell.mini { width: 16px; height: 16px; border-radius: 4px; cursor: default; }
.att-legend i.cell.mini.miss::after { width: 5px; height: 5px; top: 2px; inset-inline-end: 2px; }

.daybar { margin-bottom: 18px; }
.daybar-track { position: relative; height: 28px; background: var(--stone-2); border: 1px solid var(--line); border-radius: 8px; }
.daybar-track i { position: absolute; top: 0; bottom: 0; }
.daybar-track i.shift { background: var(--slate-bg); box-shadow: inset 0 0 0 1px var(--line-strong); border-radius: 6px; }
.daybar-track i.work { top: 8px; bottom: 8px; background: var(--olive); border-radius: 99px; }
.daybar-track i.work.open { background: repeating-linear-gradient(90deg, var(--olive) 0 7px, transparent 7px 10px); }
.daybar-track b { position: absolute; top: -5px; bottom: -5px; width: 3px; border-radius: 2px; background: var(--basalt); transform: translateX(50%); }
.daybar-ticks { position: relative; height: 20px; margin-top: 4px; font-size: 11px; color: var(--faint); }
.daybar-ticks span { position: absolute; transform: translateX(50%); font-variant-numeric: tabular-nums; }
.daybar .legend i.lg-shift { background: var(--slate-bg); }
.daybar .legend i.lg-work { background: var(--olive); border-color: var(--olive); border-radius: 99px; }

.punch-list { list-style: none; margin: 0; padding: 0; }
.punch-list li { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.punch-list li:last-child { border-bottom: 0; }
.punch-list li:not(.used) { color: var(--muted); }
.punch-list .grow { flex: 1; min-width: 0; }
.was { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.week-label { min-width: 250px; text-align: center; font-weight: 500; }
.icon-btn:disabled { opacity: .4; cursor: default; }
.tbl.roster td { padding: 6px 4px; text-align: center; }
.tbl.roster td:first-child { padding-inline-start: 16px; min-width: 190px; text-align: start; }
.tbl.roster th { text-align: center; }
.tbl.roster th:first-child { text-align: start; }
.tbl.roster th.today { color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.tbl.roster tr.grp td { background: var(--stone-2); font-size: 12.5px; font-weight: 600; color: var(--slate); text-align: start; padding: 7px 16px; }
.tbl.roster tr.grp span { margin-inline-start: 8px; font-weight: 400; color: var(--faint); }
.tbl.roster tfoot td { background: var(--stone-2); font-size: 13px; font-weight: 600; border-top: 1px solid var(--line-strong); }
.tbl.roster tfoot td:first-child { font-weight: 500; color: var(--muted); }
/* خانة الوردية: اسم مختصر بلون نوعها، والتفاصيل في التلميح */
.slot { width: 100%; min-width: 74px; height: 30px; border: 0; border-radius: 7px; font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; background: var(--kb); color: var(--k); display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.slot:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--k); }
.slot.off { background: none; color: var(--faint); font-weight: 400; }
.slot.none { background: none; color: var(--pom); font-weight: 400; font-size: 12px; }
.slot.off:hover:not(:disabled), .slot.none:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--line-strong); }
.slot:disabled { cursor: default; opacity: .5; }
.shift-keys { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; font-size: 13px; }
.shift-keys span { display: inline-flex; align-items: center; gap: 7px; }
.shift-keys i { width: 12px; height: 12px; border-radius: 4px; background: var(--kb); box-shadow: inset 0 0 0 1.5px var(--k); }
.shift-keys small { color: var(--muted); direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.shift-chip { position: relative; width: 100%; min-width: 96px; border: 1px solid transparent; border-radius: 8px; padding: 5px 9px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; text-align: start; background: var(--kb, var(--paper)); color: var(--k, var(--muted)); }
.shift-chip small { font-weight: 400; font-size: 11px; opacity: .85; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.shift-chip.off { background: none; border: 1px dashed var(--line-strong); color: var(--faint); font-weight: 400; }
.shift-chip.none { background: none; border: 1px dashed var(--pom); color: var(--pom); font-weight: 400; }
.shift-chip:hover:not(:disabled) { border-color: var(--k, var(--basalt)); }
.shift-chip:disabled { cursor: default; opacity: .55; }
.shift-chip.wide { padding: 10px 14px; font-size: 14px; }
.shift-chip.cur { box-shadow: 0 0 0 2px var(--k, var(--basalt)); }
.shift-chip.inline { display: inline-flex; flex-direction: row; align-items: baseline; gap: 6px; width: auto; min-width: 0; cursor: default; padding: 2px 9px; }
.dotn { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; font-size: 11px; font-weight: 600; background: var(--kb); color: var(--k); }
.seat-legend i.k1, .seat-legend i.k2, .seat-legend i.k3, .seat-legend i.k4, .seat-legend i.k5 { background: var(--kb); box-shadow: inset 0 0 0 1.5px var(--k); }
.seat-legend i.off { background: none; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.clock24 { position: relative; height: 12px; background: var(--stone); border-radius: 99px; }
.clock24 i { position: absolute; top: 0; bottom: 0; background: var(--k); border-radius: 99px; }
.clock24-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 4px; font-variant-numeric: tabular-nums; }
.dim-card { opacity: .7; }

.cycle { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; background: none; border-radius: var(--r-ctl); cursor: pointer; text-align: start; font: inherit; color: inherit; }
.cycle:hover { background: var(--stone-2); }
.cycle b { font-weight: 500; }
.cycle small { display: block; color: var(--muted); font-size: 12px; }
.cycle.sel { background: var(--ink); color: #fff; }
.cycle.sel small { color: #f1cfd3; }
.cycle.sel .badge { background: rgba(255, 255, 255, .18); color: #fff; }
.check-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; background: var(--stone-2); border-radius: 0 0 var(--r-panel) var(--r-panel); }
.sum-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border-bottom: 1px solid var(--line); }
.sum-strip > div { padding: 14px 20px; border-inline-end: 1px solid var(--line); }
.sum-strip > div:last-child { border-inline-end: 0; }
.sum-strip b { display: block; font-family: var(--f-kufi); font-size: 24px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.sum-strip span { color: var(--muted); font-size: 12.5px; }

.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.mcal .h { font-size: 11.5px; color: var(--faint); text-align: center; padding-bottom: 2px; }
.mcal .cell { width: 100%; height: 40px; font-size: 13px; }
.att-today { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.att-today a { color: inherit; text-decoration: none; padding: 8px 4px; border-radius: var(--r-ctl); text-align: center; }
.att-today a:hover { background: var(--stone-2); }
.att-today b { display: block; font-family: var(--f-kufi); font-size: 26px; font-weight: 600; line-height: 1.2; }
.att-today span { font-size: 12px; color: var(--muted); }

/* ───── تسجيل الدخول وبوابة الموظف ───── */
.login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); min-height: 100vh; }
.login-art {
  background: var(--basalt) var(--girih); color: #c3cbd1;
  display: flex; flex-direction: column; justify-content: space-between; padding: 8px 40px 32px;
}
.login-art .brand { padding-inline: 0; }
.login-art h1 { margin: 0 0 10px; font-family: var(--f-kufi); font-size: 40px; font-weight: 600; line-height: 1.25; color: #fff; }
.login-art p { margin: 0; max-width: 460px; font-size: 16px; line-height: 1.8; }
.login-art small { color: #75818b; font-size: 12px; }
.login-side { display: grid; place-items: center; padding: 32px 24px; background: var(--stone-2); }
.login-form { width: 100%; max-width: 420px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.login-form h2 { margin: 0; font-family: var(--f-kufi); font-size: 26px; font-weight: 600; }
.login-form .field { display: flex; flex-direction: column; gap: 6px; }
.login-form .field label { font-size: 13px; font-weight: 500; }
.login-go { height: 44px; justify-content: center; }
.login-form .form-error { margin: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--stone); border-radius: var(--r-ctl); }
.seg button {
  display: flex; align-items: center; justify-content: center; gap: 7px; height: 38px;
  border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; font-size: 14px;
}
.seg button.active { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(30, 38, 45, .12); }
.demo { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.chip {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 5px 11px;
  border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--paper); cursor: pointer; text-align: start;
}
.chip:hover { border-color: var(--ink); }
.chip b { font-size: 13px; font-weight: 500; }
.chip .mono { font-size: 11.5px; }
.detail .mono { white-space: nowrap; }
.stat-link { display: block; color: inherit; text-decoration: none !important; }
.stat-link .stat { height: 100%; transition: border-color .15s; }
.stat-link:hover .stat { border-color: var(--ink); }
.span2 { grid-column: 1 / -1; }
.kv.total { border-top: 2px solid var(--line-strong); margin-top: 4px; padding-top: 12px; }
.kv.total span { color: var(--text); font-weight: 600; }
.bell-n { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.icon-btn { position: relative; }
.notif-pop { position: absolute; top: 46px; inset-inline-end: 0; width: min(360px, calc(100vw - 32px)); z-index: 30; box-shadow: var(--shadow-float); overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif-body { max-height: 360px; overflow-y: auto; }
.notif { display: flex; gap: 12px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: start; cursor: pointer; }
.notif:hover { background: var(--stone-2); }
.notif.unread { background: var(--ink-50); }
.notif .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.notif b { display: block; font-size: 13.5px; font-weight: 500; }
.notif small { display: block; color: var(--muted); font-size: 12.5px; }
.notif small.when { color: var(--faint); font-size: 11.5px; direction: ltr; text-align: end; }
.notif-all { display: block; padding: 10px; text-align: center; font-size: 13px; }
.check-row { cursor: pointer; }
.check-row input { accent-color: var(--ink); width: 17px; height: 17px; }
.portal-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; color: var(--ink); background: var(--ink-50); padding: 5px 12px; border-radius: 99px; }

/* ───── Responsive ───── */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .desk { grid-template-columns: 1fr; }
  .ledger { flex-direction: row; flex-wrap: wrap; }
  .ledger div { flex: 1; min-width: 140px; border-bottom: 0; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset-inline-start: 0; width: 272px; z-index: 40; transform: translateX(100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-float); }
  .menu-btn { display: grid; }
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 8px 24px 24px; gap: 18px; }
  .login-art h1 { font-size: 30px; }
  .g2, .g3, .split-l { grid-template-columns: minmax(0, 1fr); }
  .me div { display: none; }
  .cap-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .cap-track { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 600px) {
  .content { padding: 20px 16px 40px; }
  .topbar { padding: 0 16px; }
  .g4 { grid-template-columns: minmax(0, 1fr); }
  /* التنبيه يلتف تحته الموعد والزر بدل أن يدفع البطاقة خارج الشاشة */
  .alert-row { flex-wrap: wrap; }
  .alert-row .row { width: 100%; justify-content: flex-end; }
  .form { grid-template-columns: 1fr; }
  .page-head h1, .greet h1 { font-size: 28px; }
  .desk-map { padding: 18px 16px; }
  .bars .bar-row { grid-template-columns: 110px 1fr 32px; }
  .week-label { min-width: 0; font-size: 13px; }
  .mcal .h { font-size: 10px; overflow: hidden; white-space: nowrap; }
  .att-today b { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
