:root {
  /* EIS palette: institutional blue over a cool, multitone glass backdrop.
     Data surfaces remain opaque so operational tables retain full contrast. */
  --canvas: #f4f6f9;
  --canvas-end: #eceff6;
  --surface: rgba(255, 255, 255, 0.68);
  --surface-muted: rgba(250, 251, 252, 0.68);
  --surface-strong: rgba(234, 242, 253, 0.82);
  --data-surface: #ffffff;
  --data-surface-muted: #fafbfc;
  --glass-blur: saturate(180%) blur(20px);
  --glass-blur-strong: saturate(200%) blur(34px);
  --glass-border: rgba(255, 255, 255, 0.70);
  --ink: #111827;
  --ink-soft: #4b5563;
  --muted: #4b5563;
  --muted-2: #8b93a1;
  --line: #e4e8ee;
  --line-strong: #d8dee7;
  --accent: #1b5fb8;
  --accent-dark: #154c94;
  --accent-soft: rgba(27, 95, 184, 0.12);
  --blue: #2a78d6;
  --blue-soft: rgba(42, 120, 214, 0.12);
  --amber: #b47600;
  --amber-soft: rgba(180, 118, 0, 0.13);
  --red: #d03b3b;
  --red-soft: rgba(208, 59, 59, 0.12);
  --violet: #4a3aa7;
  --violet-soft: rgba(74, 58, 167, 0.12);
  --ok: #0ca30c;
  --on-accent: #ffffff;

  /* derived surfaces */
  --row-hover: #f3f7fd;
  --grid-head: #fafbfc;
  --line-hover: #c7d0dc;
  --ring-track: #d3e4fb;
  --edit-hatch: #eef1f5;
  --switch-off: #c3cad4;
  --avatar-bg: #eef1f5;
  --avatar-ink: #4b5563;

  /* accent + status tints */
  --accent-tint: #eaf2fd;
  --accent-line: #d3e4fb;
  --accent-line-strong: #6f93c4;
  --accent-ink-soft: #315e8c;
  --amber-tint: #fdf3dd;
  --amber-line: #e4c478;
  --red-line: #efb9b9;
  --blue-ink: #154c94;

  /* avatar palettes */
  --avatar-teal-bg: #e5f7f0;
  --avatar-teal-ink: #137d5c;
  --avatar-rose-bg: #fbe9e9;
  --avatar-rose-ink: #b32f2f;
  --avatar-blue-bg: #eaf2fd;
  --avatar-blue-ink: #1b5fb8;
  --avatar-violet-bg: #eeecfa;
  --avatar-violet-ink: #4a3aa7;
  --avatar-gold-bg: #fdf3dd;
  --avatar-gold-ink: #936200;
  --avatar-green-bg: #e7f7e7;
  --avatar-green-ink: #0a7a0a;

  /* integration marks */
  --mark-slate-bg: #eef1f5;
  --mark-slate-ink: #4b5563;
  --mark-blue-bg: #eaf2fd;
  --mark-blue-ink: #1b5fb8;
  --mark-red-bg: #fbe9e9;
  --mark-red-ink: #b32f2f;
  --mark-violet-bg: #eeecfa;
  --mark-violet-ink: #4a3aa7;
  --mark-teal-bg: #e5f7f0;
  --mark-teal-ink: #137d5c;
  --mark-gold-bg: #fdf3dd;
  --mark-gold-ink: #936200;
  --mark-steel-bg: #e8eef6;
  --mark-steel-ink: #41506a;

  /* tabel day-cell tints — data surfaces, so they must stay opaque enough
     to read against the grid rather than the ambient backdrop */
  --cell-leave: rgba(253, 243, 221, 0.68);
  --cell-trip: rgba(234, 242, 253, 0.76);
  --cell-sick: rgba(238, 236, 250, 0.72);
  --cell-error: rgba(251, 233, 233, 0.72);
  --cell-draft: rgba(229, 247, 240, 0.68);
  --proposal-amber: rgba(253, 243, 221, 0.86);
  --proposal-accent: rgba(234, 242, 253, 0.90);
  --actionbar-bg: rgba(244, 246, 249, 0.96);

  /* glass pane tints (chrome panels that sample the backdrop) */
  --pane-top: rgba(255, 255, 255, 0.62);
  --pane-bottom: rgba(255, 255, 255, 0.78);
  --pane-flat: rgba(255, 255, 255, 0.62);
  --pane-hover: rgba(255, 255, 255, 0.82);
  --pane-solid-top: rgba(255, 255, 255, 0.94);
  --pane-solid-bottom: rgba(255, 255, 255, 0.98);

  /* EIS ambient backdrop wash (see body) */
  --wash-1: #c9deff;
  --wash-2: #ffd7c4;
  --wash-3: #ccf0e0;
  --wash-4: #e3d8ff;
  --scrim: rgba(12, 20, 33, 0.50);

  --module-rail-width: 88px;
  --sidebar-width: 256px;
  --shell-gap: 12px;
  --topbar-height: 64px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 14px 42px rgba(19, 32, 56, 0.12);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 14px rgba(19, 32, 56, 0.06);
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

/* ================= dark palette =================
   Only tokens are redefined; no component rule knows which theme is active.
   Chrome stays translucent — the glass samples a dark wash instead of a light
   one — while data surfaces stay opaque so tables keep full contrast. */
:root[data-theme="dark"] {
  --canvas: #0e1218;
  --canvas-end: #0d1016;
  --surface: rgba(32, 37, 46, 0.62);
  --surface-muted: rgba(22, 27, 35, 0.72);
  --surface-strong: rgba(30, 40, 54, 0.82);
  --data-surface: #161b23;
  --data-surface-muted: #1b212a;
  --glass-border: rgba(255, 255, 255, 0.11);
  --ink: #e7ebf1;
  --ink-soft: #a4aebb;
  --muted: #a4aebb;
  --muted-2: #7a8492;
  --line: #262d38;
  --line-strong: #333c4a;
  --accent: #3987e5;
  --accent-dark: #4f97ea;
  --accent-soft: rgba(57, 135, 229, 0.18);
  --blue: #5f9fea;
  --blue-soft: rgba(95, 159, 234, 0.18);
  --amber: #e0a83a;
  --amber-soft: rgba(224, 168, 58, 0.18);
  --red: #e56b6b;
  --red-soft: rgba(229, 107, 107, 0.18);
  --violet: #9085e9;
  --violet-soft: rgba(144, 133, 233, 0.18);
  --ok: #5ec95e;
  --on-accent: #ffffff;

  --row-hover: #1c2633;
  --grid-head: #1b212a;
  --line-hover: #465164;
  --ring-track: #263750;
  --edit-hatch: #1f252e;
  --switch-off: #3b4554;
  --avatar-bg: #252d38;
  --avatar-ink: #c3cbd7;

  --accent-tint: #16283e;
  --accent-line: #1e3a58;
  --accent-line-strong: #3f6f9e;
  --accent-ink-soft: #a8cbf5;
  --amber-tint: #2a2110;
  --amber-line: rgba(224, 168, 58, 0.42);
  --red-line: rgba(229, 107, 107, 0.42);
  --blue-ink: #a8cbf5;

  --avatar-teal-bg: #13362c;
  --avatar-teal-ink: #75d0ad;
  --avatar-rose-bg: #2b1517;
  --avatar-rose-ink: #f0a2a2;
  --avatar-blue-bg: #16283e;
  --avatar-blue-ink: #8dbbf2;
  --avatar-violet-bg: #211d38;
  --avatar-violet-ink: #b6acef;
  --avatar-gold-bg: #2a2110;
  --avatar-gold-ink: #e0b864;
  --avatar-green-bg: #0f2a15;
  --avatar-green-ink: #75d475;

  --mark-slate-bg: #232b36;
  --mark-slate-ink: #c3cbd7;
  --mark-blue-bg: #16283e;
  --mark-blue-ink: #8dbbf2;
  --mark-red-bg: #2b1517;
  --mark-red-ink: #f0a2a2;
  --mark-violet-bg: #211d38;
  --mark-violet-ink: #b6acef;
  --mark-teal-bg: #13362c;
  --mark-teal-ink: #75d0ad;
  --mark-gold-bg: #2a2110;
  --mark-gold-ink: #e0b864;
  --mark-steel-bg: #1f2d3a;
  --mark-steel-ink: #a8c8ee;

  --cell-leave: rgba(224, 168, 58, 0.16);
  --cell-trip: rgba(95, 159, 234, 0.16);
  --cell-sick: rgba(144, 133, 233, 0.18);
  --cell-error: rgba(229, 107, 107, 0.18);
  --cell-draft: rgba(25, 158, 112, 0.16);
  --proposal-amber: rgba(224, 168, 58, 0.22);
  --proposal-accent: rgba(57, 135, 229, 0.22);
  --actionbar-bg: rgba(22, 27, 35, 0.94);

  --pane-top: rgba(32, 37, 46, 0.62);
  --pane-bottom: rgba(22, 27, 35, 0.80);
  --pane-flat: rgba(32, 37, 46, 0.62);
  --pane-hover: rgba(48, 56, 68, 0.76);
  --pane-solid-top: rgba(26, 31, 39, 0.94);
  --pane-solid-bottom: rgba(22, 27, 35, 0.98);

  --wash-1: #16345c;
  --wash-2: #4a2a1c;
  --wash-3: #12402f;
  --wash-4: #2a2050;
  --scrim: rgba(0, 0, 0, 0.62);

  --shadow: 0 14px 42px rgba(0, 0, 0, 0.50);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45), 0 5px 16px rgba(0, 0, 0, 0.30);
  color-scheme: dark;
}

