:root {
  --font-ui: "Inter", "IBM Plex Sans Hebrew", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-he: "IBM Plex Sans Hebrew", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Noto Serif Hebrew", "Frank Ruhl Libre", "Times New Roman", serif;
  --font-mono: "Inter", "IBM Plex Sans Hebrew", ui-sans-serif, system-ui, sans-serif;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --surface-3: #f4f5f7;
  --surface-hover: #f4f5f7;
  --head-bg: #fbfbfc;
  --border: #e3e5e9;
  --border-soft: #e9ebee;
  --border-strong: #d1d5db;
  --text: #111318;
  --text-2: #383d49;
  --text-3: #6b7180;
  --text-inverse: #ffffff;

  --brand: #312e81;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --primary-ring: rgba(79, 70, 229, .2);
  --accent: #b08d3c;
  --accent-soft: #fbf6ea;

  --male: #3d6b94;
  --male-soft: #eaf0f6;
  --female: #a14a6c;
  --female-soft: #f7edf1;

  --green: #1c6a42;  --green-soft: #e8f2ec;
  --blue: #2c6aa0;   --blue-soft: #e7f0f8;
  --violet: #563a86; --violet-soft: #eeeaf5;
  --rose: #962b52;   --rose-soft: #f6e8ee;
  --amber: #875800;  --amber-soft: #f8f0dd;
  --red: #a0221a;    --red-soft: #f8e7e5;
  --teal: #13615e;   --teal-soft: #e3f0ef;
  --gray: #4d555d;   --gray-soft: #edeff2;

  --appbar-bg: #ffffff;
  --appbar-bg-2: #f3f4f6;
  --appbar-text: #1c1f23;
  --appbar-muted: #6b7480;
  --appbar-line: #e5e8eb;

  --sidebar-bg: #ffffff;
  --sidebar-text: #4e5462;
  --sidebar-muted: #9ba1ac;
  --sidebar-active: #eef2ff;
  --sidebar-border: #e3e5e9;
  --sidebar-w: 244px;
  --sidebar-w-collapsed: 64px;
  --appbar-h: 56px;
  --topbar-h: 56px;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --shadow-xs: 0 1px 2px rgba(17, 19, 24, .05);
  --shadow-sm: 0 1px 2px rgba(17, 19, 24, .06), 0 1px 3px rgba(17, 19, 24, .05);
  --shadow: 0 4px 12px -2px rgba(17, 19, 24, .08), 0 2px 4px -2px rgba(17, 19, 24, .05);
  --shadow-lg: 0 16px 40px -10px rgba(17, 19, 24, .18), 0 4px 10px -4px rgba(17, 19, 24, .07), 0 0 0 1px rgba(17, 19, 24, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
  --bg: #121417;
  --surface: #1a1d21;
  --surface-2: #1f2328;
  --surface-3: #262b31;
  --surface-hover: #24282d;
  --head-bg: #22262b;
  --border: #30363d;
  --border-soft: #2a2f35;
  --border-strong: #46505a;
  --text: #eceff2;
  --text-2: #c3c9cf;
  --text-3: #8e98a2;
  --primary: #a5b4fc;
  --primary-hover: #c7d2fe;
  --primary-soft: #2c281f;
  --primary-ring: rgba(217, 192, 143, .28);
  --accent-soft: #2f2a1f;
  --male-soft: #1d2633;
  --female-soft: #331f27;
  --green-soft: #17271e; --blue-soft: #1a2433; --violet-soft: #241e31; --rose-soft: #321b25;
  --amber-soft: #2e2512; --red-soft: #331b19; --teal-soft: #142826; --gray-soft: #262b31;
  --green: #6cc497; --blue: #86aee6; --violet: #b49ade; --rose: #e48aa8; --amber: #e0b35e;
  --red: #ee8b80; --teal: #6cc3bf; --gray: #b1bac3; --male: #8fb0e2; --female: #e28fac;
  --appbar-bg: #16191c;
  --appbar-bg-2: #1f2328;
  --appbar-text: #eceff2;
  --appbar-muted: #8e98a2;
  --appbar-line: #30363d;
  --sidebar-bg: #16191c;
  --sidebar-text: #d5dbe0;
  --sidebar-muted: #8e98a2;
  --sidebar-active: #1f2328;
  --sidebar-border: #30363d;
  --shadow: 0 4px 14px rgba(0, 0, 0, .4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .55);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01", "ss03";
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[dir="rtl"] body, body[dir="rtl"] { font-family: var(--font-he); }
a { color: inherit; text-decoration: none; }
a.link, .prose a { color: var(--primary); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent); text-underline-offset: 2px; }
a.link:hover, .prose a:hover { text-decoration-color: currentColor; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--text); letter-spacing: 0; }
p { margin: 0 0 .75em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
button { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--primary) 18%, transparent); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.i-sm { width: 14px; height: 14px; }
.i-lg { width: 20px; height: 20px; }
.i-xl { width: 28px; height: 28px; stroke-width: 1.4; }

