@font-face { font-family: "SE"; src: url("/fonts/SE-Light.woff2") format("woff2"); font-weight: 100 300; font-style: normal; font-display: swap; }
@font-face { font-family: "SE"; src: url("/fonts/SE-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "SE"; src: url("/fonts/SE-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "SE"; src: url("/fonts/SE-SemiBold.woff2") format("woff2"); font-weight: 600 900; font-style: normal; font-display: swap; }

:root {
  --brand-50:  #f0f7ff;
  --brand-100: #dbeeff;
  --brand-200: #b3d9ff;
  --brand-300: #80c0ff;
  --brand-400: #3d92e0;
  --brand-500: #0066cc;
  --brand-600: #0052a6;
  --brand-700: #003d80;
  --brand-800: #001f5e;
  --brand-900: #001338;

  --ink-50:  #f5f6f9;
  --ink-100: #e6e9ef;
  --ink-200: #d4dae5;
  --ink-300: #99a5bf;
  --ink-400: #8090ae;
  --ink-500: #66799e;
  --ink-600: #4d6288;
  --ink-700: #334c7e;
  --ink-800: #1a3468;
  --ink-900: #001f5e;

  --bg: #f5f6f9;
  --bg-accent:      radial-gradient(1000px 480px at 92% -10%, rgba(50, 194, 255, .20) 0%, transparent 62%),
                    radial-gradient(860px 420px at 4% -6%, rgba(153, 255, 207, .26) 0%, transparent 58%);
  --surface:        #ffffff;
  --surface-2:      #f7f9fc;
  --surface-3:      #eef1f7;
  --surface-sunken: #f2f4f8;
  --card-bg:        var(--surface);

  --text:   #001f5e;
  --muted:  #66799e;
  --faint:  #99a5bf;

  --border:        #e6e9ef;
  --border-strong: #d4dae5;
  --hairline:      #eef1f6;

  --primary:       var(--brand-500);
  --primary-dark:  var(--brand-800);
  --primary-light: #e6f2ff;
  --primary-tint:  rgba(0, 102, 204, .07);
  --accent:        #00a389;
  --accent-soft:   #e2f6f1;

  --success:      #0f8a5f;
  --success-soft: #e3f5ed;
  --warn:         #a86a00;
  --warn-soft:    #fff2dd;
  --danger:       #ff393c;
  --danger-soft:  #ffe9e9;
  --info:         #0066cc;
  --info-soft:    #f0f7ff;
  --purple:       #5b4bbd;
  --purple-soft:  #ecebfa;

  --c-progress:  #0f8a5f;
  --c-closing:   #c58a00;
  --c-completed: #0066cc;
  --c-cancelled: #ff393c;

  --series-0: #2d6ac1;
  --series-1: #af4803;
  --series-2: #067f5c;
  --series-3: #8e6201;
  --series-4: #ab3f70;
  --series-5: #2c8025;
  --series-6: #655bbe;
  --series-7: #b2403d;

  --cat-site: var(--info);
  --cat-office: var(--success);
  --cat-office-projects: var(--purple);

  --font: "SE", "Tahoma", "Segoe UI", Arial, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 15.5px;
  --fs-xl: 18px;

  --control-h: 38px;
  --control-h-sm: 32px;

  --radius-xs:   6px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg:   16px;
  --radius-xl:   22px;
  --radius-pill: 999px;

  --shadow-xs:       0 1px 2px rgba(14, 22, 38, .05);
  --shadow-soft: 0 1px 2px rgba(0, 31, 94, .05), 0 8px 22px -10px rgba(0, 31, 94, .16);
  --shadow-elevated: 0 2px 6px rgba(0, 31, 94, .06), 0 22px 46px -18px rgba(0, 31, 94, .30);
  --shadow-btn: 0 1px 2px rgba(0, 56, 140, .20), 0 8px 18px -8px rgba(0, 102, 204, .55);
  --ring: 0 0 0 3px rgba(50, 194, 255, .38);

  --glass-bg:     rgba(255, 255, 255, .78);
  --glass-solid:  rgba(255, 255, 255, .94);
  --glass-border: rgba(255, 255, 255, .7);
  --glass-blur:   18px;

  --nav-h: 62px;
  color-scheme: light;
  font-family: var(--font);

  --kind-permanent: #2a3fc4;
  --kind-cms: #0091d4;
  --kind-pmss: #00a37a;
  --nat-saudi: #00a37a; --nat-other: #0066cc;
  --cost-salary: #0027b9; --cost-gosi: #0080ff; --cost-transport: #32c2ff; --cost-family: #00a37a; --cost-car: #00369e; --cost-fee: #8a9bbd;
  --se-navy-950: #001338;
  --se-navy-900: #00194b;
  --se-royal-800: #00176f;
  --se-royal: #0027b9;
  --se-deep: #00369e;
  --se-azure: #0080ff;
  --se-sky: #32c2ff;
  --se-sky-200: #ade7ff;
  --se-sky-50: #ebf9ff;
  --se-green: #00ff86;
  --se-green-400: #33ff9e;
  --se-mint: #99ffcf;
  --se-line: linear-gradient(var(--to-end), #32c2ff 20%, #33ff9e 68%, #00ff86);
  --se-hero: linear-gradient(115deg, #001338 0%, #001f5e 36%, #00369e 72%, #0066cc 100%);
  --se-hero-night: linear-gradient(115deg, #000b24 0%, #001338 42%, #00176f 78%, #0027b9 100%);
  --wash: #f1f8ff;
  --to-end: to left;
  --end-x: 0%;
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 400' preserveAspectRatio='none'%3E%3Cdefs%3E %3ClinearGradient id='a' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%2332c2ff' stop-opacity='0'/%3E%3Cstop offset='.55' stop-color='%2332c2ff' stop-opacity='.42'/%3E%3Cstop offset='1' stop-color='%2399ffcf' stop-opacity='.78'/%3E%3C/linearGradient%3E %3ClinearGradient id='b' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%230080ff' stop-opacity='0'/%3E%3Cstop offset='.6' stop-color='%2332c2ff' stop-opacity='.34'/%3E%3Cstop offset='1' stop-color='%2333ff9e' stop-opacity='.6'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='matrix(-1 0 0 1 800 0)'%3E %3Cpath fill='url(%23a)' d='M0 360 C 250 350 420 300 540 200 S 700 40 800 20 L 800 92 C 722 110 652 190 582 262 S 300 394 0 400 Z'/%3E %3Cpath fill='url(%23b)' d='M170 400 C 390 380 526 330 624 250 S 742 132 800 118 L 800 152 C 750 166 692 242 642 292 S 472 398 300 400 Z'/%3E%3C/g%3E%3C/svg%3E");
  --wave-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 820 380' preserveAspectRatio='none'%3E%3Cdefs%3E %3ClinearGradient id='a' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%2332c2ff' stop-opacity='0'/%3E%3Cstop offset='.6' stop-color='%2332c2ff' stop-opacity='.16'/%3E%3Cstop offset='1' stop-color='%2399ffcf' stop-opacity='.34'/%3E%3C/linearGradient%3E %3ClinearGradient id='b' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%230080ff' stop-opacity='0'/%3E%3Cstop offset='.6' stop-color='%2332c2ff' stop-opacity='.14'/%3E%3Cstop offset='1' stop-color='%2333ff9e' stop-opacity='.26'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='matrix(-1 0 0 1 820 0)'%3E %3Cpath fill='url(%23a)' d='M0 330 C 260 320 440 270 560 180 S 720 30 820 0 L 820 60 C 740 88 668 168 598 240 S 320 372 0 380 Z'/%3E %3Cpath fill='url(%23b)' d='M200 380 C 410 362 540 312 640 236 S 760 108 820 90 L 820 118 C 766 136 706 214 656 266 S 488 378 320 380 Z'/%3E%3C/g%3E%3C/svg%3E");
  --sec-grad: linear-gradient(120deg, #001f5e 0%, #0027b9 55%, #0066cc 100%);
  --sec-on: #fff;
  --sec-shadow: rgba(0, 39, 185, .5); --fc-h: 32px; --fc-r: 10px; --search-ico: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2362708a' stroke-width='2.2' stroke-linecap='round'%3e%3ccircle cx='11' cy='11' r='6.5'/%3e%3cpath d='m16 16 4 4'/%3e%3c/svg%3e"); }

html[data-theme="dark"] {
  --bg: #001338;
  --bg-accent:      radial-gradient(1000px 480px at 92% -10%, rgba(0, 102, 204, .32) 0%, transparent 62%),
                    radial-gradient(860px 420px at 4% -6%, rgba(0, 255, 134, .07) 0%, transparent 58%);
  --surface: #00194b;
  --surface-2: #03215a;
  --surface-3: #082a68;
  --surface-sunken: #000f2e;
  --card-bg:        var(--surface);

  --text:   #eaf1fb;
  --muted:  #9fb2d4;
  --faint:  #7a8fb8;

  --border: #12356f;
  --border-strong: #1c4487;
  --hairline: #0b2a5c;

  --primary:       #80c0ff;
  --primary-dark:  #b3d9ff;
  --primary-light: rgba(128, 192, 255, .14);
  --primary-tint:  rgba(128, 192, 255, .11);
  --accent:        #2fd3b4;
  --accent-soft:   rgba(47, 211, 180, .14);

  --success:      #43ce96;
  --success-soft: rgba(67, 206, 150, .15);
  --warn:         #ecb44e;
  --warn-soft:    rgba(236, 180, 78, .16);
  --danger:       #ff6163;
  --danger-soft:  rgba(255, 97, 99, .16);
  --info:         #80c0ff;
  --info-soft:    rgba(128, 192, 255, .15);
  --purple:       #a99bf0;
  --purple-soft:  rgba(169, 155, 240, .16);

  --c-progress:  #43ce96;
  --c-closing:   #ecb44e;
  --c-completed: #80c0ff;
  --c-cancelled: #ff6163;

  --series-0: #498beb;
  --series-1: #d8662a;
  --series-2: #03a578;
  --series-3: #b78006;
  --series-4: #d45c91;
  --series-5: #4aa342;
  --series-6: #847ae8;
  --series-7: #dc5e59;

  --shadow-xs:       0 1px 2px rgba(0, 0, 0, .4);
  --shadow-soft:     0 1px 2px rgba(0, 0, 0, .35), 0 8px 20px -8px rgba(0, 0, 0, .55);
  --shadow-elevated: 0 2px 8px rgba(0, 0, 0, .45), 0 24px 50px -18px rgba(0, 0, 0, .75);
  --shadow-btn:      0 1px 2px rgba(0, 0, 0, .4), 0 6px 16px -8px rgba(128, 192, 255, .5);
  --ring:            0 0 0 3px rgba(128, 192, 255, .28);

  --glass-bg: rgba(0, 25, 75, .76);
  --glass-solid: rgba(0, 25, 75, .96);
  --glass-border: rgba(255, 255, 255, .08);

  color-scheme: dark;
  --wash: rgba(50, 194, 255, .07);
  --kind-permanent: #7068f0;
  --kind-cms: #0b9bd4;
  --kind-pmss: #13a873;
  --nat-saudi: #13a873; --nat-other: #3d9bff;
  --cost-salary: #6f8bff; --cost-gosi: #3d9bff; --cost-transport: #5fd0ff; --cost-family: #13a873; --cost-car: #9fb6e6; --cost-fee: #7d8cab; --search-ico: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa8c2' stroke-width='2.2' stroke-linecap='round'%3e%3ccircle cx='11' cy='11' r='6.5'/%3e%3cpath d='m16 16 4 4'/%3e%3c/svg%3e"); }

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--wave-soft), var(--bg-accent);
  background-repeat: no-repeat;
  background-position: var(--end-x) 0, 0 0, 0 0;
  background-size: min(1100px, 78vw) 400px, auto, auto;
  background-attachment: fixed;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

h1, h2, h3, h4 { line-height: 1.45; font-weight: 700; }

a { color: var(--primary); }

::selection { background: var(--brand-200); color: var(--brand-900); }
html[data-theme="dark"] ::selection { background: rgba(93, 141, 246, .35); color: #fff; }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: content-box; }

[hidden] { display: none !important; }
.muted { color: var(--muted); }
.right { text-align: end; }
.hint { font-size: var(--fs-sm); color: var(--muted); margin: -6px 0 12px; line-height: 1.7; }

.num, .stat-box .num, .meta-v, .hbar-val, .ts-val, .pill, .emp-code-bubble, td, th, .mini-stats strong {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  min-height: var(--nav-h);
  padding: 0 22px;
  background: transparent;
  border-bottom: 1px solid transparent;
  flex-wrap: wrap; row-gap: 6px;
  transition: background .35s cubic-bezier(.32, .72, 0, 1), border-color .35s, box-shadow .35s;
}
.topbar.is-scrolled {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 28px -24px rgba(14, 22, 38, .55);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar.is-scrolled { background: var(--bg); }
}
.topbar-bubble { background: none; border: none; box-shadow: none; }

.brand {
  display: flex; align-items: center; gap: 13px;
  flex-shrink: 0; min-height: var(--nav-h);
  padding-inline-end: 18px;
  border-inline-end: 1px solid var(--border);
}
.brand img { display: block; height: 38px; width: auto; }
.brand .brand-pdc { height: 33px; }
.brand-sep { width: 1px; height: 26px; background: var(--border-strong); }
html[data-theme="dark"] .brand img { filter: brightness(1.12); }
html[data-theme="dark"] .brand .brand-pdc, html[data-theme="dark"] .login-hero-logos .lh-pdc, html[data-theme="dark"] .sig-mark img { filter: brightness(1.5); }

.mainnav {
  position: relative; isolation: isolate;
  display: flex; align-items: center; gap: 2px;
  flex: 0 1 auto; min-width: 0; margin-inline: auto; padding: 4px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 26px -22px rgba(0, 37, 110, .55);
  overflow-x: auto; scrollbar-width: none;
}
.mainnav::-webkit-scrollbar { height: 0; }
html[data-theme="dark"] .mainnav { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.nav-glider {
  position: absolute; top: 0; left: 0; z-index: -1; width: 0; height: 0;
  border-radius: var(--radius-pill); opacity: 0; pointer-events: none;
  background: var(--sec-grad);
  box-shadow: 0 6px 16px -6px var(--sec-shadow), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .5s cubic-bezier(.32, .72, 0, 1), width .5s cubic-bezier(.32, .72, 0, 1), opacity .25s;
}
.nav-glider.on { opacity: 1; }.mainnav a {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px;
  color: var(--muted); text-decoration: none; flex-shrink: 0;
  font-size: var(--fs-md); font-weight: 400; white-space: nowrap;
  border-radius: var(--radius-pill);
  transition: color .3s cubic-bezier(.32, .72, 0, 1), background .2s;
}
.mainnav a:hover:not(.active) { color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.mainnav a:active { transform: scale(.97); }
.mainnav a:focus-visible { outline: none; box-shadow: var(--ring); }
.mainnav a.active {
  font-weight: 700; color: var(--sec-on);
}.nav-ico {
  width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .8;
  transition: opacity .2s, transform .3s cubic-bezier(.32, .72, 0, 1);
}
.mainnav a:hover .nav-ico, .mainnav a.active .nav-ico { opacity: 1; }
.mainnav a.active .nav-ico { transform: translateY(-.5px) scale(1.06); }
@media (min-width: 1101px) {
  .topbar { flex-wrap: nowrap; }
}
@media (max-width: 1100px) and (min-width: 641px) {
  .topbar { padding-bottom: 8px; }
  .topbar-right { margin-inline-start: auto; }
  .mainnav { order: 3; flex: 1 1 100%; margin-inline: 0; justify-content: flex-start; }
}
@media (max-width: 1240px) and (min-width: 641px) {
  .topbar { gap: 12px; padding: 0 16px; }
  .mainnav a, .mainnav .nav-group { padding: 0 11px; }
  .mainnav .nav-ico { display: none; }
}

.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: var(--nav-h); }

.icon-toggle {
  width: 36px; height: 36px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 13px; font-weight: 700; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s, background .15s, transform .15s;
}
.icon-toggle:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-tint); transform: translateY(-1px);
}

.usermenu { position: relative; }
.usermenu-btn {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding-block: 4px; padding-inline: 4px 10px; color: var(--text);
  font-family: inherit; transition: background .2s, border-color .2s, box-shadow .2s;
}
.usermenu-btn:hover { border-color: var(--primary); box-shadow: var(--shadow-xs); }
.usermenu-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(145deg, #0080ff 0%, #0027b9 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.usermenu-caret { font-size: 9px; color: var(--muted); }
.usermenu-drop {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; min-width: 280px; padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated); overflow: hidden; z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.usermenu-drop.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
@media (max-width: 640px) {
  .topbar { gap: 8px; padding: 6px 12px; }
  .brand, .topbar-right { min-height: 48px; }
  .brand img { height: 30px; }
  .brand .brand-pdc { height: 26px; }
  .topbar-right { margin-inline-start: auto; }
  .mainnav { order: 3; flex: 1 1 100%; margin-inline: 0; justify-content: flex-start; }
  .mainnav a { height: 34px; padding: 0 12px; }
}

.usermenu-drop button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 9px 12px; border-radius: var(--radius-xs);
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: var(--fs-md); color: var(--text); transition: background .15s, color .15s;
}
.usermenu-drop button:hover { background: var(--primary-tint); color: var(--primary); }
.usermenu-drop .danger-item { color: var(--danger); }
.usermenu-drop .danger-item:hover { background: var(--danger-soft); color: var(--danger); }

.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 15, 30, .38);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  display: flex; flex-direction: column; align-items: center;
  padding-top: 12vh;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-overlay-box {
  position: relative; width: min(620px, 92vw);
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated); border: 1px solid var(--border);
  display: flex; align-items: center; padding: 5px 5px 5px 18px;
}
.search-overlay .topsearch-icon { font-size: 20px; color: var(--muted); flex-shrink: 0; margin-inline-end: 10px; }
.search-overlay-box input {
  flex: 1; margin: 0; border: none; padding: 14px 4px; font-size: var(--fs-lg);
  background: transparent; direction: inherit; color: var(--text);
}
html[data-lang="en"] .search-overlay-box input { direction: ltr; text-align: left; }
html[data-lang="ar"] .search-overlay-box input { direction: rtl; text-align: right; }
.search-overlay-box input:focus { outline: none; box-shadow: none; }
.search-overlay-close {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: var(--radius-sm); border: none;
  background: var(--surface-3); color: var(--muted); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.search-overlay-close:hover { background: var(--danger); color: #fff; }
.topsearch-results {
  width: min(620px, 92vw); margin-top: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated); overflow: hidden;
  max-height: 52vh; overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.topsearch-results.open { opacity: 1; visibility: visible; transform: translateY(0); }
.ts-group {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 7px 14px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  background: var(--surface-2); border-bottom: 1px solid var(--hairline);
}
.ts-group em { font-style: normal; font-variant-numeric: tabular-nums; }
.ts-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  color: var(--text); text-decoration: none; font-size: var(--fs-md);
  border-bottom: 1px solid var(--hairline); transition: background .12s;
}
.ts-item:last-child { border-bottom: none; }
.ts-item:hover, .ts-item.active { background: var(--primary-tint); }
.ts-item.active { box-shadow: inset 3px 0 0 var(--primary); }
.ts-ico {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--radius-xs);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm); font-weight: 700; background: var(--primary-light); color: var(--primary);
}
.ts-ico.proj { background: var(--accent-soft); color: var(--success); }
.ts-ico.page { background: var(--surface-3); color: var(--muted); }
.ts-ico.dept { background: var(--surface-2); border: 1px solid var(--border); }
.ts-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.ts-main b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-main small { font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-main mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.ts-item .badge { flex-shrink: 0; }
.ts-more {
  display: block; padding: 8px 14px; font-size: var(--fs-sm); font-weight: 700; color: var(--primary);
  text-decoration: none; border-bottom: 1px solid var(--hairline); background: var(--surface);
}
.ts-more:hover, .ts-more.active { background: var(--primary-tint); }
.ts-empty { padding: 18px; text-align: center; color: var(--muted); font-size: var(--fs-md); }

.content {
  padding: 18px 20px 40px;
  max-width: 1560px; margin: 0 auto; width: 100%; max-width: 1440px; padding: 14px 18px 32px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 16px 18px;
  margin-bottom: 14px; padding: 12px 14px; margin-bottom: 12px; }
.card h2 {
  margin: 0 0 12px; font-size: var(--fs-lg); color: var(--text);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; row-gap: 10px; margin-bottom: 12px;
}
.card-head h2 { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }

.grid { display: grid; gap: 14px; }

.section-title {
  font-size: var(--fs-md); font-weight: 700; color: var(--text);
  margin: 20px 0 10px; padding-inline-start: 12px; position: relative;
}
.section-title::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 3px; bottom: 3px;
  width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, #32c2ff, #0066cc);
}
.section-title:first-child { margin-top: 0; }

.divider-note {
  margin: 18px 0 12px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: var(--fs-sm); color: var(--muted); font-weight: 400;
}

.page-head {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 18px; padding-bottom: 10px; margin-bottom: 12px; gap: 10px; }
.page-head-title { flex: 1; min-width: 260px; min-width: 220px; }
.page-head-title h2 {
  margin: 0; font-size: 21px; color: var(--text); font-weight: 700;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 19px; gap: 10px; }
.page-head-title h2 .kpi-chip { font-size: var(--fs-sm); }
.page-head-title p { margin: 0 0 3px; font-size: var(--fs-md); color: var(--muted); line-height: 1.6; }
.page-head-title p.muted { font-size: var(--fs-sm); color: var(--faint); }
.page-head-actions { display: flex; gap: 9px; flex-wrap: wrap; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--control-h); padding: 0 18px;
  background: linear-gradient(180deg, #0a72dc 0%, #0062c4 100%);
  color: #fff; border: 1px solid transparent; border-radius: var(--radius-md);
  cursor: pointer; font-family: inherit; font-size: var(--fs-md); font-weight: 700;
  line-height: 1; white-space: nowrap; text-decoration: none;
  box-shadow: var(--shadow-btn), inset 0 1px 0 rgba(255, 255, 255, .16);
  transition: transform .18s cubic-bezier(.32, .72, 0, 1), box-shadow .2s ease, filter .18s ease, background .18s ease;
}
.btn:hover {
  filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0, 56, 140, .18), 0 12px 24px -10px rgba(0, 102, 204, .6), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn:active {
  transform: translateY(0) scale(.98); filter: brightness(.96);
}
.btn:focus-visible { outline: none; box-shadow: var(--ring), var(--shadow-btn); }
html[data-theme="dark"] .btn {
  color: #001338; background: linear-gradient(180deg, #a3d2ff 0%, #80c0ff 100%); box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 18px -8px rgba(128, 192, 255, .45);
}

.btn.secondary {
  background: var(--primary-light); color: var(--brand-500); border-color: transparent; box-shadow: none;
}
.btn.secondary:hover {
  background: #d3e8ff; color: var(--brand-600); border-color: transparent; filter: none; box-shadow: 0 8px 18px -12px rgba(0, 102, 204, .55);
}
.btn.danger {
  background: linear-gradient(180deg, #ff5457 0%, #e3282c 100%); color: #fff; box-shadow: 0 1px 2px rgba(200, 30, 40, .2), 0 8px 18px -8px rgba(227, 40, 44, .55);
}
.btn.small { height: var(--control-h-sm); padding: 0 14px; font-size: var(--fs-sm); }
.btn.active, .btn.small.active {
  background: linear-gradient(126deg, #00176f 8%, #0027b9 92%); color: #fff; border-color: transparent;
}
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; filter: none; }

.page-head-actions .btn, .card-head .btn { min-width: 118px; }
.page-head-actions .btn.small, .card-head .btn.small, td.actions .btn.small { min-width: 0; }

.icon-btn {
  width: 32px; height: 32px; border-radius: var(--radius-xs); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; color: var(--muted); font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .16s, color .16s, border-color .16s; flex-shrink: 0;
}
.icon-btn:hover { background: var(--primary-tint); color: var(--primary); border-color: var(--primary); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }

label { display: block; font-size: var(--fs-sm); margin-bottom: 5px; color: var(--muted); font-weight: 400; }
input, select, textarea {
  width: 100%; padding: 9px 12px; min-height: 38px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  margin-bottom: 12px; font-size: var(--fs-md); font-family: inherit;
  background: var(--surface); color: var(--text);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, textarea:hover { border-color: var(--faint); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--ring);
}
input:disabled, textarea:disabled { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }
textarea { line-height: 1.7; padding-top: 10px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 160px; }

select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2362708a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: left 11px center; background-size: 15px;
  padding-left: 34px !important; cursor: pointer;
}
html[data-theme="dark"] select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa8c2' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
}
select:hover { border-color: var(--faint); }
select option { padding: 8px; background: var(--surface); color: var(--text); }
select:disabled { background-color: var(--surface-3); color: var(--muted); cursor: not-allowed; }
select optgroup { font-weight: 700; color: var(--text); background: var(--surface-2); font-size: var(--fs-sm); }
select optgroup option { font-weight: 400; color: var(--text); padding-inline-start: 14px; }

input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--primary); }

.clearable { position: relative; display: inline-block; }
.clear-x {
  position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--border-strong); color: var(--text); font-size: 11px; line-height: 1;
  display: none; align-items: center; justify-content: center; padding: 0;
}
.clear-x:hover { background: var(--danger); color: #fff; }
.clearable.has-value .clear-x { display: flex; }

.tabs {
  display: inline-flex; gap: 3px; margin-bottom: 18px; padding: 4px;
  background: var(--surface-3); border-radius: var(--radius-md); border: 1px solid var(--border);
  flex-wrap: wrap; margin-bottom: 12px; padding: 3px; }
.tabs button {
  background: none; border: none; height: var(--control-h-sm); padding: 0 16px; cursor: pointer;
  font-family: inherit; font-size: var(--fs-md); font-weight: 400; color: var(--muted);
  border-radius: var(--radius-xs); white-space: nowrap;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease; padding: 0 13px; font-size: var(--fs-sm); }
.tabs button:hover { color: var(--primary); }
.tabs button.active { color: var(--primary); background: var(--surface); box-shadow: var(--shadow-xs); font-weight: 700; }
html[data-theme="dark"] .tabs button.active { background: var(--surface-2); color: var(--brand-300); }
.modal .tabs { border-bottom: none; }
.modal .tab-btn { font-size: var(--fs-sm); padding: 0 12px; }

table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); table-layout: auto; }
th, td { padding: 9px 12px; text-align: start; vertical-align: middle; word-break: break-word; }
th {
  background: color-mix(in srgb, var(--primary) 5%, var(--surface)); color: var(--muted);
  font-weight: 700; font-size: var(--fs-sm);
  position: sticky; top: 0; z-index: 2;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
td { border-bottom: 1px solid var(--hairline); }
tbody tr { transition: background .13s ease; }
tbody tr:hover td { background: var(--primary-tint); }
tbody tr:last-child td { border-bottom: none; }

.projects-table, .report-table { table-layout: fixed; width: 100%; }
.projects-table th, .projects-table td,
.report-table th, .report-table td { padding: 8px 12px; line-height: 1.5; }
.projects-table th, .report-table th { white-space: normal; line-height: 1.35; vertical-align: bottom; overflow-wrap: normal; word-break: normal; }
.projects-table td { font-size: var(--fs-md); }
.projects-table .col-project { width: 34%; }
.projects-table .col-dept { width: 19%; font-size: var(--fs-sm); line-height: 1.4; }
.projects-table .col-num { width: 82px; text-align: center; }
.projects-table .col-dates { width: 110px; font-size: var(--fs-sm); }
.projects-table .col-action { width: 124px; text-align: end; }
.report-table .col-id { width: 118px; font-size: var(--fs-sm); white-space: nowrap; }
.report-table .col-name { width: auto; }
.report-table .col-dept { width: 19%; font-size: var(--fs-sm); }
.report-table .col-tag { width: 118px; white-space: nowrap; overflow: visible; }
.report-table .col-cat { width: 180px; white-space: nowrap; }
.report-table .col-bar { width: 26%; }
.report-table .col-peak { width: 150px; }
.report-table .col-num { width: 96px; text-align: center; }
.report-table .col-dates { width: 104px; font-size: var(--fs-sm); white-space: nowrap; }
.report-table .col-action { width: 124px; text-align: end; }
.report-table .col-action-wide { width: 210px; text-align: end; white-space: nowrap; }
.col-action-wide { white-space: normal; }
.col-action-wide .ts-row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.col-action-wide .ts-row-actions .btn.small { flex: 0 0 auto; padding: 0 11px; }

.report-table td { overflow-wrap: anywhere; }
.report-table .sub-line {
  font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.col-action .btn { white-space: nowrap; }
.col-action .btn.small, .col-action-wide .btn.small { padding: 0 12px; }
td.actions { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }

#projects-table-wrap {
  max-height: 68vh; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface);
}
#projects-table-wrap table { margin: 0; }

.result-meta { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 10px; }

tr.row-cancelled td { background: var(--danger-soft); }
tr.row-cancelled .proj-code-link { color: var(--danger); }
tr.row-past td { background: var(--surface-2); color: var(--muted); }
tr.row-past .link-strong { color: var(--muted); }

.txt-ok { color: var(--success); font-weight: 700; }
.txt-bad { color: var(--danger); font-weight: 700; }
.ts-row-flagged td { background: var(--danger-soft); }
.ts-name-flagged { color: var(--danger) !important; font-weight: 700; }

.badge {
  display: inline-block; padding: 1px 9px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; line-height: 1.7; vertical-align: middle;
}
.badge.active, .badge.in_progress { background: var(--success-soft); color: var(--success); }
.badge.inactive, .badge.cancelled { background: var(--danger-soft); color: var(--danger); }
.badge.new { background: var(--info-soft); color: var(--info); }
.badge.completed { background: var(--purple-soft); color: var(--purple); }
.badge.closing { background: var(--warn-soft); color: var(--warn); }
.badge.emp-kind { background: color-mix(in srgb, var(--k, var(--faint)) 13%, var(--surface)); color: color-mix(in srgb, var(--k, var(--faint)) 82%, var(--text)); border: 1px solid color-mix(in srgb, var(--k, var(--faint)) 26%, transparent); }
.kind-permanent { --k: var(--kind-permanent); }
.kind-cms { --k: var(--kind-cms); }
.kind-pmss { --k: var(--kind-pmss); }
.kind-unset { --k: var(--faint); }
.badge.emp-kind.kind-unset { border-style: dashed; }

.pill {
  display: inline-block; min-width: 22px; padding: 1px 9px; border-radius: var(--radius-pill);
  background: var(--primary-light); color: var(--primary); font-weight: 700; font-size: var(--fs-sm);
}
.link-strong { color: var(--primary); text-decoration: none; font-weight: 700; }
.link-strong:hover { text-decoration: underline; }

.emp-code-bubble {
  display: inline-flex; align-items: center; justify-content: center;
  width: 86px; height: 28px; border-radius: var(--radius-xs);
  background: var(--surface-3); border: 1px solid var(--border);
  color: var(--text); font-weight: 700; font-size: var(--fs-xs);
overflow: hidden; white-space: nowrap;
}

.chip-box {
  display: flex; flex-wrap: wrap; gap: 6px; min-height: 42px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); margin-bottom: 10px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm);
  background: var(--surface); border: 1px solid var(--primary); color: var(--primary);
  border-radius: var(--radius-pill); padding: 4px 6px 4px 11px; font-weight: 400;
}
.chip button {
  border: none; background: var(--surface-3); color: var(--text); cursor: pointer;
  width: 17px; height: 17px; border-radius: 50%; font-size: 11px; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.chip button:hover { background: var(--danger); color: #fff; }

.error-msg, .success-msg {
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: var(--fs-md);
  margin-bottom: 12px; line-height: 1.75; border-inline-start: 3px solid;
}
.error-msg { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.success-msg { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.steps { margin: 0 0 14px; padding-inline-start: 22px; font-size: var(--fs-sm); line-height: 1.9; color: var(--text); }
.steps code, .success-msg code {
  background: var(--surface-3); border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 6px; font-size: var(--fs-sm); font-family: ui-monospace, Consolas, monospace;
}

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 15, 30, .45);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  padding: 20px; animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-elevated);
  padding: 24px; width: 440px; max-width: 100%; max-height: 86vh; overflow-y: auto;
  animation: modalIn .22s cubic-bezier(.22, .68, .3, 1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal.modal-wide { width: min(820px, 94vw); max-height: 88vh; }
.modal h3 { margin: 0 0 16px; font-size: var(--fs-xl); }
.close-x { float: left; float: inline-end; cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; }
.close-x:hover { color: var(--danger); }

.toast-host { position: fixed; top: calc(var(--nav-h) + 16px); inset-inline-end: 22px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px;
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: var(--fs-md); font-weight: 400;
  box-shadow: var(--shadow-elevated); background: var(--surface);
  border: 1px solid var(--border); border-inline-start: 3px solid var(--success); color: var(--success);
  animation: toastIn .28s cubic-bezier(.4, 0, .2, 1);
}
.toast.error { border-inline-start-color: var(--danger); color: var(--danger); }
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-16px); } }

.suggest-box {
  border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 8px 0;
  max-height: 240px; overflow-y: auto; background: var(--surface); box-shadow: var(--shadow-xs);
}
.search-suggestion {
  padding: 10px 13px; cursor: pointer; border-bottom: 1px solid var(--hairline);
  transition: background .15s; font-size: var(--fs-md);
}
.search-suggestion:last-child { border-bottom: none !important; }
.search-suggestion:hover { background: var(--primary-tint); }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 9px; align-items: center;
  padding: 10px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 14px; gap: 8px; padding: 8px 10px; background: var(--card-bg); border: 1px solid var(--hairline); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.filter-bar > * { min-height: var(--control-h); min-height: 0; }
.filter-bar input, .filter-bar select { margin-bottom: 0; width: auto; min-width: 155px; flex: 0 1 auto; }
.filter-bar input#f-q { flex: 1 1 230px; }
.filter-bar .btn { height: var(--control-h); height: var(--fc-h); }

.af-chip {
  font-size: var(--fs-sm); font-weight: 400; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 4px 12px;
}
.af-clear {
  margin-inline-start: auto; border: none; cursor: pointer; font-family: inherit;
  background: none; color: var(--danger); font-size: var(--fs-sm); font-weight: 400;
  text-decoration: underline; padding: 4px 6px;
}
.af-clear:hover { filter: brightness(.85); }

.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 18px; font-size: var(--fs-md); }
.pager button[disabled] { opacity: .45; cursor: not-allowed; }