.app-shell {
  position: relative;
  z-index: 1;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background:
    radial-gradient(1100px 760px at 10% 4%, var(--wash-1) 0%, transparent 62%),
    radial-gradient(980px 720px at 92% 10%, var(--wash-2) 0%, transparent 58%),
    radial-gradient(900px 820px at 74% 96%, var(--wash-3) 0%, transparent 60%),
    radial-gradient(860px 720px at 16% 94%, var(--wash-4) 0%, transparent 60%),
    linear-gradient(165deg, var(--canvas), var(--canvas-end));
  background-attachment: fixed;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button,
a,
select,
input[type="checkbox"] {
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 650;
}

a:hover {
  text-decoration: underline;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
  flex: 0 0 auto;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 27px;
  line-height: 1.2;
  font-weight: 720;
}

h2 {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

h3 {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
}

small {
  color: var(--muted);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--module-rail-width) var(--sidebar-width) minmax(0, 1fr);
  gap: var(--shell-gap);
  width: 100%;
  height: 100%;
  padding: var(--shell-gap);
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-is-collapsed {
  --sidebar-width: 76px;
}

.module-rail {
  position: relative;
  z-index: 31;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(161, 181, 209, 0.15);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(130px 180px at 50% -10%, rgba(62, 129, 224, 0.2), transparent 68%),
    linear-gradient(180deg, #111b29 0%, #0b131e 100%);
  color: #b9c6d8;
  box-shadow: 0 16px 40px rgba(8, 15, 25, 0.24);
  transition: transform 220ms ease;
}

.module-rail-brand {
  display: flex;
  min-height: 86px;
  flex: 0 0 86px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid rgba(183, 203, 228, 0.12);
}

.module-rail-brand img {
  width: 32px;
  height: 34px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.module-rail-brand span {
  color: #dce6f3;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.13em;
}

.module-switcher {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  padding: 9px;
  overflow: auto;
  scrollbar-width: none;
}

.module-switcher::-webkit-scrollbar {
  display: none;
}

.module-switch {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 67px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 8px 4px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #aab8ca;
  font-size: 11px;
  font-weight: 650;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.module-switch:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #eef5ff;
  transform: translateY(-1px);
}

.module-switch.is-active {
  background: linear-gradient(145deg, #2e72d5, #245bb0);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(26, 85, 173, 0.34);
}

.module-icon {
  display: inline-flex;
  width: 27px;
  height: 27px;
  align-items: center;
  justify-content: center;
}

.module-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}

.module-signal {
  position: absolute;
  top: 9px;
  right: 7px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #111b29;
  border-radius: 12px;
  background: #e24c4c;
  color: #ffffff;
  font-size: 9px;
  line-height: 13px;
  text-align: center;
}

.module-rail-status {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-top: 1px solid rgba(183, 203, 228, 0.12);
}

.module-rail-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #45d483;
  box-shadow: 0 0 0 4px rgba(69, 212, 131, 0.12);
}

.module-rail-status small {
  color: #7e90a8;
  font-size: 8px;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.sidebar {
  position: relative;
  z-index: 30;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--pane-top), var(--pane-bottom));
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  box-shadow: var(--shadow);
  transition: width 180ms ease, transform 220ms ease;
}

.brand {
  display: flex;
  min-height: 104px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 13px 16px 12px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.brand-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.brand-identity img {
  display: block;
  width: 42px;
  height: 44px;
  flex: 0 0 42px;
  object-fit: contain;
}

.brand-name {
  display: flex;
  min-width: 0;
  flex-direction: column;
  color: var(--ink);
  line-height: 1.16;
}

.brand-name small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.brand-name strong {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 780;
}

.brand-product {
  padding-left: 51px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.primary-nav {
  flex: 1;
  min-height: 0;
  padding: 10px;
  overflow: auto;
  scrollbar-width: thin;
}

.nav-label {
  min-height: 28px;
  margin: 8px 10px 2px;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 28px;
  font-weight: 720;
  text-transform: uppercase;
  white-space: nowrap;
}

.role-switcher {
  display: grid;
  gap: 2px;
}

.role-option {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 30px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  transition: background 140ms ease, color 140ms ease;
}

.role-option:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.role-option.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.role-option.is-active::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  content: "";
}

.role-avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.role-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.role-copy strong,
.role-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-copy strong {
  font-size: 14px;
}

.role-copy small {
  color: var(--muted);
  font-size: 12px;
}

.role-workload {
  grid-column: 3;
  padding: 3px 6px;
  border-radius: 16px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.role-check {
  display: none;
  width: 14px;
  height: 14px;
  grid-column: 4;
  color: var(--accent);
}

.role-option.is-active .role-check {
  display: block;
}

.role-nav,
.module-nav {
  display: none;
}

body[data-active-module="hrm"][data-active-role="superuser"] [data-role-nav="superuser"],
body[data-active-module="hrm"][data-active-role="employee"] [data-role-nav="employee"],
body[data-active-module="hrm"][data-active-role="manager"] [data-role-nav="manager"],
body[data-active-module="hrm"][data-active-role="hr-leader"] [data-role-nav="hr-leader"],
body[data-active-module="hrm"][data-active-role="spm"] [data-role-nav="spm"],
body[data-active-module="hrm"][data-active-role="signer"] [data-role-nav="signer"],
body[data-active-module="hrm"][data-active-role="finance"] [data-role-nav="finance"],
body[data-active-module="hrm"][data-active-role="support"] [data-role-nav="support"],
body[data-active-module="hrm"][data-active-role="comms"] [data-role-nav="comms"],
body[data-active-module="hrm"][data-active-role="integration-operator"] [data-role-nav="integration-operator"],
body[data-active-module="hrm"][data-active-role="auditor"] [data-role-nav="auditor"],
body[data-active-module="hrm"][data-active-role="hr"] [data-role-nav="hr"],
body[data-active-module="chat"] [data-module-nav="chat"],
body[data-active-module="dms"] [data-module-nav="dms"],
body[data-active-module="export"] [data-module-nav="export"],
body[data-active-module="finance"] [data-module-nav="finance"],
body[data-active-module="pms"] [data-module-nav="pms"],
body[data-active-module="vms"] [data-module-nav="vms"] {
  display: block;
}

body:not([data-active-module="hrm"]) .search-trigger,
body[data-active-module="hrm"]:not([data-active-role="hr"]) .search-trigger {
  display: none;
}

.nav-item {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 40px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  transition: background 140ms ease, color 140ms ease;
}

.process-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.process-line > span {
  position: relative;
  display: grid;
  min-height: 86px;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 3px 9px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.process-line > span:last-child {
  border-right: 0;
}

.process-line svg {
  width: 18px;
  height: 18px;
  grid-row: 1 / 3;
  align-self: center;
  color: var(--muted);
}

.process-line strong {
  align-self: end;
  font-size: 14px;
}

.process-line small {
  align-self: start;
  font-size: 12px;
}

.process-line .is-complete {
  background: var(--accent-tint);
}

.process-line .is-complete svg {
  color: var(--accent);
}

.process-line .is-current {
  box-shadow: inset 0 -3px var(--amber);
}

.process-line .is-current svg {
  color: var(--amber);
}

.row-attention {
  background: var(--amber-tint);
}

.nav-item:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 680;
}

.nav-item.is-active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  content: "";
}

.nav-item span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-count,
.nav-alert {
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 16px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.nav-alert {
  background: var(--amber-soft);
  color: var(--amber);
}

.health-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 2px solid var(--accent-line);
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 2px var(--accent-tint);
}

.sidebar-footer {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.system-state {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.system-state div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  white-space: nowrap;
}

.system-state strong {
  font-size: 14px;
}

.system-state span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.sidebar-is-collapsed .brand {
  min-height: 72px;
  align-items: center;
  padding: 12px 8px;
}

.sidebar-is-collapsed .brand-identity img {
  width: 46px;
  height: 48px;
  flex-basis: 46px;
}

.sidebar-is-collapsed .brand-name,
.sidebar-is-collapsed .brand-product,
.sidebar-is-collapsed .nav-label,
.sidebar-is-collapsed .nav-item span,
.sidebar-is-collapsed .system-state div {
  display: none;
}

.sidebar-is-collapsed .primary-nav {
  padding: 10px;
}

.sidebar-is-collapsed .nav-item {
  display: flex;
  justify-content: center;
  padding: 9px;
}

.sidebar-is-collapsed .nav-item.is-active::before {
  left: -10px;
}

.sidebar-is-collapsed .sidebar-footer {
  flex-direction: column;
  justify-content: center;
}

.workspace {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.topbar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--pane-top);
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
}

.topbar-left,
.topbar-actions,
.breadcrumbs,
.profile-control,
.search-trigger {
  display: flex;
  align-items: center;
}

.topbar-left,
.topbar-actions {
  min-width: 0;
  gap: 10px;
}

.topbar-left {
  flex: 0 1 auto;
}

.topbar-actions {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.breadcrumbs {
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.breadcrumbs svg {
  width: 14px;
  height: 14px;
}

.breadcrumbs strong {
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
}

.search-trigger {
  width: 330px;
  height: 38px;
  gap: 9px;
  padding: 0 9px 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--muted);
  text-align: left;
}

.search-trigger:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.search-trigger span {
  flex: 1;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-command-anchor {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.module-command-anchor[hidden] {
  display: none;
}

.module-commandbar,
.module-context-controls,
.module-context-search,
.module-context-field,
.module-context-action,
.module-context-status {
  display: flex;
  min-width: 0;
  align-items: center;
}

.module-commandbar {
  max-width: 100%;
  gap: 8px;
}

.module-context-search {
  width: clamp(176px, 22vw, 292px);
  height: 38px;
  flex: 1 1 220px;
  gap: 8px;
  padding-left: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--muted);
}

.module-context-search[hidden] {
  display: none;
}

.module-context-search > svg {
  width: 16px;
  flex: 0 0 16px;
}

.module-context-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.module-context-search input::placeholder {
  color: var(--muted-2);
}

.module-context-search button {
  display: grid;
  width: 34px;
  height: 36px;
  flex: 0 0 34px;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.module-context-search button:hover {
  color: var(--accent);
}

.module-context-search button svg {
  width: 15px;
}

.module-context-controls {
  flex: 0 1 auto;
  gap: 7px;
}

.module-context-field {
  position: relative;
  height: 38px;
  max-width: 174px;
  gap: 6px;
  padding: 0 9px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}

.module-context-field > svg {
  width: 15px;
  flex: 0 0 15px;
}

.module-context-field select {
  min-width: 0;
  max-width: 142px;
  height: 100%;
  padding: 0 17px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
}

.module-context-action,
.module-context-status {
  min-height: 38px;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
}

.module-context-action:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  color: var(--accent);
}

.module-context-action svg,
.module-context-status svg {
  width: 15px;
}

.module-context-status {
  color: var(--muted);
}

.module-context-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  content: "";
}

.module-context-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.04em;
}

.module-command-toggle {
  display: none;
}

kbd {
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}

.language-switch,
.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.language-switch button,
.segmented button {
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.language-switch button.is-active,
.segmented button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(19, 32, 56, 0.12);
}

.role-language-switch {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin: 8px 6px 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.role-language-switch button {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.role-language-switch button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(19, 32, 56, 0.12);
}

.segmented button b {
  margin-left: 3px;
  color: var(--amber);
}

.icon-button {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  transition: border 130ms ease, background 130ms ease, color 130ms ease;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  color: var(--accent);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.notification-button {
  position: relative;
}

.notification-button > span {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--data-surface);
  border-radius: 50%;
  background: var(--red);
}

.popover-anchor {
  position: relative;
}

.notification-popover {
  position: absolute;
  top: 48px;
  right: 0;
  width: 360px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--data-surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--shadow);
  isolation: isolate;
  animation: pop-in 140ms ease both;
}

.notification-popover[hidden] {
  display: none;
}

.popover-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 12px;
}

.notification-entry {
  display: grid;
  width: 100%;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}

.notification-entry:hover {
  background: var(--surface-muted);
}

.notification-entry > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.notification-entry small {
  font-size: 14px;
}

.notification-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.notification-icon.warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.notification-icon.info {
  background: var(--blue-soft);
  color: var(--blue);
}

.notification-icon.success {
  background: var(--accent-soft);
  color: var(--accent);
}

.profile-control {
  min-width: 190px;
  height: 44px;
  gap: 9px;
  padding: 3px 7px 3px 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}

.profile-role-anchor {
  position: relative;
  flex: 0 0 auto;
}

.profile-control:hover {
  background: var(--surface-muted);
}

.profile-control[aria-expanded="true"] {
  background: var(--surface-muted);
}

.profile-control[aria-expanded="true"] > svg {
  transform: rotate(180deg);
}

.profile-control > svg {
  transition: transform 140ms ease;
}

.role-selector-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 70;
  width: 310px;
  max-height: calc(100vh - 70px);
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--data-surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 16px 40px rgba(19, 32, 56, 0.16);
  isolation: isolate;
  animation: pop-in 140ms ease both;
}

.role-selector-menu[hidden] {
  display: none;
}

.role-selector-heading {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 8px 9px;
  border-bottom: 1px solid var(--line);
}

.role-selector-heading > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.role-selector-heading strong {
  font-size: 14px;
  text-transform: uppercase;
}

.role-selector-heading small {
  font-size: 12px;
}

.role-selector-heading > svg {
  width: 18px;
  color: var(--muted);
}

.role-selector-menu .role-switcher {
  padding: 6px 0;
}

.session-menu {
  width: 330px;
}

.session-menu-summary {
  display: grid;
  min-height: 64px;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
}

.session-menu-summary > .avatar {
  width: 40px;
  height: 40px;
}

.session-menu-summary > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.session-menu-summary strong,
.session-menu-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-menu-summary strong {
  font-size: 13px;
}

.session-menu-summary small {
  color: var(--muted);
  font-size: 11px;
}

.session-menu-facts {
  display: grid;
  gap: 0;
  margin: 0 8px 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--surface-muted);
}