.he { font-family: var(--font-he); }
.yi { font-family: var(--font-he); color: var(--text-3); font-size: .95em; font-weight: 500; margin-inline-start: .4em; }
.serif { font-family: var(--font-serif); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden, [hidden] { display: none !important; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.ms-auto { margin-inline-start: auto; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.full { grid-column: 1 / -1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 13px; line-height: 1; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-xs);
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s; text-decoration: none; user-select: none;
}
.btn .i { width: 15px; height: 15px; }
.btn:hover { background: var(--surface-2); border-color: #a9b1b9; }
.btn:active { background: var(--surface-3); }
.btn:disabled, .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(49, 46, 129, .24), inset 0 1px 0 rgba(255, 255, 255, .1); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-primary:active { background: #3730a3; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--text); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.btn-danger-solid { background: var(--red); border-color: #7e1913; color: #fff; }
.btn-danger-solid:hover { background: #861c15; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 12px; }
.btn-lg { height: 38px; padding: 0 18px; font-size: 13.5px; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn-icon.btn-xs { width: 24px; }
.btn-block { width: 100%; }
.btn .count { color: var(--text-3); font-size: 11px; font-weight: 600; }
.btn .count::before { content: "("; } .btn .count::after { content: ")"; }
.btn-primary .count { color: rgba(255, 255, 255, .8); }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-inline-start: -1px; }
.btn-group .btn:first-child { border-start-start-radius: var(--radius-sm); border-end-start-radius: var(--radius-sm); margin-inline-start: 0; }
.btn-group .btn:last-child { border-start-end-radius: var(--radius-sm); border-end-end-radius: var(--radius-sm); }
.btn-group .btn.active { background: var(--surface-3); color: var(--text); z-index: 1; }
.btn-group > .dropdown > .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-inline-start: -1px; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: baseline; gap: 6px; }
.label .yi { font-weight: 500; }
.req { color: var(--red); font-weight: 700; }
.hint { font-size: 11.5px; color: var(--text-3); }
.error-text { font-size: 11.5px; color: var(--red); }
.input, .select, .textarea {
  width: 100%; height: 34px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px; transition: border-color .1s, box-shadow .1s;
}
.input::placeholder, .textarea::placeholder { color: #8b949d; }
.input:hover, .select:hover, .textarea:hover { border-color: #a9b1b9; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-2); color: var(--text-3); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--red); background: color-mix(in srgb, var(--red-soft) 50%, var(--surface)); }
.textarea { height: auto; min-height: 80px; padding: 6px 9px; line-height: 1.5; resize: vertical; }
.select { appearance: none; padding-inline-end: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M1 3l4 4 4-4' fill='none' stroke='%23525b64' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.select:dir(rtl) { background-position: left 9px center; }
.input-sm, .select-sm { height: 30px; font-size: 12.5px; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > .i { position: absolute; inset-inline-start: 9px; color: var(--text-3); pointer-events: none; width: 15px; height: 15px; }
.input-group > .input { padding-inline-start: 31px; }
.input-group .kbd { position: absolute; inset-inline-end: 8px; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; user-select: none; }
.check input, .facet-option input, input[type="checkbox"] { accent-color: var(--primary); }
.check input { width: 14px; height: 14px; margin: 0; cursor: pointer; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch input { appearance: none; width: 32px; height: 18px; border-radius: 2px; background: #c3c9cf; position: relative; cursor: pointer; transition: background .12s; margin: 0; flex: none; border: 1px solid #a3abb3; }
.switch input::after { content: ""; position: absolute; top: 1px; inset-inline-start: 1px; width: 14px; height: 14px; border-radius: 1px; background: #fff; transition: transform .12s var(--ease); box-shadow: 0 1px 1px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--primary); border-color: var(--primary-hover); }
.switch input:checked::after { transform: translateX(14px); }
.switch:dir(rtl) input:checked::after { transform: translateX(-14px); }
.chip-select { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-select label { position: relative; }
.chip-select input { position: absolute; opacity: 0; pointer-events: none; }
.chip-select label > span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); font-size: 13px; cursor: pointer; transition: background .1s, border-color .1s; color: var(--text-2); background: var(--surface); }
.chip-select label > span:hover { background: var(--surface-2); color: var(--text); }
.chip-select input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-select input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--primary-ring); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius); background: var(--surface-3); }
.segmented a, .segmented button, .segmented label { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.segmented label { padding: 0; }
.segmented input { display: none; }
.segmented .active, .segmented a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented label span { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--radius-sm); }
@media (max-width: 900px) {
  .segmented { max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented > a, .segmented > button, .segmented > label { flex: none; white-space: nowrap; }
}
@media (max-width: 900px), (pointer: coarse) {
  .segmented a, .segmented button, .segmented label, .segmented label span { height: 34px; }
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-section { padding: 18px 0; border-top: 1px solid var(--border); }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.form-section-head h3 { font-size: 14px; font-weight: 600; color: var(--text); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 8px; }
@media (max-width: 900px), (pointer: coarse) {
  .btn { height: 40px; }
  .btn-sm { height: 36px; }
  .btn-xs { height: 30px; }
  .btn-lg { height: 44px; }
  .btn-icon { width: 40px; }
  .btn-icon.btn-sm { width: 36px; }
  .btn-icon.btn-xs { width: 30px; }
  .input, .select { height: 40px; }
  .input-sm, .select-sm { height: 36px; }
  .chip-select label > span { height: 36px; }
  .check { min-height: 32px; }
  .check input { width: 18px; height: 18px; }
}
@media (max-width: 640px) {
  .form-actions { flex-wrap: wrap; }
  .form-actions > .btn { flex: 1 1 auto; }
}

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--radius-xs); font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1; color: var(--gray); background: var(--gray-soft); border: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-rose { background: var(--rose-soft); color: var(--rose); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-teal { background: var(--teal-soft); color: var(--teal); }
.badge-gray { background: var(--gray-soft); color: var(--gray); }
.badge-brand { background: var(--primary-soft); color: var(--primary); }
.badge-outline { background: transparent; border-color: var(--border-strong); color: var(--text-2); }
.badge-sm { height: 17px; padding: 0 5px; font-size: 10.5px; }
.code-chip { font-family: var(--font-mono); font-size: 11px; padding: 0 5px; line-height: 17px; border-radius: var(--radius-xs); background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; display: inline-block; direction: ltr; }
.kbd { font-family: var(--font-mono); font-size: 10.5px; padding: 0 4px; line-height: 16px; border: 1px solid var(--border-strong); border-radius: 2px; color: var(--text-3); background: var(--surface); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--radius-xs); background: var(--accent-soft); color: #6c5326; font-size: 11.5px; font-weight: 500; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
[data-theme="dark"] .tag { color: #dcc28f; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 5px 0 11px; border-radius: var(--radius-xl); background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); font-size: 12.5px; color: var(--primary); }
.filter-chip:dir(rtl) { padding: 0 11px 0 5px; }
.filter-chip strong { color: var(--primary); font-weight: 650; }
.filter-chip a, .filter-chip button { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; align-items: center; justify-content: center; color: var(--text-3); background: none; border: 0; cursor: pointer; padding: 0; }
.filter-chip a:hover, .filter-chip button:hover { background: var(--surface-3); color: var(--red); }
.gender-mark { width: 3px; align-self: stretch; background: var(--male); flex: none; }
.gender-mark.female { background: var(--female); }
.gender-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--male); }
.gender-pill::before { content: ""; width: 8px; height: 8px; background: currentColor; border-radius: 1px; }
.gender-pill.female { color: var(--female); }
.gtag { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-family: var(--font-he); font-size: 12.5px; font-weight: 700; color: #fff; background: var(--male); flex: none; line-height: 1; }
.gtag.female { background: var(--female); }

.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-weight: 600; font-size: 11.5px; flex: none; overflow: hidden; border: 1px solid var(--border); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.male { background: var(--male-soft); color: var(--male); border-color: color-mix(in srgb, var(--male) 25%, transparent); }
.avatar.female { background: var(--female-soft); color: var(--female); border-color: color-mix(in srgb, var(--female) 25%, transparent); }
.avatar.brand { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-xs { width: 20px; height: 20px; font-size: 9px; }
.avatar-lg { width: 40px; height: 40px; font-size: 14px; }
.avatar-xl { width: 56px; height: 56px; font-size: 18px; }
.avatar-he { font-family: var(--font-he); font-size: 12px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); min-width: 0; box-shadow: var(--shadow-xs); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--border-soft); min-height: 50px; background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 14.5px; font-weight: 650; color: var(--text); padding: 12px 0; }
.card-head .sub { font-size: 12px; color: var(--text-3); }
.card-head .actions { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; padding: 5px 0; }
.card-head > .i { color: var(--text-3); }
.card-body { padding: 18px; }
.card-body.tight { padding: 6px 8px; }
.card-foot { padding: 10px 18px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-flush { overflow: hidden; }
.section-label { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 8px; }

.stats { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); }
.stat { flex: 1 1 150px; padding: 16px 18px 17px; display: flex; flex-direction: column; gap: 4px; position: relative; min-width: 0; border-inline-end: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); margin-bottom: -1px; margin-inline-end: -1px; background: var(--surface); }
a.stat:hover { background: var(--surface-hover); }
a.stat:hover .stat-value { color: var(--primary); }
.stat-label { font-size: 12.5px; color: var(--text-3); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat-label .i { display: none; }
.stat-value { font-size: 27px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; color: var(--text); }
.stat-hint { font-size: 11.5px; color: var(--text-3); }
.stat-hint.up { color: var(--green); }
.stat-hint.warn { color: var(--amber); }
.stat-hint.bad { color: var(--red); }
@media (min-width: 641px) and (max-width: 1100px) {
  .stats.kpis > .stat { flex-basis: 30%; }
}

.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.table th { position: sticky; top: 0; z-index: 2; background: var(--head-bg); text-align: start; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 0 14px; height: 40px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th a { display: inline-flex; align-items: center; gap: 4px; color: inherit; }
.table th a:hover { color: var(--primary); }
.table th .i { width: 11px; height: 11px; stroke-width: 2.2; }
.table td { padding: 9px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; height: 54px; color: var(--text); }
.table tbody tr:hover td { background: var(--surface-hover); }
.table tbody tr.is-selected td { background: var(--primary-soft); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .col-check { width: 36px; padding-inline-end: 0; }
.table .col-actions { width: 1%; white-space: nowrap; text-align: end; }
.table .cell-main { font-weight: 600; color: var(--text); }
.table .cell-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.table.compact td { height: 40px; padding-top: 3px; padding-bottom: 3px; }
.table.relaxed td { height: 46px; }
.table-row-link { cursor: pointer; }
.table .num { text-align: end; font-variant-numeric: tabular-nums; }
.table tr.row-muted td { color: var(--text-3); }
.th-bi { display: inline-flex; flex-direction: column; line-height: 1.15; gap: 1px; }
.th-bi .th-yi { font-family: var(--font-he); font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.th-bi .th-en { font-size: 10.5px; font-weight: 500; color: var(--text-3); }
.table th.th-tall { height: 50px; }
.person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.person-name { font-weight: 600; color: var(--text); line-height: 1.3; white-space: nowrap; display: inline-block; }
.person-name:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.person-name.he { font-size: 15px; }
.person-meta { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.3; margin-top: 2px; }
.person-meta .sep::before { content: "·"; }
.cell-stack { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.3; gap: 1px; }
.cell-stack > * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-stack .primary { font-weight: 500; color: var(--text); }
.cell-stack .secondary { font-size: 11.5px; color: var(--text-3); }
@media (max-width: 900px) {
  .table-wrap { background: linear-gradient(90deg, var(--surface) 30%, transparent) left center / 28px 100% no-repeat local, linear-gradient(270deg, var(--surface) 30%, transparent) right center / 28px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, rgba(17, 19, 24, .16), transparent) left center / 12px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, rgba(17, 19, 24, .16), transparent) right center / 12px 100% no-repeat scroll; -webkit-overflow-scrolling: touch; }
  [data-theme="dark"] .table-wrap { background: linear-gradient(90deg, var(--surface) 30%, transparent) left center / 28px 100% no-repeat local, linear-gradient(270deg, var(--surface) 30%, transparent) right center / 28px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .5), transparent) left center / 12px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .5), transparent) right center / 12px 100% no-repeat scroll; }
}
@media (max-width: 640px) {
  .table-wrap:has(> .table-cards) { background: none; overflow: visible; }
  .table.table-cards, .table.table-cards > tbody { display: block; width: 100%; }
  .table.table-cards > thead { display: none; }
  .table.table-cards > tbody > tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); }
  .table.table-cards > tbody > tr:last-child { border-bottom: 0; }
  .table.table-cards > tbody > tr:hover { background: var(--surface-hover); }
  .table.table-cards > tbody > tr.is-selected { background: var(--primary-soft); }
  .table.table-cards > tbody > tr > td { display: block; width: auto; height: auto; min-width: 0 !important; max-width: 100% !important; padding: 0; border: 0; background: none; white-space: normal; text-align: start; }
  .table.table-cards > tbody > tr > td { order: 2; }
  .table.table-cards > tbody > tr > td.tc-main { order: 0; flex: 1 1 0; }
  .table.table-cards > tbody > tr > td.col-check { order: 0; flex: none; display: flex; align-items: center; }
  .table.table-cards > tbody > tr > td.col-check input { width: 18px; height: 18px; margin: 0; }
  .table.table-cards > tbody > tr > td.col-actions { order: 1; flex: none; margin-inline-start: auto; }
  .table.table-cards > tbody > tr > td[data-label] { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 8px; font-size: 13px; text-align: end; }
  .table.table-cards > tbody > tr > td[data-label]::before { content: attr(data-label); flex: none; margin-inline-end: auto; padding-inline-end: 8px; font-size: 12px; font-weight: 500; color: var(--text-3); }
  .table.table-cards > tbody > tr > td[data-label] > * { min-width: 0; margin-top: 0; }
  .table.table-cards > tbody > tr > td.tc-stat { flex: 1 1 0; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-start; gap: 1px; padding: 7px 10px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border-soft); font-size: 15px; font-weight: 650; text-align: start; }
  .table.table-cards > tbody > tr > td.tc-stat::before { margin: 0; padding: 0; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .table.table-cards > tbody > tr > td.tc-badge { order: 1; flex: none; }
  .table.table-cards .person-name { white-space: normal; }
  .table.table-cards td[data-label] .cell-stack { align-items: flex-end; text-align: end; }
  .table.table-cards td[data-label] .truncate { max-width: 220px !important; }
}

.pager { display: flex; align-items: center; gap: 4px; padding: 10px 16px; border-top: 1px solid var(--border-soft); background: var(--surface); font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.pager .pages { display: flex; gap: 2px; margin-inline-start: auto; }
.pager a, .pager span.p { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; color: var(--text-2); border-radius: var(--radius); font-variant-numeric: tabular-nums; font-weight: 500; }
.pager a:hover { background: var(--surface-2); color: var(--text); }
.pager .current { background: var(--primary); color: #fff; font-weight: 700; }
.pager:dir(rtl) .pages .i { transform: scaleX(-1); }
@media (max-width: 900px), (pointer: coarse) {
  .pager a, .pager span.p { min-width: 38px; height: 38px; }
}

.empty { padding: 40px 24px; text-align: center; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .empty-icon { color: var(--text-3); margin-bottom: 4px; display: inline-flex; }
.empty .empty-icon .i { width: 26px; height: 26px; stroke-width: 1.4; }
.empty h3 { font-size: 13.5px; font-weight: 600; }
.empty p { color: var(--text-3); max-width: 440px; margin: 0; font-size: 12.5px; }
.empty.compact { padding: 22px 16px; }
.progress { height: 6px; border-radius: 1px; background: var(--surface-3); overflow: hidden; border: 1px solid var(--border-soft); }
.progress > span { display: block; height: 100%; background: var(--primary); transition: width .4s var(--ease); }
.progress.green > span { background: var(--green); }
.progress.accent > span { background: var(--accent); }
.progress.thin { height: 4px; border: 0; }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 1px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.kv { display: grid; grid-template-columns: minmax(130px, 36%) 1fr; gap: 0; font-size: 13px; }
.kv > dt, .kv > dd { padding: 10px 0; border-bottom: 1px solid var(--border-soft); margin: 0; min-width: 0; }
.kv > dt { color: var(--text-3); font-size: 12.5px; font-weight: 500; padding-inline-end: 12px; }
.kv > dd { color: var(--text); overflow-wrap: anywhere; font-weight: 500; font-size: 13.5px; }
.kv > dt:nth-last-child(2), .kv > dd:last-child { border-bottom: 0; }
.kv dd.empty-val { color: #9aa2aa; font-weight: 400; }
.kv > dt .yi { display: block; margin: 1px 0 0; font-size: 11px; color: var(--text-3); font-weight: 500; }
[dir="ltr"] .kv > dd { text-align: left; }
[dir="ltr"] .kv > dd > span[dir] { text-align: left; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: 1px solid var(--border); background: var(--surface-2); }
.fact { padding: 9px 16px 10px; border-inline-end: 1px solid var(--border-soft); min-width: 0; }
.fact:last-child { border-inline-end: 0; }
.fact-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 2px; }
.fact-value { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 14px; color: var(--text-3); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; background: none; border-top: 0; border-inline: 0; }
.tab .i { width: 14px; height: 14px; color: var(--text-3); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 650; }
.tab.active .i { color: var(--accent); }
.tab .count { margin-inline-start: 1px; }
.tab .count { font-size: 11px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tab .count::before { content: "("; } .tab .count::after { content: ")"; }
.tab.active .count { color: var(--primary); }
.tab .count.alert { color: #fff; background: var(--primary); padding: 0 5px; border-radius: 2px; line-height: 16px; }
.tab .count.alert::before, .tab .count.alert::after { content: none; }

.dropdown { position: relative; display: inline-flex; }
.menu { position: absolute; z-index: 60; top: calc(100% + 6px); inset-inline-end: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 5px; display: none; }
.menu.align-start { inset-inline-end: auto; inset-inline-start: 0; }
.dropdown.open > .menu { display: block; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text); background: none; border: 0; cursor: pointer; text-align: start; }
.menu-item:hover { background: var(--surface-hover); }
.menu-item .i { color: var(--text-3); width: 15px; height: 15px; }
.menu-item.danger { color: var(--red); }
.menu-item.danger .i { color: var(--red); }
.menu-sep { height: 1px; background: var(--border-soft); margin: 5px -5px; }
.menu-label { padding: 6px 12px 3px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
@media (max-width: 900px), (pointer: coarse) {
  .menu-item { min-height: 42px; font-size: 14px; }
  .menu-label { font-size: 11px; }
}
@media (max-width: 640px) {
  .menu { max-width: calc(100vw - 24px); }
}
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); background: #1d2227; color: #fff; font-size: 11px; font-weight: 500; padding: 3px 7px; border-radius: 2px; white-space: nowrap; z-index: 80; pointer-events: none; }

dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(16, 20, 24, .5); }
.modal { width: min(560px, calc(100vw - 32px)); background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: calc(100vh - 48px); overflow: hidden; }
dialog[open] .modal { animation: modal-in .14s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(6px); } }
.modal-lg { width: min(780px, calc(100vw - 32px)); }
.modal-xl { width: min(1040px, calc(100vw - 32px)); }
.modal-sm { width: min(440px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--border-soft); background: var(--surface); }
.modal-head h2 { font-size: 17px; font-weight: 650; }
.modal-head p { margin: 2px 0 0; color: var(--text-3); font-size: 12px; }
.modal-head .close { margin-inline-start: auto; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.modal-foot .left { margin-inline-end: auto; }
dialog.drawer { margin: 0; margin-inline-start: auto; height: 100vh; max-height: 100vh; }
.drawer-panel { width: min(560px, 100vw); height: 100vh; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; border-inline-start: 1px solid var(--border-strong); }
dialog.drawer[open] .drawer-panel { animation: drawer-in .18s var(--ease); }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .5; } }
dialog.drawer[open]:dir(rtl) .drawer-panel { animation-name: drawer-in-rtl; }
@keyframes drawer-in-rtl { from { transform: translateX(-24px); opacity: .5; } }
.drawer-panel .modal-body { flex: 1; }
@media (max-width: 640px) {
  .modal, .modal-sm, .modal-lg, .modal-xl { width: calc(100vw - 20px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); }
  .modal-head { padding: 16px 16px 12px; }
  .modal-head h2 { font-size: 16px; }
  .modal-foot { padding: 12px 16px; flex-wrap: wrap; }
  .modal-foot > .btn { flex: 1 1 auto; }
  dialog.drawer, .drawer-panel { height: 100dvh; max-height: 100dvh; }
}

.toasts { position: fixed; z-index: 120; bottom: 18px; inset-inline-end: 18px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { pointer-events: auto; min-width: 280px; max-width: 420px; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: #1d2227; color: #eef1f4; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 12.5px; animation: toast-in .18s var(--ease); border-inline-start: 4px solid #5cae84; }
.toast.error { border-inline-start-color: #e0786d; }
.toast.warning { border-inline-start-color: #e2b45e; }
.toast .i { margin-top: 1px; color: #8fd4b0; }
.toast.error .i { color: #f19a90; }
.toast.warning .i { color: #f0c977; }
.toast .t-title { font-weight: 600; }
.toast .t-body { color: #b9c2ca; font-size: 12px; }
.toast .t-close { margin-inline-start: auto; color: #8e98a2; cursor: pointer; background: none; border: 0; padding: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

.topbar-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-sm); background: none; border: 0; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .pip { position: absolute; top: 4px; inset-inline-end: 3px; min-width: 16px; height: 15px; padding: 0 4px; border-radius: 2px; background: var(--primary); color: #fff; font-size: 9.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--bg); }
.content { padding: 0 28px 48px; flex: 1; min-width: 0; }
.content > :first-child:not(.page-head):not(.record-head):not(.page-band) { margin-top: 4px; }

.page-head { display: flex; align-items: flex-end; gap: 16px; margin: 0 0 20px; padding: 4px 0 0; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--text); letter-spacing: -.02em; }
.page-head .page-sub { font-size: 13.5px; color: var(--text-3); margin-top: 5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-head .page-sub strong { color: var(--text); }
.page-head .page-actions { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.page-head:has(+ .page-tabs) { margin-bottom: 8px; }
.page-tabs { margin: 0 0 20px; padding: 0; border-bottom: 1px solid var(--border); }
@media (max-width: 640px) {
  .page-head .page-actions { gap: 8px; }
  .page-head .page-actions > .btn, .page-head .page-actions > .dropdown { flex: 1 1 auto; }
  .page-head .page-actions > .dropdown > .btn { width: 100%; }
  .page-head .page-actions > .segmented { flex: 1 1 100%; }
  .page-head .page-actions > .segmented > a, .page-head .page-actions > .segmented > button, .page-head .page-actions > .segmented > label { flex: 1 0 auto; justify-content: center; padding: 0 10px; }
  .page-head .page-actions > .segmented:has(> :nth-child(3)) .i { display: none; }
  .card-head { row-gap: 0; padding: 0 16px; }
  .card-head .sub { padding-block: 6px 10px; }
  .card-body { padding: 16px; }
  .toasts { inset-inline: 12px; bottom: 12px; }
  .toast { min-width: 0; max-width: none; }
}
@media (max-width: 900px), (pointer: coarse) {
  .icon-btn, .topbar .icon-btn { width: 40px; height: 40px; }
  .notif-panel .np-head { height: 44px; }
}

.notif-panel { width: 380px; max-height: 520px; flex-direction: column; padding: 0; }
.dropdown.open > .menu.notif-panel { display: flex; }
.notif-panel .np-head { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border-bottom: 1px solid var(--border-strong); font-weight: 700; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; background: var(--head-bg); color: var(--text-2); }
.notif-panel .np-list { overflow-y: auto; }
.notif { display: flex; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border-soft); cursor: pointer; }
.notif:hover { background: var(--surface-hover); }
.notif.unread { background: color-mix(in srgb, var(--primary-soft) 70%, transparent); box-shadow: inset 3px 0 0 var(--primary); }
.notif.unread:dir(rtl) { box-shadow: inset -3px 0 0 var(--primary); }
.notif .n-icon { width: 26px; height: 26px; border-radius: 2px; background: var(--surface-3); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.notif .n-title { font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.notif .n-body { font-size: 12px; color: var(--text-2); line-height: 1.4; margin-top: 1px; }
.notif .n-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.palette { width: min(660px, calc(100vw - 32px)); background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); overflow: hidden; margin-top: 12vh; }
dialog.palette-dialog { margin: 0 auto; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 48px; border-bottom: 1px solid var(--border); }
.palette-input input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 14.5px; background: transparent; color: var(--text); }
.palette-results { max-height: 420px; overflow-y: auto; padding: 4px 0; }
.palette-group { padding: 8px 14px 3px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 6px 14px; cursor: pointer; }
.palette-item.active, .palette-item:hover { background: var(--surface-hover); box-shadow: inset 3px 0 0 var(--primary); }
.palette-item .p-title { font-weight: 600; font-size: 13px; }
.palette-item .p-sub { font-size: 11.5px; color: var(--text-3); }
.palette-foot { display: flex; gap: 14px; padding: 7px 14px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-3); background: var(--surface-2); flex-wrap: wrap; }

.range-row { display: flex; align-items: center; gap: 6px; }
.range-row .input { height: 28px; text-align: center; }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; background: var(--surface); }
.toolbar .input-group { flex: 1; min-width: 220px; max-width: 520px; }
.toolbar .spacer { flex: 1; }
.card > .toolbar:first-child, .card > form:first-child > .toolbar:first-child { border-start-start-radius: calc(var(--radius-lg) - 1px); border-start-end-radius: calc(var(--radius-lg) - 1px); }
.card > .toolbar:last-child, .card > form:last-child > .toolbar:last-child { border-end-start-radius: calc(var(--radius-lg) - 1px); border-end-end-radius: calc(var(--radius-lg) - 1px); }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); background: var(--surface-2); align-items: center; }
.result-count { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.result-count strong { color: var(--text); font-variant-numeric: tabular-nums; }
.bulkbar { position: fixed; z-index: 50; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 14px; border-radius: var(--radius); background: #1d2227; color: #eef1f4; box-shadow: var(--shadow-lg); animation: toast-in .16s var(--ease); border-top: 3px solid var(--accent); max-width: calc(100vw - 24px); flex-wrap: wrap; }
.bulkbar .count { font-weight: 600; font-size: 12.5px; margin-inline-end: 8px; white-space: nowrap; }
.bulkbar .btn { background: transparent; border-color: rgba(255, 255, 255, .2); color: #eef1f4; }
.bulkbar .btn:hover { background: rgba(255, 255, 255, .1); }
.bulkbar .sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .18); margin: 0 4px; }
.bulkbar .menu { bottom: calc(100% + 8px); top: auto; color: var(--text); }
@media (max-width: 640px) {
  .toolbar { gap: 8px; padding: 12px; }
  .toolbar > .input-group { flex: 1 1 100%; min-width: 0; max-width: none !important; }
  .toolbar > .select, .toolbar > .dropdown { flex: 1 1 calc(50% - 4px); width: auto !important; min-width: 0; max-width: none !important; }
  .toolbar > .dropdown > .btn { width: 100%; justify-content: center; }
  .toolbar > [data-picker] { flex: 1 1 100%; min-width: 0; }
  .toolbar > [data-picker] .input { width: 100%; }
  .toolbar > .spacer { display: none; }
  .active-filters { padding: 10px 12px; }
  .bulkbar { padding: 6px; gap: 4px; justify-content: center; }
}

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(262px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.column { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; max-height: calc(100vh - 230px); min-height: 160px; }
.column.drag-over { border-color: var(--primary); background: var(--primary-soft); }
.column-head { display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 36px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); background: var(--head-bg); border-bottom: 1px solid var(--border-strong); }
.column-head .dot { width: 8px; height: 8px; border-radius: 1px; }
.column-head .n { margin-inline-start: auto; font-size: 11.5px; color: var(--text-3); font-weight: 700; }
.column-body { padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 60px; }
.mcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 10px; cursor: grab; transition: border-color .1s; position: relative; }
.mcard:hover { border-color: #8d959e; }
.mcard.dragging { opacity: .5; }
.mcard.is-focus { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.mcard-names { display: flex; flex-direction: column; gap: 1px; font-size: 13px; font-weight: 600; }
.mcard-names .amp { color: var(--text-3); font-weight: 400; font-size: 11px; }
.mcard-meta { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); }
.mcard-step { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.mcard-step.overdue { color: var(--red); }
.side-dots { display: inline-flex; gap: 3px; }
.side-dot { width: 7px; height: 7px; border-radius: 1px; background: var(--border-strong); }
.side-dot.contacted { background: var(--blue); } .side-dot.considering { background: var(--amber); }
.side-dot.yes { background: var(--green); } .side-dot.no { background: var(--red); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: flex; gap: 12px; padding: 0 0 14px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 11px; top: 24px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .t-icon { width: 23px; height: 23px; border-radius: 2px; background: var(--surface-2); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; flex: none; border: 1px solid var(--border); }
.timeline .t-icon .i { width: 12px; height: 12px; }
.timeline .t-body { flex: 1; min-width: 0; padding-top: 2px; }
.timeline .t-title { font-size: 12.5px; }
.timeline .t-meta { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.timeline .t-note { margin-top: 6px; padding: 7px 10px; background: var(--surface-2); border: 1px solid var(--border); border-inline-start: 3px solid var(--border-strong); font-size: 12.5px; white-space: pre-wrap; }

.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--border-soft); min-width: 0; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--surface-hover); }
.callout { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); border-inline-start: 4px solid var(--border-strong); font-size: 12.5px; }
.callout .i { margin-top: 1px; color: var(--text-3); }
.callout.info { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 25%, transparent); border-inline-start-color: var(--blue); } .callout.info .i { color: var(--blue); }
.callout.warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 25%, transparent); border-inline-start-color: var(--amber); } .callout.warn .i { color: var(--amber); }
.callout.danger { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 25%, transparent); border-inline-start-color: var(--red); } .callout.danger .i { color: var(--red); }
.callout.success { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 25%, transparent); border-inline-start-color: var(--green); } .callout.success .i { color: var(--green); }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.dropzone { border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 26px; text-align: center; color: var(--text-2); background: var(--surface-2); cursor: pointer; transition: background .1s, border-color .1s; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: var(--text-2); }
.legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 1px; margin-inline-end: 6px; vertical-align: middle; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 32%) 1fr 54px; gap: 10px; align-items: center; font-size: 12.5px; padding: 4px 0; }
.bar-row .bar { height: 10px; background: var(--surface-3); overflow: hidden; }
.bar-row .bar span { display: block; height: 100%; background: var(--primary); }
.bar-row .v { text-align: end; font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600; }
.stack-bar { display: flex; height: 10px; overflow: hidden; background: var(--surface-3); gap: 1px; }
.stack-bar span { height: 100%; }
.chart-box { position: relative; width: 100%; }
.chart-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-box .axis text { font-size: 10.5px; fill: var(--text-3); }
.chart-box .grid-line { stroke: var(--border); stroke-dasharray: 0; }

.sticky-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sticky { border-radius: var(--radius); padding: 12px; min-height: 150px; display: flex; flex-direction: column; gap: 8px; border: 1px solid rgba(0, 0, 0, .1); border-top-width: 4px; cursor: grab; }
.sticky-yellow { background: #fbf6e3; border-top-color: #c9a53a; } .sticky-green { background: #eaf3ec; border-top-color: #4d8f63; } .sticky-blue { background: #e9eef6; border-top-color: #3f679f; }
.sticky-pink { background: #f6e9ee; border-top-color: #a8466c; } .sticky-purple { background: #eeeaf5; border-top-color: #6a52a0; } .sticky-orange { background: #f7ece0; border-top-color: #b8752f; } .sticky-gray { background: #eef0f2; border-top-color: #79828b; }
[data-theme="dark"] .sticky { filter: brightness(.32) saturate(1.5); color: #fff; }
.sticky textarea, .sticky input { background: transparent; border: 0; resize: none; font: inherit; color: inherit; outline: none; width: 100%; }
.sticky .s-title { font-weight: 600; font-size: 13px; }
.sticky .s-body { flex: 1; font-size: 12.5px; white-space: pre-wrap; min-height: 60px; }
.sticky .s-foot { display: flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(0, 0, 0, .5); }
.color-dot { width: 14px; height: 14px; border-radius: 2px; border: 1px solid rgba(0, 0, 0, .2); cursor: pointer; padding: 0; }

.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.error-card { max-width: 460px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--primary); padding: 32px 28px; }
.error-card .code { font-family: var(--font-mono); font-size: 44px; font-weight: 500; color: var(--primary); line-height: 1; letter-spacing: .04em; }

.mobile-only { display: none; }
@media (max-width: 900px) {
  .shell, .shell.collapsed { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "main"; }
  .sidebar:dir(rtl) { transform: translateX(100%); }
  .shell.mobile-open .sidebar { transform: none; }
  .mobile-only { display: inline-flex; }
  .content { padding: 0 14px 32px; }
  .page-head { margin: 0 0 16px; }
  .page-head h1 { font-size: 22px; }
  .page-tabs { margin: 0 0 16px; }
  .page-head .page-actions { margin-inline-start: 0; width: 100%; }
  .grid-2, .grid-3, .grid-4, .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .hide-sm { display: none !important; }
  .kv { grid-template-columns: minmax(110px, 40%) 1fr; }
  .stat { flex-basis: 140px; padding: 10px 12px; }
  .stat-value { font-size: 19px; }
  .toolbar .input-group { min-width: 0; flex-basis: 100%; max-width: none; }
  .modal-body { padding: 14px; }
  .bulkbar { left: 12px; right: 12px; transform: none; bottom: 12px; }
}
@media print {
  .sidebar, .topbar, .page-actions, .no-print, .bulkbar, .toasts { display: none !important; }
  .content { padding: 0; }
  .page-head { margin: 0 0 12px; padding: 0 0 8px; }
  .card { break-inside: avoid; }
  body { background: #fff; }
}

.auth-links { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 12.5px; color: var(--text-2); }
.auth-links a { color: var(--primary); font-weight: 600; }
.code-input { letter-spacing: .5em; text-align: center; font-family: var(--font-mono); font-size: 22px !important; height: 50px !important; }
.mail-art { width: 48px; height: 48px; border-radius: 2px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 6px; }
.strength span { height: 4px; background: var(--surface-3); }
.strength[data-score="1"] span:nth-child(-n+1) { background: var(--red); }
.strength[data-score="2"] span:nth-child(-n+2) { background: var(--amber); }
.strength[data-score="3"] span:nth-child(-n+3) { background: #4f8f3a; }
.strength[data-score="4"] span { background: var(--green); }

.record-head { overflow: visible; margin: 0 0 20px; }
.record-head .facts { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.record-head .facts { overflow: hidden; }
.rh-main { display: flex; gap: 18px; padding: 16px 24px 14px; align-items: flex-start; flex-wrap: wrap; }
.rh-eyebrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.rh-name { font-family: var(--font-serif); font-size: 30px; font-weight: 500; line-height: 1.15; color: var(--text); text-align: start; }
.rh-name .strong { font-weight: 700; }
.rh-parents { font-family: var(--font-he); font-size: 14px; color: var(--text-2); margin-top: 4px; }
.rh-actions { display: flex; gap: 6px; align-items: center; margin-inline-start: auto; flex-wrap: wrap; }
.badge-btn { display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--text-3); }
.badge-btn:hover .badge { filter: brightness(.95); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-ico { width: 28px; height: 28px; border-radius: 2px; background: var(--surface-2); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; flex: none; border: 1px solid var(--border); }
.contact-list .list-row { padding: 8px 14px; }
.score-ring { min-width: 36px; height: 24px; padding: 0 6px; border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; font-variant-numeric: tabular-nums; border: 1px solid; }
.score-green { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-soft); }
.score-amber { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: var(--amber-soft); }
.score-gray { color: var(--gray); border-color: var(--border-strong); background: var(--surface-2); }
.note-card.pinned { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.inline-edit { cursor: text; border-radius: 2px; padding: 1px 4px; margin: -1px -4px; transition: background .1s; display: inline-block; min-width: 40px; }
.inline-edit:hover { background: var(--surface-hover); box-shadow: inset 0 0 0 1px var(--border-strong); }
.inline-edit.editing { display: block; padding: 0; margin: 0; background: none; box-shadow: none; }

.ftree { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 8px 0 4px; }
.ftree-row { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.ftree-row.children { gap: 8px; }
.fnode { min-width: 170px; max-width: 220px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: center; }
.fnode.zeide { background: var(--surface-2); }
.fnode.parent { border-color: var(--border-strong); }
.fnode.child { min-width: 120px; transition: border-color .1s; }
.fnode.child:hover { border-color: var(--text-3); }
.fnode.child.male { border-top: 3px solid var(--male); }
.fnode.child.female { border-top: 3px solid var(--female); }
.fnode.self { background: var(--primary-soft); border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.fn-role { font-size: 10px; color: var(--text-3); font-weight: 700; letter-spacing: .04em; }
.fn-name { font-size: 14.5px; font-weight: 600; margin-top: 2px; }
.fn-sub { font-size: 11px; color: var(--text-3); display: block; margin-top: 2px; }
.fnode-join { color: var(--accent); font-size: 12px; }
.ftree-links { height: 22px; position: relative; width: 100%; max-width: 420px; }
.ftree-links.two span { position: absolute; top: 0; height: 100%; border-inline-start: 1px solid var(--border-strong); }
.ftree-links.two span:first-child { inset-inline-start: 25%; }
.ftree-links.two span:last-child { inset-inline-start: 75%; }
.ftree-links.one span { position: absolute; top: 0; height: 100%; inset-inline-start: 50%; border-inline-start: 1px solid var(--border-strong); }
.is-loading { opacity: .55; transition: opacity .15s; pointer-events: none; }

.table.registry td { white-space: nowrap; }
.table.registry td.wrap-ok { white-space: normal; }
.table.registry .cell-stack { max-width: 230px; }
.table.registry .he { font-size: 13px; }
.table.registry .cell-stack .secondary.he { font-size: 11.5px; }
.table.registry:dir(rtl) th, .table.registry:dir(rtl) td { text-align: right; }
.table.registry:dir(rtl) .col-actions { text-align: left; }
.table.registry:dir(rtl) .cell-stack { align-items: flex-start; }
.table.registry .cell-name { min-width: 230px; }
.table.registry .cell-name .person-name { font-size: 14px; }
.table.registry .cell-name .person-name .ln { font-weight: 700; }
.table.registry .cell-name .person-name .fn { font-weight: 500; }
.reg-wrap { direction: rtl; }
.reg-wrap .pager { direction: ltr; }


.dossier { font-family: var(--font-he); }
.dossier .btn, .dossier .menu, .dossier .badge, .dossier .tab .ds-tab-en, .dossier .ds-en, .dossier .ltr { font-family: var(--font-ui); }
.ds-head { position: relative; display: flex; align-items: flex-start; gap: 24px; padding: 26px 28px 22px; background: linear-gradient(180deg, #fffdf9 0%, #ffffff 100%); border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-xs); overflow: visible; }
.ds-head::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: var(--radius-xl) var(--radius-xl) 0 0; background: linear-gradient(90deg, #8f6d34, #c4a265 50%, #8f6d34); }
[data-theme="dark"] .ds-head { background: var(--surface); }
.ds-id { display: flex; align-items: flex-start; gap: 18px; min-width: 0; flex: 1; }
.ds-mono { width: 76px; height: 76px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--male-soft); color: var(--male); font-family: var(--font-serif); font-size: 30px; font-weight: 700; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px color-mix(in srgb, var(--male) 35%, transparent); overflow: hidden; }
.ds-mono.female { background: var(--female-soft); color: var(--female); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px color-mix(in srgb, var(--female) 35%, transparent); }
.ds-mono img { width: 100%; height: 100%; object-fit: cover; }
.ds-mono .he { font-family: var(--font-serif); }
.ds-id-text { min-width: 0; flex: 1; }
.ds-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ds-code { font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 0 7px; line-height: 21px; font-variant-numeric: tabular-nums; }
.ds-gender { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--radius-lg); background: var(--male-soft); color: var(--male); font-size: 12.5px; font-weight: 700; }
.ds-gender.female { background: var(--female-soft); color: var(--female); }
.ds-chip { display: inline-flex; align-items: baseline; gap: 3px; height: 22px; padding: 0 9px; border-radius: var(--radius-lg); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); line-height: 20px; }
.ds-chip b { font-family: var(--font-ui); color: var(--text); }
.ds-name { font-family: var(--font-serif); font-size: 40px; line-height: 1.1; font-weight: 500; color: var(--text); letter-spacing: 0; }
.ds-name .ln { font-weight: 800; }
.ds-lineage { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 8px; font-size: 16px; color: var(--text-2); }
.ds-lineage b { font-weight: 600; color: var(--text); }
.ds-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: none; }
.ds-facts { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface-2); border: 1px solid var(--border); border-radius: 0 0 var(--radius-xl) var(--radius-xl); box-shadow: var(--shadow-xs); }
.ds-fact { display: flex; flex-direction: column; gap: 3px; padding: 12px 18px 13px; border-inline-start: 1px solid var(--border-soft); min-width: 0; }
.ds-fact:first-child { border-inline-start: 0; }
.ds-fact-label { font-size: 12px; font-weight: 600; color: var(--text-3); display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.ds-fact-label em { font-family: var(--font-ui); font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #9aa2aa; }
.ds-fact-value { font-size: 15px; font-weight: 600; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.ds-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; margin-top: 20px; }
.ds-main { min-width: 0; }
.ds-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--appbar-h) + 16px); }
.ds-tabs { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0 8px; box-shadow: var(--shadow-xs); }
.ds-tabs .tab { font-family: var(--font-he); font-size: 14.5px; font-weight: 600; height: 50px; gap: 6px; }
.ds-tab-en { font-size: 11px; font-weight: 500; color: var(--text-3); }
.ds-panel { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.ds-panel[hidden] { display: none; }
.ds-section { overflow: hidden; }
.ds-section-head { display: flex; align-items: center; gap: 10px; padding: 0 20px; min-height: 52px; border-bottom: 1px solid var(--border-soft); }
.ds-section-head h3 { display: flex; align-items: baseline; gap: 9px; margin-inline-end: auto; padding: 12px 0; }
.ds-section-head .ds-yi { font-family: var(--font-he); font-size: 17px; font-weight: 700; color: var(--text); }
.ds-section-head .ds-en { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.ds-section-head .ds-count { font-family: var(--font-ui); font-size: 12px; font-weight: 700; color: var(--text-3); background: var(--surface-3); border-radius: var(--radius-lg); padding: 0 8px; line-height: 20px; }
.ds-grid { display: grid; gap: 0; }
.ds-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-field { padding: 14px 20px 15px; border-bottom: 1px solid var(--border-soft); border-inline-start: 1px solid var(--border-soft); min-width: 0; }
.ds-grid.cols-3 > .ds-field:nth-child(3n + 1), .ds-grid.cols-2 > .ds-field:nth-child(2n + 1) { border-inline-start: 0; }
.ds-field.wide { grid-column: 1 / -1; border-inline-start: 0; }
.ds-label { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin-bottom: 6px; line-height: 1.25; }
.ds-label .ds-yi { font-size: 13px; font-weight: 600; color: var(--text-3); }
.ds-label .ds-en { font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #a3aab1; }
.ds-value { font-size: 16px; font-weight: 500; color: var(--text); line-height: 1.45; overflow-wrap: anywhere; }
.ds-value .ltr { font-family: var(--font-ui); font-size: 14.5px; }
.ds-field.wide .ds-value { font-size: 15px; line-height: 1.6; }
.ds-dash { color: #b3bac1; font-weight: 400; }
.ds-field.is-empty .ds-label .ds-yi { color: #9aa2aa; }
.ds-value [data-inline] { display: inline-block; min-width: 48px; padding: 1px 6px; margin: -1px -6px; border-radius: var(--radius-sm); cursor: text; transition: background .1s, box-shadow .1s; }
.ds-value [data-inline]:hover { background: var(--surface-hover); box-shadow: inset 0 0 0 1px var(--border-strong); }
.ds-value [data-inline].editing { display: block; padding: 0; margin: 0; background: none; box-shadow: none; }
.ds-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ds-empty { padding: 16px 20px; color: var(--text-3); font-size: 13.5px; }
.ds-internal { border-color: color-mix(in srgb, var(--primary) 25%, var(--border)); }
.ds-internal .ds-section-head { background: var(--primary-soft); }
.ds-side .ds-section-head { min-height: 46px; padding: 0 16px; }
.ds-side .ds-section-head .ds-yi { font-size: 15px; }
.ds-side-body { padding: 14px 16px 16px; }
.ds-contacts .list-row { padding: 10px 16px; }
.ds-contact-label { font-size: 12px; font-weight: 600; color: var(--text-3); }
.ds-contact-label em { font-family: var(--font-ui); font-style: normal; font-size: 10.5px; color: #9aa2aa; margin-inline-start: 4px; }
.ds-phone { display: block; font-family: var(--font-ui); font-size: 15px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
a.ds-phone:hover { color: var(--primary); }
.ds-sugg-name { display: block; font-size: 15px; }
.ds-record .ds-field { padding: 11px 16px; }
.ds-record .ds-value { font-size: 14px; }
.dossier .list-row { gap: 12px; }
.dossier .callout { font-family: var(--font-ui); }
@media (max-width: 1280px) {
  .ds-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ds-fact:nth-child(5) { border-inline-start: 0; }
  .ds-fact:nth-child(n + 5) { border-top: 1px solid var(--border-soft); }
}
@media (max-width: 1100px) {
  .ds-body { grid-template-columns: minmax(0, 1fr); }
  .ds-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 900px) {
  .ds-head { flex-direction: column; padding: 22px 16px 16px; gap: 14px; }
  .ds-name { font-size: 30px; }
  .ds-mono { width: 56px; height: 56px; font-size: 22px; }
  .ds-actions { width: 100%; }
  .ds-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-grid.cols-3 > .ds-field:nth-child(3n + 1) { border-inline-start: 1px solid var(--border-soft); }
  .ds-grid.cols-3 > .ds-field:nth-child(2n + 1) { border-inline-start: 0; }
  .ds-pair { grid-template-columns: minmax(0, 1fr); }
  .ds-side { grid-template-columns: minmax(0, 1fr); }
  .ds-tabs .tab { height: 44px; padding: 0 10px; }
  .ds-tab-en { display: none; }
}
@media (max-width: 560px) {
  .ds-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-fact:nth-child(n) { border-inline-start: 1px solid var(--border-soft); border-top: 1px solid var(--border-soft); }
  .ds-fact:nth-child(2n + 1) { border-inline-start: 0; }
  .ds-fact:nth-child(-n + 2) { border-top: 0; }
  .ds-grid.cols-3, .ds-grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .ds-field { border-inline-start: 0 !important; padding: 12px 16px; }
  .ds-section-head { padding: 0 16px; }
}
@media (max-width: 640px) {
  .ds-section-head { flex-wrap: wrap; gap: 4px 10px; }
  .ds-section-head h3 { flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; padding: 10px 0; }
  .ds-section-head .ds-yi { font-size: 16px; }
  .ds-tabs { padding: 0 4px; }
  .ds-tabs .tab { padding: 0 12px; }
}

.tab-views { margin-inline-start: auto; }
.tab-views > .tab { color: var(--text-3); }
.view-row { padding: 4px 6px 4px 10px; }
.view-row a { padding: 3px 0; }
.view-row a:hover { color: var(--primary); }

.cf-rtl { font-family: var(--font-he); }
.cf-rtl .btn, .cf-rtl .menu, .cf-rtl .ds-en, .cf-rtl .cf-en, .cf-rtl .cf-chip-en, .cf-rtl .hint, .cf-rtl input[type="date"], .cf-rtl .ltr, .cf-side { font-family: var(--font-ui); }
.cf-label { display: flex; flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.25; }
.field > label.cf-label { align-items: flex-start; }
.cf-label .cf-yi { font-family: var(--font-he); font-size: 14px; font-weight: 600; color: var(--text); }
.cf-label .cf-en { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.cf-label .cf-en:only-child { font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--text-2); }
.cf-rtl .input, .cf-rtl .select, .cf-rtl .textarea { font-size: 15px; }
.cf-rtl .input[type="tel"], .cf-rtl .input[type="email"] { font-family: var(--font-ui); font-size: 14px; }
.cf-chip-en { font-size: 11px; opacity: .7; }
.cf-rtl .chip-select label > span .he { font-size: 14px; }
.cf-rtl .form-grid { gap: 16px 20px; }
.cf-title { font-family: var(--font-he); }
.cf-side .menu-item .he { font-size: 12.5px; }

.dossier :is(p, .small, .tiny, .muted, .hint, .sub, .ds-empty, .person-meta, .t-title, .t-meta, .empty h3, .fn-role), .cf-rtl :is(p, .hint, .tiny) { unicode-bidi: plaintext; }


.table.registry .cell-name .person-name .ln { font-weight: 700; }
.table.registry .cell-name .person-name .fn { font-weight: 500; }
.ds-sugg-name { font-family: var(--font-serif); }

.spin { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.is-busy { position: relative; pointer-events: none; }
.is-busy > :not(.upl-busy) { visibility: hidden; }
.upl-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; visibility: visible; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.dropzone.is-busy, [data-dropzone].is-busy { background: var(--surface-2); }
.upl-preview { position: relative; overflow: hidden; }
.upl-preview img { width: 100%; height: 100%; object-fit: cover; opacity: .6; filter: saturate(.8); }
.upl-spot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .35); color: var(--text); }
.upl-spot .spin { width: 22px; height: 22px; border-width: 2.5px; }
form.is-uploading [type="submit"]:not(.is-busy) { pointer-events: none; opacity: .6; }

.nav-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200; background: linear-gradient(90deg, #8f6d34, #c4a265, #e0c58e); box-shadow: 0 0 8px rgba(196, 162, 101, .6); opacity: 0; pointer-events: none; }
.nav-progress.run { opacity: 1; animation: nav-run 8s cubic-bezier(.1, .7, .2, 1) forwards; }
.nav-progress.done { opacity: 0; width: 100%; transition: opacity .3s .15s, width .15s; }
@keyframes nav-run { 0% { width: 0; } 20% { width: 45%; } 60% { width: 75%; } 100% { width: 92%; } }
.sk { display: block; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-3) 0%, #f6f7f8 40%, var(--surface-3) 80%); background-size: 300% 100%; animation: sk-shimmer 1.3s ease-in-out infinite; }
[data-theme="dark"] .sk { background: linear-gradient(90deg, var(--surface-3) 0%, #2d333a 40%, var(--surface-3) 80%); background-size: 300% 100%; }
@keyframes sk-shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.main.is-navigating #main { display: none; }
.content-skeleton { padding: 0 28px 48px; }
.sk-head { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 22px; }
.sk-title { width: 260px; max-width: 70%; height: 28px; }
.sk-sub { width: 380px; max-width: 85%; height: 14px; }
.sk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 18px; overflow: hidden; }
.sk-stat { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-inline-end: 1px solid var(--border-soft); }
.sk-stat:last-child { border-inline-end: 0; }
.sk-num { width: 70px; height: 24px; }
.sk-line { height: 12px; }
.sk-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px 0; }
.sk-row { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 18px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.sk-row:last-child { border-bottom: 0; }
.results-skeleton { position: absolute; inset: 0; z-index: 4; background: var(--surface); padding: 4px 0; overflow: hidden; }
.results-skeleton .sk-row { grid-template-columns: 2fr repeat(5, 1fr); }
#results.has-skeleton { position: relative; min-height: 360px; }
#results.has-skeleton.is-loading { opacity: 1; }
@media (max-width: 900px) {
  .content-skeleton { padding: 0 14px 32px; }
  .sk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sk-row, .results-skeleton .sk-row { grid-template-columns: 2fr 1fr 1fr; }
  .sk-row .sk:nth-child(n + 4) { display: none; }
}

.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.shell.collapsed { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; min-width: 0; display: flex; flex-direction: column; background: var(--sidebar-bg); border-inline-end: 1px solid var(--sidebar-border); z-index: 40; }
.sidebar-head { flex: none; display: flex; align-items: center; gap: 4px; height: var(--topbar-h); padding: 0 10px 0 12px; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; height: 44px; padding: 0 6px; border-radius: var(--radius); color: var(--text); transition: background .12s; }
.sidebar-brand:hover { background: var(--surface-3); }
.brand-logo img { height: 32px; width: auto; display: block; }
.brand-mark { display: none; width: 30px; height: 30px; border-radius: var(--radius); overflow: hidden; flex: none; box-shadow: 0 1px 2px rgba(17, 19, 24, .18), 0 0 0 1px rgba(17, 19, 24, .06); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-text .p { font-size: 14px; font-weight: 600; line-height: 18px; letter-spacing: -.01em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text .t { font-size: 11.5px; font-weight: 500; line-height: 14px; letter-spacing: .02em; color: var(--text-3); white-space: nowrap; }
.sidebar-collapse { width: 28px; height: 28px; color: #9ba1ac; opacity: 0; transition: opacity .12s; }
.sidebar:hover .sidebar-collapse, .sidebar-collapse:focus-visible { opacity: 1; }
@media (hover: none) { .sidebar-collapse { opacity: 1; } }
.sidebar-nav { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px 16px; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.sidebar-nav:hover { scrollbar-color: #d1d5db transparent; }
.nav-group + .nav-group { margin-top: 10px; }
.nav-group-label { display: flex; align-items: center; min-height: 28px; padding: 0 8px; font-size: 12px; font-weight: 500; line-height: 16px; color: var(--text-3); white-space: nowrap; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; margin: 1px 0; border-radius: var(--radius); color: var(--sidebar-text); font-size: 13.5px; font-weight: 500; line-height: 1; white-space: nowrap; transition: background .12s, color .12s; }
.nav-item > span:not(.badge-count) { min-width: 0; overflow: hidden; text-overflow: ellipsis; line-height: 18px; }
.nav-item .i { width: 16px; height: 16px; color: var(--sidebar-muted); transition: color .12s; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item:hover .i { color: var(--sidebar-text); }
.nav-item:active { background: #eef0f3; }
.nav-item.active { background: var(--sidebar-active); color: #4338ca; font-weight: 600; }
.nav-item.active .i { color: var(--primary); }
.nav-item .badge-count { margin-inline-start: auto; min-width: 20px; height: 18px; padding: 0 6px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; border-radius: var(--radius-pill); background: #eef0f3; color: var(--text-2); flex: none; }
.nav-item.active .badge-count { background: var(--surface); color: #4338ca; box-shadow: inset 0 0 0 1px #e0e7ff; }
.sidebar-foot { flex: none; border-top: 1px solid var(--sidebar-border); padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.me-dropdown { display: block; }
.me-button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px; border-radius: var(--radius); background: none; border: 0; color: var(--text); text-align: start; cursor: pointer; transition: background .12s; }
.me-button:hover, .me-dropdown.open .me-button { background: var(--surface-3); }
.me-button .au-mono { width: 30px; height: 30px; border-radius: 50%; background: #e0e7ff; color: #4338ca; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; flex: none; overflow: hidden; }
.me-button .au-mono img { width: 100%; height: 100%; object-fit: cover; }
.me-button .who { min-width: 0; flex: 1; line-height: 1.3; }
.me-button .n { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-button .r { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-button > .i { color: #9ba1ac; }
.me-menu { min-width: 240px; }
.shell.collapsed .brand-logo, .shell.collapsed .brand-text, .shell.collapsed .nav-group-label, .shell.collapsed .nav-item > span, .shell.collapsed .nav-item .badge-count, .shell.collapsed .me-button .who, .shell.collapsed .me-button > .i { display: none; }
.shell.collapsed .brand-mark { display: block; }
.shell.collapsed .sidebar-head { justify-content: center; padding: 0 12px; position: relative; }
.shell.collapsed .sidebar-brand { flex: none; width: 40px; padding: 0; justify-content: center; }
.shell.collapsed .sidebar-collapse { position: absolute; inset-inline-start: 12px; width: 40px; height: 40px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.shell.collapsed .sidebar-head:hover .brand-mark { opacity: 0; }
.shell.collapsed .nav-item { width: 40px; height: 36px; padding: 0; justify-content: center; }
.shell.collapsed .nav-group + .nav-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-soft); }
.shell.collapsed .me-button { width: 40px; min-height: 40px; padding: 4px; justify-content: center; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 32px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: saturate(1.8) blur(12px); backdrop-filter: saturate(1.8) blur(12px); border-bottom: 1px solid var(--border); }
[data-theme="dark"] .topbar { background: rgba(26, 29, 33, .9); }
.topbar-brand img { height: 28px; width: auto; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--text-3); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a, .crumbs .current { display: inline-flex; align-items: center; height: 28px; padding: 0 6px; border-radius: var(--radius); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; min-width: 0; transition: color .12s, background .12s; }
.crumbs a:hover { color: var(--text); background: var(--surface-3); }
.crumbs .crumb-root { color: var(--text-2); font-weight: 550; flex: none; margin-inline-start: -6px; }
.crumbs .current { color: var(--text); font-weight: 600; }
.crumbs .i { color: #d1d5db; width: 14px; height: 14px; flex: none; }
.crumbs:dir(rtl) .i { transform: scaleX(-1); }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.topbar-date { font-size: 12.5px; color: var(--text-3); white-space: nowrap; padding: 0 4px; }
.topbar-date .he { font-family: var(--font-he); font-weight: 500; }
.search-trigger { display: flex; align-items: center; gap: 8px; width: 280px; height: 34px; padding: 0 6px 0 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xs); color: var(--text-3); font-size: 13px; text-align: start; cursor: pointer; transition: border-color .12s, color .12s; }
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-2); }
.search-trigger .label-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-trigger .kbd { margin-inline-start: auto; }
.topbar .icon-btn { width: 34px; height: 34px; border-radius: var(--radius); color: var(--text-2); }
.topbar .icon-btn:hover { background: var(--surface-3); color: var(--text); }
.topbar .icon-btn .pip { border-color: var(--surface); background: var(--primary); }
.content { padding: 24px 32px 48px; }
.content > :first-child:not(.page-head):not(.record-head):not(.page-band) { margin-top: 0; }
.page-head { margin: 0 0 24px; padding: 0; align-items: flex-start; }
.page-head h1 { font-size: 22px; font-weight: 650; line-height: 30px; letter-spacing: -.015em; }
.page-head .page-sub { font-size: 13px; line-height: 18px; margin-top: 4px; }
.tab.active { color: var(--text); border-bottom-color: var(--primary); }
.tab.active .i { color: var(--primary); }
.nav-progress { background: linear-gradient(90deg, #6366f1, #818cf8, #a5b4fc); box-shadow: 0 0 8px rgba(99, 102, 241, .5); }
@media (max-width: 1100px) {
  .search-trigger { width: 200px; }
  .topbar-date { display: none; }
}
@media (max-width: 900px) {
  .shell, .shell.collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(280px, 86vw); height: auto; transform: translateX(-100%); transition: transform .18s var(--ease); box-shadow: var(--shadow-lg); }
  .sidebar:dir(rtl) { transform: translateX(100%); }
  .shell.mobile-open .sidebar { transform: none; }
  .shell.mobile-open .main::before { content: ""; position: fixed; inset: 0; background: rgba(17, 19, 24, .38); z-index: 39; }
  .shell.collapsed .brand-logo, .shell.collapsed .brand-text, .shell.collapsed .nav-group-label, .shell.collapsed .nav-item > span, .shell.collapsed .nav-item .badge-count, .shell.collapsed .me-button .who { display: revert; }
  .shell.collapsed .brand-mark { display: none; }
  .shell.collapsed .nav-item { width: auto; height: 32px; padding: 0 8px; justify-content: flex-start; }
  .topbar { padding: 0 12px; gap: 8px; }
  .crumbs { display: none; }
  .search-trigger { width: 36px; padding: 0; justify-content: center; border-color: transparent; box-shadow: none; }
  .search-trigger .label-text, .search-trigger .kbd { display: none; }
  .content { padding: 16px 14px 32px; }
}
.nav-scrim { display: none; }
@media (max-width: 900px) {
  .sidebar { box-shadow: none; visibility: hidden; transition: transform .2s var(--ease), visibility 0s linear .2s; }
  .shell.mobile-open .sidebar { visibility: visible; box-shadow: var(--shadow-lg); transition: transform .2s var(--ease); }
  .shell.mobile-open .main::before { content: none; }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 39; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: rgba(17, 19, 24, .4); opacity: 0; visibility: hidden; cursor: pointer; transition: opacity .2s, visibility 0s linear .2s; -webkit-tap-highlight-color: transparent; }
  .shell.mobile-open .nav-scrim { opacity: 1; visibility: visible; transition: opacity .2s; }
  html:has(.shell.mobile-open) { overflow: hidden; }
  .sidebar-head { padding: 0 8px 0 12px; }
  .sidebar-nav { padding: 4px 12px 12px; }
  .nav-item, .shell.collapsed .nav-item { height: 42px; font-size: 14.5px; }
  .nav-group + .nav-group { margin-top: 12px; }
  .me-button { min-height: 52px; }
  .topbar { gap: 4px; padding: 0 8px 0 6px; }
  .topbar-brand { display: inline-flex; align-items: center; height: 40px; padding: 0 4px; }
  .topbar .icon-btn, .search-trigger { width: 40px; height: 40px; }
}
@media (pointer: coarse) {
  .topbar .icon-btn { width: 40px; height: 40px; }
}
@media (max-width: 640px) {
  .input, .select, .textarea, .cf-rtl .input, .cf-rtl .select, .cf-rtl .textarea, .cf-rtl .input[type="tel"], .cf-rtl .input[type="email"], .palette-input input, .sticky textarea, .sticky input { font-size: 16px; }
  .content { padding: 16px 16px 40px; }
  .page-head h1 { font-size: 22px; line-height: 28px; }
  .palette { margin-top: 8px; width: calc(100vw - 16px); }
  .palette-results { max-height: calc(100dvh - 140px); }
  .palette-item { min-height: 44px; }
  .palette-foot { display: none; }
}


:root { --radius-pill: 999px; }
.avatar.male, .avatar.female, .avatar.brand { background: var(--surface-3); color: var(--text-2); border-color: var(--border); }
.ds-mono, .ds-mono.female { background: var(--surface-3); color: var(--text-2); box-shadow: 0 0 0 1px var(--border); }
.me-button .au-mono { background: var(--surface-3); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }
.cd-meter > span { background: var(--text-2); }
.cd-meter.is-full > span { background: var(--green); }