.progress-track { flex: 1; height: 8px; background: var(--surface-3); border-radius: var(--radius-pill); overflow: hidden; }
.progress-track i { display: block; height: 100%; border-radius: var(--radius-pill); transition: width .5s ease; }
.stack-bar { display: flex; height: 10px; border-radius: var(--radius-pill); overflow: hidden; background: var(--surface-3); }
.stack-bar i { display: block; height: 100%; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; font-size: var(--fs-xs); color: var(--muted); }
.stack-legend > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.stack-legend b { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.stack-legend strong { color: var(--text); }

.login-wrap {
  position: relative; display: flex; flex-direction: column; gap: 26px; align-items: center; justify-content: center;
  min-height: 100vh; padding: 40px 24px;
  background:
  var(--wave) no-repeat var(--end-x) 100% / 72% 46%,
  radial-gradient(900px 500px at 12% 10%, rgba(50, 194, 255, .24) 0%, transparent 55%),
  radial-gradient(800px 460px at 88% 90%, rgba(153, 255, 207, .38) 0%, transparent 52%),
  linear-gradient(150deg, #ebf9ff 0%, #f5f6f9 55%, #effff7 100%);
}
html[data-theme="dark"] .login-wrap {
  background:
  var(--wave) no-repeat var(--end-x) 100% / 72% 46%,
  radial-gradient(900px 500px at 12% 10%, rgba(0, 102, 204, .34) 0%, transparent 55%),
  radial-gradient(800px 460px at 88% 90%, rgba(0, 255, 134, .10) 0%, transparent 52%),
  linear-gradient(150deg, #001338 0%, #00194b 100%);
}
.login-lang-btn { position: absolute; top: 20px; inset-inline-end: 20px; z-index: 2; }
.login-theme-btn { position: absolute; top: 20px; inset-inline-end: 66px; z-index: 2; }

.login-shell {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 56px;
  width: 1000px; max-width: 100%;
}

.login-hero { flex: 1 1 520px; min-width: 0; }

.login-brand-title { margin: 0 0 16px; font-size: 32px; font-weight: 700; line-height: 1.4;color: var(--text); }
.login-brand-title span { display: block; margin-top: 2px; text-wrap: balance; }

.login-panel { flex: 0 0 372px; }
.login-panel-solo {
  flex: 0 1 420px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-elevated); padding: 28px 28px 20px;
}
.login-panel-solo .login-recover { margin: 14px 0 0; text-align: center; }
.login-logos {
  display: flex; align-items: center; gap: 12px; margin-bottom: 26px;
}
.login-logos img { height: 26px; width: auto; display: block; }
.login-logos img.pdc { height: 21px; }
.login-logo-sep { width: 1px; height: 20px; background: var(--border-strong); }
html[data-theme="dark"] .login-logos img { filter: brightness(1.12); }
.login-panel h2 { margin: 0 0 6px; font-size: var(--fs-xl); color: var(--text);}
.login-panel p.sub { margin: 0 0 24px; color: var(--muted); font-size: var(--fs-sm); }
.login-panel label { font-size: var(--fs-sm); font-weight: 400; color: var(--text); }
.login-panel input {
  padding: 12px 14px; min-height: 46px;
  background: var(--surface-2); border: 1px solid var(--surface-2); border-radius: var(--radius-md);
}
.login-panel input:hover { border-color: var(--border-strong); }
.login-panel input:focus { background: var(--surface); border-color: var(--primary); }
.login-field-pw { position: relative; }
.login-field-pw input { width: 100%; padding-inline-end: 42px; }
.login-pw-toggle {
  position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 3px; margin: 0; cursor: pointer;
  color: var(--faint); display: flex; line-height: 0;
}
.login-pw-toggle:hover { color: var(--muted); }
.login-recover {
  display: block; width: 100%; text-align: end; background: none; border: none;
  font-family: inherit; font-size: var(--fs-xs); font-weight: 700; color: var(--primary);
  cursor: pointer; margin: -4px 0 18px; padding: 2px 0;
}
.login-recover:hover { text-decoration: underline; }
.login-submit { width: 100%; height: 44px; font-size: var(--fs-lg); font-weight: 700; }

@media (max-width: 900px) {
  .login-shell { flex-direction: column; gap: 30px; width: 420px; }
  .login-hero { text-align: center; }

  .login-panel { width: 100%; flex-basis: auto; }
  .login-logos { justify-content: center; }
}
@media (max-width: 480px) { .login-shell { width: 100%; } }

.stat-box {
  background: linear-gradient(180deg, var(--wash) 0%, var(--card-bg) 80%); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 15px 14px; text-align: center;
  box-shadow: var(--shadow-soft);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.stat-box .num { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.2;}
.stat-box .label {
  color: var(--muted); font-size: var(--fs-xs); margin-top: 5px; min-height: 28px;
  display: flex; align-items: center; justify-content: center; overflow-wrap: anywhere;
}
.stat-box.clickable, .kpi-card.clickable { cursor: pointer; }
.stat-box.clickable:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: var(--shadow-elevated); }

.kpi-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--wash) 0, var(--card-bg) 150px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px 14px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-soft);
  transition: box-shadow .22s ease, transform .18s ease, border-color .2s ease;
}
.kpi-card::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(var(--to-end), #0066cc, #32c2ff 55%, #33ff9e);
}
.kpi-card:hover { box-shadow: var(--shadow-elevated); transform: translateY(-3px); }
.kpi-card.clickable { cursor: pointer; }
.kpi-card.clickable:hover { border-color: var(--primary); }