.session-menu-facts > div {
  display: grid;
  min-height: 28px;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.session-menu-facts dt {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
}

.session-menu-facts dd {
  overflow: hidden;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-group-label {
  margin: 5px 8px 3px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.role-group-label:not(:first-child) {
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.role-profile-action {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
}

.role-profile-action:hover {
  background: var(--surface-muted);
  color: var(--accent-dark);
}

.role-profile-action > svg:first-child {
  width: 18px;
}

.role-profile-action > svg:last-child {
  width: 14px;
  color: var(--muted);
}

.role-profile-action > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.role-profile-action strong {
  font-size: 13px;
}

.role-profile-action small {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-logout {
  color: var(--red);
}

.session-logout:hover {
  color: var(--red);
  background: var(--red-soft);
}

.profile-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.profile-copy strong,
.profile-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 14px;
}

.profile-copy small {
  font-size: 13px;
}

.mobile-menu {
  display: none;
}

.main-content {
  height: 100%;
  padding-top: calc(var(--topbar-height) + var(--shell-gap));
  overflow: auto;
  scroll-behavior: smooth;
}

.view {
  display: none;
  width: min(100%, 1540px);
  min-height: 100%;
  margin: 0 auto;
  padding: 26px 30px 48px;
}

.view.is-active {
  display: block;
  animation: view-enter 220ms ease both;
}

.page-heading {
  display: flex;
  min-height: 68px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-heading > div:first-child {
  min-width: 0;
}

.page-heading h1 {
  margin-bottom: 6px;
}

.page-heading p:not(.eyebrow) {
  max-width: 710px;
  color: var(--muted);
  line-height: 1.5;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

.heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 680;
  white-space: nowrap;
}

.button:hover {
  border-color: var(--line-hover);
  background: var(--surface-muted);
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.button.primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.button.secondary {
  background: var(--surface);
}

.button.danger {
  border-color: var(--red-line);
  background: var(--red-soft);
  color: var(--red);
}

.button.compact {
  min-height: 32px;
  padding: 5px 9px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 680;
  white-space: nowrap;
}

.text-button:hover {
  color: var(--accent-dark);
}

.text-button svg {
  width: 15px;
  height: 15px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--pane-flat);
}

.metric-strip.metrics-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric > span,
.metric > strong,
.metric > small {
  display: block;
}

.metric > span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.metric > strong {
  margin-bottom: 5px;
  font-size: 25px;
  line-height: 1;
  font-weight: 730;
}

.metric > small {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.positive {
  color: var(--accent);
}

.negative {
  color: var(--red);
}

.attention {
  color: var(--amber);
}

.dashboard-grid,
.two-column,
.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(300px, 0.85fr);
  gap: 24px;
}

.content-section {
  min-width: 0;
  margin-bottom: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
}

.module-workspace {
  max-width: 1480px;
}

.module-workspace.has-module-runtime {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.module-runtime-stack,
.module-runtime-frame,
.module-native-layer {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.module-runtime-stack {
  position: relative;
}

.module-runtime-frame {
  display: block;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
}

.module-runtime-frame[hidden],
.module-native-layer[hidden] {
  display: none;
}

.module-native-layer {
  overflow: auto;
}

.module-native-pane {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 32px;
}

.module-empty-state {
  width: min(100%, 560px);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--pane-solid-top);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.module-empty-state .module-empty-icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 15px;
  background: var(--accent-tint);
  color: var(--accent);
}

.module-empty-state .module-empty-icon svg {
  width: 24px;
  height: 24px;
}

.module-empty-state h1 {
  margin: 7px 0 12px;
}

.module-empty-state > p:not(.eyebrow) {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.module-page-heading {
  min-height: 82px;
}

.module-metrics {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.module-health {
  display: grid;
  min-height: 66px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: -8px 0 26px;
  padding: 10px 14px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-tint);
}

.module-health .health-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--data-surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.module-health > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.module-health > div strong {
  font-size: 14px;
}

.module-health > div span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(270px, 0.7fr);
  gap: 28px;
}

.module-queue .request-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.module-focus {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--pane-flat);
  box-shadow: var(--shadow-sm);
}

.module-focus > .section-heading {
  min-height: auto;
}

.module-focus-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.module-focus-mark > span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
}

.module-focus-mark > span svg {
  width: 21px;
  height: 21px;
}

.module-focus-mark > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.module-focus-mark strong {
  font-size: 15px;
}

.module-focus-mark small {
  font-size: 12px;
}

.module-focus-list {
  margin: 0;
  padding: 8px 0 14px;
}

.module-focus-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.module-focus-list dt,
.module-focus-list dd {
  margin: 0;
  font-size: 13px;
}

.module-focus-list dt {
  color: var(--muted);
}

.module-focus-list dd {
  overflow: hidden;
  max-width: 56%;
  color: var(--ink);
  font-weight: 650;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-width {
  width: 100%;
}

.module-register {
  margin-top: 2px;
}

.module-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.module-filter {
  display: flex;
  width: 220px;
  height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--data-surface);
  color: var(--muted);
}

.module-filter svg {
  width: 15px;
  height: 15px;
}

.module-filter input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.module-filter input::placeholder {
  color: var(--muted-2);
}

.module-record-id {
  display: flex;
  align-items: center;
  gap: 9px;
}

.module-record-id > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.module-record-id small {
  font-size: 11px;
}

.module-record-mark {
  display: inline-flex;
  width: 29px;
  height: 29px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 12px;
  font-weight: 780;
}

.section-heading {
  display: flex;
  min-height: 42px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.task-list,
.request-list,
.event-list {
  border-bottom: 1px solid var(--line);
}

.task-row {
  display: grid;
  min-height: 66px;
  grid-template-columns: 38px minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.task-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--ink-soft);
}

.task-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.task-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.task-icon.green {
  background: var(--accent-soft);
  color: var(--accent);
}

.task-icon.violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.task-icon.red {
  background: var(--red-soft);
  color: var(--red);
}

.task-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.task-main strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 8px;
  border: 0;
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.status svg {
  width: 13px;
  height: 13px;
}

.status.success {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.status.warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.status.info {
  background: var(--blue-soft);
  color: var(--blue);
}

.status.neutral {
  background: var(--surface-strong);
  color: var(--muted);
}

.today-section {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.attendance-ring-wrap {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 4px 0 18px;
}

.attendance-ring {
  position: relative;
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0 94.8%, var(--ring-track) 94.8% 100%);
}

.attendance-ring::after {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.attendance-ring > div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.attendance-ring strong {
  font-size: 25px;
}

.attendance-ring span {
  color: var(--muted);
  font-size: 13px;
}

.attendance-legend,
.detail-list,
.balance-lines {
  margin: 0;
}

.attendance-legend > div,
.balance-lines > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}

.attendance-legend dt {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.attendance-legend dd,
.balance-lines dd {
  margin: 0;
  font-size: 14px;
  font-weight: 720;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-dot.green {
  background: var(--accent);
}

.legend-dot.amber {
  background: var(--amber);
}

.legend-dot.blue {
  background: var(--blue);
}

.legend-dot.red {
  background: var(--red);
}

.sync-list {
  border-top: 1px solid var(--line);
}

.sync-list > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.sync-list > div > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.sync-list strong {
  font-size: 14px;
}

.sync-list small {
  font-size: 12px;
}

.sync-list > div > svg {
  width: 14px;
  color: var(--accent);
}

.integration-mark {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--mark-slate-bg);
  color: var(--mark-slate-ink);
  font-size: 14px;
  font-weight: 800;
}

.integration-mark.oneid {
  background: var(--mark-blue-bg);
  color: var(--mark-blue-ink);
}

.integration-mark.hik {
  background: var(--mark-red-bg);
  color: var(--mark-red-ink);
}

.integration-mark.kpi {
  background: var(--mark-violet-bg);
  color: var(--mark-violet-ink);
}

.integration-mark.ijro {
  background: var(--mark-teal-bg);
  color: var(--mark-teal-ink);
}

.integration-mark.enst {
  background: var(--mark-gold-bg);
  color: var(--mark-gold-ink);
}

.integration-mark.finance {
  background: var(--mark-steel-bg);
  color: var(--mark-steel-ink);
}

.workforce-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 46px;
  padding: 6px 0;
}

.department-bars {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 190px minmax(100px, 1fr) 36px;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

.bar-row > div,
.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-strong);
}

.bar-row i,
.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.bar-row strong {
  text-align: right;
}

.workforce-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.workforce-summary > span {
  color: var(--muted);
  font-size: 14px;
}

.workforce-summary > strong {
  margin: 7px 0 15px;
  font-size: 32px;
}

.split-stat {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.split-stat b {
  margin-left: 3px;
  color: var(--ink);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--data-surface);
  box-shadow: var(--shadow-sm);
}

.employee-table.hide-documents th:nth-child(6),
.employee-table.hide-documents td:nth-child(6) {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  height: 38px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background 120ms ease;
}

tbody tr:hover {
  background: var(--row-hover);
}

.employee-row {
  cursor: pointer;
}

.person-cell,
.system-cell {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.person-cell > span:last-child,
.system-cell > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.person-cell strong,
.system-cell strong {
  font-size: 14px;
}

.person-cell small,
.system-cell small,
.cell-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

/* A row can carry two competing actions (lateness explanation and timesheet
   correction); they stay on one line and wrap only when the column is squeezed. */
.cell-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.avatar {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--avatar-bg);
  color: var(--avatar-ink);
  font-size: 13px;
  font-weight: 780;
}

.avatar.small {
  width: 26px;
  height: 26px;
  font-size: 11px;
}

.avatar.large {
  width: 48px;
  height: 48px;
  font-size: 15px;
}

.avatar-teal {
  background: var(--avatar-teal-bg);
  color: var(--avatar-teal-ink);
}

.avatar-rose {
  background: var(--avatar-rose-bg);
  color: var(--avatar-rose-ink);
}

.avatar-blue {
  background: var(--avatar-blue-bg);
  color: var(--avatar-blue-ink);
}

.avatar-violet {
  background: var(--avatar-violet-bg);
  color: var(--avatar-violet-ink);
}

.avatar-gold {
  background: var(--avatar-gold-bg);
  color: var(--avatar-gold-ink);
}

.avatar-green {
  background: var(--avatar-green-bg);
  color: var(--avatar-green-ink);
}

.context-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.context-band > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 2px 18px;
  border-right: 1px solid var(--line);
}

.context-band > div:first-child {
  padding-left: 0;
}

.context-band > div span {
  color: var(--muted);
  font-size: 12px;
}

.context-band > div strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-band > .status {
  margin-left: 18px;
}

.toolbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}

.field {
  position: relative;
  display: inline-flex;
  height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.field:focus-within {
  border-color: var(--accent-line-strong);
  box-shadow: 0 0 0 3px rgba(27, 95, 184, 0.10);
}

.field input,
.field select {
  width: 100%;
  height: 100%;
  padding: 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.search-field {
  width: 260px;
  margin-left: auto;
}

.search-field.wide {
  width: min(420px, 45%);
  margin-left: 0;
}

.search-field svg {
  width: 15px;
  margin-left: 10px;
  color: var(--muted);
}

.select-field {
  min-width: 160px;
}

.select-field select {
  padding-right: 30px;
  appearance: none;
}

.select-field svg {
  position: absolute;
  right: 8px;
  width: 14px;
  pointer-events: none;
}

.org-layout {
  display: grid;
  min-height: 540px;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
}

/* ---- Organization chart (default view) ---- */
.org-canvas {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.org-canvas-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.org-breadcrumb {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.org-breadcrumb button {
  padding: 3px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.org-breadcrumb button:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

.org-breadcrumb button[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.org-breadcrumb svg {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
}

.org-chart {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 22px 18px 26px;
  overflow-x: auto;
}

.org-level {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.org-level-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.org-row {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
}

.org-connector {
  width: 1px;
  height: 26px;
  flex: 0 0 auto;
  background: linear-gradient(to bottom, var(--line-strong), var(--line));
}

/* ---- Unit card ---- */
.org-card {
  display: flex;
  width: 268px;
  flex-direction: column;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.org-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(19, 32, 56, 0.09);
  transform: translateY(-1px);
}

.org-card.is-selected {
  border-color: var(--accent);
  border-width: 2px;
  padding: 12px 13px;
  box-shadow: 0 6px 18px rgba(27, 95, 184, 0.16);
}

.org-card.is-root {
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%);
}

.org-card.is-draft {
  border-color: var(--amber);
  background: var(--amber-soft);
}

.org-card-top {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.org-card-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--accent);
}

.org-card.is-root .org-card-icon {
  background: var(--accent);
  color: var(--on-accent);
}

.org-card-id {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.org-card-id strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 680;
  line-height: 1.3;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.org-card-id small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-card-flag {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
}

.org-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.org-metric {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.org-metric b {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.org-metric i {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.org-metric.is-vacant b {
  color: var(--amber);
}

.org-card-bar {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
}

.org-card-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.org-card-children {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.org-card-children svg {
  width: 13px;
  height: 13px;
}

.org-empty-branch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
}

.segmented.compact button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.segmented.compact svg {
  width: 14px;
  height: 14px;
}

/* chart is primary; the tree is the opt-in list mode and the editing spine */
.org-layout:not(.is-list-mode):not(.is-editing) .org-tree {
  display: none;
}

.org-layout.is-list-mode .org-canvas,
.org-layout.is-editing .org-canvas {
  display: none;
}

/* the mode switch belongs to the chart/list surface only */
.org-canvas-bar.is-hidden {
  display: none;
}

.org-draftbar {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--amber-line);
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
}

.org-draftbar[hidden] {
  display: none;
}

.org-draftbar > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.org-draftbar > div > strong {
  font-size: 14px;
}

.org-draftbar > div > small {
  color: var(--muted);
  font-size: 12px;
}

.org-draft-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--amber-line);
  background: var(--surface);
  color: var(--amber);
}

.org-draft-icon svg {
  width: 17px;
  height: 17px;
}

.org-tree {
  padding: 8px 0 24px;
  border-top: 1px solid var(--line);
}

.tree-branch {
  margin-left: 23px;
  padding-left: 17px;
  border-left: 1px solid var(--line);
}

.tree-branch[hidden] {
  display: none;
}

.tree-branch:not([hidden]) {
  animation: branch-reveal 140ms ease-out;
}

.tree-branch.nested {
  margin-left: 34px;
}

.org-node {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 56px;
  grid-template-columns: 22px 36px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.org-node[aria-expanded] {
  cursor: pointer;
}

.org-node:hover,
.org-node.is-selected {
  background: var(--surface);
}

.org-node.is-selected {
  box-shadow: inset 3px 0 0 var(--accent);
}

.org-node.is-draft-change {
  background: var(--amber-tint);
}

.org-node.is-draft-change::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: var(--amber);
  content: "";
}

.org-node > span:nth-child(3) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.org-node strong,
.org-node small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-node strong {
  font-size: 14px;
}

.org-node small {
  font-size: 12px;
}

.org-node > b {
  font-size: 14px;
  text-align: right;
}

.node-toggle,
.node-space {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.node-toggle svg {
  width: 14px;
  height: 14px;
}

@keyframes branch-reveal {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.node-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--accent);
}

.node-icon.large {
  width: 44px;
  height: 44px;
}

.inspector {
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.inspector-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.inspector-heading h2 {
  font-size: 15px;
}

.inspector-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt,
.detail-list dd {
  font-size: 13px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
}

.mini-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 8px;
  font-size: 13px;
}

.org-people-panel {
  margin-top: 17px;
  padding-top: 1px;
  border-top: 1px solid var(--line);
}

.org-people-panel .mini-heading {
  margin-top: 12px;
}

.org-people-panel .icon-button {
  width: 28px;
  height: 28px;
}

.org-reporting > div {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.org-reporting dt,
.org-reporting dd {
  font-size: 12px;
}

.org-reporting dt {
  color: var(--muted);
}

.org-reporting dd {
  margin: 0;
  font-weight: 680;
  text-align: right;
}

.org-member-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.org-member-heading strong {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  background: var(--surface-strong);
  color: var(--ink);
}

.org-member-list {
  margin-top: 4px;
}

.org-member-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.org-member-row .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.org-member-row > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.org-member-row strong,
.org-member-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-member-row strong {
  font-size: 12px;
}

.org-member-row small,
.org-member-more {
  color: var(--muted);
  font-size: 11px;
}

.org-member-more {
  display: block;
  padding: 8px 0 2px;
}

.org-member-empty {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 0;
  color: var(--muted);
  font-size: 12px;
}

.org-member-empty svg {
  width: 15px;
  height: 15px;
}

.org-hierarchy-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 7px;
  margin-top: 12px;
}

.org-hierarchy-actions .button {
  min-width: 0;
  padding-inline: 8px;
  white-space: normal;
}

.inspector-actions {
  display: flex;
  margin-top: 18px;
}

.inspector-actions .button {
  width: 100%;
}

.app-dialog.org-dialog {
  width: min(760px, calc(100vw - 32px));
}

.org-member-picker {
  max-height: 315px;
  overflow: auto;
  border: 1px solid var(--line);
}

.org-member-option {
  display: grid;
  min-height: 62px;
  grid-template-columns: minmax(220px, 1fr) minmax(210px, 0.8fr);
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.org-member-option:last-child {
  border-bottom: 0;
}

.org-member-option:has(input:checked) {
  background: var(--accent-soft);
}

.org-member-option > label:first-child {
  display: grid;
  min-width: 0;
  grid-template-columns: 16px 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.org-member-option input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.org-member-option .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.org-member-option > label:first-child > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.org-member-option strong,
.org-member-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-member-option strong {
  font-size: 13px;
}

.org-member-option small {
  color: var(--muted);
  font-size: 11px;
}

.org-manager-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.org-manager-field > span {
  color: var(--muted);
  font-size: 11px;
}

.org-manager-field select {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}

.org-manager-field select:disabled {
  background: var(--surface-strong);
  color: var(--muted);
}

.org-inline-editor[hidden] {
  display: none;
}

.org-layout.is-editing {
  min-height: 650px;
  grid-template-columns: minmax(300px, 0.62fr) minmax(620px, 1.38fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.org-layout.is-editing .org-tree {
  max-height: 720px;
  padding: 0 12px 20px 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-top: 0;
  border-right: 1px solid var(--line);
  background: var(--surface-muted);
}

.org-layout.is-editing .org-node {
  min-height: 50px;
  background: transparent;
}

.org-layout.is-editing .org-node:hover {
  background: var(--pane-hover);
}

.org-layout.is-editing .org-node.is-selected {
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--accent);
}

.org-layout.is-editing .inspector {
  display: none;
}

.org-inline-editor {
  display: flex;
  min-width: 0;
  min-height: 650px;
  flex-direction: column;
  background: var(--surface);
}

.org-editor-header {
  display: flex;
  min-height: 86px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 15px;
  border-bottom: 1px solid var(--line);
}

.org-editor-header > div {
  min-width: 0;
}

.org-editor-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 780;
}

.org-editor-header h2 {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-editor-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.org-editor-context {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--accent-tint);
  color: var(--muted);
  font-size: 11px;
}

.org-editor-context span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.org-editor-context span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-editor-context svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.org-editor-body {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(280px, 0.86fr) minmax(340px, 1.14fr);
  flex: 1;
}

.org-editor-settings,
.org-editor-team {
  min-width: 0;
  padding: 18px 20px;
}

.org-editor-settings {
  border-right: 1px solid var(--line);
}

.org-editor-section-heading {
  display: flex;
  min-height: 42px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.org-editor-section-heading > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.org-editor-section-heading strong {
  font-size: 14px;
}

.org-editor-section-heading small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.org-editor-section-heading > b {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  background: var(--surface-strong);
  font-size: 12px;
}

.org-editor-settings > .form-field,
.org-create-fields > .form-field,
.org-editor-field-row {
  margin-bottom: 13px;
}

.org-create-fields {
  margin-bottom: 4px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line);
}

.org-editor-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.org-editor-version {
  display: flex;
  min-height: 61px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 8px 10px;
  border-left: 2px solid var(--accent);
  background: var(--surface-muted);
}

.org-editor-version span,
.org-editor-version small {
  color: var(--muted);
  font-size: 11px;
}

.org-editor-version strong {
  font-size: 13px;
}

.org-team-search {
  width: 100%;
  margin-bottom: 10px;
}

.org-inline-team-list {
  max-height: 430px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.org-inline-team-row {
  display: grid;
  min-height: 58px;
  grid-template-columns: 18px 30px minmax(120px, 1fr) minmax(155px, 0.95fr);
  align-items: center;
  gap: 8px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--line);
}

.org-inline-team-row.is-assigned {
  box-shadow: inset 2px 0 0 var(--accent);
  background: var(--accent-tint);
}

.org-inline-team-row.is-filtered {
  display: none;
}

.org-inline-team-row > input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.org-inline-team-row .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.org-inline-team-identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.org-inline-team-identity strong,
.org-inline-team-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-inline-team-identity strong {
  font-size: 12px;
}

.org-inline-team-identity small {
  color: var(--muted);
  font-size: 7.5px;
}

.org-inline-manager {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.org-inline-manager span {
  color: var(--muted);
  font-size: 10px;
}

.org-inline-manager select {
  width: 100%;
  min-height: 32px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
}

.org-inline-manager select:disabled {
  background: var(--surface-strong);
  color: var(--muted);
}

.org-editor-ledger {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 9px 20px;
  border-top: 1px solid var(--line);
  background: var(--amber-soft);
}

.org-editor-ledger[hidden] {
  display: none;
}

.org-editor-ledger > div:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.org-editor-ledger > div:first-child > svg {
  width: 16px;
  height: 16px;
  color: var(--amber);
}

.org-editor-ledger > div:first-child > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.org-editor-ledger strong {
  font-size: 12px;
}

.org-editor-ledger small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-editor-ledger-list {
  width: 100%;
  border-top: 1px solid rgba(147, 101, 31, 0.2);
}

.org-editor-ledger-list[hidden] {
  display: none;
}

.org-editor-ledger-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(147, 101, 31, 0.15);
  font-size: 11px;
}

.org-editor-ledger-row:last-child {
  border-bottom: 0;
}

.org-editor-ledger-row span {
  color: var(--muted);
}

.org-editor-ledger-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-editor-footer {
  display: grid;
  min-height: 64px;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.hidden {
  display: none !important;
}

.document-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 650;
}

.document-state svg {
  width: 14px;
  height: 14px;
}

.document-state.complete {
  color: var(--accent);
}

.document-state.attention {
  color: var(--amber);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 12px;
}

.pagination span {
  margin-right: 8px;
  color: var(--muted);
  font-size: 13px;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(9, auto);
  align-items: center;
  justify-content: start;
  gap: 9px;
  margin-bottom: 20px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: auto;
}

.process-steps > svg {
  width: 14px;
  color: var(--line-strong);
}

.process-steps > div {
  display: grid;
  grid-template-columns: 28px auto;
  column-gap: 8px;
  min-width: 130px;
}

.process-steps > div > span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  grid-row: 1 / 3;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.process-steps > div strong {
  font-size: 13px;
}

.process-steps > div small {
  margin-top: 2px;
  font-size: 11px;
}

.process-steps > div.is-done > span {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.process-steps > div.is-current > span {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
}

.compact-metrics .metric {
  padding-top: 15px;
  padding-bottom: 15px;
}

.compact-metrics .metric > strong {
  font-size: 21px;
}

.timesheet th,
.timesheet td {
  padding-right: 10px;
  padding-left: 10px;
  text-align: center;
}

.timesheet th:first-child,
.timesheet td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 210px;
  background: var(--surface);
  text-align: left;
}

.timesheet thead th:first-child {
  background: var(--surface-muted);
}

.timesheet .today {
  background: var(--accent-tint);
}

.timesheet .needs-review {
  background: var(--amber-tint);
}

.day-cell {
  display: inline-flex;
  width: 36px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-strong);
  font-size: 12px;
  font-weight: 680;
  cursor: pointer;
  transition:
    box-shadow 140ms ease,
    transform 140ms ease;
}

.day-cell:hover,
.day-cell:focus-visible {
  box-shadow: 0 0 0 2px rgba(43, 119, 99, 0.2);
  outline: 0;
  transform: translateY(-1px);
}

.day-cell.full {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.day-cell.current {
  border: 1px solid var(--accent-line-strong);
  background: var(--data-surface);
  color: var(--accent);
}

.day-cell.leave {
  background: var(--amber-soft);
  color: var(--amber);
}

.day-cell.trip {
  background: var(--blue-soft);
  color: var(--blue);
}

.day-cell.late {
  background: var(--red-soft);
  color: var(--red);
}

.timesheet-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 11px;
  color: var(--muted);
  font-size: 12px;
}

.timesheet-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 8px;
}

.legend-swatch.full {
  background: var(--accent-soft);
}

.legend-swatch.leave {
  background: var(--amber-soft);
}

.legend-swatch.trip {
  background: var(--blue-soft);
}

.legend-swatch.late {
  background: var(--red-soft);
}

.time-panel {
  min-width: 0;
}

.time-queue-heading {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.time-queue-heading > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.time-queue-heading strong {
  font-size: 14px;
}

.time-queue-heading span {
  color: var(--muted);
  font-size: 12px;
}

.time-corrections-table th,
.time-corrections-table td {
  vertical-align: middle;
}

.time-corrections-table th:first-child,
.time-corrections-table td:first-child {
  min-width: 150px;
}

.time-corrections-table td:nth-child(2) {
  min-width: 210px;
}

.time-corrections-table td:nth-child(4) {
  min-width: 170px;
}

.time-corrections-table td:nth-child(5) {
  max-width: 220px;
}

.evidence-cell {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-empty {
  min-height: 220px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.compact-workflow-list {
  border-top: 0;
}

.manager-panel {
  min-width: 0;
}

.manager-panel[hidden] {
  display: none;
}

.manager-panel > .section-heading:first-child {
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
}

.manager-panel .request-row {
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
}

.manager-subheading {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
}

.manager-timesheet td:first-child {
  min-width: 210px;
}

.personnel-process-table td:first-child {
  min-width: 155px;
}

.personnel-process-table td:nth-child(2) {
  min-width: 220px;
}

.personnel-process-table td:nth-child(4) {
  min-width: 190px;
}

.pipeline-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pipeline-item {
  display: flex;
  min-height: 67px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.pipeline-item:last-child {
  border-right: 0;
}

.pipeline-item:hover,
.pipeline-item.is-active {
  background: var(--surface);
  color: var(--ink);
}

.pipeline-item.is-active {
  box-shadow: inset 0 -3px 0 var(--accent);
}

.pipeline-item span {
  font-size: 13px;
}

.pipeline-item strong {
  font-size: 20px;
}

.request-row {
  display: grid;
  min-height: 64px;
  grid-template-columns: 36px minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.request-row > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.request-row strong,
.request-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-row strong {
  font-size: 14px;
}

.request-row small {
  font-size: 12px;
}

.request-list.is-changing .request-row:not([hidden]),
.request-list.is-changing .request-empty:not([hidden]) {
  animation: queue-reveal 160ms ease-out;
}

.request-empty {
  display: flex;
  min-height: 148px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.request-empty[hidden] {
  display: none;
}

.request-empty svg {
  width: 24px;
  height: 24px;
  margin-bottom: 5px;
  color: var(--ink-soft);
}

.request-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.request-empty span {
  font-size: 12px;
}

@keyframes queue-reveal {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.balance-panel {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.balance-figure {
  display: grid;
  width: 100%;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  padding: 13px 0 18px;
  border-bottom: 1px solid var(--line);
}

.balance-figure span {
  grid-column: 1 / 3;
  color: var(--muted);
  font-size: 13px;
}

.balance-figure strong {
  margin-top: 5px;
  font-size: 32px;
}

.balance-figure small {
  align-self: end;
  padding-bottom: 4px;
}

.balance-lines {
  padding-top: 9px;
}

.balance-lines span {
  color: var(--muted);
  font-size: 13px;
}

.balance-lines strong {
  font-size: 13px;
}

.week-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-control span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.calendar-timeline {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.calendar-head,
.calendar-line {
  display: grid;
  min-width: 980px;
  grid-template-columns: 160px repeat(14, minmax(50px, 1fr));
  align-items: center;
}

.calendar-head {
  min-height: 34px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.calendar-line {
  position: relative;
  min-height: 48px;
  border-top: 1px solid var(--line);
  background: repeating-linear-gradient(to right, transparent 0, transparent calc((100% - 160px) / 14 - 1px), var(--line) calc((100% - 160px) / 14 - 1px), var(--line) calc((100% - 160px) / 14));
}

.calendar-line > strong {
  position: relative;
  z-index: 2;
  grid-column: 1;
  align-self: stretch;
  padding: 16px 12px;
  background: var(--surface);
  font-size: 12px;
}

.leave-block,
.trip-block {
  position: relative;
  z-index: 1;
  grid-row: 1;
  height: 25px;
  align-self: center;
  padding: 0 9px;
  overflow: hidden;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 25px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leave-block {
  background: var(--amber-soft);
  color: var(--amber);
}

.trip-block {
  background: var(--blue-soft);
  color: var(--blue);
}

.external-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.progress-inline,
.score-bar {
  display: inline-grid;
  width: 92px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.progress-inline::before,
.score-bar::before {
  grid-column: 1;
  grid-row: 1;
  height: 5px;
  border-radius: 8px;
  background: var(--surface-strong);
  content: "";
}

.progress-inline i,
.score-bar i {
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  height: 5px;
  border-radius: 8px;
  background: var(--accent);
}

.progress-inline b,
.score-bar b {
  font-size: 12px;
}

.score-bar.warning i {
  background: var(--amber);
}

.info-callout,
.policy-note {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-tint);
  color: var(--accent-dark);
}

.info-callout > svg,
.policy-note > svg {
  width: 22px;
  height: 22px;
}

.info-callout > div,
.policy-note > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.info-callout strong,
.policy-note strong {
  font-size: 14px;
}

.info-callout span,
.policy-note span {
  color: var(--accent-ink-soft);
  font-size: 12px;
}

.learning-overview {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) repeat(3, minmax(130px, 0.75fr));
  margin-bottom: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.compliance-score {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.compliance-score > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compliance-score > div:last-child > span,
.learning-stat > span {
  color: var(--muted);
  font-size: 13px;
}

.compliance-score > div:last-child > strong {
  font-size: 15px;
}

.compliance-score > div:last-child > small,
.learning-stat > small {
  font-size: 12px;
}

.learning-ring {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  background: conic-gradient(var(--accent) 0 93%, var(--ring-track) 93% 100%);
}

.learning-ring::after {
  inset: 7px;
}

.learning-ring strong {
  font-size: 16px;
}

.learning-ring span {
  font-size: 11px;
}

.learning-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.learning-stat:last-child {
  border-right: 0;
}

.learning-stat > strong {
  font-size: 22px;
}

.event-row {
  display: grid;
  min-height: 74px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  transition: background 140ms ease;
}

.event-row:hover,
.event-row:focus-visible {
  background: var(--surface);
}

.event-date {
  display: flex;
  width: 44px;
  height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.event-date strong {
  font-size: 17px;
}

.event-date span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.event-row > div:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.event-row > div:nth-child(2) > strong {
  font-size: 14px;
}

.event-row > div:nth-child(2) > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.event-row > div:nth-child(2) svg {
  width: 13px;
  height: 13px;
}

.action-list {
  border-top: 1px solid var(--line);
}

.action-list button {
  display: grid;
  width: 100%;
  min-height: 64px;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.action-list button > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.action-list button > span:nth-child(2) strong {
  font-size: 14px;
}

.action-list button > span:nth-child(2) small {
  font-size: 12px;
}

.action-list button > svg {
  width: 15px;
  color: var(--muted);
}

.service-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.service-summary > div {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-right: 1px solid var(--line);
}

.service-summary > div:last-child {
  border-right: 0;
}

.service-summary span {
  color: var(--muted);
  font-size: 13px;
}

.service-summary strong {
  font-size: 20px;
}

.priority {
  display: inline-flex;
  width: 26px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 780;
}

.priority.p2 {
  background: var(--amber-soft);
  color: var(--amber);
}

.priority.p3 {
  background: var(--blue-soft);
  color: var(--blue);
}

.priority.p4 {
  background: var(--surface-strong);
  color: var(--muted);
}

.sla {
  font-size: 13px;
  font-weight: 680;
}

.sla.safe {
  color: var(--accent);
}

.sla.risk {
  color: var(--red);
}

.sla-risk {
  box-shadow: inset 3px 0 0 var(--amber);
}

.publication-list {
  border-top: 1px solid var(--line);
}

.publication-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 36px;
  align-items: start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.publication-type {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.publication-type.directive {
  background: var(--amber-soft);
  color: var(--amber);
}

.publication-type.news {
  background: var(--blue-soft);
  color: var(--blue);
}

.publication-type.policy {
  background: var(--red-soft);
  color: var(--red);
}

.publication-content > span {
  color: var(--muted);
  font-size: 12px;
}

.publication-content > span b {
  color: var(--accent);
}

.publication-content h2 {
  margin: 6px 0 5px;
  font-size: 15px;
}

.publication-content p {
  max-width: 760px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.publication-content > div {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 12px;
}

.publication-content > div span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.publication-content > div svg {
  width: 13px;
  height: 13px;
}

.report-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.report-tabs button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.report-tabs button.is-active,
.report-tabs button:hover {
  background: var(--surface);
  color: var(--accent);
}

.line-chart {
  display: grid;
  height: 230px;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 6px 0;
}

.chart-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 24px;
  color: var(--muted);
  font-size: 11px;
}

.chart-area {
  position: relative;
  min-width: 0;
  padding-bottom: 24px;
}

.gridline {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
}

.chart-area svg {
  position: absolute;
  z-index: 1;
  inset: 0 0 24px;
  width: 100%;
  height: calc(100% - 24px);
  overflow: visible;
}

.chart-area polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.chart-area circle {
  fill: var(--data-surface);
  stroke: var(--accent);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.chart-x {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.turnover-section {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.big-number {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--line);
}

.big-number strong {
  font-size: 34px;
}

.big-number span {
  color: var(--muted);
  font-size: 13px;
}

.report-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.report-list button {
  display: grid;
  min-height: 86px;
  grid-template-columns: 38px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}

.report-list button:hover {
  border-color: var(--line-hover);
}

.report-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.report-list button > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.report-list button > span:nth-child(2) strong,
.report-list button > span:nth-child(2) small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-list button > span:nth-child(2) strong {
  font-size: 13px;
}

.report-list button > span:nth-child(2) small,
.report-list button > b {
  color: var(--muted);
  font-size: 11px;
}

.report-list button > svg {
  width: 14px;
  color: var(--muted);
}

.integration-health {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 17px 19px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-tint);
}

.health-overview {
  display: flex;
  align-items: center;
  gap: 13px;
}

.health-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}

.health-icon svg {
  width: 22px;
  height: 22px;
}

.health-overview > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.health-overview strong {
  font-size: 14px;
}

.health-overview span {
  color: var(--accent-ink-soft);
  font-size: 12px;
}

.integration-health dl {
  display: flex;
  margin: 0;
}

.integration-health dl > div {
  min-width: 96px;
  padding: 0 15px;
  border-left: 1px solid var(--accent-line);
}

.integration-health dt {
  color: var(--accent-ink-soft);
  font-size: 11px;
}

.integration-health dd {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 740;
}

.integration-table .system-cell {
  min-width: 160px;
}

.exchange-log {
  margin-top: 24px;
}

.log-line {
  display: grid;
  min-height: 48px;
  grid-template-columns: 100px minmax(200px, 1.2fr) minmax(160px, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.log-line time,
.log-line > span:nth-child(3) {
  color: var(--muted);
}

.settings-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 30px;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.settings-nav button {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.settings-nav button:hover,
.settings-nav button.is-active {
  background: var(--surface);
  color: var(--accent);
}

.settings-content {
  min-width: 0;
}

.policy-note {
  margin-top: 18px;
}

.detail-drawer {
  position: fixed;
  z-index: 70;
  top: var(--shell-gap);
  right: var(--shell-gap);
  display: flex;
  width: min(470px, calc(100vw - 2 * var(--shell-gap)));
  height: calc(100% - 2 * var(--shell-gap));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--pane-solid-top), var(--pane-solid-bottom));
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + var(--shell-gap) + 12px));
  transition: transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.detail-drawer.is-open {
  transform: translateX(0);
}

.workflow-drawer {
  z-index: 72;
}

.workflow-drawer-icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.workflow-drawer-icon svg {
  width: 21px;
  height: 21px;
}

.workflow-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.workflow-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.workflow-summary > div {
  display: flex;
  min-width: 0;
  min-height: 68px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow-summary > div:nth-child(2n) {
  border-right: 0;
}

.workflow-summary > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.workflow-summary span,
.workflow-section > p,
.workflow-item small,
.workflow-audit small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workflow-summary strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.workflow-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.workflow-section > h3 {
  margin: 0;
  font-size: 14px;
}

.workflow-list {
  border-top: 1px solid var(--line);
}

.workflow-item {
  display: grid;
  min-height: 58px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

button.workflow-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
}

button.workflow-item:hover {
  background: var(--surface-muted);
}

.workflow-item > span:first-child {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
}

.workflow-item > span:first-child svg {
  width: 15px;
  height: 15px;
}

.workflow-item > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.workflow-item strong {
  font-size: 13px;
}

.workflow-item > svg {
  width: 15px;
  color: var(--muted);
}

.workflow-audit {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
}

.workflow-audit + .workflow-audit {
  margin-top: 2px;
}

.workflow-audit > i {
  position: relative;
  z-index: 1;
  display: block;
  width: 9px;
  height: 9px;
  margin: 4px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-line-strong);
}

.workflow-audit:not(:last-child)::after {
  position: absolute;
  top: 16px;
  bottom: -7px;
  left: 8px;
  width: 1px;
  background: var(--line);
  content: "";
}

.workflow-audit div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 12px;
}

.workflow-audit strong {
  font-size: 13px;
}

.drawer-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.drawer-form .full {
  grid-column: 1 / 3;
}

.file-drop {
  display: flex;
  min-height: 126px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px dashed var(--accent-line-strong);
  border-radius: var(--radius);
  background: var(--accent-tint);
  color: var(--muted);
  text-align: center;
}

.file-drop svg {
  width: 24px;
  color: var(--accent);
}

.file-drop strong {
  color: var(--ink);
  font-size: 14px;
}

.file-drop input {
  max-width: 100%;
  font-size: 13px;
}

.bulk-bar {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-tint);
}

.bulk-bar[hidden] {
  display: none;
}

.bulk-bar strong {
  margin-right: auto;
  font-size: 13px;
}

.settings-control-list {
  border-top: 1px solid var(--line);
}

.settings-control {
  display: grid;
  min-height: 64px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.settings-control > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-control strong {
  font-size: 13px;
}

.settings-control span {
  color: var(--muted);
  font-size: 12px;
}

.switch-control {
  position: relative;
  width: 36px;
  height: 20px;
  border: 0;
  border-radius: 16px;
  background: var(--switch-off);
}

.switch-control::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(20, 30, 28, 0.24);
  content: "";
  transition: transform 150ms ease;
}

.switch-control.is-on {
  background: var(--accent);
}

.switch-control.is-on::after {
  transform: translateX(16px);
}

.is-processing svg {
  animation: spin 900ms linear infinite;
}

.row-flash {
  animation: row-flash 1.6s ease;
}

.empty-state {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 26px;
}

.empty-state strong {
  color: var(--ink);
  font-size: 14px;
}

.workflow-drawer .drawer-footer button[hidden] {
  display: none;
}

.drawer-scrim,
.mobile-scrim {
  position: fixed;
  z-index: 60;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: saturate(80%) blur(14px);
  -webkit-backdrop-filter: saturate(80%) blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.drawer-scrim.is-open {
  opacity: 0.7;
  pointer-events: auto;
}

.drawer-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-heading h2 {
  font-size: 16px;
}

.drawer-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.drawer-tabs {
  display: flex;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-tabs button {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.drawer-tabs button.is-active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.drawer-body {
  flex: 1;
  padding: 20px;
  overflow: auto;
}

.profile-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.drawer-body h3 {
  margin: 20px 0 8px;
}

.drawer-highlight {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-tint);
}

.drawer-highlight > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.drawer-highlight strong {
  font-size: 13px;
}

.drawer-highlight span {
  color: var(--muted);
  font-size: 12px;
}

.document-row {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.document-row > span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--accent);
}

.document-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.document-row strong {
  font-size: 13px;
}

.document-row small {
  font-size: 11px;
}

.document-row > svg {
  width: 14px;
  color: var(--muted);
}

.drawer-footer,
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
}

.dialog-footer.split {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
}

dialog {
  color: var(--ink);
}

.app-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-dialog::backdrop,
.search-dialog::backdrop {
  background: var(--scrim);
  backdrop-filter: saturate(80%) blur(14px);
  -webkit-backdrop-filter: saturate(80%) blur(14px);
}

.app-dialog[open],
.search-dialog[open] {
  animation: dialog-in 180ms ease both;
}

.app-dialog form {
  display: flex;
  max-height: inherit;
  flex-direction: column;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-heading h2 {
  font-size: 17px;
}

.dialog-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.dialog-body {
  padding: 20px;
  overflow: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.form-field.full,
.form-note.full,
.entitlement-preview.full {
  grid-column: 1 / 3;
}

.form-field > span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 680;
}

.form-field > label {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 680;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}

.form-field textarea {
  resize: vertical;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.leave-employee-field {
  position: relative;
  z-index: 40;
}

.employee-combobox {
  position: relative;
}

.employee-combobox > svg {
  position: absolute;
  z-index: 1;
  top: 11px;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.form-field .employee-combobox > input {
  padding-right: 42px;
  padding-left: 36px;
}

.combobox-clear {
  position: absolute;
  z-index: 2;
  top: 5px;
  right: 5px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.combobox-clear:hover,
.combobox-clear:focus-visible {
  background: var(--data-surface-muted);
  color: var(--ink);
}

.combobox-clear svg {
  width: 14px;
  height: 14px;
}

.employee-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 254px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--data-surface);
  box-shadow: var(--shadow);
}

.employee-suggestions[hidden] {
  display: none;
}

.employee-suggestion {
  display: grid;
  width: 100%;
  min-height: 54px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.employee-suggestion:hover,
.employee-suggestion.is-active,
.employee-suggestion[aria-selected="true"] {
  background: var(--accent-tint);
}

.employee-suggestion .avatar {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.employee-suggestion > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.employee-suggestion strong,
.employee-suggestion small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-suggestion strong {
  font-size: 13px;
}

.employee-suggestion small,
.employee-suggestion > span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.employee-suggestion-empty {
  margin: 0;
  padding: 14px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

#leaveDialog .dialog-body {
  overflow: visible;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent-line-strong);
  box-shadow: 0 0 0 3px rgba(27, 95, 184, 0.10);
}

.form-note {
  display: flex;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 12px;
  line-height: 1.45;
}

.form-note svg {
  width: 16px;
  height: 16px;
}

.verification-check {
  display: grid;
  min-height: 54px;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.verification-check input {
  width: 16px;
  height: 16px;
}

.verification-check > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.verification-check strong {
  font-size: 13px;
}

.verification-check small {
  font-size: 11px;
}

.decision-summary {
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.decision-summary > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.decision-summary span {
  color: var(--muted);
  font-size: 11px;
}

.decision-summary strong {
  font-size: 13px;
}

.decision-summary > svg {
  width: 15px;
  color: var(--muted);
}

.decision-summary + .form-field {
  margin-bottom: 14px;
}

.entitlement-preview {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 20px;
  padding: 12px;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: var(--accent-tint);
}

.entitlement-preview span {
  color: var(--accent-ink-soft);
  font-size: 12px;
}

.entitlement-preview strong {
  font-size: 13px;
}

.entitlement-preview strong.is-negative {
  color: var(--red);
}

.search-dialog {
  width: min(620px, calc(100vw - 28px));
  margin-top: 12vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.command-search {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.command-search svg {
  color: var(--muted);
}

.command-search input {
  height: 34px;
  border: 0;
  outline: 0;
  font-size: 15px;
}

.search-results {
  max-height: 440px;
  padding: 8px;
  overflow: auto;
}

.search-results > p {
  padding: 8px 9px 5px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.search-results > button {
  display: grid;
  width: 100%;
  min-height: 50px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}

.search-results > button:hover {
  background: var(--surface-muted);
}

.search-results > button > svg {
  width: 18px;
  color: var(--accent);
}

.search-results > button > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.search-results strong {
  font-size: 14px;
}

.search-results small {
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  display: flex;
  min-width: 270px;
  max-width: calc(100vw - 32px);
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent-dark);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast svg {
  color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.case-view {
  padding-bottom: 0;
}

.case-toolbar {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 680;
}

.case-back:hover {
  color: var(--accent);
}

.case-back svg {
  width: 16px;
}

.case-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 24px;
}

.case-heading-copy {
  min-width: 0;
}

.case-heading h1 {
  max-width: 760px;
  margin-top: 6px;
  font-size: 28px;
  line-height: 1.18;
}

.case-heading p:not(.eyebrow) {
  max-width: 760px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.case-state {
  display: flex;
  min-width: 180px;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  padding-top: 8px;
}

.case-state small {
  color: var(--muted);
  font-size: 12px;
}

.case-meta-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.case-meta-strip > div {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.case-meta-strip > div:last-child {
  border-right: 0;
}

.case-meta-strip span,
.case-value span,
.case-evidence-row span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.case-meta-strip strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.case-meta-strip small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.7fr);
  margin-top: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.case-main {
  min-width: 0;
  padding: 0 28px;
}

.case-sidebar {
  min-width: 0;
  padding: 0 24px;
  border-left: 1px solid var(--line);
  background: var(--surface-muted);
}

.case-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.case-section:last-child {
  border-bottom: 0;
}

.case-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.case-section-heading h2 {
  font-size: 15px;
}

.case-section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.case-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.case-value {
  min-width: 0;
  padding: 20px;
}

.case-value strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 21px;
}

.case-value small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.case-comparison-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: var(--accent);
}

.case-comparison-arrow svg {
  width: 17px;
}

.case-evidence {
  border-top: 1px solid var(--line);
}

.case-evidence-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.case-evidence-row strong,
.case-evidence-row p {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.case-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.case-readonly-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 0;
  color: var(--muted);
  line-height: 1.5;
}

.case-readonly-note svg {
  width: 17px;
  color: var(--accent);
}

.case-timeline {
  position: relative;
  display: grid;
  gap: 22px;
}

.case-timeline::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.case-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
}

.case-timeline-item > i {
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 3px solid var(--surface-muted);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.case-timeline-item strong,
.case-timeline-item small {
  display: block;
}

.case-timeline-item strong {
  font-size: 13px;
}

.case-timeline-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.case-actionbar {
  position: sticky;
  z-index: 8;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 24px -30px 0;
  padding: 14px 30px;
  border-top: 1px solid var(--line-strong);
  background: var(--actionbar-bg);
  backdrop-filter: blur(12px);
}

.case-actionbar-copy {
  min-width: 0;
}

.case-actionbar-copy strong,
.case-actionbar-copy small {
  display: block;
}

.case-actionbar-copy strong {
  font-size: 14px;
}

.case-actionbar-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.case-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.case-empty {
  display: grid;
  min-height: 420px;
  place-items: center;
  text-align: center;
}

.case-empty > div {
  max-width: 360px;
}

.case-empty svg {
  width: 30px;
  height: 30px;
  color: var(--muted);
}

.case-empty h1 {
  margin-top: 14px;
  font-size: 20px;
}

.case-empty p {
  margin: 8px 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.domain-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.domain-summary .case-value + .case-value {
  border-left: 1px solid var(--line);
}

.record-file-list,
.process-gate-list {
  border-top: 1px solid var(--line);
}

.record-file,
.process-gate {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 36px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.record-file:hover,
button.process-gate:hover {
  background: var(--surface-muted);
}

.record-file > span:first-child,
.process-gate > span:first-child {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.record-file > span:first-child svg,
.process-gate > span:first-child svg,
.record-file > svg {
  width: 16px;
  height: 16px;
}

.record-file > div,
.process-gate > div {
  min-width: 0;
}

.record-file strong,
.record-file small,
.process-gate strong,
.process-gate small {
  display: block;
  overflow-wrap: anywhere;
}

.record-file strong,
.process-gate strong {
  font-size: 13px;
}

.record-file small,
.process-gate small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.record-file > svg {
  color: var(--muted);
}

.process-gate {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.process-gate.is-current > span:first-child {
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.process-gate.is-blocked > span:first-child,
.warning-note svg {
  background: var(--warning-soft);
  color: var(--warning);
}

.process-gate.is-done > span:first-child {
  background: var(--accent-soft);
  color: var(--accent);
}

.tabel-heading {
  min-height: 62px;
  margin-bottom: 16px;
}

.tabel-heading h1 {
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: 27px;
}

.tabel-heading > div:first-child > p:last-child {
  color: var(--muted);
  font-size: 14px;
}

.tabel-commandbar,
.tabel-filterbar,
.tabel-view-controls,
.period-control {
  display: flex;
  align-items: center;
}

.tabel-commandbar {
  min-height: 58px;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
}

.period-control {
  gap: 5px;
}

.period-control .icon-button {
  width: 32px;
  height: 32px;
  border-color: transparent;
}

.button.compact {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.period-label {
  display: flex;
  min-width: 176px;
  height: 38px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}

.period-label:hover {
  background: var(--surface-muted);
}

.period-label strong {
  font-size: 14px;
}

.period-label small {
  color: var(--muted);
  font-size: 12px;
}

.tabel-view-controls {
  gap: 8px;
}

.compact-segmented {
  min-height: 36px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.compact-segmented button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.compact-segmented button svg {
  width: 14px;
  height: 14px;
}

.compact-segmented button b {
  color: var(--amber);
}

.compact-segmented button.is-active {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(19, 32, 56, 0.12);
  color: var(--ink);
}

.tabel-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(105px, 1fr)) minmax(190px, 1.35fr);
  border: 1px solid var(--line);
  background: var(--surface);
}

.tabel-summary > div {
  display: flex;
  min-height: 68px;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 10px 16px;
  border-right: 1px solid var(--line);
}

.tabel-summary > div:last-child {
  border-right: 0;
}

.tabel-summary span,
.tabel-summary small {
  color: var(--muted);
  font-size: 12px;
}

.tabel-summary strong {
  font-size: 18px;
}

.tabel-summary strong.negative,
.grid-delta-col.negative strong {
  color: var(--red);
}

.tabel-summary strong.positive,
.grid-delta-col.positive strong {
  color: var(--accent);
}

.tabel-summary strong.attention {
  color: var(--amber);
}

.tabel-stage {
  position: relative;
  padding-right: 48px !important;
  background: var(--surface-muted);
}

.tabel-stage .icon-button {
  position: absolute;
  right: 10px;
  width: 30px;
  height: 30px;
}

.tabel-filterbar {
  gap: 8px;
  padding: 15px 0 10px;
}

.tabel-filterbar .field {
  min-height: 36px;
}

.tabel-filterbar .tabel-search {
  width: min(360px, 32%);
}

.tabel-filterbar .select-field {
  width: 190px;
}

.tabel-filterbar .tabel-edit-toggle {
  margin-left: auto;
}

.tabel-edit-toggle.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.tabel-selectionbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 14px;
  padding: 7px 10px;
  border: 1px solid var(--accent);
  border-bottom: 0;
  background: var(--accent-tint);
}

.tabel-selectionbar > strong {
  margin-right: auto;
  font-size: 14px;
}

.tabel-selectionbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.tabel-selectionbar select {
  height: 30px;
  padding: 0 26px 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  font-size: 13px;
}

.tabel-grid-wrap {
  max-height: calc(100vh - 393px);
  min-height: 372px;
  border-radius: var(--radius);
}

.tabel-selectionbar:not([hidden]) + .tabel-grid-wrap {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

#tabelGrid {
  min-width: 1240px;
  table-layout: fixed;
}

#tabelGrid.workweek-6 {
  min-width: 1382px;
}

#tabelGrid th,
#tabelGrid td {
  height: 74px;
  padding: 0;
  border-right: 1px solid var(--line);
  text-align: center;
}

#tabelGrid th {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 48px;
  background: var(--grid-head);
}

#tabelGrid th > span,
#tabelGrid th > small {
  display: block;
}

#tabelGrid th > span {
  color: var(--ink-soft);
  font-size: 13px;
}

#tabelGrid th > small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 650;
  text-transform: none;
}

#tabelGrid tbody tr:hover td {
  background-color: var(--row-hover);
}

#tabelGrid tbody tr:hover .grid-date-col.is-current {
  background-color: var(--accent-tint);
}

#tabelGrid tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 4;
  height: 46px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 0;
  background: var(--grid-head);
  color: var(--muted);
}

#tabelGrid tfoot strong,
#tabelGrid tfoot small {
  display: block;
}

#tabelGrid tfoot strong {
  color: var(--ink-soft);
  font-size: 13px;
}

#tabelGrid tfoot small {
  margin-top: 2px;
  font-size: 11px;
}

#tabelGrid .grid-select-col {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  background: var(--data-surface);
}

#tabelGrid th.grid-select-col {
  z-index: 8;
  background: var(--grid-head);
}

#tabelGrid .grid-person-col {
  position: sticky;
  left: 38px;
  z-index: 3;
  width: 226px;
  padding: 0 12px;
  background: var(--data-surface);
  text-align: left;
}

#tabelGrid th.grid-person-col {
  z-index: 8;
  background: var(--grid-head);
}

#tabelGrid .grid-person-col.month-person {
  left: 0;
  width: 250px;
}

#tabelGrid .grid-person-col .person-cell {
  min-width: 0;
}

#tabelGrid .grid-person-col .person-cell > span:last-child {
  min-width: 0;
}

#tabelGrid .grid-person-col .person-cell strong,
#tabelGrid .grid-person-col .person-cell small {
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-schedule {
  display: block;
  margin: 4px 0 0 42px;
  color: var(--muted-2);
  font-size: 11px;
}

#tabelGrid .grid-date-col {
  width: 142px;
}

#tabelGrid .grid-date-col.is-current {
  background: var(--accent-tint);
}

#tabelGrid th.grid-date-col.is-current {
  box-shadow: inset 0 3px 0 var(--accent);
}

#tabelGrid .grid-total-col,
#tabelGrid .grid-norm-col,
#tabelGrid .grid-delta-col {
  width: 88px;
}

#tabelGrid .grid-total-col strong,
#tabelGrid .grid-norm-col strong,
#tabelGrid .grid-delta-col strong {
  display: block;
  font-size: 14px;
}

#tabelGrid .grid-total-col small,
#tabelGrid .grid-norm-col small,
#tabelGrid .grid-delta-col small {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11px;
}

.grid-day-cell {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 73px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  overflow: hidden;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  text-align: left;
}

.grid-day-cell:hover {
  background: rgba(27, 95, 184, 0.045);
}

.is-editing .grid-day-cell:hover {
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--accent-soft);
}

.grid-day-cell::after {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.grid-day-cell.leave::after {
  background: var(--amber);
}

.grid-day-cell.trip::after {
  background: var(--blue);
}

.grid-day-cell.sick::after {
  background: var(--violet);
}

.grid-day-cell.off::after,
.grid-day-cell.planned::after {
  background: var(--muted-2);
}

.grid-cell-value {
  display: flex;
  align-items: center;
  gap: 5px;
}

.grid-cell-value strong {
  font-size: 14px;
}

.grid-cell-value svg {
  width: 12px;
  height: 12px;
  color: var(--red);
}

.grid-day-cell > small {
  color: var(--muted);
  font-size: 11px;
}

.grid-day-cell.leave,
.grid-day-cell.trip,
.grid-day-cell.sick,
.grid-day-cell.off {
  border-left-color: var(--line-strong);
}

.grid-day-cell.leave {
  background: var(--cell-leave);
}

.grid-day-cell.trip {
  background: var(--cell-trip);
}

.grid-day-cell.sick {
  background: var(--cell-sick);
}

.grid-day-cell.has-error {
  border-left-color: var(--red);
  background: var(--cell-error);
}

.grid-day-cell.has-pending {
  border-left-color: var(--amber);
}

.grid-day-cell.has-draft {
  border-left-color: var(--accent);
  background: var(--cell-draft);
}

.grid-cell-proposal {
  display: flex;
  width: calc(100% + 20px);
  align-items: center;
  gap: 3px;
  margin: 2px -10px -8px;
  padding: 3px 8px;
  overflow: hidden;
  border-top: 1px solid var(--amber-line);
  background: var(--proposal-amber);
  color: var(--amber);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-cell-proposal svg {
  width: 9px;
  height: 9px;
}

.grid-cell-proposal.draft,
.grid-cell-proposal.approved {
  border-top-color: var(--accent-line);
  background: var(--proposal-accent);
  color: var(--accent);
}

.grid-cell-editor {
  display: grid;
  width: 100%;
  min-height: 73px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 26px 28px;
  gap: 4px;
  padding: 5px;
  box-shadow: inset 0 0 0 2px var(--accent);
  background: var(--surface);
}

.grid-cell-editor > select {
  grid-column: 1 / 3;
  width: 100%;
  height: 26px;
  padding: 0 5px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
}

.grid-time-inputs {
  display: flex;
  min-width: 0;
  gap: 4px;
}

.grid-time-inputs label {
  min-width: 0;
  flex: 1;
}

.grid-time-inputs span {
  display: none;
}

.grid-time-inputs input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.grid-cell-editor:not([data-kind="work"]) .grid-time-inputs {
  visibility: hidden;
}

.grid-editor-actions {
  display: flex;
  gap: 3px;
}

.grid-editor-actions button {
  display: grid;
  width: 24px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.grid-editor-actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.grid-editor-actions svg {
  width: 12px;
  height: 12px;
}

#tabelGrid .grid-month-week {
  width: 148px;
}

.month-workload {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px;
  text-align: left;
}

.month-workload strong {
  font-size: 14px;
}

.month-workload > span {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-strong);
}

.month-workload > span i {
  display: block;
  width: var(--load);
  height: 100%;
  background: var(--accent);
}

.month-workload small {
  color: var(--muted);
  font-size: 11px;
}

.tabel-grid-footer {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tabel-grid-footer .timesheet-legend {
  padding: 0;
}

.legend-swatch.sick {
  background: var(--violet-soft);
}

.legend-swatch.pending {
  box-shadow: inset 3px 0 0 var(--amber);
  background: var(--surface);
}

.grid-source-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.grid-source-state svg {
  width: 12px;
  height: 12px;
}

.status.danger {
  background: var(--red-soft);
  color: var(--red);
}

.tabel-draftbar {
  position: sticky;
  z-index: 12;
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  bottom: 10px;
  display: grid;
  min-height: 62px;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.6fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(19, 32, 56, 0.16);
}

.tabel-draftbar > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tabel-draftbar > div > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tabel-draftbar small {
  color: var(--muted);
  font-size: 11px;
}

.draft-count {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.draft-basis {
  min-height: 38px;
}

.time-empty {
  margin-top: 10px;
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes row-flash {
  0%,
  45% {
    background: var(--accent-tint);
  }
  100% {
    background: transparent;
  }
}

@media (max-width: 1240px) {
  .search-trigger {
    width: 250px;
  }

  .profile-control {
    min-width: auto;
  }

  .profile-copy {
    display: none;
  }

  .dashboard-grid,
  .two-column,
  .report-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.8fr);
  }

  .workforce-layout {
    gap: 24px;
  }

  .bar-row {
    grid-template-columns: 150px minmax(90px, 1fr) 32px;
  }

  .context-band {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  }

  .context-band > div {
    border-right: 0;
  }

  .context-band > .status {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .report-list {
    grid-template-columns: 1fr;
  }

  .org-layout.is-editing {
    grid-template-columns: minmax(220px, 0.54fr) minmax(440px, 1.46fr);
  }

  .org-editor-body {
    grid-template-columns: 1fr;
  }

  .org-editor-settings {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 1100px) {
  .module-workspace-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .module-focus {
    margin-bottom: 26px;
  }

  .org-layout.is-editing {
    grid-template-columns: 1fr;
  }

  .org-layout.is-editing .org-tree {
    max-height: 300px;
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 1020px) {
  .app-shell {
    display: block;
  }

  .module-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 32;
    width: 78px;
    border-radius: 0;
    transform: translateX(-105%);
  }

  .module-rail.is-mobile-open {
    transform: translateX(0);
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 78px;
    z-index: 31;
    width: min(278px, calc(100vw - 78px));
    border-radius: 0;
    box-shadow: 18px 0 45px rgba(19, 32, 56, 0.15);
    transform: translateX(calc(-100% - 78px));
  }

  .sidebar.is-mobile-open {
    transform: translateX(0);
  }

  .sidebar-is-collapsed .sidebar {
    width: min(278px, calc(100vw - 78px));
  }

  .sidebar-is-collapsed .brand {
    min-height: 104px;
    align-items: flex-start;
    padding: 13px 16px 12px;
  }

  .sidebar-is-collapsed .brand-identity img {
    width: 42px;
    height: 44px;
    flex-basis: 42px;
    object-fit: contain;
  }

  .sidebar-is-collapsed .brand-name,
  .sidebar-is-collapsed .brand-product,
  .sidebar-is-collapsed .nav-label,
  .sidebar-is-collapsed .nav-item span,
  .sidebar-is-collapsed .system-state div {
    display: initial;
  }

  .sidebar-is-collapsed .brand-name {
    display: flex;
  }

  .sidebar-is-collapsed .nav-item {
    display: grid;
    justify-content: initial;
  }

  .sidebar-is-collapsed .sidebar-footer {
    flex-direction: row;
  }

  .sidebar-collapse {
    display: none;
  }

  .process-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-line > span:nth-child(2) {
    border-right: 0;
  }

  .process-line > span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .mobile-menu {
    display: inline-flex;
  }

  .mobile-scrim {
    z-index: 25;
  }

  .mobile-scrim.is-open {
    opacity: 0.7;
    pointer-events: auto;
  }

  .view {
    padding-right: 22px;
    padding-left: 22px;
  }

  .search-trigger {
    width: 210px;
  }

  .dashboard-grid,
  .two-column,
  .report-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .today-section,
  .balance-panel,
  .turnover-section {
    padding-left: 0;
    border-left: 0;
  }

  .attendance-ring-wrap {
    grid-template-columns: 150px 220px;
  }

  .learning-overview {
    grid-template-columns: repeat(3, 1fr);
  }

  .compliance-score {
    grid-column: 1 / 4;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .org-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .integration-health {
    align-items: flex-start;
    flex-direction: column;
  }

  .integration-health dl > div:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .case-layout {
    grid-template-columns: 1fr;
  }

  .case-sidebar {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 1480px) {
  .module-command-anchor {
    flex: 0 0 auto;
  }

  .module-command-toggle {
    display: inline-flex;
  }

  .module-commandbar {
    position: absolute;
    top: 47px;
    right: 0;
    display: none;
    width: min(560px, calc(100vw - 390px));
    max-width: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--data-surface);
    box-shadow: var(--shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .module-commandbar.is-open {
    display: flex;
  }

  .module-context-search {
    width: auto;
  }

  .module-context-controls {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-context-field,
  .module-context-action,
  .module-context-status {
    width: 100%;
    max-width: none;
  }

  .module-context-field select {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 760px) {
  :root {
    --topbar-height: 58px;
  }

  .topbar {
    padding: 0 14px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .module-commandbar {
    position: fixed;
    top: 70px;
    right: 14px;
    width: min(420px, calc(100vw - 28px));
    flex-direction: column;
    align-items: stretch;
  }

  .module-context-search {
    flex: 0 0 38px;
  }

  .module-context-controls {
    grid-template-columns: 1fr;
  }

  .search-trigger {
    width: 36px;
    height: 36px;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .search-trigger span,
  .search-trigger kbd,
  .language-switch {
    display: none;
  }

  .profile-control {
    min-width: 38px;
    padding: 2px;
  }

  .profile-control > svg {
    display: none;
  }

  .role-language-switch {
    display: grid;
  }

  .breadcrumbs > span,
  .breadcrumbs > svg {
    display: none;
  }

  .view {
    padding: 20px 14px 40px;
  }

  .module-page-heading {
    flex-direction: column;
    gap: 14px;
  }

  .module-page-heading .heading-actions {
    width: 100%;
  }

  .module-page-heading .heading-actions .button {
    flex: 1;
  }

  .module-health {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .module-health > .status {
    display: none;
  }

  .module-section-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .module-register .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .module-filter {
    width: auto;
    flex: 1 1 190px;
  }

  .module-queue .request-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .module-queue .request-row .button {
    grid-column: 2;
    justify-self: start;
  }

  .case-view {
    padding-bottom: 0;
  }

  .case-toolbar {
    margin-bottom: 12px;
  }

  .case-heading {
    flex-direction: column;
    gap: 10px;
    padding-bottom: 18px;
  }

  .case-heading h1 {
    font-size: 23px;
  }

  .case-state {
    min-width: 0;
    align-items: flex-start;
    padding-top: 0;
  }

  .case-meta-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-meta-strip > div:nth-child(2) {
    border-right: 0;
  }

  .case-meta-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .case-layout {
    margin-top: 18px;
  }

  .case-main,
  .case-sidebar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .case-comparison {
    grid-template-columns: 1fr;
  }

  .case-comparison-arrow {
    min-height: 34px;
    border-top: 1px solid var(--line);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .case-comparison-arrow svg {
    transform: rotate(90deg);
  }

  .domain-summary .case-value + .case-value {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .record-file,
  .process-gate {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .record-file > .status {
    display: none;
  }

  .record-file > svg {
    grid-column: 3;
  }

  .case-evidence-row,
  .case-form-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .case-actionbar {
    align-items: stretch;
    flex-direction: column;
    margin-right: -14px;
    margin-left: -14px;
    padding: 12px 14px;
  }

  .case-actions {
    width: 100%;
  }

  .case-actions .button {
    flex: 1 1 0;
    justify-content: center;
  }

  #view-employee-time .table-wrap th:last-child,
  #view-employee-time .table-wrap td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background: var(--surface);
    box-shadow: -8px 0 12px rgba(19, 32, 56, 0.06);
  }

  #view-employee-time .table-wrap thead th:last-child {
    z-index: 3;
    background: var(--surface-muted);
  }

  #view-employee-time .table-wrap .row-attention td:last-child {
    background: var(--amber-tint);
  }

  .page-heading {
    min-height: 0;
    flex-direction: column;
    gap: 14px;
  }

  .page-heading h1 {
    font-size: 23px;
  }

  .heading-actions {
    width: 100%;
    overflow-x: auto;
  }

  #view-organization .heading-actions {
    flex-wrap: wrap;
    overflow: visible;
  }

  #view-organization .heading-actions .button {
    flex: 1 1 calc(50% - 4px);
  }

  #view-organization .heading-actions .button.primary {
    flex-basis: 100%;
  }

  .metric-strip,
  .metric-strip.metrics-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .metric {
    padding: 14px 12px;
  }

  .metric > strong {
    font-size: 21px;
  }

  .task-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .task-row > .status {
    display: none;
  }

  .task-row > .button {
    grid-column: 2 / 4;
    justify-self: start;
  }

  .attendance-ring-wrap {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .attendance-ring {
    width: 108px;
    height: 108px;
  }

  .attendance-ring::after {
    inset: 10px;
  }

  .workforce-layout {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 120px minmax(80px, 1fr) 28px;
  }

  .workforce-summary {
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .manager-panel .request-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .manager-panel .request-row > .status {
    display: none;
  }

  .time-queue-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
  }

  .toolbar .search-field,
  .toolbar .search-field.wide {
    order: -1;
    width: 100%;
    margin-left: 0;
  }

  .select-field {
    min-width: 150px;
    flex: 1;
  }

  .org-layout,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .org-layout.is-editing {
    grid-template-columns: 1fr;
  }

  .org-layout.is-editing .org-tree {
    max-height: 310px;
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .org-inline-editor {
    min-height: 620px;
  }

  .org-editor-header,
  .org-editor-context,
  .org-editor-settings,
  .org-editor-team,
  .org-editor-ledger,
  .org-editor-footer {
    padding-right: 14px;
    padding-left: 14px;
  }

  .org-editor-context {
    align-items: flex-start;
    flex-direction: column;
  }

  .org-editor-field-row {
    grid-template-columns: 1fr;
  }

  .org-inline-team-row {
    grid-template-columns: 18px 30px minmax(0, 1fr);
  }

  .org-inline-manager {
    grid-column: 3;
  }

  .org-editor-footer {
    grid-template-columns: 1fr 1fr;
  }

  .org-editor-footer > span {
    display: none;
  }

  .org-editor-footer .button {
    width: 100%;
  }

  .inspector {
    display: block;
  }

  .org-draftbar {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .org-draftbar > .status {
    justify-self: end;
  }

  .org-draftbar > .button {
    width: 100%;
  }

  .org-draftbar > .button.secondary {
    grid-column: 1 / 3;
  }

  .org-draftbar > .button.primary {
    grid-column: 3;
  }

  .org-member-option {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .context-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .context-band > div {
    padding: 8px 0;
  }

  .context-band > .status {
    grid-column: 1 / 3;
    grid-row: auto;
    margin: 8px 0 0;
  }

  .process-steps {
    grid-template-columns: repeat(9, auto);
    max-width: 100%;
  }

  .pipeline-summary {
    grid-template-columns: repeat(5, 130px);
    overflow: auto;
  }

  .learning-overview {
    grid-template-columns: repeat(2, 1fr);
  }

  .compliance-score {
    grid-column: 1 / 3;
  }

  .learning-stat {
    border-bottom: 1px solid var(--line);
  }

  .service-summary {
    grid-template-columns: repeat(5, 130px);
    overflow: auto;
  }

  .publication-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .publication-row > .icon-button {
    display: none;
  }

  .report-tabs {
    overflow-x: auto;
  }

  .integration-health dl {
    width: 100%;
    overflow: auto;
  }

  .log-line {
    grid-template-columns: 90px minmax(150px, 1fr);
    padding: 9px 0;
  }

  .log-line > span:nth-child(3),
  .log-line time {
    grid-column: 2;
  }

  .settings-nav {
    flex-direction: row;
    padding: 0 0 10px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-nav button {
    flex: 0 0 auto;
  }

  .notification-popover {
    position: fixed;
    top: 58px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .drawer-form {
    grid-template-columns: 1fr;
  }

  .drawer-form .full {
    grid-column: 1;
  }

  .form-field.full,
  .form-note.full,
  .entitlement-preview.full {
    grid-column: 1;
  }

  .dialog-footer.split {
    display: flex;
    flex-wrap: wrap;
  }

  .dialog-footer.split span {
    display: none;
  }
}

@media (max-width: 480px) {
  .topbar {
    gap: 8px;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .page-heading p:not(.eyebrow) {
    font-size: 14px;
  }

  .heading-actions .button {
    flex: 1;
  }

  .task-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .task-row > .button {
    grid-column: 2;
  }

  .attendance-ring-wrap {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .attendance-ring {
    width: 92px;
    height: 92px;
  }

  .attendance-ring strong {
    font-size: 19px;
  }

  .bar-row {
    grid-template-columns: 100px minmax(70px, 1fr) 26px;
    gap: 8px;
  }

  .context-band {
    grid-template-columns: 1fr;
  }

  .context-band > .status {
    grid-column: 1;
  }

  .request-row {
    grid-template-columns: 34px minmax(0, 1fr) 32px;
  }

  .request-row .status {
    display: none;
  }

  .learning-overview {
    grid-template-columns: 1fr;
  }

  .compliance-score {
    grid-column: 1;
  }

  .learning-stat {
    border-right: 0;
  }

  .publication-content > div {
    gap: 9px;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
  }
}

@media (max-width: 1020px) {
  .tabel-commandbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tabel-view-controls {
    justify-content: space-between;
  }

  .tabel-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .tabel-summary > div:nth-child(3) {
    border-right: 0;
  }

  .tabel-summary > div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .tabel-filterbar {
    flex-wrap: wrap;
  }

  .tabel-filterbar .tabel-search {
    width: 100%;
  }

  .tabel-filterbar .tabel-edit-toggle {
    margin-left: 0;
  }

  .tabel-draftbar {
    grid-template-columns: minmax(200px, 1fr) minmax(260px, 1.3fr);
  }

  .tabel-draftbar > .button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .tabel-heading {
    margin-bottom: 12px;
  }

  .tabel-heading .heading-actions {
    display: none;
  }

  .period-control {
    justify-content: space-between;
  }

  .period-label {
    min-width: 0;
    flex: 1;
  }

  .tabel-view-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-segmented {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
  }

  .compact-segmented button {
    justify-content: center;
  }

  .tabel-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .tabel-summary > div {
    min-height: 58px;
    padding: 8px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .tabel-summary > div:nth-child(2n) {
    border-right: 0;
  }

  .tabel-summary > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .tabel-filterbar .select-field {
    width: calc(50% - 4px);
    min-width: 0;
  }

  .tabel-filterbar .tabel-edit-toggle {
    flex: 1;
  }

  .tabel-selectionbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .tabel-selectionbar > strong {
    width: 100%;
  }

  .tabel-selectionbar label {
    flex: 1;
  }

  .tabel-selectionbar select {
    min-width: 0;
    flex: 1;
  }

  .tabel-grid-wrap {
    max-height: 520px;
    min-height: 360px;
  }

  #tabelGrid {
    min-width: 1320px;
  }

  .grid-source-state {
    display: none;
  }

  .tabel-grid-footer {
    min-height: 50px;
  }

  .tabel-grid-footer .timesheet-legend {
    gap: 10px;
  }

  .tabel-draftbar {
    position: relative;
    bottom: auto;
    grid-template-columns: 1fr 1fr;
  }

  .tabel-draftbar > div,
  .tabel-draftbar .draft-basis {
    grid-column: 1 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Organization chart: responsive ---- */
@media (max-width: 1020px) {
  .org-card {
    width: 240px;
  }
}

@media (max-width: 760px) {
  .org-canvas-bar {
    margin-bottom: 10px;
    padding: 8px 10px;
  }

  .org-chart {
    padding: 16px 12px 20px;
  }

  /* one card per row so metrics stay legible on a phone */
  .org-row {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .org-card {
    width: 100%;
  }

  .org-connector {
    height: 18px;
  }

  .org-breadcrumb {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .org-breadcrumb button {
    white-space: nowrap;
  }
}

/* ---- Vacancy authorization ---- */
.vacancy-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.vacancy-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.vacancy-counter {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.vacancy-counter b {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.vacancy-counter i {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.vacancy-counter.is-muted b {
  color: var(--muted);
}

.vacancy-table tbody tr {
  cursor: pointer;
}

.vacancy-table tbody tr:hover {
  background: var(--surface-muted);
}

.vacancy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 760px) {
  .vacancy-counters {
    gap: 14px;
  }
}

.form-field textarea.is-required,
.form-field input.is-required {
  border-color: var(--red);
  background: var(--red-soft);
}

.case-empty-note {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ---- Organization unit: vacant-seat banner ---- */
.unit-vacancy-banner {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--muted-2);
  border-radius: var(--radius);
  background: var(--surface);
}

.unit-vacancy-banner.is-actionable {
  border-color: var(--amber-line);
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.unit-vacancy-banner > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.unit-vacancy-banner strong {
  font-size: 14px;
}

.unit-vacancy-banner small {
  color: var(--muted);
  font-size: 12px;
}

.unit-vacancy-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--muted);
}

.unit-vacancy-banner.is-actionable .unit-vacancy-icon {
  background: var(--surface);
  color: var(--amber);
}

.case-meta-strip strong.is-vacant {
  color: var(--amber);
}

@media (max-width: 760px) {
  .unit-vacancy-banner {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .unit-vacancy-banner .button {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

.org-draftbar.is-applied {
  border-color: var(--accent-line);
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.org-draftbar.is-applied .org-draft-icon {
  border-color: var(--accent-line);
  color: var(--accent);
}

/* ---- Org card: select overlay + view action ---- */
.org-card {
  position: relative;
}

.org-card-select {
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.org-card > .org-card-top,
.org-card > .org-card-metrics,
.org-card > .org-card-bar,
.org-card > .org-card-foot {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.org-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.org-card-view {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  pointer-events: auto;
}

.org-card-view:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.org-card-view.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.org-card-view svg {
  width: 13px;
  height: 13px;
}

/* ---- Staff hierarchy panel ---- */
.org-staff-panel {
  margin: 0 18px 22px;
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

.org-staff-panel[hidden] {
  display: none;
}

.org-staff-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.org-staff-head > div:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.org-staff-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.org-staff-head strong {
  font-size: 16px;
}

.org-staff-head small {
  color: var(--muted);
  font-size: 12px;
}

.org-staff-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.org-staff-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .org-staff-panel {
    margin: 0 12px 18px;
    padding: 14px;
  }

  .org-staff-branch {
    margin-left: 12px;
    padding-left: 12px;
  }

  .org-staff-branch > .org-staff-node::before {
    left: -12px;
    width: 9px;
  }
}

/* ---- Staff chart: top-down, mirrors the department chart ---- */
.staff-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0 4px;
  overflow-x: auto;
}

.staff-level {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.staff-level-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.staff-row {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
}

.staff-connector {
  width: 1px;
  height: 22px;
  flex: 0 0 auto;
  background: linear-gradient(to bottom, var(--line-strong), var(--line));
}

.staff-card {
  display: flex;
  width: 190px;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 12px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.staff-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(19, 32, 56, 0.09);
  transform: translateY(-1px);
}

.staff-card.is-leader {
  border-color: var(--accent);
  border-width: 2px;
  padding: 13px 11px 11px;
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%);
}

.staff-card-avatar {
  width: 46px;
  height: 46px;
  margin-bottom: 5px;
  font-size: 16px;
}

.staff-card-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 680;
  line-height: 1.3;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.staff-card-role {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.staff-card-tag {
  margin-top: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
}

.staff-card-reports {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  width: 100%;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.staff-card-reports svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 760px) {
  .staff-card {
    width: 100%;
  }

  .staff-row {
    width: 100%;
    flex-direction: column;
  }
}

/* ---- Staffing-unit recruitability check ---- */
.unit-check {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.unit-check.is-ok {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.unit-check.is-blocked {
  border-color: var(--red-line);
  background: var(--red-soft);
}

.unit-check > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.unit-check strong {
  font-size: 14px;
}

.unit-check small {
  color: var(--muted);
  font-size: 12px;
}

.unit-check-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface);
}

.unit-check.is-ok .unit-check-icon {
  color: var(--accent);
}

.unit-check.is-blocked .unit-check-icon {
  color: var(--red);
}

.unit-check-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
}

/* ---- Interactive chart editing ---- */
[data-org-chart-edit].is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.org-canvas.is-editing {
  background: repeating-linear-gradient(
    45deg,
    var(--surface-muted),
    var(--surface-muted) 12px,
    var(--edit-hatch) 12px,
    var(--edit-hatch) 24px
  );
}

.org-canvas.is-editing .org-card {
  border-style: dashed;
}

.org-canvas.is-editing .org-card.is-selected,
.org-canvas.is-editing .org-card.is-draft {
  border-style: solid;
}

/* ---- Chart editing: drag handle, menu, drop targets ---- */
.org-card-tools {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  pointer-events: auto;
}

.org-drag-handle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: grab;
}

.org-drag-handle svg {
  width: 14px;
  height: 14px;
}

.org-tool {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  margin-left: auto;
}

.org-tool:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.org-tool svg {
  width: 15px;
  height: 15px;
}

.org-card[draggable="true"] {
  cursor: grab;
}

.org-card.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.org-card.is-drop-target {
  border-color: var(--accent);
  border-style: solid;
  border-width: 2px;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.org-drop-slot {
  display: none;
  width: 6px;
  align-self: stretch;
  border-radius: 999px;
  background: transparent;
}

.org-chart.is-dragging .org-drop-slot {
  display: block;
  background: var(--line-strong);
}

.org-chart.is-dragging .org-drop-slot.is-drop-target {
  width: 10px;
  background: var(--accent);
}

/* ================= iOS glass kit ================= */

/* translucent chrome surfaces */
.detail-drawer,
dialog,
.notification-popover,
.role-selector-menu,
.toast,
.context-band,
.org-canvas-bar,
.org-staff-panel,
.case-meta-strip,
.inspector,
.org-card,
.staff-card,
.vacancy-toolbar,
.org-draftbar,
.unit-vacancy-banner,
.unit-check {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.role-selector-menu,
.notification-popover {
  background: var(--data-surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* data surfaces stay opaque so numbers keep full contrast */
table,
thead,
tbody,
tr,
th,
td,
.tabel-grid,
.timesheet-grid {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* keep data rows opaque without overriding component-specific sticky cells */
.table-wrap > table > thead th {
  background: var(--data-surface-muted);
}

.table-wrap > table > tbody > tr {
  background: var(--data-surface);
}

/* elevation: iOS uses soft, wide, low-opacity shadows */
.org-card,
.staff-card,
.inspector,
.case-section,
.org-staff-panel {
  box-shadow: var(--shadow-sm);
}

/* buttons: pill-adjacent, springy */
.button {
  border-radius: 12px;
  transition: transform 140ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 140ms ease, background 140ms ease;
}

.button:active {
  transform: scale(0.97);
}

.button.primary {
  box-shadow: 0 4px 14px rgba(27, 95, 184, 0.28);
}

.icon-button {
  border-radius: 12px;
  transition: transform 140ms cubic-bezier(0.22, 1, 0.36, 1), background 140ms ease;
}

.icon-button:active {
  transform: scale(0.94);
}

/* segmented control — the iOS pattern */
.segmented {
  padding: 3px;
  border-radius: 12px;
  background: rgba(120, 132, 128, 0.12);
  border: 0;
}

.segmented button {
  border-radius: 9px;
  border: 0;
  background: transparent;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.segmented button.is-active {
  background: var(--data-surface);
  box-shadow: 0 1px 4px rgba(19, 32, 56, 0.14);
}

/* status pills */
.status {
  border-radius: 999px;
}

/* inputs */
.field,
.form-field input,
.form-field select,
.form-field textarea,
input[type="search"],
input[type="text"],
input[type="date"],
input[type="number"],
select,
textarea {
  border-radius: 12px;
}

/* focus ring, iOS style */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft);
  border-color: var(--accent);
}

@media (prefers-reduced-transparency: reduce) {
  .sidebar,
  .topbar,
  .detail-drawer,
  dialog,
  .org-card,
  .inspector {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--data-surface);
  }

  .drawer-scrim,
  .mobile-scrim {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(12, 20, 33, 0.58);
  }

  :root[data-theme="dark"] .drawer-scrim,
  :root[data-theme="dark"] .mobile-scrim {
    background: rgba(0, 0, 0, 0.74);
  }
}

/* Theme toggle: the icon swaps sun/moon, so cross-fade the swap rather than
   letting it pop. */
.theme-toggle svg {
  animation: theme-icon-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes theme-icon-in {
  from {
    opacity: 0;
    transform: rotate(-45deg) scale(0.7);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.theme-toggle[aria-pressed="true"] {
  color: var(--amber);
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg {
    animation: none;
  }
}