.kpi-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 2px; min-height: 40px;
}
.kpi-title { font-size: var(--fs-md); font-weight: 700; color: var(--text); line-height: 1.5; }
.kpi-chip {
  flex-shrink: 0; font-size: var(--fs-sm); font-weight: 700;
  padding: 3px 11px; border-radius: var(--radius-pill); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.kpi-chip.ok      { background: var(--success-soft); color: var(--success); }
.kpi-chip.mid     { background: var(--warn-soft);    color: var(--warn); }
.kpi-chip.low     { background: var(--danger-soft);  color: var(--danger); }
.kpi-chip.neutral { background: var(--primary-light); color: var(--primary); }

.kpi-visual { position: relative; display: flex; justify-content: center; align-items: center; padding: 8px 0 8px; }
.kpi-visual::before {
  content: ''; position: absolute; width: 158px; height: 158px; border-radius: 50%;
  background: radial-gradient(circle, rgba(50, 194, 255, .2) 0%, transparent 70%);
  z-index: 0;
}
.kpi-visual svg { position: relative; z-index: 1; }
.kpi-note {
  align-self: center; font-size: var(--fs-xs); font-weight: 400; color: var(--muted);
  text-align: center; line-height: 1.6; background: var(--surface-2);
  border-radius: var(--radius-pill); padding: 5px 16px; margin-bottom: 2px;
}

.donut { width: 138px; height: 138px; filter: drop-shadow(0 8px 18px rgba(0, 31, 94, .14)); }
.donut-track { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.donut-value {
  fill: none; stroke-width: 9; stroke-linecap: round;
  transition: stroke-dasharray .7s cubic-bezier(.4, 0, .2, 1);
}
.multi-donut .donut-value { stroke-linecap: butt; }
.donut-top { text-anchor: middle; font-size: 21px; font-weight: 700; fill: var(--text); font-family: var(--font); }
.donut-sub { text-anchor: middle; font-size: 9.5px; fill: var(--muted); font-family: var(--font); }

.kpi-legend {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); gap: 8px;
  width: 100%; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
.kpi-legend-item {
  display: flex; flex-direction: column; gap: 7px;
  padding: 8px 11px; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--tone, var(--primary)) 14%, var(--border));
  background: linear-gradient(140deg, color-mix(in srgb, var(--tone, var(--primary)) 8%, var(--card-bg)) 0%, var(--card-bg) 72%); font-family: inherit; color: var(--text);
  cursor: pointer; text-align: start;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.kpi-legend-item:hover { border-color: var(--tone, var(--primary)); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.kli-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.kpi-legend-item i { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; display: block; }
.kpi-legend-item .kli-text {
  font-size: var(--fs-xs); font-weight: 400; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kli-nums { display: flex; align-items: baseline; gap: 6px; }
.kpi-legend-item strong { font-size: 19px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; }
.kpi-legend-item em {
  font-style: normal; font-size: var(--fs-xs); font-weight: 700; color: var(--tone, var(--muted));
  font-variant-numeric: tabular-nums;
}
.kli-bar { display: block; height: 4px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.kli-bar i { display: block; height: 100%; border-radius: var(--radius-pill); transition: width .7s cubic-bezier(.4, 0, .2, 1); }

.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar-row { display: grid; grid-template-columns: 1fr 2fr auto; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.hbar-track { display: block; width: 100%; background: var(--surface-3); border-radius: var(--radius-pill); height: 9px; overflow: hidden; }
.hbar-track i { display: block; height: 100%; background: var(--primary); border-radius: var(--radius-pill); transition: width .6s ease; }
.hbar-val { font-weight: 700; color: var(--text); min-width: 28px; text-align: end; }
.hbar-row.clickable { cursor: pointer; padding: 3px 6px; border-radius: var(--radius-xs); transition: background .15s; }
.hbar-row.clickable:hover { background: var(--primary-tint); }
.mini-stats { display: flex; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.mini-stats > div { flex: 1; text-align: center; }
.mini-stats strong { display: block; font-size: 19px; color: var(--text); font-weight: 700; }
.mini-stats span { font-size: var(--fs-xs); color: var(--muted); }

.mini-donut { width: 64px; height: 64px; }
.mini-donut .donut-track, .mini-donut .donut-value { stroke-width: 9; }
.mini-donut-text { font-size: 18px; font-weight: 700; fill: var(--text); text-anchor: middle; font-family: var(--font); }
.multi-donut circle.donut-value { transition: opacity .15s; }
.multi-donut circle.donut-value:hover { opacity: .8; }

.dash-panel {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
  padding: 14px 18px 0; margin-top: 14px;
}
.dash-panel-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--hairline);
}
.dash-panel-title { flex: 1 1 auto; margin: 0; font-size: var(--fs-lg); font-weight: 700; color: var(--text); text-wrap: balance; }
.dash-panel-body { flex: 1; min-width: 0; padding-bottom: 16px; }
.dash-panel-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px;
  margin: 0 -18px; padding: 8px 18px;
  background: var(--surface-2); border-top: 1px solid var(--hairline);
}
.dash-panel-foot .btn { min-width: 0; }
.dash-empty { margin: 0; padding: 28px 10px; text-align: center; color: var(--muted); }
[data-go] { cursor: pointer; }

.db-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.db-kpi {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px;
  padding: 12px 18px 10px; background: linear-gradient(140deg, color-mix(in srgb, var(--tone, var(--primary)) 10%, var(--card-bg)) 0%, var(--card-bg) 58%); border: 1px solid color-mix(in srgb, var(--tone, var(--primary)) 16%, var(--border));
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
}
.db-kpi::before {
  content: ''; position: absolute; top: 0; inset-inline-start: 16px; width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--tone, var(--primary));
}
.db-kpi::after {
  content: ''; position: absolute; inset-inline-end: -34px; top: -34px; width: 116px; height: 116px;
  border-radius: 50%; background: var(--tone); opacity: .07; pointer-events: none;
}
.db-kpi-label { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.db-kpi-value { font-size: 25px; font-weight: 700; color: var(--text); line-height: 1.25;font-variant-numeric: tabular-nums; }
.db-kpi-sub { font-size: var(--fs-xs); color: var(--faint); }

.db-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.db-title .dept-mark { flex-shrink: 0; }
.db-grid > .dash-panel { margin-top: 0; }
.db-wide { grid-column: span 7; }
.db-narrow { grid-column: span 5; }
@media (max-width: 1100px) { .db-wide, .db-narrow { grid-column: 1 / -1; } }
.db-sub { margin: 14px 0 8px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.db-splits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .db-splits { grid-template-columns: 1fr; } }
.db-splits .db-sub { margin-top: 0; }
.db-splits .stack-bar { height: 12px; }
.db-donut-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.db-legend { flex: 1; min-width: 190px; display: flex; flex-direction: column; gap: 6px; }
.db-legend-row {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: var(--fs-sm);
}
.db-legend-row i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.db-legend-row b { font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.db-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.db-chip {
  display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 2px 8px;
  padding: 9px 11px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: var(--fs-sm);
  background: linear-gradient(140deg, color-mix(in srgb, var(--c) 8%, var(--card-bg)) 0%, var(--card-bg) 70%);
}
.db-chip i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.db-chip b { font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.db-chip em { grid-column: 2 / -1; font-style: normal; font-size: var(--fs-xs); color: var(--faint); }
.db-list { display: flex; flex-direction: column; }
.db-list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 6px; border-bottom: 1px solid var(--hairline); border-radius: var(--radius-xs);
  color: inherit; text-decoration: none; font-size: var(--fs-sm);
  transition: background .2s cubic-bezier(.32, .72, 0, 1);
}
.db-list-row:last-child { border-bottom: none; }
a.db-list-row:hover { background: var(--primary-tint); }
.db-list-row > span { min-width: 0; display: flex; align-items: center; gap: 8px; }
.db-list-row > b { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.db-list-name { min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-list-row .proj-code-link, .db-list-row .badge { flex-shrink: 0; }
.db-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; font-size: var(--fs-sm); color: var(--muted); }
.db-meta b { color: var(--text); font-size: var(--fs-md); font-variant-numeric: tabular-nums; }

.dept-mark { display: inline-block; vertical-align: -1px; flex-shrink: 0; overflow: visible; }
.dept-mark path, .dept-mark circle { stroke: var(--surface); stroke-width: 1; }

.seg {
  display: inline-flex; gap: 2px; height: var(--control-h-sm); padding: 3px; max-width: 100%;
  background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.seg button {
  height: 100%; padding: 0 12px; border: 0; border-radius: var(--radius-xs); background: none;
  font-family: inherit; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; white-space: nowrap;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.seg button:hover { color: var(--primary); }
.seg button.active { background: var(--surface); color: var(--primary); font-weight: 700; box-shadow: var(--shadow-xs); }
@media (max-width: 640px) {
  .seg { flex-wrap: wrap; height: auto; }
  .seg button { height: calc(var(--control-h-sm) - 8px); padding: 0 9px; }
}
html[data-theme="dark"] .seg button.active { background: var(--surface-2); color: var(--brand-300); }

.sm-grid { --cols: 5; --gap: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.sm-grid > * { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); }
@media (max-width: 960px) { .sm-grid { --cols: 3; } }
@media (max-width: 640px) { .sm-grid { --cols: 2; } }
@media (max-width: 400px) { .sm-grid { --cols: 1; } }
.sm-card {
  position: relative; display: flex; flex-direction: column; gap: 1px; min-width: 0;
  padding: 10px 12px 7px; text-align: start; font-family: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.sm-card::before {
  content: ''; position: absolute; inset-inline: 12px; top: -1px; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--c);
}
.sm-card:hover, .sm-card.hovering { border-color: color-mix(in srgb, var(--c) 45%, var(--border)); box-shadow: var(--shadow-soft); }
.sm-card:active { transform: translateY(1px); }
.sm-card:focus-visible { outline: none; box-shadow: var(--ring); }
.sm-card.empty { opacity: .62; }
.sm-head { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: var(--fs-sm); font-weight: 700; }
.sm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-total { display: flex; align-items: baseline; gap: 5px; }
.sm-total b { font-size: 19px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.sm-total small { font-size: var(--fs-xs); color: var(--muted); }
.sm-total em { margin-inline-start: auto; font-style: normal; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.sm-svg { display: block; width: 100%; height: auto; overflow: visible; }
.sm-base { stroke: var(--border-strong); stroke-width: 1; }
.sm-area { fill: var(--c); opacity: .1; }
.sm-line { fill: none; stroke: var(--c); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.sm-line.later { stroke-dasharray: 3 3; opacity: .45; }
.sm-peak { fill: var(--c); stroke: var(--surface); stroke-width: 1; }
.sm-peak-val { font-size: 10.5px; font-weight: 700; fill: var(--text); text-anchor: middle; font-family: var(--font); }
.sm-guide { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 2 2; }
.sm-dot { fill: var(--surface); stroke: var(--c); stroke-width: 2; }
.sm-axis { display: flex; justify-content: space-between; align-items: center; gap: 6px; direction: ltr; font-size: 11px; color: var(--faint); min-height: 18px; }
.sm-tip { direction: rtl; color: var(--text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: no-preference) {
  .page-enter .sm-card { animation: rise .5s cubic-bezier(.32, .72, 0, 1) backwards; }
  .page-enter .sm-card:nth-child(n+6) { animation-delay: 60ms; }
}

.dp-sort { width: auto; min-width: 170px; margin: 0; height: var(--control-h); }
.dp-tops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; gap: 10px; margin-bottom: 10px; }
@media (max-width: 1000px) { .dp-tops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  {
  .dp-tops { gap: 8px; }
  .dp-top { padding: 8px 12px 8px 10px; }
  .dp-top-val { font-size: 16px; }
  .dp-top-name { font-size: var(--fs-xs); }
}
.dp-top {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 1px; min-width: 0;
  padding: 10px 16px 10px 14px; text-decoration: none; color: inherit;
  background: linear-gradient(140deg, color-mix(in srgb, var(--c) 10%, var(--card-bg)) 0%, var(--card-bg) 60%); border: 1px solid color-mix(in srgb, var(--c) 16%, var(--border)); border-radius: var(--radius-md); box-shadow: var(--shadow-xs);
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.dp-top::before {
  content: ''; position: absolute; top: 0; inset-inline-start: 16px; width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--c);
}
.dp-top:hover { border-color: var(--c); box-shadow: var(--shadow-soft); transform: translateY(-1px); }
.dp-top-label { font-size: var(--fs-xs); color: var(--muted); }
.dp-top-val { font-size: 19px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.dp-top-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-sm); }
.dp-top-name bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dp-legend {
  display: flex; flex-wrap: wrap; gap: 6px 28px; margin-bottom: 12px; padding: 7px 14px;
  font-size: var(--fs-xs); color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--radius-sm);
}
.dp-legend > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.dp-legend b { color: var(--text); }
.dp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dp-legend i { width: 9px; height: 9px; border-radius: 2px; }

.dp-grid { --cols: 4; --gap: 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.dp-grid > * { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); min-width: 0; }
@media (max-width: 1400px) { .dp-grid { --cols: 3; } }
@media (max-width: 1000px) { .dp-grid { --cols: 2; } }
@media (max-width: 620px)  { .dp-grid { --cols: 1; } }
.dp-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, var(--card-bg)) 0, var(--card-bg) 96px); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); transition: box-shadow .2s ease, border-color .2s ease;
}
.dp-card::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(var(--to-end), var(--c) 0%, color-mix(in srgb, var(--c) 55%, transparent) 45%, transparent 100%);
}
.dp-card:hover { box-shadow: var(--shadow-elevated); border-color: color-mix(in srgb, var(--c) 35%, var(--border)); }
.dp-head { display: flex; align-items: flex-start; gap: 9px; padding: 13px 16px 9px; }
.dp-head > .dept-mark { margin-top: 4px; }
.dp-title { flex: 1; min-width: 0; }
.dp-name { margin: 0; font-size: var(--fs-md); line-height: 1.5; }
.dp-name a { color: var(--text); text-decoration: none; }
.dp-name a:hover { color: var(--primary); }
.dp-card.editing .dp-name, .dp-card.editing .dp-icons { display: none; }
.dp-icons { display: flex; gap: 4px; flex-shrink: 0; }
.dp-icons .icon-btn { width: 28px; height: 28px; font-size: 12px; }
.dp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 16px; border-block: 1px solid var(--hairline); }
.dp-kpi { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 7px 4px; text-align: center; }
.dp-kpi + .dp-kpi { border-inline-start: 1px solid var(--hairline); }
.dp-kpi b { font-size: 18px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.dp-kpi span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.dp-kpi small { font-size: 11px; color: var(--faint); line-height: 1.4; }
.tone-ok { color: var(--success); }
.tone-mid { color: var(--warn); }
.tone-low { color: var(--danger); }
.dp-bars { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 11px 16px 12px; }
.dp-bar-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 54px; align-items: center; gap: 10px; }
.dp-bar-label { font-size: var(--fs-xs); color: var(--muted); }
.dp-bar-row .stack-bar { height: 8px; }
.dp-bar-row .kpi-chip { font-size: var(--fs-xs); padding: 1px 6px; text-align: center; }
.dp-foot { display: flex; gap: 6px; padding: 8px 16px; background: var(--surface-2); border-top: 1px solid var(--hairline); }
.dp-foot .btn { flex: 1 1 auto; min-width: 0; padding: 0 10px; }
@media (prefers-reduced-motion: no-preference) {
  .page-enter .dp-grid > *, .page-enter .dp-tops > * { animation: rise .5s cubic-bezier(.32, .72, 0, 1) backwards; }
  .page-enter .dp-grid > :nth-child(n+5) { animation-delay: 60ms; }
  .page-enter .dp-grid > :nth-child(n+9) { animation-delay: 120ms; }
}

.tab-btn .pill { margin-inline-start: 4px; font-size: var(--fs-xs); padding: 0 7px; }
.emp-tabs, .pj-tabs, .settings-tabs { margin-bottom: 12px; }
.assign-form { max-width: 720px; }
.assign-picked { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin: 0 0 12px; border-radius: var(--radius-sm);
  background: var(--success-soft); color: var(--success); font-weight: 700; font-size: var(--fs-sm); }

.pj-code { direction: ltr; unicode-bidi: isolate; }
.page-head-title .pj-name { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-md); }
.pj-kpis { margin-bottom: 14px; }
.pj-staff { margin-bottom: 14px; }
.pj-staff .stack-bar { height: 10px; }
.pj-staff-keys { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: var(--fs-xs); }
.pj-staff-keys a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); text-decoration: none; }
.pj-staff-keys a:hover { color: var(--primary); }
.pj-staff-keys b { color: var(--text); font-variant-numeric: tabular-nums; }
.pj-desc { margin: 0 0 12px; color: var(--muted); line-height: 1.8; }
.pj-edit { padding: 12px 0; border-top: 1px solid var(--hairline); }
.pj-edit-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.pj-edit-row > div { min-width: 170px; }
.pj-edit-row select, .pj-edit-row input { margin: 0; }
.pj-scope { margin-bottom: 10px; }
.pj-ot-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; margin-bottom: 8px; }
.pj-ot-grid > section:only-child { grid-column: 1 / -1; }
@media (max-width: 900px) { .pj-ot-grid { grid-template-columns: 1fr; } }
.pj-records { margin-top: 14px; }
.pj-records summary { cursor: pointer; font-weight: 700; color: var(--primary); padding: 6px 0; }
.hbar-label .dept-mark { margin-inline-end: 4px; }
.hbar-label:has(bdi) { display: flex; align-items: center; min-width: 0; }
.hbar-label bdi { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbars { display: flex; align-items: flex-end; gap: 6px; min-height: 150px; overflow-x: auto; padding-bottom: 2px; direction: ltr; }
.mbar { flex: 1 0 44px; max-width: 72px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mbar-val { font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
.mbar-col { width: 100%; height: 110px; display: flex; align-items: flex-end; }
.mbar-col i { display: block; width: 100%; border-radius: 5px 5px 2px 2px; background: var(--accent); }
.mbar-lab { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; display: flex; flex-direction: column; }
.mbar-lab small { color: var(--faint); font-size: 10.5px; }

.ot-filter { gap: 8px; }
.ot-range { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.ot-range input { width: auto; margin: 0; }
.ot-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 14px; }
@media (max-width: 1280px) { .ot-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ot-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.db-kpi.clickable { cursor: pointer; transition: box-shadow .2s, transform .15s; }
.db-kpi.clickable:hover { box-shadow: var(--shadow-elevated); transform: translateY(-1px); }
.kpi-delta { font-weight: 700; }
.kpi-delta.up { color: var(--danger); }
.kpi-delta.down { color: var(--success); }

.mcol-stack i.p { background: var(--c-closing); }
.mcols { display: flex; align-items: stretch; gap: 6px; direction: ltr; overflow-x: auto; }
.mcols.dense { gap: 2px; }
.mcol { flex: 1 1 0; min-width: 26px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mcols.dense .mcol { min-width: 10px; }
.mcol-val { font-size: 11px; font-weight: 700; min-height: 16px; font-variant-numeric: tabular-nums; }
.mcol-bar { width: 100%; height: 190px; display: flex; align-items: flex-end; justify-content: center; }
.mcol-stack { width: min(100%, 38px); height: var(--h); display: flex; flex-direction: column; border-radius: 5px 5px 2px 2px; overflow: hidden; }
.mcol-stack i { display: block; min-height: 0; }
.mcol:hover .mcol-stack { filter: brightness(1.1); }
.mcol-lab { font-size: 11px; color: var(--muted); min-height: 16px; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .mcol-stack { transform-origin: bottom; animation: gcGrow .7s cubic-bezier(.32, .72, 0, 1) backwards; }
}
.wd-bars { display: flex; flex-direction: column; gap: 6px; }
.wd-row {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) 44px 68px; align-items: center; gap: 8px; width: 100%; padding: 3px 6px;
  border: 0; border-radius: var(--radius-xs); background: none; font-family: inherit; font-size: var(--fs-xs); color: inherit; text-align: start;
  cursor: pointer; transition: background .2s cubic-bezier(.32, .72, 0, 1);
}
.wd-row .hbar-track { height: 8px; }
.wd-row .hbar-track i { background: var(--primary); }
.wd-row.weekend .hbar-track i { background: var(--c-closing); }
.wd-row b { text-align: end; font-variant-numeric: tabular-nums; }
.inline-bar { display: inline-block; width: calc(100% - 56px); height: 8px; margin-inline-end: 8px; vertical-align: middle;
  border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.inline-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.col-bar b { font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
tr.row-selected td { background: var(--primary-tint); }
.scroll-y { max-height: 460px; overflow-y: auto; }
.peak { display: flex; align-items: center; gap: 6px; }
.peak .inline-bar { width: 70px; margin: 0; }
.peak em { font-style: normal; font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
.peak.ok .inline-bar i { background: var(--success); }
.peak.mid .inline-bar i { background: var(--warn); } .peak.mid em { color: var(--warn); }
.peak.low .inline-bar i { background: var(--danger); } .peak.low em { color: var(--danger); }

.rec-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.rec-search { flex: 1 1 240px; }
.rec-sums { display: inline-flex; gap: 6px; }
.rec-sums .report-metric { padding: 5px 10px; }
.ot-preview { padding: 8px 12px; margin: 4px 0 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: var(--fs-sm); }
.ot-preview.over { background: var(--danger-soft); color: var(--danger); }

.settings-pane .settings-grid { align-items: start; }
.settings-wide { grid-column: 1 / -1; }
.settings-actions { grid-column: 1 / -1; }
.settings-card .btn { margin-top: 10px; }
.settings-toggle { cursor: pointer; }
.settings-toggle span { font-size: var(--fs-md); color: var(--text); }
.switch {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 40px !important; height: 22px; min-height: 0; margin: 0;
  border-radius: var(--radius-pill); background: var(--border-strong); position: relative; cursor: pointer; border: 0; padding: 0;
  transition: background .2s ease;
}
.switch::after {
  content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-xs); transition: inset-inline-start .2s cubic-bezier(.32, .72, 0, 1);
}
.switch:checked { background: var(--primary); }
.switch:checked::after { inset-inline-start: 21px; }
.switch:focus-visible { outline: none; box-shadow: var(--ring); }
.weekend-chip { cursor: pointer; background: var(--surface-2); color: var(--text); }
.weekend-chip input { margin: 0; }
.weekend-chip.on { background: var(--primary); color: #fff; }
html[data-theme="dark"] .weekend-chip.on { color: var(--brand-900); }
.tone-preview { display: flex; gap: 8px; margin-top: 10px; }
.check-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.check-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; margin: 0; border-radius: var(--radius-xs); cursor: pointer; color: var(--text); font-size: var(--fs-md); }
.check-row:hover { background: var(--primary-tint); }
.check-row input { width: 16px; height: 16px; margin: 0; }
input.at-color { width: 38px; height: 28px; min-height: 0; padding: 0; border: 1px solid var(--border); cursor: pointer; margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .page-enter > *, .page-enter .db-bento > *, .page-enter .db-kpis > *, .page-enter .db-grid > * {
    animation: rise .5s cubic-bezier(.32, .72, 0, 1) backwards;
  }
  .page-enter > :nth-child(2), .page-enter .db-bento > :nth-child(2), .page-enter .db-kpis > :nth-child(2), .page-enter .db-grid > :nth-child(2) { animation-delay: 50ms; }
  .page-enter > :nth-child(3), .page-enter .db-bento > :nth-child(3), .page-enter .db-kpis > :nth-child(3), .page-enter .db-grid > :nth-child(3) { animation-delay: 100ms; }
  .page-enter > :nth-child(4), .page-enter .db-bento > :nth-child(4), .page-enter .db-kpis > :nth-child(4), .page-enter .db-grid > :nth-child(4) { animation-delay: 150ms; }
  .page-enter .db-bento > :nth-child(n+5) { animation-delay: 200ms; }
  .page-enter > :nth-child(5) { animation-delay: 200ms; }
  .page-enter > :nth-child(n+6) { animation-delay: 250ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.route-progress {
  position: fixed; top: 0; inset-inline: 0; z-index: 100; height: 2px;
  overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .25s ease;
}
.route-progress.on { opacity: 1; }
.route-progress::before {
  content: ''; position: absolute; inset-block: 0; right: 0; width: 38%;
  background: linear-gradient(90deg, transparent, #0066cc, #32c2ff, #33ff9e, transparent);
}
.route-progress.on::before { animation: routeBar 1.1s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes routeBar { from { transform: translateX(110%); } to { transform: translateX(-280%); } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.att-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
  margin-bottom: 14px; font-size: var(--fs-sm); color: var(--muted);
}
.att-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.att-legend i { width: 9px; height: 9px; border-radius: 2px; background: var(--c); }
.att-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.att-legend-rate {
  margin-inline-start: auto; padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--border);
}

.ot-stats {
  display: flex; flex-wrap: wrap; margin-bottom: 14px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--radius-md);
}
.ot-stat {
  flex: 1 1 170px; min-width: 0; padding: 8px 16px;
  display: grid; grid-template-columns: minmax(0, auto) 1fr; align-items: baseline; column-gap: 6px;
  border-inline-start: 1px solid var(--hairline); margin-inline-start: -1px;
}
.ot-stat span { grid-column: 1 / -1; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.ot-stat b { min-width: 0; font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--text); font-variant-numeric: tabular-nums; }
.ot-stat b bdi { display: block; font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-stat small { font-size: var(--fs-xs); color: var(--faint); white-space: nowrap; }

.lc { position: relative; direction: ltr; overflow-x: auto; }
.lc-plot { min-width: 380px; border-radius: var(--radius-sm); outline: none; }
.lc-plot:focus-visible { box-shadow: var(--ring); }
.lc-svg { display: block; width: 100%; height: auto; overflow: visible; }
.lc-grid { stroke: var(--hairline); stroke-width: 1; }
.lc-grid.base { stroke: var(--border-strong); }
.lc-ylab { font-size: 11px; fill: var(--faint); text-anchor: end; font-family: var(--font); }
.lc-xlab { font-size: 11px; fill: var(--muted); text-anchor: middle; font-family: var(--font); }
.lc-xlab.later { fill: var(--faint); }
.lc-band { fill: var(--primary-tint); }
.lc-line { fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.lc-pt { stroke: var(--surface); stroke-width: 1.25; }
.lc-pt.on { stroke-width: 2; }
.lc-series { transition: opacity .25s cubic-bezier(.32, .72, 0, 1); }
.lc-series.dim { opacity: .12; }
@media (prefers-reduced-motion: no-preference) {
  .lc-series.intro .lc-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: lcDraw 1.1s cubic-bezier(.32, .72, 0, 1) forwards; }
  .lc-series.intro .lc-pt, .lc-series.intro > path[fill] { animation: fadeIn .4s ease .65s backwards; }
}
@keyframes lcDraw { to { stroke-dashoffset: 0; } }

.lc-tip {
  position: absolute; top: 6px; z-index: 3; min-width: 210px; max-width: 290px; pointer-events: none;
  direction: rtl; transform: translateX(14px); padding: 10px 12px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-elevated);
  font-size: var(--fs-xs); color: var(--muted);
}
.lc-tip.flip { transform: translateX(calc(-100% - 14px)); }
.lc-tip-title { font-size: var(--fs-sm); font-weight: 700; color: var(--text); margin-bottom: 6px; }
.lc-tip-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 2px 0; }
.lc-tip-row bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-tip-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.lc-tip-sum { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--hairline); color: var(--text); font-weight: 700; }
.lc-tip-unit { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--hairline); color: var(--faint); }

.lc-mark { display: block; width: 26px; height: 14px; overflow: visible; flex-shrink: 0; }
.lc-mark line { stroke-width: 1.75; stroke-linecap: round; }
.lc-mark path, .lc-mark circle { stroke: var(--surface); stroke-width: 1; }

.lc-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 16px; }
.lc-key {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 6px 9px;
  padding: 8px 11px 7px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-family: inherit; font-size: var(--fs-sm); color: var(--text);
  text-align: start; cursor: pointer;
  transition: background .2s cubic-bezier(.32, .72, 0, 1), border-color .2s, opacity .2s, transform .15s;
}
.lc-key:hover { background: var(--surface-2); border-color: var(--border-strong); }
.lc-key:active { transform: translateY(1px); }
.lc-key:focus-visible { outline: none; box-shadow: var(--ring); }
.lc-key.off { opacity: .45; background: transparent; border-style: dashed; }
.lc-key-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-key-val { font-variant-numeric: tabular-nums; }
.lc-key-bar { grid-column: 1 / -1; height: 3px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.lc-key-bar span { display: block; height: 100%; border-radius: inherit; }
.lc-table { margin-top: 16px; overflow-x: auto; }
.lc-table table { min-width: 1040px; }
.lc-table .col-name { width: 210px; }
.lc-table .col-num { width: 64px; }
.lc-table-name { display: inline-flex; align-items: center; gap: 8px; }

@keyframes gcGrow { from { transform: scaleY(0); } }

.profile-head {
  background: var(--wave) no-repeat var(--end-x) 100% / 60% 170%,
    radial-gradient(60% 140% at var(--end-x) 100%, rgba(0, 255, 134, .18), transparent 60%),
    linear-gradient(115deg, #001338 0%, #00369e 60%, #0066cc 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  box-shadow: var(--shadow-soft); position: relative; overflow: hidden; padding: 14px 18px; margin-bottom: 12px; gap: 14px; }.avatar {
  width: 62px; height: 62px; border-radius: var(--radius-md); flex-shrink: 0;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #fff;
}
.profile-id { flex: 1; min-width: 210px; position: relative; z-index: 1; }
.profile-id h2 { margin: 0 0 3px; font-size: 21px; color: #fff; font-size: 19px; }
.profile-id .sub-en { font-size: var(--fs-md); color: rgba(255, 255, 255, .78); }
.profile-id .sub-meta { font-size: var(--fs-sm); color: rgba(255, 255, 255, .86); margin-top: 7px; margin-top: 4px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.profile-actions .btn { background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .3); color: #fff; box-shadow: none; }
.profile-actions .btn:hover { background: rgba(255, 255, 255, .26); filter: none; }
.profile-actions .btn.danger { background: var(--danger); border-color: var(--danger); }

.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 11px; margin-bottom: 18px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.meta-grid > div {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; min-width: 0; overflow-wrap: anywhere; padding: 8px 12px; }
.meta-k { display: block; font-size: var(--fs-xs); color: var(--muted); margin-bottom: 3px; }
.meta-v { font-size: var(--fs-lg); color: var(--text); font-weight: 700; font-size: var(--fs-md); }

.proj-code-link { color: var(--primary); font-weight: 700; font-size: var(--fs-md); text-decoration: none; display: block; line-height: 1.35; }
.proj-code-link:hover { text-decoration: underline; }
.proj-title-sub {
  font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; line-height: 1.4; unicode-bidi: plaintext; text-align: start;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.report-title { flex: 1; min-width: 240px; }
.report-title h2 { margin: 0 0 4px; font-size: var(--fs-xl); color: var(--text); line-height: 1.45; }
.report-title p { margin: 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.7; }
.report-metric {
  font-size: var(--fs-sm); color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); padding: 9px 15px; border-radius: var(--radius-sm); white-space: nowrap;
}
.report-metric strong { color: var(--text); font-size: var(--fs-lg); margin-inline-start: 6px; }

.mdetail > td { background: var(--surface-2); padding: 0 !important; }
.report-table tbody tr.mdetail:hover td { background: var(--surface-2); }
.mdetail-inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; padding: 14px 16px; }
.mproj {
  display: flex; gap: 10px; align-items: flex-start; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px;
}
.mproj-n {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: var(--fs-xs); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
html[data-theme="dark"] .mproj-n { color: var(--brand-900); }
.mproj-dates { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }

.form-section {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 16px 16px 6px; margin-bottom: 14px; background: var(--surface-2);
}
.form-section-title {
  font-size: var(--fs-sm); font-weight: 700; color: var(--text);
  margin-bottom: 13px; padding-bottom: 9px; border-bottom: 1px solid var(--border);
}
.switch-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 4px 0 12px; margin: 0; }
.switch-row input { width: 17px; height: 17px; margin: 3px 0 0; flex-shrink: 0; cursor: pointer; }
.switch-row strong { display: block; font-size: var(--fs-md); color: var(--text); margin-bottom: 3px; }
.switch-row small { display: block; font-size: var(--fs-xs); color: var(--muted); line-height: 1.7; }
.account-modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.account-field-group { background: var(--surface-2); border-radius: var(--radius-md); padding: 14px 14px 4px; margin-bottom: 12px; }
.account-field-group input:disabled { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }

.ts-grid-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-bottom: 7px; text-align: center; }
.ts-grid-head div {
  font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  padding: 7px 0; background: var(--surface-2); border-radius: var(--radius-xs);
}
.ts-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; user-select: none; }
.ts-cell {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 4px;
  min-height: 52px; cursor: default; background: var(--surface); position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.ts-cell:not(.blank)::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--c); opacity: .85; }
.ts-cell.today { box-shadow: inset 0 0 0 2px var(--primary); }

.ts-cell:focus-visible { outline: none; box-shadow: var(--ring); }
.ts-cell-note { position: absolute; top: 4px; inset-inline-end: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.ts-cell.clickable { cursor: pointer; }
.ts-cell.clickable:hover { border-color: var(--primary); box-shadow: var(--shadow-soft); transform: translateY(-1px); }
.ts-cell.blank { border: none; background: none; cursor: default; min-height: 0; }
.ts-cell.is-weekend, .ts-cell.as-weekend { background: var(--surface-2); }
.ts-cell.saved { border-color: var(--primary); }
.ts-cell.is-auto {
  border-style: dashed; border-color: color-mix(in srgb, var(--c) 45%, var(--border));
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, var(--surface)) 0 6px, var(--surface) 6px 12px);
}
.ts-cell.is-locked { cursor: not-allowed; }
.ts-brush.is-mark { cursor: default; border-style: dashed; }
.ts-life { margin-inline-start: 6px; font-size: var(--fs-xs); vertical-align: middle; }
.ts-day { font-size: 11px; font-weight: 400; color: var(--muted); }
.ts-val { font-size: var(--fs-lg); font-weight: 700; line-height: 1; min-height: 17px; color: var(--c); }
.ts-cell:not(.is-auto) .ts-val { filter: saturate(1.1); }

.lock-bar {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 0 12px; min-height: var(--control-h-sm);
  border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: var(--fs-sm);
}
.lock-bar small { color: var(--muted); font-weight: 400; }
.settings-card > .lock-bar, .card > .lock-bar:first-child { display: flex; margin-bottom: 12px; }
.lock-bar.is-locked { background: var(--accent-soft); border-color: var(--accent); color: var(--success); font-weight: 700; }
.lock-bar.is-warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); font-weight: 700; }

.ts-done-toggle {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: var(--fs-sm); font-weight: 700; padding: 5px 13px 5px 7px;
  border-radius: var(--radius-pill); background: var(--surface-3); color: var(--muted);
  transition: background .18s ease, color .18s ease;
}
.ts-done-toggle:has(input:checked) { background: var(--success-soft); color: var(--success); }
.ts-done-toggle input { width: auto; margin: 0; accent-color: var(--success); cursor: pointer; }
.ts-monthbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 10px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-xs);
}
.ts-monthbar select { width: auto; min-width: 120px; margin: 0; height: var(--control-h-sm); min-height: 0; padding-block: 0; }
.ts-nav { width: var(--control-h-sm); height: var(--control-h-sm); font-size: 18px; text-decoration: none; }
.ts-nav.disabled { opacity: .35; pointer-events: none; }
.ts-lock { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }
.ts-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ts-progress-head b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.ts-progress-label { font-weight: 700; margin-inline-end: 10px; }
.ts-progress-track { display: block; height: 10px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.ts-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(var(--to-end), #0066cc, #32c2ff 60%, #33ff9e); transition: width .6s cubic-bezier(.32, .72, 0, 1); }
.ts-dept-progress { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; margin-top: 14px; }
.ts-dept-chip {
  display: grid; grid-template-columns: minmax(0, 1fr) 70px auto; align-items: center; gap: 8px;
  padding: 5px 8px; border: 1px solid transparent; border-radius: var(--radius-xs); background: none;
  font-family: inherit; font-size: var(--fs-xs); color: var(--text); cursor: pointer; text-align: start;
}
.ts-dept-chip:hover { background: var(--surface-2); }
.ts-dept-chip.active { border-color: var(--primary); background: var(--primary-tint); }
.ts-dept-name { display: flex; min-width: 0; }
.ts-dept-name bdi { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-dept-track { height: 6px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.ts-dept-track i { display: block; height: 100%; border-radius: inherit; background: var(--success); }
.ts-dept-track i.mid { background: var(--warn); }
.ts-dept-track i.low { background: var(--danger); }
.ts-dept-chip b { font-variant-numeric: tabular-nums; color: var(--muted); }
.ts-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.ts-filters .ts-search-input { flex: 1 1 260px; }
.ts-filters select { width: auto; min-width: 180px; margin: 0; }
.ts-filters select, .att-emp-tools select,
.ts-filters .ts-search-input input, .att-emp-tools .ts-search-input input {
  height: var(--control-h-sm); min-height: 0; margin: 0; padding-block: 0;
}
.seg button span { font-variant-numeric: tabular-nums; opacity: .75; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover, th.sorted { color: var(--primary); }
.ts-sheet-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.ts-who { flex: 1 1 220px; min-width: 0; }
.ts-who h2 { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: var(--fs-lg); }
.ts-sheet-actions { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.ts-balance .leave-track { grid-column: 1 / -1; display: block; height: 5px; margin-top: 4px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.ts-balance .leave-track i { display: block; height: 100%; background: var(--accent); }
.ts-palette { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.ts-brush {
  display: inline-flex; align-items: center; gap: 6px; height: var(--control-h-sm); padding: 0 11px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface);
  font-family: inherit; font-size: var(--fs-sm); color: var(--text); cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.ts-brush i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.ts-brush b { font-size: var(--fs-xs); color: var(--c); }
.ts-brush:hover:not(:disabled) { border-color: var(--c, var(--primary)); }
.ts-brush.active { border-color: var(--c, var(--primary)); background: color-mix(in srgb, var(--c, var(--primary)) 12%, var(--surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--primary)) 30%, transparent); font-weight: 700; }
.ts-brush:disabled { cursor: default; }
.ts-note-flag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #fff;
  font-size: 12px; font-weight: 700; margin-inline-start: 6px; cursor: help; vertical-align: middle;
}
.ts-note-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 11px 15px; margin-bottom: 12px; }
.ts-note-box.has-note { background: var(--danger-soft); border-color: var(--danger); }
.ts-note-box textarea { margin: 8px 0; resize: vertical; }

.attend-tall-body { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.attend-tall-donut { width: 150px; height: 150px; flex-shrink: 0; }
.attend-tall-donut .mini-donut-text { font-size: 26px; }
.attend-tall-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; flex: 1; min-width: 260px; }
.attend-tall-stat { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.attend-tall-stat .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.attend-tall-stat strong { display: block; font-size: 22px; color: var(--text); line-height: 1.2; font-weight: 700; }
.attend-tall-stat span { font-size: var(--fs-xs); color: var(--muted); }

.mo-detail-box { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 14px; }
.mo-detail-item {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: var(--fs-sm);
}
.mo-detail-item:last-child { border-bottom: none; }
.mo-detail-dates { color: var(--muted); min-width: 150px; }
.mo-detail-proj { min-width: 140px; font-weight: 700; }
.mo-detail-hours { color: var(--text); }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-card h2 { display: flex; align-items: center; gap: 8px; }
.settings-card .hint { margin-top: -8px; margin-bottom: 14px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.settings-row:last-child { border-bottom: none; }
.settings-row label { font-size: var(--fs-md); color: var(--text); font-weight: 400; margin-bottom: 0; }
.settings-row .settings-input { display: flex; align-items: center; gap: 8px; }
.settings-row input[type="number"] { width: 92px; text-align: center; margin-bottom: 0; }
.years-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.year-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-light); color: var(--primary);
  border-radius: var(--radius-pill); padding: 6px 8px 6px 14px; font-size: var(--fs-md); font-weight: 700;
}
.year-chip button {
  border: none; background: var(--danger-soft); color: var(--danger);
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.year-chip button:hover { background: var(--danger); color: #fff; }
.add-year-row { display: flex; gap: 8px; align-items: center; }
.add-year-row input { width: 110px; margin-bottom: 0; }
.dept-order-list { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.dept-order-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; background: var(--surface-2); border-radius: var(--radius-xs); }
.dept-order-num {
  width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
html[data-theme="dark"] .dept-order-num { color: var(--brand-900); }
.dept-order-name { flex: 1; font-size: var(--fs-md); font-weight: 400; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dept-order-count { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.dept-order-actions { display: flex; gap: 4px; }
.dept-order-actions .icon-btn { width: var(--control-h-sm); height: var(--control-h-sm); font-size: 12px; }

.ba-project-list {
  max-height: 260px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px; margin-top: 6px; background: var(--surface);
}
.ba-project-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px;
  border-radius: var(--radius-xs); cursor: pointer; margin: 0; font-size: var(--fs-sm);
}
.ba-project-row:hover { background: var(--primary-tint); }
.ba-project-row input { width: auto; margin: 0; flex-shrink: 0; min-height: 0; }
.ba-proj-code { font-weight: 700; color: var(--primary); flex-shrink: 0; }
.ba-proj-name { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shared-dept-section { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.shared-dept-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }

.badge.cat-site { background: color-mix(in srgb, var(--cat-site) 13%, transparent); color: var(--cat-site); }
.badge.cat-office { background: color-mix(in srgb, var(--cat-office) 13%, transparent); color: var(--cat-office); }
.badge.cat-office_projects { background: color-mix(in srgb, var(--cat-office-projects) 13%, transparent); color: var(--cat-office-projects); }

html[dir="ltr"] select { background-position: right 11px center; padding-left: 12px !important; padding-right: 34px !important; }
html[dir="ltr"] .sm-tip, html[dir="ltr"] .lc-tip { direction: ltr; }
html[dir="ltr"] .route-progress::before { right: auto; left: 0; }
html[dir="ltr"] body { letter-spacing: 0; }
html[dir="ltr"] .kpi-legend-item .kli-text, html[dir="ltr"] .db-kpi-label { letter-spacing: .01em; }

.login-hero-logos {
  display: inline-flex; align-items: center; gap: 20px; margin-bottom: 26px;
  padding: 0; background: none; border: 0; box-shadow: none;
}
.login-hero-logos img { display: block; width: auto; }
.login-hero-logos .lh-se { height: 54px; }
.login-hero-logos .lh-pdc { height: 40px; }
.login-hero-logos .login-logo-sep { width: 1px; height: 38px; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--primary) 30%, transparent), transparent); }
.login-recover-box {
  display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: center;
  margin: -6px 0 16px; padding: 12px 14px;
  border-radius: var(--radius-md); background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 16%, transparent);
  font-size: var(--fs-sm); color: var(--text); animation: fadeIn .25s ease;
}
.lr-icon {
  width: 38px; height: 38px; border-radius: 11px; align-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #0080ff 0%, #0027b9 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px -10px rgba(0, 39, 185, .7);
}
.lr-icon svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lr-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lr-body b { font-size: var(--fs-sm); color: var(--text); }
.login-recover-box p { margin: 0; white-space: pre-line; line-height: 1.7; color: var(--muted); }
@media (max-width: 900px) { .login-hero-logos { margin-inline: auto; } }

.site-signature {
  display: flex; align-items: center; gap: 18px; margin: 20px 22px 24px; padding: 0;
  color: var(--muted); font-size: var(--fs-xs); background: none;
}
.sig-rule {
  flex: 1; height: 1px; position: relative;
  background: linear-gradient(90deg, transparent, rgba(50, 194, 255, .55), rgba(51, 255, 158, .5), transparent);
}
.sig-rule::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 5px; height: 5px;
  background: var(--accent); border-radius: 1px; transform: translate(-50%, -50%) rotate(45deg); opacity: .75;
}
.sig-body { display: inline-flex; align-items: center; gap: 12px; padding: 0; background: none; border: 0; box-shadow: none; }
.sig-mark { display: inline-flex; align-items: center; padding-inline-end: 12px; border-inline-end: 1px solid color-mix(in srgb, var(--primary) 20%, transparent); }
.sig-mark img { height: 17px; width: auto; display: block; opacity: .92; }
.sig-text { display: inline-flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.sig-by { letter-spacing: 0; }
.sig-who {
  font-size: var(--fs-sm); font-weight: 700; color: var(--brand-700);
  background: linear-gradient(90deg, #001f5e, #0066cc 55%, #00b377);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html[data-theme="dark"] .sig-who {
  color: var(--brand-300); background-image: linear-gradient(90deg, #80c0ff, #32c2ff 50%, #33ff9e);
}
.site-signature.on-login { width: min(1000px, 100%); margin: 0; }
@media (max-width: 640px) {
  .site-signature { margin: 4px 12px 16px; gap: 8px; }
  .sig-rule { display: none; }
  .sig-body { margin-inline: auto; }
}

.usermenu-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 10px;
  border-radius: var(--radius-md); background: linear-gradient(135deg, var(--brand-50), var(--surface-2));
}
html[data-theme="dark"] .usermenu-card { background: var(--surface-2); }
.usermenu-avatar.lg { width: 46px; height: 46px; font-size: 19px; border-radius: 14px; box-shadow: var(--shadow-btn); }
.usermenu-id { min-width: 0; }
.usermenu-name { font-size: var(--fs-lg); font-weight: 700; color: var(--text); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-user { font-size: var(--fs-xs); color: var(--muted); }
.usermenu-role-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 12px 10px; border-bottom: 1px solid var(--hairline); }
.usermenu-dept { font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.role-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 700; white-space: nowrap;
  background: var(--primary-light); color: var(--primary);
}
.role-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.role-badge.role-admin { background: color-mix(in srgb, var(--brand-800) 12%, transparent); color: var(--brand-800); }
html[data-theme="dark"] .role-badge.role-admin { color: var(--brand-200); background: rgba(128, 192, 255, .14); }
.role-badge.role-manager { background: var(--purple-soft); color: var(--purple); }
.role-badge.role-hr { background: var(--accent-soft); color: var(--success); }
.role-badge.role-dept_manager { background: var(--info-soft); color: var(--info); }
.role-badge.role-guest { background: var(--surface-3); color: var(--muted); }
.usermenu-section { display: flex; flex-direction: column; padding: 4px 0; border-bottom: 1px solid var(--hairline); }
.usermenu-section:last-child { border-bottom: none; }
.usermenu-section:empty { display: none; }
.usermenu-label { padding: 6px 12px 2px; font-size: 11px; font-weight: 700; color: var(--faint); }
.um-ico { width: 18px; text-align: center; color: var(--muted); font-size: 13px; flex-shrink: 0; }
.usermenu-drop button:hover .um-ico { color: inherit; }

.back-link { font-size: var(--fs-sm); text-decoration: none; }
.finder {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); padding: 12px; margin-bottom: 12px; padding: 10px 12px; padding: 8px 10px; margin-bottom: 10px; }
.finder-search {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  padding-inline: 12px 6px; transition: border-color .16s, box-shadow .16s, background .16s; border-radius: var(--fc-r); background: var(--surface); border-color: var(--border); }
.finder-search:focus-within { border-color: var(--primary); box-shadow: var(--ring); background: var(--surface); }
.finder-ico { font-size: 18px; color: var(--faint); line-height: 1; font-size: 15px; }
.finder-search input {
  flex: 1; min-width: 0; margin: 0; border: 0; background: transparent; box-shadow: none !important;
  height: 46px; padding: 0 4px; font-size: var(--fs-lg); height: 38px; font-size: var(--fs-md); height: 34px; }
.finder-search input::-webkit-search-cancel-button { display: none; }
.finder-search .clear-x { position: static; transform: none; flex-shrink: 0; }
.finder-search.has-value .clear-x { display: flex; }
.finder-search.compact input { height: 40px; font-size: var(--fs-md); }

.finder-row { margin-top: 10px; }
.finder-extra { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.fx { display: flex; flex-direction: column; gap: 3px; margin: 0; min-width: 150px; flex: 0 1 190px; }
.fx > span { font-size: 11px; font-weight: 700; color: var(--faint); font-size: 10.5px; letter-spacing: 0; }
.fx select { margin: 0; height: var(--control-h-sm); min-height: 0; padding-block: 0; font-size: var(--fs-sm); border-radius: var(--fc-r); }
.fx.inline { flex-direction: row; align-items: center; gap: 6px; min-width: 0; flex: 0 0 auto; }
.fx.inline select { width: auto; min-width: 118px; }
.finder-extra .btn.small { height: var(--control-h-sm); }
.results-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin: 4px 2px 10px; margin: 2px 2px 8px; }
.results-bar .result-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.results-bar .result-meta b { color: var(--text); }

.view-toggle button { display: inline-flex; align-items: center; gap: 5px; }
.af-chip.removable { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; }
.af-chip.removable button {
  border: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3); color: var(--muted);
  cursor: pointer; font-size: 10px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
}
.af-chip.removable button:hover { background: var(--danger); color: #fff; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush table { margin: 0; }
.empty-state { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty-state p { margin: 0 0 12px; font-size: var(--fs-lg); }
.empty-cell { text-align: center !important; padding: 22px !important; }

.load-more { display: flex; justify-content: center; margin: 14px 0 4px; }

.modal.modal-form { display: flex; flex-direction: column; padding: 0; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: hidden; }
.modal.modal-form.modal-wide { width: min(860px, 96vw); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px 12px; flex-shrink: 0; background: linear-gradient(var(--to-end), #0066cc 0%, #32c2ff 14%, #33ff9e 30%, var(--hairline) 52%, var(--hairline) 100%) no-repeat 0 100% / 100% 2px; }
.modal-head h3 { margin: 0; }
.modal-head .close-x { float: none; background: none; border: 0; padding: 4px; font-family: inherit; }
.modal-body { padding: 16px 22px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-foot, .modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal-foot { padding: 12px 22px; border-top: 1px solid var(--hairline); background: var(--surface-2); flex-shrink: 0; }
.modal-actions { padding-top: 6px; }
.req-note { margin-inline-end: auto; font-size: var(--fs-xs); color: var(--muted); }
.req { color: var(--danger); font-weight: 700; }
input.invalid, select.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
fieldset.form-section { margin: 0 0 12px; min-width: 0; }
legend.form-section-title { float: left; width: 100%; padding-bottom: 8px; }
legend.form-section-title + * { clear: both; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) {
  .form-grid, .form-grid.four { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .modal-backdrop { padding: 10px; }
  .modal-head, .modal-body, .modal-foot { padding-inline: 14px; }
}

.clearable.block { display: block; }
.suggest-box .search-suggestion { display: block; width: 100%; text-align: start; border: 0; border-bottom: 1px solid var(--hairline); background: none; font-family: inherit; color: var(--text); }
.suggest-box .search-suggestion small { display: block; }

.import-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.import-steps li { display: flex; gap: 10px; align-items: flex-start; }
.import-steps li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.import-steps b { font-size: var(--fs-md); }
.import-steps small { font-size: var(--fs-xs); color: var(--muted); line-height: 1.6; }
.import-steps .btn { align-self: flex-start; margin-top: 6px; }
.step-n {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: var(--fs-xs); font-weight: 700;
}
html[data-theme="dark"] .step-n { color: var(--brand-900); }
.dropzone {
  display: flex; align-items: center; gap: 14px; padding: 18px; margin: 0 0 12px; cursor: pointer;
  border: 2px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-2);
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-tint); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dz-ico { font-size: 26px; color: var(--primary); }
.dz-text { display: flex; flex-direction: column; min-width: 0; }
.dz-text b { color: var(--text); font-size: var(--fs-md); }
.dz-text small { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.is-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--surface-3); font-size: var(--fs-sm); }
.is-chip b { font-variant-numeric: tabular-nums; }
.is-chip.ok { background: var(--success-soft); color: var(--success); }
.is-chip.warn { background: var(--warn-soft); color: var(--warn); }
.import-warn { margin: 0 0 10px; padding-inline-start: 18px; font-size: var(--fs-sm); color: var(--warn); line-height: 1.8; }
.import-table { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.chg { font-size: var(--fs-xs); line-height: 1.7; }
.chg s { color: var(--muted); }
.table-scroll { overflow-x: auto; }

.welcome-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 20px 24px; margin-bottom: 16px; border-radius: var(--radius-lg); color: #fff;
  background:
  var(--wave) no-repeat var(--end-x) 100% / 64% 170%,
  radial-gradient(55% 140% at var(--end-x) 100%, rgba(0, 255, 134, .22), transparent 62%),
  var(--se-hero);
  box-shadow: 0 18px 40px -24px rgba(0, 19, 56, .75);
}
.welcome-hero.is-evening {
  background:
  var(--wave) no-repeat var(--end-x) 100% / 64% 170%,
  radial-gradient(55% 140% at var(--end-x) 100%, rgba(0, 128, 255, .28), transparent 62%),
  var(--se-hero-night);
}.wh-ico {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22);
}
.wh-ico svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.welcome-hero.is-morning .wh-ico svg { stroke: #ffe08a; }
.welcome-hero.is-evening .wh-ico svg { stroke: #cfe3ff; }
.wh-text { flex: 1; min-width: 200px; }
.wh-greet { margin: 0; font-size: 21px; color: #fff; font-weight: 700; }
.wh-date { margin: 3px 0 0; color: rgba(255, 255, 255, .8); font-size: var(--fs-sm); }
.wh-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.welcome-hero .role-badge { background: rgba(255, 255, 255, .16); color: #fff; }
.wh-alert {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 8px;
  border-radius: var(--radius-pill); background: #fff; color: var(--brand-800); text-decoration: none;
  font-size: var(--fs-sm); font-weight: 700; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .55);
  transition: transform .2s cubic-bezier(.32, .72, 0, 1);
}
.wh-alert:hover { transform: translateY(-1px); }
.wh-alert b {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger); color: #fff; font-size: var(--fs-xs); font-variant-numeric: tabular-nums;
}
.wh-alert i { font-style: normal; opacity: .55; }
.hr-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .hr-tiles { grid-template-columns: minmax(0, 1fr); } }
.hr-tile {
  display: flex; align-items: center; gap: 12px; padding: 14px; text-align: start; cursor: pointer; font-family: inherit; color: var(--text);
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.hr-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-elevated); border-color: var(--primary); }
.hr-tile-ico {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #0080ff 0%, #0027b9 100%); color: #fff; font-size: 20px; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px -10px rgba(0, 39, 185, .7);
}
.hr-tile-txt { display: flex; flex-direction: column; min-width: 0; }
.hr-tile-txt b { font-size: var(--fs-md); }
.hr-tile-txt small { font-size: var(--fs-xs); color: var(--muted); }
.hr-progress-nums { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; color: var(--muted); }
.hr-progress-nums b { font-size: 24px; color: var(--text); font-variant-numeric: tabular-nums; }
.hr-progress-nums .kpi-chip { margin-inline-start: auto; }
.hr-progress-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: var(--fs-sm); }
.hr-leave-list { display: grid; gap: 6px; }
.hr-leave {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: var(--fs-sm);
}
.hr-leave i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.hr-leave b { font-variant-numeric: tabular-nums; }
.hr-leave small { color: var(--faint); font-size: 11px; }
.hr-list { display: flex; flex-direction: column; }
.hr-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-bottom: 1px solid var(--hairline);
  color: inherit; text-decoration: none; border-radius: var(--radius-xs); transition: background .15s;
}
.hr-row:last-child { border-bottom: none; }
.hr-row:hover { background: var(--primary-tint); }
.hr-av {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary); font-weight: 700; font-size: var(--fs-sm);
}
.hr-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.hr-row-main bdi { font-weight: 700; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-row-main small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-row-val { font-size: var(--fs-sm); white-space: nowrap; }
.hr-alerts { display: flex; flex-direction: column; gap: 8px; }
.hr-alert { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.hr-alert.warn { border-color: var(--warn); background: var(--warn-soft); }
.hr-alert summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; font-size: var(--fs-sm); }
.hr-alert summary::-webkit-details-marker { display: none; }
.hr-alert[disabled] summary { cursor: default; opacity: .7; }
.hr-alert-n { font-size: 20px; font-weight: 700; min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.hr-alert .hr-list { padding: 0 8px 8px; max-height: 280px; overflow-y: auto; }

.tab-accent { color: var(--primary) !important; font-weight: 700 !important; }
.assign-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; }
@media (max-width: 900px) { .assign-grid { grid-template-columns: 1fr; } }
.assign-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: var(--fs-md); }
.check-inline { display: inline-flex; align-items: center; gap: 7px; margin: 8px 0; font-size: var(--fs-sm); color: var(--text); cursor: pointer; }
.check-inline input { margin: 0; }
.assign-results { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; padding: 2px; }
.assign-hint { margin: 8px 2px; font-size: var(--fs-sm); }
.assign-proj {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "code name" "meta meta"; gap: 2px 10px;
  padding: 9px 12px; text-align: start; cursor: pointer; font-family: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .15s, background .15s;
}
.assign-proj:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-tint); }
.assign-proj.picked { border-color: var(--success); background: var(--success-soft); }
.assign-proj.is-on { opacity: .6; cursor: default; }
.ap-code { grid-area: code; font-weight: 700; color: var(--primary); direction: ltr; unicode-bidi: isolate; }
.ap-name { grid-area: name; font-size: var(--fs-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; text-align: start; }
.ap-meta { grid-area: meta; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--fs-xs); color: var(--faint); }
.assign-form-side { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; align-self: start; }
.assign-picked.empty { background: var(--surface); color: var(--muted); font-weight: 400; border: 1px dashed var(--border-strong); }
.assign-picked > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.assign-picked small { font-weight: 400; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-check { width: 22px; height: 22px; border-radius: 50%; background: var(--success); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.assign-form .btn { width: 100%; }

.proj-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (max-width: 1100px) { .proj-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.proj-kpi {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; cursor: pointer;
  text-align: start; font-family: inherit; color: var(--text);
  background: linear-gradient(140deg, color-mix(in srgb, var(--tone) 9%, var(--card-bg)) 0%, var(--card-bg) 62%); border: 1px solid color-mix(in srgb, var(--tone) 14%, var(--border)); border-radius: var(--radius-md); box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.proj-kpi::before {
  content: ''; position: absolute; top: 0; inset-inline-start: 16px; width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--tone);
}
.proj-kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.proj-kpi.active {
  border-color: var(--tone); background: linear-gradient(140deg, color-mix(in srgb, var(--tone) 18%, var(--card-bg)) 0%, var(--card-bg) 72%); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 25%, transparent), 0 10px 22px -14px var(--tone);
}
.proj-kpi b { font-size: 22px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.proj-kpi span { font-size: var(--fs-xs); color: var(--muted); }
.proj-views { flex-wrap: wrap; height: auto; }
.proj-views button { height: calc(var(--control-h-sm) - 6px); }
.proj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.proj-card {
  --st: var(--c-progress);
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 12px;
  text-decoration: none; color: inherit; background: linear-gradient(180deg, color-mix(in srgb, var(--st) 6%, var(--card-bg)) 0, var(--card-bg) 84px); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); transition: border-color .18s, box-shadow .18s, transform .15s;
}
.proj-card::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(var(--to-end), var(--st) 0%, color-mix(in srgb, var(--st) 55%, transparent) 45%, transparent 100%);
}
.proj-card.st-closing { --st: var(--c-closing); }
.proj-card.st-completed { --st: var(--c-completed); }
.proj-card.st-cancelled { --st: var(--c-cancelled); }
.proj-card:hover { border-color: var(--st); box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-code { font-weight: 700; color: var(--primary); font-size: var(--fs-md); direction: ltr; unicode-bidi: isolate; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-name { font-size: var(--fs-sm); color: var(--text); line-height: 1.55; min-height: 3.1em; unicode-bidi: plaintext; text-align: start;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-dept { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); min-width: 0; }
.pc-dept bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pc-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 10px; margin-top: auto; border-top: 1px solid var(--hairline); }
.pc-age, .pc-staff { display: flex; flex-direction: column; min-width: 0; }
.pc-foot small { font-size: 11px; color: var(--faint); }
.pc-foot b { font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.pc-foot em { font-style: normal; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-bar { display: block; height: 4px; margin-top: 4px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.pc-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.projects-table .col-tag { width: 118px; }
.projects-table .col-age { width: 130px; font-size: var(--fs-xs); color: var(--muted); }
.pj-edit-wide { flex: 1 1 320px; }

.att-emp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.att-emp-tools .seg { flex-wrap: wrap; height: auto; }
.att-emp-tools .seg button { height: calc(var(--control-h-sm) - 6px); }
.att-emp-tools .ts-search-input { flex: 1 1 220px; }
.att-emp-tools select { width: auto; margin: 0; min-width: 140px; }
.print-head, .print-only { display: none; }

.report-tabs { margin-bottom: 14px; }
.report-card { padding: 18px 20px; }
.report-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.report-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.rs {
  --tone: var(--primary);
  position: relative; display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; overflow: hidden;
  background: linear-gradient(140deg, color-mix(in srgb, var(--tone) 9%, var(--card-bg)) 0%, var(--card-bg) 64%); border: 1px solid color-mix(in srgb, var(--tone) 14%, var(--border)); border-radius: var(--radius-md);
}
.rs::before {
  content: ''; position: absolute; top: 0; inset-inline-start: 16px; width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--tone);
}
.rs b { font-size: 22px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.rs span { font-size: var(--fs-xs); color: var(--muted); }
.report-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.report-filters select { width: auto; min-width: 150px; margin: 0; }
.report-filters .ts-search-input { flex: 1 1 240px; }
.report-filters .ts-search-input input { margin: 0; }
.dept-compare { min-width: 1180px; }
.dept-compare .col-name { width: 230px; }
.dept-compare .col-bar { width: 150px; }
.dept-compare .col-num { width: 84px; }
.report-pane .section-title { margin-top: 18px; }

.law-panel { margin-top: 14px; }
.law-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.law-tools .seg { flex-wrap: wrap; height: auto; }
.law-tools .seg button { height: calc(var(--control-h-sm) - 6px); }
.law-note { font-size: var(--fs-xs); }
.law-table .col-bar { width: 24%; }
.law-bar { width: calc(100% - 110px); }
.month-chip {
  display: inline-flex; align-items: center; gap: 4px; margin: 2px; padding: 1px 8px; border-radius: var(--radius-pill);
  background: var(--warn-soft); color: var(--warn); font-size: 11px; white-space: nowrap;
}
.month-chip b { font-variant-numeric: tabular-nums; }
button.db-legend-row { width: 100%; border: 0; font-family: inherit; color: inherit; text-align: start; }
.db-legend-row.clickable { cursor: pointer; transition: background .15s; }
.db-legend-row.clickable:hover { background: var(--primary-tint); }
.mcol-stack i.a { background: linear-gradient(180deg, #32c2ff, #0066cc); }

.mb-period { display: inline-flex; align-items: center; gap: 6px; padding: 3px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--hairline); }
.mb-period select { min-width: 112px; margin: 0; height: var(--control-h-sm); min-height: 0; padding-block: 0; border-color: transparent; background-color: var(--surface); font-size: var(--fs-sm); }
.mb-period .ts-nav { width: var(--control-h-sm); height: var(--control-h-sm); }
.ts-lock .lock-bar, .ts-lock .btn { height: var(--control-h-sm); min-height: var(--control-h-sm); }
.ts-lock .lock-bar { padding-block: 0; }
.ts-selbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 8px 10px; margin: 12px 0 0; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--border); transition: background .18s, border-color .18s;
}
.ts-selbar.has-sel { background: var(--primary-tint); border-color: var(--primary); }
.ts-sel-info { display: flex; align-items: baseline; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.ts-sel-info b { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.ts-sel-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-palette.is-apply { align-items: center; padding: 8px 10px; margin-top: 8px; border-radius: var(--radius-md); border: 1px dashed var(--border-strong); }
.ts-apply-label { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); margin-inline-end: 4px; }
.ts-palette.is-apply .ts-brush:not(:disabled) { cursor: pointer; }
.ts-palette.is-apply .ts-brush:not(:disabled):hover { background: color-mix(in srgb, var(--c, var(--primary)) 12%, var(--surface)); }
.ts-palette.is-apply .ts-brush:disabled { opacity: .45; }
.ts-brush.reset, .ts-brush.detail { --c: var(--muted); }
.ts-cell.selected {
  border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent);
}
.ts-cell.selected::before {
  content: '✓'; position: absolute; top: 3px; inset-inline-start: 5px; font-size: 10px; font-weight: 700; color: var(--primary);
}

.settings-row.block { display: block; }
.settings-row.block > label { display: block; margin-bottom: 8px; }

.settings-actions-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.settings-actions-row .btn { margin-top: 10px; }
.types-table { min-width: 900px; }
.types-table .col-letter { width: 90px; }
.types-table td { vertical-align: middle; }
.cell-input { margin: 0; min-height: 0; height: var(--control-h-sm); padding: 0 8px; font-size: var(--fs-sm); }
.cell-input.letter { width: 60px; text-align: center; font-weight: 700; }
.core-tag { display: inline-flex; gap: 4px; margin-top: 3px; font-size: 11px; color: var(--faint); }
.add-type { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.add-type h3 { margin: 0 0 10px; font-size: var(--fs-md); }
.add-type-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.add-type-row .btn { margin-inline-start: auto; }
.color-row { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: var(--fs-sm); color: var(--text); cursor: pointer; }
.color-row input[type="color"] { width: 42px; height: 30px; min-height: 0; padding: 2px; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-xs); cursor: pointer; flex-shrink: 0; }
.color-row.series span { min-width: 0; font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; text-align: start; }
.color-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 6px; }
@media (max-width: 1000px) { .color-groups { grid-template-columns: 1fr; } }
.color-group { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); }
.color-group.wide { grid-column: 1 / -1; }
.color-group h3 { margin: 0 0 10px; font-size: var(--fs-sm); }
.series-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.login-recover-box.recover-preview { margin: 0 0 4px; max-width: 460px; }
.import-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .import-cards { grid-template-columns: 1fr; } }
.import-card {
  display: flex; align-items: center; gap: 12px; padding: 14px; text-align: start; cursor: pointer; font-family: inherit; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.import-card:hover { border-color: var(--primary); box-shadow: var(--shadow-soft); transform: translateY(-1px); }
.import-card b { display: block; }
.import-card small { display: block; font-size: var(--fs-xs); color: var(--muted); }
.ic-ico { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-light); color: var(--primary); font-size: 18px; flex-shrink: 0; }
.year-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 14px; }
.year-card {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--primary);
  transition: opacity .2s, border-color .2s;
}
.year-card.off { border-top-color: var(--faint); background: var(--surface-2); }
.year-card.off .yc-year { color: var(--muted); text-decoration: line-through; }
.yc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.yc-year { font-size: 22px; font-variant-numeric: tabular-nums; }
.yc-switch { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-sm); color: var(--text); cursor: pointer; }
.yc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.yc-stats span { display: flex; flex-direction: column; padding: 6px 8px; border-radius: var(--radius-xs); background: var(--surface-2); }
.yc-stats b { font-variant-numeric: tabular-nums; }
.yc-stats small { font-size: 11px; color: var(--muted); line-height: 1.4; }
.yc-roles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.yc-label { width: 100%; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.yc-role { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 3px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text); cursor: pointer; }
.yc-role input { margin: 0; }
.yc-role.fixed { background: var(--success-soft); border-color: transparent; color: var(--success); cursor: default; }
.yc-role:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); }
.yc-role:has(input:disabled) { opacity: .55; cursor: default; }
.yc-foot { display: flex; gap: 6px; flex-wrap: wrap; }
.yc-foot .btn { margin: 0; }
.lock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.lock-card {
  display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border); border-inline-start: 3px solid var(--primary);
}
.lock-card.is-locked { border-inline-start-color: var(--success); background: color-mix(in srgb, var(--success) 5%, var(--surface)); }
.lock-card.future { opacity: .6; border-inline-start-color: var(--faint); }
.lock-card.current { border-inline-start-color: var(--warn); }
.lk-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lk-top b { font-size: var(--fs-lg); }
.lk-state { font-size: var(--fs-xs); color: var(--muted); }
.lock-card.is-locked .lk-state { color: var(--success); font-weight: 700; }
.lk-progress small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.lk-progress .ts-progress-track { height: 6px; }
.lk-by { font-size: 11px; color: var(--faint); min-height: 16px; }
.lk-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.audit-filter .ts-search-input { flex: 1 1 200px; }
.audit-kpis { margin-bottom: 0; }
.audit-days .mcol-bar { height: 130px; }
.audit-cats { display: flex; flex-direction: column; gap: 4px; }
.audit-cat {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) 70px auto; align-items: center; gap: 8px;
  padding: 6px 8px; border: 1px solid transparent; border-radius: var(--radius-xs); background: none;
  font-family: inherit; font-size: var(--fs-sm); color: var(--text); cursor: pointer; text-align: start;
}
.audit-cat:hover { background: var(--surface-2); }
.audit-cat.active { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, transparent); }
.audit-cat .hbar-track { height: 6px; }
.audit-cat b { font-variant-numeric: tabular-nums; }
.ac-ico { width: 24px; height: 24px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.ac-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.audit-user {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "av id nums" "av last nums"; align-items: center; gap: 0 10px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  font-family: inherit; color: var(--text); cursor: pointer; text-align: start; transition: border-color .15s, background .15s;
}
.audit-user:hover { border-color: var(--primary); }
.audit-user.active { border-color: var(--primary); background: var(--primary-tint); }
.audit-user .usermenu-avatar { grid-area: av; }
.au-id { grid-area: id; display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.au-id b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); }
.au-id small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-nums { grid-area: nums; display: flex; flex-direction: column; align-items: flex-end; }
.au-nums b { font-size: 18px; font-variant-numeric: tabular-nums; }
.au-nums small { font-size: 11px; color: var(--muted); }
.au-last { grid-area: last; font-size: 11px; color: var(--faint); }
.audit-timeline { margin-top: 14px; }
.au-day + .au-day { margin-top: 10px; }
.au-day-title {
  position: sticky; top: calc(var(--nav-h) + 4px); z-index: 1; margin: 0 0 6px; padding: 6px 10px;
  font-size: var(--fs-sm); color: var(--muted); background: var(--surface-2); border-radius: var(--radius-xs);
}
.au-list { list-style: none; margin: 0; padding: 0; }
.au-item {
  display: grid; grid-template-columns: 48px 28px minmax(0, 1fr) auto; align-items: start; gap: 10px;
  padding: 9px 6px; border-bottom: 1px solid var(--hairline);
}
.au-item:last-child { border-bottom: none; }
.au-item.is-bad { background: var(--danger-soft); border-radius: var(--radius-xs); }
.au-time { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 4px; direction: ltr; text-align: end; }
.au-dot {
  width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c);
}
.au-main { min-width: 0; }
.au-text { margin: 0; font-size: var(--fs-md); line-height: 1.7; color: var(--text); overflow-wrap: anywhere; }
.au-who { color: var(--primary); margin-inline-end: 4px; }
.au-more summary { cursor: pointer; font-size: var(--fs-xs); color: var(--muted); }
.au-cat { font-size: 11px; color: var(--faint); white-space: nowrap; padding-top: 5px; }
@media (max-width: 640px) { .au-cat { display: none; } .au-item { grid-template-columns: 42px 26px minmax(0, 1fr); } }
.audit-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 14px; margin: 6px 0 2px; padding: 8px 10px; border-radius: var(--radius-xs); background: var(--surface-2); font-size: var(--fs-xs); }
.audit-kv div { display: flex; gap: 6px; min-width: 0; }
.audit-kv dt { color: var(--faint); flex-shrink: 0; }
.audit-kv dd { margin: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1100px) {
  .topbar { padding: 8px 14px; }
  .brand { border-inline-end: none; padding-inline-end: 0; }
  .mainnav { justify-content: flex-start; }
}
@media (max-width: 1100px) {
  .card, .dash-panel-body { overflow-x: auto; }
  .card table, .projects-table, .report-table { min-width: 760px; table-layout: auto; }
  .card td, .card th, .dash-panel-body td { overflow-wrap: normal; word-break: normal; }
}
@media (max-width: 720px) {
  .content { padding: 18px 14px 44px; }
  .card { padding: 16px; }
  .page-head-title h2 { font-size: 19px; }
  .page-head-actions { width: 100%; }
  .page-head-actions .btn { white-space: normal; height: auto; min-height: 38px; padding-block: 8px; line-height: 1.4; }
}

.delreq-panel {
  margin-bottom: 14px; padding: 14px 16px; border-radius: var(--radius-lg);
  background: var(--card-bg); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--border));
  border-inline-start: 4px solid var(--warn); box-shadow: var(--shadow-soft);
}
.delreq-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.delreq-ico {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--warn-soft); color: var(--warn);
}
.delreq-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.delreq-title { flex: 1; min-width: 0; }
.delreq-title h3 { margin: 0; font-size: var(--fs-lg); }
.delreq-title p { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.delreq-reason { color: var(--text); font-size: var(--fs-sm); line-height: 1.6; white-space: normal; }
.report-table tr.row-delreq td { background: color-mix(in srgb, var(--warn) 7%, transparent); }
.otdr-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 10px 0 14px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.otdr-summary div { min-width: 0; }
.otdr-summary dt { font-size: var(--fs-xs); color: var(--muted); }
.otdr-summary dd { margin: 2px 0 0; font-weight: 700; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#otdr-reason { width: 100%; resize: vertical; }

.attn-list { display: grid; gap: 8px; }
.attn-row {
  --c: var(--warn);
  display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; text-decoration: none; color: inherit;
  border: 1px solid color-mix(in srgb, var(--c) 28%, var(--border)); border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--c) 5%, var(--surface)); transition: border-color .2s cubic-bezier(.32, .72, 0, 1);
}
.attn-row.critical { --c: var(--danger); }
.attn-row:hover { border-color: var(--c); }
.attn-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.attn-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; }
.attn-tag.is-critical { background: var(--danger-soft); color: var(--danger); }
.attn-tag.is-watch { background: var(--warn-soft); color: var(--warn); }
.attn-name { font-size: var(--fs-xs); color: var(--muted); line-height: 1.55; unicode-bidi: plaintext; text-align: start;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.attn-nums { display: flex; gap: 12px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); }
.attn-reason { font-size: var(--fs-xs); line-height: 1.7; color: var(--text); }

.old-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; padding: 12px 14px;
  border-radius: var(--radius-lg); background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
}
.old-bar-ico {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-tint); color: var(--primary);
}
.old-bar-ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.old-bar-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.old-bar-text b { font-size: var(--fs-md); }
.old-bar-text span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.6; }
.old-bar-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.proj-card-wrap { position: relative; display: flex; }
.proj-card-wrap > .proj-card { flex: 1; }
.proj-card-wrap > .proj-switch { position: absolute; z-index: 2; bottom: 12px; inset-inline-end: 12px; }
.proj-card-wrap .pc-foot { padding-inline-end: 96px; }
.proj-card.is-off, .projects-table tr.row-off td { opacity: .55; }
.proj-card.is-off { filter: grayscale(.6); }
.proj-switch {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 8px 4px 4px; cursor: pointer; user-select: none;
  border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
}
html[dir="ltr"] .proj-switch { padding: 4px 4px 4px 8px; }
.proj-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ps-track {
  position: relative; width: 34px; height: 20px; flex-shrink: 0; border-radius: var(--radius-pill);
  background: var(--border-strong); transition: background .3s cubic-bezier(.32, .72, 0, 1);
}
.ps-knob {
  position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s cubic-bezier(.32, .72, 0, 1);
}
.proj-switch input:checked + .ps-track { background: var(--success); }
.proj-switch input:checked + .ps-track .ps-knob { transform: translateX(-14px); }
html[dir="ltr"] .proj-switch input:checked + .ps-track .ps-knob { transform: translateX(14px); }
.proj-switch input:focus-visible + .ps-track { box-shadow: var(--ring); }
.ps-text { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.proj-switch input:checked ~ .ps-text { color: var(--success); }

.day-badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--text); white-space: nowrap; }
.day-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.attn-tabs { display: flex; gap: 4px; padding: 3px; margin-bottom: 10px; border-radius: var(--radius-sm); background: var(--surface-3); border: 1px solid var(--border); }
.attn-tabs button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border: 0; border-radius: var(--radius-xs);
  background: none; font-family: inherit; font-size: var(--fs-sm); color: var(--muted); cursor: pointer;
  transition: background .25s cubic-bezier(.32, .72, 0, 1), color .25s cubic-bezier(.32, .72, 0, 1);
}
.attn-tabs button b {
  min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); font-size: 11px; font-variant-numeric: tabular-nums;
}
.attn-tabs button.active { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow-xs); }
.attn-tabs button.active b { background: var(--primary); color: #fff; }
.attn-panel .attn-list { max-height: 620px; overflow-y: auto; padding-inline-end: 2px; }
.attn-top .proj-code-link { display: inline; font-size: var(--fs-md); }
.attn-reason, .attn-reopen, .attn-note { margin: 0; }
.attn-reopen { font-size: var(--fs-xs); line-height: 1.6; color: var(--warn); }
.attn-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.attn-row.is-archived { --c: var(--border-strong); background: var(--surface); }
.attn-tag.is-ok { background: var(--success-soft); color: var(--success); }
.attn-tag.is-muted { background: var(--surface-3); color: var(--muted); }
.attn-meta { font-size: 11px; color: var(--muted); }
.attn-note { padding: 6px 9px; border-radius: var(--radius-xs); background: var(--surface-2); font-size: var(--fs-xs); line-height: 1.65; }
.otdr-summary .span-2 { grid-column: 1 / -1; }
.otdr-summary dd.wrap { white-space: normal; font-weight: 400; line-height: 1.65; }

.wd-row:hover:not(:disabled) { background: var(--primary-tint); }
.wd-row:focus-visible { outline: none; box-shadow: var(--ring); }
.wd-row:disabled { cursor: default; opacity: .55; }
.wd-people { font-size: 11px; color: var(--muted); text-align: end; white-space: nowrap; }
.wd-more {
  margin-top: 8px; padding: 4px 0; border: 0; background: none; font-family: inherit; font-size: var(--fs-sm); font-weight: 700;
  color: var(--primary); cursor: pointer;
}
.wd-more:hover { text-decoration: underline; }
.wd-picker { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.wd-picker .seg { flex-wrap: wrap; height: auto; }
.wd-picker .seg button { height: calc(var(--control-h-sm) - 6px); }
.wd-picker .seg button small { margin-inline-start: 3px; font-size: 11px; opacity: .7; }
.wd-picker .seg button.is-weekend:not(.active) { color: var(--c-closing); }
.wd-date { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.wd-date input { width: auto; height: var(--control-h-sm); min-height: 0; padding-block: 0; margin: 0; }
.wd-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; font-size: var(--fs-sm); font-weight: 700; }
.wd-sum .muted { font-weight: 400; }
.wd-scroll { max-height: 52vh; }
.wd-dates span { display: inline-block; margin: 1px 3px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.code-chip {
  display: inline-flex; align-items: center; height: 20px; margin: 1px 2px; padding: 0 7px; border-radius: var(--radius-pill);
  background: var(--surface-3); font-size: 11px; font-weight: 700; white-space: nowrap;
}

.bal-chip {
  --h: 0;
  display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 10px; border-radius: var(--radius-pill); white-space: nowrap;
  background: hsl(var(--h) 75% 94%); color: hsl(var(--h) 70% 29%); border: 1px solid hsl(var(--h) 55% 80%);
  font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums;
}
.bal-chip small { font-weight: 400; opacity: .8; }
html[data-theme="dark"] .bal-chip { background: hsl(var(--h) 45% 17%); color: hsl(var(--h) 70% 74%); border-color: hsl(var(--h) 40% 32%); }
.lv-table .col-bal { width: 150px; }
.bal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: -4px 0 12px; font-size: var(--fs-xs); color: var(--muted); }
.bal-legend-title { font-weight: 700; color: var(--text); }
.bal-legend-lab { display: inline-flex; align-items: center; gap: 5px; }
.bal-legend-lab i { width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--h) 70% 45%); }
.bal-scale { width: 90px; height: 8px; border-radius: var(--radius-pill); background: linear-gradient(to left, hsl(0 70% 50%), hsl(65 70% 45%), hsl(130 55% 40%)); }
html[dir="ltr"] .bal-scale { background: linear-gradient(to right, hsl(0 70% 50%), hsl(65 70% 45%), hsl(130 55% 40%)); }

.page-head-actions select { width: auto; min-width: 130px; height: var(--control-h); margin: 0; }
.mo-spend .col-bar { width: 30%; }
.report-table tr.row-muted td { color: var(--muted); }

@media print {
  .old-bar, .delreq-panel, .welcome-hero, .proj-switch { display: none !important; }
}

@media print {
  .topbar, .mainnav, .tabs, .page-head-actions, .filter-bar,
  .btn, .icon-btn, .clear-x, #emp-suggestions, #proj-suggestions,
  #emp-search, #proj-search, .no-print, .finder, .results-bar, .ts-monthbar,
  .usermenu, .search-overlay, .toast-host, .report-tabs, .report-filters, .site-signature .sig-rule { display: none !important; }
  .print-head, .print-only { display: block !important; }
  .report-pane[hidden] { display: none !important; }
  .site-signature { margin: 18px 0 0; }
  .table-scroll, .scroll-y { max-height: none !important; overflow: visible !important; }
  body, #app, #page-content { background: #fff !important; background-image: none !important; color: #000; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
  a[href]::after { content: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.ui-ico {
  width: 16px; height: 16px; flex-shrink: 0; vertical-align: -3px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.btn.small .ui-ico { width: 15px; height: 15px; }
.lock-bar .ui-ico, .lk-state .ui-ico, .core-tag .ui-ico { width: 13px; height: 13px; vertical-align: -2px; }
.icon-btn .ui-ico { width: 15px; height: 15px; }
.skel-card { display: grid; gap: 12px; padding-block: 22px; }
.skel { display: block; height: 11px; border-radius: 6px; background: var(--surface-3); }
.skel:nth-of-type(1) { width: 32%; height: 16px; }
.skel:nth-of-type(2) { width: 88%; }
.skel:nth-of-type(3) { width: 74%; }
.skel:nth-of-type(4) { width: 58%; }
@media (prefers-reduced-motion: no-preference) {
  .skel { animation: skelPulse 1.1s cubic-bezier(.4, 0, .6, 1) infinite alternate; }
  .skel:nth-of-type(2) { animation-delay: 120ms; }
  .skel:nth-of-type(3) { animation-delay: 240ms; }
}
@keyframes skelPulse { from { opacity: .45; } to { opacity: 1; } }
.skip-link {
  position: fixed; top: 10px; inset-inline-start: 10px; z-index: 120; transform: translateY(-160%);
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--primary);
  background: var(--surface); color: var(--primary); font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .25s cubic-bezier(.32, .72, 0, 1);
}
.skip-link:focus-visible { transform: none; outline: none; box-shadow: var(--ring); }
#page-content:focus { outline: none; }
.seg button:focus-visible, .tabs button:focus-visible, .icon-btn:focus-visible, .link-strong:focus-visible, .icon-toggle:focus-visible {
  outline: none; box-shadow: var(--ring);
}
.seg button:active, .icon-btn:active, .tabs button:active { transform: scale(.97); }

.att-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.att-scope { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; }
.att-scope select { margin: 0; min-width: 240px; max-width: 360px; }
.att-scope .btn { flex-shrink: 0; }

.att-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); padding: 0; overflow: hidden; }
.att-hero-main { padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.att-eyebrow { font-size: var(--fs-xs); color: var(--muted); }
.att-hero-rate { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.att-hero-rate b { font-size: 44px; line-height: 1.05; font-weight: 700; font-variant-numeric: tabular-nums; }
.att-hero-rate span { font-size: var(--fs-sm); color: var(--muted); }
.att-hero-line { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.att-hero-line b { color: var(--text); font-variant-numeric: tabular-nums; }
.att-status-bar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-3); margin-top: 6px; }
.att-status-bar i { background: var(--c); min-width: 3px; }
.att-status-bar.sm { height: 8px; margin: 0; border-radius: 4px; }
.att-status-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-sm); color: var(--muted); }
.att-status-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.att-status-legend i { width: 9px; height: 9px; border-radius: 2px; background: var(--c); }
.att-status-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.att-hero-stats {
  margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-inline-start: 1px solid var(--border); background: var(--surface-2);
}
.att-hero-stats > div { padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--border); min-width: 0; }
.att-hero-stats > div:nth-child(odd) { border-inline-end: 1px solid var(--border); }
.att-hero-stats > div:nth-last-child(-n+2) { border-bottom: 0; }
.att-hero-stats dt { font-size: var(--fs-xs); color: var(--muted); }
.att-hero-stats dd { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.att-hero-stats small { font-size: var(--fs-xs); color: var(--faint); }
@media (max-width: 860px) {
  .att-hero { grid-template-columns: 1fr; }
  .att-hero-stats { border-inline-start: 0; border-top: 1px solid var(--border); }
}

.att-days-plot { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-auto-rows: 150px; gap: 3px; }
.att-day {
  display: flex; flex-direction: column; justify-content: flex-end; height: 150px; min-width: 0;
  padding: 0 1px; border: 0; border-radius: 4px; background: none; font: inherit; color: inherit; cursor: pointer;
  transition: background-color .15s ease;
}
.att-day-val { font-size: 11px; font-weight: 700; text-align: center; min-height: 16px; font-variant-numeric: tabular-nums; }
.att-day-bar { flex: 1; display: flex; flex-direction: column-reverse; gap: 1px; border-radius: 3px 3px 0 0; overflow: hidden; }
.att-day-bar i { display: block; flex-shrink: 0; background: var(--c); }
.att-day-n { font-size: 11px; color: var(--muted); text-align: center; padding-top: 4px; border-top: 1px solid var(--border-strong); font-variant-numeric: tabular-nums; }
.att-day.is-weekend { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--surface-3) 5px 6px); }
.att-day.is-weekend .att-day-n { color: var(--faint); }
.att-day.is-today .att-day-n { color: var(--primary); font-weight: 700; }
.att-day:hover:not(:disabled) { background-color: var(--primary-tint); }
.att-day.active { background-color: var(--primary-tint); box-shadow: inset 0 0 0 1px var(--primary); }
.att-day:disabled { cursor: default; }
.att-day:focus-visible { outline: none; box-shadow: var(--ring); }
@media (max-width: 720px) {
  .att-days-plot { gap: 1px; grid-auto-rows: 120px; }
  .att-day { height: 120px; }
  .att-day-n { font-size: 9px; }
}

.att-drow {
  display: grid; grid-template-columns: minmax(0, 1.6fr) 84px minmax(0, 2fr) 104px 18px; align-items: center; gap: 16px;
  width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--hairline); border-radius: var(--radius-xs);
  background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; transition: background-color .15s ease;
}
.att-drow:last-child { border-bottom: 0; }
.att-drow.head { cursor: default; padding-block: 2px 8px; border-radius: 0; border-bottom-color: var(--border-strong); font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.att-drow:not(.head):hover { background-color: var(--primary-tint); }
.att-drow:focus-visible { outline: none; box-shadow: var(--ring); }
.att-dname { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; }
.att-dname bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-dnum, .att-drate { text-align: center; font-variant-numeric: tabular-nums; }
.att-drow.head > :nth-child(2), .att-drow.head > :nth-child(4) { text-align: center; }
.att-dgo { color: var(--faint); transition: transform .25s cubic-bezier(.32, .72, 0, 1), color .15s ease; }
.att-drow:hover .att-dgo { color: var(--primary); transform: translateX(-3px); }
html[dir="ltr"] .att-drow:hover .att-dgo { transform: translateX(3px); }
@media (max-width: 640px) {
  .att-drow { grid-template-columns: minmax(0, 1fr) 56px 92px; gap: 10px; }
  .att-drow > :nth-child(3), .att-drow > :nth-child(5) { display: none; }
}

.att-matrix-scroll { overflow: auto; max-height: 72vh; border: 1px solid var(--border); border-radius: var(--radius-md); }
.att-matrix { min-width: calc(220px + var(--n) * 22px + 60px); }
.att-mx-row {
  display: grid; grid-template-columns: minmax(200px, 260px) repeat(var(--n), minmax(20px, 1fr)) 60px;
  border-bottom: 1px solid var(--hairline);
}
.att-mx-row:last-child { border-bottom: 0; }
.att-mx-row.head {
  position: sticky; top: 0; z-index: 3; background: var(--surface-2); border-bottom-color: var(--border-strong);
  font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
}
.att-mx-row:not(.head):hover { background: var(--primary-tint); }
.att-mx-name {
  position: sticky; inset-inline-start: 0; z-index: 2; min-width: 0; padding: 7px 12px;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--card-bg); border-inline-end: 1px solid var(--border);
}
.att-mx-row.head .att-mx-name { background: var(--surface-2); }
.att-mx-name a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; }
.att-mx-name small { font-size: 11px; color: var(--muted); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-mx-d { display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.att-mx-d.we { color: var(--faint); }
.att-mx-d.hl { color: var(--primary); background: var(--primary-tint); }
.att-mx-c { display: flex; align-items: center; justify-content: center; padding: 3px 1px; }
.att-mx-c.we { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--surface-3) 4px 5px); }
.att-mx-c.hl { background-color: var(--primary-tint); }
.att-mx-c i, .att-mx-legend i {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 4px;
  background: var(--c); color: #fff; font-style: normal; font-weight: 700; line-height: 1;
}
.att-mx-c i { width: 100%; max-width: 22px; height: 22px; font-size: 10px; }
.att-mx-c.dim i { opacity: .22; }
.att-mx-total { display: flex; align-items: center; justify-content: center; border-inline-start: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.att-mx-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: var(--fs-xs); color: var(--muted); }
.att-mx-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.att-mx-legend i { width: 16px; height: 16px; font-size: 9px; }
.att-mx-legend .we i { background: repeating-linear-gradient(135deg, var(--surface) 0 3px, var(--border-strong) 3px 4px); border: 1px solid var(--border); }
.att-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-inline-end: 6px; }
.att-day-chip {
  display: inline-flex; align-items: center; gap: 6px; height: var(--control-h-sm); padding: 0 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--primary); background: var(--primary-tint); color: var(--primary);
  font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.att-day-chip b { font-size: 11px; }
.att-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 12px; color: var(--muted); text-align: center; }
.att-empty p { margin: 0; }
.att-empty-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); font-weight: 700; }

.qp-wrap { position: relative; display: inline-flex; align-items: center; }
.qp-trigger { display: inline-flex; align-items: center; gap: 7px; }
.qp-caret {
  width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.6px 1.6px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .22s cubic-bezier(.32, .72, 0, 1);
}
.qp-trigger[aria-expanded="true"] .qp-caret { transform: translateY(1px) rotate(-135deg); }
.qp {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 40;
  width: min(420px, calc(100vw - 32px)); padding: 14px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-elevated);
}
@media (prefers-reduced-motion: no-preference) {
  .qp:not([hidden]) { animation: qpIn .22s cubic-bezier(.32, .72, 0, 1); }
}
@keyframes qpIn { from { opacity: 0; transform: translateY(-4px) scale(.985); } }
.qp-head { display: flex; align-items: center; justify-content: space-between; }
.qp-head b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.qp-label { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); margin: 12px 0 6px; }
.qp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.qp-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; color: inherit; text-align: start; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.qp-tile b { font-size: var(--fs-sm); }
.qp-tile small { font-size: var(--fs-xs); color: var(--muted); }
.qp-tile:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-tint); }
.qp-tile:active:not(:disabled) { transform: scale(.98); }
.qp-tile:focus-visible { outline: none; box-shadow: var(--ring); }
.qp-tile:disabled { opacity: .45; cursor: not-allowed; }
.qp-tag { position: absolute; top: 9px; inset-inline-end: 10px; font-size: 10px; font-weight: 700; color: var(--accent); }

.rx-period { padding: 12px 14px; }
.rx-period-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rx-period-row select { width: auto; min-width: 140px; margin: 0; height: var(--control-h-sm); min-height: 0; padding-block: 0; }
.rx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.rx-tile {
  position: relative; display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 16px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .2s cubic-bezier(.32, .72, 0, 1);
}
.rx-tile:hover { border-color: var(--border-strong); }
.rx-tile:active { transform: scale(.99); }
.rx-tile input { position: absolute; opacity: 0; pointer-events: none; }
.rx-tile:focus-within { box-shadow: var(--ring); }
.rx-tile.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, var(--card-bg)); }
.rx-ico {
  width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: var(--radius-sm); border: 1px solid var(--hairline); background: var(--surface-2); color: var(--muted);
}
.rx-ico .nav-ico { width: 20px; height: 20px; }
.rx-tile.on .rx-ico { color: var(--primary); background: var(--primary-tint); }
.rx-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.5; }
.rx-text b { font-size: var(--fs-md); }
.rx-text small { font-size: var(--fs-xs); color: var(--muted); }
.rx-check {
  width: 20px; height: 20px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 6px; border: 1.5px solid var(--border-strong); transition: background-color .15s ease, border-color .15s ease;
}
.rx-tile.on .rx-check { background: var(--primary); border-color: var(--primary); }
.rx-tile.on .rx-check::after {
  content: ''; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg);
}
.rx-bar {
  position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  margin-top: 20px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--glass-solid); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-elevated);
}
.rx-all { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-sm); color: var(--text); cursor: pointer; }
.rx-count { font-size: var(--fs-sm); color: var(--muted); }
.rx-count b { color: var(--text); font-variant-numeric: tabular-nums; }
.rx-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }
.rx-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: rxSpin .7s linear infinite; }
@keyframes rxSpin { to { transform: rotate(360deg); } }

.ts-table .col-name { width: 26%; min-width: 200px; }
.ts-table .col-dept { width: 16%; }

.import-period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.import-period > span:first-child { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.import-period input, .import-period select { width: auto; margin: 0; min-width: 120px; height: var(--control-h-sm); min-height: 0; padding-block: 0; }

html[dir="ltr"] {
  --to-end: to right;
  --end-x: 100%;
  --wave-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 820 380' preserveAspectRatio='none'%3E%3Cdefs%3E %3ClinearGradient id='a' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%2332c2ff' stop-opacity='0'/%3E%3Cstop offset='.6' stop-color='%2332c2ff' stop-opacity='.16'/%3E%3Cstop offset='1' stop-color='%2399ffcf' stop-opacity='.34'/%3E%3C/linearGradient%3E %3ClinearGradient id='b' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%230080ff' stop-opacity='0'/%3E%3Cstop offset='.6' stop-color='%2332c2ff' stop-opacity='.14'/%3E%3Cstop offset='1' stop-color='%2333ff9e' stop-opacity='.26'/%3E%3C/linearGradient%3E%3C/defs%3E %3Cpath fill='url(%23a)' d='M0 330 C 260 320 440 270 560 180 S 720 30 820 0 L 820 60 C 740 88 668 168 598 240 S 320 372 0 380 Z'/%3E %3Cpath fill='url(%23b)' d='M200 380 C 410 362 540 312 640 236 S 760 108 820 90 L 820 118 C 766 136 706 214 656 266 S 488 378 320 380 Z'/%3E%3C/svg%3E");
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 400' preserveAspectRatio='none'%3E%3Cdefs%3E %3ClinearGradient id='a' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%2332c2ff' stop-opacity='0'/%3E%3Cstop offset='.55' stop-color='%2332c2ff' stop-opacity='.42'/%3E%3Cstop offset='1' stop-color='%2399ffcf' stop-opacity='.78'/%3E%3C/linearGradient%3E %3ClinearGradient id='b' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%230080ff' stop-opacity='0'/%3E%3Cstop offset='.6' stop-color='%2332c2ff' stop-opacity='.34'/%3E%3Cstop offset='1' stop-color='%2333ff9e' stop-opacity='.6'/%3E%3C/linearGradient%3E%3C/defs%3E %3Cpath fill='url(%23a)' d='M0 360 C 250 350 420 300 540 200 S 700 40 800 20 L 800 92 C 722 110 652 190 582 262 S 300 394 0 400 Z'/%3E %3Cpath fill='url(%23b)' d='M170 400 C 390 380 526 330 624 250 S 742 132 800 118 L 800 152 C 750 166 692 242 642 292 S 472 398 300 400 Z'/%3E%3C/svg%3E");
}
html[data-section="departments"] { --sec-grad: linear-gradient(126deg, #32c2ff 8%, #99ffcf 92%); --sec-on: #001f5e; --sec-shadow: rgba(50, 194, 255, .55); }
html[data-section="employees"] { --sec-grad: linear-gradient(126deg, #0027b9 8%, #0066cc 92%); --sec-on: #fff; --sec-shadow: rgba(0, 102, 204, .5); }
html[data-section="projects"] { --sec-grad: linear-gradient(180deg, #ade7ff 0%, #d9f4ff 100%); --sec-on: #001f5e; --sec-shadow: rgba(50, 194, 255, .45); }
html[data-section="attendance"] { --sec-grad: linear-gradient(126deg, #00176f 8%, #0027b9 92%); --sec-on: #fff; --sec-shadow: rgba(0, 39, 185, .5); }
html[data-section="timesheet"] { --sec-grad: linear-gradient(88deg, #32c2ff 10%, #33ff9e 90%); --sec-on: #001f5e; --sec-shadow: rgba(51, 255, 158, .45); }
html[data-section="overtime"] { --sec-grad: linear-gradient(115deg, #001338 0%, #00369e 100%); --sec-on: #fff; --sec-shadow: rgba(0, 54, 158, .55); }
html[data-section="reports"] { --sec-grad: linear-gradient(126deg, #99ffcf 0%, #ade7ff 100%); --sec-on: #001f5e; --sec-shadow: rgba(51, 255, 158, .4); }
html[data-section="admin"] { --sec-grad: linear-gradient(126deg, #334c7e 0%, #001f5e 100%); --sec-on: #fff; --sec-shadow: rgba(0, 31, 94, .5); }
html[data-theme="dark"]:not([data-section]), html[data-theme="dark"][data-section="home"] { --sec-grad: linear-gradient(120deg, #0027b9 0%, #0066cc 100%); }
html[data-theme="dark"][data-section="employees"] { --sec-grad: linear-gradient(126deg, #0044d6 8%, #0073e6 92%); }
html[data-theme="dark"][data-section="attendance"] { --sec-grad: linear-gradient(126deg, #0027b9 8%, #0052cc 92%); }
html[data-theme="dark"][data-section="overtime"] { --sec-grad: linear-gradient(115deg, #00369e 0%, #0066cc 100%); }
html[data-theme="dark"][data-section="admin"] { --sec-grad: linear-gradient(126deg, #4a6396 0%, #334c7e 100%); }

.page-head::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(var(--to-end), #0066cc 0%, #32c2ff 12%, #33ff9e 26%, var(--border) 50%, var(--border) 100%);
}
.ph-badge {
  position: relative; overflow: hidden; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sec-grad); color: var(--sec-on);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 10px 20px -12px var(--sec-shadow); width: 34px; height: 34px; border-radius: 10px; }
.ph-badge::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, 0) 46%);
}
.ph-badge .nav-ico { width: 21px; height: 21px; opacity: 1; stroke-width: 1.7; position: relative; z-index: 1; }
.dash-panel-title::before {
  content: ''; display: inline-block; width: 16px; height: 5px; border-radius: 3px;
  margin-inline-end: 9px; vertical-align: 3px;
  background: linear-gradient(var(--to-end), #0066cc, #32c2ff 55%, #33ff9e);
}
html[data-theme="dark"] .btn.secondary { background: rgba(128, 192, 255, .12); color: var(--brand-300); border-color: rgba(128, 192, 255, .16); }
html[data-theme="dark"] .btn.secondary:hover { background: rgba(128, 192, 255, .2); color: #cfe6ff; }

.audit-changes { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); line-height: 1.6; }
.audit-changes li { overflow-wrap: anywhere; }
.audit-changes .ac-f { color: var(--muted); font-weight: 700; }
.audit-changes s { color: var(--danger); opacity: .85; }
.audit-changes b { color: var(--success); }
.audit-changes .ac-arrow { color: var(--faint); }

.dp-section { margin-top: 22px; }
.dp-affil { display: flex; align-items: center; gap: 6px; width: calc(100% - 32px); margin: 0 16px 10px; padding: 7px 10px; border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-family: inherit; font-size: var(--fs-xs); cursor: pointer; text-align: start; }
.dp-affil:hover { border-color: var(--primary); color: var(--primary); }
.dp-affil b { font-size: var(--fs-md); }
.affil { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.affil-unset { color: var(--warn); font-weight: 700; }
.dm-form { display: flex; flex-direction: column; gap: 4px; }
.dm-form small { display: block; margin-top: 4px; }

html[data-section="contracts"] { --sec-grad: linear-gradient(126deg, #00176f 0%, #0066cc 62%, #32c2ff 100%); --sec-on: #fff; --sec-shadow: rgba(0, 102, 204, .5); }
.ct-kpis { margin-bottom: 14px; }
.ct-no { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.ct-status { margin-inline-start: auto; font-size: var(--fs-xs); font-weight: 700; padding: 2px 9px; border-radius: var(--radius-pill); background: var(--surface-2); }
.ct-status.tone-ok { background: var(--success-soft); }
.ct-status.tone-mid { background: var(--warn-soft); }
.ct-status.tone-low { background: var(--danger-soft); }
.ct-end { font-size: var(--fs-sm); }
.card-head.pad { padding: 12px 16px 0; }

.dm-form .check-row { padding: 0; margin: 10px 0 4px; }
.dm-form .check-row input { width: auto; }

html[data-section="staff"] { --sec-grad: linear-gradient(126deg, #001f5e 0%, #0080ff 58%, #33ff9e 100%); --sec-on: #fff; --sec-shadow: rgba(0, 128, 255, .5); }
html[data-theme="dark"][data-section="staff"] { --sec-grad: linear-gradient(126deg, #00369e 0%, #0080ff 60%, #00c46a 100%); }
.sf-tabs { margin-bottom: 14px; }
.sf-summary { display: grid; grid-template-columns: 1.15fr repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; gap: 10px; margin-bottom: 10px; }
@media (max-width: 1100px) { .sf-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sf-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sf-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 13px 16px 12px;
  border-radius: var(--radius-lg); background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--shadow-soft); padding: 9px 13px 8px; }
.sf-tile::after { content: ''; position: absolute; inset-inline-end: -30px; bottom: -40px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--se-sky) 22%, transparent), transparent 70%); pointer-events: none; }
.sf-tile-label { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.sf-tile-value { font-size: 26px; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--text); font-size: 21px; }
.sf-tile-value small { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }
.sf-tile-sub { font-size: var(--fs-xs); color: var(--muted); }
.sf-tile-hero { background: var(--se-hero); border-color: transparent; color: #fff; box-shadow: 0 16px 34px -18px rgba(0, 31, 94, .7); }
.sf-tile-hero::after { width: 100%; height: 70%; inset-inline: 0; bottom: 0; border-radius: 0; background: var(--wave-soft) no-repeat center bottom / 100% 100%; opacity: .55; }
.sf-tile-hero .sf-tile-label, .sf-tile-hero .sf-tile-sub { color: rgba(235, 249, 255, .82); }
.sf-tile-hero .sf-tile-value { color: #fff; font-size: 30px; font-size: 23px; }
.sf-tile.is-warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); background: linear-gradient(180deg, color-mix(in srgb, var(--warn) 8%, var(--card-bg)), var(--card-bg) 70%); }
.sf-tile.is-ok .sf-tile-value { color: var(--success); }
.sf-ratio { display: block; height: 7px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--se-azure) 16%, var(--surface-3)); overflow: hidden; margin: 3px 0 2px; }
.sf-ratio i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(var(--to-end), #00a37a, #33ff9e); transition: width .7s cubic-bezier(.32, .72, 0, 1); }
.linklike { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.linklike:hover { color: var(--primary); }

.sf-finder { margin-bottom: 10px; }
.sf-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 10px 2px 2px; gap: 8px; padding-top: 8px; }
.sf-filters .fx { min-width: 150px; flex: 1 1 150px; max-width: 260px; }
.sf-filters .seg button b { font-weight: 400; color: var(--muted); margin-inline-start: 4px; font-size: 11px; }

.nat-chip { display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill); font-size: 12px; background: var(--surface-3); white-space: nowrap; }
.nat-chip.is-saudi { background: color-mix(in srgb, #00a37a 16%, var(--surface)); color: #007a5b; font-weight: 700; }
html[data-theme="dark"] .nat-chip.is-saudi { color: #4be3a5; }

.sfe-section { margin: 0; padding: 10px 14px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card-bg); min-width: 0; }
.sfe-section legend { padding: 0 6px; font-weight: 700; font-size: var(--fs-sm); color: var(--primary-dark); }
html[data-theme="dark"] .sfe-section legend { color: var(--se-sky); }

.sfe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
@media (max-width: 560px) { .sfe-grid { grid-template-columns: 1fr; } }
.sfe-field { display: flex; flex-direction: column; min-width: 0; }
.sfe-field.wide { grid-column: 1 / -1; }
.sfe-field label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.sfe-field input, .sfe-field select, .sfe-field textarea { margin: 0; width: 100%; }

.sfe-quick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sfe-quick button { height: 24px; padding: 0 9px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  font: inherit; font-size: 11px; cursor: pointer; font-variant-numeric: tabular-nums; }
.sfe-quick button:hover { border-color: var(--primary); color: var(--primary); }

.scope-in { --k: #00a37a; }
.scope-out { --k: #0080ff; }
.scope-pdc { --k: #5b4bbd; }
.scope-x { --k: #66707d; }
.scope-badge { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: var(--radius-pill); color: var(--k); background: color-mix(in srgb, var(--k) 13%, transparent); white-space: nowrap; }

.sf-exit-top { display: grid; grid-template-columns: 1fr 1fr 2fr 1.4fr; gap: 12px; margin-bottom: 4px; align-items: stretch; }
@media (max-width: 1100px) { .sf-exit-top { grid-template-columns: 1fr 1fr; } }
.sf-exit-chart, .sf-exit-reasons { padding: 12px 14px; border-radius: var(--radius-lg); background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 8px; }
.sf-exit-reasons { flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
.sf-exit-reasons .sf-tile-label { width: 100%; }
.sf-years { display: flex; align-items: flex-end; gap: 10px; flex: 1; min-height: 96px; }
.sf-year { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.sf-year-bar { width: 100%; max-width: 46px; height: 64px; display: flex; align-items: flex-end; }
.sf-year-bar i { display: block; width: 100%; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #32c2ff, #0066cc); transition: height .6s cubic-bezier(.32, .72, 0, 1); }
.sf-year.active .sf-year-bar i { background: linear-gradient(180deg, #33ff9e, #00a37a); }
.sf-year b { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.sf-year small { font-size: 11px; color: var(--muted); }
.exit-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--radius-pill); font: inherit; font-size: 12px; border: 1px solid transparent;
  background: color-mix(in srgb, var(--k, var(--faint)) 13%, transparent); color: color-mix(in srgb, var(--k, var(--faint)) 80%, var(--text)); white-space: nowrap; }
button.exit-chip { cursor: pointer; height: 30px; }
button.exit-chip.active { border-color: var(--k); font-weight: 700; }
.ex-resign { --k: #0066cc; }
.ex-term { --k: #ff393c; }
.ex-demob { --k: #a86a00; }
.ex-transfer { --k: #00a37a; }
.sf-hbars { display: flex; flex-direction: column; gap: 8px; }
.sf-hbar { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: var(--fs-xs); }
.sf-hbar span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-hbar b { font-variant-numeric: tabular-nums; }
.dash-panel-body.flush { padding: 0; }
.sf-exit-table td { vertical-align: top; }
.sf-note { max-width: 280px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 300px; display: table-cell; -webkit-line-clamp: unset; overflow: visible; }
.row-back td { background: color-mix(in srgb, var(--success) 6%, transparent); }
.back-note { display: block; color: var(--success); font-weight: 700; font-size: 11px; }
.sf-hbars.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
@media (max-width: 720px) { .sf-hbars.two-col { grid-template-columns: 1fr; } }
.sf-hbar.is-saudi .hbar-track i { background: linear-gradient(var(--to-end), #00a37a, #33ff9e); }
.sf-exit-list { margin-top: 14px; }
.sf-exit-list .dash-panel-head { flex-wrap: wrap; gap: 8px; }
.txt-danger { color: var(--danger); font-weight: 700; }
.ct-hero { display: grid; grid-template-columns: 1fr 1.6fr 1fr 1fr; gap: 1px; margin: 4px 0 18px; border-radius: var(--radius-xl); overflow: hidden;
  background: rgba(173, 231, 255, .18); box-shadow: 0 22px 46px -24px rgba(0, 31, 94, .75); margin: 2px 0 12px; }
@media (max-width: 1000px) { .ct-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ct-hero { grid-template-columns: 1fr; } }
.ct-hero > div { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--se-hero); color: #fff; min-width: 0; }
.ct-hero-main { background: linear-gradient(140deg, #001338, #00176f) !important; }
.ct-hero-main::after { content: ''; position: absolute; inset: auto 0 0 0; height: 60%; background: var(--wave-soft) no-repeat center bottom / 100% 100%; opacity: .5; pointer-events: none; }
.ct-hero-label { font-size: var(--fs-xs); font-weight: 700; color: rgba(173, 231, 255, .85); }
.ct-hero-value { font-size: 30px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ct-hero-value small { font-size: var(--fs-xs); font-weight: 400; color: rgba(235, 249, 255, .75); }
.ct-hero-cell b { font-size: 22px; font-variant-numeric: tabular-nums; }
.ct-hero-sub { font-size: var(--fs-xs); color: rgba(235, 249, 255, .78); }
.ct-hero-cell.is-risk { background: linear-gradient(140deg, #4a0f1d, #8a1d2c) !important; }
.ct-phase { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--se-azure) 12%, transparent); color: var(--se-deep); }
html[data-theme="dark"] .ct-phase { color: var(--se-sky-200); }
.ct-budget { display: flex; flex-direction: column; gap: 4px; }
.ct-budget-nums, .ct-budget-foot { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-xs); color: var(--muted); }
.ct-budget-nums b, .ct-budget-foot b { color: var(--text); font-variant-numeric: tabular-nums; }
.ct-budget-track { position: relative; display: block; height: 9px; border-radius: var(--radius-pill); overflow: hidden;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--se-sky) 18%, var(--surface-3)) 0 6px, var(--surface-3) 6px 12px); }
.ct-budget-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(var(--to-end), #0027b9, #0080ff 70%, #32c2ff); transition: width .7s cubic-bezier(.32, .72, 0, 1); }
.ct-budget-track.on-dark { background: rgba(173, 231, 255, .18); margin: 4px 0 2px; }
.ct-budget-track.on-dark i { background: linear-gradient(var(--to-end), #32c2ff, #33ff9e); }
.ct-nobudget { margin: 0; font-size: var(--fs-xs); }
.ct-line { display: flex; flex-direction: column; gap: 2px; }
.ct-line-track { position: relative; display: block; height: 4px; border-radius: var(--radius-pill); background: var(--surface-3); }
.ct-line-track i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: inherit; background: var(--st, var(--primary)); opacity: .8; }
.ct-line-budget { position: absolute; top: -4px; width: 3px; height: 12px; border-radius: 2px; background: var(--success); transform: translateX(50%); }
html[dir="ltr"] .ct-line-budget { transform: translateX(-50%); }
.ct-line-budget.risk { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.ct-line-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.ct-risk { display: block; margin: 0; line-height: 1.7; padding: 6px 10px; border-radius: var(--radius-sm); font-size: var(--fs-xs); font-weight: 700;
  color: var(--danger); background: var(--danger-soft); }
.ct-risk .ui-ico { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; vertical-align: -3px; margin-inline-end: 4px; }
.ct-expired-group { margin-top: 8px; }
.ct-expired-group > summary { cursor: pointer; padding: 10px 4px; font-weight: 700; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 8px; }
.ct-expired-group > summary::before { content: '▸'; transition: transform .2s; }
html[dir="rtl"] .ct-expired-group > summary::before { content: '◂'; }
.ct-expired-group[open] > summary::before { transform: rotate(-90deg); }
html[dir="ltr"] .ct-expired-group[open] > summary::before { transform: rotate(90deg); }
.ct-detail-hero { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; padding: 18px; margin-bottom: 14px; border-radius: var(--radius-xl);
  background: linear-gradient(120deg, color-mix(in srgb, var(--st) 9%, var(--surface)), var(--surface) 60%); border: 1px solid var(--border); box-shadow: var(--shadow-soft); }
@media (max-width: 860px) { .ct-detail-hero { grid-template-columns: 1fr; } }
.ct-dh-id { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ct-dh-id .ct-hero-label { color: var(--muted); }
.ct-dh-id b { font-size: var(--fs-xl); }
.ct-dh-id p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.ct-dh-budget { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.ct-dh-budget .ct-budget-track { height: 14px; }
.ct-dh-budget .ct-budget-nums { font-size: var(--fs-sm); }
.ct-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
@media (max-width: 860px) { .ct-detail-grid { grid-template-columns: 1fr; } }
.ct-kvs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.ct-kvs.compact { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.ct-kv dt { font-size: var(--fs-xs); color: var(--muted); }
.ct-kv dd { margin: 2px 0 0; font-weight: 700; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.ct-kv dd small { font-weight: 400; color: var(--muted); }
.ct-kv.risk dd { color: var(--danger); }

.ct-form .form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }

.ach-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.ach-cat-chip { height: 30px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font: inherit; font-size: var(--fs-xs); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s, border-color .2s; }
.ach-cat-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ach-cat-chip.active { background: color-mix(in srgb, var(--c) 12%, var(--surface)); border-color: color-mix(in srgb, var(--c) 45%, var(--border)); color: var(--text); font-weight: 700; }

html[data-section="workforce"] { --sec-grad: linear-gradient(126deg, #00369e 0%, #0080ff 64%, #32c2ff 100%); --sec-on: #fff; --sec-shadow: rgba(0, 128, 255, .5); }

.mainnav .nav-group {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; flex-shrink: 0;
  color: var(--muted); background: none; border: 0; border-radius: var(--radius-pill); cursor: pointer;
  font-family: inherit; font-size: var(--fs-md); font-weight: 400; white-space: nowrap;
  transition: color .3s cubic-bezier(.32, .72, 0, 1), background .2s;
}
.mainnav .nav-group:hover:not(.active), .mainnav .nav-group[aria-expanded="true"]:not(.active) { color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.mainnav .nav-group:active { transform: scale(.97); }
.mainnav .nav-group:focus-visible { outline: none; box-shadow: var(--ring); }
.mainnav .nav-group.active { font-weight: 700; color: var(--sec-on); }
.mainnav .nav-group:hover .nav-ico, .mainnav .nav-group.active .nav-ico { opacity: 1; }
.nav-caret { width: 14px; height: 14px; flex-shrink: 0; margin-inline-start: -2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .7; transition: transform .35s cubic-bezier(.32, .72, 0, 1); }
.nav-group[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.nav-pop {
  position: fixed; z-index: 70; display: grid; gap: 2px; padding: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%); backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px -24px rgba(0, 31, 94, .45), 0 2px 6px rgba(0, 31, 94, .06);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top center;
  transition: opacity .2s cubic-bezier(.32, .72, 0, 1), transform .3s cubic-bezier(.32, .72, 0, 1);
}
.nav-pop[hidden] { display: none; }
.nav-pop.open { opacity: 1; transform: none; }
.nav-pop-title { padding: 4px 10px 6px; font-size: var(--fs-xs); color: var(--faint); }
.nav-pop-item {
  display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 10px;
  border-radius: var(--radius-md); color: var(--text); text-decoration: none;
  transition: background .2s, transform .25s cubic-bezier(.32, .72, 0, 1);
}
.nav-pop-item:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.nav-pop-item:focus-visible { outline: none; box-shadow: var(--ring); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.nav-pop-item:active { transform: scale(.985); }
.nav-pop-item.current { background: color-mix(in srgb, var(--primary) 11%, transparent); }
.nav-pop-item.current .nav-pop-txt b { color: var(--primary); }
.nav-pop-ico {
  width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #0080ff 0%, #0027b9 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px -10px rgba(0, 39, 185, .7);
}
.nav-pop-item:nth-of-type(2) .nav-pop-ico { background: linear-gradient(145deg, #32c2ff 0%, #0066cc 100%); }
.nav-pop-item:nth-of-type(3) .nav-pop-ico { background: linear-gradient(145deg, #00c08a 0%, #0080ff 100%); }
.nav-pop-ico .nav-ico { width: 19px; height: 19px; stroke: #fff; opacity: 1; }
.nav-pop-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nav-pop-txt b { font-size: var(--fs-md); }
.nav-pop-txt small { font-size: var(--fs-xs); line-height: 1.5; color: var(--muted); }

.login-hero .login-hero-logos { margin-bottom: 18px; }
.login-hero .login-brand-title { margin: 0 0 12px; font-size: 36px; line-height: 1.3; }
.login-hero .login-brand-title span {
  display: block; margin-top: 8px; font-size: 23px; line-height: 1.5; text-wrap: balance;
  background: linear-gradient(90deg, #0027b9 0%, #0080ff 55%, #00a37a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="dark"] .login-hero .login-brand-title span { background-image: linear-gradient(90deg, #80c0ff 0%, #32c2ff 50%, #99ffcf 100%); }

.login-card {
  flex: 0 0 400px; padding: 30px 30px 22px; border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--border));
  box-shadow: 0 30px 60px -36px rgba(0, 31, 94, .55), inset 0 1px 0 rgba(255, 255, 255, .6);
}
html[data-theme="dark"] .login-card { background: color-mix(in srgb, #00194b 82%, transparent); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06); }
.login-greet { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: var(--fs-sm); font-weight: 700; color: var(--primary); }
.lg-ico { display: inline-flex; }
.lg-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-card h2 { margin: 0 0 6px; font-size: 25px; }
.login-card p.sub { margin: 0 0 22px; font-size: var(--fs-md); line-height: 1.7; }
.login-card label { display: block; margin: 0 0 6px; font-size: var(--fs-sm); font-weight: 700; }
.login-card #login-user { width: 100%; margin-bottom: 0; }
.login-pw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 16px; }
.login-pw-head label { margin-bottom: 6px; }
.login-pw-head .login-recover { width: auto; margin: 0; padding: 0; }
.login-card .login-recover-box { margin: 10px 0 0; }
.login-card .login-submit { margin-top: 20px; height: 48px; border-radius: 14px; }
.login-safe { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 16px 0 0; font-size: var(--fs-xs); color: var(--faint); }
.login-safe span { display: inline-flex; }
.login-safe svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) {
  .login-card { width: 100%; flex-basis: auto; }

  .login-hero .login-brand-title { font-size: 30px; }
}
@media (max-width: 480px) {
  .login-card { padding: 24px 18px 18px; }
  .login-hero .login-brand-title span { font-size: 20px; }
}

.ec-card { display: flex; flex-direction: column; gap: 14px; }
.ec-block { display: flex; flex-direction: column; gap: 8px; }
.ec-block + .ec-block { padding-top: 12px; border-top: 1px dashed var(--hairline); }
.ec-h { margin: 0; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.ec-bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-3); }
.ec-seg { flex: var(--w) 1 0%; min-width: 6px; height: 100%; padding: 0; border: 0; background: var(--c); cursor: pointer; transition: filter .2s, transform .3s cubic-bezier(.32, .72, 0, 1); }
.ec-seg:hover { filter: brightness(1.12); }
.ec-seg:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.ec-rows { display: flex; flex-direction: column; gap: 2px; }
.ec-row {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 8px;
  border: 0; border-radius: var(--radius-sm); background: none; font: inherit; color: inherit; text-align: start; cursor: pointer;
  transition: background .2s;
}
.ec-row:hover { background: color-mix(in srgb, var(--c) 9%, transparent); }
.ec-row:focus-visible { outline: none; box-shadow: var(--ring); }
.ec-row.is-zero { opacity: .55; }
.ec-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.ec-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.ec-name b { font-size: var(--fs-sm); }
.ec-name small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-num { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.ec-num b { font-size: 18px; }
.ec-num em { min-width: 44px; font-style: normal; font-size: var(--fs-xs); font-weight: 700; color: var(--c); text-align: end; }

.wfc-panel { margin-top: 14px; }
.wfc-grid { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 900px) { .wfc-grid { grid-template-columns: 1fr; } }
.wfc-hero {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 16px;
  border-radius: var(--radius-lg); background: linear-gradient(150deg, #001f5e 0%, #00369e 60%, #0066cc 100%); color: #fff;
}
.wfc-hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 45%; background: var(--wave-soft) no-repeat center bottom / 100% 100%; opacity: .5; z-index: -1; }
.wfc-gauge-wrap { position: relative; width: 150px; height: 150px; }
.wfc-gauge { width: 100%; height: 100%; }
.wfc-g-track { fill: none; stroke: rgba(173, 231, 255, .18); stroke-width: 11; }
.wfc-g-val { fill: none; stroke: #33ff9e; stroke-width: 11; stroke-linecap: round; transition: stroke-dasharray .9s cubic-bezier(.32, .72, 0, 1); }
.wfc-gauge-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wfc-gauge-txt b { font-size: 30px; font-variant-numeric: tabular-nums; }
.wfc-gauge-txt small { max-width: 66%; font-size: 11px; line-height: 1.25; text-align: center; color: rgba(173, 231, 255, .85); }
.wfc-split { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: var(--fs-sm); color: rgba(235, 249, 255, .9); }
.wfc-split span { display: inline-flex; align-items: center; gap: 6px; }
.wfc-split i { width: 9px; height: 9px; border-radius: 50%; }
.wfc-s i { background: #33ff9e; }
.wfc-n i { background: #32c2ff; }
.wfc-u i { background: rgba(173, 231, 255, .45); }
.wfc-split b { color: #fff; font-variant-numeric: tabular-nums; }
.wfc-types { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; display: grid; gap: 6px; width: 100%; }
.wfc-type { padding: 3px 10px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); font-size: 11.5px; display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 5px 10px; border-radius: 10px; font-size: 12px; }
.wfc-type small { color: rgba(173, 231, 255, .8); flex: 1; text-align: start; font-size: 11.5px; color: rgba(235, 249, 255, .85); }
.wfc-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.wfc-main .db-sub { margin: 0; }
.wfc-rows { display: flex; flex-direction: column; gap: 8px; }
.wfc-row { display: grid; grid-template-columns: minmax(84px, 120px) minmax(0, 1fr) minmax(76px, auto); gap: 10px; align-items: center; }
.wfc-name { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wfc-track { height: 12px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.wfc-track i { display: block; height: 100%; border-radius: 6px; background: var(--nat-other); transition: width .8s cubic-bezier(.32, .72, 0, 1); }
.wfc-row.is-saudi .wfc-track i { background: var(--nat-saudi); }
.wfc-row.is-saudi .wfc-name { font-weight: 700; }
.wfc-num { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; font-variant-numeric: tabular-nums; }
.wfc-num b { font-size: var(--fs-md); }
.wfc-num small { font-size: 11px; color: var(--muted); }
.wfc-move { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--hairline); font-size: var(--fs-xs); color: var(--muted); }
.wfc-move b { color: var(--text); font-size: var(--fs-md); font-variant-numeric: tabular-nums; }

.wkf-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; padding: 8px 12px; border-radius: var(--radius-lg); background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.wkf-filters .fx { min-width: 200px; }
.wkf-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 12px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border)); font-size: var(--fs-xs); font-weight: 700; color: var(--primary); }
.wkf-chip button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--primary) 14%, transparent); color: inherit; cursor: pointer; font-size: 11px; }
.wkf-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
@media (max-width: 1100px) { .wkf-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .wkf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wkf-tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: var(--radius-lg);
  background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
}
.wkf-tile-label { font-size: var(--fs-xs); color: var(--muted); }
.wkf-tile-value { font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.wkf-tile-sub { font-size: var(--fs-xs); color: var(--muted); }
.wkf-tile.is-hero { color: #fff; border: 0; background: linear-gradient(135deg, #001f5e 0%, #0027b9 55%, #0080ff 100%); box-shadow: 0 16px 32px -20px rgba(0, 39, 185, .7); }
.wkf-tile.is-hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 55%; background: var(--wave-soft) no-repeat center bottom / 100% 100%; opacity: .45; pointer-events: none; }
.wkf-tile.is-hero .wkf-tile-label, .wkf-tile.is-hero .wkf-tile-sub { color: rgba(235, 249, 255, .85); }
.wkf-tile.is-saudi { background: linear-gradient(140deg, color-mix(in srgb, var(--nat-saudi) 12%, var(--card-bg)) 0%, var(--card-bg) 70%); }
.wkf-tile.is-saudi .wkf-tile-value { color: var(--nat-saudi); }
.wkf-ratio { display: flex; gap: 2px; height: 6px; margin: 2px 0; border-radius: 3px; overflow: hidden; background: var(--surface-3); }
.wkf-ratio i { background: var(--nat-saudi); }
.wkf-ratio em { background: var(--nat-other); opacity: .55; }

.wkf-donut { display: flex; justify-content: center; padding: 0 0 6px; }
.wkf-legend { display: flex; flex-direction: column; gap: 4px; }
.wkf-legend button {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; transition: background .2s, border-color .2s;
}
.wkf-legend button:hover { background: color-mix(in srgb, var(--c) 9%, transparent); }
.wkf-legend button.active { background: color-mix(in srgb, var(--c) 12%, var(--surface)); border-color: color-mix(in srgb, var(--c) 40%, var(--border)); }
.wkf-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.wkf-legend b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.wkf-legend em { min-width: 50px; font-style: normal; font-size: var(--fs-xs); font-weight: 700; color: var(--c); text-align: end; }
.wkf-bars { display: flex; flex-direction: column; gap: 4px; }
.wkf-bar-row {
  display: grid; grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) minmax(90px, auto); gap: 12px; align-items: center; padding: 6px 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: none; font: inherit; color: inherit; text-align: start;
}
button.wkf-bar-row { cursor: pointer; transition: background .2s, border-color .2s; }
button.wkf-bar-row:hover { background: var(--surface-2); }
button.wkf-bar-row.active { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.wkf-bar-name { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wkf-bar-track { position: relative; height: 14px; border-radius: 7px; background: var(--surface-3); overflow: hidden; }
.wkf-bar-track i, .wkf-bar-track em { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 7px; transition: width .8s cubic-bezier(.32, .72, 0, 1); }
.wkf-bar-track i { background: var(--nat-other); }
.wkf-bar-track em { background: var(--nat-saudi); }
.wkf-bar-row.is-saudi .wkf-bar-track i { background: var(--nat-saudi); }
.wkf-bar-row.is-saudi .wkf-bar-name { font-weight: 700; color: var(--nat-saudi); }
.wkf-bar-num { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; font-variant-numeric: tabular-nums; }
.wkf-bar-num b { font-size: var(--fs-md); }
.wkf-bar-num small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.wkf-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wkf-type {
  display: flex; flex-direction: column; gap: 4px; padding: 12px; text-align: start; cursor: pointer; font: inherit; color: inherit;
  border-radius: var(--radius-md); border: 1px solid color-mix(in srgb, var(--c) 24%, var(--border));
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 10%, var(--surface)) 0%, var(--surface) 75%);
  transition: transform .35s cubic-bezier(.32, .72, 0, 1), border-color .2s, box-shadow .2s;
}
.wkf-type:hover { transform: translateY(-2px); border-color: var(--c); }
.wkf-type.active { border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 30%, transparent); }
.wkf-type-head { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.wkf-type-head i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.wkf-type-num { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wkf-type-sub { font-size: 11px; color: var(--muted); }
.wkf-type-sau { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.wkf-type-sau small { font-size: 11px; color: var(--muted); }
.wkf-mini { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.wkf-mini i { display: block; height: 100%; background: var(--nat-saudi); border-radius: 3px; }

.wkf-work-bar { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-3); }
.wkf-work-bar .s { --c: var(--cat-site, var(--primary)); }
.wkf-work-bar .o { --c: var(--cat-office, var(--accent)); }
.wkf-work-bar i { flex-basis: 0; min-width: 4px; background: var(--c); }

.wkf-dept-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 10px; font-size: var(--fs-xs); color: var(--muted); }
.wkf-dept-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wkf-dept-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.wkf-dept-legend b { color: var(--text); }
.wkf-dept-legend-sau { margin-inline-start: auto; }
.wkf-depts { display: flex; flex-direction: column; gap: 2px; }
.wkf-dept {
  display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(0, 2fr) minmax(64px, auto) minmax(72px, auto); gap: 12px; align-items: center;
  padding: 7px 8px; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; transition: background .2s, border-color .2s;
}
.wkf-dept:hover { background: var(--surface-2); }
.wkf-dept.active { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.wkf-dept-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-sm); }
.wkf-dept-name bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wkf-dept-bar { display: flex; gap: 2px; width: var(--w); min-width: 6px; height: 14px; border-radius: 5px; overflow: hidden; transition: width .8s cubic-bezier(.32, .72, 0, 1); }
.wkf-dept-bar i { flex-basis: 0; min-width: 3px; }
.wkf-dept-num, .wkf-dept-sau { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; font-variant-numeric: tabular-nums; }
.wkf-dept-num b, .wkf-dept-sau b { font-size: var(--fs-md); }
.wkf-dept-num small, .wkf-dept-sau small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .wkf-dept { grid-template-columns: minmax(0, 1fr) auto auto; }
  .wkf-dept-bar { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .wkf-bar-row { grid-template-columns: minmax(80px, 110px) minmax(0, 1fr) auto; gap: 8px; }
  .wkf-types { grid-template-columns: 1fr; }
}
.wkf-cols { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 6px; }
.wkf-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.wkf-col-val { font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.wkf-col-bar { position: relative; flex: 1 1 auto; width: 100%; max-width: 46px; display: flex; align-items: flex-end; }
.wkf-col-bar i { display: block; width: 100%; height: var(--h); min-height: 3px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #32c2ff 0%, #0066cc 100%); transition: height .8s cubic-bezier(.32, .72, 0, 1); }
.wkf-col-label { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; min-height: 2.6em; }
.wkf-col-pct { font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

.wkf-mvs { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 170px; align-items: end; }
.wkf-mv { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.wkf-mv-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.wkf-mv-bars i { width: 42%; max-width: 12px; height: var(--h); min-height: 2px; border-radius: 4px 4px 2px 2px; transition: height .8s cubic-bezier(.32, .72, 0, 1); }
.wkf-mv-bars .j { background: var(--success); }
.wkf-mv-bars .x { background: var(--danger); }
.wkf-mv small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.sf-pick { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: 0; border-radius: 8px; cursor: pointer; flex-shrink: 0; }
.sf-pick:hover { background: var(--surface-2); }
.sf-pick input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); cursor: pointer; }

.sf-bulk {
  position: sticky; bottom: 14px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: fit-content; max-width: 100%;
  margin: 14px auto 0; padding: 8px 10px 8px 16px; border-radius: var(--radius-pill);
  background: linear-gradient(120deg, #001f5e 0%, #0027b9 100%); color: #fff; box-shadow: 0 18px 40px -18px rgba(0, 31, 94, .75);
  animation: fadeIn .25s ease;
}
html[dir="rtl"] .sf-bulk { padding: 8px 16px 8px 10px; }
.sf-bulk[hidden] { display: none; }
.sf-bulk-n { font-size: var(--fs-sm); font-weight: 700; }
.sf-bulk .btn .nav-ico { width: 15px; height: 15px; stroke: currentColor; }
.sf-bulk .btn.secondary { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .2); }

.modal-backdrop.is-drawer { align-items: stretch; justify-content: flex-end; padding: 0; }
html[dir="rtl"] .modal-backdrop.is-drawer { justify-content: flex-start; }
.modal.modal-drawer {
  width: min(620px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0;
  border-start-end-radius: 22px; border-end-end-radius: 22px; animation: drawerIn .45s cubic-bezier(.32, .72, 0, 1);
}
html[dir="ltr"] .modal.modal-drawer { border-radius: 22px 0 0 22px; }
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .modal.modal-drawer { animation: none; } }
.modal-drawer .modal-body { flex: 1 1 auto; overflow-y: auto; }
.sp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.sp-av {
  width: 56px; height: 56px; border-radius: 18px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #fff; background: linear-gradient(145deg, #0080ff 0%, #0027b9 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 12px 22px -12px rgba(0, 39, 185, .75);
}
.sp-av.is-saudi { background: linear-gradient(145deg, #00c08a 0%, #00805f 100%); }
.sp-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sp-id > b { font-size: var(--fs-xl); line-height: 1.4; }
.sp-id > small { font-size: var(--fs-sm); color: var(--muted); }
.sp-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.sp-money { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
@media (max-width: 560px) { .sp-money { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sp-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--hairline); }
.sp-stat span { font-size: 11px; color: var(--muted); }
.sp-stat b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.sp-stat small { font-size: 10.5px; color: var(--faint); }
.sp-stat.is-main { color: #fff; border: 0; background: linear-gradient(135deg, #001f5e 0%, #0027b9 60%, #0080ff 100%); }
.sp-stat.is-main span, .sp-stat.is-main small { color: rgba(235, 249, 255, .85); }

.sp-sec { padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--hairline); min-width: 0; }
.sp-sec h4 { margin: 0 0 8px; font-size: var(--fs-sm); color: var(--primary); }
.sp-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; }
.sp-kv { min-width: 0; }
.sp-kv.wide { grid-column: 1 / -1; }
.sp-kv dt { font-size: 10.5px; color: var(--faint); }
.sp-kv dd { margin: 1px 0 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }

.sp-history { margin-top: 10px; }
.sp-none { margin: 0; font-size: var(--fs-sm); }

.ctr-who { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; padding: 12px; border-radius: var(--radius-md); background: var(--surface-2); }
.ctr-who-label { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.ctr-names { display: flex; flex-wrap: wrap; gap: 6px; }
.ctr-name { display: inline-flex; flex-direction: column; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--hairline); }
.ctr-name b { font-size: var(--fs-sm); }
.ctr-name small { font-size: 10.5px; color: var(--muted); }
.ctr-more { align-self: center; font-size: var(--fs-sm); font-weight: 700; color: var(--primary); }
.ctr-form { display: flex; flex-direction: column; gap: 10px; }
.ctr-pick-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ctr-pick-head .clearable { flex: 0 1 280px; }
.ctr-pick-head input { margin: 0; }
.ctr-list { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; padding: 4px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-sunken, var(--surface-2)); }
.ctr-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.ctr-group[hidden] { display: none; }
.ctr-group-title { grid-column: 1 / -1; padding: 4px 6px 0; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.ctr-group-title small { color: var(--faint); }
.ctr-opt {
  position: relative; display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 10px 12px 10px 12px; cursor: pointer;
  border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, box-shadow .2s, transform .3s cubic-bezier(.32, .72, 0, 1);
}
.ctr-opt[hidden] { display: none; }
.ctr-opt:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); transform: translateY(-1px); }
.ctr-opt.is-on { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 28%, transparent); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.ctr-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ctr-opt:focus-within { box-shadow: var(--ring); }
.ctr-opt-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ctr-opt-main b { font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.ctr-opt-sub { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctr-opt-meta { font-size: 11px; color: var(--muted); }
.ctr-impact { padding: 10px 14px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 16%, transparent); font-size: var(--fs-sm); }
.ctr-impact ul { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; }
.ctr-impact p { margin: 0; }
.modal-foot .btn .nav-ico { width: 15px; height: 15px; stroke: currentColor; }

.ctl-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 16px 0 12px; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.ctl-search { flex: 1 1 240px; max-width: 340px; }
.ctl-search input { margin: 0; }
.ctl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ctl-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius-pill); cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: var(--fs-xs); transition: background .2s, color .2s, border-color .2s;
}
.ctl-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.ctl-chip:hover { border-color: var(--primary); color: var(--primary); }
.ctl-chip.active { background: color-mix(in srgb, var(--primary) 10%, var(--surface)); border-color: var(--primary); color: var(--primary); font-weight: 700; }
.ctl-chip.is-near.active { --primary: var(--warn); }
.ctl-chip.is-risk.active { --primary: var(--danger); }
.ctl-chip.is-expired.active { --primary: var(--muted); }

.ctl-group { margin-bottom: 16px; }
.ctl-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin: 0 0 8px; }
.ctl-group-head h3 { margin: 0; font-size: var(--fs-lg); display: inline-flex; align-items: center; gap: 8px; }
.ctl-group-sum { font-size: var(--fs-xs); color: var(--muted); }

.txt-warn { color: var(--warn); font-weight: 700; }

@media (max-width: 560px) { .ctl-search { max-width: none; } }
.cd-emps-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.cd-emps-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cd-emps-tools input { margin: 0; height: var(--control-h-sm); min-width: 220px; }
.cd-emps-tools .nav-ico { width: 15px; height: 15px; stroke: currentColor; }
.cd-emps-table .col-pick { width: 40px; text-align: center; }
.cd-emps-table tr.is-picked > td { background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.cd-emps-table tr[hidden] { display: none; }
.wkf-bar-name, .ctr-opt-sub, .wfc-name { unicode-bidi: plaintext; }
html[dir="rtl"] .wkf-bar-name, html[dir="rtl"] .ctr-opt-sub, html[dir="rtl"] .wfc-name { text-align: right; }

.sg-wrap { position: relative; overflow: auto; max-height: calc(100dvh - 170px); min-height: 360px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-xs); }
.sg-wrap:focus { outline: none; }
.sg-table { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; }
.sg-table th, .sg-table td {
  height: 28px; padding: 0 7px; background: var(--surface); text-align: start; vertical-align: middle;
  border-inline-end: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums;
}
.sg-table thead th {
  position: sticky; top: 0; z-index: 3; height: auto; padding: 6px 8px; vertical-align: bottom;
  background: color-mix(in srgb, var(--primary) 9%, var(--surface)); border-bottom: 2px solid color-mix(in srgb, var(--primary) 30%, var(--border));
}
.sg-h-ar { display: block; font-size: 11.5px; font-weight: 700; line-height: 1.35; white-space: normal; }
.sg-h-en { display: block; font-size: 9.5px; font-weight: 400; color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.sg-table thead th.sortable { cursor: pointer; }
.sg-table thead th.sortable:hover { background: color-mix(in srgb, var(--primary) 15%, var(--surface)); }
.sg-table thead th.sorted .sg-h-ar { color: var(--primary); }
.sg-table thead th.sorted.asc .sg-h-ar::after { content: ' ▴'; }
.sg-table thead th.sorted.desc .sg-h-ar::after { content: ' ▾'; }
.sg-stick { position: sticky; z-index: 2; }
html:not([dir="ltr"]) .sg-stick { right: var(--stick, 0px); left: auto; }
html[dir="ltr"] .sg-stick { left: var(--stick, 0px); right: auto; }
.sg-table thead .sg-stick, .sg-total .sg-stick { z-index: 4; }

.sg-rh { background: var(--surface-2) !important; font-weight: 400; }
.sg-rh-in { display: flex; align-items: center; gap: 3px; }
.sg-table th.sg-rh { padding: 0 5px; }
.sg-rh-in > * { flex-shrink: 0; }
.sg-flag-sp { width: 22px; height: 22px; flex-shrink: 0; }
.sg-table .sf-pick { width: 24px; height: 24px; border-radius: 6px; }
.sg-table .sf-pick input { width: 15px; height: 15px; }
.sg-n { min-width: 30px; text-align: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sg-view { width: 26px; height: 26px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; background: none; color: var(--primary); cursor: pointer; transition: background .2s; }
.sg-view:hover { background: var(--primary-tint); }
.sg-view .nav-ico { width: 15px; height: 15px; opacity: 1; }
.sg-table tbody tr:hover td { background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.sg-ed { cursor: cell; }
.sg-ed:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 45%, transparent); }
.sg-table td:focus { outline: none; box-shadow: inset 0 0 0 2px var(--primary); }
.sg-table td.sg-calc, .sg-table tbody tr:hover td.sg-calc { background: color-mix(in srgb, #32c2ff 8%, var(--surface)); }
.sg-table thead th.sg-calc { background: color-mix(in srgb, #32c2ff 18%, var(--surface)); }
.sg-table td.sg-off { background: repeating-linear-gradient(135deg, var(--surface-2) 0 5px, var(--surface) 5px 10px); cursor: not-allowed; }
.sg-num { text-align: end !important; }
.sg-strong { font-weight: 700; color: var(--primary); }
.sg-auto { color: var(--muted); }
.sg-nopay td.sg-calc { color: var(--faint); }
.sg-yn { display: inline-block; min-width: 34px; padding: 1px 8px; border-radius: var(--radius-pill); text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-2); }
.sg-yn.is-yes { color: var(--cost-car); background: color-mix(in srgb, var(--cost-car) 12%, transparent); }
.sg-exempt { display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-soft); }
.sg-table td.is-editing { padding: 0; overflow: visible; box-shadow: inset 0 0 0 2px var(--primary); }
.sg-table .sg-input {
  display: block; width: 100%; height: 27px; min-height: 0; margin: 0; padding: 0 7px; border: 0; border-radius: 0; box-shadow: none;
  background: color-mix(in srgb, var(--primary) 6%, var(--surface)); color: var(--text); font: inherit; font-size: 12px;
}
.sg-table .sg-input:focus { outline: none; box-shadow: none; border: 0; }
.sg-table td.is-saving { opacity: .55; }
.sg-table td.is-saved { animation: sgSaved 1.2s ease; }
@keyframes sgSaved { from { background: color-mix(in srgb, var(--success) 32%, var(--surface)); } }
.sg-table td.is-error { box-shadow: inset 0 0 0 2px var(--danger); }
.sg-table tr.is-picked td, .sg-table tr.is-picked th { background: color-mix(in srgb, var(--primary) 10%, var(--surface)) !important; }
.sg-total td, .sg-total th { position: sticky; bottom: 0; z-index: 2; font-weight: 700; background: color-mix(in srgb, var(--primary) 11%, var(--surface)) !important; border-top: 2px solid color-mix(in srgb, var(--primary) 30%, var(--border)); }
@media (max-width: 760px) {

  .sg-wrap { max-height: 72vh; }
}

.wkf-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 252px 252px 252px 220px auto auto; gap: 10px;
  grid-template-areas: "sau nat types age" "work nat qual exp" "ten ten titles titles" "mv mv mv mv" "people people people people" "depts depts cons cons"; }
.wkf-p-ten { grid-area: ten; }
.wkf-p-titles { grid-area: titles; }
.wkf-p-people { grid-area: people; }
.wkf-p-sau { grid-area: sau; }
.wkf-p-nat { grid-area: nat; }
.wkf-p-types { grid-area: types; }
.wkf-p-age { grid-area: age; }
.wkf-p-cons { grid-area: cons; }
.wkf-p-qual { grid-area: qual; }
.wkf-p-exp { grid-area: exp; }
.wkf-p-depts { grid-area: depts; }
.wkf-p-mv { grid-area: mv; }
.wkf-p-work { grid-area: work; }
.wkf-bento > .dash-panel { margin: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.wkf-bento .dash-panel-head { padding: 9px 12px 7px; gap: 6px; flex-wrap: wrap; }
.wkf-bento .dash-panel-title { font-size: 13.5px; }
.wkf-bento .dash-panel-head .wkf-dept-legend { margin: 0; }
.wkf-bento .dash-panel-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 8px 12px 10px; overflow: hidden; }
.wkf-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.wkf-donut .donut { width: 116px !important; height: 116px !important; }
.wkf-bento .wkf-bar-row { padding: 5px 6px; gap: 3px 8px; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name num" "bar bar"; }
.wkf-bento .wkf-bar-name { grid-area: name; }
.wkf-bento .wkf-bar-num { grid-area: num; }
.wkf-bento .wkf-bar-track { grid-area: bar; height: 8px; }
.wkf-p-types .wkf-types { display: flex; flex-direction: column; gap: 4px; }
.wkf-p-types .wkf-type { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head num" "sau sub"; gap: 0 10px; padding: 4px 10px; }
.wkf-p-types .wkf-type-head { grid-area: head; }
.wkf-p-types .wkf-type-num { grid-area: num; font-size: 18px; line-height: 1.2; text-align: end; }
.wkf-p-types .wkf-type-sub { grid-area: sub; text-align: end; }
.wkf-p-types .wkf-type-sau { grid-area: sau; margin: 0; gap: 1px; }
.wkf-bento .wkf-cols { flex: 1 1 auto; height: auto; min-height: 0; gap: 6px; padding-top: 2px; }
.wkf-bento .wkf-col-label { min-height: 2.4em; font-size: 10.5px; }
.wkf-bento .wkf-mvs { flex: 1 1 auto; height: auto; min-height: 0; }

.wkf-bento .wkf-dept { padding: 5px 6px; gap: 10px; }
.wkf-work { justify-content: center; gap: 10px; }
.wkf-work-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--c) 9%, transparent); }
.wkf-work-row span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.wkf-work-row i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.wkf-work-row b { font-size: 20px; font-variant-numeric: tabular-nums; }
.wkf-work-row em { min-width: 44px; font-style: normal; font-size: var(--fs-xs); font-weight: 700; color: var(--c); text-align: end; }
.wkf-work-row.s, .wkf-work-bar .s { --c: var(--cat-site, var(--primary)); }
.wkf-work-row.o, .wkf-work-bar .o { --c: var(--cat-office, var(--accent)); }
@media (max-width: 1100px) { .wkf-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(5, 252px) 220px auto auto auto; grid-template-areas: "sau nat" "types nat" "age qual" "exp work" "ten titles" "mv mv" "people people" "depts depts" "cons cons"; } }
@media (max-width: 640px) {
  .wkf-bento { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: auto; grid-template-areas: none; }
  .wkf-bento > .dash-panel { grid-area: auto; }
  .wkf-scroll { max-height: 320px; }
  .wkf-bento .wkf-cols, .wkf-bento .wkf-mvs { height: 170px; flex: none; }
}
.wkf-bento > .wkf-p-depts, .wkf-bento > .wkf-p-cons { overflow: visible; }
.wkf-bento .wkf-p-depts .dash-panel-body, .wkf-bento .wkf-p-cons .dash-panel-body { overflow: visible; }
.wkf-p-depts .wkf-scroll, .wkf-p-cons .wkf-scroll { flex: none; max-height: none; overflow: visible; }
.wkf-bento .wkf-p-cons .wkf-bar-row { grid-template-columns: minmax(0, 42%) minmax(0, 1fr) auto; grid-template-areas: "name bar num"; align-items: center; padding: 4px 6px; }
.wkf-bento .wkf-p-cons .wkf-bars { gap: 2px; }
.wkf-p-cons .wkf-bar-name, .wkf-p-depts .wkf-dept-name bdi { white-space: normal; overflow: visible; line-height: 1.35; }

.edit-pos { display: flex; flex-direction: column; gap: 6px; }
.edit-pos-no { font-weight: 700; font-variant-numeric: tabular-nums; }
.edit-pos .check-row { margin: 0; }

.ps-waiting { margin-bottom: 14px; }
.ps-wait-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.ps-wait { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.ps-wait-id { display: flex; flex-direction: column; min-width: 0; }
.ps-wait-id small { font-size: 11px; color: var(--muted); }
@media (max-width: 560px) { .ps-wait { grid-template-columns: 1fr; } }
.wkf-p-sau .dash-panel-body { flex-direction: row; align-items: center; gap: 10px; }
.wkf-p-sau .wkf-donut { padding: 0; flex-shrink: 0; }
.wkf-p-sau .wkf-donut .donut { width: 104px !important; height: 104px !important; }
.wkf-p-sau .wkf-legend { flex: 1 1 auto; min-width: 0; gap: 3px; }
.wkf-p-sau .wkf-legend button { grid-template-columns: 9px minmax(0, 1fr) auto; grid-template-areas: "dot name num" "dot name pct"; gap: 0 6px; padding: 4px 6px; font-size: 12px; line-height: 1.3; }
.wkf-p-sau .wkf-legend i { grid-area: dot; }
.wkf-p-sau .wkf-legend b { grid-area: num; font-size: 13px; }
.wkf-p-sau .wkf-legend em { grid-area: pct; min-width: 0; font-size: 10.5px; }
.wkf-p-nat .wkf-bars { gap: 3px; }
.wkf-bento .wkf-p-nat .wkf-bar-row { padding: 3px 6px; gap: 2px 8px; line-height: 1.3; }
.wkf-p-types .wkf-type-head, .wkf-p-types .wkf-type-sub, .wkf-p-types .wkf-type-sau small { line-height: 1.3; }

.stc-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.stc-opt {
  --c: var(--success); position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); cursor: pointer;
  transition: border-color .2s cubic-bezier(.32, .72, 0, 1), background .2s cubic-bezier(.32, .72, 0, 1);
}
.stc-opt.is-off { --c: var(--danger); }
.stc-opt input { position: absolute; opacity: 0; pointer-events: none; }
.stc-dot { width: 15px; height: 15px; margin-top: 3px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--border-strong); transition: border-color .2s, box-shadow .2s; }
.stc-opt.is-on { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.stc-opt.is-on .stc-dot { border-color: var(--c); box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 8px var(--c); }
.stc-opt:has(input:focus-visible) { box-shadow: var(--ring); }
.stc-opt b { display: block; font-size: var(--fs-sm); }
.stc-opt small { display: block; font-size: 11px; color: var(--muted); }
.stc-exit { margin-bottom: 8px; padding: 10px 12px 0; border-radius: var(--radius-md); background: var(--surface-2); }
.stc-note { margin: 0 0 10px; font-size: var(--fs-xs); color: var(--muted); }
.edit-exit { margin-bottom: 12px; padding: 10px 12px 0; border-radius: var(--radius-md); background: var(--warn-soft); }
@media (max-width: 520px) { .stc-opts { grid-template-columns: minmax(0, 1fr); } }

.welcome-hero.is-compact { gap: 12px; margin-bottom: 10px; padding: 10px 18px; }
.welcome-hero.is-compact .wh-ico { width: 34px; height: 34px; border-radius: 10px; }
.welcome-hero.is-compact .wh-ico svg { width: 19px; height: 19px; }
.welcome-hero.is-compact .wh-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.welcome-hero.is-compact .wh-greet { font-size: 17px; }
.welcome-hero.is-compact .wh-date { margin: 0; font-size: var(--fs-xs); }

.db-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 10px; align-items: stretch; }
.db-bento > * { min-width: 0; margin: 0; }
.db-bento > .db-nat { grid-row: span 2; }
.db-bento > .db-ot { grid-column: span 3; }
.db-bento > .db-att, .db-bento > .db-dst { grid-column: span 2; }
.db-bento.is-dept > .db-att { grid-column: span 1; }
.db-bento.is-dept > .db-ot, .db-bento:not(:has(> .db-nat)) > .db-ot { grid-column: 1 / -1; }
.db-bento:not(.is-dept):not(:has(> .db-dst)) > .db-att, .db-bento:not(:has(> .db-att)) > .db-dst { grid-column: 1 / -1; }
.db-bento .dash-panel { padding: 10px 14px 0; }
.db-bento .dash-panel-head { gap: 8px; margin-bottom: 8px; padding-bottom: 7px; }
.db-bento .dash-panel-title { font-size: var(--fs-md); }
.db-bento .dash-panel-body { display: flex; flex-direction: column; padding-bottom: 10px; }
.db-bento .dash-panel-foot { margin: 0 -14px; padding: 4px 14px; }
.db-bento .kpi-chip { padding: 2px 9px; font-size: var(--fs-xs); }
.db-bento .kpi-card { padding: 10px 14px 12px; }
.db-bento .kpi-head { min-height: 0; margin-bottom: 8px; }
.db-bento .kpi-donut-card { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr auto; grid-template-areas: "head head" "vis legend" "note note"; column-gap: 12px; }
.db-bento .kpi-donut-card .kpi-head { grid-area: head; }
.db-bento .kpi-donut-card .kpi-visual { grid-area: vis; padding: 0; }
.db-bento .kpi-donut-card .kpi-visual::before { width: 112px; height: 112px; }
.db-bento .kpi-donut-card .kpi-legend { grid-area: legend; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; border: 0; align-self: center; }
.db-bento .kpi-donut-card .kpi-legend-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; padding: 4px 8px; }
.db-bento .kpi-donut-card .kpi-legend-item:hover { transform: none; }
.db-bento .kpi-donut-card .kli-bar { grid-column: 1 / -1; height: 3px; }
.db-bento .kpi-donut-card .kpi-legend-item strong { font-size: 15px; }
.db-bento .kpi-donut-card .kpi-note { grid-area: note; justify-self: center; margin: 8px 0 0; padding: 3px 12px; font-size: 11px; }
.db-bento .ec-card { gap: 8px; }
.db-bento .ec-block { gap: 4px; }
.db-bento .ec-block + .ec-block { padding-top: 8px; }
.db-bento .ec-bar { height: 8px; }
.db-bento .ec-row { gap: 8px; padding: 1px 6px; line-height: 1.3; }
.db-bento .ec-name b { font-size: var(--fs-xs); }
.db-bento .ec-name small { display: none; }
.db-bento .ec-num b { font-size: 14px; }
.db-bento .ec-num em { min-width: 40px; }
.db-bento .wfc-grid { flex: 1; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 10px; }
.db-bento .wfc-hero { display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "gauge split" "types types"; align-items: center; gap: 8px 14px; padding: 12px; }
.db-bento .wfc-gauge-wrap { grid-area: gauge; }
.db-bento .wfc-hero .wfc-gauge-wrap { width: 96px; height: 96px; }
.db-bento .wfc-gauge-txt b { font-size: 20px; }
.db-bento .wfc-gauge-txt small { max-width: 62%; font-size: 9.5px; }
.db-bento .wfc-split { grid-area: split; flex-direction: column; align-items: flex-start; gap: 4px; font-size: var(--fs-xs); }
.db-bento .wfc-types { grid-area: types; gap: 4px; gap: 4px; }
.db-bento .wfc-type { padding: 2px 8px; font-size: 10.5px; padding: 3px 9px; font-size: 11px; }
.db-bento .wfc-main { gap: 6px; }
.db-bento .wfc-rows { flex: 1; justify-content: space-around; gap: 3px; }
.db-bento .wfc-row { grid-template-columns: minmax(60px, 86px) minmax(0, 1fr) auto; gap: 8px; line-height: 1.35; }
.db-bento .wfc-name { font-size: var(--fs-xs); }
.db-bento .wfc-track { height: 8px; }
.db-bento .wfc-num b { font-size: var(--fs-sm); }
.db-bento .wfc-num small { font-size: 10px; }
.db-bento .wfc-move { gap: 4px 12px; padding-top: 8px; }
.db-bento .wfc-move b { font-size: var(--fs-sm); }
.db-bento .ot-stats { margin-bottom: 8px; }
.db-bento .ot-stat { flex-basis: 150px; display: flex; flex-wrap: nowrap; align-items: baseline; gap: 6px; padding: 5px 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; }
.db-bento .ot-stat span { font-size: 11px; }
.db-bento .ot-stat b { min-width: 0; overflow: hidden; font-size: 15px; line-height: 1.3; }
.db-bento .ot-stat b bdi { display: inline; font-size: var(--fs-sm); }
.db-bento .sm-grid { --gap: 8px; }
.db-bento .sm-card { padding: 6px 9px 3px; line-height: 1.3; }
.db-bento .sm-head { gap: 5px; font-size: var(--fs-xs); }
.db-bento .sm-total b { font-size: 15px; line-height: 1.3; }
.db-bento .sm-axis { min-height: 14px; font-size: 10px; }
.db-bento .att-legend { gap: 4px 14px; margin-bottom: 6px; font-size: var(--fs-xs); }
.db-bento .att-legend-rate { padding: 2px 10px; }

@media (max-width: 1100px) {
  .db-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-bento > .db-nat { grid-row: auto; }
  .db-bento > .db-ot, .db-bento > .db-att, .db-bento > .db-dst { grid-column: 1 / -1; }
  .db-bento.is-dept > .db-att { grid-column: auto; }
}
@media (max-width: 640px) {
  .db-bento { grid-template-columns: minmax(0, 1fr); }
  .db-bento > * { grid-column: auto !important; }
  .db-bento .kpi-donut-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "vis" "legend" "note"; }
  .db-bento .kpi-donut-card .kpi-visual { justify-self: center; }

}

.sg-full-exit { display: none; }
html.sg-full .topbar, html.sg-full .site-signature, html.sg-full .skip-link, html.sg-full #page-content .page-head,
html.sg-full .sf-tabs, html.sg-full #sf-summary { display: none !important; }
html.sg-full #page-content { max-width: none; padding: 8px 12px 0; }
html.sg-full .sf-finder { margin-bottom: 8px; padding: 8px 10px; padding-inline-end: 220px; }
html.sg-full .sf-finder .finder-search input { height: calc(var(--control-h-sm) + 4px); font-size: var(--fs-sm); }
html.sg-full .sg-wrap { max-height: calc(100dvh - var(--sgf-top, 150px)); min-height: 260px; }
html.sg-full .sf-filters { gap: 6px; padding-top: 6px; }
html.sg-full .sf-filters .fx > span { display: none; }
html.sg-full .sf-filters .fx { min-width: 130px; flex-basis: 130px; }
html.sg-full .sf-filters .fx select { height: var(--control-h-sm); min-height: 0; padding-block: 0; font-size: var(--fs-sm); }
html.sg-full .sf-filters .btn.small { height: var(--control-h-sm); }
html.sg-full .sg-full-exit {
  position: fixed; top: 12px; inset-inline-end: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 6px;
  height: var(--control-h-sm); padding: 0 14px; border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border)); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--primary); font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; box-shadow: var(--shadow-soft);
  transition: background .2s cubic-bezier(.32, .72, 0, 1), transform .2s cubic-bezier(.32, .72, 0, 1);
}
html.sg-full .sg-full-exit:hover { background: var(--primary-tint); }
html.sg-full .sg-full-exit:active { transform: scale(.98); }
.sg-full-exit .ui-ico, #sf-full .ui-ico { width: 16px; height: 16px; }
@media (max-width: 760px) { html.sg-full .sf-finder { padding-inline-end: 10px; padding-top: 52px; } }

.ae-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ae-kind {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); cursor: pointer; transition: border-color .2s cubic-bezier(.32, .72, 0, 1), background .2s cubic-bezier(.32, .72, 0, 1);
}
.ae-kind input { position: absolute; opacity: 0; pointer-events: none; }
.ae-kind b { font-size: var(--fs-md); }
.ae-kind small { font-size: 11px; color: var(--muted); }
.ae-kind:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.ae-kind.is-on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 22%, transparent); }
.ae-kind:has(input:focus-visible) { box-shadow: var(--ring); }
.ae-vac { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ae-vac-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ae-vac-head .clearable { flex: 1 1 220px; }
.ae-vac-head input { height: var(--control-h-sm); min-height: 0; margin: 0; padding-block: 0; font-size: var(--fs-sm); }
.ae-vac-list { max-height: 260px; }
.ae-vac-empty { margin: 0; padding: 14px; text-align: center; }
.ae-vac .check-row { margin: 0; }

@media (max-width: 560px) { .ae-kinds { grid-template-columns: minmax(0, 1fr); } }

.inv-layout { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: 12px; align-items: start; }
.inv-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.inv-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inv-side input { height: var(--control-h-sm); min-height: 0; margin: 0; padding-block: 0; font-size: var(--fs-sm); }
.inv-list { display: flex; flex-direction: column; gap: 3px; max-height: calc(100dvh - 270px); overflow-y: auto; }
.inv-pick {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 7px 9px;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: none; font: inherit; color: inherit; text-align: start; cursor: pointer;
  transition: background .2s cubic-bezier(.32, .72, 0, 1), border-color .2s cubic-bezier(.32, .72, 0, 1);
}
.inv-pick:hover { background: var(--surface-2); }
.inv-pick.is-on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.inv-pick:focus-visible { outline: none; box-shadow: var(--ring); }
.inv-pick-id { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.inv-pick-id b { font-variant-numeric: tabular-nums; }
.inv-pick-id small { flex-basis: 100%; overflow: hidden; font-size: 11px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.inv-pick-last { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.inv-pick-last b { font-size: var(--fs-sm); }
.inv-pick-last small { font-size: 10.5px; color: var(--muted); }
.inv-pick.is-late .inv-pick-last small { color: var(--warn); font-weight: 700; }
.inv-main { min-width: 0; }
.inv-main .inv-panel { margin-top: 0; }
.inv-add { margin-bottom: 14px; padding: 12px 14px 0; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--surface-2); }
.inv-add h4 { margin: 0 0 8px; font-size: var(--fs-sm); }
.inv-add-foot { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.inv-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.inv-sum > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--surface-2); }
.inv-sum span { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.inv-sum b { font-size: 18px; font-variant-numeric: tabular-nums; }
.inv-sum small { font-size: 11px; color: var(--muted); }
.inv-sum .inv-sum-main { border-color: transparent; background: linear-gradient(135deg, #001f5e 0%, #0066cc 100%); color: #fff; box-shadow: 0 12px 26px -18px rgba(0, 31, 94, .8); }
.inv-sum .inv-sum-main span, .inv-sum .inv-sum-main small { color: rgba(235, 249, 255, .82); }
.inv-sum .is-late { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); background: var(--warn-soft); }
.inv-chart { display: grid; grid-template-columns: repeat(var(--n), minmax(32px, 1fr)); gap: 3px; height: 156px; margin: 4px 0 14px; padding: 8px 4px 0; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; }
.inv-col { display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; min-width: 0; height: 100%; }
.inv-col i { align-self: end; display: block; width: 100%; max-width: 28px; height: var(--h); min-height: 3px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--primary) 50%, var(--surface)); transition: background .2s cubic-bezier(.32, .72, 0, 1); }
.inv-col.is-last i { background: var(--primary); }
.inv-col.is-empty i { min-height: 0; height: 5px; border-radius: 2px; background: repeating-linear-gradient(135deg, var(--border-strong) 0 3px, transparent 3px 6px); }
.inv-col:hover i { background: var(--accent); }
.inv-col small { display: flex; flex-direction: column; align-items: center; margin: 4px 0 2px; max-width: 100%; font-size: 9.5px; line-height: 1.25; color: var(--muted); white-space: nowrap; }
.inv-col small em { font-style: normal; font-size: 9px; color: var(--faint); }
.inv-col.is-last small { color: var(--primary); font-weight: 700; }
.inv-table tr.is-last td { background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.inv-table tfoot td { font-size: var(--fs-xs); }
@media (max-width: 900px) {
  .inv-layout { grid-template-columns: minmax(0, 1fr); }
  .inv-side { position: static; }
  .inv-list { max-height: 260px; }
  .inv-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inv-col small { font-size: 8.5px; }
}

.emp-check { width: 16px; height: 16px; cursor: pointer; margin: 0; }
.report-table .col-check { width: 36px; text-align: center; }
.transfer-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--radius-sm);
  padding: 11px 15px; margin-bottom: 14px;
}
.transfer-bar #emp-transfer-count { font-weight: 700; color: var(--warn); font-size: var(--fs-lg); }
.transfer-bar select { width: auto; min-width: 200px; margin-bottom: 0; }

.results-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pager-num {
  min-width: 34px; height: 32px; padding: 0 8px; border-radius: var(--radius-xs); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.pager-num:hover { border-color: var(--primary); color: var(--primary); }
.pager-num.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
html[data-theme="dark"] .pager-num.active { color: var(--brand-900); }
.pager-gap { color: var(--faint); padding: 0 2px; }
.emp-av {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--brand-100), var(--brand-200)); color: var(--brand-800);
  font-weight: 700; font-size: var(--fs-md);
}
html[data-theme="dark"] .emp-av { background: var(--surface-3); color: var(--brand-200); }
.emp-av.off { filter: grayscale(1); opacity: .6; }
.emp-cell { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.emp-cell > span { min-width: 0; }
.emp-cell b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-table .col-name { width: 30%; }
.emp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.emp-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
  transition: border-color .18s, box-shadow .18s, transform .15s;
}
.emp-card:hover { border-color: var(--primary); box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.emp-card.is-off { opacity: .72; }
.emp-card-check { position: absolute; top: 10px; inset-inline-end: 10px; }
.emp-card-main { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; padding-inline-end: 22px; }
.emp-card-main .emp-av { width: 44px; height: 44px; font-size: 18px; border-radius: 12px; }
.emp-card-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.45; }
.emp-card-id b { font-size: var(--fs-md); color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-card-id small { font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-card-id em { font-style: normal; font-size: var(--fs-xs); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.emp-card-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; padding-top: 10px; border-top: 1px solid var(--hairline); }
.emp-card-meta div { min-width: 0; }
.emp-card-meta dt { font-size: 11px; color: var(--faint); }
.emp-card-meta dd { margin: 0; font-size: var(--fs-sm); font-weight: 700; min-width: 0; }
.emp-card-meta dd bdi { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daybar {
  margin-bottom: 12px; padding: 12px 14px; border-radius: var(--radius-lg);
  background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--shadow-soft); margin-bottom: 10px; }
.daybar-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.daybar-ico {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-tint); color: var(--primary);
}
.daybar-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.daybar-title { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.daybar-title b { font-size: var(--fs-md); }
.daybar-title small { font-size: var(--fs-xs); color: var(--muted); }
.daybar-date input { margin: 0; height: var(--control-h-sm); min-height: 0; padding-block: 0; width: auto; }

@media print {
  .daybar { display: none !important; }
}

.sg-pin {
  position: absolute; top: 3px; inset-inline-end: 3px; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--faint); cursor: pointer; opacity: 0;
  transition: opacity .2s cubic-bezier(.32, .72, 0, 1), background .2s, color .2s;
}
.sg-table thead th:hover .sg-pin, .sg-pin:focus-visible, .sg-pin.is-on { opacity: 1; }
.sg-pin:hover { background: var(--primary-tint); color: var(--primary); }
.sg-pin.is-on { color: var(--primary); }
.sg-pin .ui-ico { width: 13px; height: 13px; }
.sg-pin-edge { box-shadow: -7px 0 8px -7px rgba(0, 31, 94, .28); }
html[dir="ltr"] .sg-pin-edge { box-shadow: 7px 0 8px -7px rgba(0, 31, 94, .28); }

.sp-form { display: flex; flex-direction: column; gap: 10px; }
.sp-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.sp-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface-2); font-size: var(--fs-sm); font-weight: 700; cursor: pointer;
  transition: border-color .2s cubic-bezier(.32, .72, 0, 1), background .2s cubic-bezier(.32, .72, 0, 1), color .2s;
}
.sp-toggle input { width: 17px; height: 17px; min-height: 0; margin: 0; accent-color: var(--primary); cursor: pointer; }
.sp-toggle:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); color: var(--primary); }
.sp-toggle:has(input:focus-visible) { box-shadow: var(--ring); }
.sp-trans-box { margin-bottom: 10px; }
.sp-trans-box, .sp-car-box { transition: opacity .2s cubic-bezier(.32, .72, 0, 1); }
.sp-trans-box.is-off, .sp-car-box.is-off { opacity: .45; }
.sp-form input:disabled, .sp-form select:disabled, .sp-form textarea:disabled { opacity: 1; color: var(--text); background-color: var(--surface-2); }
.sp-trans-box.is-off input:disabled, .sp-car-box.is-off input:disabled, .sp-car-box.is-off select:disabled { color: var(--muted); }
.sp-exit {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; padding: 12px 14px; border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--danger) 22%, var(--border)); background: color-mix(in srgb, var(--danger) 5%, var(--surface));
}
.sp-exit > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sp-exit > .wide { grid-column: 1 / -1; }
.sp-exit span { font-size: 11px; color: var(--muted); }
.sp-exit b { font-size: var(--fs-sm); }
.sp-history summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 700; color: var(--primary); }
.sp-history[open] summary { margin-bottom: 8px; }
@media (max-width: 560px) {
  .sp-exit, .sp-money { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.dat-grid, .dst-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.dat-tile, .dst-tile { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 7px 10px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--surface-2); }
.dat-tile { color: inherit; text-decoration: none; transition: border-color .2s cubic-bezier(.32, .72, 0, 1), background .2s cubic-bezier(.32, .72, 0, 1); }
.dat-tile:hover { border-color: color-mix(in srgb, var(--tone) 45%, var(--border)); background: color-mix(in srgb, var(--tone) 6%, var(--surface)); }
.dat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.dat-name, .dst-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-xs); font-weight: 700; line-height: 1.35; }
.dat-name bdi, .dst-name bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dat-rate { flex-shrink: 0; font-size: var(--fs-sm); color: var(--tone); font-variant-numeric: tabular-nums; }
.dat-bar { display: flex; gap: 2px; height: 6px; overflow: hidden; border-radius: 3px; background: var(--surface-3); }
.dat-bar i { display: block; height: 100%; }
.dat-bar .is-p { background: var(--success); }
.dat-bar .is-l { background: var(--info); }
.dat-bar .is-a { background: var(--danger); }
.dat-nums { display: flex; align-items: center; gap: 10px; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.3; }
.dat-nums > span { display: inline-flex; align-items: center; gap: 4px; }
.dat-nums > span:first-child { margin-inline-end: auto; }
.dat-nums i { width: 6px; height: 6px; border-radius: 50%; }
.dat-nums .is-l i { background: var(--info); }
.dat-nums .is-a i { background: var(--danger); }
.dst-tile { gap: 4px; }
.dst-name { color: var(--text); text-decoration: none; }
.dst-name:hover bdi { color: var(--primary); text-decoration: underline; }
.dst-line {
  display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; background: none;
  font: inherit; font-size: var(--fs-xs); line-height: 1.3; color: var(--text); text-decoration: none; cursor: pointer;
}
.dst-track { height: 6px; overflow: hidden; border-radius: 3px; background: var(--surface-3); transition: background .2s; }
.dst-track i { display: block; width: var(--w); height: 100%; border-radius: 3px; background: var(--primary); }
.dst-line.is-proj .dst-track i { background: var(--accent); }
.dst-line:hover .dst-track { background: color-mix(in srgb, var(--primary) 14%, var(--surface-3)); }
.dst-line b { text-align: end; font-variant-numeric: tabular-nums; }
.dst-legend { margin-bottom: 6px; }
@media (max-width: 640px) { .dat-grid, .dst-grid { grid-template-columns: minmax(0, 1fr); } }

.badge.pos-new { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: color-mix(in srgb, var(--accent) 78%, var(--text)); }
.badge.pos-repl { background: color-mix(in srgb, var(--info) 13%, var(--surface)); color: var(--info); }
.ctr-opt-main .badge { margin-inline-start: 6px; font-size: 10.5px; }
.sp-job {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px 14px; align-items: start; margin-bottom: 10px; padding: 10px 12px;
  border: 1px dashed color-mix(in srgb, var(--primary) 30%, var(--border)); border-radius: var(--radius-md); background: color-mix(in srgb, var(--primary) 3%, var(--surface));
}
.sp-exempt { display: flex; flex-direction: column; gap: 8px; padding-top: 22px; }
.sp-job .sfe-quick button { font-variant-numeric: tabular-nums; }
.sa-job-alt { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; }
.sa-job-alt .sp-toggle { margin-bottom: 2px; }
.ae-vac-head .seg, #ps-kind { flex-shrink: 0; }
@media (max-width: 640px) {
  .sp-job, .sa-job-alt { grid-template-columns: minmax(0, 1fr); }
  .sp-exempt { padding-top: 0; }
}
.db-kpis.ps-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .db-kpis.ps-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .db-kpis.ps-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ps-table td.ps-kind { min-width: 118px; white-space: normal; }
.ps-kind small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.ps-kind small bdi { white-space: nowrap; }

.ct-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ct-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .ct-grid-3 { grid-template-columns: minmax(0, 1fr); } }
.ct-kv.wide { grid-column: 1 / -1; }
.ct-kv dd bdi { overflow-wrap: anywhere; }
.ct-note-bar {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--border)); background: color-mix(in srgb, var(--warn) 7%, var(--surface));
}
.ct-note-bar .ui-ico { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; color: var(--warn); }
.ct-note-bar b { display: block; font-size: var(--fs-sm); }
.ct-note-bar p { margin: 3px 0 0; font-size: var(--fs-sm); color: var(--text); line-height: 1.7; }
.badge.pos-avail { background: var(--success-soft); color: var(--success); }
.badge.pos-res { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); color: color-mix(in srgb, var(--warn) 75%, var(--text)); }
.badge.pos-cancel { background: var(--surface-3); color: var(--muted); text-decoration: line-through; }
.badge.pos-filled { background: var(--primary-tint); color: var(--primary); }
.badge.view-only { background: var(--primary-tint); color: var(--primary); }
.pm-label { display: block; margin-top: 4px; font-size: var(--fs-sm); font-weight: 700; }
.pm-states { margin-bottom: 4px; }
.pm-states .ae-kind { align-items: center; padding: 8px 10px; }
.pm-states.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lst-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .lst-wrap { grid-template-columns: minmax(0, 1fr); } }
.lst-nav { display: flex; flex-direction: column; gap: 14px; padding: 14px; position: sticky; top: calc(var(--nav-h) + 12px); }
.lst-nav-group { display: flex; flex-direction: column; gap: 3px; }
.lst-nav-title { margin-bottom: 3px; font-size: 11px; font-weight: 700; color: var(--faint); }
.lst-nav-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text); font: inherit; font-size: var(--fs-sm); text-align: start; cursor: pointer; transition: background-color .18s ease, color .18s ease;
}
.lst-nav-btn b { min-width: 26px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 11px; text-align: center; }
.lst-nav-btn:hover { background: var(--primary-tint); }
.lst-nav-btn.active { background: var(--primary); color: #fff; }
.lst-nav-btn.active b { background: rgba(255, 255, 255, .22); color: #fff; }
.lst-editor { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lst-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lst-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.lst-editor .report-table.lst-table { min-width: 0; }
.lst-table td { vertical-align: middle; }
.lst-table .cell-input { width: 100%; min-width: 0; }
.lst-table th.col-num, .lst-table td.col-num { width: 72px; }
.lst-table th.col-action, .lst-table td.col-action { width: 84px; }
.lst-table th.col-tag, .lst-table td.col-tag { width: 48px; }
.lst-add { display: flex; flex-wrap: wrap; gap: 8px; }
.lst-add input { flex: 1 1 180px; margin: 0; }
.lst-data { display: flex; flex-direction: column; gap: 4px; }
.lst-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lst-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px dashed var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; transition: border-color .18s ease, color .18s ease;
}
.lst-chip b { font-size: 11px; color: var(--muted); }
.lst-chip:hover { border-color: var(--primary); color: var(--primary); }
.lst-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.lst-dirty { margin-inline-end: auto; font-size: var(--fs-sm); font-weight: 700; color: var(--warn); }
.lst-head-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lst-nav-btn > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lst-nav-btn small { font-size: 10.5px; font-weight: 400; color: var(--faint); }
.lst-nav-btn.active small { color: rgba(255, 255, 255, .75); }
.lst-move { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.lst-move select { width: auto; min-width: 0; max-width: 100%; height: var(--control-h-sm); min-height: 0; margin: 0; padding-block: 0; }
.lst-table tr.is-picking td { background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.lst-table tr.is-picking .col-action { width: 190px; }
.lst-moves { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.lst-moves .lst-nav-title { width: 100%; margin: 0; }
.lst-mv { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; }
.lst-mv small { color: var(--muted); }
.lst-mv-undo { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--surface-3); color: var(--muted); font: inherit; font-size: 10px; cursor: pointer; }
.lst-mv-undo:hover { background: var(--danger-soft); color: var(--danger); }
select.dd-open { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.dd-pop {
  position: fixed; z-index: 150; display: flex; flex-direction: column; max-height: min(340px, 60vh); overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  box-shadow: 0 18px 40px -12px rgba(0, 31, 94, .28), 0 4px 10px -4px rgba(0, 31, 94, .14);
  animation: ddIn .16s cubic-bezier(.22, .68, .3, 1);
}
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dd-search { padding: 8px; border-bottom: 1px solid var(--border); }
.dd-search input { width: 100%; height: var(--control-h-sm); min-height: 0; margin: 0; }
.dd-list { overflow-y: auto; padding: 5px; }
.dd-group { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; color: var(--faint); }
.dd-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 34px; padding: 6px 10px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text); font: inherit; font-size: var(--fs-sm); text-align: start; cursor: pointer;
}
.dd-opt span { overflow-wrap: anywhere; }
.dd-opt i { font-style: normal; font-weight: 700; color: var(--primary); }
.dd-opt.is-active { background: var(--primary-tint); }
.dd-opt.is-on { font-weight: 700; color: var(--primary); }
.dd-opt:disabled { opacity: .45; cursor: default; }
.dd-empty { margin: 0; padding: 14px 10px; text-align: center; font-size: var(--fs-sm); color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .dd-pop { animation: none; } }
.ot-fx-table { min-width: 0 !important; }

.viz { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.viz-plot { position: relative; }
.viz-svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz-grid { stroke: var(--border); stroke-width: 1; }
.viz-ylab, .viz-xlab { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.viz-bar { transition: opacity .15s ease; }
.viz-line { fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.viz-line.is-dash { stroke-dasharray: 6 5; stroke-width: 2; }
.viz-pt { fill: var(--surface); stroke-width: 2.25; }
.viz-ref { stroke-width: 1.5; stroke-dasharray: 4 4; }
.viz-reflab { font-size: 11px; font-weight: 700; font-family: var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.viz-hit { fill: transparent; cursor: crosshair; }
.viz-hit.is-on { fill: color-mix(in srgb, var(--primary) 7%, transparent); }
.viz-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend i { width: 12px; height: 9px; border-radius: 3px; background: var(--c); }
.viz-legend i.is-line { height: 3px; border-radius: 2px; }
.viz-legend i.is-dash { height: 0; border-top: 2px dashed var(--c); background: none; border-radius: 0; }
.viz-tip {
  position: absolute; z-index: 5; min-width: 150px; padding: 8px 10px; border-radius: var(--radius-sm); pointer-events: none;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 24px -10px rgba(0, 31, 94, .3); font-size: 12px;
}
.viz-tip-head { display: block; margin-bottom: 4px; font-size: 12px; }
.viz-tip-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 6px; color: var(--muted); line-height: 1.6; }
.viz-tip-row i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.viz-tip-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.ctc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; gap: 16px; gap: 12px; }
@media (max-width: 1100px) { .ctc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ctc-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 14px; border-radius: var(--radius-lg); color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); transition: transform .2s cubic-bezier(.22, .68, .3, 1), box-shadow .2s ease, border-color .2s ease;
}
.ctc-card::before { content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 18px; width: 46px; height: 4px; border-radius: 0 0 4px 4px; background: var(--st); }
.ctc-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--st) 45%, var(--border)); box-shadow: var(--shadow-soft); }
.ctc-card:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.ctc-card.ct-expired { opacity: .82; }
.ctc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ctc-no { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ctc-no b { font-size: 16px; font-variant-numeric: tabular-nums; }
.ctc-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ctc-who b { font-size: var(--fs-md); }
.ctc-who small { overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.ctc-budget { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.ctc-budget-nums { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ctc-budget-nums span { font-size: 12px; color: var(--muted); }
.ctc-budget-nums b { font-size: 22px; line-height: 1.1; }
.ctc-budget-nums small, .ctc-burn { font-size: 12px; color: var(--muted); }
.ctc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ctc-stat { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 8px 9px; border-radius: var(--radius-sm); background: var(--surface-2); }
.ctc-stat span { font-size: 11px; color: var(--muted); }
.ctc-stat b { font-size: 15px; font-variant-numeric: tabular-nums; }
.ctc-stat small { overflow: hidden; font-size: 11px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.ctc-stat.is-risk b, .ctc-stat.is-risk small { color: var(--danger); }
.ctc-risk { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 12px; font-weight: 700; }
.ctc-risk .ui-ico { width: 15px; height: 15px; flex-shrink: 0; }
@media (max-width: 420px) { .ctc-grid { grid-template-columns: minmax(0, 1fr); } .ctc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sp-panel { margin-bottom: 14px; }
.sp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sp-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-2); }
.sp-kpi span { font-size: 12px; color: var(--muted); }
.sp-kpi b { font-size: 20px; line-height: 1.25; }
.sp-kpi small { font-size: 12px; color: var(--muted); }
.sp-kpi.is-main { background: linear-gradient(135deg, var(--se-deep, #001338), var(--primary-dark, #00369e)); color: #fff; }
.sp-kpi.is-main span, .sp-kpi.is-main small { color: rgba(235, 249, 255, .82); }
.sp-kpi.is-risk { background: var(--danger-soft); } .sp-kpi.is-risk b { color: var(--danger); }
.sp-kpi.is-ok { background: var(--success-soft); } .sp-kpi.is-ok b { color: var(--success); }
.sp-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 980px) { .sp-charts { grid-template-columns: minmax(0, 1fr); } }
.sp-chart { min-width: 0; }
.otd { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "cmp cmp type" "depts depts top"; gap: 14px; margin-bottom: 14px; }
.otd > .dash-panel { margin: 0; min-width: 0; }
.otd-cmp { grid-area: cmp; } .otd-type { grid-area: type; } .otd-depts { grid-area: depts; } .otd-top { grid-area: top; }
@media (max-width: 1100px) { .otd { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cmp" "type" "depts" "top"; } }
.otd .kpi-delta { font-size: 12px; font-weight: 700; }
.otd .kpi-delta.up { color: var(--danger); } .otd .kpi-delta.down { color: var(--success); }
.otd-totals { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.otd-totals b { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.otd-type .dash-panel-body { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.otd-types { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.otd-trow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name num pct" "sub sub sub"; gap: 0 10px; padding: 7px 10px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.otd-tname { grid-area: name; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.otd-tname i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.otd-trow b { grid-area: num; font-variant-numeric: tabular-nums; }
.otd-trow em { grid-area: pct; font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.otd-trow small { grid-area: sub; font-size: 11px; color: var(--muted); }
.otd-key { display: inline-flex; gap: 12px; font-size: 12px; color: var(--muted); }
.otd-key span { display: inline-flex; align-items: center; gap: 5px; }
.otd-key i { width: 12px; height: 8px; border-radius: 3px; }
.otd-key .cur i, .otd-bars .cur { background: var(--primary); }
.otd-key .prev i, .otd-bars .prev { background: color-mix(in srgb, var(--se-sky, #32c2ff) 70%, var(--surface)); }
.otd-pairs { display: flex; flex-direction: column; gap: 8px; }
.otd-pair { display: grid; grid-template-columns: minmax(0, 34%) minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.otd-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; }
.otd-name bdi { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.otd-bars { display: flex; flex-direction: column; gap: 2px; }
.otd-bars i { display: block; height: 8px; min-width: 2px; border-radius: 4px; transition: width .4s cubic-bezier(.22, .68, .3, 1); }
.otd-val { display: grid; grid-template-columns: auto auto; gap: 0 6px; align-items: baseline; min-width: 92px; font-variant-numeric: tabular-nums; }
.otd-val b { font-size: 13px; } .otd-val small { font-size: 11px; color: var(--muted); }
.otd-val em { grid-column: 1 / -1; font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.otd-val em.up { color: var(--danger); } .otd-val em.down { color: var(--success); }
.otd-tops { display: flex; flex-direction: column; gap: 4px; }
.otd-emp { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 32%) auto; align-items: center; gap: 8px; padding: 5px 6px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.otd-emp:hover { background: var(--primary-tint); }
.otd-rank { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); font-size: 11px; font-weight: 700; color: var(--muted); }
.otd-emp:first-child .otd-rank { background: var(--primary); color: #fff; }
.otd-ename { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; }
.otd-ename bdi { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.otd-ename small { overflow: hidden; font-size: 10.5px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.otd-ebar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.otd-ebar i { display: block; height: 100%; border-radius: 4px; background: var(--accent, var(--primary)); }
.otd-eval { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.otd-eval b { font-size: 13px; } .otd-eval small { font-size: 10.5px; color: var(--muted); }
.att-y-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
@media (max-width: 760px) { .att-y-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.att-y { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "status status rate" "days days top"; gap: 14px; }
.att-y > .dash-panel { margin: 0; min-width: 0; }
.att-y-status { grid-area: status; } .att-y-rate { grid-area: rate; } .att-y-days { grid-area: days; } .att-y-top { grid-area: top; }
@media (max-width: 1100px) { .att-y { grid-template-columns: minmax(0, 1fr); grid-template-areas: "status" "rate" "days" "top"; } }
.att-y-list { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; }
.att-y-emp { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.att-y-emp:hover { background: var(--primary-tint); }
.att-y-emp > span { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; }
.att-y-emp bdi { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.att-y-emp small { overflow: hidden; font-size: 10.5px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.att-y-emp b { font-variant-numeric: tabular-nums; }
.att-y-emp em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--danger); text-align: end; }
.att-view { flex-shrink: 0; }
@media (min-width: 1180px) {
  #at-body.att-month { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "hero days" "depts matrix"; gap: 14px; align-items: start; }
  #at-body.att-month.no-depts { grid-template-areas: "hero days" "matrix matrix"; }
  #at-body.att-month > * { margin: 0; min-width: 0; }
  #at-body.att-month .att-hero { grid-area: hero; grid-template-columns: minmax(0, 1fr); }
  #at-body.att-month .att-hero-main { padding: 16px 18px; }
  #at-body.att-month .att-hero-rate b { font-size: 36px; }
  #at-body.att-month .att-hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); }
  #at-body.att-month .att-hero-stats > div { padding: 10px 12px; border-bottom: 0; border-inline-end: 1px solid var(--border); }
  #at-body.att-month .att-hero-stats > div:last-child { border-inline-end: 0; }
  #at-body.att-month .att-hero-stats dd { font-size: 20px; }
  #at-body.att-month .att-days { grid-area: days; align-self: stretch; }
  #at-body.att-month .att-days-plot { grid-auto-rows: 170px; }
  #at-body.att-month .att-depts { grid-area: depts; max-height: 560px; overflow-y: auto; }
  #at-body.att-month .att-matrix-card { grid-area: matrix; }
  #at-body.att-month .att-drow { grid-template-columns: minmax(0, 1.7fr) 44px minmax(0, 1.2fr) 66px 12px; gap: 10px; padding: 8px 8px; }
  #at-body.att-month .att-dname { font-size: 12.5px; }
  #at-body.att-month .att-dname bdi { white-space: normal; overflow: visible; line-height: 1.35; }
}

.sfe-quick button.is-auto { border-style: dashed; color: var(--primary); font-weight: 700; }
.ot-fx-table th[scope="row"] { font-weight: 700; color: var(--primary); }
.ot-fx-table .cell-input { width: 84px; text-align: center; }
@media (max-width: 860px) {
  .lst-nav { position: static; gap: 10px; }
  .lst-nav-group { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
  .lst-nav-title { width: 100%; margin: 0; }
  .lst-nav-btn { width: auto; padding: 6px 10px; background: var(--surface-2); }
  .lst-nav-btn.active { background: var(--primary); }
}
.ps-table tr[data-pos-open] { cursor: pointer; }
.ps-table tr[data-pos-open]:hover td { background: var(--primary-tint); }
.ps-state-sel { height: var(--control-h-sm); min-width: 104px; padding-block: 0; font-weight: 700; }
.ps-state-sel[data-st="available"] { color: var(--success); }
.ps-state-sel[data-st="reserved"] { color: color-mix(in srgb, var(--warn) 75%, var(--text)); }
.ps-state-sel[data-st="cancelled"] { color: var(--muted); }
.pm-filled { margin: 2px 0 6px; }
.pm-form input.invalid, .pm-form select.invalid { border-color: var(--danger); }
.role-badge.role-hr_manager { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: color-mix(in srgb, var(--accent) 80%, var(--text)); }
.role-badge.role-hr_deputy { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: color-mix(in srgb, var(--accent) 80%, var(--text)); }

:is(.filter-bar, .ts-filters, .report-filters, .att-emp-tools, .att-toolbar, .sf-filters, .wkf-filters, .ctl-filters, .cd-emps-tools, .ach-top, .lst-head-tools, .results-tools, .rec-toolbar)
  :is(input:not([type="checkbox"]):not([type="radio"]):not([type="date"]), select) {
  height: var(--fc-h); min-height: 0; margin: 0; padding-block: 0; font-size: var(--fs-sm); border-radius: var(--fc-r); border-color: var(--border);
  background-color: var(--surface);
}
:is(.filter-bar, .ts-filters, .report-filters, .att-emp-tools, .att-toolbar, .wkf-filters, .ctl-filters, .ach-top) input[type="date"] {
  height: var(--fc-h); min-height: 0; margin: 0; padding: 0 8px; font-size: var(--fs-sm); border-radius: var(--fc-r); width: auto;
}
:is(.filter-bar, .ts-filters, .report-filters, .att-emp-tools, .wkf-filters, .ctl-filters, .ach-top) select { width: auto; min-width: 130px; max-width: 240px; }
:is(.filter-bar, .ts-filters, .report-filters, .att-emp-tools, .att-toolbar, .sf-filters, .wkf-filters, .ctl-filters, .cd-emps-tools, .ach-top) .btn { height: var(--fc-h); padding-inline: 12px; font-size: var(--fs-sm); border-radius: var(--fc-r); }
:is(.filter-bar, .ts-filters, .report-filters, .att-emp-tools, .att-toolbar, .sf-filters, .wkf-filters, .ctl-filters, .ach-top, .ps-filter) .seg { height: var(--fc-h); border-radius: var(--fc-r); padding: 2px; }
:is(.filter-bar, .ts-filters, .report-filters, .att-emp-tools, .att-toolbar, .sf-filters, .wkf-filters, .ctl-filters, .ach-top, .ps-filter) .seg button { padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
:is(.clearable, .ts-search-input) > input, input[type="search"]:not(.dd-search input):not(.finder-search input) {
  background-image: var(--search-ico); background-repeat: no-repeat; background-size: 15px; background-position: right 10px center; padding-inline-start: 32px !important;
}
html[dir="ltr"] :is(.clearable, .ts-search-input) > input, html[dir="ltr"] input[type="search"]:not(.dd-search input):not(.finder-search input) { background-position: left 10px center; }
.finder-search :is(input, input[type="search"]), .dd-search input { background-image: none; padding-inline-start: 4px !important; }
:is(.clearable, .ts-search-input) > input:focus, input[type="search"]:focus { background-color: var(--surface); }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.ctl-filters, .wkf-filters { padding: 8px 12px; gap: 8px 12px; margin: 12px 0 10px; }
.ctl-filters .ctl-search input, .ctl-search input { min-width: 220px; }
.wfc-type > b:first-child { min-width: 44px; text-align: start; }
.wfc-type small + b { font-variant-numeric: tabular-nums; font-size: 13px; }

.dd-pop.is-combo { max-height: 260px; }
.dd-pop[hidden] { display: none; }

.sg-flag { width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; color: var(--faint); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; opacity: .5; transition: opacity .15s, color .15s, background .15s; }
.sg-flag .ui-ico { width: 14px; height: 14px; }
.sg-table tr:hover .sg-flag, .sg-flag:focus-visible { opacity: 1; }
.sg-flag:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.sg-flag.is-on { opacity: 1; color: var(--danger); }
.sg-flag:disabled { cursor: default; }
.sg-table tbody tr.is-flagged > * { background-color: color-mix(in srgb, var(--danger) 9%, var(--surface)); }
.sg-table tbody tr.is-flagged > th.sg-rh { box-shadow: inset -3px 0 0 var(--danger); }
html[dir="ltr"] .sg-table tbody tr.is-flagged > th.sg-rh { box-shadow: inset 3px 0 0 var(--danger); }
.sg-table tbody tr.is-flagged:hover > * { background-color: color-mix(in srgb, var(--danger) 14%, var(--surface)); }
html[data-theme="dark"] .sg-table tbody tr.is-flagged > * { background-color: color-mix(in srgb, var(--danger) 18%, var(--surface)); }
.sf-flag-chip { display: inline-flex; align-items: center; gap: 6px; height: var(--fc-h); padding: 0 12px; border-radius: var(--fc-r); border: 1px solid var(--border); background: var(--surface);
  font-family: inherit; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; align-self: flex-end; transition: border-color .15s, color .15s, background .15s; }
.sf-flag-chip .ui-ico { width: 14px; height: 14px; color: var(--danger); }
.sf-flag-chip b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.sf-flag-chip:hover { border-color: var(--danger); color: var(--danger); }
.sf-flag-chip.active { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: var(--danger); color: var(--danger); font-weight: 700; }
.badge.flagged { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); display: inline-flex; align-items: center; gap: 4px; }
.badge.flagged .ui-ico { width: 12px; height: 12px; }
.sp-flag-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; font-size: var(--fs-sm);
  background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--border)); }
.sp-flag-note .ui-ico { color: var(--danger); width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.sp-flag-note small { color: var(--muted); }
.btn.is-flag-on { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn .ui-ico { width: 15px; height: 15px; }
.fl-current { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; font-size: var(--fs-sm); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); color: var(--text); }
.fl-current .ui-ico { color: var(--danger); width: 16px; height: 16px; }
.sf-tile-btn { font-family: inherit; text-align: start; cursor: pointer; border: 1px solid var(--border); transition: border-color .15s, transform .15s, box-shadow .15s; }
.sf-tile-btn:hover { border-color: var(--primary); box-shadow: var(--shadow-soft); }
.sf-tile-btn:active { transform: scale(.99); }
.sf-tile-more { font-size: 11px; font-weight: 700; color: var(--primary); margin-top: 2px; }
.cb-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.cb-head > div, .cb-check > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--hairline); }
.cb-head span, .cb-check span { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }
.cb-head b, .cb-check b { font-size: 20px; font-variant-numeric: tabular-nums; }
.cb-head small, .cb-check small { font-size: 11.5px; color: var(--muted); }
.cb-head > div:first-child { background: var(--se-hero); color: #fff; border-color: transparent; }
.cb-head > div:first-child span, .cb-head > div:first-child small { color: rgba(235, 249, 255, .85); }
.cb-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cb-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(0, 2fr) 110px 54px; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.cb-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cb-name i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.cb-name small { color: var(--muted); }
.cb-track { height: 8px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.cb-track i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.cb-row b { text-align: end; font-variant-numeric: tabular-nums; }
.cb-row em { font-style: normal; color: var(--muted); text-align: end; font-size: 12px; font-variant-numeric: tabular-nums; }
.cb-kinds, .cb-check { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.cb-kind { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--hairline); background: var(--surface-2); }
.cb-kind b { font-size: var(--fs-sm); }
.cb-kind span { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cb-kind small { color: var(--muted); font-size: 11.5px; }
@media (max-width: 640px) { .cb-head, .cb-kinds, .cb-check { grid-template-columns: 1fr; } .cb-row { grid-template-columns: 1fr 90px 46px; } .cb-track { display: none; } }
.sp-periods { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sp-periods li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: var(--fs-sm); border: 1px solid var(--hairline); }
.sp-periods li.is-current { background: color-mix(in srgb, var(--success) 9%, var(--surface)); border-color: color-mix(in srgb, var(--success) 30%, var(--border)); }
.sp-periods small { color: var(--muted); }
.sp-history summary .ui-ico { width: 15px; height: 15px; vertical-align: -3px; }
.xe-orig { margin-top: 10px; font-size: var(--fs-sm); }
.xe-orig summary { cursor: pointer; color: var(--muted); }
.xe-orig p { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.sf-ex-acts { display: inline-flex; gap: 4px; }
.back-note.is-back { color: var(--success); }

@media (max-width: 820px) { .sa-page .sfe-grid { grid-template-columns: minmax(0, 1fr); } .sa-head { position: static; } }

.stc-back { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.stc-back-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); cursor: pointer; background: var(--surface); }
.stc-back-opt input { margin-top: 4px; }
.stc-back-opt span { display: flex; flex-direction: column; gap: 2px; }
.stc-back-opt small { color: var(--muted); font-size: 11.5px; }
.stc-back-opt.is-on { border-color: var(--primary); background: var(--primary-tint); }
.tpl-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tpl-pick { margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); max-height: 320px; overflow-y: auto; }
.tpl-fixed { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.tpl-group { border: 0; margin: 0 0 8px; padding: 0; }
.tpl-group legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0; margin-bottom: 4px; }
.tpl-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 10px; }
.tpl-col { display: flex; align-items: center; gap: 6px; font-size: 12.5px; cursor: pointer; padding: 3px 4px; border-radius: 6px; }
.tpl-col:hover { background: var(--surface); }
.tpl-col input { margin: 0; }
.tpl-foot { position: sticky; bottom: -10px; display: flex; align-items: center; gap: 10px; padding: 8px 0 2px; background: var(--surface-2); border-top: 1px solid var(--hairline); font-size: 12.5px; }
.tpl-foot .btn { margin-inline-start: auto; }
.btn.is-disabled { opacity: .45; pointer-events: none; }
.ctc-head-tags { display: inline-flex; align-items: center; gap: 6px; }
.ct-ext-chip { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: var(--radius-pill); color: var(--accent, var(--primary)); background: color-mix(in srgb, var(--accent, var(--primary)) 12%, transparent); }
.cx-now { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 12px; }
.cx-now > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--hairline); }
.cx-now span { font-size: 11px; color: var(--muted); font-weight: 700; }
.cx-now b { font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.cx-after:empty { display: none; }
.cx-after { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px; font-size: var(--fs-sm); background: color-mix(in srgb, var(--success) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--success) 30%, var(--border)); margin-top: 12px; }
.cx-after small { color: var(--muted); }
.cx-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cx-list li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--hairline); font-size: var(--fs-sm); }
.cx-when { display: flex; flex-direction: column; }
.cx-when small { color: var(--muted); font-size: 11.5px; }
.cx-what { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.cx-what s { color: var(--muted); }
.cx-what small { flex-basis: 100%; color: var(--muted); }
.badge.pos-arch { background: var(--surface-3); color: var(--muted); }
.ps-pending { margin-bottom: 14px; border-radius: var(--radius-lg); border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--border)); background: color-mix(in srgb, var(--danger) 5%, var(--card-bg)); overflow: hidden; }
.ps-pending > header { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; }
.ps-pending > header .ui-ico { width: 20px; height: 20px; color: var(--danger); flex-shrink: 0; margin-top: 2px; }
.ps-pending > header div { display: flex; flex-direction: column; gap: 2px; }
.ps-pending > header small { color: var(--muted); font-size: 12px; }
.ps-pending-list { display: flex; flex-direction: column; border-top: 1px solid color-mix(in srgb, var(--danger) 18%, var(--border)); }
.ps-pend { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(150px, .9fr) minmax(0, 1.4fr) auto; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--hairline); font-size: var(--fs-sm); }
.ps-pend:first-child { border-top: 0; }
.ps-pend-id, .ps-pend-no { display: flex; flex-direction: column; min-width: 0; }
.ps-pend small { color: var(--muted); font-size: 11.5px; }
.ps-pend-no bdi { font-weight: 700; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); color: var(--muted); }
.ps-pend-job { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) { .ps-pend { grid-template-columns: 1fr auto; } .ps-pend-no, .ps-pend-job { display: none; } }
.db-kpi.is-alert { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.db-kpi.is-alert .db-kpi-value { color: var(--danger); }
@media (max-width: 1100px) { .db-kpis.ps-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pm-no-row { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; }
.pm-no-row input { margin: 0; flex: 1; }
.pm-kind { margin-bottom: 10px; }

.dc-preview { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: var(--fs-sm); }
.lst-mode-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; font-size: var(--fs-sm);
  background: color-mix(in srgb, var(--info, var(--primary)) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--info, var(--primary)) 28%, var(--border)); }
.lst-mode-note .ui-ico { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--info, var(--primary)); }

.ach-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 10px; border-radius: var(--radius-lg); background: var(--card-bg); border: 1px solid var(--hairline); box-shadow: var(--shadow-xs); }
.ach-search { flex: 1 1 240px; }
.ach-search input { width: 100%; }
.ach-range { display: inline-flex; align-items: center; gap: 4px; }
.ach-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 0 4px; font-size: var(--fs-md); color: var(--muted); }
.ach-summary b { color: var(--text); font-variant-numeric: tabular-nums; }
.ach-summary .btn { margin-inline-start: auto; }
.ach-feed { display: flex; flex-direction: column; gap: 16px; }
.ach-day { position: sticky; top: calc(var(--nav-h, 64px) + 4px); z-index: 2; display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: var(--fs-sm); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow-xs); }
.ach-day small { color: var(--muted); font-variant-numeric: tabular-nums; }
.ach-entries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; position: relative; }
.ach-entries::before { content: ''; position: absolute; top: 6px; bottom: 6px; inset-inline-start: 78px; width: 2px; background: var(--hairline); border-radius: 2px; }
.ach-entry { display: grid; grid-template-columns: 54px 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.ach-time { padding-top: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: end; }
.ach-dot { position: relative; z-index: 1; width: 30px; height: 30px; margin-top: 4px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff; background: var(--c); box-shadow: 0 0 0 3px var(--page-bg, var(--surface)); }
.ach-card { min-width: 0; padding: 9px 14px; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--hairline); transition: border-color .15s; }
.ach-card:hover { border-color: color-mix(in srgb, var(--c) 40%, var(--border)); }
.ach-line { margin: 0; font-size: var(--fs-sm); line-height: 1.7; }
.ach-who { color: var(--text); }
.ach-role { font-size: 11px; color: var(--muted); padding: 0 6px; border-radius: var(--radius-pill); background: var(--surface-2); }
.ach-what { color: var(--text); }
.ach-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.ach-cat { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--text); }
.ach-cat::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.ach-only { font-size: 12px; }
.nav-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-inline-start: 2px; border-radius: var(--radius-pill);
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--surface); }
[data-ectab] .eu-pill { background: var(--danger); color: #fff; margin-inline-start: 6px; }
.eu-mine { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; background: var(--surface-2); padding: 4px 10px; border-radius: var(--radius-pill); white-space: nowrap; }
.eu-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.eu-title { margin: 0; font-size: var(--fs-lg); }
.eu-search { flex: 1 1 260px; max-width: 420px; margin-inline-start: auto; }
.eu-search input { width: 100%; }
.eu-sum { margin: 0 0 10px; color: var(--muted); font-size: var(--fs-sm); }
.eu-sum b { color: var(--text); font-variant-numeric: tabular-nums; }
.eu-list { display: flex; flex-direction: column; gap: 10px; }
.eu-card { padding: 12px 14px; border-radius: var(--radius-lg); background: var(--card-bg); border: 1px solid var(--hairline); border-inline-start: 4px solid var(--primary);
  transition: opacity .25s cubic-bezier(.32, .72, 0, 1), transform .25s cubic-bezier(.32, .72, 0, 1); }
.eu-card.has-pay { border-inline-start-color: var(--warn, #f59e0b); }
.eu-card.is-done { opacity: 0; transform: translateY(-6px); }
.eu-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.eu-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.eu-name { font-size: var(--fs-md); }
.eu-act { font-size: var(--fs-xs); font-weight: 700; color: var(--primary); padding: 2px 10px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.eu-tag { font-size: 11px; padding: 2px 8px; border-radius: var(--radius-pill); border: 1px solid var(--hairline); color: var(--muted); background: var(--surface-2); }
.eu-tag.eu-t-pay { color: color-mix(in srgb, var(--warn, #f59e0b) 75%, var(--text)); border-color: color-mix(in srgb, var(--warn, #f59e0b) 45%, var(--border)); background: color-mix(in srgb, var(--warn, #f59e0b) 10%, var(--surface)); font-weight: 700; }
.eu-tag.eu-t-name { color: color-mix(in srgb, var(--info, #0091d4) 80%, var(--text)); border-color: color-mix(in srgb, var(--info, #0091d4) 40%, var(--border)); }
.eu-meta { grid-column: 1; margin: 0; font-size: 12px; color: var(--muted); }
.eu-dot { margin: 0 4px; color: var(--faint); }
.eu-ok { grid-column: 2; grid-row: 1 / span 2; }
.eu-table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: var(--fs-sm); table-layout: fixed; }
.card .eu-table { min-width: 0; table-layout: fixed; }
.eu-table th { position: static; }
.eu-table th, .eu-table td { padding: 6px 10px; border-top: 1px solid var(--hairline); text-align: start; vertical-align: top; overflow-wrap: anywhere; }
.eu-table thead th { border-top: 0; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); }
.eu-table thead th:first-child { border-start-start-radius: 8px; border-end-start-radius: 8px; }
.eu-table thead th:last-child { border-start-end-radius: 8px; border-end-end-radius: 8px; }
.eu-table tbody th { width: 30%; font-weight: 700; color: var(--text); }
.eu-from { color: color-mix(in srgb, var(--danger) 70%, var(--text)); }
.eu-from bdi { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.eu-to { color: color-mix(in srgb, var(--success) 70%, var(--text)); font-weight: 700; }
.eu-table tr.is-pay th { color: color-mix(in srgb, var(--warn, #f59e0b) 75%, var(--text)); }
@media (max-width: 640px) { .eu-head { grid-template-columns: minmax(0, 1fr); } .eu-ok { grid-column: 1; grid-row: auto; justify-self: start; } .eu-table tbody th { width: 38%; } }
.ach-chs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ach-ch { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; max-width: 100%; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--hairline); overflow-wrap: anywhere; }
.ach-ch em { font-style: normal; color: var(--muted); font-weight: 700; }
.ach-ch s { color: color-mix(in srgb, var(--danger) 70%, var(--text)); text-decoration-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.ach-ch i { font-style: normal; color: var(--faint); }
.ach-ch b { color: color-mix(in srgb, var(--success) 70%, var(--text)); }
.ach-more { font-size: 12px; align-self: center; }
.ach-raw { margin-top: 6px; font-size: 12px; }
.ach-raw summary { cursor: pointer; color: var(--muted); }
@media (max-width: 640px) { .ach-entry { grid-template-columns: 30px minmax(0, 1fr); } .ach-time { display: none; } .ach-entries::before { inset-inline-start: 14px; } }

.report-table th, .report-table td { padding: 7px 10px; }
.sf-tile-value.is-exact { font-size: 19px; letter-spacing: -.2px; }
.profile-head .avatar { width: 48px; height: 48px; font-size: 20px; }

.spf { display: flex; flex-direction: column; gap: 10px; }
.spf-head { position: sticky; top: calc(var(--nav-h, 62px) + 6px); z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 9px 14px;
  border-radius: var(--radius-lg); border: 1px solid var(--border); background: color-mix(in srgb, var(--card-bg) 94%, transparent); box-shadow: var(--shadow-soft); backdrop-filter: blur(10px); }
.spf-back { flex-shrink: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--primary); text-decoration: none; white-space: nowrap; }
.spf-back:hover { text-decoration: underline; }
.spf-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; flex: 1 1 260px; min-width: 0; }
.spf-title h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.spf-title .sp-av { width: 34px; height: 34px; font-size: 15px; border-radius: 10px; }
.spf-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.spf-acts .nav-ico { width: 15px; height: 15px; stroke: currentColor; }
.spf-acts .sp-leave { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.spf-acts .sp-leave:hover { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.spf-acts .is-flag-on { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.spf-info { display: flex; flex-wrap: wrap; row-gap: 6px; padding: 8px 2px; border-radius: var(--radius-md); background: var(--card-bg); border: 1px solid var(--border); }
.spf-i { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 0 14px; border-inline-start: 1px solid var(--hairline); }
.spf-i:first-child { border-inline-start: 0; }
.spf-i small { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.spf-i b { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.spf-exit { margin: 0; }
.sp-money.spf-money { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0; }
.sp-form.spf-grid { display: block; columns: 3 330px; column-gap: 10px; }
.sp-form.spf-grid > .sfe-section { display: inline-block; width: 100%; margin: 0 0 10px; break-inside: avoid; vertical-align: top; }
.sp-form.spf-grid > .sfe-section[hidden] { display: none; }
.spf-grid .sfe-field input, .spf-grid .sfe-field select { height: calc(var(--control-h-sm) + 2px); min-height: 0; font-size: var(--fs-sm); }
.spf-grid .sfe-field textarea { min-height: 52px; height: 52px; font-size: var(--fs-sm); }
.spf-grid .sp-toggles { margin-bottom: 8px; }
.spf-grid .sfe-section { padding: 8px 12px 10px; }
.spf-grid .sfe-grid { gap: 6px 10px; }
.spf-grid .sfe-field label { margin-bottom: 2px; }
.spf-grid .sp-trans-box.is-off, .spf-grid .sp-car-box.is-off { display: none; }
.spf-grid .sfe-quick { margin-top: 3px; }
.spf-money .sp-stat { padding: 7px 11px; }
.spf-money .sp-stat b { font-size: var(--fs-md); }
.spf-money .sp-stat small { font-size: 10px; }
.spf-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px; }
.spf-more:empty { display: none; }
.spf-more .sp-history { margin: 0; }
.spf-savebar { position: sticky; bottom: 10px; z-index: 6; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 12px;
  border-radius: var(--radius-lg); border: 1px solid var(--primary); background: color-mix(in srgb, var(--card-bg) 94%, transparent); box-shadow: 0 12px 28px -16px rgba(0, 31, 94, .55); backdrop-filter: blur(10px); }
.spf-savebar[hidden] { display: none; }
.spf-savebar > span:first-child { margin-inline-end: auto; font-size: var(--fs-sm); font-weight: 700; color: var(--primary); }

.sa-page .spf-head { gap: 8px 16px; }
.ae-kinds.sa-kinds { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.sa-kinds .ae-kind { flex-direction: row; align-items: center; gap: 6px; height: var(--control-h-sm); padding: 0 12px; border-radius: var(--radius-pill); }
.sa-kinds .ae-kind b { font-size: var(--fs-sm); }
.sa-kinds .ae-kind small { font-size: 11px; font-weight: 400; }
.sa-join { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; height: var(--control-h-sm); padding: 0 4px 0 12px; border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border)); border-radius: var(--radius-pill); background: var(--surface); }
[dir="rtl"] .sa-join { padding: 0 12px 0 4px; }
.sa-join > span { font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; color: var(--text); }
.sa-join input { width: auto; height: calc(var(--control-h-sm) - 8px); min-height: 0; margin: 0; padding: 0 8px; border: 0; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); font-size: var(--fs-sm); box-shadow: none; }
.sa-join input:focus { outline: none; box-shadow: var(--ring); }
.sa-join:has(input.invalid) { border-color: var(--danger); }
.sp-money.sa-money { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.sa-vac-sec .ae-vac { margin: 0; gap: 6px; }
.sa-page .ae-vac-list { max-height: 196px; overflow-y: auto; padding: 4px; }
.sa-page .ae-vac-list .ctr-group { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.sa-page .ctr-opt { padding: 6px 10px; gap: 1px; }
.sa-page .ctr-opt-main b { font-size: var(--fs-sm); }
.sa-page .ctr-opt-sub { font-size: var(--fs-xs); }
.sa-page .sa-job-alt { grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.spf-savebar.sa-savebar { border-color: var(--border); }
.sa-savebar .req-note { margin-inline-end: auto; font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }

.sg-na { font-size: 11px; font-weight: 700; color: var(--faint); letter-spacing: .3px; }
.xn { display: flex; flex-direction: column; gap: 2px; }
.xn-line { display: block; line-height: 1.5; unicode-bidi: plaintext; text-align: start; }
.xn-line + .xn-line { padding-top: 2px; border-top: 1px dashed var(--hairline); }
.sf-note .xn { max-height: 4.6em; overflow: hidden; }
.xr-pay h4 { margin: 0 0 8px; }
.xr-pay-main { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 8px 12px; border-radius: var(--radius-sm); color: #fff; background: var(--se-hero); }
.xr-pay-main span { font-size: 11.5px; color: rgba(235, 249, 255, .85); }
.xr-pay-main b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.xr-pay-main small { font-size: 11px; font-weight: 400; color: rgba(235, 249, 255, .85); }
.xe-pay { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.dbi { display: flex; flex-wrap: wrap; align-items: center; row-gap: 6px; margin: -2px 0 12px; padding: 8px 4px; border-radius: var(--radius-md); background: var(--card-bg); border: 1px solid var(--border); }
.dbi-i { display: flex; flex-direction: column; gap: 1px; padding: 0 16px; border-inline-start: 1px solid var(--hairline); }
.dbi-i:first-child { border-inline-start: 0; }
.dbi-i small { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.dbi-i b { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.dbi-edit { margin-inline-start: auto; margin-inline-end: 8px; }

.meta-grid > .meta-cat { grid-column: span 3; }
.meta-cat .meta-v { display: block; }
.seg.cat-seg { display: flex; flex-wrap: wrap; width: 100%; margin-top: 2px; }
.cat-seg button { flex: 1 1 auto; font-size: 12px; height: 28px; padding: 0 10px; white-space: nowrap; }
.cat-seg button:disabled { opacity: .45; cursor: not-allowed; }

button.wfc-row { width: 100%; margin: 0; padding: 2px 4px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; transition: background .15s; }
button.wfc-row:hover { background: color-mix(in srgb, var(--primary) 7%, transparent); }
button.wfc-row:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

.ps-table th:first-child, .ps-table td:first-child { width: 200px; padding-inline-end: 28px; white-space: nowrap; }
.ps-table tr.is-click { cursor: pointer; }
.ps-table tr.is-click:hover td { background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.ps-table tr.is-click:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.inv-import { width: 100%; justify-content: center; margin-bottom: 8px; }

.cx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; align-items: start; }
.cx-f { display: flex; flex-direction: column; min-width: 0; }
.cx-f label { margin: 0 0 4px; white-space: nowrap; }
.cx-f input { margin: 0; width: 100%; }
.cx-money { position: relative; display: block; }
.cx-money input { padding-inline-end: 44px; }
.cx-money i { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11.5px; color: var(--muted); pointer-events: none; }
.cx-quick { display: flex; gap: 4px; margin-top: 6px; }
.cx-quick button { flex: 1; height: 26px; padding: 0 6px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 11.5px; cursor: pointer; }
.cx-quick button:hover { border-color: var(--primary); color: var(--primary); }
.cx-quick button.active { border-color: var(--primary); background: var(--primary-tint); color: var(--primary); font-weight: 700; }

@media (max-width: 1100px) { .sp-form.spf-grid { columns: 2 300px; } .xe-pay { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .sp-form.spf-grid { columns: 1; }
  .spf-head { position: static; }
  .spf-i { padding: 0 10px; }
  .cx-grid { grid-template-columns: 1fr; }
  .meta-grid > .meta-cat { grid-column: 1 / -1; }
  .ps-table th:first-child, .ps-table td:first-child { width: auto; padding-inline-end: 12px; }
}
.sf-exit-table td:nth-child(5) { white-space: nowrap; }

.db-move { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.db-move-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--hairline); }
.db-move-stat span { font-size: 11px; font-weight: 700; color: var(--muted); }
.db-move-stat b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.db-move-stat.is-in b { color: var(--success); }
.db-move-stat.is-out b { color: var(--danger); }
.stc-why { margin-top: 10px; }
.stc-why label { display: block; margin-bottom: 4px; font-weight: 700; }
.stc-why textarea { width: 100%; min-height: 78px; margin: 0; resize: vertical; }
.stc-why textarea.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.stc-why-n { display: block; margin-top: 2px; font-size: 11px; text-align: end; font-variant-numeric: tabular-nums; }
.edit-exit-why { margin-top: 8px; }
.edit-exit-why textarea { width: 100%; min-height: 70px; }
.edit-exit-why[hidden] { display: none; }
.sf-ex-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sf-ex-tools select { width: auto; min-width: 180px; height: var(--control-h-sm); margin: 0; font-size: var(--fs-sm); }
.sf-ex-tools .btn b { margin-inline-start: 4px; }
.ex-div { display: block; font-size: 11px; color: var(--faint); }
.xm-hint { margin: 0 0 10px; font-size: var(--fs-sm); }
.xm-list { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.xm-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 260px) auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--hairline); }
.xm-row select { margin: 0; height: var(--control-h-sm); }
.xm-row.is-done { grid-template-columns: minmax(0, 1fr) auto; background: color-mix(in srgb, var(--success) 8%, var(--surface)); }
.xm-div { display: flex; flex-direction: column; min-width: 0; }
.xm-div small { font-size: 11px; color: var(--muted); }
.xm-ok { color: var(--success); font-weight: 700; font-size: var(--fs-sm); }
@media (max-width: 720px) { .db-move { grid-template-columns: 1fr; } .xm-row { grid-template-columns: 1fr; } }

.emp-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; margin-top: 8px; }
.emp-filters .fx { min-width: 150px; flex: 0 1 auto; }
.emp-filters select { width: auto; min-width: 150px; max-width: 240px; height: var(--fc-h); margin: 0; font-size: var(--fs-sm); }
.emp-filters select:disabled { opacity: .5; }
.emp-filters .btn.small { height: var(--fc-h); }
.daybar-st { margin-inline-start: auto; min-width: 180px; }
.daybar-st select { height: var(--fc-h); margin: 0; font-size: var(--fs-sm); min-width: 180px; }
.et-badge { font-weight: 700; }
.et-badge.et-perm { color: var(--kind-permanent, #2a3fc4); background: color-mix(in srgb, var(--kind-permanent, #2a3fc4) 12%, var(--surface)); }
.et-badge.et-contract { color: var(--kind-pmss, #00a37a); background: color-mix(in srgb, var(--kind-pmss, #00a37a) 12%, var(--surface)); }
.dp-move { display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); margin: 0 16px 10px; padding: 7px 10px; border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  background: var(--surface-2); color: inherit; font: inherit; font-size: var(--fs-sm); text-align: start; cursor: pointer; transition: border-color .15s, background .15s; }
.dp-move:hover { border-color: var(--primary); background: var(--primary-tint); }
.dp-move-label { flex: 1 1 auto; min-width: 0; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.dp-move-in b { color: var(--success); }
.dp-move-out b { color: var(--danger); }
.dp-move b { font-variant-numeric: tabular-nums; }
.dp-move-go { color: var(--primary); }
button.db-move-stat { font: inherit; color: inherit; text-align: start; cursor: pointer; transition: border-color .15s, background .15s; }
button.db-move-stat:hover { border-color: var(--primary); background: var(--primary-tint); }
.mv-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-bottom: 10px; }
.mv-tools .seg b { margin-inline-start: 4px; }
.mv-tools select { height: var(--fc-h); margin: 0; min-width: 140px; }
.mv-sum { font-size: var(--fs-sm); color: var(--muted); }
.mv-sum b { color: var(--text); }
.mv-table { max-height: 460px; overflow-y: auto; }
.mv-sub { display: block; font-size: 11px; }
.mv-note { max-width: 320px; font-size: 12px; color: var(--muted); }
.wkf-col-btn { border: 0; background: none; padding: 2px 0; font: inherit; color: inherit; cursor: pointer; border-radius: 8px; transition: background .15s; }
.wkf-col-btn:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.wkf-col-btn.active { background: var(--primary-tint); }
.wkf-col-btn.active .wkf-col-label { color: var(--primary); font-weight: 700; }
.wkf-bento > .wkf-p-people { overflow: visible; }
.wkf-bento .wkf-p-people .dash-panel-body { overflow: visible; }
.wkf-people-hint { margin: 6px 0; }
.wkf-people-table td, .wkf-people-table th { white-space: nowrap; }
.wkf-people-table td:nth-child(2) { white-space: normal; }
.wkf-p-titles .dash-panel-head { flex-wrap: nowrap; }
.wkf-tsearch { margin-inline-start: auto; flex: 0 1 180px; }
.wkf-tsearch input { height: 28px; min-height: 0; margin: 0; padding-block: 0; font-size: 12px; }
.wkf-tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; align-content: start; }
.wkf-trow { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; padding: 4px 8px; border: 1px solid var(--hairline); border-radius: 7px;
  background: linear-gradient(var(--to-end, 90deg), color-mix(in srgb, var(--primary) 12%, transparent) var(--w), transparent var(--w)), var(--surface); color: inherit; font: inherit; font-size: 11.5px; line-height: 1.3; text-align: start; cursor: pointer; transition: border-color .15s; }
.wkf-trow[hidden] { display: none; }
.wkf-trow span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wkf-trow b { flex-shrink: 0; font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--primary); }
.wkf-trow:hover { border-color: var(--primary); }
.wkf-trow.active { border-color: var(--primary); background: var(--primary-tint); font-weight: 700; }
.ot-src { display: inline-flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.ot-src small { color: var(--muted); font-size: 11px; }
.xr-inv h4 { margin: 0 0 8px; }
.xr-inv-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.xr-inv-top > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); min-width: 0; }
.xr-inv-top span { font-size: 11px; color: var(--muted); }
.xr-inv-top b { font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.xr-inv-top small { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xr-inv-note { margin: 0 0 8px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--success-soft); color: var(--success); font-size: var(--fs-sm); font-weight: 700; }
.report-table.xr-inv-table { min-width: 640px; font-size: 12px; }
.xr-inv-ot { margin-top: 8px; font-size: var(--fs-sm); }
.xr-inv-ot summary { cursor: pointer; font-weight: 700; }
.xr-inv-ot ul { margin: 6px 0 0; padding-inline-start: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .xr-inv-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1680px) {
  :root { --fs-xs: 12.5px; --fs-sm: 14px; --fs-md: 15px; --fs-lg: 16.5px; --fs-xl: 19.5px; --control-h: 42px; --control-h-sm: 35px; }
  .content { max-width: 1640px; }
  .btn { padding: 0 20px; }
  .btn.small { padding: 0 16px; }
}
@media (min-width: 2300px) {
  :root { --fs-xs: 13.5px; --fs-sm: 15px; --fs-md: 16px; --fs-lg: 18px; --fs-xl: 21px; --control-h: 46px; --control-h-sm: 38px; }
  .content { max-width: 2000px; }
  .btn { padding: 0 22px; }
  .btn.small { padding: 0 18px; }
}

.bk-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.bk-top .num { font-size: 19px; }
.bk-pin { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.bk-pin .btn { margin-top: 4px; }
.bk-pin.is-set .num { color: var(--success); }
.bk-upload { cursor: pointer; }
.bk-upload.is-busy { opacity: .6; pointer-events: none; }
.badge.bk-up { background: color-mix(in srgb, var(--purple) 12%, var(--surface)); color: var(--purple); }
.bk-file { font-family: monospace; font-size: 12px; }
.badge.bk-lock { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); }
.bk-empty-row td { background: color-mix(in srgb, var(--danger) 4%, var(--surface)); }
.bk-form { display: grid; gap: 6px; }
.bk-form input { width: 100%; margin: 0 0 6px; }
.bk-warn { margin: 0 0 6px; font-weight: 700; color: var(--danger); }
.bk-note { margin: 0 0 12px; font-size: var(--fs-sm); }
@media (max-width: 820px) { .bk-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cc-year { width: auto; min-width: 110px; margin: 0; height: var(--control-h); }
.report-filters .cc-side { flex: none; }
.cc-table { min-width: 760px; }
.cc-table .col-name { min-width: 240px; }
.cc-row td { vertical-align: middle; }
.cc-row:hover td { background: color-mix(in srgb, var(--primary) 4%, var(--card-bg)); }
.cc-row.is-open td { background: color-mix(in srgb, var(--primary) 7%, var(--card-bg)); border-bottom-color: transparent; }
.cc-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.cc-caret { display: inline-block; width: 7px; height: 7px; margin-inline-end: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .25s cubic-bezier(.32, .72, 0, 1); vertical-align: 2px; }
[dir="rtl"] .cc-caret { transform: rotate(135deg); }
.cc-row.is-open .cc-caret { transform: rotate(45deg); border-color: var(--primary); }
.cc-detail > td { padding: 4px 10px 16px !important; background: color-mix(in srgb, var(--primary) 3%, var(--surface-2)); }
.cc-emps { width: 100%; min-width: 720px; margin: 0; background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-xs); }
.cc-emps th, .cc-emps td { font-size: var(--fs-sm); }
.cc-table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1.5px solid var(--border); font-variant-numeric: tabular-nums; }
.cc-table .col-num, .cc-emps .col-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-print-proj { margin: 0 0 14px; }
.cc-print-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 2px; border-bottom: 1.5px solid #001f5e; font-size: 12.5px; break-after: avoid; }
.cc-print-sum { margin-inline-start: auto; color: #4a5568; }
.cc-print-sum b { color: #001f5e; }
@media (max-width: 720px) { .cc-year { min-width: 0; } }
.cc-proj { display: flex; align-items: flex-start; gap: 10px; }
.cc-proj .cc-caret { flex: none; margin: 8px 0 0; }
.cc-unpaid { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--danger); white-space: nowrap; }
.cc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cc-rs small { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
.cc-note { display: block; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.report-actions .cc-year { height: var(--control-h-sm); }
@media (max-width: 720px) { .cc-stats { grid-template-columns: minmax(0, 1fr); } }
.cc-emps .col-name { min-width: 200px; }
.cc-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; font-size: var(--fs-xs); color: var(--muted); }
.cc-emps .col-dates { white-space: nowrap; }
.report-table.cc-emps .col-num.cc-share { width: 150px; min-width: 150px; }
.cc-emps .cc-share .cc-note { white-space: normal; }
.cc-emps td.col-num { vertical-align: middle; }
@media (min-width: 1100px) { .cc-card .table-scroll { overflow-x: visible; } }
.cc-table th, .cc-emps th, .cc-table th.col-num, .cc-emps th.col-num { white-space: normal; line-height: 1.35; }
.btn.is-busy { opacity: .6; pointer-events: none; cursor: progress; }
.cc-range { align-items: center; }
.cc-date { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.cc-date input { width: auto; min-width: 150px; margin: 0; height: var(--control-h); }
.cc-warn { font-size: var(--fs-xs); font-weight: 600; color: var(--c-closing); }
.cc-dhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 10px 4px; font-size: var(--fs-sm); color: var(--muted); }
.cc-dhead b { color: var(--text); font-variant-numeric: tabular-nums; }
.cc-dhead-actions { display: inline-flex; gap: 8px; margin-inline-start: auto; }
.cc-h4 { margin: 12px 0 6px; font-size: var(--fs-sm); color: var(--muted); }


html.perm-no-export :is([data-print], [data-export], [data-cc-pprint], [data-cc-pxlsx], a[href*="/export"], a[href*="-export"], a[href*="/print"], [id$="-export"], [id$="-print"], [id*="-print-"], [id$="-xlsx"]) { display: none !important; }
.empty-account { max-width: 560px; margin: 40px auto; text-align: center; padding: 32px 24px; }
.role-badge.role-finance { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); color: color-mix(in srgb, var(--warn) 70%, var(--text)); }


.pm-card { margin-bottom: 16px; }
.pm-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin-bottom: 10px; }
.pm-head h2 { margin: 0 0 4px; }
.pm-head p { margin: 0; max-width: 70ch; }
.pm-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; }
.pm-dirty { font-size: var(--fs-xs); font-weight: 700; color: var(--warn); }
.pm-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-xs); color: var(--muted); margin-bottom: 8px; }
.pm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); display: inline-block; }
.pm-lock { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; vertical-align: -2px; margin-inline-end: 6px; color: var(--muted); }
.pm-scroll { max-height: 70vh; }
.pm-table { min-width: 980px; table-layout: auto; }
.pm-table th.pm-role, .pm-table td.pm-cell { width: 108px; }
.pm-table thead th { position: sticky; top: 0; z-index: 2; background: var(--card-bg); }
.pm-table .pm-name { text-align: start; min-width: 300px; font-weight: 500; }
.pm-table .pm-name small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.pm-table th.pm-role { text-align: center; white-space: normal; vertical-align: bottom; }
.pm-table th.pm-role .role-badge { white-space: normal; line-height: 1.3; display: inline-block; max-width: 86px; }
.pm-table th.pm-role small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 4px; font-variant-numeric: tabular-nums; }
.pm-table td.pm-cell { text-align: center; position: relative; }
.pm-table td.pm-cell.is-changed::after { content: ''; position: absolute; top: 8px; inset-inline-end: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.pm-table tr.pm-group th { background: var(--surface-2); text-align: start; font-size: var(--fs-sm); font-weight: 700; color: var(--text); padding-top: 10px; padding-bottom: 10px; position: sticky; inset-inline-start: 0; }
.pm-table tr.pm-fixed th { color: var(--muted); }
.pm-na { color: var(--muted); }
.pm-chip { display: inline-block; margin: 2px; padding: 1px 8px; border-radius: var(--radius-pill); font-size: 11.5px; white-space: nowrap; }
.pm-chip.is-on { background: var(--accent-soft); color: var(--success); }
.pm-chip.is-off { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.pm-users tr.is-off td { opacity: .55; }
.pm-ufs { border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 12px 10px; margin: 0 0 12px; }
.pm-ufs legend { font-weight: 700; padding: 0 6px; }
.pm-urow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 7px 0; border-bottom: 1px solid var(--hairline); }
.pm-urow:last-child { border-bottom: 0; }
.pm-urow .pm-ulabel small { display: block; font-size: 11px; color: var(--muted); }
.pm-urow.is-on .pm-ulabel { font-weight: 600; }
.pm-tri { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-pill); overflow: hidden; }
.pm-tri-opt { display: inline-flex; cursor: pointer; }
.pm-tri-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pm-tri-opt span { padding: 4px 12px; font-size: var(--fs-xs); transition: background .15s, color .15s; }
.pm-tri-opt input:checked + span { background: var(--primary); color: #fff; font-weight: 700; }
.pm-tri-opt input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }
.pm-spacer { flex: 1; }


.sf-expired-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); background: color-mix(in srgb, var(--danger) 8%, var(--card-bg)); color: var(--text); }
.sf-expired-bar > svg { width: 22px; height: 22px; color: var(--danger); flex-shrink: 0; }
.sf-expired-bar > div { flex: 1 1 280px; }
.sf-expired-bar b { display: block; color: var(--danger); }
.sf-expired-bar small { color: var(--muted); }
.sf-expired-bar.is-on { border-style: dashed; }
.sf-expired-act { display: inline-flex; flex-wrap: wrap; gap: 6px; }
tr.is-expired-contract > td, tr.is-expired-contract > th { background: color-mix(in srgb, var(--danger) 9%, var(--card-bg)) !important; }
tr.is-expired-contract > th.sg-rh { box-shadow: inset -3px 0 0 var(--danger); }
html[dir="ltr"] tr.is-expired-contract > th.sg-rh { box-shadow: inset 3px 0 0 var(--danger); }
.sg-exp-tag { display: inline-block; margin-inline-start: 4px; padding: 0 6px; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 700; background: var(--danger); color: #fff; vertical-align: 1px; }
.sfe-quick button.is-auto.on { background: var(--primary); color: #fff; border-color: var(--primary); }


.pr-top { margin-bottom: 14px; }
.pr-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin-bottom: 12px; }
.pr-filter input[type="search"] { flex: 0 1 300px; }
.pr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding: 2px; }
.pr-tab { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 8px 12px; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: start; transition: border-color .15s, background .15s; }
.pr-tab-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pr-tab small { color: var(--muted); font-size: 11.5px; }
.pr-tab:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.pr-tab.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); box-shadow: inset 0 0 0 1px var(--primary); }
.pr-ok { color: var(--success); font-weight: 700; }
.pr-none { color: var(--warn); font-weight: 700; }
.pr-edit { max-width: 1100px; margin-inline: auto; }
.pr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pr-head h2 { margin: 0; font-size: 20px; }
.pr-head .pm-dirty { margin-inline-start: auto; }
.pr-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0 4px; }
@media (max-width: 860px) { .pr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pr-stats > div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; text-align: center; }
.pr-stats b { font-size: 19px; font-variant-numeric: tabular-nums; }
.pr-stats span { font-size: 11.5px; color: var(--muted); }
.pr-stats .is-warn b { color: var(--warn); }
.pr-h { margin: 22px 0 10px; font-size: 15px; }
.pr-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pr-car-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--card-bg); }
.pr-car-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pr-car-title span { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.pr-car-in { display: flex; align-items: center; gap: 8px; }
.pr-car-in input { flex: 1; min-width: 0; height: 40px; font-size: 16px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.pr-car-in small { color: var(--muted); white-space: nowrap; }
.pr-sug { align-self: stretch; border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--border)); background: color-mix(in srgb, var(--primary) 5%, transparent); color: var(--primary); border-radius: var(--radius-sm); padding: 4px 8px; font: inherit; font-size: 12px; cursor: pointer; }
.pr-sug:hover { background: color-mix(in srgb, var(--primary) 11%, transparent); }
.pr-car-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.pr-add-list { display: inline-flex; gap: 6px; }
.pr-add-list input { width: 170px; }
.pr-allow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 700px) { .pr-allow { grid-template-columns: minmax(0, 1fr); } }
.pr-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pr-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: var(--radius-pill); padding: 3px 4px 3px 12px; font-variant-numeric: tabular-nums; }
html[dir="rtl"] .pr-chip { padding: 3px 12px 3px 4px; }
.pr-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 4px; }
.pr-chip button:hover { color: var(--danger); }
.pr-chip-add { display: inline-flex; gap: 4px; }
.pr-chip-add input { width: 100px; }
.pr-apply { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; margin-top: 20px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.pr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.gosi-parts { width: auto; min-width: 420px; margin-bottom: 8px; }
.fx-h3 { font-size: var(--fs-sm); margin: 12px 0 6px; }


.settings-tabs { justify-content: center; flex-wrap: wrap; }
#as-body .card > .btn, #as-body .settings-card > .btn { display: flex; justify-content: center; margin: 18px auto 0; }
#as-body .card > .btn, #as-body .settings-card > .btn, #as-body .settings-actions-row .btn, #as-body .pr-actions .btn, #as-body .pm-actions .btn { min-width: 190px; height: 40px; }
#as-body .settings-actions-row { justify-content: center; margin-top: 18px; }
#as-body .settings-row:last-of-type { border-bottom: 0; }
#as-body .add-type-row { justify-content: center; }
.cc-ded { color: var(--danger); font-weight: 600; }


.pg-tabs { margin-bottom: 14px; }
.tabs a.tab-btn { display: inline-flex; align-items: center; height: var(--control-h-sm); padding: 0 13px; font-size: var(--fs-sm); color: var(--muted); border-radius: var(--radius-xs); text-decoration: none; white-space: nowrap; transition: color .18s ease, background .18s ease, box-shadow .18s ease; }
.tabs a.tab-btn:hover { color: var(--primary); }
.tabs a.tab-btn.active { color: var(--primary); background: var(--surface); box-shadow: var(--shadow-xs); font-weight: 700; }
html[data-theme="dark"] .tabs a.tab-btn.active { background: var(--surface-2); color: var(--brand-300); }
.tm-bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.tm-bar i { display: block; height: 100%; background: var(--c-progress); border-radius: inherit; transition: width .5s cubic-bezier(.32,.72,0,1); }
.tm-h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; font-size: 1rem; }
.tm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-chip { display: inline-flex; gap: 4px; align-items: baseline; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--primary) 9%, var(--surface)); color: var(--text); font-size: .82rem; text-decoration: none; max-width: 100%; }
.tm-chip small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.tm-ok { color: var(--c-progress); font-weight: 600; font-size: .85rem; }
.tm-wait { color: var(--c-closing); font-weight: 600; font-size: .85rem; }
.tm-pick { border: 0; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.tm-pick legend { font-weight: 600; margin-bottom: 4px; }
.tm-picklist { display: grid; gap: 2px; max-height: 52vh; overflow: auto; margin-top: 8px; }
.tm-pick-row[hidden] { display: none; }
.tm-tag { font-size: .75rem; padding: 1px 7px; border-radius: 99px; background: color-mix(in srgb, var(--c-closing) 14%, var(--surface)); }
.stc-opt.is-disabled { opacity: .5; }
.eu-btns { display: inline-flex; gap: 6px; }
.eu-reject { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--text) 14%, transparent); }
.eu-reject[hidden] { display: none; }
.eu-reject .eu-btns { justify-content: flex-end; }
.eu-rejected { margin: 4px 0 0; color: var(--danger); font-size: .85rem; }
.role-badge.role-team_leader { background: color-mix(in srgb, var(--c-progress) 14%, var(--surface)); color: color-mix(in srgb, var(--c-progress) 70%, var(--text)); }

.tm-leaders { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tm-leader { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.tm-leader-head { display: flex; align-items: center; gap: 10px; }
.tm-avatar { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--primary); }
.tm-leader-who { flex: 1; min-width: 0; display: grid; }
.tm-leader-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-leader-head > span:last-child { flex: none; }
.tm-none { color: var(--muted); font-size: .85rem; }
.tm-leader-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.tm-leader-stats span { padding: 8px 4px; border-radius: 10px; background: color-mix(in srgb, var(--text) 4%, transparent); display: grid; }
.tm-leader-stats b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tm-leader-stats small { color: var(--muted); font-size: .75rem; }
.tm-leader-sec { display: grid; gap: 6px; }
.tm-leader-sec summary { cursor: pointer; display: flex; gap: 6px; align-items: baseline; }
.tm-label { font-weight: 600; font-size: .85rem; }
.tm-mlist { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.tm-mlist li { display: flex; gap: 6px; align-items: baseline; font-size: .88rem; }
.tm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-closing); flex: none; transform: translateY(-1px); }
.tm-dot.is-on { background: var(--c-progress); }
.tm-leader-foot { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }
.tm-leader-foot .btn { justify-content: center; }
.tm-more { background: color-mix(in srgb, var(--text) 8%, var(--surface)); }
.tm-chip-btn { border: 0; cursor: pointer; font: inherit; }
.tm-chip-btn:hover { background: color-mix(in srgb, var(--primary) 16%, var(--surface)); }
.tm-sec-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tm-sec-head .tm-h3 { margin: 0; }
.tm-form { display: grid; gap: 10px; }
.tm-form select, .tm-form input { width: 100%; }
.tm-pick-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tm-pick-top input { flex: 1; min-width: 180px; }
.tm-pick-acts { display: inline-flex; gap: 6px; }
.kpi-chip.warn { background: color-mix(in srgb, var(--c-closing) 16%, var(--surface)); color: color-mix(in srgb, var(--c-closing) 75%, var(--text)); }
@media (max-width: 720px) { .tm-leaders { grid-template-columns: 1fr; } .tm-leader-foot { grid-template-columns: 1fr 1fr; } .tm-leader-foot .danger { grid-column: 1 / -1; } }

.pm-table tbody .pm-name, .pm-table thead .pm-name { position: sticky; inset-inline-start: 0; background: var(--card-bg); z-index: 1; border-inline-end: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }
.pm-table thead .pm-name { z-index: 3; }
.tm-avatar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.dm-missing { border-inline-start: 4px solid var(--danger); margin-bottom: 14px; }
.dm-missing p { margin: 4px 0 0; color: var(--muted); }
.dm-teams { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; text-decoration: none; color: inherit; border-inline-start: 4px solid var(--primary); transition: transform .25s cubic-bezier(.32,.72,0,1); }
.dm-teams:hover { transform: translateY(-1px); }
.dm-teams-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--primary); flex: none; }
.dm-teams-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.dm-teams-txt { flex: 1; display: grid; gap: 2px; }
.dm-teams-txt small { color: var(--muted); }
.tm-quick select { min-width: 150px; }
.proj-scope { margin-inline-end: 6px; }

.pm-table td.pm-cell.is-core { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.pm-table td.pm-cell.is-core .pm-lock { width: 12px; height: 12px; vertical-align: middle; margin-inline-start: 4px; opacity: .6; }
.pm-urow.is-core { opacity: .85; }

.pm-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; margin: 4px 0 12px; }
.pm-role-item { display: flex; gap: 8px; align-items: baseline; font-size: .85rem; }
.pm-role-item .role-badge { flex: none; }
.pm-role-item small { color: var(--muted); }
.pm-table td.pm-cell.is-core { white-space: nowrap; }


html.perm-no-import :is(#emp-import, #ot-import, #sf-import, #ts-import, #inv-import) { display: none !important; }
.ot-year { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.as-cycle { margin: 10px 0 14px; }


.tl-paused { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); }
.tl-paused-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.tl-block { margin-top: 22px; }
.tl-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.02rem; }
.tl-count { min-width: 24px; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; text-align: center; color: var(--muted); background: var(--surface-2); font-variant-numeric: tabular-nums; }
.tl-list { overflow: hidden; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); }
.tl-list > * + * { border-top: 1px solid var(--hairline); }
.tl-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 10px 16px; border: 0; background: none; color: inherit; font: inherit; text-align: start; text-decoration: none; cursor: pointer;
  transition: background-color .2s cubic-bezier(.32,.72,0,1); }
.tl-row:hover { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.tl-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.tl-main { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.tl-main small { color: var(--muted); font-size: .8rem; }
.tl-main > * { justify-self: start; max-width: 100%; }
.tl-code { font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.tl-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .9rem; }
.tl-meta { flex: 0 0 auto; min-width: 84px; color: var(--muted); font-size: .85rem; text-align: end; font-variant-numeric: tabular-nums; }
.tl-chev { flex: 0 0 auto; width: 16px; height: 16px; color: var(--muted); transition: transform .3s cubic-bezier(.32,.72,0,1); }
[dir="ltr"] .tl-chev { transform: scaleX(-1); }
.tl-link:hover .tl-chev { color: var(--primary); }
.tl-pill { flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.tl-pill.is-on { color: var(--success); background: var(--success-soft); }
.tl-emp.is-open .tl-chev { transform: rotate(-90deg); }
.tl-emp-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s cubic-bezier(.32,.72,0,1); }
.tl-emp-body > div { overflow: hidden; }
.tl-emp.is-open .tl-emp-body { grid-template-rows: 1fr; }
.tl-emp.is-open .tl-emp-body > div { padding: 0 16px 12px; }
.tl-sub { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.tl-sub + .tl-sub { margin-top: 6px; }
.tl-sub .tl-name { flex: 1 1 auto; min-width: 0; }
.tl-empty { margin: 0; padding: 14px 16px; color: var(--muted); }
.tl-list .tl-empty { padding: 4px 0 0; }


.tl-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--primary); }
.tl-phead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 12px; padding: 18px 20px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); }
.tl-phead-main { display: grid; gap: 6px; flex: 1 1 340px; min-width: 0; }
.tl-phead h2 { margin: 0; font-size: 1.15rem; line-height: 1.45; }
.tl-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .85rem; }
.tl-facts b { color: var(--text); font-weight: 600; }
.tl-status { display: grid; gap: 4px; min-width: 190px; font-size: .8rem; color: var(--muted); }
.tl-pick-head { cursor: pointer; }
.tl-cb { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--primary); }
.tl-pick.is-on { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.tl-pick.is-off { background: color-mix(in srgb, var(--danger) 5%, transparent); }
.tl-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 0 16px 12px; padding-inline-start: 48px; }
.tl-opts[hidden], .tl-seg[hidden], .tl-date[hidden] { display: none; }
.tl-seg { margin: 0; }
.tl-date { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.tl-pick.is-off .tl-date { color: var(--danger); }
.tl-savebar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 10px 12px; padding-inline-start: 18px; border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 0 0 1px var(--hairline), 0 12px 30px -18px color-mix(in srgb, var(--text) 35%, transparent); }
#tl-save-sum { font-size: .88rem; color: var(--muted); }
@media (max-width: 640px) {
  .tl-row { flex-wrap: wrap; gap: 8px 10px; }
  .tl-main { flex-basis: calc(100% - 30px); }
  .tl-meta { min-width: 0; }
  .tl-opts { padding-inline-start: 16px; }
}

.tl-timer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 14px; padding: 16px 20px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); }
.tl-timer.is-paused { background: var(--warn-soft); box-shadow: none; }
.tl-timer-text { display: grid; gap: 4px; }
.tl-timer-label { font-weight: 700; }
.tl-timer-text small { color: var(--muted); }
.tl-timer-units { display: flex; gap: 8px; }
.tl-timer-units > span { display: grid; justify-items: center; gap: 2px; min-width: 64px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 8%, transparent); }
.tl-timer-units b { font-size: 1.5rem; line-height: 1.1; color: var(--primary); font-variant-numeric: tabular-nums; }
.tl-timer-units small { font-size: .74rem; color: var(--muted); }
.tl-timer.is-soon .tl-timer-units > span { background: var(--danger-soft); }
.tl-timer.is-soon .tl-timer-units b { color: var(--danger); }
.tl-opts-grid { display: grid; gap: 8px; }
.tl-opt { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; text-decoration: none; color: inherit; background: var(--surface); box-shadow: 0 0 0 1.5px var(--hairline); cursor: pointer;
  transition: box-shadow .25s cubic-bezier(.32,.72,0,1), background-color .25s cubic-bezier(.32,.72,0,1), transform .25s cubic-bezier(.32,.72,0,1); }
.tl-opt:hover, .tl-opt:focus-visible { outline: none; background: color-mix(in srgb, var(--primary) 5%, var(--surface)); box-shadow: 0 0 0 2px var(--primary); }
.tl-opt:active { transform: scale(.99); }
.tl-opt-dot { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--border-strong); transition: box-shadow .25s cubic-bezier(.32,.72,0,1); }
.tl-opt:hover .tl-opt-dot, .tl-opt:focus-visible .tl-opt-dot { box-shadow: inset 0 0 0 6px var(--primary); }
.tl-opt .tl-main { flex: 1 1 auto; min-width: 0; }
.tl-opt .tl-name { justify-self: stretch; text-align: right; }
.tl-opt-go { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, transparent); }
.tl-opt-go .tl-chev { color: currentColor; }
.tl-dept { cursor: default; }
@media (max-width: 640px) { .tl-timer-units > span { min-width: 54px; } .tl-timer-units b { font-size: 1.25rem; } .tl-opt { flex-wrap: wrap; } .tl-opt .tl-main { flex-basis: calc(100% - 40px); } }
[dir="ltr"] .tl-opt .tl-name { text-align: left; }
