/* ========================================================================== 
   PPCM Enterprise ERP UI System
   Dual theme system: existing dark command theme + additive light mode
   ========================================================================== */

:root {
  color-scheme: dark;

  --pp-green: #35b44a;
  --pp-blue: #1d3f91;

  --bg-0: #06101d;
  --bg-1: #081625;
  --bg-2: #0c1b2e;
  --surface-0: #0e1d31;
  --surface-1: #11243b;
  --surface-2: #152b47;
  --surface-3: #1b3658;
  --surface-glass: rgba(16, 32, 53, 0.82);
  --surface-input: #091827;
  --surface-table: #0f2035;
  --surface-table-2: #10263f;
  --surface: var(--surface-1);

  --text: #eef6ff;
  --text-strong: #ffffff;
  --text-soft: #d7e6f8;
  --muted: #9fb6cf;
  --muted-2: #7891ae;
  --line: rgba(154, 180, 210, 0.22);
  --line-strong: rgba(172, 198, 229, 0.34);
  --line-soft: rgba(154, 180, 210, 0.13);
  --border: var(--line);
  --border-soft: var(--line-soft);
  --text-muted: var(--muted);

  --accent-blue: #5aa7ff;
  --accent-cyan: #35d6ff;
  --accent-teal: #2dd4bf;
  --accent-green: #49dc88;
  --accent-amber: #f6bf4f;
  --accent-orange: #fb923c;
  --accent-purple: #a78bfa;
  --accent-pink: #fb8bc2;
  --accent-red: #ff6b78;

  --blue-soft: rgba(90, 167, 255, 0.18);
  --green-soft: rgba(73, 220, 136, 0.16);
  --teal-soft: rgba(45, 212, 191, 0.16);
  --amber-soft: rgba(246, 191, 79, 0.17);
  --purple-soft: rgba(167, 139, 250, 0.17);
  --red-soft: rgba(255, 107, 120, 0.16);
  --cyan-soft: rgba(53, 214, 255, 0.15);

  --radius-xs: 8px;
  --radius-sm: 11px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.22);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --shadow-md: var(--shadow);
  --shadow-lg: 0 26px 72px rgba(0, 0, 0, 0.38);
  --ring: 0 0 0 3px rgba(90, 167, 255, 0.22);

  --max-page: 1680px;
  --transition: 160ms ease;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(53, 214, 255, 0.12), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(73, 220, 136, 0.12), transparent 28%),
    radial-gradient(circle at 65% 110%, rgba(167, 139, 250, 0.10), transparent 30%),
    linear-gradient(135deg, var(--bg-0) 0%, var(--bg-1) 45%, #071322 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at top, black 0%, transparent 72%);
}

::selection { background: rgba(90, 167, 255, 0.36); color: #fff; }
[hidden] { display: none !important; }
a { color: var(--accent-blue); text-decoration: none; }
a:hover { color: #8fc5ff; }
img { max-width: 100%; }
code { color: #d7f7ff; background: rgba(53, 214, 255, .10); border: 1px solid rgba(53, 214, 255, .24); border-radius: 8px; padding: 2px 6px; }

/* ========================================================================== 
   Header / shell
   ========================================================================== */
.site-header,
.clean-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(5, 14, 26, 0.92);
  border-bottom: 1px solid rgba(147, 197, 253, 0.18);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.header-inner,
.clean-header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 10px clamp(16px, 3vw, 32px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  color: var(--text-strong);
  text-decoration: none;
}
.brand-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 9px 18px rgba(0,0,0,.35));
}
.brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  line-height: 1;
}
.brand-block {
  height: 45px;
  min-width: 55px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -.04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 8px 18px rgba(0,0,0,.24);
}
.brand-pp { background: linear-gradient(135deg, #20b85a, #58e093); }
.brand-co { background: linear-gradient(135deg, #213d9d, #5ea8ff); }
.brand-rest {
  display: inline-flex;
  align-items: center;
  height: 45px;
  color: var(--text-strong);
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -.045em;
  text-shadow: 0 10px 30px rgba(0,0,0,.36);
}

.header-nav,
.clean-header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}
.nav-link,
.lang-link,
.current-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 850;
  color: var(--text-soft);
}
.nav-link {
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.nav-link:hover,
.primary-nav-link {
  background: rgba(90, 167, 255, .12);
  border-color: rgba(90, 167, 255, .22);
  color: #fff;
}
.primary-nav-link { box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.nav-logout { color: #ffd0d7; }
.nav-logout:hover { background: rgba(255, 107, 120, .12); border-color: rgba(255,107,120,.24); }
.current-user {
  max-width: 260px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(147, 197, 253, .18);
  border-radius: 999px;
  background: rgba(10, 25, 43, .7);
}
.lang-link { min-height: 30px; min-width: 36px; padding: 5px 9px; font-size: 12px; color: var(--muted); }
.lang-link.active { color: #06101d; background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green)); }

.page-shell {
  width: min(var(--max-page), calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 34px;
}
.site-footer {
  padding: 18px 22px 28px;
  color: var(--muted-2);
  text-align: center;
  font-size: 12px;
}

/* ========================================================================== 
   Typography / utility
   ========================================================================== */
h1, h2, h3, h4, strong, b, label { color: var(--text-strong); }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(28px, 3vw, 44px); line-height: 1.05; letter-spacing: -.045em; margin-bottom: 8px; }
h2 { font-size: clamp(19px, 1.7vw, 27px); line-height: 1.12; letter-spacing: -.035em; margin-bottom: 6px; }
h3 { font-size: 17px; line-height: 1.2; letter-spacing: -.02em; margin-bottom: 5px; }
p { color: var(--muted); margin-bottom: 0; }
small, em, span { color: inherit; }
.muted, .section-note, .result-count { color: var(--muted); }
.eyebrow {
  margin: 0 0 6px !important;
  color: var(--accent-cyan) !important;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ltr-text, .ltr-field { direction: ltr !important; unicode-bidi: isolate !important; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.compact-actions { gap: 7px; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.num-col, .amount-value, .amount-col, .amount-highlight { text-align: right; direction: ltr; font-variant-numeric: tabular-nums; }

/* ========================================================================== 
   Core containers
   ========================================================================== */
.panel,
.auth-card,
.metric-card,
.admin-layer-card,
.master-hub-card,
.config-area-card,
.ui-group-card,
.interface-group-card,
.interface-policy-card,
.access-picker,
.workflow-card,
.workspace-hero,
.workspace-modules-panel,
.workspace-profile-panel,
.workspace-rule-panel,
.workspace-module-card,
.exec-control-hero,
.exec-command-tile,
.exec-capsule-shell,
.exec-insight-panel,
.exec-decision-panel,
.pro-viz-card,
.report-panel,
.form-panel,
.detail-panel,
.hr-command-panel,
.hr-register-card,
.table-panel,
.users-panel,
.section-card-large {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    var(--surface-glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}
.panel, .auth-card, .metric-card, .form-panel, .detail-panel, .table-panel, .users-panel, .section-card-large { padding: 18px; }
.panel::before,
.auth-card::before,
.metric-card::before,
.admin-layer-card::before,
.master-hub-card::before,
.config-area-card::before,
.ui-group-card::before,
.interface-group-card::before,
.workspace-module-card::before,
.exec-command-tile::before,
.exec-insight-panel::before,
.exec-decision-panel::before,
.pro-viz-card::before,
.report-panel::before,
.hr-register-card::before,
.form-panel::before,
.detail-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--card-accent, var(--accent-blue)), transparent 74%);
  opacity: .92;
  pointer-events: none;
}
.panel-head,
.viz-card-head,
.hr-command-head,
.hr-register-toolbar,
.column-config-head,
.matrix-head,
.section-header-clean,
.section-page-head,
.compact-page-head,
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.panel-head, .slim-head { margin-bottom: 14px; }
.panel-head h2, .panel-head h1, .page-head h1, .section-header-clean h1 { margin: 0; }
.panel-head p, .page-head p, .section-header-clean p, .section-page-head p { margin: 5px 0 0; max-width: 980px; }

.page-head,
.section-header-clean,
.section-page-head,
.compact-page-head,
.admin-map-hero,
.hr-page-head {
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid rgba(90, 167, 255, .23);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 0 0, rgba(90,167,255,.18), transparent 35%),
    radial-gradient(circle at 100% 0, rgba(73,220,136,.12), transparent 32%),
    linear-gradient(135deg, rgba(18, 37, 62, .96), rgba(10, 27, 48, .94));
  box-shadow: var(--shadow);
}
.page-head > div, .section-header-clean > div, .section-page-head > div { min-width: 0; }

.grid-2,
.form-grid-2,
.report-grid-two,
.section-split-layout,
.admin-guidance-grid,
.exec-decision-grid,
.exec-health-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid,
.form-grid-3,
.metric-row,
.admin-overview-bar,
.admin-snapshot-strip,
.workspace-pulse-grid,
.exec-command-strip,
.exec-capsule-grid,
.pro-viz-grid,
.admin-layer-grid,
.master-hub-grid,
.workflow-placeholder-grid,
.role-summary-grid,
.compact-role-grid,
.advanced-filter-grid,
.filter-grid,
.filter-grid-6,
.amount-filter-grid,
.column-filter-grid,
.visual-toggle-grid,
.column-toggle-grid,
.hr-column-toggle-grid,
.interface-access-grid,
.facility-attribute-grid,
.detail-grid,
.compact-detail-grid,
.amount-grid,
.configuration-grid,
.master-hub-grid,
.module-interface-list,
.ui-page-list,
.workspace-module-list {
  display: grid;
  gap: 14px;
}
.metric-row,
.admin-overview-bar,
.admin-snapshot-strip,
.workspace-pulse-grid,
.exec-command-strip { grid-template-columns: repeat(4, minmax(160px, 1fr)); margin-bottom: 18px; }
.admin-layer-grid,
.master-hub-grid,
.workflow-placeholder-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
.pro-viz-grid { grid-template-columns: repeat(2, minmax(360px, 1fr)); align-items: start; }
.pro-viz-card.wide-viz { grid-column: span 2; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-4, .advanced-filter-grid, .filter-grid-6, .column-filter-grid { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
.detail-grid, .compact-detail-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
.interface-access-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)); }

/* ========================================================================== 
   Buttons / forms / flash
   ========================================================================== */
.btn,
button,
a.btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 15px;
  color: var(--text-strong);
  background: rgba(255,255,255,.06);
  font-weight: 900;
  letter-spacing: -.01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}
.btn:hover, button:hover, a.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(0,0,0,.28); }
.btn-primary, button[type="submit"] {
  background: linear-gradient(135deg, #1d7dff, #21d18f);
  border-color: rgba(255,255,255,.18);
  color: #fff;
  box-shadow: 0 14px 30px rgba(29, 125, 255, .22);
}
.btn-secondary {
  background: linear-gradient(135deg, rgba(90,167,255,.16), rgba(53,214,255,.10));
  border-color: rgba(90,167,255,.33);
  color: #dff0ff;
}
.btn-ghost {
  background: rgba(255,255,255,.045);
  border-color: rgba(154,180,210,.22);
  color: var(--text-soft);
}
.btn-danger { background: linear-gradient(135deg, rgba(255,107,120,.30), rgba(255,107,120,.12)); border-color: rgba(255,107,120,.36); color: #ffe8eb; }
.btn-success { background: linear-gradient(135deg, rgba(73,220,136,.28), rgba(73,220,136,.12)); border-color: rgba(73,220,136,.34); color: #e3ffed; }
.btn-sm { min-height: 34px; padding: 7px 12px; font-size: 12px; }
.btn-xs { min-height: 28px; padding: 5px 9px; font-size: 11px; }
.btn[disabled], button[disabled], .disabled { opacity: .58; cursor: not-allowed; pointer-events: none; }

.field { display: grid; gap: 7px; min-width: 0; }
.field label,
.viz-sort-box label,
.viz-inner-filter label,
.multi-filter-shell label,
.checkbox-field,
.column-toggle-item,
.visual-toggle-item {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 850;
}
.input,
input,
select,
textarea,
.multi-select,
.report-multi-select,
.viz-row-picker,
.viz-sort-select,
.viz-display-mode,
.viz-row-search,
.multi-filter-search {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(154, 180, 210, .28);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(5, 16, 29, .92), rgba(10, 27, 48, .94));
  color: var(--text-strong);
  padding: 9px 12px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
textarea.input, textarea { min-height: 104px; resize: vertical; }
.input:focus, input:focus, select:focus, textarea:focus { border-color: var(--accent-blue); box-shadow: var(--ring); }
.input::placeholder, input::placeholder, textarea::placeholder { color: #7188a4; }
select option, .multi-select option, .report-multi-select option, .viz-row-picker option { color: #f5faff; background: #0b1829; }
select option:checked, .multi-select option:checked, .report-multi-select option:checked, .viz-row-picker option:checked { background: #1f6fb7; color: #fff; }
.req { color: var(--accent-amber); }
.error-box {
  border: 1px solid rgba(255,107,120,.32);
  background: rgba(255,107,120,.12);
  color: #ffdce1;
  border-radius: var(--radius);
  padding: 12px 14px;
}
.form-actions, .filter-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.form-actions-sticky { position: sticky; bottom: 12px; z-index: 8; padding: 12px; background: rgba(8,22,37,.88); border: 1px solid var(--line); border-radius: var(--radius-lg); backdrop-filter: blur(12px); }
.checkbox-field, .column-toggle-item, .visual-toggle-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-blue); width: 16px; height: 16px; }

.flash-stack { display: grid; gap: 10px; margin-bottom: 16px; }
.flash {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.055);
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
}
.flash-success { background: rgba(73,220,136,.16); border-color: rgba(73,220,136,.32); }
.flash-danger { background: rgba(255,107,120,.16); border-color: rgba(255,107,120,.32); }
.flash-warning { background: rgba(246,191,79,.17); border-color: rgba(246,191,79,.35); }
.flash-info { background: rgba(90,167,255,.16); border-color: rgba(90,167,255,.32); }

/* ========================================================================== 
   Tables and registers
   ========================================================================== */
.table-wrap,
.users-table-wrap,
.audit-table-wrap,
.hr-scroll-shell,
.report-detail-scroll-shell,
.matrix-heatmap-wrap,
.cost-summary-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(7, 20, 34, .86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), var(--shadow-sm);
}
.data-table,
.audit-table,
.users-table,
.companies-table,
.compact-table,
.admin-mini-table,
.matrix-table,
.cost-summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text);
  min-width: 760px;
  font-size: 13px;
}
th,
td,
.data-table th,
.data-table td {
  padding: 12px 13px;
  border-bottom: 1px solid rgba(154,180,210,.13);
  vertical-align: middle;
  color: var(--text-soft);
}
th, .data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #eaf5ff;
  background: linear-gradient(180deg, #152d49, #10233b);
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 950;
}
td strong, td b { color: var(--text-strong); }
tbody tr:nth-child(even) td { background: rgba(255,255,255,.018); }
tbody tr:hover td { background: rgba(90,167,255,.08); }
tfoot td { color: var(--text-strong); background: rgba(73,220,136,.08); font-weight: 850; }
.table-actions { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.empty-cell {
  color: var(--muted);
  padding: 22px;
  text-align: center;
  border: 1px dashed rgba(154,180,210,.25);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
}
.sort-link, .hr-sort-link { color: #dff0ff; font-weight: 950; }
.sort-link.active, .hr-sort-link.active { color: var(--accent-green); }
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
}
.pagination-actions { display: flex; gap: 8px; align-items: center; }

.hr-scroll-shell { height: min(68vh, 780px); min-height: 440px; }
.hr-grid-table { width: max-content; min-width: 100%; font-size: 13px; }
.hr-grid-row { display: grid; align-items: stretch; width: max-content; min-width: 100%; }
.hr-grid-header { position: sticky; top: 0; z-index: 6; }
.hr-grid-cell {
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: var(--text-soft);
  background: var(--surface-table);
  border-right: 1px solid rgba(154,180,210,.12);
  border-bottom: 1px solid rgba(154,180,210,.12);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hr-grid-th {
  color: #eaf5ff;
  background: linear-gradient(180deg, #17324f, #102640);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.hr-grid-data-row:nth-child(even) .hr-grid-cell { background: var(--surface-table-2); }
.hr-grid-data-row:hover .hr-grid-cell { background: rgba(90,167,255,.12); }
.hr-grid-cell:last-child { border-right: 0; }
.hr-grid-cell[data-col="employee_name"],
.hr-grid-cell[data-col="sponsor_name"],
.hr-grid-cell[data-col="category_title"],
.hr-grid-cell[data-col="visa_position_title"],
.hr-grid-cell[data-col="notes"] { white-space: normal; align-items: flex-start; }
.hr-grid-cell[data-col*="salary"],
.hr-grid-cell[data-col*="allowance"],
.hr-grid-cell[data-col="contract_total_remunerations"] { justify-content: flex-end; text-align: right; direction: ltr; font-variant-numeric: tabular-nums; }
.hr-grid-cell[data-col="status"], .hr-grid-cell[data-col="actions"], .actions-col { justify-content: center; text-align: center; }
.hr-employee-name { color: var(--text-strong); font-weight: 950; }
.hr-row-actions { display: inline-flex; gap: 6px; white-space: nowrap; }
.hr-grid-empty { padding: 20px; color: var(--muted); }

/* ========================================================================== 
   Badges / chips / avatars / lists
   ========================================================================== */
.badge,
.layer-badge,
.audit-action-chip,
.workspace-access-pill,
.group-code,
.layer-code,
.exec-module-code,
.exec-data-badge,
.module-status,
.department-chip,
.attribute-pill,
.schema-chip,
.executive-filter-pill,
.hr-page-indicator,
.compact-chip-grid span,
.master-link-row em,
.ui-page-row em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(90,167,255,.26);
  border-radius: 999px;
  color: #dff0ff;
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.badge-active, .live, .badge-success { color: #dfffea; background: var(--green-soft); border-color: rgba(73,220,136,.32); }
.badge-inactive, .badge-muted, .muted-link { color: #c3d1e2; background: rgba(148,163,184,.13); border-color: rgba(148,163,184,.25); }
.badge-planned, .planned, .badge-warning, .badge-draft { color: #fff3d1; background: var(--amber-soft); border-color: rgba(246,191,79,.36); }
.badge-disposed { color: #ffdce1; background: var(--red-soft); border-color: rgba(255,107,120,.32); }
.badge-admin { color: #ffe0c9; background: rgba(251,146,60,.16); border-color: rgba(251,146,60,.34); }
.badge-user { color: #dcf7ff; background: var(--cyan-soft); border-color: rgba(53,214,255,.30); }
.mini-avatar, .small-avatar, .avatar, .avatar-lg, .workspace-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #06101d;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  font-weight: 950;
  box-shadow: 0 10px 20px rgba(0,0,0,.26);
}
.mini-avatar, .small-avatar { width: 34px; height: 34px; font-size: 12px; }
.avatar { width: 46px; height: 46px; }
.avatar-lg, .workspace-avatar { width: 64px; height: 64px; font-size: 19px; }
.user-cell, .detail-user-cell, .workspace-user-card, .master-hub-title, .interface-group-title, .ui-group-title, .workspace-module-title, .exec-capsule-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-cell-text, .workspace-page-text, .workspace-module-title > div, .interface-group-title > div, .ui-group-title > div, .master-hub-title > div { display: grid; gap: 2px; min-width: 0; }
.user-cell-text small, .workspace-page-text small, .master-hub-title p, .interface-group-title p { color: var(--muted); }

/* ========================================================================== 
   Admin / system navigation
   ========================================================================== */
.page-admin { --page-accent: var(--accent-blue); }
.admin-map-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: 16px; align-items: stretch; }
.admin-map-note {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(246,191,79,.28);
  background: linear-gradient(135deg, rgba(246,191,79,.13), rgba(255,255,255,.03));
}
.admin-map-note strong, .admin-map-note span { display: block; }
.admin-map-note strong { margin-bottom: 7px; }
.admin-overview-bar article,
.admin-snapshot-strip article,
.workspace-pulse-grid article,
.metric-card,
.role-summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.022));
  box-shadow: var(--shadow-sm);
}
.admin-overview-bar article span,
.admin-snapshot-strip article span,
.workspace-pulse-grid article span,
.metric-card span,
.metric-card small,
.role-summary-card small { color: var(--muted); font-weight: 800; }
.admin-overview-bar article strong,
.admin-snapshot-strip article strong,
.workspace-pulse-grid article strong,
.metric-card strong,
.role-summary-card strong { display: block; margin: 3px 0; font-size: 28px; line-height: 1; }
.admin-layer-card, .master-hub-card, .config-area-card, .workflow-card { padding: 20px; --card-accent: var(--accent-blue); }
.admin-layer-card.primary-layer { --card-accent: var(--accent-green); }
.admin-layer-card:nth-child(3), .master-hub-card:nth-child(2) { --card-accent: var(--accent-teal); }
.admin-layer-card:nth-child(4), .workflow-card { --card-accent: var(--accent-amber); }
.layer-card-top, .module-card-top, .interface-group-meta, .ui-group-meta, .workspace-module-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.layer-code, .group-code, .workspace-module-code, .exec-module-code { min-width: 42px; height: 42px; border-radius: 14px; font-size: 13px; }
.layer-paths, .layer-mini-list, .module-tags, .classification-rules, .numbered-clean-list, .compact-event-list, .config-link-stack, .master-link-stack, .ui-group-list, .workspace-page-list, .interface-group-list { display: grid; gap: 10px; }
.layer-paths span, .layer-mini-list span, .module-tags span, .classification-rules div, .compact-event, .master-link-row, .config-link-stack a, .ui-page-row, .workspace-page-row, .interface-node-summary, .module-bulk-bar {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
  padding: 12px;
}
.layer-open, .module-link, .master-link-row, .config-link-stack a, .ui-page-row, .workspace-page-row { color: var(--text); text-decoration: none; }
.layer-open {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  font-weight: 950;
  color: #dff0ff;
}
.layer-open::after, .master-link-row::after, .ui-page-row::after, .workspace-page-row::after { content: "›"; margin-left: auto; color: var(--accent-cyan); font-weight: 950; }
.master-link-row, .ui-page-row, .workspace-page-row { display: flex; align-items: center; gap: 12px; transition: background var(--transition), transform var(--transition), border-color var(--transition); }
.master-link-row:hover, .ui-page-row:hover, .workspace-page-row:hover { background: rgba(90,167,255,.09); border-color: rgba(90,167,255,.30); transform: translateY(-1px); }
.master-link-row.disabled { opacity: .58; }
.reference-maintenance-layout { align-items: stretch; }
.department-chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }

.physical-asset-tabs {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: -2px 0 18px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(2, 8, 16, .42);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.physical-asset-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text-soft);
  background: rgba(255,255,255,.035);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.physical-asset-tab:hover { background: rgba(90,167,255,.10); border-color: rgba(90,167,255,.30); transform: translateY(-1px); }
.physical-asset-tab.active {
  color: var(--text-strong);
  border-color: rgba(45,212,191,.44);
  background: linear-gradient(135deg, rgba(45,212,191,.16), rgba(90,167,255,.10));
}
.physical-asset-tab.active::after {
  content: "";
  position: absolute;
  inset: auto 12px 3px 12px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
}
.physical-asset-tab strong { font-size: 12px; font-weight: 950; }
.physical-asset-tab em, .asset-type-code, .tab-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  color: #dff0ff;
  background: rgba(53,214,255,.12);
  border: 1px solid rgba(53,214,255,.24);
  font-size: 11px;
  font-weight: 950;
  font-style: normal;
}
.physical-asset-type-grid { display: grid; gap: 10px; }
.physical-asset-type-card { min-height: 72px; }
.physical-asset-type-card .asset-type-main { display: grid; gap: 2px; min-width: 0; }
.physical-asset-type-card .asset-type-main small { color: var(--muted); line-height: 1.35; }
.physical-asset-hub-panel, .page-physical-assets .table-panel, .page-physical-assets .form-panel, .page-physical-assets .detail-panel { --card-accent: var(--accent-teal); }
.physical-assets-table .small-avatar, .physical-asset-detail-panel .avatar-lg { min-width: 42px; }

/* ========================================================================== 
   RBAC / interface matrix
   ========================================================================== */
.access-model-strip, .interface-matrix-panel, .hierarchy-matrix-panel { margin-bottom: 18px; }
.access-model-strip { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 14px; }
.access-model-strip article, .access-design-note {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.035);
}
.interface-permission-form { display: grid; gap: 16px; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.interface-group-card, .ui-group-card, .workspace-module-card { overflow: hidden; padding: 0; }
.interface-group-card.tone-green, .ui-group-card.tone-green, .workspace-module-card.tone-green { --card-accent: var(--accent-green); }
.interface-group-card.tone-blue, .ui-group-card.tone-blue, .workspace-module-card.tone-blue { --card-accent: var(--accent-blue); }
.interface-group-card.tone-amber, .ui-group-card.tone-amber, .workspace-module-card.tone-amber { --card-accent: var(--accent-amber); }
.interface-group-card.tone-slate, .ui-group-card.tone-slate, .workspace-module-card.tone-slate { --card-accent: #94a3b8; }
.interface-group-card.tone-purple, .ui-group-card.tone-purple, .workspace-module-card.tone-purple { --card-accent: var(--accent-purple); }
.interface-group-summary, .ui-group-summary, .workspace-module-summary {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.052), rgba(255,255,255,.022));
}
.interface-group-body, .ui-group-body, .workspace-page-list { padding: 16px; background: rgba(4, 14, 27, .25); }
.group-metric-pills, .workspace-module-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.group-metric-pills span, .workspace-module-stats span { display: grid; gap: 2px; min-width: 82px; padding: 8px 10px; border-radius: 13px; background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); }
.group-metric-pills small, .workspace-module-stats small { color: var(--muted); font-size: 10px; }
.interface-policy-card { padding: 0; overflow: hidden; --card-accent: var(--accent-cyan); }
.interface-node-summary { border-radius: 0; display: flex; justify-content: space-between; align-items: center; }
.interface-node-body { padding: 16px; }
.access-picker { padding: 0; overflow: hidden; }
.access-picker-view { --card-accent: var(--accent-blue); }
.access-picker-edit { --card-accent: var(--accent-green); }
.access-picker-head-static {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid var(--line-soft);
}
.access-picker-head-static span, .access-picker-head-static em { color: var(--muted); font-style: normal; }
.access-picker-body { padding: 14px; }
.picker-tools, .multi-filter-actions, .viz-row-picker-actions, .visual-config-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.permission-user-list { max-height: 350px; overflow: auto; display: grid; gap: 8px; padding-right: 4px; }
.permission-user-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
  color: var(--text);
}
.permission-user-option:hover { background: rgba(90,167,255,.09); }
.permission-user-option small { color: var(--muted); }
.matrix-save-bar { margin-top: 16px; }

.user-access-strip { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
.user-permission-matrix-panel, .user-detail-permissions-panel { --card-accent: var(--accent-purple); }
.user-permission-form, .single-user-permission-form { display: grid; gap: 14px; }
.user-permission-list { display: grid; gap: 14px; }
.user-permission-card,
.user-permission-group,
.permission-admin-message,
.user-ui-permission-row,
.single-user-permission-toolbar,
.user-permission-toolbar {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.035);
}
.user-permission-card { overflow: hidden; padding: 0; }
.user-permission-card.is-admin { --card-accent: var(--accent-amber); }
.user-permission-card.is-inactive { opacity: .82; }
.user-permission-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.052), rgba(255,255,255,.022));
}
.user-permission-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-permission-identity .mini-avatar { flex: 0 0 auto; }
.user-permission-identity h3 { margin: 0; font-size: 17px; }
.user-permission-identity p,
.user-permission-identity small,
.user-permission-toolbar span,
.single-user-permission-toolbar span,
.permission-admin-message span,
.user-ui-permission-main span,
.user-ui-permission-main small { color: var(--muted); }
.user-permission-identity p,
.user-permission-identity small { display: block; overflow-wrap: anywhere; }
.user-permission-meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; min-width: 330px; }
.user-permission-counts { display: flex; gap: 8px; flex-wrap: wrap; }
.user-permission-counts span {
  min-width: 64px;
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line-soft);
  text-align: center;
}
.user-permission-counts small { color: var(--muted); font-size: 10px; }
.user-permission-body { padding: 14px; display: grid; gap: 14px; }
.permission-admin-message { padding: 13px 14px; display: grid; gap: 4px; border-color: rgba(251,191,36,.28); background: rgba(251,191,36,.09); }
.user-permission-toolbar,
.single-user-permission-toolbar {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.user-permission-groups,
.single-user-permission-grid { display: grid; gap: 12px; }
.user-permission-group { overflow: hidden; padding: 0; }
.user-permission-group.tone-green { --card-accent: var(--accent-green); }
.user-permission-group.tone-blue { --card-accent: var(--accent-blue); }
.user-permission-group.tone-teal { --card-accent: var(--accent-teal); }
.user-permission-group.tone-purple { --card-accent: var(--accent-purple); }
.user-permission-group.tone-amber { --card-accent: var(--accent-amber); }
.user-permission-group.tone-slate { --card-accent: #94a3b8; }
.user-permission-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--card-accent) 11%, transparent), rgba(255,255,255,.025));
}
.user-permission-group-summary h4 { margin: 0; }
.user-permission-group-summary p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.user-ui-permission-list { display: grid; gap: 9px; padding: 12px; }
.user-ui-permission-row {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
}
.user-ui-permission-row.is-muted { opacity: .62; }
.user-ui-permission-main { display: grid; gap: 3px; min-width: 0; }
.user-ui-permission-main strong,
.user-ui-permission-main span,
.user-ui-permission-main small { overflow-wrap: anywhere; }
.user-ui-permission-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.permission-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 82px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--text-soft);
  font-weight: 900;
  cursor: pointer;
}
.permission-switch input { width: 15px; height: 15px; accent-color: var(--accent-blue); }
.permission-switch.edit-switch input { accent-color: var(--accent-green); }
.permission-switch:has(input:checked) { color: var(--text-strong); border-color: rgba(90,167,255,.34); background: rgba(90,167,255,.12); }
.permission-switch.edit-switch:has(input:checked) { border-color: rgba(73,220,136,.34); background: rgba(73,220,136,.12); }
.permission-switch:has(input:disabled) { cursor: not-allowed; opacity: .72; }
.single-user-permission-grid.is-readonly { margin-top: 12px; }
.user-detail-permissions-panel { margin-bottom: 18px; }

html[dir="rtl"] .user-permission-summary,
html[dir="rtl"] .user-permission-group-summary,
html[dir="rtl"] .user-permission-toolbar,
html[dir="rtl"] .single-user-permission-toolbar { text-align: right; }
html[dir="rtl"] .user-permission-meta { justify-content: flex-start; }

@media (max-width: 1100px) {
  .user-access-strip { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
  .user-permission-summary { align-items: flex-start; flex-direction: column; }
  .user-permission-meta { min-width: 0; justify-content: flex-start; width: 100%; }
  .user-ui-permission-row { grid-template-columns: minmax(0, 1fr); }
  .user-ui-permission-status, .user-ui-permission-actions { justify-content: flex-start; }
}
@media (max-width: 680px) {
  .user-access-strip { grid-template-columns: 1fr; }
  .user-permission-group-summary { align-items: flex-start; flex-direction: column; }
  .permission-switch { min-width: 74px; justify-content: center; }
}

/* ========================================================================== 
   Workspace
   ========================================================================== */
.user-workspace-shell { width: min(1500px, calc(100vw - 28px)); }
.workspace-hero { padding: 22px; margin-bottom: 18px; --card-accent: var(--accent-green); }
.workspace-hero-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.workspace-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.workspace-layout { display: grid; grid-template-columns: minmax(260px, 350px) minmax(0, 1fr); gap: 18px; align-items: start; }
.workspace-side-panel { display: grid; gap: 16px; }
.workspace-profile-list { display: grid; gap: 10px; margin: 12px 0 0; }
.workspace-profile-list div { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line-soft); }
.workspace-profile-list dt { color: var(--muted); font-weight: 800; }
.workspace-profile-list dd { margin: 0; color: var(--text-strong); font-weight: 850; }
.workspace-modules-panel { padding: 18px; --card-accent: var(--accent-blue); }
.workspace-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.workspace-search-box { min-width: min(360px, 100%); }
.workspace-page-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--blue-soft); color: #dff0ff; font-weight: 950; }
.workspace-page-right { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.workspace-access-pill.edit { color: #dfffea; background: var(--green-soft); border-color: rgba(73,220,136,.32); }
.workspace-empty-state { padding: 30px; text-align: center; }

/* ========================================================================== 
   Executive control center
   ========================================================================== */
.page-executive .page-shell { width: min(1540px, calc(100vw - 28px)); }
.exec-control-hero { padding: 26px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 18px; --card-accent: var(--accent-cyan); background: radial-gradient(circle at 10% 0, rgba(53,214,255,.18), transparent 36%), linear-gradient(135deg, rgba(17,37,62,.98), rgba(9,24,43,.96)); }
.exec-control-title p { max-width: 900px; }
.exec-control-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.exec-data-badge i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-green); box-shadow: 0 0 0 5px rgba(73,220,136,.14); }
.exec-command-tile { padding: 18px; min-height: 130px; --card-accent: var(--accent-blue); }
.exec-command-tile span, .exec-command-tile small { display: block; color: var(--muted); font-weight: 850; }
.exec-command-tile strong { display: block; margin: 8px 0 4px; font-size: 34px; line-height: 1; }
.tile-people { --card-accent: var(--accent-green); }
.tile-cost { --card-accent: var(--accent-teal); }
.tile-risk { --card-accent: var(--accent-amber); }
.exec-capsule-shell { padding: 20px; margin-top: 18px; --card-accent: var(--accent-green); }
.exec-capsule-header { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(73,220,136,.12), rgba(90,167,255,.08)); margin-bottom: 16px; }
.exec-capsule-health { min-width: 220px; padding: 16px; border-radius: var(--radius); border: 1px solid rgba(73,220,136,.26); background: rgba(73,220,136,.10); }
.exec-capsule-health span, .exec-capsule-health small { display: block; color: var(--muted); }
.exec-capsule-health strong { display: block; font-size: 30px; }
.exec-capsule-grid { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
.exec-insight-panel { padding: 18px; min-height: 260px; }
.insight-workforce { --card-accent: var(--accent-green); }
.insight-cost { --card-accent: var(--accent-teal); }
.insight-risk { --card-accent: var(--accent-amber); }
.insight-status { --card-accent: var(--accent-purple); }
.exec-panel-topline, .exec-decision-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.exec-panel-topline span, .exec-main-metric span, .exec-decision-head span { color: var(--muted); font-weight: 850; }
.exec-panel-topline b { color: var(--text-strong); }
.exec-main-metric strong { display: block; font-size: 32px; line-height: 1; margin-bottom: 7px; }
.exec-split-metrics { display: grid; gap: 10px; margin-top: 14px; }
.exec-split-metrics a, .exec-status-list a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.035);
  color: var(--text);
}
.exec-split-metrics a:hover, .exec-status-list a:hover { background: rgba(90,167,255,.08); border-color: rgba(90,167,255,.26); }
.exec-split-metrics span, .exec-split-metrics small { color: var(--muted); }
.exec-ratio-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); margin: 14px 0; }
.exec-ratio-bar span { display: block; background: var(--accent-blue); }
.exec-ratio-bar i { display: block; background: var(--accent-green); }
.exec-health-layout { grid-template-columns: 140px minmax(0,1fr); align-items: center; }
.exec-health-donut, .executive-donut, .pro-donut {
  width: 128px;
  height: 128px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--accent-green) 0 var(--active), rgba(255,255,255,.10) var(--active) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 16px 34px rgba(0,0,0,.30);
}
.exec-health-donut::after, .executive-donut::after, .pro-donut::after { content: ""; position: absolute; inset: 18px; border-radius: inherit; background: var(--surface-0); }
.exec-health-donut strong, .exec-health-donut span, .executive-donut span, .executive-donut small, .pro-donut span, .pro-donut small { position: relative; z-index: 1; display: block; text-align: center; }
.exec-health-donut strong, .executive-donut span, .pro-donut span { font-size: 24px; font-weight: 950; }
.exec-status-list { display: grid; gap: 8px; }
.exec-status-list em, .mini-progress, .pro-bar-track { display: block; height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.09); }
.exec-status-list em i, .mini-progress i, .pro-bar-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-blue), var(--accent-green)); border-radius: inherit; }
.exec-decision-panel { padding: 16px; }
.decision-cost { --card-accent: var(--accent-teal); }
.decision-site { --card-accent: var(--accent-green); }
.decision-nationality { --card-accent: var(--accent-purple); }
.decision-allowance { --card-accent: var(--accent-amber); }
.exec-decision-panel strong { display: block; font-size: 22px; margin: 8px 0; }

/* ========================================================================== 
   HR reports / dashboard / visualizations
   ========================================================================== */
.page-hr { --page-accent: var(--accent-green); }
.hr-executive-dashboard {
  display: grid;
  gap: 16px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(73,220,136,.24);
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at 0 0, rgba(73,220,136,.14), transparent 34%), linear-gradient(135deg, rgba(15,34,55,.96), rgba(7,22,38,.95));
  box-shadow: var(--shadow);
}
.executive-main-card { --card-accent: var(--accent-cyan); }
.executive-card-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.executive-number-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; }
.executive-number-block, .executive-highlight-item, .driver-row, .executive-risk-card, .executive-status-row, .risk-stack > div {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
}
.executive-number-block span, .executive-number-block small, .executive-highlight-item span, .driver-row span, .executive-risk-card span { color: var(--muted); font-weight: 850; }
.executive-number-block strong { display: block; font-size: 28px; line-height: 1; margin: 6px 0; }
.executive-highlight-strip, .driver-stack, .risk-stack, .executive-status-list { display: grid; gap: 10px; }
.executive-highlight-strip { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
.executive-status-body { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 16px; align-items: center; }
.pro-viz-card { padding: 18px; min-height: 340px; --card-accent: var(--accent-blue); }
.pro-viz-card[data-viz="work_site_headcount"] { --card-accent: var(--accent-green); }
.pro-viz-card[data-viz="nationality_mix"] { --card-accent: var(--accent-purple); }
.pro-viz-card[data-viz="category_cost"],
.pro-viz-card[data-viz="allowance_composition"],
.pro-viz-card[data-viz="cost_kpi_pack"] { --card-accent: var(--accent-teal); }
.pro-viz-card[data-viz="salary_bands"] { --card-accent: var(--accent-cyan); }
.pro-viz-card[data-viz="contract_risk"] { --card-accent: var(--accent-amber); }
.pro-viz-card[data-viz="employment_trend"] { --card-accent: var(--accent-blue); }
.pro-viz-card[data-viz="matrix_heatmap"] { --card-accent: var(--accent-purple); }
.viz-card-head { margin-bottom: 14px; }
.viz-card-head h2 { margin: 0; }
.viz-card-head > span { color: #dff0ff; background: var(--blue-soft); border: 1px solid rgba(90,167,255,.25); border-radius: 999px; padding: 5px 9px; font-weight: 900; font-size: 11px; }
.viz-control-stack { display: grid; gap: 9px; min-width: 260px; }
.viz-sort-box, .viz-inner-filter, .multi-filter-shell, .column-report-filters, .advanced-filters, .infographic-config-panel, .column-config-panel {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
}
.viz-inner-filter { display: grid; gap: 9px; }
.multi-selected-count { color: var(--muted); font-weight: 850; }
.multi-selected-count b { color: var(--text-strong); }
.report-multi-field { min-width: 0; }
.pro-bar-list, .sortable-viz-list, .report-list { display: grid; gap: 10px; }
.pro-bar-row, .report-list-row, .trend-tile, .viz-total-line, .split-total-line, .total-stack > div, .cost-summary-table-wrap, .matrix-heatmap-wrap {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
}
.pro-bar-row.click-filter-row, .report-list-row.click-filter-row, .legend-row.click-filter-row { cursor: pointer; transition: background var(--transition), border-color var(--transition), transform var(--transition); }
.pro-bar-row.click-filter-row:hover, .report-list-row.click-filter-row:hover, .legend-row.click-filter-row:hover { background: rgba(90,167,255,.09); border-color: rgba(90,167,255,.30); transform: translateY(-1px); }
.pro-bar-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pro-bar-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-bar-label span { color: var(--muted); font-weight: 850; white-space: nowrap; }
.pro-bar-track { height: 9px; padding: 0; border: 0; }
.pro-bar-track i { background: linear-gradient(90deg, var(--card-accent), var(--accent-green)); }
.cost-track i { background: linear-gradient(90deg, var(--accent-teal), var(--accent-amber)); }
.viz-total-line { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.viz-total-line span { color: var(--muted); }
.viz-total-line b { color: var(--text-strong); }
.pro-donut-layout { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 18px; align-items: center; }
.pro-donut { width: 142px; height: 142px; }
.legend-stack, .pro-legend { display: grid; gap: 9px; }
.legend-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line-soft); border-radius: 13px; background: rgba(255,255,255,.035); }
.legend-row .mini-progress { grid-column: 1 / -1; }
.trend-timeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.trend-tile span, .trend-tile small { display: block; color: var(--muted); font-weight: 850; }
.trend-tile strong { display: block; font-size: 24px; margin: 5px 0; }
.heat-cell { display: grid; gap: 2px; padding: 8px; border-radius: 12px; background: rgba(53,214,255,.08); border: 1px solid rgba(53,214,255,.18); }
.heat-cell b { color: var(--text-strong); }
.heat-cell small { color: var(--muted); }
.total-stack { display: grid; gap: 10px; }
.total-stack > div { display: flex; justify-content: space-between; gap: 10px; }
.report-detail-card { padding: 18px; --card-accent: var(--accent-blue); }
.report-detail-total-line, .detail-table-total-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(73,220,136,.28);
  border-radius: var(--radius);
  background: rgba(73,220,136,.09);
}
.column-toggle-grid, .hr-column-toggle-grid, .visual-toggle-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin-top: 10px; }

/* ========================================================================== 
   Master data / forms / detail pages
   ========================================================================== */
.filter-panel, .advanced-report-filters, .hr-filter-panel { margin-bottom: 16px; }
.filter-form, .audit-filter-form, .company-filter-form, .hr-report-filter-form, .hr-personnel-search { display: grid; grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(150px, 1fr)) auto; gap: 12px; align-items: end; }
.hr-report-filter-form { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.search-field { min-width: 260px; }
.small-field { min-width: 140px; }
.tiny-field { min-width: 100px; }
.is-hidden { display: none !important; }
.company-form, .facility-form, .human-resource-form, .compact-user-form, .stack-form, .reference-form { display: grid; gap: 16px; }
.form-strip, .remuneration-panel, .import-ready-panel, .activation-strip, .detail-actions-bar {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
}
.form-strip { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.detail-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.detail-item, .compact-detail, .notes-box, .attribute-pill, .schema-chip, .department-chip {
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
}
.detail-item span, .notes-box span { display: block; color: var(--muted); font-weight: 850; margin-bottom: 4px; }
.detail-item strong, .notes-box p { color: var(--text-strong); }
.notes-box { margin-top: 14px; }
.facility-form .facility-plant-only,
.facility-form .facility-warehouse-only,
.facility-form .facility-workarea-only,
.facility-form .facility-yard-only,
.facility-form .facility-accommodation-only,
.facility-form .facility-project-fields,
.facility-form .facility-project-only,
.facility-form .facility-resource-relation-fields,
.facility-form .facility-area-fields,
.facility-form .facility-technical-fields { margin-top: 10px; }

/* ========================================================================== 
   Authentication
   ========================================================================== */
.page-auth .page-shell, .auth-shell { min-height: calc(100vh - 116px); display: grid; place-items: center; }
.page-auth .site-footer { color: rgba(255,255,255,.48); }
.auth-card { width: min(470px, calc(100vw - 32px)); padding: 30px; --card-accent: var(--accent-cyan); box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 32px; }
.auth-card .actions { margin-top: 8px; }

/* ========================================================================== 
   Interactive states and scrollbars
   ========================================================================== */
.click-filter-cell, .click-filter-row { cursor: pointer; }
.click-filter-cell:hover { color: var(--accent-cyan); text-decoration: underline; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.04); border-radius: 999px; }
::-webkit-scrollbar-thumb { background: rgba(154,180,210,.34); border-radius: 999px; border: 2px solid rgba(5,14,26,.7); }
::-webkit-scrollbar-thumb:hover { background: rgba(90,167,255,.55); }

/* ========================================================================== 
   Page accents
   ========================================================================== */
.page-admin .page-head, .page-admin .section-header-clean, .page-admin .section-page-head { border-color: rgba(90,167,255,.26); }
.page-hr .page-head, .page-hr .section-header-clean, .page-hr .section-page-head, .page-hr .hr-command-panel, .page-hr .hr-register-card { --card-accent: var(--accent-green); border-color: rgba(73,220,136,.24); }
.page-master .page-head, .page-master .section-header-clean, .page-master .section-page-head { border-color: rgba(45,212,191,.24); }
.page-users .users-panel, .page-access-management .users-panel { --card-accent: var(--accent-blue); }
.page-rbac .interface-matrix-panel, .page-rbac .hierarchy-matrix-panel { --card-accent: var(--accent-purple); }
.page-companies .metric-card:nth-child(1), .page-companies .users-panel { --card-accent: var(--accent-blue); }
.page-facilities .metric-card:nth-child(1), .page-facilities .table-panel { --card-accent: var(--accent-teal); }
.page-physical-assets .metric-card:nth-child(1), .page-physical-assets .table-panel { --card-accent: var(--accent-teal); }
.page-reference .section-card-large:first-child { --card-accent: var(--accent-green); }
.metric-card:nth-child(1), .admin-overview-bar article:nth-child(1), .workspace-pulse-grid article:nth-child(1) { --card-accent: var(--accent-blue); }
.metric-card:nth-child(2), .admin-overview-bar article:nth-child(2), .workspace-pulse-grid article:nth-child(2) { --card-accent: var(--accent-green); }
.metric-card:nth-child(3), .admin-overview-bar article:nth-child(3), .workspace-pulse-grid article:nth-child(3) { --card-accent: var(--accent-teal); }
.metric-card:nth-child(4), .admin-overview-bar article:nth-child(4), .workspace-pulse-grid article:nth-child(4) { --card-accent: var(--accent-amber); }

/* ========================================================================== 
   RTL
   ========================================================================== */
html[dir="rtl"] body { font-family: Tahoma, Arial, sans-serif; }
html[dir="rtl"] .header-nav { justify-content: flex-start; }
html[dir="rtl"] th { text-align: right; }
html[dir="rtl"] .layer-open::after, html[dir="rtl"] .master-link-row::after, html[dir="rtl"] .ui-page-row::after, html[dir="rtl"] .workspace-page-row::after { content: "‹"; margin-left: 0; margin-right: auto; }
html[dir="rtl"] .workspace-page-right { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .ltr-text, html[dir="rtl"] .ltr-field { direction: ltr !important; unicode-bidi: isolate !important; text-align: left !important; }
html[dir="rtl"] .num-col, html[dir="rtl"] .amount-value, html[dir="rtl"] .amount-col { text-align: left; }

/* ========================================================================== 
   Responsive
   ========================================================================== */
@media (max-width: 1320px) {
  .exec-capsule-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .metric-row, .admin-overview-bar, .admin-snapshot-strip, .workspace-pulse-grid, .exec-command-strip { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .filter-form, .audit-filter-form, .company-filter-form, .hr-personnel-search, .hr-report-filter-form { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 1050px) {
  .admin-map-hero, .workspace-layout, .admin-layer-grid, .master-hub-grid, .report-grid-two, .section-split-layout, .interface-access-grid, .grid-2, .exec-decision-grid { grid-template-columns: 1fr; }
  .pro-viz-grid { grid-template-columns: 1fr; }
  .pro-viz-card.wide-viz { grid-column: auto; }
  .workspace-hero-main, .exec-control-hero, .exec-capsule-header, .panel-head, .page-head, .section-header-clean, .section-page-head { flex-direction: column; align-items: stretch; }
  .exec-control-actions, .workspace-hero-actions { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .header-inner { flex-direction: column; align-items: stretch; }
  .header-nav { justify-content: flex-start; overflow-x: auto; padding-bottom: 3px; }
  .brand-logo { height: 48px; }
  .brand-block { height: 38px; min-width: 46px; font-size: 22px; }
  .brand-rest { height: 38px; font-size: 22px; }
  .page-shell { width: min(100vw - 18px, var(--max-page)); padding-top: 14px; }
  .metric-row, .admin-overview-bar, .admin-snapshot-strip, .workspace-pulse-grid, .exec-command-strip, .executive-number-grid, .executive-highlight-strip, .form-grid, .form-grid-3, .form-grid-4, .advanced-filter-grid, .filter-grid-6, .column-filter-grid, .detail-grid, .compact-detail-grid, .exec-capsule-grid, .exec-health-layout, .pro-donut-layout, .viz-total-line { grid-template-columns: 1fr; }
  .filter-form, .audit-filter-form, .company-filter-form, .hr-personnel-search, .hr-report-filter-form { grid-template-columns: 1fr; }
  .search-field { min-width: 0; }
  .page-head, .section-header-clean, .section-page-head, .admin-map-hero, .hr-page-head, .workspace-hero, .exec-control-hero { padding: 18px; border-radius: 20px; }
  .table-wrap, .hr-scroll-shell { border-radius: 14px; }
}

/* ========================================================================== 
   FINAL HOTFIX: RTL brand lock + HR report/personnel filter controls
   ========================================================================== */
.brand,
.brand-wordmark {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  flex-direction: row !important;
}
html[dir="rtl"] .brand,
html[dir="rtl"] .brand-wordmark {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  flex-direction: row !important;
}
html[dir="rtl"] .brand-logo { order: 0; }
html[dir="rtl"] .brand-wordmark { order: 1; }
html[dir="rtl"] .brand-pp { order: 0; }
html[dir="rtl"] .brand-co { order: 1; }
html[dir="rtl"] .brand-rest { order: 2; }

.page-hr-reports .pro-report-controls,
.page-hr-reports .hr-report-control-panel,
.page-hr-personnel .hr-filter-panel,
.page-hr-personnel .personnel-filter-form {
  overflow: visible;
}
.page-hr-reports .hr-report-filter-form,
.page-hr-personnel .personnel-filter-form {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.page-hr-reports .hr-report-filter-form > *,
.page-hr-personnel .personnel-filter-form > * {
  width: 100%;
  min-width: 0;
}
.page-hr-reports .filter-section-title,
.page-hr-personnel .filter-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}
.page-hr-reports .filter-section-title h2,
.page-hr-personnel .filter-section-title h2 { margin: 2px 0 0; }
.page-hr-reports .filter-section-title p,
.page-hr-personnel .filter-section-title p {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 70ch;
}
.page-hr-reports .report-view-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
}
.page-hr-reports .report-view-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 850;
}
.page-hr-reports .report-view-toggle label:hover { background: rgba(90,167,255,.10); }
.page-hr-reports .hr-report-filter-form .form-grid,
.page-hr-reports .hr-report-filter-form .form-grid-4,
.page-hr-reports .hr-report-filter-form .column-filter-grid,
.page-hr-reports .hr-report-filter-form .amount-filter-grid,
.page-hr-reports .matrix-control-grid,
.page-hr-personnel .personnel-filter-form .form-grid,
.page-hr-personnel .personnel-filter-form .form-grid-4,
.page-hr-personnel .personnel-filter-form .column-filter-grid,
.page-hr-personnel .personnel-filter-form .amount-filter-grid,
.page-hr-personnel .personnel-top-filter-grid {
  align-items: start;
}
.page-hr-personnel .personnel-top-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(170px, 1fr));
  gap: 14px;
}
.page-hr-reports .advanced-report-filters,
.page-hr-reports .column-report-filters,
.page-hr-reports .infographic-config-panel,
.page-hr-personnel .advanced-report-filters,
.page-hr-personnel .column-report-filters,
.page-hr-personnel .infographic-config-panel {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.035);
}
.page-hr-reports .advanced-report-filters > summary,
.page-hr-reports .column-report-filters > summary,
.page-hr-reports .infographic-config-panel > summary,
.page-hr-personnel .advanced-report-filters > summary,
.page-hr-personnel .column-report-filters > summary,
.page-hr-personnel .infographic-config-panel > summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 18px;
  font-weight: 900;
  color: var(--text-strong);
  background: rgba(255,255,255,.05);
}
.page-hr-reports .advanced-report-filters > summary::-webkit-details-marker,
.page-hr-reports .column-report-filters > summary::-webkit-details-marker,
.page-hr-reports .infographic-config-panel > summary::-webkit-details-marker,
.page-hr-personnel .advanced-report-filters > summary::-webkit-details-marker,
.page-hr-personnel .column-report-filters > summary::-webkit-details-marker,
.page-hr-personnel .infographic-config-panel > summary::-webkit-details-marker { display: none; }
.page-hr-reports .advanced-report-filters[open] > summary,
.page-hr-reports .column-report-filters[open] > summary,
.page-hr-reports .infographic-config-panel[open] > summary,
.page-hr-personnel .advanced-report-filters[open] > summary,
.page-hr-personnel .column-report-filters[open] > summary,
.page-hr-personnel .infographic-config-panel[open] > summary { border-bottom: 1px solid var(--line-soft); }
.page-hr-reports .advanced-report-filters > .form-grid,
.page-hr-reports .column-report-filters > .section-note,
.page-hr-reports .column-report-filters > .column-filter-grid,
.page-hr-reports .column-report-filters > .amount-filter-grid,
.page-hr-reports .infographic-config-panel > .visual-config-actions,
.page-hr-reports .infographic-config-panel > .visual-toggle-grid,
.page-hr-personnel .advanced-report-filters > .form-grid,
.page-hr-personnel .column-report-filters > .section-note,
.page-hr-personnel .column-report-filters > .column-filter-grid,
.page-hr-personnel .column-report-filters > .amount-filter-grid,
.page-hr-personnel .personnel-range-filters > .amount-filter-grid {
  padding: 16px;
}
.page-hr-reports .column-report-filters > .amount-filter-grid,
.page-hr-personnel .column-report-filters > .amount-filter-grid { padding-top: 0; }
.page-hr-reports .section-note,
.page-hr-personnel .section-note { margin: 0; color: var(--muted); }
.page-hr-reports .field,
.page-hr-personnel .field {
  min-width: 0;
  align-self: start;
  align-content: start;
}
.page-hr-reports .multi-filter-shell,
.page-hr-reports .viz-inner-filter,
.page-hr-personnel .multi-filter-shell,
.page-hr-personnel .viz-inner-filter {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}
.page-hr-reports .report-multi-field,
.page-hr-reports .amount-filter-pair,
.page-hr-personnel .report-multi-field,
.page-hr-personnel .amount-filter-pair { min-width: 0; }
.page-hr-reports .multi-filter-actions,
.page-hr-reports .viz-row-picker-actions,
.page-hr-reports .visual-config-actions,
.page-hr-personnel .multi-filter-actions,
.page-hr-personnel .viz-row-picker-actions,
.page-hr-personnel .visual-config-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.page-hr-reports .multi-filter-actions .multi-selected-count,
.page-hr-reports .viz-row-picker-actions .multi-selected-count,
.page-hr-personnel .multi-filter-actions .multi-selected-count,
.page-hr-personnel .viz-row-picker-actions .multi-selected-count { margin-inline-end: auto; }
.page-hr-reports .report-multi-select,
.page-hr-reports .viz-row-picker,
.page-hr-personnel .report-multi-select,
.page-hr-personnel .viz-row-picker {
  display: block;
  width: 100%;
  min-height: 160px;
  height: 160px;
  overflow: auto;
  padding: 6px;
  overscroll-behavior: contain;
}
.page-hr-reports .report-multi-select option,
.page-hr-reports .viz-row-picker option,
.page-hr-personnel .report-multi-select option,
.page-hr-personnel .viz-row-picker option {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-hr-reports .amount-filter-grid,
.page-hr-personnel .amount-filter-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
}
.page-hr-reports .amount-filter-pair,
.page-hr-personnel .amount-filter-pair {
  display: grid;
  gap: 8px;
  align-content: start;
}
.page-hr-reports .amount-filter-pair > div,
.page-hr-personnel .amount-filter-pair > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.page-hr-reports .matrix-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.035);
}
.page-hr-reports .matrix-control-grid .filter-actions { justify-content: flex-end; }
.page-hr-personnel .personnel-filter-actions {
  padding-top: 2px;
  justify-content: flex-end;
}
@media (max-width: 1320px) {
  .page-hr-reports .matrix-control-grid,
  .page-hr-personnel .personnel-top-filter-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}
@media (max-width: 760px) {
  .page-hr-reports .form-grid.form-grid-4,
  .page-hr-reports .column-filter-grid,
  .page-hr-reports .amount-filter-grid,
  .page-hr-reports .matrix-control-grid,
  .page-hr-personnel .form-grid.form-grid-4,
  .page-hr-personnel .column-filter-grid,
  .page-hr-personnel .amount-filter-grid,
  .page-hr-personnel .personnel-top-filter-grid {
    grid-template-columns: 1fr;
  }
  .page-hr-reports .report-view-toggle { border-radius: 20px; }
}

/* ==========================================================================
   Theme switcher: existing dark mode is preserved; light mode is additive
   ========================================================================== */
html[data-theme="dark"] { color-scheme: dark; }

.theme-toggle {
  min-height: 38px;
  padding: 6px 11px 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, .20);
  background: rgba(10, 25, 43, .72);
  color: var(--text-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  gap: 7px;
  white-space: nowrap;
}
.theme-toggle:hover {
  background: rgba(90, 167, 255, .12);
  border-color: rgba(90, 167, 255, .28);
  color: var(--text-strong);
}
.theme-toggle-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #06101d;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
}
.theme-toggle-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -.01em;
}
html[dir="rtl"] .theme-toggle {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}
@media (max-width: 760px) {
  .theme-toggle-label { display: none; }
  .theme-toggle { padding-inline: 7px; }
}

html[data-theme="light"] {
  color-scheme: light;

  --bg-0: #eef4f9;
  --bg-1: #f7fafc;
  --bg-2: #e8f1f8;
  --surface-0: #ffffff;
  --surface-1: #f8fafc;
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --surface-input: #ffffff;
  --surface-table: #ffffff;
  --surface-table-2: #f8fafc;
  --surface: #ffffff;

  --text: #1f2937;
  --text-strong: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --muted-2: #7b8797;
  --line: rgba(15, 23, 42, 0.14);
  --line-strong: rgba(15, 23, 42, 0.22);
  --line-soft: rgba(15, 23, 42, 0.09);
  --border: var(--line);
  --border-soft: var(--line-soft);
  --text-muted: var(--muted);

  --accent-blue: #2563eb;
  --accent-cyan: #0891b2;
  --accent-teal: #0f766e;
  --accent-green: #059669;
  --accent-amber: #b45309;
  --accent-orange: #c2410c;
  --accent-purple: #7c3aed;
  --accent-pink: #be185d;
  --accent-red: #dc2626;

  --blue-soft: rgba(37, 99, 235, 0.10);
  --green-soft: rgba(5, 150, 105, 0.11);
  --teal-soft: rgba(15, 118, 110, 0.10);
  --amber-soft: rgba(180, 83, 9, 0.11);
  --purple-soft: rgba(124, 58, 237, 0.10);
  --red-soft: rgba(220, 38, 38, 0.10);
  --cyan-soft: rgba(8, 145, 178, 0.10);

  --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.08);
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.10);
  --shadow-md: var(--shadow);
  --shadow-lg: 0 26px 72px rgba(15, 23, 42, 0.14);
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

html[data-theme="light"] body {
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(8, 145, 178, 0.10), transparent 30%),
    radial-gradient(circle at 88% 7%, rgba(5, 150, 105, 0.10), transparent 28%),
    radial-gradient(circle at 65% 110%, rgba(124, 58, 237, 0.08), transparent 30%),
    linear-gradient(135deg, #edf4fa 0%, #f8fafc 48%, #eaf2f8 100%);
}
html[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(15,23,42,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
  mask-image: radial-gradient(circle at top, black 0%, transparent 78%);
}
html[data-theme="light"] ::selection { background: rgba(37, 99, 235, 0.18); color: var(--text-strong); }
html[data-theme="light"] a:hover { color: #1d4ed8; }
html[data-theme="light"] code {
  color: #0f766e;
  background: rgba(8, 145, 178, .08);
  border-color: rgba(8, 145, 178, .20);
}

html[data-theme="light"] .site-header,
html[data-theme="light"] .clean-site-header {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.09);
}
html[data-theme="light"] .brand-logo { filter: drop-shadow(0 8px 14px rgba(15,23,42,.12)); }
html[data-theme="light"] .brand-block { box-shadow: inset 0 1px 0 rgba(255,255,255,.40), 0 8px 18px rgba(15,23,42,.12); }
html[data-theme="light"] .brand-rest { color: var(--text-strong); text-shadow: none; }
html[data-theme="light"] .nav-link,
html[data-theme="light"] .lang-link,
html[data-theme="light"] .current-user { color: var(--text-soft); }
html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .primary-nav-link {
  background: rgba(37, 99, 235, .08);
  border-color: rgba(37, 99, 235, .16);
  color: var(--text-strong);
}
html[data-theme="light"] .primary-nav-link { box-shadow: inset 0 1px 0 rgba(255,255,255,.65); }
html[data-theme="light"] .nav-logout { color: #b91c1c; }
html[data-theme="light"] .nav-logout:hover {
  background: rgba(220, 38, 38, .08);
  border-color: rgba(220, 38, 38, .18);
}
html[data-theme="light"] .language-switch,
html[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(15, 23, 42, .12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}
html[data-theme="light"] .theme-toggle:hover {
  background: rgba(37, 99, 235, .08);
  border-color: rgba(37, 99, 235, .18);
}
html[data-theme="light"] .lang-link.active,
html[data-theme="light"] .theme-toggle-icon { color: #ffffff; }
html[data-theme="light"] .site-footer,
html[data-theme="light"] .page-auth .site-footer { color: var(--muted-2); }

html[data-theme="light"] .panel,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .metric-card,
html[data-theme="light"] .admin-layer-card,
html[data-theme="light"] .master-hub-card,
html[data-theme="light"] .config-area-card,
html[data-theme="light"] .ui-group-card,
html[data-theme="light"] .interface-group-card,
html[data-theme="light"] .interface-policy-card,
html[data-theme="light"] .access-picker,
html[data-theme="light"] .workflow-card,
html[data-theme="light"] .workspace-hero,
html[data-theme="light"] .workspace-modules-panel,
html[data-theme="light"] .workspace-profile-panel,
html[data-theme="light"] .workspace-rule-panel,
html[data-theme="light"] .workspace-module-card,
html[data-theme="light"] .exec-command-tile,
html[data-theme="light"] .exec-capsule-shell,
html[data-theme="light"] .exec-insight-panel,
html[data-theme="light"] .exec-decision-panel,
html[data-theme="light"] .pro-viz-card,
html[data-theme="light"] .report-panel,
html[data-theme="light"] .form-panel,
html[data-theme="light"] .detail-panel,
html[data-theme="light"] .hr-command-panel,
html[data-theme="light"] .hr-register-card,
html[data-theme="light"] .table-panel,
html[data-theme="light"] .users-panel,
html[data-theme="light"] .section-card-large {
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(248,250,252,.76)),
    var(--surface-glass);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
html[data-theme="light"] .page-head,
html[data-theme="light"] .section-header-clean,
html[data-theme="light"] .section-page-head,
html[data-theme="light"] .compact-page-head,
html[data-theme="light"] .admin-map-hero,
html[data-theme="light"] .hr-page-head {
  border-color: rgba(37, 99, 235, .16);
  background:
    radial-gradient(circle at 0 0, rgba(37,99,235,.10), transparent 34%),
    radial-gradient(circle at 100% 0, rgba(5,150,105,.08), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.95), rgba(241,245,249,.90));
  box-shadow: var(--shadow);
}

html[data-theme="light"] .btn,
html[data-theme="light"] button,
html[data-theme="light"] a.btn {
  color: var(--text-strong);
  background: rgba(255,255,255,.74);
  border-color: var(--line-strong);
}
html[data-theme="light"] .btn:hover,
html[data-theme="light"] button:hover,
html[data-theme="light"] a.btn:hover { box-shadow: 0 14px 28px rgba(15,23,42,.10); }
html[data-theme="light"] .btn-primary,
html[data-theme="light"] button[type="submit"] {
  background: linear-gradient(135deg, #2563eb, #059669);
  border-color: rgba(255,255,255,.42);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, .16);
}
html[data-theme="light"] .btn-secondary {
  background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(8,145,178,.07));
  border-color: rgba(37,99,235,.20);
  color: #1e3a8a;
}
html[data-theme="light"] .btn-ghost {
  background: rgba(255,255,255,.58);
  border-color: rgba(15,23,42,.12);
  color: var(--text-soft);
}
html[data-theme="light"] .btn-danger {
  background: linear-gradient(135deg, rgba(220,38,38,.12), rgba(220,38,38,.06));
  border-color: rgba(220,38,38,.22);
  color: #991b1b;
}
html[data-theme="light"] .btn-success {
  background: linear-gradient(135deg, rgba(5,150,105,.13), rgba(5,150,105,.06));
  border-color: rgba(5,150,105,.22);
  color: #065f46;
}

html[data-theme="light"] .input,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .multi-select,
html[data-theme="light"] .report-multi-select,
html[data-theme="light"] .viz-row-picker,
html[data-theme="light"] .viz-sort-select,
html[data-theme="light"] .viz-display-mode,
html[data-theme="light"] .viz-row-search,
html[data-theme="light"] .multi-filter-search {
  border-color: rgba(15, 23, 42, .14);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: var(--text-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}
html[data-theme="light"] .input::placeholder,
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #94a3b8; }
html[data-theme="light"] select option,
html[data-theme="light"] .multi-select option,
html[data-theme="light"] .report-multi-select option,
html[data-theme="light"] .viz-row-picker option { color: var(--text-strong); background: #ffffff; }
html[data-theme="light"] select option:checked,
html[data-theme="light"] .multi-select option:checked,
html[data-theme="light"] .report-multi-select option:checked,
html[data-theme="light"] .viz-row-picker option:checked { background: #dbeafe; color: #1e3a8a; }
html[data-theme="light"] .error-box {
  background: rgba(220,38,38,.08);
  border-color: rgba(220,38,38,.20);
  color: #991b1b;
}
html[data-theme="light"] .form-actions-sticky {
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 28px rgba(15,23,42,.10);
}
html[data-theme="light"] .checkbox-field,
html[data-theme="light"] .column-toggle-item,
html[data-theme="light"] .visual-toggle-item,
html[data-theme="light"] .flash,
html[data-theme="light"] .form-strip,
html[data-theme="light"] .remuneration-panel,
html[data-theme="light"] .import-ready-panel,
html[data-theme="light"] .activation-strip,
html[data-theme="light"] .detail-actions-bar,
html[data-theme="light"] .detail-item,
html[data-theme="light"] .compact-detail,
html[data-theme="light"] .notes-box,
html[data-theme="light"] .attribute-pill,
html[data-theme="light"] .schema-chip,
html[data-theme="light"] .department-chip,
html[data-theme="light"] .layer-paths span,
html[data-theme="light"] .layer-mini-list span,
html[data-theme="light"] .module-tags span,
html[data-theme="light"] .classification-rules div,
html[data-theme="light"] .compact-event,
html[data-theme="light"] .master-link-row,
html[data-theme="light"] .config-link-stack a,
html[data-theme="light"] .ui-page-row,
html[data-theme="light"] .workspace-page-row,
html[data-theme="light"] .interface-node-summary,
html[data-theme="light"] .module-bulk-bar,
html[data-theme="light"] .access-model-strip article,
html[data-theme="light"] .access-design-note,
html[data-theme="light"] .permission-user-option,
html[data-theme="light"] .user-permission-card,
html[data-theme="light"] .user-permission-group,
html[data-theme="light"] .permission-admin-message,
html[data-theme="light"] .user-ui-permission-row,
html[data-theme="light"] .single-user-permission-toolbar,
html[data-theme="light"] .user-permission-toolbar,
html[data-theme="light"] .permission-switch,
html[data-theme="light"] .exec-split-metrics a,
html[data-theme="light"] .exec-status-list a,
html[data-theme="light"] .executive-number-block,
html[data-theme="light"] .executive-highlight-item,
html[data-theme="light"] .driver-row,
html[data-theme="light"] .executive-risk-card,
html[data-theme="light"] .executive-status-row,
html[data-theme="light"] .risk-stack > div,
html[data-theme="light"] .viz-sort-box,
html[data-theme="light"] .viz-inner-filter,
html[data-theme="light"] .multi-filter-shell,
html[data-theme="light"] .column-report-filters,
html[data-theme="light"] .advanced-filters,
html[data-theme="light"] .infographic-config-panel,
html[data-theme="light"] .column-config-panel,
html[data-theme="light"] .pro-bar-row,
html[data-theme="light"] .report-list-row,
html[data-theme="light"] .trend-tile,
html[data-theme="light"] .viz-total-line,
html[data-theme="light"] .split-total-line,
html[data-theme="light"] .total-stack > div,
html[data-theme="light"] .legend-row,
html[data-theme="light"] .filter-section-title,
html[data-theme="light"] .report-view-toggle,
html[data-theme="light"] .advanced-report-filters,
html[data-theme="light"] .column-report-filters,
html[data-theme="light"] .infographic-config-panel,
html[data-theme="light"] .matrix-control-grid {
  background: rgba(15,23,42,.025);
  border-color: var(--line-soft);
}
html[data-theme="light"] .flash-success { background: rgba(5,150,105,.10); border-color: rgba(5,150,105,.20); }
html[data-theme="light"] .flash-danger { background: rgba(220,38,38,.09); border-color: rgba(220,38,38,.20); }
html[data-theme="light"] .flash-warning { background: rgba(180,83,9,.10); border-color: rgba(180,83,9,.20); }
html[data-theme="light"] .flash-info { background: rgba(37,99,235,.09); border-color: rgba(37,99,235,.18); }

html[data-theme="light"] .table-wrap,
html[data-theme="light"] .users-table-wrap,
html[data-theme="light"] .audit-table-wrap,
html[data-theme="light"] .hr-scroll-shell,
html[data-theme="light"] .report-detail-scroll-shell,
html[data-theme="light"] .matrix-heatmap-wrap,
html[data-theme="light"] .cost-summary-table-wrap {
  background: rgba(255,255,255,.88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86), var(--shadow-sm);
}
html[data-theme="light"] th,
html[data-theme="light"] td,
html[data-theme="light"] .data-table th,
html[data-theme="light"] .data-table td {
  border-bottom-color: rgba(15,23,42,.08);
  color: var(--text-soft);
}
html[data-theme="light"] th,
html[data-theme="light"] .data-table th,
html[data-theme="light"] .hr-grid-th {
  color: #334155;
  background: linear-gradient(180deg, #f8fafc, #e9eff6);
}
html[data-theme="light"] tbody tr:nth-child(even) td { background: rgba(15,23,42,.018); }
html[data-theme="light"] tbody tr:hover td { background: rgba(37,99,235,.06); }
html[data-theme="light"] tfoot td { background: rgba(5,150,105,.08); }
html[data-theme="light"] .empty-cell {
  color: var(--muted);
  border-color: rgba(15,23,42,.14);
  background: rgba(15,23,42,.025);
}
html[data-theme="light"] .sort-link,
html[data-theme="light"] .hr-sort-link,
html[data-theme="light"] .layer-open { color: #1e3a8a; }
html[data-theme="light"] .hr-grid-cell {
  color: var(--text-soft);
  background: var(--surface-table);
  border-right-color: rgba(15,23,42,.08);
  border-bottom-color: rgba(15,23,42,.08);
}
html[data-theme="light"] .hr-grid-data-row:nth-child(even) .hr-grid-cell { background: var(--surface-table-2); }
html[data-theme="light"] .hr-grid-data-row:hover .hr-grid-cell { background: rgba(37,99,235,.07); }

html[data-theme="light"] .badge,
html[data-theme="light"] .layer-badge,
html[data-theme="light"] .audit-action-chip,
html[data-theme="light"] .workspace-access-pill,
html[data-theme="light"] .group-code,
html[data-theme="light"] .layer-code,
html[data-theme="light"] .exec-module-code,
html[data-theme="light"] .exec-data-badge,
html[data-theme="light"] .module-status,
html[data-theme="light"] .department-chip,
html[data-theme="light"] .attribute-pill,
html[data-theme="light"] .schema-chip,
html[data-theme="light"] .executive-filter-pill,
html[data-theme="light"] .hr-page-indicator,
html[data-theme="light"] .compact-chip-grid span,
html[data-theme="light"] .master-link-row em,
html[data-theme="light"] .ui-page-row em,
html[data-theme="light"] .viz-card-head > span,
html[data-theme="light"] .workspace-page-icon {
  color: #1e3a8a;
  background: var(--blue-soft);
  border-color: rgba(37,99,235,.18);
}
html[data-theme="light"] .badge-active,
html[data-theme="light"] .live,
html[data-theme="light"] .badge-success,
html[data-theme="light"] .workspace-access-pill.edit { color: #065f46; background: var(--green-soft); border-color: rgba(5,150,105,.20); }
html[data-theme="light"] .badge-inactive,
html[data-theme="light"] .badge-muted,
html[data-theme="light"] .muted-link { color: #475569; background: rgba(100,116,139,.09); border-color: rgba(100,116,139,.17); }
html[data-theme="light"] .badge-planned,
html[data-theme="light"] .planned,
html[data-theme="light"] .badge-warning,
html[data-theme="light"] .badge-draft { color: #92400e; background: var(--amber-soft); border-color: rgba(180,83,9,.22); }
html[data-theme="light"] .badge-disposed { color: #991b1b; background: var(--red-soft); border-color: rgba(220,38,38,.20); }
html[data-theme="light"] .badge-admin { color: #9a3412; background: rgba(194,65,12,.10); border-color: rgba(194,65,12,.22); }
html[data-theme="light"] .badge-user { color: #155e75; background: var(--cyan-soft); border-color: rgba(8,145,178,.20); }
html[data-theme="light"] .mini-avatar,
html[data-theme="light"] .small-avatar,
html[data-theme="light"] .avatar,
html[data-theme="light"] .avatar-lg,
html[data-theme="light"] .workspace-avatar { box-shadow: 0 10px 20px rgba(15,23,42,.12); }

html[data-theme="light"] .admin-map-note {
  background: linear-gradient(135deg, rgba(180,83,9,.10), rgba(255,255,255,.55));
  border-color: rgba(180,83,9,.18);
}
html[data-theme="light"] .admin-overview-bar article,
html[data-theme="light"] .admin-snapshot-strip article,
html[data-theme="light"] .workspace-pulse-grid article,
html[data-theme="light"] .metric-card,
html[data-theme="light"] .role-summary-card {
  background: linear-gradient(180deg, rgba(255,255,255,.84), rgba(248,250,252,.72));
}
html[data-theme="light"] .interface-group-summary,
html[data-theme="light"] .ui-group-summary,
html[data-theme="light"] .workspace-module-summary {
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(241,245,249,.64));
}
html[data-theme="light"] .interface-group-body,
html[data-theme="light"] .ui-group-body,
html[data-theme="light"] .workspace-page-list { background: rgba(241,245,249,.50); }
html[data-theme="light"] .physical-asset-tabs {
  background: rgba(255,255,255,.74);
  border-color: rgba(15,23,42,.10);
  box-shadow: var(--shadow-sm);
}
html[data-theme="light"] .physical-asset-tab {
  background: rgba(15,23,42,.025);
  color: var(--text-soft);
}
html[data-theme="light"] .physical-asset-tab:hover {
  background: rgba(37,99,235,.07);
  border-color: rgba(37,99,235,.16);
}
html[data-theme="light"] .physical-asset-tab.active {
  color: var(--text-strong);
  border-color: rgba(15,118,110,.24);
  background: linear-gradient(135deg, rgba(15,118,110,.09), rgba(37,99,235,.06));
}
html[data-theme="light"] .physical-asset-tab em,
html[data-theme="light"] .asset-type-code,
html[data-theme="light"] .tab-code {
  color: #155e75;
  background: var(--cyan-soft);
  border-color: rgba(8,145,178,.20);
}
html[data-theme="light"] .access-picker-head-static,
html[data-theme="light"] .user-permission-summary,
html[data-theme="light"] .user-permission-group-summary,
html[data-theme="light"] .group-metric-pills span,
html[data-theme="light"] .user-permission-counts span,
html[data-theme="light"] .workspace-module-stats span { background: rgba(15,23,42,.025); }

html[data-theme="light"] .exec-control-hero {
  background:
    radial-gradient(circle at 10% 0, rgba(8,145,178,.11), transparent 36%),
    linear-gradient(135deg, rgba(255,255,255,.95), rgba(236,245,252,.90));
}
html[data-theme="light"] .exec-capsule-header { background: linear-gradient(135deg, rgba(5,150,105,.08), rgba(37,99,235,.06)); }
html[data-theme="light"] .exec-capsule-health { background: rgba(5,150,105,.08); border-color: rgba(5,150,105,.18); }
html[data-theme="light"] .exec-ratio-bar,
html[data-theme="light"] .exec-status-list em,
html[data-theme="light"] .mini-progress,
html[data-theme="light"] .pro-bar-track { background: rgba(15,23,42,.08); }
html[data-theme="light"] .exec-health-donut,
html[data-theme="light"] .executive-donut,
html[data-theme="light"] .pro-donut {
  background: conic-gradient(var(--accent-green) 0 var(--active), rgba(15,23,42,.08) var(--active) 100%);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.07), 0 16px 34px rgba(15,23,42,.10);
}
html[data-theme="light"] .hr-executive-dashboard {
  border-color: rgba(5,150,105,.18);
  background:
    radial-gradient(circle at 0 0, rgba(5,150,105,.10), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(240,253,250,.82));
}
html[data-theme="light"] .heat-cell {
  background: rgba(8,145,178,.08);
  border-color: rgba(8,145,178,.16);
}
html[data-theme="light"] .report-detail-total-line,
html[data-theme="light"] .detail-table-total-line {
  border-color: rgba(5,150,105,.20);
  background: rgba(5,150,105,.08);
}

html[data-theme="light"] .page-hr-reports .filter-section-title,
html[data-theme="light"] .page-hr-personnel .filter-section-title {
  background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(241,245,249,.64));
}
html[data-theme="light"] .page-hr-reports .report-view-toggle label {
  background: rgba(255,255,255,.70);
  color: var(--text-soft);
}
html[data-theme="light"] .page-hr-reports .report-view-toggle label:hover { background: rgba(37,99,235,.08); }
html[data-theme="light"] .page-hr-reports .advanced-report-filters,
html[data-theme="light"] .page-hr-reports .column-report-filters,
html[data-theme="light"] .page-hr-reports .infographic-config-panel,
html[data-theme="light"] .page-hr-personnel .advanced-report-filters,
html[data-theme="light"] .page-hr-personnel .column-report-filters,
html[data-theme="light"] .page-hr-personnel .infographic-config-panel { background: rgba(255,255,255,.58); }
html[data-theme="light"] .page-hr-reports .advanced-report-filters > summary,
html[data-theme="light"] .page-hr-reports .column-report-filters > summary,
html[data-theme="light"] .page-hr-reports .infographic-config-panel > summary,
html[data-theme="light"] .page-hr-personnel .advanced-report-filters > summary,
html[data-theme="light"] .page-hr-personnel .column-report-filters > summary,
html[data-theme="light"] .page-hr-personnel .infographic-config-panel > summary {
  color: var(--text-strong);
  background: rgba(15,23,42,.035);
}

html[data-theme="light"] ::-webkit-scrollbar-track { background: rgba(15,23,42,.05); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(100,116,139,.36); border-color: rgba(255,255,255,.88); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(37,99,235,.42); }

/* ========================================================================== 
   Business Development / Company Registration
   ========================================================================== */
.page-business-development .table-panel,
.page-business-development .form-panel,
.page-business-development .detail-panel,
.business-registration-hub-panel,
.business-assignee-panel { --card-accent: var(--accent-purple); }

.business-registration-tabs {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: -2px 0 18px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(2, 8, 16, .42);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.business-registration-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text-soft);
  background: rgba(255,255,255,.035);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.business-registration-tab:hover {
  color: var(--text-strong);
  background: rgba(167,139,250,.10);
  border-color: rgba(167,139,250,.30);
  transform: translateY(-1px);
}
.business-registration-tab.active {
  color: var(--text-strong);
  border-color: rgba(167,139,250,.44);
  background: linear-gradient(135deg, rgba(167,139,250,.16), rgba(90,167,255,.10));
}
.business-registration-tab.active::after {
  content: "";
  position: absolute;
  inset: auto 12px 3px 12px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
}
.business-registration-tab strong { font-size: 12px; font-weight: 950; }
.business-registration-tab em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  color: #efe8ff;
  background: rgba(167,139,250,.13);
  border: 1px solid rgba(167,139,250,.28);
  font-size: 11px;
  font-weight: 950;
  font-style: normal;
}
.business-registration-type-grid { display: grid; gap: 10px; }
.business-registration-type-card { min-height: 74px; }
.business-registration-type-card .asset-type-main { display: grid; gap: 2px; min-width: 0; }
.business-registration-type-card .asset-type-main small { color: var(--muted); line-height: 1.35; }
.business-registration-table { min-width: 3200px; table-layout: fixed; }
.business-registration-table .small-avatar,
.business-registration-detail-panel .avatar-lg { min-width: 42px; }
.business-registration-command-panel { --card-accent: var(--accent-purple); margin-bottom: 14px; }
.business-column-config { margin-top: 14px; }
.business-column-toggle-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.business-registration-scroll-shell { overflow-x: auto; }
.business-registration-table th,
.business-registration-table td { vertical-align: top; }
.business-registration-table th { white-space: normal; }
.business-registration-table td { white-space: normal; line-height: 1.45; }
.business-vendor-cell {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.business-vendor-cell strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-strong);
}
.business-note-cell {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}
.business-note-cell.strong-note { color: var(--text-strong); }
.business-advanced-filters { margin-top: 12px; }
.business-advanced-filters > p { margin: 8px 0 12px; }
.page-business-registration .sort-link { display: inline-flex; align-items: center; gap: 4px; }

.business-registration-filter-grid { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
.business-registration-form .field-disabled { opacity: .68; }
.business-registration-form .field-disabled .input { cursor: not-allowed; }
.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  background: rgba(255,255,255,.035);
  font-weight: 850;
}
.toggle-input { width: 18px; height: 18px; accent-color: var(--accent-green); }
.detail-note-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.badge-normal { color: #dff0ff; background: var(--blue-soft); border-color: rgba(90,167,255,.28); }
.badge-priority { color: #fff3d1; background: var(--amber-soft); border-color: rgba(246,191,79,.36); }
.badge-high-priority { color: #ffdce1; background: var(--red-soft); border-color: rgba(255,107,120,.32); }
.badge-approved,
.badge-registered---vendor-created { color: #dfffea; background: var(--green-soft); border-color: rgba(73,220,136,.32); }
.badge-submitted,
.badge-under-review,
.badge-pending---under-review,
.badge-in-progress,
.badge-clarification-requested,
.badge-returned-for-revision,
.badge-to-be-updated,
.badge-follow-up-required { color: #fff3d1; background: var(--amber-soft); border-color: rgba(246,191,79,.36); }
.badge-rejected,
.badge-not-qualified,
.badge-expired { color: #ffdce1; background: var(--red-soft); border-color: rgba(255,107,120,.32); }
.badge-no-response,
.badge-not-started,
.badge-no-invitation { color: #c3d1e2; background: rgba(148,163,184,.13); border-color: rgba(148,163,184,.25); }

html[data-theme="light"] .business-registration-tabs {
  background: rgba(255,255,255,.74);
  border-color: rgba(15,23,42,.10);
  box-shadow: var(--shadow-sm);
}
html[data-theme="light"] .business-registration-tab {
  background: rgba(15,23,42,.025);
  color: var(--text-soft);
}
html[data-theme="light"] .business-registration-tab:hover {
  color: var(--text-strong);
  background: rgba(109,40,217,.06);
  border-color: rgba(109,40,217,.16);
}
html[data-theme="light"] .business-registration-tab.active {
  color: var(--text-strong);
  border-color: rgba(109,40,217,.22);
  background: linear-gradient(135deg, rgba(109,40,217,.08), rgba(37,99,235,.05));
}
html[data-theme="light"] .business-registration-tab em {
  color: #5b21b6;
  background: var(--purple-soft);
  border-color: rgba(109,40,217,.18);
}
html[data-theme="light"] .switch-row {
  color: var(--text-soft);
  background: rgba(15,23,42,.025);
  border-color: var(--line-soft);
}
html[data-theme="light"] .badge-normal { color: #1e3a8a; background: var(--blue-soft); border-color: rgba(37,99,235,.18); }
html[data-theme="light"] .badge-priority { color: #92400e; background: var(--amber-soft); border-color: rgba(180,83,9,.22); }
html[data-theme="light"] .badge-high-priority { color: #991b1b; background: var(--red-soft); border-color: rgba(220,38,38,.20); }
html[data-theme="light"] .badge-approved,
html[data-theme="light"] .badge-registered---vendor-created { color: #065f46; background: var(--green-soft); border-color: rgba(5,150,105,.20); }
html[data-theme="light"] .badge-submitted,
html[data-theme="light"] .badge-under-review,
html[data-theme="light"] .badge-pending---under-review,
html[data-theme="light"] .badge-in-progress,
html[data-theme="light"] .badge-clarification-requested,
html[data-theme="light"] .badge-returned-for-revision,
html[data-theme="light"] .badge-to-be-updated,
html[data-theme="light"] .badge-follow-up-required { color: #92400e; background: var(--amber-soft); border-color: rgba(180,83,9,.22); }
html[data-theme="light"] .badge-rejected,
html[data-theme="light"] .badge-not-qualified,
html[data-theme="light"] .badge-expired { color: #991b1b; background: var(--red-soft); border-color: rgba(220,38,38,.20); }
html[data-theme="light"] .badge-no-response,
html[data-theme="light"] .badge-not-started,
html[data-theme="light"] .badge-no-invitation { color: #475569; background: rgba(100,116,139,.09); border-color: rgba(100,116,139,.17); }

@media (max-width: 920px) {
  .business-registration-filter-grid,
  .detail-note-grid { grid-template-columns: 1fr; }
}

/* ========================================================================== 
   Business Development attachments
   ========================================================================== */
.business-attachments-panel { --card-accent: var(--accent-purple); margin-top: 16px; }
.attachment-upload-form {
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.035);
}
.attachment-upload-grid { align-items: start; }
.attachment-upload-actions { margin-top: 10px; align-items: center; }
.file-input { padding-top: 11px; }
.attachment-warning-box,
.attachment-empty-state {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(246,191,79,.08);
  color: var(--text-soft);
}
.attachment-warning-box strong,
.attachment-empty-state strong { display: block; color: var(--text-strong); margin-bottom: 4px; }
.attachment-warning-box p,
.attachment-empty-state p { margin: 0; }
.attachment-group-list { display: grid; gap: 12px; }
.attachment-group-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(2, 8, 16, .28);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.attachment-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255,255,255,.035);
}
.attachment-group-head strong { display: block; color: var(--text-strong); font-weight: 950; }
.attachment-group-head small { display: block; margin-top: 3px; color: var(--muted); }
.attachment-file-list { display: grid; }
.attachment-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.055);
}
.attachment-file-row:first-child { border-top: 0; }
.attachment-file-main {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.attachment-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  border: 1px solid rgba(90,167,255,.25);
  background: rgba(90,167,255,.10);
  font-size: 18px;
}
.attachment-file-main strong {
  display: block;
  min-width: 0;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}
.attachment-file-main small { display: block; margin-top: 3px; color: var(--muted); }
.attachment-file-actions { flex-wrap: nowrap; }
.btn-xs { padding: 7px 10px; min-height: 0; font-size: 11px; border-radius: 10px; }

html[data-theme="light"] .attachment-upload-form,
html[data-theme="light"] .attachment-group-card {
  background: rgba(255,255,255,.72);
  border-color: rgba(15,23,42,.10);
}
html[data-theme="light"] .attachment-group-head {
  background: rgba(15,23,42,.025);
  border-color: rgba(15,23,42,.08);
}
html[data-theme="light"] .attachment-file-row { border-color: rgba(15,23,42,.07); }
html[data-theme="light"] .attachment-warning-box,
html[data-theme="light"] .attachment-empty-state {
  background: rgba(245,158,11,.08);
  border-color: rgba(180,83,9,.16);
}
html[data-theme="light"] .attachment-file-icon {
  background: rgba(37,99,235,.07);
  border-color: rgba(37,99,235,.16);
}

@media (max-width: 780px) {
  .attachment-group-head,
  .attachment-file-row { align-items: flex-start; flex-direction: column; }
  .attachment-file-actions { flex-wrap: wrap; }
}

/* Email delivery tracking */
.email-filter-grid {
  grid-template-columns: minmax(240px, 1.6fr) minmax(180px, .8fr) minmax(200px, .9fr) auto;
  align-items: end;
}
.email-delivery-table td,
.email-history-table td { vertical-align: top; }
.message-id-cell {
  max-width: 260px;
  overflow-wrap: anywhere;
  font-size: 12px;
  color: var(--muted);
}
.user-email-history-panel { margin-top: 18px; }
.badge-email-delivered,
.badge-email-opened,
.badge-email-clicked { color: #dfffea; background: var(--green-soft); border-color: rgba(73,220,136,.32); }
.badge-email-sent-to-ses,
.badge-email-created { color: #dcf7ff; background: var(--cyan-soft); border-color: rgba(53,214,255,.30); }
.badge-email-delivery-delayed { color: #fff3d1; background: var(--amber-soft); border-color: rgba(246,191,79,.36); }
.badge-email-bounced,
.badge-email-complained,
.badge-email-rejected,
.badge-email-rendering-failed,
.badge-email-send-failed { color: #ffdce1; background: var(--red-soft); border-color: rgba(255,107,120,.32); }
html[data-theme="light"] .badge-email-delivered,
html[data-theme="light"] .badge-email-opened,
html[data-theme="light"] .badge-email-clicked { color: #065f46; background: var(--green-soft); border-color: rgba(5,150,105,.20); }
html[data-theme="light"] .badge-email-sent-to-ses,
html[data-theme="light"] .badge-email-created { color: #155e75; background: var(--cyan-soft); border-color: rgba(8,145,178,.20); }
html[data-theme="light"] .badge-email-delivery-delayed { color: #92400e; background: var(--amber-soft); border-color: rgba(180,83,9,.22); }
html[data-theme="light"] .badge-email-bounced,
html[data-theme="light"] .badge-email-complained,
html[data-theme="light"] .badge-email-rejected,
html[data-theme="light"] .badge-email-rendering-failed,
html[data-theme="light"] .badge-email-send-failed { color: #991b1b; background: var(--red-soft); border-color: rgba(220,38,38,.20); }
@media (max-width: 920px) {
  .email-filter-grid { grid-template-columns: 1fr; }
}

/* ========================================================================== 
   Plant, Equipment & Vehicles dedicated register
   ========================================================================== */
.page-pev .metric-card.metric-red { --card-accent: var(--accent-red); }
.page-pev .metric-card.metric-amber { --card-accent: var(--accent-amber); }
.page-pev .metric-card.metric-green { --card-accent: var(--accent-green); }
.page-pev .metric-card.metric-blue { --card-accent: var(--accent-blue); }
.pev-filter-grid { grid-template-columns: repeat(6, minmax(150px, 1fr)); }
.pev-filter-grid .span-2 { grid-column: span 2; }
.pev-table-panel .panel-head, .pev-report-card .panel-head { align-items: flex-start; }
.wide-table-wrap { overflow-x: auto; }
.pev-data-table { min-width: 2460px; }
.pev-data-table th,
.pev-data-table td { white-space: nowrap; }
.pev-data-table td:nth-child(5),
.pev-data-table td:nth-child(8),
.pev-data-table td:nth-child(11) { white-space: normal; }
.pev-form .form-strip,
.pev-import-panel .form-strip { border-color: rgba(45,212,191,.20); }
.pev-detail-grid { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
.pev-executive-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: 16px;
  margin-bottom: 18px;
}
.pev-main-report-card { --card-accent: var(--accent-teal); }
.pev-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.pev-report-card { min-height: 100%; }
.pev-mini-bar {
  display: inline-flex;
  width: min(220px, 70%);
  height: 8px;
  margin-inline-end: 8px;
  border-radius: 999px;
  overflow: hidden;
  vertical-align: middle;
  background: rgba(148,163,184,.16);
  border: 1px solid var(--line-soft);
}
.pev-mini-bar i {
  display: block;
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
}
.pev-upload-form { margin-top: 12px; }
.import-result-box {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(45,212,191,.25);
  border-radius: var(--radius-lg);
  background: rgba(45,212,191,.08);
}
.compact-schema-grid { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
.badge-ready-for-work { color: #dfffea; background: var(--green-soft); border-color: rgba(73,220,136,.32); }
.badge-in-project { color: #dcf7ff; background: var(--cyan-soft); border-color: rgba(53,214,255,.30); }
.badge-breakdown { color: #ffdce1; background: var(--red-soft); border-color: rgba(255,107,120,.32); }
.badge-pms, .badge-under-sale { color: #fff3d1; background: var(--amber-soft); border-color: rgba(246,191,79,.36); }
.badge-unassigned { color: #c3d1e2; background: rgba(148,163,184,.13); border-color: rgba(148,163,184,.25); }

html[data-theme="light"] .pev-mini-bar { background: rgba(100,116,139,.10); border-color: rgba(100,116,139,.16); }
html[data-theme="light"] .import-result-box { background: rgba(15,118,110,.08); border-color: rgba(15,118,110,.18); }
html[data-theme="light"] .badge-ready-for-work { color: #065f46; background: var(--green-soft); border-color: rgba(5,150,105,.20); }
html[data-theme="light"] .badge-in-project { color: #155e75; background: var(--cyan-soft); border-color: rgba(8,145,178,.20); }
html[data-theme="light"] .badge-breakdown { color: #991b1b; background: var(--red-soft); border-color: rgba(220,38,38,.20); }
html[data-theme="light"] .badge-pms,
html[data-theme="light"] .badge-under-sale { color: #92400e; background: var(--amber-soft); border-color: rgba(180,83,9,.22); }
html[data-theme="light"] .badge-unassigned { color: #475569; background: rgba(100,116,139,.09); border-color: rgba(100,116,139,.17); }

@media (max-width: 1100px) {
  .pev-filter-grid,
  .pev-detail-grid,
  .pev-report-grid,
  .pev-executive-dashboard { grid-template-columns: 1fr; }
  .pev-filter-grid .span-2 { grid-column: auto; }
}

/* ========================================================================== 
   User Equipment workspace and executive PEV capsule
   ========================================================================== */
.page-equipment { --page-accent: var(--accent-teal); }
.page-equipment .page-shell { width: min(1540px, calc(100vw - 28px)); }
.equipment-page-head { --card-accent: var(--accent-teal); }
.equipment-command-panel,
.equipment-register-card,
.equipment-filter-form { --card-accent: var(--accent-teal); }
.equipment-grid-table .hr-grid-cell[data-col="asset_code"],
.equipment-grid-table .hr-grid-cell[data-col="plate_no"],
.equipment-grid-table .hr-grid-cell[data-col="serial_no"],
.equipment-grid-table .hr-grid-cell[data-col="chassis_no"],
.equipment-grid-table .hr-grid-cell[data-col="employee_id"],
.equipment-grid-table .hr-grid-cell[data-col="manufacture_year"] { justify-content: flex-start; direction: ltr; font-variant-numeric: tabular-nums; }
.equipment-grid-table .hr-grid-cell[data-col="category"],
.equipment-grid-table .hr-grid-cell[data-col="location_name"],
.equipment-grid-table .hr-grid-cell[data-col="assigned_driver"],
.equipment-grid-table .hr-grid-cell[data-col="employee_name"] { white-space: normal; align-items: flex-start; }
.capsule-pev { --card-accent: var(--accent-teal); }
.capsule-pev .exec-capsule-header { background: linear-gradient(135deg, rgba(45,212,191,.14), rgba(90,167,255,.08)); }
.capsule-pev .exec-capsule-health { background: rgba(45,212,191,.10); border-color: rgba(45,212,191,.28); }
html[data-theme="light"] .capsule-pev .exec-capsule-header { background: linear-gradient(135deg, rgba(15,118,110,.08), rgba(37,99,235,.05)); }
html[data-theme="light"] .capsule-pev .exec-capsule-health { background: rgba(15,118,110,.08); border-color: rgba(15,118,110,.18); }

/* ========================================================================== 
   Business Development / 3-block Registration workflow refinements
   ========================================================================== */
.page-business-registration .page-shell { width: min(1680px, calc(100vw - 28px)); }
.business-registration-table { min-width: 5200px; border-collapse: separate; border-spacing: 0; }
.business-registration-scroll { overflow-x: auto; padding-bottom: 4px; }
.business-static-header { background: rgba(2,8,16,.78); }
.business-group-row th,
.business-column-row th { vertical-align: middle; }
.business-group-row th { border-bottom: 0; }
.business-column-row th { border-top: 0; }
.business-group-header { padding: 0 !important; text-align: center; overflow: hidden; }
.business-group-header.group-blue { background: linear-gradient(135deg, rgba(90,167,255,.18), rgba(90,167,255,.06)); border-color: rgba(90,167,255,.26); }
.business-group-header.group-purple { background: linear-gradient(135deg, rgba(167,139,250,.20), rgba(167,139,250,.06)); border-color: rgba(167,139,250,.28); }
.business-group-header.group-green { background: linear-gradient(135deg, rgba(73,220,136,.18), rgba(73,220,136,.05)); border-color: rgba(73,220,136,.26); }
.business-group-toggle,
.business-group-pill {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-strong);
  font-weight: 950;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), opacity var(--transition);
}
.business-group-toggle { width: 100%; min-height: 42px; padding: 10px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: transparent; }
.business-group-toggle em,
.business-group-pill em { font-style: normal; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.business-group-toggle:hover,
.business-group-pill:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.18); }
.business-group-toggle.is-collapsed,
.business-group-pill.is-collapsed { opacity: .72; filter: saturate(.82); }
.business-group-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.business-group-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 12px; }
.business-group-pill.group-blue { background: rgba(90,167,255,.12); border-color: rgba(90,167,255,.24); }
.business-group-pill.group-purple { background: rgba(167,139,250,.13); border-color: rgba(167,139,250,.26); }
.business-group-pill.group-green { background: rgba(73,220,136,.11); border-color: rgba(73,220,136,.24); }
.table-sort-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; color: inherit; text-decoration: none; }
.table-sort-link small { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.055); }
.table-sort-link.is-active small { color: var(--text-strong); background: rgba(90,167,255,.16); border: 1px solid rgba(90,167,255,.26); }
.business-company-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  border: 1px solid rgba(90,167,255,.28);
  background: rgba(90,167,255,.12);
  color: #dff0ff;
  line-height: 1.1;
  white-space: normal;
}
.business-company-pill.mining { border-color: rgba(167,139,250,.30); background: rgba(167,139,250,.13); color: #efe8ff; }
.business-registration-table td[data-group="registration"] { background: rgba(90,167,255,.025); }
.business-registration-table td[data-group="questionnaire_pqq"] { background: rgba(167,139,250,.024); }
.business-registration-table td[data-group="action_update"] { background: rgba(73,220,136,.022); }
.badge-locked { color: #d7e1ef; background: rgba(100,116,139,.17); border-color: rgba(148,163,184,.28); }
.badge-pending { color: #fff3d1; background: var(--amber-soft); border-color: rgba(246,191,79,.32); }
.badge-closed { color: #dfffea; background: var(--green-soft); border-color: rgba(73,220,136,.32); }
.badge-action-pending { color: #fff3d1; background: var(--amber-soft); border-color: rgba(246,191,79,.32); }
.badge-action-taken { color: #dfffea; background: var(--green-soft); border-color: rgba(73,220,136,.32); }
.badge-action-not-taken { color: #ffdce1; background: var(--red-soft); border-color: rgba(255,107,120,.32); }
.badge-no-action-required { color: #dff0ff; background: var(--blue-soft); border-color: rgba(90,167,255,.28); }
.badge-portal,
.badge-portal-and-email { color: #efe8ff; background: var(--purple-soft); border-color: rgba(167,139,250,.28); }

.business-registration-form { --card-accent: var(--accent-purple); display: grid; gap: 16px; }
.form-section-card,
.form-section-accordion {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.035);
  box-shadow: var(--shadow-sm);
}
.form-section-card { padding: 16px; }
.form-section-accordion { overflow: hidden; }
.form-section-accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  cursor: pointer;
  color: var(--text-strong);
  font-weight: 950;
  list-style: none;
  border-bottom: 1px solid var(--line-soft);
}
.form-section-accordion > summary::-webkit-details-marker { display: none; }
.form-section-accordion > summary::after { content: "⌄"; color: var(--muted); font-size: 16px; transition: transform var(--transition); }
.form-section-accordion[open] > summary::after { transform: rotate(180deg); }
.form-section-accordion > summary small { color: var(--muted); font-size: 12px; font-weight: 800; }
.business-accordion-registration > summary { background: linear-gradient(135deg, rgba(90,167,255,.12), transparent); }
.business-accordion-pqq > summary { background: linear-gradient(135deg, rgba(167,139,250,.14), transparent); }
.business-accordion-action > summary { background: linear-gradient(135deg, rgba(73,220,136,.10), transparent); }
.accordion-inner { padding: 16px; }
.form-grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.section-title-row,
.subsection-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.subsection-title-row { padding: 0 16px; margin-top: 8px; }
.subsection-title-row h3 { margin: 0; font-size: 15px; font-weight: 950; color: var(--text-strong); }
.subsection-title-row span { color: var(--muted); font-size: 12px; font-weight: 800; }
.business-rule-box { margin: 14px 16px; padding: 13px 14px; border: 1px solid rgba(167,139,250,.24); border-radius: var(--radius-md); background: rgba(167,139,250,.08); }
.business-rule-box strong { color: var(--text-strong); font-weight: 950; }
.business-rule-box p { margin: 4px 0 0; color: var(--text-soft); line-height: 1.5; }
.deadline-stack { display: inline-grid; gap: 4px; min-width: 0; }
.deadline-date { color: var(--text-strong); font-weight: 950; }
.detail-item .deadline-stack,
.detail-item .deadline-stack span,
.detail-item .deadline-stack small { margin-bottom: 0; }
.detail-item .deadline-stack .deadline-date { display: inline-block; color: var(--text-strong); }
.deadline-zone { display: inline-flex; width: fit-content; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .01em; }
.deadline-countdown,
.deadline-live { display: inline-flex; width: fit-content; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 999px; font-size: 10px; font-weight: 950; letter-spacing: .01em; border: 1px solid rgba(148,163,184,.18); color: var(--muted); background: rgba(148,163,184,.08); }
.deadline-countdown.is-live,
.deadline-live.is-live { color: #dfffea; background: rgba(73,220,136,.10); border-color: rgba(73,220,136,.24); }
.deadline-countdown.is-overdue,
.deadline-live.is-overdue { color: #ffdce1; background: rgba(255,107,120,.10); border-color: rgba(255,107,120,.28); }
.deadline-countdown.is-submitted,
.deadline-live.is-submitted { color: #dfffea; background: rgba(73,220,136,.10); border-color: rgba(73,220,136,.24); }
.field-errors { display: grid; gap: 3px; margin-top: 6px; color: #ffdce1; font-weight: 800; }
.field-required-live > label,
.field-required-live > .label { color: var(--text-strong); }
.field-required-live .input { border-color: rgba(246,191,79,.45); box-shadow: 0 0 0 1px rgba(246,191,79,.10); }
.field-soft-locked .input { border-color: rgba(73,220,136,.38); background: rgba(73,220,136,.07); }
.field-disabled { opacity: .62; }
.field-disabled .input { cursor: not-allowed; background: rgba(148,163,184,.08); }
.pqq-locked { position: relative; }
.pqq-locked::after { content: ""; position: absolute; inset: 10px; border-radius: var(--radius-md); border: 1px dashed rgba(148,163,184,.24); pointer-events: none; }
.switch-line { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: rgba(255,255,255,.035); color: var(--text-soft); font-weight: 850; }
.switch-line input { width: 18px; height: 18px; accent-color: var(--accent-green); }
.sticky-form-actions { position: sticky; bottom: 14px; z-index: 5; justify-content: flex-end; padding: 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: rgba(2,8,16,.82); backdrop-filter: blur(14px); }
.business-detail-section { margin-top: 14px; padding: 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); }
.business-detail-section.section-registration { background: rgba(90,167,255,.035); }
.business-detail-section.section-questionnaire { background: rgba(167,139,250,.035); }
.business-detail-section.section-action { background: rgba(73,220,136,.030); }
.business-detail-section .subsection-title-row { padding: 0; }
.business-advanced-grid { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
.business-history-panel { --card-accent: var(--accent-green); }
.history-filter-card {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0 0, rgba(73,220,136,.10), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.040), rgba(255,255,255,.018));
  box-shadow: var(--shadow-sm);
}
.history-filter-head,
.history-filter-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.history-filter-head { margin-bottom: 12px; }
.history-filter-head strong { display: block; color: var(--text-strong); font-size: 14px; font-weight: 950; }
.history-filter-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 800; }
.history-filter-count { color: var(--text-soft); font-size: 12px; font-weight: 950; white-space: nowrap; }
.history-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(5, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
}
.history-filter-search { grid-column: span 2; }
.history-filter-actions { margin-top: 12px; justify-content: flex-end; }
.history-filter-empty { margin-bottom: 12px; }
.history-filter-empty[hidden] { display: none !important; }
.business-history-item[hidden] { display: none !important; }
.business-history-mini { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.business-history-list { display: grid; gap: 10px; }
.compact-history-list { gap: 8px; }
.business-history-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  box-shadow: var(--shadow-sm);
}
.business-history-item::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(73,220,136,.86), rgba(167,139,250,.62));
}
.business-history-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.business-history-topline > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.business-history-topline strong { color: var(--text-strong); font-size: 14px; font-weight: 950; }
.business-history-topline small { color: var(--muted); font-size: 11px; font-weight: 850; text-align: end; }
.business-history-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 14px 14px 18px; }
.history-value-box {
  min-width: 0;
  border: 1px solid rgba(148,163,184,.16);
  border-radius: var(--radius-md);
  padding: 10px 11px;
  background: rgba(2,8,16,.20);
}
.history-value-box > span { display: block; color: var(--muted); font-size: 11px; font-weight: 950; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.history-value-box p { margin: 0; color: var(--text-strong); font-weight: 800; white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.history-value-box small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.35; }
.previous-value { background: rgba(148,163,184,.07); }
.new-value { background: rgba(73,220,136,.07); border-color: rgba(73,220,136,.18); }
.compact-history-item .business-history-topline { padding-top: 10px; padding-bottom: 8px; }
.compact-history-item .business-history-values { grid-template-columns: 1fr 1fr; padding-top: 10px; padding-bottom: 10px; }

html[data-theme="light"] .business-history-item { background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.90)); }
html[data-theme="light"] .history-filter-card { background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.90)); }
html[data-theme="light"] .history-value-box { background: rgba(248,250,252,.86); }
html[data-theme="light"] .new-value { background: rgba(22,163,74,.07); border-color: rgba(22,163,74,.18); }
html[data-theme="light"] .business-static-header { background: rgba(248,250,252,.94); }
html[data-theme="light"] .business-group-header.group-blue { background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(37,99,235,.035)); border-color: rgba(37,99,235,.16); }
html[data-theme="light"] .business-group-header.group-purple { background: linear-gradient(135deg, rgba(109,40,217,.10), rgba(109,40,217,.035)); border-color: rgba(109,40,217,.16); }
html[data-theme="light"] .business-group-header.group-green { background: linear-gradient(135deg, rgba(5,150,105,.09), rgba(5,150,105,.03)); border-color: rgba(5,150,105,.15); }
html[data-theme="light"] .business-company-pill { color: #1e3a8a; background: rgba(37,99,235,.08); border-color: rgba(37,99,235,.16); }
html[data-theme="light"] .business-company-pill.mining { color: #5b21b6; background: rgba(109,40,217,.08); border-color: rgba(109,40,217,.16); }
html[data-theme="light"] .form-section-card,
html[data-theme="light"] .form-section-accordion { background: rgba(255,255,255,.76); }
html[data-theme="light"] .business-rule-box { background: rgba(109,40,217,.055); border-color: rgba(109,40,217,.14); }
html[data-theme="light"] .sticky-form-actions { background: rgba(255,255,255,.88); }
html[data-theme="light"] .badge-locked { color: #475569; background: rgba(100,116,139,.09); border-color: rgba(100,116,139,.17); }
html[data-theme="light"] .badge-pending,
html[data-theme="light"] .badge-action-pending { color: #92400e; background: var(--amber-soft); border-color: rgba(180,83,9,.22); }
html[data-theme="light"] .badge-closed,
html[data-theme="light"] .badge-action-taken { color: #065f46; background: var(--green-soft); border-color: rgba(5,150,105,.20); }
html[data-theme="light"] .badge-action-not-taken { color: #991b1b; background: var(--red-soft); border-color: rgba(220,38,38,.20); }
html[data-theme="light"] .badge-no-action-required { color: #1e3a8a; background: var(--blue-soft); border-color: rgba(37,99,235,.18); }

@media (max-width: 1250px) {
  .form-grid-5,
  .business-registration-filter-grid,
  .business-advanced-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .history-filter-search { grid-column: span 3; }
}
@media (max-width: 760px) {
  .form-grid-5,
  .business-registration-filter-grid,
  .business-advanced-grid { grid-template-columns: 1fr; }
  .business-registration-filter-grid .span-2,
  .business-advanced-grid .span-2 { grid-column: auto; }
  .history-filter-grid { grid-template-columns: 1fr; }
  .history-filter-search { grid-column: auto; }
  .history-filter-head,
  .history-filter-actions,
  .section-title-row,
  .subsection-title-row,
  .form-section-accordion > summary { flex-direction: column; align-items: flex-start; }
}

/* Business Development tracker accordion alignment fix */
.business-registration-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.business-group-header.is-collapsed {
  width: 108px;
  min-width: 108px;
}
.business-collapsed-placeholder,
.business-collapsed-placeholder-cell {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  padding: 8px !important;
  text-align: center;
  vertical-align: middle !important;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
}
.business-collapsed-placeholder.group-blue,
.business-collapsed-placeholder-cell.group-blue { background: rgba(90,167,255,.055); }
.business-collapsed-placeholder.group-purple,
.business-collapsed-placeholder-cell.group-purple { background: rgba(167,139,250,.055); }
.business-collapsed-placeholder.group-green,
.business-collapsed-placeholder-cell.group-green { background: rgba(73,220,136,.050); }
.business-collapsed-toggle {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
  color: var(--text-strong);
  font-weight: 900;
  font-size: 11px;
  line-height: 1.15;
  cursor: pointer;
}
.business-collapsed-toggle span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.business-collapsed-toggle em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.business-collapsed-toggle:hover {
  border-color: rgba(90,167,255,.34);
  background: rgba(90,167,255,.08);
}
html[data-theme="light"] .business-collapsed-toggle {
  background: rgba(15,23,42,.035);
}
html[data-theme="light"] .deadline-countdown.is-live,
html[data-theme="light"] .deadline-live.is-live { color: #0f7a3f; background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.28); }
html[data-theme="light"] .deadline-countdown.is-overdue,
html[data-theme="light"] .deadline-live.is-overdue { color: #b42318; background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.24); }
html[data-theme="light"] .deadline-countdown.is-submitted,
html[data-theme="light"] .deadline-live.is-submitted { color: #0f7a3f; background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.28); }
html[data-theme="light"] .deadline-zone { color: #64748b; }

/* Business Development deadline reminder configuration */
.deadline-reminder-field {
  position: relative;
  border: 1px solid rgba(246,191,79,.18);
  border-radius: var(--radius-md);
  padding: 10px 11px;
  background: linear-gradient(135deg, rgba(246,191,79,.060), rgba(255,255,255,.018));
}
.deadline-reminder-field > label,
.deadline-reminder-field > .label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-strong);
  font-weight: 950;
}
.deadline-reminder-field .multi-select-input {
  min-height: 104px;
  margin-top: 8px;
}
.mandatory-reminder-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin: 0 0 7px;
  padding: 4px 9px;
  border: 1px solid rgba(255,107,120,.26);
  border-radius: 999px;
  background: rgba(255,107,120,.10);
  color: #ffdce1;
  font-size: 11px;
  font-weight: 950;
}
.section-reminders {
  background: rgba(246,191,79,.030);
}
.business-reminder-log-panel {
  --card-accent: var(--accent-amber);
}
.reminder-log-wrap {
  margin-top: 12px;
}
.reminder-log-table small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.badge-sent { color: #dfffea; background: var(--green-soft); border-color: rgba(73,220,136,.32); }
.badge-failed,
.badge-send_failed { color: #ffdce1; background: var(--red-soft); border-color: rgba(255,107,120,.32); }
.badge-skipped { color: #dff0ff; background: var(--blue-soft); border-color: rgba(90,167,255,.28); }
.badge-created { color: #e5edf7; background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.22); }
html[data-theme="light"] .deadline-reminder-field { background: linear-gradient(135deg, rgba(180,83,9,.055), rgba(255,255,255,.86)); border-color: rgba(180,83,9,.14); }
html[data-theme="light"] .mandatory-reminder-pill { color: #991b1b; background: rgba(239,68,68,.08); border-color: rgba(220,38,38,.18); }
html[data-theme="light"] .section-reminders { background: rgba(180,83,9,.030); }
html[data-theme="light"] .badge-sent { color: #065f46; background: var(--green-soft); border-color: rgba(5,150,105,.20); }
html[data-theme="light"] .badge-failed,
html[data-theme="light"] .badge-send_failed { color: #991b1b; background: var(--red-soft); border-color: rgba(220,38,38,.20); }
html[data-theme="light"] .badge-skipped { color: #1e3a8a; background: var(--blue-soft); border-color: rgba(37,99,235,.18); }
html[data-theme="light"] .badge-created { color: #475569; background: rgba(100,116,139,.08); border-color: rgba(100,116,139,.16); }

.business-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.business-dashboard-panel {
  --card-accent: var(--accent-purple);
  grid-column: span 12;
}
.business-dashboard-panel.hero-panel { overflow: hidden; }
.business-dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.business-kpi-card {
  position: relative;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(9, 15, 28, .88), rgba(7, 12, 22, .74));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.business-kpi-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 18px 0 0 18px;
  background: var(--accent-blue);
}
.business-kpi-card span,
.business-mini-stats span,
.business-portal-text span { color: var(--text-soft); }
.business-kpi-card strong { display: block; margin-top: 10px; font-size: 30px; line-height: 1; color: var(--text-strong); }
.business-kpi-card small { display: block; margin-top: 8px; color: var(--muted); }
.business-kpi-card.tone-blue::after { background: var(--accent-blue); }
.business-kpi-card.tone-red::after { background: #ff6b78; }
.business-kpi-card.tone-amber::after { background: var(--accent-amber); }
.business-kpi-card.tone-purple::after { background: var(--accent-purple); }
.business-kpi-card.tone-green::after { background: var(--accent-green); }
.business-kpi-card.tone-slate::after { background: #94a3b8; }
.business-dashboard-table-wrap { overflow-x: auto; }
.business-dashboard-table { min-width: 920px; }
.business-dashboard-table th { white-space: nowrap; }
.business-dashboard-table td { vertical-align: middle; }
.business-mini-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.business-mini-card {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
}
.business-mini-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.business-mini-stats {
  display: grid;
  gap: 8px;
}
.business-mini-stats span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-soft);
}
.business-mini-stats strong,
.business-status-row strong,
.business-portal-text strong { color: var(--text-strong); }
.business-status-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.business-status-column {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
}
.business-status-column header {
  margin-bottom: 10px;
  font-weight: 900;
  color: var(--text-strong);
}
.business-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed var(--line-soft);
}
.business-status-row:first-of-type { border-top: 0; }
.business-portal-list { display: grid; gap: 12px; }
.business-portal-item {
  display: grid;
  grid-template-columns: 220px minmax(0,1fr);
  gap: 12px;
  align-items: center;
}
.business-portal-text {
  display: grid;
  gap: 2px;
}
.business-portal-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(148,163,184,.12);
  border: 1px solid rgba(148,163,184,.18);
  overflow: hidden;
}
.business-portal-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue), var(--accent-green));
}
.empty-state-inline {
  padding: 18px;
  border-radius: 14px;
  border: 1px dashed var(--line-soft);
  color: var(--muted);
  background: rgba(255,255,255,.02);
}
html[data-theme="light"] .business-kpi-card,
html[data-theme="light"] .business-mini-card,
html[data-theme="light"] .business-status-column {
  background: rgba(255,255,255,.84);
}
html[data-theme="light"] .business-portal-bar {
  background: rgba(148,163,184,.10);
}
@media (max-width: 1400px) {
  .business-dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .business-status-columns,
  .business-dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-portal-item { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .business-status-columns,
  .business-dashboard-kpi-grid { grid-template-columns: 1fr; }
}


.business-inline-dashboard { --card-accent: var(--accent-purple); margin-bottom: 14px; }
.business-inline-dashboard-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.business-inline-dashboard-top p { margin: 4px 0 0; }
.business-inline-kpis { display:grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.business-inline-kpi { position:relative; padding:12px 14px; border:1px solid var(--line-soft); border-radius:14px; background:rgba(255,255,255,.035); min-height:84px; }
.business-inline-kpi::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; border-radius:14px 0 0 14px; background: var(--accent-blue); }
.business-inline-kpi span { display:block; color:var(--text-soft); font-size:12px; line-height:1.3; }
.business-inline-kpi strong { display:block; margin-top:8px; color:var(--text-strong); font-size:28px; line-height:1; }
.business-inline-kpi.tone-blue::before { background: var(--accent-blue); }
.business-inline-kpi.tone-red::before { background: #ff6b78; }
.business-inline-kpi.tone-amber::before { background: var(--accent-amber); }
.business-inline-kpi.tone-purple::before { background: var(--accent-purple); }
.business-inline-kpi.tone-green::before { background: var(--accent-green); }
.business-inline-kpi.tone-slate::before { background: #94a3b8; }
.business-inline-grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap:12px; }
.business-inline-card { padding:14px; border:1px solid var(--line-soft); border-radius:16px; background:rgba(255,255,255,.03); min-width:0; }
.business-inline-card-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.business-inline-card-head strong { color:var(--text-strong); }
.business-inline-card-head span { color:var(--muted); font-size:12px; }
.business-inline-assignee-list, .business-inline-mini-list { display:grid; gap:8px; }
.business-inline-assignee-item { display:grid; grid-template-columns: minmax(0,1fr) auto; gap:10px; align-items:center; padding:8px 0; border-top:1px dashed var(--line-soft); }
.business-inline-assignee-item:first-child { border-top:0; padding-top:0; }
.business-inline-assignee-item strong, .business-inline-split-item strong, .business-inline-row b { color:var(--text-strong); }
.business-inline-assignee-item small { color:var(--muted); }
.business-inline-assignee-metrics { display:flex; align-items:center; gap:10px; flex-wrap:wrap; color:var(--text-soft); font-size:12px; }
.business-inline-assignee-metrics b, .business-inline-chip-row b { color:var(--text-strong); }
.business-inline-split-grid { display:grid; gap:10px; }
.business-inline-split-item { padding:12px; border:1px solid rgba(148,163,184,.16); border-radius:14px; background:rgba(255,255,255,.02); }
.business-inline-split-item small { display:block; color:var(--muted); margin-top:2px; }
.business-inline-chip-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; color:var(--text-soft); font-size:12px; }
.business-inline-chip-row span { padding:5px 8px; border-radius:999px; border:1px solid rgba(148,163,184,.18); background:rgba(255,255,255,.03); }
.business-inline-two-col { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.business-inline-mini-list h4 { margin:0 0 8px; color:var(--text-strong); font-size:13px; }
.business-inline-row { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 0; border-top:1px dashed var(--line-soft); color:var(--text-soft); }
.business-inline-row:first-of-type { border-top:0; padding-top:0; }
@media (max-width: 1450px) { .business-inline-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); } .business-inline-grid { grid-template-columns:1fr; } }
@media (max-width: 860px) { .business-inline-kpis, .business-inline-two-col { grid-template-columns: 1fr; } .business-inline-dashboard-top { flex-direction:column; align-items:flex-start; } .business-inline-assignee-item { grid-template-columns: 1fr; } }
html[data-theme="light"] .business-inline-kpi, html[data-theme="light"] .business-inline-card, html[data-theme="light"] .business-inline-split-item { background: rgba(255,255,255,.86); }

/* Compact BD entity dashboard refinement */
.compact-control-dashboard { margin-bottom: 12px; padding: 14px 16px; }
.business-inline-dashboard-top.compact { margin-bottom: 10px; }
.business-inline-dashboard-top.compact h2 { margin: 0; font-size: 23px; }
.business-inline-dashboard-top.compact p { margin-top: 3px; }
.business-compact-kpis {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.business-compact-kpis .business-inline-kpi {
  min-height: 66px;
  padding: 10px 12px;
  border-radius: 13px;
}
.business-compact-kpis .business-inline-kpi span { font-size: 11px; }
.business-compact-kpis .business-inline-kpi strong { font-size: 22px; margin-top: 6px; }
.business-control-matrix {
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(260px, .85fr) minmax(280px, .9fr) minmax(360px, 1.2fr);
  gap: 10px;
  align-items: stretch;
}
.business-control-matrix .matrix-card {
  min-width: 0;
  padding: 12px;
  border-radius: 15px;
}
.business-control-matrix .business-inline-card-head { margin-bottom: 8px; }
.business-control-matrix .business-inline-card-head strong { font-size: 14px; }
.business-control-matrix .business-inline-card-head span { font-size: 11px; }
.business-inline-card-head.secondary-head {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
}
.business-micro-table { display: grid; gap: 0; }
.business-micro-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(4, minmax(42px, auto));
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px dashed var(--line-soft);
  color: var(--text-soft);
  font-size: 12px;
}
.business-micro-row:first-child { border-top: 0; padding-top: 0; }
.business-micro-row.micro-head {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.business-micro-row span { min-width: 0; overflow-wrap: anywhere; }
.business-micro-row span strong { display: block; color: var(--text-strong); font-size: 12px; }
.business-micro-row span small { display: block; color: var(--muted); margin-top: 2px; }
.business-micro-row b { color: var(--text-strong); text-align: end; }
.business-micro-row.priority-row { grid-template-columns: minmax(90px, 1fr) repeat(4, minmax(42px, auto)); }
.business-chip-matrix {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.business-chip-matrix span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(255,255,255,.035);
  color: var(--text-soft);
  font-size: 12px;
}
.business-chip-matrix b { color: var(--text-strong); }
.compact-split-grid { gap: 8px; }
.business-inline-split-item.compact { padding: 10px; }
.business-inline-split-item.compact strong { font-size: 13px; }
.business-inline-chip-row.compact { gap: 6px; margin-top: 8px; }
.business-inline-chip-row.compact span { padding: 4px 7px; font-size: 11px; }
.compact-two-col { gap: 10px; }
.business-inline-mini-list.compact h4 { font-size: 12px; margin-bottom: 6px; }
.business-inline-mini-list.compact .business-inline-row { padding: 6px 0; font-size: 12px; }
@media (max-width: 1600px) {
  .business-compact-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .business-control-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .business-compact-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-control-matrix { grid-template-columns: 1fr; }
  .compact-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .business-compact-kpis { grid-template-columns: 1fr; }
  .business-micro-row,
  .business-micro-row.priority-row { grid-template-columns: 1fr repeat(2, minmax(42px, auto)); }
  .business-micro-row b:nth-of-type(n+3) { display: none; }
}


/* BD dashboard click-through filters and deadline item clarification */
.business-compact-kpis.denser { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.business-compact-kpis a.business-inline-kpi,
.business-chip-matrix a,
.business-inline-chip-row.compact a {
  color: inherit;
  text-decoration: none;
}
.business-compact-kpis a.business-inline-kpi:hover,
.business-chip-matrix a:hover,
.business-inline-chip-row.compact a:hover,
.dashboard-value-link:hover {
  transform: translateY(-1px);
  border-color: rgba(90,167,255,.38);
  color: var(--text-strong);
}
.business-control-matrix.improved {
  grid-template-columns: minmax(360px, 1.25fr) minmax(300px, .9fr) minmax(320px, 1fr) minmax(300px, .85fr) minmax(360px, 1.1fr);
}
.business-control-matrix.improved .deadline-card { --card-accent: var(--accent-amber); }
.business-deadline-note {
  margin: -2px 0 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.business-micro-row.deadline-row { grid-template-columns: minmax(130px, 1fr) repeat(4, minmax(44px, auto)); }
.dashboard-value-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 24px;
  padding: 2px 5px;
  border-radius: 8px;
  color: var(--text-strong);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.dashboard-value-link:hover { background: rgba(90,167,255,.10); }
.dashboard-value-link.danger:hover { background: rgba(255,107,120,.12); border-color: rgba(255,107,120,.38); }
.dashboard-value-link.warning:hover { background: rgba(246,191,79,.12); border-color: rgba(246,191,79,.38); }
.dashboard-value-link.muted-link { color: var(--text-soft); justify-content: flex-start; padding-left: 0; }
.business-chip-matrix a,
.business-inline-chip-row.compact a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(255,255,255,.035);
  color: var(--text-soft);
  font-size: 12px;
}
.business-inline-chip-row.compact a { padding: 4px 7px; font-size: 11px; }
.dashboard-filter-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 0 10px;
  padding: 9px 11px;
  border: 1px solid rgba(90,167,255,.28);
  border-radius: 13px;
  background: rgba(90,167,255,.08);
  color: var(--text-soft);
  font-size: 12px;
}
.dashboard-filter-alert strong { color: var(--text-strong); }
.dashboard-filter-alert a { margin-inline-start: auto; color: var(--accent-blue); text-decoration: none; font-weight: 900; }
@media (max-width: 1750px) {
  .business-control-matrix.improved { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1320px) {
  .business-control-matrix.improved { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-compact-kpis.denser { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .business-control-matrix.improved,
  .business-compact-kpis.denser { grid-template-columns: 1fr; }
  .dashboard-filter-alert { align-items: flex-start; flex-direction: column; }
  .dashboard-filter-alert a { margin-inline-start: 0; }
}


/* BD dashboard overflow + professional deadline split */
.business-inline-dashboard.compact-control-dashboard {
  overflow: hidden;
}
.business-compact-kpis.denser.professional-deadline-kpis {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}
.business-compact-kpis.denser.professional-deadline-kpis .business-inline-kpi {
  min-width: 0;
}
.business-compact-kpis.denser.professional-deadline-kpis .business-inline-kpi span {
  overflow-wrap: anywhere;
}
.business-control-matrix.improved {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}
.business-control-matrix.improved .matrix-card {
  min-width: 0;
  overflow: hidden;
}
.business-control-matrix.improved .assignee-card { grid-column: span 4; }
.business-control-matrix.improved .priority-card { grid-column: span 3; }
.business-control-matrix.improved .deadline-card { grid-column: span 3; }
.business-control-matrix.improved .company-card { grid-column: span 2; }
.business-control-matrix.improved .workflow-card { grid-column: span 12; }
.business-control-matrix.improved .business-micro-row {
  grid-template-columns: minmax(0, 1fr) repeat(4, minmax(34px, 44px));
  gap: 6px;
}
.business-control-matrix.improved .business-micro-row.priority-row {
  grid-template-columns: minmax(0, 1fr) repeat(4, minmax(34px, 44px));
}
.business-control-matrix.improved .business-micro-row.deadline-row {
  grid-template-columns: minmax(0, 1fr) repeat(4, minmax(36px, 48px));
}
.business-control-matrix.improved .business-micro-row b {
  min-width: 0;
}
.business-control-matrix.improved .business-micro-row span,
.business-inline-mini-list.compact .business-inline-row span,
.workflow-card .business-inline-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.business-inline-two-col.compact-two-col {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  min-width: 0;
}
.workflow-card .business-inline-mini-list {
  min-width: 0;
}
.business-inline-split-item.compact {
  min-width: 0;
}
.business-inline-chip-row.compact {
  display: flex;
  flex-wrap: wrap;
}
@media (max-width: 1500px) {
  .business-control-matrix.improved .assignee-card,
  .business-control-matrix.improved .priority-card,
  .business-control-matrix.improved .deadline-card,
  .business-control-matrix.improved .company-card { grid-column: span 6; }
  .business-control-matrix.improved .workflow-card { grid-column: span 12; }
}
@media (max-width: 980px) {
  .business-control-matrix.improved .assignee-card,
  .business-control-matrix.improved .priority-card,
  .business-control-matrix.improved .deadline-card,
  .business-control-matrix.improved .company-card,
  .business-control-matrix.improved .workflow-card { grid-column: span 12; }
  .business-inline-two-col.compact-two-col { grid-template-columns: 1fr; }
}


/* Assignee dashboard split: Questionnaire 7d and PQQ 7d are separate clickable measures */
.business-control-matrix.improved .assignee-card .business-micro-row {
  grid-template-columns: minmax(0, 1fr) repeat(5, minmax(32px, 42px));
}

/* BD tracker table professional autofit / wrap pass */
.business-registration-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.business-registration-table {
  width: max-content !important;
  min-width: 100% !important;
  table-layout: auto !important;
}
.business-registration-table th,
.business-registration-table td {
  padding: 8px 9px !important;
  line-height: 1.35;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}
.business-registration-table th {
  vertical-align: middle !important;
}
.business-registration-table .table-sort-link {
  align-items: flex-start;
  gap: 5px;
  line-height: 1.2;
}
.business-registration-table .table-sort-link small {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
}
.business-registration-table .badge,
.business-registration-table .business-company-pill {
  max-width: 100%;
  white-space: normal;
  line-height: 1.2;
  padding: 5px 8px;
}
.business-registration-table .deadline-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.business-registration-table .deadline-date,
.business-registration-table .deadline-zone,
.business-registration-table .deadline-countdown {
  white-space: normal;
  overflow-wrap: anywhere;
}
.business-registration-table .business-vendor-cell {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
}
.business-registration-table .small-avatar {
  width: 34px;
  min-width: 34px;
  height: 34px;
  font-size: 11px;
}
.business-registration-table .business-note-cell {
  -webkit-line-clamp: 4;
  overflow-wrap: anywhere;
}
.business-registration-table .table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.business-registration-table [data-col="display_no"] { width: 72px !important; min-width: 72px !important; max-width: 72px !important; }
.business-registration-table [data-col="business_unit"] { width: 142px !important; min-width: 142px !important; max-width: 142px !important; }
.business-registration-table [data-col="vendor_name"] { width: 210px !important; min-width: 210px !important; max-width: 210px !important; }
.business-registration-table [data-col="vendor_code"] { width: 112px !important; min-width: 112px !important; max-width: 112px !important; }
.business-registration-table [data-col="priority_status"] { width: 112px !important; min-width: 112px !important; max-width: 112px !important; }
.business-registration-table [data-col="registration_status"] { width: 128px !important; min-width: 128px !important; max-width: 128px !important; }
.business-registration-table [data-col="registration_date"] { width: 118px !important; min-width: 118px !important; max-width: 118px !important; }
.business-registration-table [data-col="invitation_method"] { width: 122px !important; min-width: 122px !important; max-width: 122px !important; }
.business-registration-table [data-col="portal_name"] { width: 158px !important; min-width: 158px !important; max-width: 158px !important; }
.business-registration-table [data-col="questionnaire_required"] { width: 130px !important; min-width: 130px !important; max-width: 130px !important; }
.business-registration-table [data-col="questionnaire_submittal_status"] { width: 150px !important; min-width: 150px !important; max-width: 150px !important; }
.business-registration-table [data-col="questionnaire_deadline"] { width: 152px !important; min-width: 152px !important; max-width: 152px !important; }
.business-registration-table [data-col="questionnaire_submit_date"] { width: 128px !important; min-width: 128px !important; max-width: 128px !important; }
.business-registration-table [data-col="questionnaire_approval_status"] { width: 148px !important; min-width: 148px !important; max-width: 148px !important; }
.business-registration-table [data-col="questionnaire_response_date"] { width: 136px !important; min-width: 136px !important; max-width: 136px !important; }
.business-registration-table [data-col="pqq_submittal_status"] { width: 132px !important; min-width: 132px !important; max-width: 132px !important; }
.business-registration-table [data-col="pqq_deadline"] { width: 145px !important; min-width: 145px !important; max-width: 145px !important; }
.business-registration-table [data-col="pqq_submit_date"] { width: 120px !important; min-width: 120px !important; max-width: 120px !important; }
.business-registration-table [data-col="pqq_approval_status"] { width: 136px !important; min-width: 136px !important; max-width: 136px !important; }
.business-registration-table [data-col="pqq_response_date"] { width: 128px !important; min-width: 128px !important; max-width: 128px !important; }
.business-registration-table [data-col="action_comment"] { width: 220px !important; min-width: 220px !important; max-width: 220px !important; }
.business-registration-table [data-col="action_status"] { width: 118px !important; min-width: 118px !important; max-width: 118px !important; }
.business-registration-table [data-col="action_date"] { width: 115px !important; min-width: 115px !important; max-width: 115px !important; }
.business-registration-table [data-col="last_update_note"] { width: 230px !important; min-width: 230px !important; max-width: 230px !important; }
.business-registration-table [data-col="last_update_date"] { width: 130px !important; min-width: 130px !important; max-width: 130px !important; }
.business-registration-table [data-col="assigned_to_user_id"] { width: 170px !important; min-width: 170px !important; max-width: 170px !important; }
.business-registration-table [data-col="is_active"] { width: 88px !important; min-width: 88px !important; max-width: 88px !important; }
.business-registration-table [data-col="created_at"],
.business-registration-table [data-col="updated_at"] { width: 128px !important; min-width: 128px !important; max-width: 128px !important; }
.business-registration-table [data-col="actions"] { width: 118px !important; min-width: 118px !important; max-width: 118px !important; }
.business-registration-table .business-collapsed-placeholder,
.business-registration-table .business-collapsed-placeholder-cell {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
}

/* BD compact dashboard table wrapping refinement */
.business-control-matrix.improved .business-micro-row,
.business-control-matrix.improved .business-micro-row.priority-row,
.business-control-matrix.improved .business-micro-row.deadline-row,
.business-control-matrix.improved .assignee-card .business-micro-row {
  gap: 5px;
}
.business-control-matrix.improved .business-micro-row span,
.business-control-matrix.improved .business-inline-row span {
  white-space: normal;
  overflow-wrap: anywhere;
}
.business-control-matrix.improved .dashboard-value-link {
  min-width: 20px;
  padding-inline: 3px;
}

/* ========================================================================== 
   FRIENDLY UI REFRESH · May 2026
   Purpose: simpler executive/workspace presentation while preserving routes,
   permissions, forms, filters, light/dark theme and translation support.
   ========================================================================== */

.header-inner,
.clean-header-inner { min-height: 66px; padding-block: 8px; }
.brand { gap: 12px; }
.brand-logo { height: 48px; }
.brand-block { height: 38px; min-width: 46px; border-radius: 9px; font-size: 23px; }
.brand-rest { height: 38px; font-size: clamp(18px, 2.2vw, 24px); letter-spacing: -.04em; }
.nav-link,
.lang-link,
.current-user,
.theme-toggle { min-height: 34px; }

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.07), transparent 27%),
    radial-gradient(circle at 92% 5%, rgba(5, 150, 105, 0.07), transparent 28%),
    linear-gradient(135deg, #f4f7fb 0%, #edf3f8 48%, #f7fafc 100%);
}
html[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(15,23,42,.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.022) 1px, transparent 1px);
  opacity: .55;
}
html[data-theme="light"] .site-header,
html[data-theme="light"] .clean-site-header {
  background: rgba(255,255,255,.94);
  border-bottom-color: rgba(15,23,42,.10);
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}
html[data-theme="light"] .brand-rest { color: #172033; text-shadow: none; }
html[data-theme="light"] .language-switch { background: rgba(248,250,252,.88); border-color: rgba(15,23,42,.10); }
html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .primary-nav-link { background: rgba(37,99,235,.08); border-color: rgba(37,99,235,.15); color: #17346b; }

/* Executive dashboard: simplified management board */
.executive-friendly-body .page-shell { width: min(1380px, calc(100vw - 28px)); }
.exec-friendly-hero,
.exec-kpi-card,
.exec-simple-board,
.exec-detail-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.050), rgba(255,255,255,.018)),
    var(--surface-glass);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}
.exec-friendly-hero::before,
.exec-kpi-card::before,
.exec-simple-board::before,
.exec-detail-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--card-accent, var(--accent-blue)), transparent 72%);
  pointer-events: none;
}
.exec-friendly-hero {
  --card-accent: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  margin-bottom: 16px;
}
.exec-friendly-title p { max-width: 680px; }
.exec-friendly-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.exec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.exec-kpi-card {
  min-height: 142px;
  padding: 17px;
  display: grid;
  align-content: start;
  gap: 6px;
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
a.exec-kpi-card:hover { transform: translateY(-3px); border-color: rgba(90,167,255,.32); box-shadow: var(--shadow); color: var(--text); }
.exec-kpi-icon,
.exec-board-code {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--card-accent, var(--accent-blue)), rgba(29,63,145,.78));
  font-size: 12px;
  font-weight: 950;
  letter-spacing: -.02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.20), 0 10px 20px rgba(0,0,0,.16);
}
.exec-kpi-card small,
.exec-kpi-card p { color: var(--muted); font-weight: 850; }
.exec-kpi-card strong { display: block; margin-top: 2px; font-size: clamp(26px, 2.5vw, 36px); line-height: 1; }
.kpi-people { --card-accent: var(--accent-blue); }
.kpi-cost { --card-accent: var(--accent-green); }
.kpi-fleet { --card-accent: var(--accent-teal); }
.kpi-risk { --card-accent: var(--accent-amber); }
.exec-module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.exec-simple-board { padding: 20px; }
.board-hr { --card-accent: var(--accent-green); }
.board-pev { --card-accent: var(--accent-teal); }
.exec-board-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.exec-board-head h2 { margin: 0; }
.exec-board-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(90,167,255,.28);
  background: rgba(90,167,255,.09);
  color: var(--text-strong);
  font-weight: 900;
  white-space: nowrap;
}
.exec-board-link:hover { background: rgba(90,167,255,.15); color: var(--text-strong); }
.exec-metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.exec-metric-row a,
.exec-metric-row div,
.exec-focus-list a,
.exec-focus-list div,
.exec-detail-links a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  color: var(--text);
  text-decoration: none;
}
.exec-metric-row a:hover,
.exec-focus-list a:hover,
.exec-detail-links a:hover {
  background: rgba(90,167,255,.08);
  border-color: rgba(90,167,255,.26);
  transform: translateY(-1px);
}
.exec-metric-row span,
.exec-metric-row small,
.exec-focus-list span,
.exec-focus-list em,
.exec-detail-head span,
.exec-detail-links span { color: var(--muted); font-style: normal; font-weight: 800; }
.exec-metric-row strong { font-size: 24px; line-height: 1.05; }
.exec-focus-list { display: grid; gap: 10px; }
.exec-focus-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exec-detail-panel { --card-accent: var(--accent-purple); padding: 18px; margin-top: 16px; }
.exec-detail-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.exec-detail-head h2 { margin: 0; }
.exec-detail-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.exec-detail-links a::after { content: "›"; position: absolute; right: 14px; top: 14px; color: var(--accent-blue); font-weight: 950; }
.exec-detail-links a { position: relative; padding-right: 36px; }

/* Workspace home: card-first, less instruction text */
.workspace-friendly-body .user-workspace-shell { width: min(1240px, calc(100vw - 28px)); }
.workspace-hero-simple { padding: 20px; margin-bottom: 16px; }
.workspace-hero-simple .workspace-hero-main { margin-bottom: 14px; }
.workspace-hero-simple h1 { margin-bottom: 4px; }
.workspace-pulse-simple { margin-bottom: 0; }
.workspace-modules-simple { padding: 18px; }
.workspace-simple-head { align-items: center; }
.workspace-simple-head p { display: none; }
.workspace-card-list { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.workspace-simple-card .workspace-module-summary { padding: 16px; }
.workspace-simple-card .workspace-module-title h3 { margin: 0; }
.workspace-simple-card .workspace-module-title p { margin: 3px 0 0; }
.workspace-simple-card .workspace-module-meta { justify-content: flex-end; }
.workspace-simple-card .workspace-page-list { padding: 12px; gap: 8px; }
.workspace-simple-card .workspace-page-row { padding: 10px; border-radius: 14px; }
.workspace-simple-card .workspace-page-text small {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.workspace-simple-card .workspace-page-right i { font-weight: 900; color: var(--accent-blue); font-style: normal; }

html[data-theme="light"] .exec-friendly-hero,
html[data-theme="light"] .exec-kpi-card,
html[data-theme="light"] .exec-simple-board,
html[data-theme="light"] .exec-detail-panel,
html[data-theme="light"] .workspace-hero-simple,
html[data-theme="light"] .workspace-modules-simple,
html[data-theme="light"] .workspace-simple-card {
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(248,250,252,.84));
  border-color: rgba(15,23,42,.10);
  box-shadow: 0 14px 34px rgba(15,23,42,.07);
}
html[data-theme="light"] .exec-kpi-card small,
html[data-theme="light"] .exec-kpi-card p,
html[data-theme="light"] .exec-metric-row span,
html[data-theme="light"] .exec-metric-row small,
html[data-theme="light"] .exec-focus-list span,
html[data-theme="light"] .exec-focus-list em,
html[data-theme="light"] .exec-detail-head span,
html[data-theme="light"] .exec-detail-links span { color: #64748b; }
html[data-theme="light"] .exec-metric-row a,
html[data-theme="light"] .exec-metric-row div,
html[data-theme="light"] .exec-focus-list a,
html[data-theme="light"] .exec-focus-list div,
html[data-theme="light"] .exec-detail-links a {
  background: rgba(248,250,252,.72);
  border-color: rgba(15,23,42,.08);
}
html[data-theme="light"] .exec-metric-row a:hover,
html[data-theme="light"] .exec-focus-list a:hover,
html[data-theme="light"] .exec-detail-links a:hover,
html[data-theme="light"] a.exec-kpi-card:hover {
  background: rgba(239,246,255,.88);
  border-color: rgba(37,99,235,.16);
}
html[data-theme="light"] .exec-board-link {
  background: rgba(37,99,235,.07);
  border-color: rgba(37,99,235,.14);
  color: #1e3a8a;
}
html[data-theme="light"] .workspace-simple-card .workspace-page-row { background: rgba(248,250,252,.72); }

@media (max-width: 1180px) {
  .exec-kpi-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .exec-module-grid { grid-template-columns: 1fr; }
  .exec-detail-links { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .brand-rest { display: none; }
  .exec-friendly-hero,
  .exec-detail-head { flex-direction: column; align-items: stretch; }
  .exec-friendly-actions { justify-content: flex-start; }
  .exec-kpi-grid,
  .exec-metric-row,
  .workspace-card-list { grid-template-columns: 1fr; }
  .exec-board-head { grid-template-columns: auto minmax(0, 1fr); }
  .exec-board-link { grid-column: 1 / -1; justify-self: start; }
  .workspace-simple-head { flex-direction: column; align-items: stretch; }
  .workspace-page-right { align-items: flex-end; flex-direction: column; gap: 5px; }
}
html[dir="rtl"] .exec-detail-links a { padding-right: 12px; padding-left: 36px; }
html[dir="rtl"] .exec-detail-links a::after { content: "‹"; right: auto; left: 14px; }

/* ========================================================================== 
   FRIENDLY UI V2 · system-wide module boundaries and uniform report naming
   ========================================================================== */

.ui-friendly-v2 {
  --page-accent: var(--accent-blue);
  --page-accent-soft: var(--blue-soft);
  --friendly-card-bg: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.022)), var(--surface-glass);
  --friendly-inner-bg: rgba(255,255,255,.035);
  --friendly-inner-bg-hover: rgba(90,167,255,.085);
}
.ui-friendly-v2.page-admin { --page-accent: var(--accent-blue); --page-accent-soft: var(--blue-soft); }
.ui-friendly-v2.page-hr,
.ui-friendly-v2.page-human-resources { --page-accent: var(--accent-green); --page-accent-soft: var(--green-soft); }
.ui-friendly-v2.page-equipment,
.ui-friendly-v2.page-pev,
.ui-friendly-v2.page-physical-assets { --page-accent: var(--accent-teal); --page-accent-soft: var(--teal-soft); }
.ui-friendly-v2.page-business-development { --page-accent: var(--accent-purple); --page-accent-soft: var(--purple-soft); }
.ui-friendly-v2.page-user { --page-accent: var(--accent-cyan); --page-accent-soft: var(--cyan-soft); }
.ui-friendly-v2.page-auth { --page-accent: var(--accent-blue); --page-accent-soft: var(--blue-soft); }

.ui-friendly-v2 .page-shell { padding-top: 18px; }
.ui-friendly-v2 .page-head,
.ui-friendly-v2 .section-header-clean,
.ui-friendly-v2 .section-page-head,
.ui-friendly-v2 .compact-page-head,
.ui-friendly-v2 .admin-map-hero,
.ui-friendly-v2 .workspace-hero,
.ui-friendly-v2 .exec-v2-hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--friendly-card-bg);
  box-shadow: var(--shadow-sm);
  padding: clamp(17px, 2vw, 24px);
  margin-bottom: 16px;
}
.ui-friendly-v2 .page-head::before,
.ui-friendly-v2 .section-header-clean::before,
.ui-friendly-v2 .section-page-head::before,
.ui-friendly-v2 .compact-page-head::before,
.ui-friendly-v2 .admin-map-hero::before,
.ui-friendly-v2 .workspace-hero::before,
.ui-friendly-v2 .exec-v2-hero::before,
.ui-friendly-v2 .panel::before,
.ui-friendly-v2 .metric-card::before,
.ui-friendly-v2 .admin-layer-card::before,
.ui-friendly-v2 .master-hub-card::before,
.ui-friendly-v2 .ui-group-card::before,
.ui-friendly-v2 .workspace-module-card::before,
.ui-friendly-v2 .business-inline-card::before,
.ui-friendly-v2 .pro-viz-card::before,
.ui-friendly-v2 .exec-v2-module::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--card-accent, var(--page-accent)), transparent 78%);
  pointer-events: none;
}
.ui-friendly-v2 .page-head h1,
.ui-friendly-v2 .section-header-clean h1,
.ui-friendly-v2 .admin-map-hero h1,
.ui-friendly-v2 .exec-v2-hero h1 { margin: 0 0 6px; }
.ui-friendly-v2 .page-head p:not(.eyebrow),
.ui-friendly-v2 .section-header-clean p:not(.eyebrow),
.ui-friendly-v2 .admin-map-hero p:not(.eyebrow),
.ui-friendly-v2 .exec-v2-hero p:not(.eyebrow) {
  max-width: 820px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ui-friendly-v2 .actions,
.ui-friendly-v2 .compact-actions,
.ui-friendly-v2 .filter-actions {
  gap: 8px;
}
.ui-friendly-v2 .btn,
.ui-friendly-v2 a.btn,
.ui-friendly-v2 button.btn,
.ui-friendly-v2 .layer-open,
.ui-friendly-v2 .master-link-row,
.ui-friendly-v2 .ui-page-row,
.ui-friendly-v2 .workspace-page-row {
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.ui-friendly-v2 .btn-primary,
.ui-friendly-v2 button[type="submit"] {
  background: linear-gradient(135deg, var(--page-accent), #1d3f91);
  border-color: color-mix(in srgb, var(--page-accent) 42%, transparent);
}
.ui-friendly-v2 .btn-secondary,
.ui-friendly-v2 .btn-ghost {
  border-color: var(--line);
}
.ui-friendly-v2 .btn:hover,
.ui-friendly-v2 .layer-open:hover,
.ui-friendly-v2 .master-link-row:hover,
.ui-friendly-v2 .ui-page-row:hover,
.ui-friendly-v2 .workspace-page-row:hover {
  transform: translateY(-1px);
}

.ui-friendly-v2 .panel,
.ui-friendly-v2 .metric-card,
.ui-friendly-v2 .admin-layer-card,
.ui-friendly-v2 .master-hub-card,
.ui-friendly-v2 .config-area-card,
.ui-friendly-v2 .ui-group-card,
.ui-friendly-v2 .interface-group-card,
.ui-friendly-v2 .interface-policy-card,
.ui-friendly-v2 .workflow-card,
.ui-friendly-v2 .workspace-module-card,
.ui-friendly-v2 .pro-viz-card,
.ui-friendly-v2 .report-panel,
.ui-friendly-v2 .form-panel,
.ui-friendly-v2 .detail-panel,
.ui-friendly-v2 .hr-command-panel,
.ui-friendly-v2 .hr-register-card,
.ui-friendly-v2 .table-panel,
.ui-friendly-v2 .users-panel,
.ui-friendly-v2 .section-card-large,
.ui-friendly-v2 .business-inline-card,
.ui-friendly-v2 .exec-v2-module {
  position: relative;
  border-color: var(--line);
  background: var(--friendly-card-bg);
  box-shadow: var(--shadow-sm);
}
.ui-friendly-v2 .panel-head,
.ui-friendly-v2 .hr-command-head,
.ui-friendly-v2 .table-head,
.ui-friendly-v2 .business-inline-card-head,
.ui-friendly-v2 .column-config-head,
.ui-friendly-v2 .filter-section-title {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.ui-friendly-v2 .panel-head h2,
.ui-friendly-v2 .hr-command-head h2,
.ui-friendly-v2 .table-head h2,
.ui-friendly-v2 .business-inline-card-head h2,
.ui-friendly-v2 .filter-section-title h2 { margin: 0; }
.ui-friendly-v2 .panel-head p:not(.eyebrow),
.ui-friendly-v2 .hr-command-head p:not(.eyebrow),
.ui-friendly-v2 .table-head p:not(.eyebrow),
.ui-friendly-v2 .filter-section-title p:not(.eyebrow),
.ui-friendly-v2 .master-hub-title p,
.ui-friendly-v2 .ui-group-title p,
.ui-friendly-v2 .workspace-module-title p,
.ui-friendly-v2 .layer-paths,
.ui-friendly-v2 .admin-map-note span {
  color: var(--muted);
}
.ui-friendly-v2 .metric-row,
.ui-friendly-v2 .admin-overview-bar,
.ui-friendly-v2 .admin-snapshot-strip,
.ui-friendly-v2 .workspace-pulse-grid {
  gap: 12px;
  margin-bottom: 16px;
}
.ui-friendly-v2 .metric-card,
.ui-friendly-v2 .admin-overview-bar article,
.ui-friendly-v2 .admin-snapshot-strip article,
.ui-friendly-v2 .workspace-pulse-grid article {
  min-height: 118px;
  border-radius: 19px;
  border: 1px solid var(--line);
  background: var(--friendly-card-bg);
  box-shadow: var(--shadow-sm);
}
.ui-friendly-v2 .metric-card strong,
.ui-friendly-v2 .admin-overview-bar strong,
.ui-friendly-v2 .admin-snapshot-strip strong,
.ui-friendly-v2 .workspace-pulse-grid strong { letter-spacing: -.035em; }
.ui-friendly-v2 .metric-green { --card-accent: var(--accent-green); }
.ui-friendly-v2 .metric-blue { --card-accent: var(--accent-blue); }
.ui-friendly-v2 .metric-amber { --card-accent: var(--accent-amber); }
.ui-friendly-v2 .metric-red { --card-accent: var(--accent-red); }
.ui-friendly-v2 .metric-slate { --card-accent: var(--muted-2); }

.ui-friendly-v2 .filter-panel,
.ui-friendly-v2 .hr-command-panel,
.ui-friendly-v2 .business-registration-command-panel,
.ui-friendly-v2 .equipment-command-panel {
  --card-accent: var(--page-accent);
}
.ui-friendly-v2 .input,
.ui-friendly-v2 input,
.ui-friendly-v2 select,
.ui-friendly-v2 textarea {
  border-radius: 12px;
}
.ui-friendly-v2 .field label {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ui-friendly-v2 .column-chip-grid,
.ui-friendly-v2 .department-chip-grid,
.ui-friendly-v2 .compact-chip-grid,
.ui-friendly-v2 .filter-grid,
.ui-friendly-v2 .form-grid {
  gap: 10px;
}
.ui-friendly-v2 .table-wrap,
.ui-friendly-v2 .hr-scroll-shell,
.ui-friendly-v2 .wide-table-wrap {
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.018);
}
.ui-friendly-v2 .data-table thead th,
.ui-friendly-v2 .hr-grid-header .hr-grid-cell,
.ui-friendly-v2 .business-grid-header .business-grid-cell {
  background: rgba(90,167,255,.085);
  color: var(--text-strong);
}
.ui-friendly-v2 .data-table tbody tr:hover,
.ui-friendly-v2 .hr-grid-row:not(.hr-grid-header):hover,
.ui-friendly-v2 .business-grid-row:not(.business-grid-header):hover {
  background: var(--friendly-inner-bg-hover);
}

.ui-friendly-v2 .admin-layer-grid,
.ui-friendly-v2 .master-hub-grid,
.ui-friendly-v2 .ui-group-list,
.ui-friendly-v2 .workspace-card-list,
.ui-friendly-v2 .business-registration-type-grid,
.ui-friendly-v2 .pev-report-grid,
.ui-friendly-v2 .visual-report-grid {
  gap: 14px;
}
.ui-friendly-v2 .admin-layer-card,
.ui-friendly-v2 .master-hub-card,
.ui-friendly-v2 .ui-group-card,
.ui-friendly-v2 .workspace-module-card {
  border-radius: 22px;
}
.ui-friendly-v2 .admin-layer-card.primary-layer { --card-accent: var(--accent-cyan); }
.ui-friendly-v2 .ui-group-card.tone-green,
.ui-friendly-v2 .workspace-module-card.tone-green { --card-accent: var(--accent-green); }
.ui-friendly-v2 .ui-group-card.tone-teal,
.ui-friendly-v2 .workspace-module-card.tone-teal { --card-accent: var(--accent-teal); }
.ui-friendly-v2 .ui-group-card.tone-purple,
.ui-friendly-v2 .workspace-module-card.tone-purple { --card-accent: var(--accent-purple); }
.ui-friendly-v2 .ui-group-card.tone-blue,
.ui-friendly-v2 .workspace-module-card.tone-blue { --card-accent: var(--accent-blue); }
.ui-friendly-v2 .ui-group-card.tone-amber,
.ui-friendly-v2 .workspace-module-card.tone-amber { --card-accent: var(--accent-amber); }
.ui-friendly-v2 .ui-group-summary,
.ui-friendly-v2 .workspace-module-summary,
.ui-friendly-v2 .master-hub-title,
.ui-friendly-v2 .layer-card-top {
  gap: 12px;
}
.ui-friendly-v2 .ui-page-list,
.ui-friendly-v2 .workspace-page-list,
.ui-friendly-v2 .master-link-stack {
  gap: 8px;
}
.ui-friendly-v2 .ui-page-row,
.ui-friendly-v2 .workspace-page-row,
.ui-friendly-v2 .master-link-row,
.ui-friendly-v2 .business-registration-type-card {
  border: 1px solid var(--line-soft);
  background: var(--friendly-inner-bg);
  border-radius: 15px;
}
.ui-friendly-v2 .ui-page-row small,
.ui-friendly-v2 .workspace-page-row small,
.ui-friendly-v2 .master-link-row small {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ui-friendly-v2 .form-strip,
.ui-friendly-v2 .notes-box,
.ui-friendly-v2 .detail-item,
.ui-friendly-v2 .executive-number-block,
.ui-friendly-v2 .executive-highlight-item,
.ui-friendly-v2 .business-inline-kpi,
.ui-friendly-v2 .business-inline-row,
.ui-friendly-v2 .stat-mini-card,
.ui-friendly-v2 .pro-bar-row {
  border-radius: 15px;
  border: 1px solid var(--line-soft);
  background: var(--friendly-inner-bg);
}
.ui-friendly-v2 .form-strip {
  padding: 12px 14px;
  border-inline-start: 4px solid var(--page-accent);
}
.ui-friendly-v2 .detail-item span,
.ui-friendly-v2 .executive-number-block span,
.ui-friendly-v2 .business-inline-kpi span,
.ui-friendly-v2 .stat-mini-card span {
  color: var(--muted);
}

/* Executive Dashboard V2: one bounded block and one main button per module */
.executive-v2-body .page-shell { width: min(1320px, calc(100vw - 28px)); }
.exec-v2-hero {
  --card-accent: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.exec-v2-hero-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.exec-v2-hero-meta span,
.exec-v2-code {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 42px;
  padding-inline: 10px;
  border-radius: 14px;
  color: #fff;
  font-weight: 950;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--card-accent, var(--accent-blue)), rgba(29,63,145,.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 10px 22px rgba(0,0,0,.16);
}
.exec-v2-hero-meta .tone-hr { --card-accent: var(--accent-green); }
.exec-v2-hero-meta .tone-pev { --card-accent: var(--accent-teal); }
.exec-v2-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.exec-v2-module {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  min-width: 0;
}
.exec-v2-hr { --card-accent: var(--accent-green); }
.exec-v2-pev { --card-accent: var(--accent-teal); }
.exec-v2-module-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.exec-v2-module-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.exec-v2-module-title h2 { margin: 0; }
.exec-v2-code { --card-accent: inherit; width: 48px; min-width: 48px; }
.exec-v2-action {
  min-height: 42px;
  white-space: nowrap;
  border-radius: 999px;
}
.exec-v2-action.disabled {
  opacity: .58;
  pointer-events: none;
}
.exec-v2-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.exec-v2-kpi {
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  padding: 13px;
  background: var(--friendly-inner-bg);
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 5px;
}
.exec-v2-kpi span,
.exec-v2-kpi small,
.exec-v2-focus-card dt,
.exec-v2-focus-card em {
  color: var(--muted);
  font-weight: 850;
}
.exec-v2-kpi strong {
  display: block;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1;
  letter-spacing: -.04em;
}
.exec-v2-kpi.risk { border-color: rgba(255,107,120,.28); }
.exec-v2-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.exec-v2-focus-card {
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: rgba(255,255,255,.026);
  padding: 14px;
}
.exec-v2-focus-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: .01em;
}
.exec-v2-focus-card dl,
.exec-v2-focus-card dt,
.exec-v2-focus-card dd { margin: 0; }
.exec-v2-focus-card dl { display: grid; gap: 8px; }
.exec-v2-focus-card dl > div {
  display: grid;
  grid-template-columns: minmax(110px, .75fr) minmax(0, 1.25fr);
  gap: 10px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.exec-v2-focus-card dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.exec-v2-focus-card dd {
  min-width: 0;
  color: var(--text-strong);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.exec-v2-focus-card em {
  margin-inline-start: 6px;
  font-style: normal;
}

html[data-theme="light"] .ui-friendly-v2 {
  --friendly-card-bg: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.88));
  --friendly-inner-bg: rgba(248,250,252,.82);
  --friendly-inner-bg-hover: rgba(239,246,255,.95);
}
html[data-theme="light"] .ui-friendly-v2 .page-head,
html[data-theme="light"] .ui-friendly-v2 .section-header-clean,
html[data-theme="light"] .ui-friendly-v2 .section-page-head,
html[data-theme="light"] .ui-friendly-v2 .compact-page-head,
html[data-theme="light"] .ui-friendly-v2 .admin-map-hero,
html[data-theme="light"] .ui-friendly-v2 .workspace-hero,
html[data-theme="light"] .ui-friendly-v2 .exec-v2-hero,
html[data-theme="light"] .ui-friendly-v2 .panel,
html[data-theme="light"] .ui-friendly-v2 .metric-card,
html[data-theme="light"] .ui-friendly-v2 .admin-layer-card,
html[data-theme="light"] .ui-friendly-v2 .master-hub-card,
html[data-theme="light"] .ui-friendly-v2 .config-area-card,
html[data-theme="light"] .ui-friendly-v2 .ui-group-card,
html[data-theme="light"] .ui-friendly-v2 .interface-group-card,
html[data-theme="light"] .ui-friendly-v2 .interface-policy-card,
html[data-theme="light"] .ui-friendly-v2 .workflow-card,
html[data-theme="light"] .ui-friendly-v2 .workspace-module-card,
html[data-theme="light"] .ui-friendly-v2 .pro-viz-card,
html[data-theme="light"] .ui-friendly-v2 .report-panel,
html[data-theme="light"] .ui-friendly-v2 .form-panel,
html[data-theme="light"] .ui-friendly-v2 .detail-panel,
html[data-theme="light"] .ui-friendly-v2 .hr-command-panel,
html[data-theme="light"] .ui-friendly-v2 .hr-register-card,
html[data-theme="light"] .ui-friendly-v2 .table-panel,
html[data-theme="light"] .ui-friendly-v2 .users-panel,
html[data-theme="light"] .ui-friendly-v2 .section-card-large,
html[data-theme="light"] .ui-friendly-v2 .business-inline-card,
html[data-theme="light"] .ui-friendly-v2 .exec-v2-module {
  border-color: rgba(15,23,42,.10);
  box-shadow: 0 14px 34px rgba(15,23,42,.07);
}
html[data-theme="light"] .ui-friendly-v2 .field label,
html[data-theme="light"] .ui-friendly-v2 .exec-v2-kpi span,
html[data-theme="light"] .ui-friendly-v2 .exec-v2-kpi small,
html[data-theme="light"] .ui-friendly-v2 .exec-v2-focus-card dt,
html[data-theme="light"] .ui-friendly-v2 .exec-v2-focus-card em,
html[data-theme="light"] .ui-friendly-v2 .detail-item span,
html[data-theme="light"] .ui-friendly-v2 .executive-number-block span,
html[data-theme="light"] .ui-friendly-v2 .business-inline-kpi span,
html[data-theme="light"] .ui-friendly-v2 .stat-mini-card span { color: #64748b; }
html[data-theme="light"] .ui-friendly-v2 .table-wrap,
html[data-theme="light"] .ui-friendly-v2 .hr-scroll-shell,
html[data-theme="light"] .ui-friendly-v2 .wide-table-wrap,
html[data-theme="light"] .ui-friendly-v2 .exec-v2-kpi,
html[data-theme="light"] .ui-friendly-v2 .exec-v2-focus-card,
html[data-theme="light"] .ui-friendly-v2 .ui-page-row,
html[data-theme="light"] .ui-friendly-v2 .workspace-page-row,
html[data-theme="light"] .ui-friendly-v2 .master-link-row,
html[data-theme="light"] .ui-friendly-v2 .business-registration-type-card,
html[data-theme="light"] .ui-friendly-v2 .form-strip,
html[data-theme="light"] .ui-friendly-v2 .notes-box,
html[data-theme="light"] .ui-friendly-v2 .detail-item,
html[data-theme="light"] .ui-friendly-v2 .executive-number-block,
html[data-theme="light"] .ui-friendly-v2 .executive-highlight-item,
html[data-theme="light"] .ui-friendly-v2 .business-inline-kpi,
html[data-theme="light"] .ui-friendly-v2 .business-inline-row,
html[data-theme="light"] .ui-friendly-v2 .stat-mini-card,
html[data-theme="light"] .ui-friendly-v2 .pro-bar-row {
  background: rgba(248,250,252,.82);
  border-color: rgba(15,23,42,.08);
}
html[data-theme="light"] .ui-friendly-v2 .data-table thead th,
html[data-theme="light"] .ui-friendly-v2 .hr-grid-header .hr-grid-cell,
html[data-theme="light"] .ui-friendly-v2 .business-grid-header .business-grid-cell {
  background: rgba(239,246,255,.95);
}

@media (max-width: 1180px) {
  .exec-v2-module-grid,
  .exec-v2-info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .exec-v2-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exec-v2-module-head { grid-template-columns: 1fr; }
  .exec-v2-action { justify-self: start; }
}
@media (max-width: 640px) {
  .exec-v2-hero { flex-direction: column; align-items: stretch; }
  .exec-v2-hero-meta { justify-content: flex-start; }
  .exec-v2-kpi-row { grid-template-columns: 1fr; }
  .exec-v2-focus-card dl > div { grid-template-columns: 1fr; gap: 2px; }
}

html[dir="rtl"] .ui-friendly-v2 .page-head::before,
html[dir="rtl"] .ui-friendly-v2 .section-header-clean::before,
html[dir="rtl"] .ui-friendly-v2 .section-page-head::before,
html[dir="rtl"] .ui-friendly-v2 .compact-page-head::before,
html[dir="rtl"] .ui-friendly-v2 .admin-map-hero::before,
html[dir="rtl"] .ui-friendly-v2 .workspace-hero::before,
html[dir="rtl"] .ui-friendly-v2 .exec-v2-hero::before,
html[dir="rtl"] .ui-friendly-v2 .panel::before,
html[dir="rtl"] .ui-friendly-v2 .metric-card::before,
html[dir="rtl"] .ui-friendly-v2 .admin-layer-card::before,
html[dir="rtl"] .ui-friendly-v2 .master-hub-card::before,
html[dir="rtl"] .ui-friendly-v2 .ui-group-card::before,
html[dir="rtl"] .ui-friendly-v2 .workspace-module-card::before,
html[dir="rtl"] .ui-friendly-v2 .business-inline-card::before,
html[dir="rtl"] .ui-friendly-v2 .pro-viz-card::before,
html[dir="rtl"] .ui-friendly-v2 .exec-v2-module::before {
  background: linear-gradient(270deg, var(--card-accent, var(--page-accent)), transparent 78%);
}

/* ========================================================================== 
   PREMIUM UI V3 · compact executive cockpit, clearer module boundaries,
   stronger critical coloring and low-noise pages
   ========================================================================== */
body.ui-premium-v3 {
  --premium-surface: rgba(9, 20, 34, .86);
  --premium-surface-2: rgba(14, 30, 49, .78);
  --premium-surface-3: rgba(255, 255, 255, .045);
  --premium-border: rgba(170, 198, 229, .22);
  --premium-border-strong: rgba(170, 198, 229, .34);
  --premium-shadow: 0 18px 46px rgba(0, 0, 0, .26);
  --premium-text: #f8fbff;
  --premium-muted: #a9bbd0;
  --premium-blue: #4f8cff;
  --premium-green: #18b985;
  --premium-teal: #10b8c8;
  --premium-amber: #f59e0b;
  --premium-red: #ef4444;
  --premium-purple: #8b5cf6;
  background:
    radial-gradient(circle at 10% 4%, rgba(79, 140, 255, .13), transparent 28%),
    radial-gradient(circle at 92% 2%, rgba(16, 184, 200, .10), transparent 26%),
    linear-gradient(135deg, #07111e 0%, #0a1829 44%, #081321 100%);
}

html[data-theme="light"] body.ui-premium-v3 {
  --premium-surface: rgba(255, 255, 255, .94);
  --premium-surface-2: rgba(248, 250, 252, .92);
  --premium-surface-3: rgba(15, 23, 42, .035);
  --premium-border: rgba(15, 23, 42, .105);
  --premium-border-strong: rgba(37, 99, 235, .18);
  --premium-shadow: 0 16px 38px rgba(15, 23, 42, .08);
  --premium-text: #111827;
  --premium-muted: #64748b;
  background:
    radial-gradient(circle at 9% 0%, rgba(37, 99, 235, .085), transparent 28%),
    radial-gradient(circle at 92% 0%, rgba(20, 184, 166, .085), transparent 26%),
    linear-gradient(135deg, #f7fafc 0%, #edf3f8 52%, #f8fbff 100%);
}

.ui-premium-v3 .page-shell {
  width: min(1360px, calc(100vw - 32px));
  padding-top: 14px;
}
.ui-premium-v3 .site-footer { color: var(--premium-muted); }
.ui-premium-v3 .clean-header-inner { min-height: 60px; }
.ui-premium-v3 .brand-logo { height: 42px; }
.ui-premium-v3 .brand-block { height: 34px; min-width: 42px; font-size: 20px; border-radius: 10px; }
.ui-premium-v3 .brand-rest { height: 34px; font-size: clamp(16px, 1.8vw, 22px); }
.ui-premium-v3 .nav-link,
.ui-premium-v3 .lang-link,
.ui-premium-v3 .current-user,
.ui-premium-v3 .theme-toggle { min-height: 32px; padding: 6px 10px; }

.ui-premium-v3 .page-head p:not(.eyebrow),
.ui-premium-v3 .section-header-clean p:not(.eyebrow),
.ui-premium-v3 .admin-map-hero p:not(.eyebrow),
.ui-premium-v3 .panel-head p:not(.eyebrow),
.ui-premium-v3 .hr-command-head p:not(.eyebrow),
.ui-premium-v3 .filter-section-title p:not(.eyebrow),
.ui-premium-v3 .table-head p:not(.eyebrow),
.ui-premium-v3 .executive-card-head p:not(.eyebrow),
.ui-premium-v3 .section-note,
.ui-premium-v3 .viz-inner-filter small,
.ui-premium-v3 .workspace-page-text small,
.ui-premium-v3 .ui-group-title p,
.ui-premium-v3 .master-hub-title p,
.ui-premium-v3 .layer-paths,
.ui-premium-v3 .layer-mini-list,
.ui-premium-v3 .admin-map-note span {
  display: none !important;
}

.ui-premium-v3 .premium-command-hero,
.ui-premium-v3 .exec-cockpit-hero,
.ui-premium-v3 .workspace-command-hero,
.ui-premium-v3 .premium-report-head {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  border-radius: 24px;
  border: 1px solid var(--premium-border);
  background:
    linear-gradient(135deg, rgba(79, 140, 255, .14), transparent 35%),
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018)),
    var(--premium-surface);
  box-shadow: var(--premium-shadow);
}
.ui-premium-v3 .premium-command-hero::before,
.ui-premium-v3 .exec-cockpit-hero::before,
.ui-premium-v3 .workspace-command-hero::before,
.ui-premium-v3 .premium-report-head::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--page-accent, var(--premium-blue)), transparent 72%);
  pointer-events: none;
}
.ui-premium-v3 .premium-title-block h1,
.ui-premium-v3 .premium-report-head h1,
.ui-premium-v3 .workspace-command-hero h1 {
  margin: 0;
  color: var(--premium-text);
  letter-spacing: -.045em;
  line-height: 1.02;
}
.ui-premium-v3 .premium-title-block .eyebrow,
.ui-premium-v3 .workspace-command-hero .eyebrow,
.ui-premium-v3 .premium-report-head .eyebrow {
  margin-bottom: 4px;
}
.ui-premium-v3 .premium-hero-actions,
.ui-premium-v3 .exec-cockpit-actions,
.ui-premium-v3 .workspace-command-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ui-premium-v3 .btn,
.ui-premium-v3 a.btn,
.ui-premium-v3 button.btn {
  min-height: 36px;
  border-radius: 12px;
  font-weight: 900;
  letter-spacing: -.01em;
}
.ui-premium-v3 .btn-primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--page-accent, var(--premium-blue)), #1d3f91);
  box-shadow: 0 12px 24px rgba(29, 63, 145, .22);
}
.ui-premium-v3 .btn-secondary,
.ui-premium-v3 .btn-ghost {
  color: var(--premium-text);
  border-color: var(--premium-border);
  background: var(--premium-surface-3);
}

.ui-premium-v3 .premium-stat-strip,
.ui-premium-v3 .exec-topline-grid,
.ui-premium-v3 .metric-row.compact-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.ui-premium-v3 .metric-row-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ui-premium-v3 .premium-stat-strip article,
.ui-premium-v3 .exec-topline-card,
.ui-premium-v3 .metric-card,
.ui-premium-v3 .workspace-pulse-grid article {
  position: relative;
  min-height: 92px;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid var(--premium-border);
  background: var(--premium-surface);
  box-shadow: var(--premium-shadow);
  overflow: hidden;
}
.ui-premium-v3 .premium-stat-strip article::before,
.ui-premium-v3 .exec-topline-card::before,
.ui-premium-v3 .metric-card::before,
.ui-premium-v3 .workspace-pulse-grid article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--card-accent, var(--page-accent));
}
html[dir="rtl"] .ui-premium-v3 .premium-stat-strip article::before,
html[dir="rtl"] .ui-premium-v3 .exec-topline-card::before,
html[dir="rtl"] .ui-premium-v3 .metric-card::before,
html[dir="rtl"] .ui-premium-v3 .workspace-pulse-grid article::before { inset: 0 0 0 auto; }
.ui-premium-v3 .premium-stat-strip span,
.ui-premium-v3 .exec-topline-card span,
.ui-premium-v3 .metric-card span { color: var(--premium-muted); font-weight: 850; }
.ui-premium-v3 .premium-stat-strip strong,
.ui-premium-v3 .exec-topline-card strong,
.ui-premium-v3 .metric-card strong { color: var(--premium-text); font-size: clamp(24px, 2vw, 34px); letter-spacing: -.045em; line-height: 1; }
.ui-premium-v3 .premium-stat-strip small,
.ui-premium-v3 .exec-topline-card small,
.ui-premium-v3 .metric-card small { color: var(--premium-muted); }
.ui-premium-v3 .metric-blue { --card-accent: var(--premium-blue); }
.ui-premium-v3 .metric-green { --card-accent: var(--premium-green); }
.ui-premium-v3 .metric-teal { --card-accent: var(--premium-teal); }
.ui-premium-v3 .metric-amber { --card-accent: var(--premium-amber); }
.ui-premium-v3 .metric-red { --card-accent: var(--premium-red); }
.ui-premium-v3 .metric-slate { --card-accent: #94a3b8; }

/* Admin command board */
.ui-premium-v3 .admin-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.ui-premium-v3 .admin-command-card,
.ui-premium-v3 .ui-catalog-card,
.ui-premium-v3 .workspace-premium-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--premium-border);
  border-radius: 22px;
  background: var(--premium-surface);
  box-shadow: var(--premium-shadow);
}
.ui-premium-v3 .admin-command-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 126px;
  padding: 18px;
  color: var(--premium-text);
  text-decoration: none;
}
.ui-premium-v3 .admin-command-card::before,
.ui-premium-v3 .ui-catalog-card::before,
.ui-premium-v3 .workspace-premium-card::before,
.ui-premium-v3 .exec-control-module::before,
.ui-premium-v3 .fleet-score-card::before,
.ui-premium-v3 .fleet-status-card::before,
.ui-premium-v3 .pev-rank-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--card-accent, var(--page-accent)), transparent 78%);
}
.ui-premium-v3 .admin-command-card.primary-layer { --card-accent: var(--premium-blue); }
.ui-premium-v3 .admin-command-card.system-card { --card-accent: var(--premium-purple); }
.ui-premium-v3 .admin-command-card.foundation-card { --card-accent: var(--premium-green); }
.ui-premium-v3 .admin-command-card.workflow-card { --card-accent: var(--premium-amber); }
.ui-premium-v3 .command-code {
  display: inline-grid;
  place-items: center;
  width: 48px;
  min-width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--card-accent, var(--page-accent)), #1d3f91);
  color: #fff;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 12px 24px rgba(0,0,0,.18);
}
.ui-premium-v3 .command-body { display: grid; gap: 5px; min-width: 0; }
.ui-premium-v3 .command-body strong { color: var(--premium-text); font-size: 20px; letter-spacing: -.03em; }
.ui-premium-v3 .command-body small { color: var(--premium-muted); font-weight: 800; }
.ui-premium-v3 .command-body em { display: flex; flex-wrap: wrap; gap: 6px; font-style: normal; }
.ui-premium-v3 .command-body em b {
  border: 1px solid var(--premium-border);
  background: var(--premium-surface-3);
  color: var(--premium-muted);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}
.ui-premium-v3 .admin-command-card > i,
.ui-premium-v3 .ui-catalog-row > i,
.ui-premium-v3 .workspace-premium-row > i {
  font-style: normal;
  color: var(--premium-blue);
  font-weight: 950;
}
.ui-premium-v3 .admin-command-card:hover,
.ui-premium-v3 .ui-catalog-row:hover,
.ui-premium-v3 .workspace-premium-row:hover,
.ui-premium-v3 .fleet-status-row:hover,
.ui-premium-v3 .pev-rank-row:hover {
  transform: translateY(-1px);
  border-color: var(--premium-border-strong);
  color: var(--premium-text);
}
.ui-premium-v3 .premium-activity-panel { padding: 16px; }
.ui-premium-v3 .premium-event-list { gap: 8px; }
.ui-premium-v3 .premium-event-row { border-radius: 14px; }

/* User interface catalog */
.ui-premium-v3 .ui-catalog-grid { display: grid; gap: 12px; }
.ui-premium-v3 .ui-catalog-card.tone-green,
.ui-premium-v3 .workspace-premium-card.tone-green { --card-accent: var(--premium-green); }
.ui-premium-v3 .ui-catalog-card.tone-teal,
.ui-premium-v3 .workspace-premium-card.tone-teal { --card-accent: var(--premium-teal); }
.ui-premium-v3 .ui-catalog-card.tone-blue,
.ui-premium-v3 .workspace-premium-card.tone-blue { --card-accent: var(--premium-blue); }
.ui-premium-v3 .ui-catalog-card.tone-purple,
.ui-premium-v3 .workspace-premium-card.tone-purple { --card-accent: var(--premium-purple); }
.ui-premium-v3 .ui-catalog-card.tone-amber,
.ui-premium-v3 .workspace-premium-card.tone-amber { --card-accent: var(--premium-amber); }
.ui-premium-v3 .ui-catalog-card.tone-slate,
.ui-premium-v3 .workspace-premium-card.tone-slate { --card-accent: #94a3b8; }
.ui-premium-v3 .ui-catalog-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}
.ui-premium-v3 .ui-catalog-summary::-webkit-details-marker { display: none; }
.ui-premium-v3 .ui-catalog-pages { display: grid; gap: 8px; padding: 0 14px 14px; }
.ui-premium-v3 .ui-catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--premium-border);
  border-radius: 14px;
  background: var(--premium-surface-3);
  color: var(--premium-text);
  text-decoration: none;
}
.ui-premium-v3 .ui-catalog-row.disabled { opacity: .70; }

/* Workspace */
.ui-premium-v3 .workspace-premium-shell { width: min(1180px, calc(100vw - 32px)); }
.ui-premium-v3 .workspace-command-hero { --page-accent: var(--premium-teal); }
.ui-premium-v3 .workspace-identity-compact { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ui-premium-v3 .workspace-avatar { width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, var(--premium-teal), var(--premium-blue)); }
.ui-premium-v3 .workspace-chip-line { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.ui-premium-v3 .workspace-chip-line span {
  border: 1px solid var(--premium-border);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--premium-muted);
  background: var(--premium-surface-3);
  font-weight: 850;
  font-size: 12px;
}
.ui-premium-v3 .workspace-premium-panel {
  border: 1px solid var(--premium-border);
  border-radius: 24px;
  background: var(--premium-surface);
  box-shadow: var(--premium-shadow);
  padding: 16px;
}
.ui-premium-v3 .workspace-premium-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--premium-border); }
.ui-premium-v3 .workspace-premium-toolbar h2 { margin: 0; }
.ui-premium-v3 .workspace-search-box { min-width: min(340px, 100%); }
.ui-premium-v3 .workspace-search-box label { font-size: 11px; font-weight: 900; text-transform: uppercase; color: var(--premium-muted); }
.ui-premium-v3 .workspace-premium-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.ui-premium-v3 .workspace-premium-card { padding: 14px; }
.ui-premium-v3 .workspace-premium-card header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 12px; }
.ui-premium-v3 .workspace-premium-card h3 { margin: 0; color: var(--premium-text); letter-spacing: -.025em; }
.ui-premium-v3 .workspace-premium-card p { margin: 2px 0 0; color: var(--premium-muted); font-weight: 800; }
.ui-premium-v3 .workspace-premium-pages { display: grid; gap: 8px; }
.ui-premium-v3 .workspace-premium-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  min-height: 48px;
  border: 1px solid var(--premium-border);
  border-radius: 14px;
  background: var(--premium-surface-3);
  color: var(--premium-text);
  text-decoration: none;
}
.ui-premium-v3 .workspace-premium-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Executive cockpit */
.ui-premium-v3.executive-premium-body .page-shell { width: min(1280px, calc(100vw - 32px)); }
.ui-premium-v3 .exec-cockpit-hero { --page-accent: var(--premium-blue); }
.ui-premium-v3 .exec-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.ui-premium-v3 .exec-control-module {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--premium-border);
  background: var(--premium-surface);
  box-shadow: var(--premium-shadow);
}
.ui-premium-v3 .exec-control-hr { --module-accent: var(--premium-green); --card-accent: var(--premium-green); }
.ui-premium-v3 .exec-control-pev { --module-accent: var(--premium-teal); --card-accent: var(--premium-teal); }
.ui-premium-v3 .exec-control-module .command-code { background: linear-gradient(135deg, var(--module-accent), #1d3f91); }
.ui-premium-v3 .exec-control-module .btn-primary { background: linear-gradient(135deg, var(--module-accent), #1d3f91); }
.ui-premium-v3 .exec-control-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--premium-border); }
.ui-premium-v3 .exec-control-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ui-premium-v3 .exec-control-title h2 { margin: 0; color: var(--premium-text); letter-spacing: -.03em; }
.ui-premium-v3 .exec-module-body { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.ui-premium-v3 .exec-radial-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ui-premium-v3 .premium-ring {
  --ring-color: var(--premium-blue);
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) var(--score, 0%), rgba(148, 163, 184, .18) 0);
  box-shadow: inset 0 0 0 1px var(--premium-border), 0 12px 24px rgba(0,0,0,.16);
}
.ui-premium-v3 .premium-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  background: var(--premium-surface);
  border: 1px solid var(--premium-border);
}
.ui-premium-v3 .premium-ring strong,
.ui-premium-v3 .premium-ring span { position: relative; z-index: 1; text-align: center; }
.ui-premium-v3 .premium-ring strong { color: var(--premium-text); font-size: 18px; line-height: 1; }
.ui-premium-v3 .premium-ring span { margin-top: 26px; position: absolute; font-size: 10px; color: var(--premium-muted); font-weight: 900; text-transform: uppercase; }
.ui-premium-v3 .ring-green { --ring-color: var(--premium-green); }
.ui-premium-v3 .ring-teal { --ring-color: var(--premium-teal); }
.ui-premium-v3 .ring-amber { --ring-color: var(--premium-amber); }
.ui-premium-v3 .ring-red { --ring-color: var(--premium-red); }
.ui-premium-v3 .exec-mini-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ui-premium-v3 .exec-mini-kpis div,
.ui-premium-v3 .fleet-kpi-strip div,
.ui-premium-v3 .exec-insight-card {
  border: 1px solid var(--premium-border);
  border-radius: 15px;
  background: var(--premium-surface-3);
  padding: 10px;
}
.ui-premium-v3 .exec-mini-kpis span,
.ui-premium-v3 .fleet-kpi-strip span,
.ui-premium-v3 .exec-insight-card span,
.ui-premium-v3 .exec-insight-card small { color: var(--premium-muted); font-weight: 850; }
.ui-premium-v3 .exec-mini-kpis strong,
.ui-premium-v3 .fleet-kpi-strip strong,
.ui-premium-v3 .exec-insight-card strong { display: block; color: var(--premium-text); font-size: 20px; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-premium-v3 .exec-mini-kpis .risk,
.ui-premium-v3 .exec-insight-card.risk,
.ui-premium-v3 .fleet-kpi-strip .risk { border-color: rgba(239, 68, 68, .38); background: rgba(239, 68, 68, .10); }
.ui-premium-v3 .fleet-kpi-strip .ok { border-color: rgba(24, 185, 133, .38); background: rgba(24, 185, 133, .10); }
.ui-premium-v3 .exec-insight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ui-premium-v3 .premium-progress,
.ui-premium-v3 .premium-split,
.ui-premium-v3 .pev-rank-meter {
  display: block;
  height: 8px;
  margin: 8px 0 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, .18);
}
.ui-premium-v3 .premium-progress i,
.ui-premium-v3 .pev-rank-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--module-accent, var(--card-accent, var(--premium-blue))), rgba(255,255,255,.58));
}
.ui-premium-v3 .premium-split { display: flex; margin-top: 8px; }
.ui-premium-v3 .premium-split i,
.ui-premium-v3 .premium-split b { display: block; height: 100%; }
.ui-premium-v3 .premium-split i { background: var(--premium-green); }
.ui-premium-v3 .premium-split b { background: var(--premium-amber); }

/* Fleet detailed report */
.ui-premium-v3 .fleet-cockpit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 14px;
  margin-bottom: 14px;
}
.ui-premium-v3 .fleet-score-card,
.ui-premium-v3 .fleet-status-card,
.ui-premium-v3 .pev-rank-card { --card-accent: var(--premium-teal); padding: 16px; }
.ui-premium-v3 .fleet-score-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 12px; }
.ui-premium-v3 .fleet-score-main h2 { margin: 0; color: var(--premium-text); }
.ui-premium-v3 .fleet-kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ui-premium-v3 .fleet-status-list,
.ui-premium-v3 .pev-rank-list { display: grid; gap: 8px; }
.ui-premium-v3 .fleet-status-row,
.ui-premium-v3 .pev-rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, .8fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid var(--premium-border);
  background: var(--premium-surface-3);
  color: var(--premium-text);
  text-decoration: none;
}
.ui-premium-v3 .fleet-status-row span,
.ui-premium-v3 .pev-rank-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.ui-premium-v3 .pev-rank-label { display: grid; gap: 2px; min-width: 0; }
.ui-premium-v3 .pev-rank-label small { color: var(--premium-muted); }
.ui-premium-v3 .premium-rank-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* Report dashboards and registers */
.ui-premium-v3 .hr-executive-dashboard,
.ui-premium-v3 .pev-executive-dashboard {
  gap: 12px;
  margin-bottom: 14px;
}
.ui-premium-v3 .executive-main-card,
.ui-premium-v3 .executive-status-card,
.ui-premium-v3 .executive-driver-card,
.ui-premium-v3 .executive-risk-card,
.ui-premium-v3 .pro-viz-card,
.ui-premium-v3 .report-panel,
.ui-premium-v3 .hr-report-control-panel,
.ui-premium-v3 .filter-panel,
.ui-premium-v3 .hr-register-card,
.ui-premium-v3 .table-panel,
.ui-premium-v3 .users-panel {
  border-color: var(--premium-border);
  background: var(--premium-surface);
  box-shadow: var(--premium-shadow);
}
.ui-premium-v3 .executive-number-grid,
.ui-premium-v3 .executive-highlight-strip { gap: 8px; }
.ui-premium-v3 .executive-number-block,
.ui-premium-v3 .executive-highlight-item,
.ui-premium-v3 .stat-mini-card,
.ui-premium-v3 .business-inline-kpi,
.ui-premium-v3 .pro-bar-row,
.ui-premium-v3 .report-list-row,
.ui-premium-v3 .total-stack > div,
.ui-premium-v3 .driver-row,
.ui-premium-v3 .risk-stack > div {
  border-color: var(--premium-border);
  background: var(--premium-surface-3);
}
.ui-premium-v3 .executive-number-block.risk,
.ui-premium-v3 .executive-risk-card { --card-accent: var(--premium-red); }
.ui-premium-v3 .pro-viz-grid { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; }
.ui-premium-v3 .pro-viz-card { padding: 14px; border-radius: 20px; }
.ui-premium-v3 .pro-viz-card.wide-viz { grid-column: span 2; }
.ui-premium-v3 .viz-card-head { gap: 10px; margin-bottom: 10px; }
.ui-premium-v3 .viz-control-stack { gap: 6px; }
.ui-premium-v3 .viz-sort-box { min-width: 150px; }
.ui-premium-v3 .viz-inner-filter {
  border: 1px solid var(--premium-border);
  border-radius: 14px;
  background: var(--premium-surface-3);
  padding: 8px;
}
.ui-premium-v3 .viz-total-line { gap: 6px; font-size: 11px; }
.ui-premium-v3 .matrix-heatmap-wrap,
.ui-premium-v3 .table-wrap,
.ui-premium-v3 .hr-scroll-shell,
.ui-premium-v3 .wide-table-wrap {
  border-color: var(--premium-border);
  background: rgba(0,0,0,.10);
}
.ui-premium-v3 .data-table { font-size: 12px; }
.ui-premium-v3 .data-table th,
.ui-premium-v3 .data-table td { padding: 9px 10px; }
.ui-premium-v3 .data-table thead th,
.ui-premium-v3 .hr-grid-header .hr-grid-cell,
.ui-premium-v3 .business-grid-header .business-grid-cell {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(79,140,255,.18), rgba(79,140,255,.10));
  color: var(--premium-text);
  border-bottom-color: var(--premium-border-strong);
}
.ui-premium-v3 .data-table tbody tr:hover,
.ui-premium-v3 .hr-grid-row:not(.hr-grid-header):hover,
.ui-premium-v3 .business-grid-row:not(.business-grid-header):hover {
  background: rgba(79, 140, 255, .08);
}
.ui-premium-v3 .hr-grid-cell { min-height: 38px; padding: 8px 10px; }
.ui-premium-v3 .hr-register-toolbar { gap: 12px; padding-bottom: 12px; margin-bottom: 12px; }
.ui-premium-v3 .hr-register-toolbar p:not(.eyebrow) { display: none !important; }
.ui-premium-v3 .filter-grid,
.ui-premium-v3 .form-grid,
.ui-premium-v3 .personnel-multi-grid,
.ui-premium-v3 .column-filter-grid { gap: 9px; }
.ui-premium-v3 .multi-filter-shell { border-radius: 14px; border-color: var(--premium-border); background: var(--premium-surface-3); }
.ui-premium-v3 .advanced-report-filters,
.ui-premium-v3 .advanced-filter-box,
.ui-premium-v3 .column-report-filters,
.ui-premium-v3 .infographic-config-panel {
  border: 1px solid var(--premium-border);
  border-radius: 16px;
  background: var(--premium-surface-3);
  padding: 10px 12px;
}
.ui-premium-v3 .advanced-report-filters summary,
.ui-premium-v3 .advanced-filter-box summary,
.ui-premium-v3 .column-report-filters summary,
.ui-premium-v3 .infographic-config-panel summary {
  cursor: pointer;
  color: var(--premium-text);
  font-weight: 950;
}
.ui-premium-v3 .input,
.ui-premium-v3 input,
.ui-premium-v3 select,
.ui-premium-v3 textarea {
  background: rgba(7, 17, 30, .48);
  border-color: var(--premium-border);
  color: var(--premium-text);
}
.ui-premium-v3 .input:focus,
.ui-premium-v3 input:focus,
.ui-premium-v3 select:focus,
.ui-premium-v3 textarea:focus {
  border-color: var(--premium-blue);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, .18);
}
.ui-premium-v3 .field label { color: var(--premium-muted); }

/* Stronger semantic badges */
.ui-premium-v3 .badge-active,
.ui-premium-v3 .badge-ready-for-work,
.ui-premium-v3 .badge-success,
.ui-premium-v3 .live {
  color: #d1fae5;
  background: rgba(24, 185, 133, .16);
  border-color: rgba(24, 185, 133, .36);
}
.ui-premium-v3 .badge-in-project,
.ui-premium-v3 .badge-user,
.ui-premium-v3 .badge-normal {
  color: #cffafe;
  background: rgba(16, 184, 200, .15);
  border-color: rgba(16, 184, 200, .34);
}
.ui-premium-v3 .badge-breakdown,
.ui-premium-v3 .badge-disposed,
.ui-premium-v3 .badge-rejected,
.ui-premium-v3 .badge-expired {
  color: #fee2e2;
  background: rgba(239, 68, 68, .16);
  border-color: rgba(239, 68, 68, .38);
}
.ui-premium-v3 .badge-planned,
.ui-premium-v3 .badge-warning,
.ui-premium-v3 .badge-draft,
.ui-premium-v3 .badge-pms,
.ui-premium-v3 .badge-under-sale {
  color: #fef3c7;
  background: rgba(245, 158, 11, .17);
  border-color: rgba(245, 158, 11, .40);
}

html[data-theme="light"] .ui-premium-v3 .premium-command-hero,
html[data-theme="light"] .ui-premium-v3 .exec-cockpit-hero,
html[data-theme="light"] .ui-premium-v3 .workspace-command-hero,
html[data-theme="light"] .ui-premium-v3 .premium-report-head,
html[data-theme="light"] .ui-premium-v3 .premium-stat-strip article,
html[data-theme="light"] .ui-premium-v3 .exec-topline-card,
html[data-theme="light"] .ui-premium-v3 .metric-card,
html[data-theme="light"] .ui-premium-v3 .admin-command-card,
html[data-theme="light"] .ui-premium-v3 .ui-catalog-card,
html[data-theme="light"] .ui-premium-v3 .workspace-premium-card,
html[data-theme="light"] .ui-premium-v3 .workspace-premium-panel,
html[data-theme="light"] .ui-premium-v3 .exec-control-module,
html[data-theme="light"] .ui-premium-v3 .fleet-score-card,
html[data-theme="light"] .ui-premium-v3 .fleet-status-card,
html[data-theme="light"] .ui-premium-v3 .pev-rank-card,
html[data-theme="light"] .ui-premium-v3 .panel,
html[data-theme="light"] .ui-premium-v3 .filter-panel,
html[data-theme="light"] .ui-premium-v3 .table-panel,
html[data-theme="light"] .ui-premium-v3 .hr-register-card,
html[data-theme="light"] .ui-premium-v3 .users-panel,
html[data-theme="light"] .ui-premium-v3 .pro-viz-card,
html[data-theme="light"] .ui-premium-v3 .report-panel {
  background: var(--premium-surface);
  border-color: var(--premium-border);
  box-shadow: var(--premium-shadow);
}
html[data-theme="light"] .ui-premium-v3 .input,
html[data-theme="light"] .ui-premium-v3 input,
html[data-theme="light"] .ui-premium-v3 select,
html[data-theme="light"] .ui-premium-v3 textarea {
  background: rgba(255,255,255,.96);
  color: #111827;
  border-color: rgba(15, 23, 42, .14);
}
html[data-theme="light"] .ui-premium-v3 .ui-catalog-row,
html[data-theme="light"] .ui-premium-v3 .workspace-premium-row,
html[data-theme="light"] .ui-premium-v3 .exec-mini-kpis div,
html[data-theme="light"] .ui-premium-v3 .exec-insight-card,
html[data-theme="light"] .ui-premium-v3 .fleet-kpi-strip div,
html[data-theme="light"] .ui-premium-v3 .fleet-status-row,
html[data-theme="light"] .ui-premium-v3 .pev-rank-row,
html[data-theme="light"] .ui-premium-v3 .pro-bar-row,
html[data-theme="light"] .ui-premium-v3 .report-list-row,
html[data-theme="light"] .ui-premium-v3 .executive-number-block,
html[data-theme="light"] .ui-premium-v3 .executive-highlight-item,
html[data-theme="light"] .ui-premium-v3 .multi-filter-shell,
html[data-theme="light"] .ui-premium-v3 .advanced-report-filters,
html[data-theme="light"] .ui-premium-v3 .advanced-filter-box,
html[data-theme="light"] .ui-premium-v3 .column-report-filters,
html[data-theme="light"] .ui-premium-v3 .infographic-config-panel {
  background: rgba(248, 250, 252, .84);
  border-color: rgba(15, 23, 42, .10);
}
html[data-theme="light"] .ui-premium-v3 .data-table thead th,
html[data-theme="light"] .ui-premium-v3 .hr-grid-header .hr-grid-cell,
html[data-theme="light"] .ui-premium-v3 .business-grid-header .business-grid-cell {
  background: linear-gradient(180deg, #eff6ff, #e0f2fe);
  color: #0f172a;
}
html[data-theme="light"] .ui-premium-v3 .badge-active,
html[data-theme="light"] .ui-premium-v3 .badge-ready-for-work,
html[data-theme="light"] .ui-premium-v3 .badge-success,
html[data-theme="light"] .ui-premium-v3 .live { color: #065f46; background: rgba(5,150,105,.11); border-color: rgba(5,150,105,.24); }
html[data-theme="light"] .ui-premium-v3 .badge-in-project,
html[data-theme="light"] .ui-premium-v3 .badge-user,
html[data-theme="light"] .ui-premium-v3 .badge-normal { color: #155e75; background: rgba(8,145,178,.10); border-color: rgba(8,145,178,.22); }
html[data-theme="light"] .ui-premium-v3 .badge-breakdown,
html[data-theme="light"] .ui-premium-v3 .badge-disposed,
html[data-theme="light"] .ui-premium-v3 .badge-rejected,
html[data-theme="light"] .ui-premium-v3 .badge-expired { color: #991b1b; background: rgba(220,38,38,.10); border-color: rgba(220,38,38,.22); }
html[data-theme="light"] .ui-premium-v3 .badge-planned,
html[data-theme="light"] .ui-premium-v3 .badge-warning,
html[data-theme="light"] .ui-premium-v3 .badge-draft,
html[data-theme="light"] .ui-premium-v3 .badge-pms,
html[data-theme="light"] .ui-premium-v3 .badge-under-sale { color: #92400e; background: rgba(217,119,6,.11); border-color: rgba(217,119,6,.24); }

html[dir="rtl"] .ui-premium-v3 .admin-command-card::before,
html[dir="rtl"] .ui-premium-v3 .ui-catalog-card::before,
html[dir="rtl"] .ui-premium-v3 .workspace-premium-card::before,
html[dir="rtl"] .ui-premium-v3 .exec-control-module::before,
html[dir="rtl"] .ui-premium-v3 .fleet-score-card::before,
html[dir="rtl"] .ui-premium-v3 .fleet-status-card::before,
html[dir="rtl"] .ui-premium-v3 .pev-rank-card::before,
html[dir="rtl"] .ui-premium-v3 .premium-command-hero::before,
html[dir="rtl"] .ui-premium-v3 .exec-cockpit-hero::before,
html[dir="rtl"] .ui-premium-v3 .workspace-command-hero::before,
html[dir="rtl"] .ui-premium-v3 .premium-report-head::before {
  background: linear-gradient(270deg, var(--card-accent, var(--page-accent, var(--premium-blue))), transparent 78%);
}

@media (max-width: 1180px) {
  .ui-premium-v3 .exec-control-grid,
  .ui-premium-v3 .fleet-cockpit-grid { grid-template-columns: 1fr; }
  .ui-premium-v3 .premium-rank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ui-premium-v3 .metric-row-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ui-premium-v3 .premium-command-hero,
  .ui-premium-v3 .exec-cockpit-hero,
  .ui-premium-v3 .workspace-command-hero,
  .ui-premium-v3 .premium-report-head,
  .ui-premium-v3 .workspace-premium-toolbar,
  .ui-premium-v3 .exec-control-head { flex-direction: column; display: flex; align-items: stretch; }
  .ui-premium-v3 .premium-hero-actions,
  .ui-premium-v3 .exec-cockpit-actions,
  .ui-premium-v3 .workspace-command-actions { justify-content: flex-start; }
  .ui-premium-v3 .premium-stat-strip,
  .ui-premium-v3 .exec-topline-grid,
  .ui-premium-v3 .metric-row.compact-metrics,
  .ui-premium-v3 .metric-row-5,
  .ui-premium-v3 .admin-command-grid,
  .ui-premium-v3 .premium-rank-grid { grid-template-columns: 1fr 1fr; }
  .ui-premium-v3 .exec-module-body { grid-template-columns: 1fr; }
  .ui-premium-v3 .pro-viz-card.wide-viz { grid-column: span 1; }
}
@media (max-width: 640px) {
  .ui-premium-v3 .page-shell,
  .ui-premium-v3 .workspace-premium-shell,
  .ui-premium-v3.executive-premium-body .page-shell { width: min(100% - 18px, 100%); }
  .ui-premium-v3 .premium-stat-strip,
  .ui-premium-v3 .exec-topline-grid,
  .ui-premium-v3 .metric-row.compact-metrics,
  .ui-premium-v3 .metric-row-5,
  .ui-premium-v3 .admin-command-grid,
  .ui-premium-v3 .premium-rank-grid,
  .ui-premium-v3 .workspace-premium-grid,
  .ui-premium-v3 .exec-insight-grid,
  .ui-premium-v3 .fleet-kpi-strip { grid-template-columns: 1fr; }
  .ui-premium-v3 .admin-command-card,
  .ui-premium-v3 .ui-catalog-summary,
  .ui-premium-v3 .workspace-premium-card header,
  .ui-premium-v3 .fleet-status-row,
  .ui-premium-v3 .pev-rank-row { grid-template-columns: 1fr; }
}

/* ========================================================================== 
   Premium UI v3 - compact command layout, clear boundaries, stronger contrast
   ========================================================================== */

html[data-theme="light"] body.ui-premium-v3 {
  --surface-0: #ffffff;
  --surface-1: #f8fafc;
  --surface-2: #eef4fb;
  --surface-3: #e2eaf5;
  --surface-glass: rgba(255,255,255,.92);
  --surface-input: #ffffff;
  --surface-table: #ffffff;
  --surface-table-2: #f6f9fc;
  --text: #1f2937;
  --text-strong: #0f172a;
  --text-soft: #475569;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: rgba(15,23,42,.13);
  --line-strong: rgba(15,23,42,.22);
  --line-soft: rgba(15,23,42,.08);
  --accent-blue: #315eea;
  --accent-cyan: #0891b2;
  --accent-teal: #0f9488;
  --accent-green: #138a50;
  --accent-amber: #b46a00;
  --accent-orange: #c45a11;
  --accent-purple: #6d4bd7;
  --accent-red: #c8243a;
  --blue-soft: rgba(49,94,234,.10);
  --green-soft: rgba(19,138,80,.10);
  --teal-soft: rgba(15,148,136,.10);
  --amber-soft: rgba(180,106,0,.12);
  --purple-soft: rgba(109,75,215,.11);
  --red-soft: rgba(200,36,58,.10);
  --shadow-sm: 0 8px 20px rgba(15,23,42,.08);
  --shadow: 0 18px 45px rgba(15,23,42,.12);
  --shadow-lg: 0 28px 70px rgba(15,23,42,.16);
  background:
    radial-gradient(circle at 8% 0%, rgba(13,148,136,.14), transparent 26%),
    radial-gradient(circle at 91% 9%, rgba(49,94,234,.13), transparent 28%),
    linear-gradient(135deg, #f8fafc 0%, #edf3f9 54%, #f7fbff 100%);
}

html[data-theme="dark"] body.ui-premium-v3,
body.ui-premium-v3 {
  --premium-ink: var(--text-strong);
  --premium-card: rgba(15, 30, 49, .78);
  --premium-card-solid: #0f2035;
  --premium-line: rgba(148, 163, 184, .22);
  --premium-faint: rgba(148, 163, 184, .08);
  --premium-chip: rgba(148, 163, 184, .12);
  --premium-track: rgba(148, 163, 184, .20);
  --hr-accent: #24a865;
  --fleet-accent: #2b7ee8;
  --system-accent: #6d8cff;
  --risk-accent: #f05668;
  --warning-accent: #ef9f27;
}

html[data-theme="light"] body.ui-premium-v3 {
  --premium-card: rgba(255,255,255,.86);
  --premium-card-solid: #ffffff;
  --premium-line: rgba(15,23,42,.13);
  --premium-faint: rgba(15,23,42,.04);
  --premium-chip: rgba(15,23,42,.055);
  --premium-track: rgba(15,23,42,.12);
  --hr-accent: #128952;
  --fleet-accent: #315eea;
  --system-accent: #465bd8;
  --risk-accent: #c8243a;
  --warning-accent: #b46a00;
}

body.ui-premium-v3 {
  font-size: 13.5px;
  letter-spacing: -0.01em;
}

body.ui-premium-v3::before { opacity: .48; }

body.ui-premium-v3 .page-shell {
  max-width: 1480px;
  padding: 22px clamp(16px, 3vw, 34px) 34px;
}

body.ui-premium-v3 .site-header,
body.ui-premium-v3 .clean-site-header {
  background: color-mix(in srgb, var(--surface-0) 88%, transparent);
  border-bottom: 1px solid var(--premium-line);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

html[data-theme="light"] body.ui-premium-v3 .site-header,
html[data-theme="light"] body.ui-premium-v3 .clean-site-header {
  background: rgba(255,255,255,.92);
}

body.ui-premium-v3 .header-inner,
body.ui-premium-v3 .clean-header-inner {
  min-height: 66px;
  padding-block: 8px;
}

body.ui-premium-v3 .brand-logo { height: 48px; }
body.ui-premium-v3 .brand-block { height: 39px; min-width: 48px; font-size: 24px; border-radius: 10px; }
body.ui-premium-v3 .brand-rest { font-size: 23px; }
body.ui-premium-v3 .header-nav { gap: 9px; }
body.ui-premium-v3 .nav-link,
body.ui-premium-v3 .theme-toggle,
body.ui-premium-v3 .lang-link {
  min-height: 38px;
  border-radius: 999px;
  font-weight: 850;
}
body.ui-premium-v3 .current-user {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ui-premium-v3 .panel,
body.ui-premium-v3 .metric-card,
body.ui-premium-v3 .admin-layer-card,
body.ui-premium-v3 .master-hub-card,
body.ui-premium-v3 .config-area-card,
body.ui-premium-v3 .ui-group-card,
body.ui-premium-v3 .interface-group-card,
body.ui-premium-v3 .workspace-module-card,
body.ui-premium-v3 .workspace-premium-card,
body.ui-premium-v3 .admin-command-card,
body.ui-premium-v3 .ui-catalog-card,
body.ui-premium-v3 .exec-control-module,
body.ui-premium-v3 .exec-topline-card,
body.ui-premium-v3 .premium-command-hero,
body.ui-premium-v3 .workspace-command-hero,
body.ui-premium-v3 .exec-cockpit-hero,
body.ui-premium-v3 .fleet-score-card,
body.ui-premium-v3 .fleet-status-card,
body.ui-premium-v3 .pev-rank-card {
  background: var(--premium-card);
  border: 1px solid var(--premium-line);
  box-shadow: var(--shadow-sm);
}

body.ui-premium-v3 .panel::before,
body.ui-premium-v3 .metric-card::before,
body.ui-premium-v3 .master-hub-card::before,
body.ui-premium-v3 .config-area-card::before,
body.ui-premium-v3 .admin-layer-card::before,
body.ui-premium-v3 .ui-group-card::before,
body.ui-premium-v3 .workspace-module-card::before,
body.ui-premium-v3 .pro-viz-card::before { opacity: .75; }

body.ui-premium-v3 .page-head,
body.ui-premium-v3 .section-header-clean,
body.ui-premium-v3 .compact-page-head,
body.ui-premium-v3 .premium-command-hero,
body.ui-premium-v3 .workspace-command-hero,
body.ui-premium-v3 .exec-cockpit-hero {
  border-radius: 22px;
}

body.ui-premium-v3 .page-head p:not(.eyebrow),
body.ui-premium-v3 .section-header-clean p:not(.eyebrow),
body.ui-premium-v3 .panel-head p:not(.eyebrow),
body.ui-premium-v3 .hr-command-head p:not(.eyebrow),
body.ui-premium-v3 .filter-section-title p:not(.eyebrow),
body.ui-premium-v3 .master-hub-title p,
body.ui-premium-v3 .config-area-head p,
body.ui-premium-v3 .master-link-row small,
body.ui-premium-v3 .config-link-stack small,
body.ui-premium-v3 .ui-page-row small,
body.ui-premium-v3 .workspace-page-text small,
body.ui-premium-v3 .classification-panel,
body.ui-premium-v3 .admin-map-note,
body.ui-premium-v3 .breadcrumb-map {
  display: none !important;
}

body.ui-premium-v3 .eyebrow {
  color: var(--accent-blue);
  font-size: 11px;
  letter-spacing: .11em;
  font-weight: 950;
}

body.ui-premium-v3 h1,
body.ui-premium-v3 h2,
body.ui-premium-v3 h3 { letter-spacing: -.04em; }
body.ui-premium-v3 h1 { font-size: clamp(26px, 3vw, 42px); line-height: 1.03; }
body.ui-premium-v3 h2 { font-size: clamp(18px, 1.7vw, 26px); }
body.ui-premium-v3 h3 { font-size: 16px; }

body.ui-premium-v3 .btn,
body.ui-premium-v3 button.btn {
  border-radius: 12px;
  min-height: 38px;
  font-weight: 900;
  letter-spacing: -.015em;
}
body.ui-premium-v3 .btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), #1745c9);
  color: #fff;
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 12px 24px rgba(49,94,234,.24);
}
body.ui-premium-v3 .btn-secondary {
  background: var(--premium-chip);
  color: var(--text-strong);
  border-color: var(--premium-line);
}
body.ui-premium-v3 .btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--premium-line);
}
body.ui-premium-v3 .btn:hover { transform: translateY(-1px); }
body.ui-premium-v3 .btn-xs { min-height: 26px; padding: 4px 9px; border-radius: 9px; font-size: 11px; }
body.ui-premium-v3 .btn-sm { min-height: 32px; padding: 7px 12px; }

/* Strong, readable status colors */
body.ui-premium-v3 .badge {
  border: 1px solid var(--premium-line);
  border-radius: 999px;
  font-weight: 900;
  padding: 4px 9px;
  color: var(--text-strong);
  background: var(--premium-chip);
}
body.ui-premium-v3 .badge-active,
body.ui-premium-v3 .badge-ready,
body.ui-premium-v3 .badge-approved,
body.ui-premium-v3 .badge-sent,
body.ui-premium-v3 .badge-registered,
body.ui-premium-v3 .badge-completed {
  color: #063b22;
  background: #bdf6d5;
  border-color: #68d89c;
}
body.ui-premium-v3 .badge-inactive,
body.ui-premium-v3 .badge-breakdown,
body.ui-premium-v3 .badge-rejected,
body.ui-premium-v3 .badge-overdue,
body.ui-premium-v3 .badge-failed {
  color: #fff;
  background: #c8243a;
  border-color: #f87171;
}
body.ui-premium-v3 .badge-in-project,
body.ui-premium-v3 .badge-submitted,
body.ui-premium-v3 .badge-in-progress {
  color: #082f49;
  background: #bae6fd;
  border-color: #38bdf8;
}
body.ui-premium-v3 .badge-planned,
body.ui-premium-v3 .badge-pending,
body.ui-premium-v3 .badge-warning,
body.ui-premium-v3 .badge-expiring,
body.ui-premium-v3 .badge-due {
  color: #4a2500;
  background: #fde6b7;
  border-color: #f59e0b;
}
body.ui-premium-v3 .badge-disposed,
body.ui-premium-v3 .badge-draft,
body.ui-premium-v3 .badge-skipped {
  color: var(--text-soft);
  background: var(--premium-chip);
}
html[data-theme="dark"] body.ui-premium-v3 .badge-active,
html[data-theme="dark"] body.ui-premium-v3 .badge-ready,
html[data-theme="dark"] body.ui-premium-v3 .badge-approved,
html[data-theme="dark"] body.ui-premium-v3 .badge-sent,
html[data-theme="dark"] body.ui-premium-v3 .badge-registered,
html[data-theme="dark"] body.ui-premium-v3 .badge-completed { color: #d9ffe8; background: rgba(34,197,94,.20); border-color: rgba(74,222,128,.45); }
html[data-theme="dark"] body.ui-premium-v3 .badge-in-project,
html[data-theme="dark"] body.ui-premium-v3 .badge-submitted,
html[data-theme="dark"] body.ui-premium-v3 .badge-in-progress { color: #dff6ff; background: rgba(14,165,233,.20); border-color: rgba(56,189,248,.46); }
html[data-theme="dark"] body.ui-premium-v3 .badge-planned,
html[data-theme="dark"] body.ui-premium-v3 .badge-pending,
html[data-theme="dark"] body.ui-premium-v3 .badge-warning,
html[data-theme="dark"] body.ui-premium-v3 .badge-expiring,
html[data-theme="dark"] body.ui-premium-v3 .badge-due { color: #fff2cc; background: rgba(245,158,11,.22); border-color: rgba(251,191,36,.48); }

/* Admin command pages */
body.ui-premium-v3 .premium-command-hero,
body.ui-premium-v3 .workspace-command-hero,
body.ui-premium-v3 .exec-cockpit-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
body.ui-premium-v3 .premium-command-hero::after,
body.ui-premium-v3 .workspace-command-hero::after,
body.ui-premium-v3 .exec-cockpit-hero::after {
  content:"";
  position:absolute;
  inset: 0;
  pointer-events:none;
  background: linear-gradient(110deg, rgba(49,94,234,.18), transparent 38%, rgba(13,148,136,.12));
  opacity: .75;
}
body.ui-premium-v3 .premium-command-hero > *,
body.ui-premium-v3 .workspace-command-hero > *,
body.ui-premium-v3 .exec-cockpit-hero > * { position: relative; z-index: 1; }
body.ui-premium-v3 .premium-title-block h1 { margin: 0; }
body.ui-premium-v3 .premium-title-block .eyebrow { margin: 0 0 4px; }
body.ui-premium-v3 .premium-hero-actions,
body.ui-premium-v3 .workspace-command-actions,
body.ui-premium-v3 .exec-cockpit-actions { display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }

body.ui-premium-v3 .premium-stat-strip,
body.ui-premium-v3 .admin-overview-bar,
body.ui-premium-v3 .admin-snapshot-strip {
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 18px;
}
body.ui-premium-v3 .premium-stat-strip article,
body.ui-premium-v3 .admin-overview-bar article,
body.ui-premium-v3 .admin-snapshot-strip article {
  border: 1px solid var(--premium-line);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--premium-card);
  min-height: 98px;
  position: relative;
  overflow: hidden;
}
body.ui-premium-v3 .premium-stat-strip article::before,
body.ui-premium-v3 .admin-overview-bar article::before,
body.ui-premium-v3 .admin-snapshot-strip article::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background: var(--card-accent, var(--accent-blue));
}
html[dir="rtl"] body.ui-premium-v3 .premium-stat-strip article::before,
html[dir="rtl"] body.ui-premium-v3 .admin-overview-bar article::before,
html[dir="rtl"] body.ui-premium-v3 .admin-snapshot-strip article::before { left:auto; right:0; }
body.ui-premium-v3 .premium-stat-strip span,
body.ui-premium-v3 .admin-overview-bar span,
body.ui-premium-v3 .admin-snapshot-strip span {
  color: var(--text-soft);
  font-weight: 850;
}
body.ui-premium-v3 .premium-stat-strip strong,
body.ui-premium-v3 .admin-overview-bar strong,
body.ui-premium-v3 .admin-snapshot-strip strong {
  display:block;
  margin-top: 4px;
  font-size: 28px;
  line-height:1;
  color: var(--text-strong);
}
body.ui-premium-v3 .premium-stat-strip small,
body.ui-premium-v3 .admin-overview-bar small,
body.ui-premium-v3 .admin-snapshot-strip small { color: var(--muted); font-weight: 750; }
body.ui-premium-v3 .metric-green { --card-accent: var(--hr-accent); }
body.ui-premium-v3 .metric-blue { --card-accent: var(--fleet-accent); }
body.ui-premium-v3 .metric-teal { --card-accent: var(--accent-teal); }
body.ui-premium-v3 .metric-amber { --card-accent: var(--warning-accent); }
body.ui-premium-v3 .metric-red { --card-accent: var(--risk-accent); }

body.ui-premium-v3 .admin-command-grid,
body.ui-premium-v3 .ui-catalog-grid,
body.ui-premium-v3 .configuration-grid {
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 18px;
}
body.ui-premium-v3 .configuration-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
body.ui-premium-v3 .admin-command-card,
body.ui-premium-v3 .ui-catalog-card,
body.ui-premium-v3 .config-area-card {
  border-radius: 20px;
  padding: 17px;
  min-height: 140px;
  color: var(--text-strong);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
body.ui-premium-v3 .admin-command-card:hover,
body.ui-premium-v3 .ui-catalog-card:hover,
body.ui-premium-v3 .config-area-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--card-accent, var(--accent-blue)) 50%, var(--premium-line));
  box-shadow: var(--shadow);
}
body.ui-premium-v3 .admin-command-card::before,
body.ui-premium-v3 .ui-catalog-card::before,
body.ui-premium-v3 .config-area-card::before,
body.ui-premium-v3 .workspace-premium-card::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width: 5px;
  background: var(--card-accent, var(--accent-blue));
}
html[dir="rtl"] body.ui-premium-v3 .admin-command-card::before,
html[dir="rtl"] body.ui-premium-v3 .ui-catalog-card::before,
html[dir="rtl"] body.ui-premium-v3 .config-area-card::before,
html[dir="rtl"] body.ui-premium-v3 .workspace-premium-card::before { left:auto; right:0; }
body.ui-premium-v3 .admin-command-card::after,
body.ui-premium-v3 .ui-catalog-card::after,
body.ui-premium-v3 .config-area-card::after,
body.ui-premium-v3 .workspace-premium-card::after {
  content:"";
  position:absolute;
  inset:-30% -20% auto auto;
  width: 180px;
  height: 180px;
  border-radius:50%;
  background: color-mix(in srgb, var(--card-accent, var(--accent-blue)) 16%, transparent);
}
body.ui-premium-v3 .primary-layer { --card-accent: var(--hr-accent); }
body.ui-premium-v3 .system-card { --card-accent: var(--system-accent); }
body.ui-premium-v3 .foundation-card { --card-accent: var(--accent-teal); }
body.ui-premium-v3 .workflow-card { --card-accent: var(--warning-accent); }
body.ui-premium-v3 .command-code {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight: 950;
  color: color-mix(in srgb, var(--card-accent, var(--accent-blue)) 65%, var(--text-strong));
  background: color-mix(in srgb, var(--card-accent, var(--accent-blue)) 14%, var(--surface-0));
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--accent-blue)) 34%, var(--premium-line));
}
body.ui-premium-v3 .command-body { display:block; min-width:0; }
body.ui-premium-v3 .command-body strong { display:block; font-size: 19px; margin-bottom: 3px; }
body.ui-premium-v3 .command-body small { color: var(--muted); font-weight: 800; }
body.ui-premium-v3 .command-body em {
  margin-top: 14px;
  display:flex;
  gap: 6px;
  flex-wrap:wrap;
  font-style: normal;
}
body.ui-premium-v3 .command-body em b,
body.ui-premium-v3 .workspace-chip-line span,
body.ui-premium-v3 .exec-cockpit-pills span {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  background: var(--premium-chip);
  border: 1px solid var(--premium-line);
  color: var(--text-soft);
}
body.ui-premium-v3 .admin-command-card > i,
body.ui-premium-v3 .ui-catalog-row > i,
body.ui-premium-v3 .workspace-premium-row > i,
body.ui-premium-v3 .config-link-stack a > i {
  color: var(--accent-blue);
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

body.ui-premium-v3 .config-area-head,
body.ui-premium-v3 .ui-catalog-summary {
  display:flex;
  align-items:center;
  gap: 12px;
  position:relative;
  z-index:1;
}
body.ui-premium-v3 .config-area-head > span {
  width:42px; height:42px; border-radius:14px; display:inline-flex; align-items:center; justify-content:center; font-weight:950; background: var(--blue-soft); color: var(--accent-blue); border: 1px solid var(--premium-line);
}
body.ui-premium-v3 .config-link-stack,
body.ui-premium-v3 .compact-link-stack { margin-top: 16px; display:grid; gap: 9px; position:relative; z-index:1; }
body.ui-premium-v3 .config-link-stack a,
body.ui-premium-v3 .master-link-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid var(--premium-line);
  background: color-mix(in srgb, var(--surface-0) 76%, transparent);
  color: var(--text-strong);
  text-decoration:none;
}
body.ui-premium-v3 .config-link-stack a:hover,
body.ui-premium-v3 .master-link-row:hover { border-color: var(--accent-blue); }

body.ui-premium-v3 .ui-catalog-card {
  padding: 0;
  min-height: unset;
}
body.ui-premium-v3 .ui-catalog-card.tone-green,
body.ui-premium-v3 .workspace-premium-card.tone-green { --card-accent: var(--hr-accent); }
body.ui-premium-v3 .ui-catalog-card.tone-blue,
body.ui-premium-v3 .workspace-premium-card.tone-blue { --card-accent: var(--fleet-accent); }
body.ui-premium-v3 .ui-catalog-card.tone-purple,
body.ui-premium-v3 .workspace-premium-card.tone-purple { --card-accent: var(--accent-purple); }
body.ui-premium-v3 .ui-catalog-card.tone-amber,
body.ui-premium-v3 .workspace-premium-card.tone-amber { --card-accent: var(--warning-accent); }
body.ui-premium-v3 .ui-catalog-card.tone-red,
body.ui-premium-v3 .workspace-premium-card.tone-red { --card-accent: var(--risk-accent); }
body.ui-premium-v3 .ui-catalog-summary {
  cursor:pointer;
  padding: 16px 18px;
  list-style:none;
}
body.ui-premium-v3 .ui-catalog-summary::-webkit-details-marker { display:none; }
body.ui-premium-v3 .ui-catalog-pages { display:grid; gap: 8px; padding: 0 16px 16px; }
body.ui-premium-v3 .ui-catalog-row {
  display:grid;
  grid-template-columns: 1fr auto auto;
  align-items:center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--premium-line);
  background: var(--premium-faint);
  color: var(--text-strong);
}
body.ui-premium-v3 .ui-catalog-row.disabled { opacity:.62; }

/* Workspace */
body.ui-premium-v3 .workspace-premium-shell { max-width: 1320px; }
body.ui-premium-v3 .workspace-command-hero { padding: 22px 24px; }
body.ui-premium-v3 .workspace-identity-compact { display:flex; align-items:center; gap: 16px; }
body.ui-premium-v3 .workspace-avatar {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size: 23px;
  font-weight: 950;
  color:#fff;
  background: linear-gradient(135deg, #0f9488, #315eea);
  box-shadow: 0 18px 36px rgba(49,94,234,.20);
}
body.ui-premium-v3 .workspace-chip-line { display:flex; gap: 7px; flex-wrap:wrap; margin-top:8px; }
body.ui-premium-v3 .workspace-premium-panel {
  border-radius: 24px;
  border: 1px solid var(--premium-line);
  background: color-mix(in srgb, var(--surface-0) 88%, transparent);
  box-shadow: var(--shadow);
  padding: 18px;
}
body.ui-premium-v3 .workspace-premium-toolbar {
  display:flex;
  justify-content:space-between;
  gap: 16px;
  align-items:end;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--premium-line);
  margin-bottom: 14px;
}
body.ui-premium-v3 .workspace-premium-toolbar h2 { margin:0; }
body.ui-premium-v3 .workspace-search-box { min-width: min(360px, 100%); }
body.ui-premium-v3 .workspace-search-box label { display:block; margin-bottom:5px; font-weight:850; color:var(--text-soft); }
body.ui-premium-v3 .workspace-premium-grid {
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
body.ui-premium-v3 .workspace-premium-card {
  border-radius: 20px;
  padding: 16px;
  position:relative;
  overflow:hidden;
  min-height: 190px;
}
body.ui-premium-v3 .workspace-premium-card header {
  display:grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items:center;
  position:relative;
  z-index:1;
}
body.ui-premium-v3 .workspace-premium-card h3,
body.ui-premium-v3 .workspace-premium-card p { margin:0; }
body.ui-premium-v3 .workspace-premium-card p { color: var(--muted); font-weight: 800; font-size: 12px; }
body.ui-premium-v3 .workspace-premium-pages { display:grid; gap: 8px; margin-top: 16px; position:relative; z-index:1; }
body.ui-premium-v3 .workspace-premium-row {
  display:grid;
  grid-template-columns: 1fr auto auto;
  gap: 9px;
  align-items:center;
  padding: 12px 12px;
  border: 1px solid var(--premium-line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface-0) 70%, transparent);
  color: var(--text-strong);
  text-decoration:none;
}
body.ui-premium-v3 .workspace-premium-row:hover { border-color: var(--card-accent, var(--accent-blue)); transform: translateY(-1px); }
body.ui-premium-v3 .workspace-access-pill {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--accent-blue);
  border: 1px solid color-mix(in srgb, var(--accent-blue) 32%, var(--premium-line));
}
body.ui-premium-v3 .workspace-access-pill.edit { background: var(--green-soft); color: var(--hr-accent); border-color: color-mix(in srgb, var(--hr-accent) 32%, var(--premium-line)); }

/* Executive Control Room */
body.ui-premium-v3 .exec-cockpit-hero {
  border-left: 6px solid var(--system-accent);
}
html[dir="rtl"] body.ui-premium-v3 .exec-cockpit-hero { border-left:0; border-right:6px solid var(--system-accent); }
body.ui-premium-v3 .exec-cockpit-pills { display:flex; gap:9px; flex-wrap:wrap; justify-content:flex-end; }
body.ui-premium-v3 .exec-cockpit-pills b { color: var(--text-strong); margin-inline-end:4px; }
body.ui-premium-v3 .exec-topline-grid {
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 14px;
}
body.ui-premium-v3 .exec-topline-card {
  border-radius: 18px;
  padding: 14px 15px;
  position:relative;
  overflow:hidden;
  min-height: 102px;
}
body.ui-premium-v3 .exec-topline-card::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; background: var(--card-accent, var(--accent-blue)); }
html[dir="rtl"] body.ui-premium-v3 .exec-topline-card::before { left:auto; right:0; }
body.ui-premium-v3 .exec-topline-card span { color: var(--text-soft); font-weight: 900; }
body.ui-premium-v3 .exec-topline-card strong { display:block; margin-top:6px; font-size: 28px; line-height:1; color: var(--text-strong); }
body.ui-premium-v3 .exec-topline-card small { color: var(--muted); font-weight: 800; }

body.ui-premium-v3 .exec-control-grid {
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
body.ui-premium-v3 .exec-control-module {
  border-radius: 26px;
  padding: 18px;
  position:relative;
  overflow:hidden;
  min-height: 500px;
}
body.ui-premium-v3 .exec-control-module::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width: 7px;
  background: var(--module-accent);
}
html[dir="rtl"] body.ui-premium-v3 .exec-control-module::before { left:auto; right:0; }
body.ui-premium-v3 .exec-control-module::after {
  content:"";
  position:absolute;
  width: 280px;
  height: 280px;
  border-radius:50%;
  right:-120px;
  top:-120px;
  background: color-mix(in srgb, var(--module-accent) 16%, transparent);
}
body.ui-premium-v3 .exec-control-hr { --module-accent: var(--hr-accent); --card-accent: var(--hr-accent); }
body.ui-premium-v3 .exec-control-pev { --module-accent: var(--fleet-accent); --card-accent: var(--fleet-accent); }
body.ui-premium-v3 .exec-control-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  position:relative;
  z-index:1;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--premium-line);
}
body.ui-premium-v3 .exec-control-title { display:flex; align-items:center; gap: 12px; min-width:0; }
body.ui-premium-v3 .exec-control-title h2,
body.ui-premium-v3 .exec-control-title p { margin:0; }
body.ui-premium-v3 .exec-control-head .btn { min-width: 178px; justify-content:center; }
body.ui-premium-v3 .exec-module-body {
  display:grid;
  grid-template-columns: 210px 1fr;
  gap: 14px;
  margin-top: 16px;
  position:relative;
  z-index:1;
}
body.ui-premium-v3 .exec-radial-panel {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content:start;
}
body.ui-premium-v3 .premium-ring,
body.ui-premium-v3 .executive-donut,
body.ui-premium-v3 .donut-meter {
  --ring-accent: var(--accent-blue);
  width: 96px;
  height: 96px;
  border-radius:50%;
  display:grid;
  place-items:center;
  text-align:center;
  margin:auto;
  background:
    radial-gradient(circle at center, var(--surface-0) 0 56%, transparent 58%),
    conic-gradient(var(--ring-accent) var(--score, var(--active, 0%)), var(--premium-track) 0);
  border:1px solid var(--premium-line);
}
body.ui-premium-v3 .premium-ring strong,
body.ui-premium-v3 .executive-donut span,
body.ui-premium-v3 .donut-meter span { display:block; color:var(--text-strong); font-size:18px; line-height:1; font-weight:950; }
body.ui-premium-v3 .premium-ring span,
body.ui-premium-v3 .executive-donut small,
body.ui-premium-v3 .donut-meter small { display:block; margin-top:3px; font-size:10px; color:var(--muted); font-weight:900; }
body.ui-premium-v3 .ring-green { --ring-accent: var(--hr-accent); }
body.ui-premium-v3 .ring-amber { --ring-accent: var(--warning-accent); }
body.ui-premium-v3 .ring-teal { --ring-accent: var(--accent-teal); }
body.ui-premium-v3 .ring-red { --ring-accent: var(--risk-accent); }

body.ui-premium-v3 .exec-mini-kpis {
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
body.ui-premium-v3 .exec-mini-kpis > div,
body.ui-premium-v3 .fleet-kpi-strip > div,
body.ui-premium-v3 .executive-number-block,
body.ui-premium-v3 .executive-highlight-item,
body.ui-premium-v3 .risk-stack > div {
  border: 1px solid var(--premium-line);
  border-radius: 15px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-0) 72%, transparent);
}
body.ui-premium-v3 .exec-mini-kpis span,
body.ui-premium-v3 .fleet-kpi-strip span,
body.ui-premium-v3 .executive-number-block span,
body.ui-premium-v3 .executive-highlight-item span,
body.ui-premium-v3 .risk-stack span { color:var(--muted); font-weight:900; display:block; }
body.ui-premium-v3 .exec-mini-kpis strong,
body.ui-premium-v3 .fleet-kpi-strip strong,
body.ui-premium-v3 .executive-number-block strong,
body.ui-premium-v3 .executive-highlight-item strong,
body.ui-premium-v3 .risk-stack strong { font-size:22px; color:var(--text-strong); line-height:1.05; display:block; margin-top:5px; }
body.ui-premium-v3 .exec-mini-kpis .risk,
body.ui-premium-v3 .exec-insight-card.risk,
body.ui-premium-v3 .fleet-kpi-strip .risk { border-color: color-mix(in srgb, var(--risk-accent) 36%, var(--premium-line)); background: color-mix(in srgb, var(--risk-accent) 10%, transparent); }

body.ui-premium-v3 .exec-insight-grid {
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin-top: 14px;
  position:relative;
  z-index:1;
}
body.ui-premium-v3 .exec-insight-card {
  border: 1px solid var(--premium-line);
  border-radius: 16px;
  padding: 12px;
  background: var(--premium-faint);
  min-width:0;
}
body.ui-premium-v3 .exec-insight-card span { color:var(--muted); font-weight:900; display:block; }
body.ui-premium-v3 .exec-insight-card strong { display:block; color:var(--text-strong); margin: 5px 0 8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.ui-premium-v3 .exec-insight-card small { color:var(--muted); font-weight:850; }
body.ui-premium-v3 .premium-progress,
body.ui-premium-v3 .premium-split,
body.ui-premium-v3 .pro-bar-track,
body.ui-premium-v3 .pev-rank-meter,
body.ui-premium-v3 .executive-status-row em,
body.ui-premium-v3 .fleet-status-row .premium-progress,
body.ui-premium-v3 .mini-progress {
  display:block;
  height: 8px;
  border-radius: 999px;
  background: var(--premium-track);
  overflow:hidden;
}
body.ui-premium-v3 .premium-progress i,
body.ui-premium-v3 .pro-bar-track i,
body.ui-premium-v3 .pev-rank-meter i,
body.ui-premium-v3 .executive-status-row em i,
body.ui-premium-v3 .fleet-status-row .premium-progress i,
body.ui-premium-v3 .mini-progress i {
  display:block;
  height:100%;
  border-radius:inherit;
  background: linear-gradient(90deg, var(--module-accent, var(--accent-blue)), color-mix(in srgb, var(--module-accent, var(--accent-blue)) 55%, #fff));
}
body.ui-premium-v3 .premium-split { display:flex; }
body.ui-premium-v3 .premium-split i { background: var(--hr-accent); height:100%; display:block; }
body.ui-premium-v3 .premium-split b { background: var(--warning-accent); height:100%; display:block; }

/* HR + Fleet report dashboards */
body.ui-premium-v3 .hr-executive-dashboard,
body.ui-premium-v3 .pev-executive-dashboard,
body.ui-premium-v3 .fleet-cockpit-grid {
  display:grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr);
  gap: 14px;
  margin-bottom: 16px;
}
body.ui-premium-v3 .hr-executive-dashboard {
  grid-template-columns: minmax(0,1.5fr) minmax(280px,.75fr) minmax(280px,.9fr) minmax(260px,.75fr);
}
body.ui-premium-v3 .executive-main-card { grid-column: span 1; }
body.ui-premium-v3 .executive-card-head {
  display:flex;
  align-items:start;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 14px;
}
body.ui-premium-v3 .executive-card-head h2,
body.ui-premium-v3 .executive-card-head p { margin:0; }
body.ui-premium-v3 .executive-filter-pill,
body.ui-premium-v3 .status-percent,
body.ui-premium-v3 .result-count,
body.ui-premium-v3 .hr-page-indicator {
  border:1px solid var(--premium-line);
  border-radius:999px;
  padding:5px 10px;
  background:var(--premium-chip);
  color: var(--text-strong);
  font-weight:900;
}
body.ui-premium-v3 .executive-number-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:10px; }
body.ui-premium-v3 .executive-highlight-strip { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; margin-top:10px; }
body.ui-premium-v3 .executive-status-body { display:grid; gap:12px; }
body.ui-premium-v3 .executive-status-list,
body.ui-premium-v3 .driver-stack,
body.ui-premium-v3 .risk-stack,
body.ui-premium-v3 .fleet-status-list { display:grid; gap:8px; }
body.ui-premium-v3 .executive-status-row,
body.ui-premium-v3 .driver-row,
body.ui-premium-v3 .fleet-status-row {
  display:grid;
  grid-template-columns: 1fr auto;
  gap:8px;
  align-items:center;
  padding:10px 11px;
  border-radius:14px;
  border:1px solid var(--premium-line);
  background:var(--premium-faint);
  color:var(--text-strong);
}
body.ui-premium-v3 .executive-status-row em,
body.ui-premium-v3 .fleet-status-row .premium-progress { grid-column: 1 / -1; }
body.ui-premium-v3 .driver-row small { grid-column: 1 / -1; color:var(--muted); font-weight:800; }

body.ui-premium-v3 .fleet-score-main { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:14px; }
body.ui-premium-v3 .fleet-score-main h2,
body.ui-premium-v3 .fleet-score-main p { margin:0; }
body.ui-premium-v3 .fleet-kpi-strip { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:10px; }
body.ui-premium-v3 .premium-rank-grid,
body.ui-premium-v3 .pev-report-grid {
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
body.ui-premium-v3 .pev-rank-card { border-radius: 18px; padding: 14px; }
body.ui-premium-v3 .pev-rank-card .panel-head { margin-bottom:10px; }
body.ui-premium-v3 .pev-rank-list { display:grid; gap:8px; }
body.ui-premium-v3 .pev-rank-row {
  display:grid;
  grid-template-columns: minmax(0,1fr) 88px auto;
  align-items:center;
  gap:10px;
  padding:10px 11px;
  border:1px solid var(--premium-line);
  border-radius:14px;
  background: var(--premium-faint);
  color: var(--text-strong);
}
body.ui-premium-v3 .pev-rank-label { min-width:0; }
body.ui-premium-v3 .pev-rank-label strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.ui-premium-v3 .pev-rank-label small { color:var(--muted); font-weight:850; }
body.ui-premium-v3 .pev-rank-row b { color:var(--text-strong); }

/* HR report visualization polish */
body.ui-premium-v3 .pro-viz-grid {
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
body.ui-premium-v3 .pro-viz-card {
  border-radius: 18px;
  padding: 14px;
  overflow:hidden;
}
body.ui-premium-v3 .pro-viz-card.wide-viz { grid-column: span 2; }
body.ui-premium-v3 .viz-card-head { display:flex; justify-content:space-between; align-items:start; gap:12px; margin-bottom:10px; }
body.ui-premium-v3 .viz-card-head h2,
body.ui-premium-v3 .viz-card-head p { margin:0; }
body.ui-premium-v3 .viz-control-stack { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
body.ui-premium-v3 .viz-sort-box { min-width: 150px; }
body.ui-premium-v3 .viz-inner-filter {
  border:1px solid var(--premium-line);
  border-radius:14px;
  padding:8px;
  background:var(--premium-faint);
  display:grid;
  gap:6px;
}
body.ui-premium-v3 .viz-inner-filter small,
body.ui-premium-v3 .multi-filter-shell small { display:none !important; }
body.ui-premium-v3 .viz-row-picker-actions,
body.ui-premium-v3 .multi-filter-actions { display:flex; flex-wrap:wrap; gap:5px; align-items:center; }
body.ui-premium-v3 .multi-selected-count { font-size:11px; font-weight:900; color:var(--text-soft); }
body.ui-premium-v3 .viz-total-line {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin: 6px 0 10px;
}
body.ui-premium-v3 .viz-total-line span {
  border:1px solid var(--premium-line);
  border-radius:999px;
  padding:4px 8px;
  background:var(--premium-chip);
  font-size:11px;
  font-weight:850;
  color:var(--text-soft);
}
body.ui-premium-v3 .pro-bar-list { display:grid; gap:8px; }
body.ui-premium-v3 .pro-bar-row {
  display:grid;
  gap:7px;
  padding:10px 11px;
  border-radius:14px;
  border:1px solid var(--premium-line);
  background:var(--premium-faint);
}
body.ui-premium-v3 .pro-bar-label { display:flex; justify-content:space-between; gap:10px; align-items:center; }
body.ui-premium-v3 .pro-bar-label strong { color:var(--text-strong); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.ui-premium-v3 .pro-bar-label span { color:var(--muted); font-weight:850; white-space:nowrap; }
body.ui-premium-v3 .trend-timeline { display:grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap:8px; }
body.ui-premium-v3 .trend-tile { border:1px solid var(--premium-line); background:var(--premium-faint); border-radius:14px; padding:10px; }

/* Forms and tables */
body.ui-premium-v3 .input,
body.ui-premium-v3 select,
body.ui-premium-v3 textarea {
  border-radius: 12px;
  border-color: var(--premium-line);
  background: color-mix(in srgb, var(--surface-input) 92%, transparent);
  color: var(--text-strong);
  min-height: 38px;
}
body.ui-premium-v3 .input:focus,
body.ui-premium-v3 select:focus,
body.ui-premium-v3 textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-blue) 20%, transparent);
}
body.ui-premium-v3 .filter-panel,
body.ui-premium-v3 .hr-report-control-panel,
body.ui-premium-v3 .hr-command-panel,
body.ui-premium-v3 .equipment-command-panel {
  padding: 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
body.ui-premium-v3 .filter-section-title,
body.ui-premium-v3 .hr-command-head,
body.ui-premium-v3 .hr-register-toolbar,
body.ui-premium-v3 .panel-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
body.ui-premium-v3 .filter-grid,
body.ui-premium-v3 .form-grid,
body.ui-premium-v3 .matrix-control-grid {
  gap: 10px;
}
body.ui-premium-v3 .field label { font-weight:900; color:var(--text-soft); margin-bottom:5px; }
body.ui-premium-v3 details.advanced-report-filters,
body.ui-premium-v3 details.column-report-filters,
body.ui-premium-v3 details.infographic-config-panel,
body.ui-premium-v3 details.advanced-filter-box,
body.ui-premium-v3 details.column-report-filters {
  border:1px solid var(--premium-line);
  border-radius:16px;
  padding: 10px;
  background:var(--premium-faint);
  margin: 10px 0;
}
body.ui-premium-v3 details > summary {
  cursor:pointer;
  font-weight:950;
  color:var(--text-strong);
}

body.ui-premium-v3 .table-panel,
body.ui-premium-v3 .clean-list-panel,
body.ui-premium-v3 .premium-table-panel,
body.ui-premium-v3 .hr-register-card,
body.ui-premium-v3 .equipment-register-card {
  border-radius: 20px;
  padding: 14px;
}
body.ui-premium-v3 .table-wrap,
body.ui-premium-v3 .wide-table-wrap {
  border:1px solid var(--premium-line);
  border-radius:16px;
  overflow:auto;
  background: var(--surface-table);
}
body.ui-premium-v3 .data-table {
  border-collapse: separate;
  border-spacing:0;
  width:100%;
}
body.ui-premium-v3 .data-table th,
body.ui-premium-v3 .data-table td {
  padding: 10px 11px;
  border-bottom:1px solid var(--line-soft);
  vertical-align:middle;
}
body.ui-premium-v3 .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: color-mix(in srgb, var(--surface-table-2) 96%, transparent);
  color: var(--text-strong);
  font-size: 11px;
  letter-spacing:.04em;
  text-transform: uppercase;
}
body.ui-premium-v3 .data-table tbody tr:hover { background: color-mix(in srgb, var(--accent-blue) 7%, transparent); }
body.ui-premium-v3 .compact-table th,
body.ui-premium-v3 .compact-table td { padding: 8px 10px; }
body.ui-premium-v3 .empty-cell { color:var(--muted); font-weight:850; text-align:center; padding:18px; }
body.ui-premium-v3 .pagination-bar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:12px; color:var(--text-soft); font-weight:850; }

/* Master/operational index pages: remove filler copy but keep controls */
body.ui-premium-v3 .metric-row,
body.ui-premium-v3 .admin-metrics { gap: 12px; }
body.ui-premium-v3 .metric-card { border-radius: 16px; padding: 13px 14px; min-height: 98px; }
body.ui-premium-v3 .metric-card span { color:var(--text-soft); font-weight:900; }
body.ui-premium-v3 .metric-card strong { font-size: 27px; line-height:1; color:var(--text-strong); }
body.ui-premium-v3 .metric-card small { color:var(--muted); font-weight:800; }
body.ui-premium-v3 .metric-card.metric-green { --card-accent: var(--hr-accent); }
body.ui-premium-v3 .metric-card.metric-blue { --card-accent: var(--fleet-accent); }
body.ui-premium-v3 .metric-card.metric-amber { --card-accent: var(--warning-accent); }
body.ui-premium-v3 .metric-card.metric-red { --card-accent: var(--risk-accent); }
body.ui-premium-v3 .metric-card.metric-slate { --card-accent: var(--muted); }

/* RTL polish */
html[dir="rtl"] body.ui-premium-v3 .exec-control-module::after,
html[dir="rtl"] body.ui-premium-v3 .admin-command-card::after,
html[dir="rtl"] body.ui-premium-v3 .ui-catalog-card::after,
html[dir="rtl"] body.ui-premium-v3 .config-area-card::after,
html[dir="rtl"] body.ui-premium-v3 .workspace-premium-card::after {
  right:auto;
  left:-120px;
}
html[dir="rtl"] body.ui-premium-v3 .brand-wordmark { direction:ltr; }

@media (max-width: 1260px) {
  body.ui-premium-v3 .workspace-premium-grid,
  body.ui-premium-v3 .pro-viz-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body.ui-premium-v3 .premium-rank-grid,
  body.ui-premium-v3 .pev-report-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body.ui-premium-v3 .hr-executive-dashboard { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body.ui-premium-v3 .exec-module-body { grid-template-columns: 1fr; }
  body.ui-premium-v3 .exec-radial-panel { grid-template-columns: repeat(2, 120px); justify-content:start; }
}

@media (max-width: 1040px) {
  body.ui-premium-v3 .admin-command-grid,
  body.ui-premium-v3 .ui-catalog-grid,
  body.ui-premium-v3 .configuration-grid,
  body.ui-premium-v3 .exec-control-grid,
  body.ui-premium-v3 .fleet-cockpit-grid,
  body.ui-premium-v3 .hr-executive-dashboard,
  body.ui-premium-v3 .pev-executive-dashboard { grid-template-columns: 1fr; }
  body.ui-premium-v3 .premium-stat-strip,
  body.ui-premium-v3 .admin-overview-bar,
  body.ui-premium-v3 .admin-snapshot-strip,
  body.ui-premium-v3 .exec-topline-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body.ui-premium-v3 .site-header { position: relative; }
}

@media (max-width: 760px) {
  body.ui-premium-v3 .page-shell { padding-inline: 12px; }
  body.ui-premium-v3 .premium-command-hero,
  body.ui-premium-v3 .workspace-command-hero,
  body.ui-premium-v3 .exec-cockpit-hero,
  body.ui-premium-v3 .workspace-premium-toolbar,
  body.ui-premium-v3 .exec-control-head,
  body.ui-premium-v3 .filter-section-title,
  body.ui-premium-v3 .hr-command-head,
  body.ui-premium-v3 .hr-register-toolbar,
  body.ui-premium-v3 .panel-head { flex-direction:column; align-items:stretch; }
  body.ui-premium-v3 .workspace-command-actions,
  body.ui-premium-v3 .premium-hero-actions { justify-content:flex-start; }
  body.ui-premium-v3 .workspace-premium-grid,
  body.ui-premium-v3 .pro-viz-grid,
  body.ui-premium-v3 .premium-rank-grid,
  body.ui-premium-v3 .pev-report-grid,
  body.ui-premium-v3 .premium-stat-strip,
  body.ui-premium-v3 .admin-overview-bar,
  body.ui-premium-v3 .admin-snapshot-strip,
  body.ui-premium-v3 .exec-topline-grid,
  body.ui-premium-v3 .executive-number-grid,
  body.ui-premium-v3 .executive-highlight-strip,
  body.ui-premium-v3 .fleet-kpi-strip { grid-template-columns: 1fr; }
  body.ui-premium-v3 .workspace-premium-row,
  body.ui-premium-v3 .ui-catalog-row,
  body.ui-premium-v3 .pev-rank-row { grid-template-columns: 1fr auto; }
  body.ui-premium-v3 .pev-rank-meter { grid-column: 1 / -1; }
}

/* Premium command cards for system configuration and existing hub pages */
.ui-premium-v3 .configuration-command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.ui-premium-v3 .command-config-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--premium-border);
  background: var(--premium-surface);
  box-shadow: var(--premium-shadow);
  padding: 16px;
}
.ui-premium-v3 .command-config-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--page-accent, var(--premium-blue)), transparent 78%);
}
.ui-premium-v3 .compact-link-stack { gap: 8px; }
.ui-premium-v3 .compact-link-stack a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid var(--premium-border);
  border-radius: 14px;
  background: var(--premium-surface-3);
  color: var(--premium-text);
}
.ui-premium-v3 .compact-link-stack a i {
  font-style: normal;
  font-weight: 950;
  color: var(--premium-blue);
}
.ui-premium-v3 .config-area-head p { display: none !important; }
.ui-premium-v3 .master-hub-card,
.ui-premium-v3 .admin-layer-card,
.ui-premium-v3 .config-area-card {
  border-color: var(--premium-border);
  background: var(--premium-surface);
  box-shadow: var(--premium-shadow);
}
@media (max-width: 1000px) { .ui-premium-v3 .configuration-command-grid { grid-template-columns: 1fr; } }


/* ========================================================================== 
   Executive Grade UI v4 refinements: less copy, denser dashboards, stronger
   light/dark semantic contrast without touching routes or data bindings.
   ========================================================================== */
body.ui-premium-v3 .command-body small,
body.ui-premium-v3 .executive-card-head p:not(.eyebrow),
body.ui-premium-v3 .fleet-score-main p:not(.eyebrow),
body.ui-premium-v3 .fleet-score-main + p,
body.ui-premium-v3 .workspace-premium-card header p {
  display: none !important;
}

body.ui-premium-v3 .admin-command-card,
body.ui-premium-v3 .ui-catalog-card,
body.ui-premium-v3 .workspace-premium-card,
body.ui-premium-v3 .exec-control-module,
body.ui-premium-v3 .fleet-score-card,
body.ui-premium-v3 .fleet-status-card,
body.ui-premium-v3 .pev-rank-card,
body.ui-premium-v3 .pro-viz-card {
  isolation: isolate;
}

body.ui-premium-v3 .exec-control-module {
  min-height: 0;
}

body.ui-premium-v3 .exec-topline-card,
body.ui-premium-v3 .premium-stat-strip article,
body.ui-premium-v3 .admin-overview-bar article,
body.ui-premium-v3 .metric-card {
  min-height: 86px;
  padding-block: 12px;
}

body.ui-premium-v3 .exec-control-grid {
  gap: 14px;
}

body.ui-premium-v3 .exec-module-body {
  grid-template-columns: 188px 1fr;
}

body.ui-premium-v3 .exec-control-module .btn,
body.ui-premium-v3 .exec-control-head .btn {
  white-space: nowrap;
}

body.ui-premium-v3 .exec-mini-kpis > div,
body.ui-premium-v3 .fleet-kpi-strip > div,
body.ui-premium-v3 .executive-number-block,
body.ui-premium-v3 .executive-highlight-item,
body.ui-premium-v3 .exec-insight-card,
body.ui-premium-v3 .pro-bar-row,
body.ui-premium-v3 .pev-rank-row,
body.ui-premium-v3 .fleet-status-row {
  background: color-mix(in srgb, var(--surface-0) 78%, transparent);
  border-color: color-mix(in srgb, var(--premium-line) 82%, var(--card-accent, var(--accent-blue)) 18%);
}

html[data-theme="dark"] body.ui-premium-v3 .exec-mini-kpis > div,
html[data-theme="dark"] body.ui-premium-v3 .fleet-kpi-strip > div,
html[data-theme="dark"] body.ui-premium-v3 .executive-number-block,
html[data-theme="dark"] body.ui-premium-v3 .executive-highlight-item,
html[data-theme="dark"] body.ui-premium-v3 .exec-insight-card,
html[data-theme="dark"] body.ui-premium-v3 .pro-bar-row,
html[data-theme="dark"] body.ui-premium-v3 .pev-rank-row,
html[data-theme="dark"] body.ui-premium-v3 .fleet-status-row {
  background: rgba(8, 18, 31, .50);
  border-color: rgba(148, 163, 184, .24);
}

body.ui-premium-v3 .exec-mini-kpis .risk,
body.ui-premium-v3 .exec-insight-card.risk,
body.ui-premium-v3 .fleet-kpi-strip .risk,
body.ui-premium-v3 .executive-number-block.risk {
  border-color: color-mix(in srgb, var(--risk-accent) 58%, var(--premium-line));
  background: color-mix(in srgb, var(--risk-accent) 13%, transparent);
}

body.ui-premium-v3 .fleet-kpi-strip .ok,
body.ui-premium-v3 .executive-number-block.cost,
body.ui-premium-v3 .executive-number-block.primary {
  border-color: color-mix(in srgb, var(--hr-accent) 34%, var(--premium-line));
}

body.ui-premium-v3 .cost-summary-list {
  gap: 9px;
}
body.ui-premium-v3 .cost-summary-row {
  grid-template-columns: 1fr;
}
body.ui-premium-v3 .pro-bar-meta {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

body.ui-premium-v3 .table-panel .panel-head p:not(.eyebrow),
body.ui-premium-v3 .table-panel .panel-head small,
body.ui-premium-v3 .premium-table-panel .panel-head p:not(.eyebrow) {
  display: none !important;
}

body.ui-premium-v3 .data-table {
  font-size: 12px;
}
body.ui-premium-v3 .data-table th,
body.ui-premium-v3 .data-table td {
  padding-block: 8px;
}

body.ui-premium-v3 .badge-breakdown,
body.ui-premium-v3 .badge-overdue,
body.ui-premium-v3 .badge-expired,
body.ui-premium-v3 .badge-rejected,
body.ui-premium-v3 .badge-failed {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--risk-accent) 32%, transparent);
}
body.ui-premium-v3 .badge-active,
body.ui-premium-v3 .badge-ready,
body.ui-premium-v3 .badge-ready-for-work,
body.ui-premium-v3 .badge-approved,
body.ui-premium-v3 .badge-completed {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hr-accent) 22%, transparent);
}

@media (max-width: 1260px) {
  body.ui-premium-v3 .exec-module-body { grid-template-columns: 1fr; }
}

/* ========================================================================== 
   Executive Grade UI v5 refinements: keep HR/Fleet metrics inside their own
   modules and remove circular-meter text collisions in both light and dark.
   ========================================================================== */
body.ui-premium-v3 .exec-cockpit-hero {
  min-height: 0;
  margin-bottom: 14px;
  padding: 16px 18px;
}
body.ui-premium-v3 .exec-cockpit-hero .premium-title-block h1 {
  font-size: clamp(28px, 3vw, 42px);
}
body.ui-premium-v3 .exec-cockpit-pills {
  display: none !important;
}
body.ui-premium-v3 .exec-control-grid {
  gap: 14px;
  align-items: stretch;
}
body.ui-premium-v3 .exec-control-module {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 19px;
}
body.ui-premium-v3 .exec-control-head {
  margin-bottom: 0;
  padding-bottom: 14px;
}
body.ui-premium-v3 .exec-control-head .btn {
  min-width: 172px;
  height: 40px;
  padding-inline: 16px;
}
body.ui-premium-v3 .exec-module-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 12px;
  position: relative;
  z-index: 1;
}
body.ui-premium-v3 .exec-module-stat {
  --card-accent: var(--module-accent, var(--accent-blue));
  position: relative;
  min-width: 0;
  min-height: 86px;
  padding: 13px 14px 12px 16px;
  border: 1px solid color-mix(in srgb, var(--premium-line) 78%, var(--card-accent) 22%);
  border-radius: 17px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 10%, transparent), transparent 60%),
    color-mix(in srgb, var(--surface-0) 76%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
}
html[data-theme="light"] body.ui-premium-v3 .exec-module-stat {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 8%, transparent), transparent 62%),
    rgba(255,255,255,.84);
}
body.ui-premium-v3 .exec-module-stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-accent);
}
html[dir="rtl"] body.ui-premium-v3 .exec-module-stat::before { left: auto; right: 0; }
body.ui-premium-v3 .exec-module-stat span {
  display: block;
  color: var(--text-soft);
  font-weight: 950;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ui-premium-v3 .exec-module-stat strong {
  display: block;
  margin-top: 7px;
  color: var(--text-strong);
  font-size: clamp(24px, 2.1vw, 31px);
  line-height: .95;
  letter-spacing: -.045em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ui-premium-v3 .exec-module-stat small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ui-premium-v3 .exec-module-body {
  grid-template-columns: minmax(196px, 210px) minmax(0, 1fr);
  gap: 12px;
  margin-top: 0;
}
body.ui-premium-v3 .exec-radial-panel {
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 8px;
  min-width: 0;
}
body.ui-premium-v3 .premium-ring,
body.ui-premium-v3 .executive-donut,
body.ui-premium-v3 .donut-meter {
  width: 88px;
  height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 13px;
}
body.ui-premium-v3 .premium-ring strong,
body.ui-premium-v3 .executive-donut span,
body.ui-premium-v3 .donut-meter span {
  width: 100%;
  max-width: 70px;
  text-align: center;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
body.ui-premium-v3 .premium-ring span,
body.ui-premium-v3 .executive-donut small,
body.ui-premium-v3 .donut-meter small {
  width: 100%;
  margin-top: 0;
  text-align: center;
  font-size: 9px;
  line-height: 1.05;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ui-premium-v3 .exec-mini-kpis > div,
body.ui-premium-v3 .exec-insight-card {
  min-width: 0;
}
body.ui-premium-v3 .exec-mini-kpis span,
body.ui-premium-v3 .exec-insight-card span {
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ui-premium-v3 .exec-mini-kpis strong {
  max-width: 100%;
  font-size: clamp(20px, 1.8vw, 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ui-premium-v3 .exec-insight-card strong {
  font-size: clamp(17px, 1.45vw, 20px);
}
body.ui-premium-v3 .exec-control-module .premium-progress,
body.ui-premium-v3 .exec-control-module .premium-split {
  height: 7px;
}
html[data-theme="dark"] body.ui-premium-v3 .exec-module-stat,
html[data-theme="dark"] body.ui-premium-v3 .exec-mini-kpis > div,
html[data-theme="dark"] body.ui-premium-v3 .exec-insight-card {
  background-color: rgba(7, 18, 31, .62);
}

@media (max-width: 1260px) {
  body.ui-premium-v3 .exec-module-body { grid-template-columns: 1fr; }
  body.ui-premium-v3 .exec-radial-panel { grid-template-columns: repeat(2, minmax(92px, 112px)); }
}
@media (max-width: 760px) {
  body.ui-premium-v3 .exec-module-stat-grid,
  body.ui-premium-v3 .exec-mini-kpis,
  body.ui-premium-v3 .exec-insight-grid { grid-template-columns: 1fr; }
  body.ui-premium-v3 .exec-control-head .btn { width: 100%; min-width: 0; }
  body.ui-premium-v3 .exec-radial-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
}

/* ========================================================================== 
   Executive Grade UI v5: grouped HR/Fleet metrics + collision-safe dashboards
   ========================================================================== */
body.ui-premium-v3.executive-v5-body .page-shell {
  width: min(1240px, calc(100vw - 24px));
  max-width: 1240px;
}

body.ui-premium-v3 .exec-v5-hero {
  --page-accent: var(--system-accent);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  margin-bottom: 14px;
  border-radius: 24px;
  border: 1px solid var(--premium-line);
  border-left: 6px solid var(--system-accent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--system-accent) 14%, transparent), transparent 38%),
    color-mix(in srgb, var(--surface-0) 78%, transparent);
  box-shadow: var(--premium-shadow);
}
html[dir="rtl"] body.ui-premium-v3 .exec-v5-hero {
  border-left: 1px solid var(--premium-line);
  border-right: 6px solid var(--system-accent);
}
html[data-theme="light"] body.ui-premium-v3 .exec-v5-hero {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--system-accent) 9%, transparent), transparent 38%),
    rgba(255,255,255,.92);
}
body.ui-premium-v3 .exec-v5-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--system-accent), transparent 74%);
}
body.ui-premium-v3 .exec-v5-hero > * { position: relative; z-index: 1; }
body.ui-premium-v3 .exec-v5-hero .premium-title-block h1 { margin: 0; }
body.ui-premium-v3 .exec-v5-hero-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
body.ui-premium-v3 .exec-v5-hero-pills span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--premium-line);
  border-radius: 999px;
  background: var(--premium-chip);
  color: var(--text-soft);
  font-weight: 900;
}
body.ui-premium-v3 .exec-v5-hero-pills b { color: var(--text-strong); }

body.ui-premium-v3 .exec-v5-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr));
  gap: 16px;
  align-items: stretch;
}
body.ui-premium-v3 .exec-v5-module {
  --module-accent: var(--system-accent);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid var(--premium-line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)),
    color-mix(in srgb, var(--surface-0) 80%, transparent);
  box-shadow: var(--premium-shadow);
}
html[data-theme="light"] body.ui-premium-v3 .exec-v5-module {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.90)),
    rgba(255,255,255,.92);
  border-color: rgba(15,23,42,.12);
}
body.ui-premium-v3 .exec-v5-module::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--module-accent);
}
html[dir="rtl"] body.ui-premium-v3 .exec-v5-module::before { left: auto; right: 0; }
body.ui-premium-v3 .exec-v5-module::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  right: -136px;
  top: -136px;
  background: color-mix(in srgb, var(--module-accent) 16%, transparent);
  pointer-events: none;
}
html[dir="rtl"] body.ui-premium-v3 .exec-v5-module::after { right: auto; left: -136px; }
body.ui-premium-v3 .exec-v5-module > * { position: relative; z-index: 1; }
body.ui-premium-v3 .exec-v5-hr { --module-accent: var(--hr-accent); --module-soft: var(--green-soft); }
body.ui-premium-v3 .exec-v5-fleet { --module-accent: var(--fleet-accent); --module-soft: var(--blue-soft); }

body.ui-premium-v3 .exec-v5-module-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--premium-line);
}
body.ui-premium-v3 .exec-v5-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
body.ui-premium-v3 .exec-v5-title h2,
body.ui-premium-v3 .exec-v5-title p { margin: 0; }
body.ui-premium-v3 .exec-v5-title h2 {
  color: var(--text-strong);
  letter-spacing: -.035em;
  line-height: 1.08;
}
body.ui-premium-v3 .exec-v5-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  min-width: 50px;
  height: 50px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--module-accent), #1d3f91);
  color: #fff;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 12px 24px rgba(0,0,0,.20);
}
body.ui-premium-v3 .exec-v5-action {
  min-width: 178px;
  justify-content: center;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--module-accent), #1d3f91) !important;
}

body.ui-premium-v3 .exec-v5-primary-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}
body.ui-premium-v3 .exec-v5-prime,
body.ui-premium-v3 .exec-v5-mini,
body.ui-premium-v3 .exec-v5-ring-card,
body.ui-premium-v3 .exec-v5-insight {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--premium-line) 82%, var(--module-accent) 18%);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-0) 72%, transparent);
}
html[data-theme="light"] body.ui-premium-v3 .exec-v5-prime,
html[data-theme="light"] body.ui-premium-v3 .exec-v5-mini,
html[data-theme="light"] body.ui-premium-v3 .exec-v5-ring-card,
html[data-theme="light"] body.ui-premium-v3 .exec-v5-insight {
  background: rgba(248,250,252,.74);
  border-color: color-mix(in srgb, rgba(15,23,42,.12) 82%, var(--module-accent) 18%);
}
body.ui-premium-v3 .exec-v5-prime {
  min-height: 92px;
  padding: 13px 14px;
}
body.ui-premium-v3 .exec-v5-prime span,
body.ui-premium-v3 .exec-v5-mini span,
body.ui-premium-v3 .exec-v5-ring-card span,
body.ui-premium-v3 .exec-v5-insight span,
body.ui-premium-v3 .exec-v5-prime small,
body.ui-premium-v3 .exec-v5-insight small {
  display: block;
  color: var(--muted);
  font-weight: 900;
  line-height: 1.2;
}
body.ui-premium-v3 .exec-v5-prime strong {
  display: block;
  max-width: 100%;
  margin-top: 7px;
  color: var(--text-strong);
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: .98;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.ui-premium-v3 .exec-v5-prime small { margin-top: 6px; font-size: 11px; }
body.ui-premium-v3 .exec-v5-prime.cost strong { font-size: clamp(22px, 1.95vw, 30px); }
body.ui-premium-v3 .exec-v5-prime.tone-risk,
body.ui-premium-v3 .exec-v5-ring-card.tone-risk {
  border-color: color-mix(in srgb, var(--risk-accent) 46%, var(--premium-line));
  background: color-mix(in srgb, var(--risk-accent) 10%, transparent);
}
html[data-theme="light"] body.ui-premium-v3 .exec-v5-prime.tone-risk,
html[data-theme="light"] body.ui-premium-v3 .exec-v5-ring-card.tone-risk {
  background: color-mix(in srgb, var(--risk-accent) 8%, #fff);
}
body.ui-premium-v3 .exec-v5-prime.ok {
  border-color: color-mix(in srgb, var(--hr-accent) 36%, var(--premium-line));
  background: color-mix(in srgb, var(--hr-accent) 9%, transparent);
}
body.ui-premium-v3 .exec-v5-prime.tone-fleet { border-color: color-mix(in srgb, var(--fleet-accent) 35%, var(--premium-line)); }
body.ui-premium-v3 .exec-v5-prime.tone-hr { border-color: color-mix(in srgb, var(--hr-accent) 35%, var(--premium-line)); }

body.ui-premium-v3 .exec-v5-visual-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}
body.ui-premium-v3 .exec-v5-ring-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
body.ui-premium-v3 .exec-v5-ring-card {
  min-height: 134px;
  padding: 12px 8px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
body.ui-premium-v3 .exec-v5-donut {
  --ring-color: var(--module-accent);
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    radial-gradient(circle at center, var(--surface-0) 0 56%, transparent 58%),
    conic-gradient(var(--ring-color) var(--score, 0%), var(--premium-track) 0);
  border: 1px solid var(--premium-line);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ring-color) 16%, transparent);
}
html[data-theme="light"] body.ui-premium-v3 .exec-v5-donut {
  background:
    radial-gradient(circle at center, #fff 0 56%, transparent 58%),
    conic-gradient(var(--ring-color) var(--score, 0%), var(--premium-track) 0);
}
body.ui-premium-v3 .exec-v5-donut strong {
  display: block;
  position: relative;
  z-index: 1;
  max-width: 70px;
  color: var(--text-strong);
  font-size: 16px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.045em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ui-premium-v3 .exec-v5-donut.tone-hr { --ring-color: var(--hr-accent); }
body.ui-premium-v3 .exec-v5-donut.tone-fleet { --ring-color: var(--fleet-accent); }
body.ui-premium-v3 .exec-v5-donut.tone-warning { --ring-color: var(--warning-accent); }
body.ui-premium-v3 .exec-v5-donut.tone-risk { --ring-color: var(--risk-accent); }
body.ui-premium-v3 .exec-v5-ring-card span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-soft);
}

body.ui-premium-v3 .exec-v5-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
body.ui-premium-v3 .exec-v5-mini {
  min-height: 134px;
  padding: 13px 14px;
  display: grid;
  align-content: center;
}
body.ui-premium-v3 .exec-v5-mini strong {
  display: block;
  margin-top: 8px;
  color: var(--text-strong);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ui-premium-v3 .exec-v5-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
body.ui-premium-v3 .exec-v5-insight {
  min-height: 112px;
  padding: 12px 13px;
}
body.ui-premium-v3 .exec-v5-insight strong {
  display: block;
  max-width: 100%;
  margin: 6px 0 8px;
  color: var(--text-strong);
  font-size: 18px;
  line-height: 1.12;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.ui-premium-v3 .exec-v5-cost-pair {
  font-size: 17px !important;
  letter-spacing: -.025em !important;
}
body.ui-premium-v3 .exec-v5-progress,
body.ui-premium-v3 .exec-v5-split {
  display: block;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--premium-track);
}
body.ui-premium-v3 .exec-v5-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--module-accent), color-mix(in srgb, var(--module-accent) 55%, #fff));
}
body.ui-premium-v3 .exec-v5-split { display: flex; }
body.ui-premium-v3 .exec-v5-split i,
body.ui-premium-v3 .exec-v5-split b { display: block; height: 100%; }
body.ui-premium-v3 .exec-v5-split i { background: var(--hr-accent); }
body.ui-premium-v3 .exec-v5-split b { background: var(--warning-accent); }
body.ui-premium-v3 .exec-v5-insight small { margin-top: 6px; font-size: 11px; }

/* Collision fix for older donut/ring widgets used in HR and Fleet detailed reports. */
body.ui-premium-v3 .premium-ring,
body.ui-premium-v3 .executive-donut,
body.ui-premium-v3 .donut-meter {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
}
body.ui-premium-v3 .premium-ring strong,
body.ui-premium-v3 .premium-ring span,
body.ui-premium-v3 .executive-donut span,
body.ui-premium-v3 .executive-donut small,
body.ui-premium-v3 .donut-meter span,
body.ui-premium-v3 .donut-meter small {
  position: relative !important;
  z-index: 1;
  max-width: 74%;
  margin: 0 !important;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ui-premium-v3 .premium-ring strong,
body.ui-premium-v3 .executive-donut span,
body.ui-premium-v3 .donut-meter span { font-size: 17px; line-height: 1; }
body.ui-premium-v3 .premium-ring span,
body.ui-premium-v3 .executive-donut small,
body.ui-premium-v3 .donut-meter small { font-size: 9px; line-height: 1.08; }

@media (max-width: 1180px) {
  body.ui-premium-v3 .exec-v5-grid { grid-template-columns: 1fr; }
  body.ui-premium-v3.executive-v5-body .page-shell { width: min(980px, calc(100vw - 24px)); }
}
@media (max-width: 720px) {
  body.ui-premium-v3 .exec-v5-hero,
  body.ui-premium-v3 .exec-v5-module-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
  body.ui-premium-v3 .exec-v5-hero { display: flex; }
  body.ui-premium-v3 .exec-v5-hero-pills { justify-content: flex-start; }
  body.ui-premium-v3 .exec-v5-action { width: 100%; min-width: 0; }
  body.ui-premium-v3 .exec-v5-primary-strip,
  body.ui-premium-v3 .exec-v5-visual-row,
  body.ui-premium-v3 .exec-v5-mini-grid,
  body.ui-premium-v3 .exec-v5-insights { grid-template-columns: 1fr; }
  body.ui-premium-v3 .exec-v5-ring-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  body.ui-premium-v3 .exec-v5-module { padding: 15px; border-radius: 22px; }
  body.ui-premium-v3 .exec-v5-title { align-items: flex-start; }
  body.ui-premium-v3 .exec-v5-code { width: 44px; min-width: 44px; height: 44px; }
  body.ui-premium-v3 .exec-v5-ring-pair { grid-template-columns: 1fr; }
}

/* ========================================================================== 
   Executive Grade UI v5: module-owned KPIs + ring overlap correction
   ========================================================================== */
body.ui-premium-v3 .exec-module-stat-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
body.ui-premium-v3 .exec-module-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 88px;
  padding: 12px 14px 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--premium-line);
  background: color-mix(in srgb, var(--surface-0) 80%, transparent);
  box-shadow: var(--shadow-sm);
}
body.ui-premium-v3 .exec-module-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-accent, var(--module-accent, var(--accent-blue)));
}
html[dir="rtl"] body.ui-premium-v3 .exec-module-stat-card::before { left: auto; right: 0; }
body.ui-premium-v3 .exec-module-stat-card span {
  display: block;
  color: var(--text-soft);
  font-weight: 950;
  line-height: 1.15;
}
body.ui-premium-v3 .exec-module-stat-card strong {
  display: block;
  margin-top: 5px;
  color: var(--text-strong);
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1;
  letter-spacing: -.045em;
  white-space: nowrap;
}
body.ui-premium-v3 .exec-module-stat-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 850;
  line-height: 1.2;
}
body.ui-premium-v3 .exec-module-stat-card.metric-green { --card-accent: var(--hr-accent); }
body.ui-premium-v3 .exec-module-stat-card.metric-blue { --card-accent: var(--fleet-accent); }
body.ui-premium-v3 .exec-module-stat-card.metric-teal { --card-accent: var(--accent-teal); }
body.ui-premium-v3 .exec-module-stat-card.metric-red { --card-accent: var(--risk-accent); }

body.ui-premium-v3 .exec-module-body {
  grid-template-columns: minmax(206px, 218px) minmax(0, 1fr);
}
body.ui-premium-v3 .exec-radial-panel {
  grid-template-columns: repeat(2, 96px);
  justify-content: start;
}
body.ui-premium-v3 .premium-ring,
body.ui-premium-v3 .executive-donut,
body.ui-premium-v3 .donut-meter {
  position: relative;
  isolation: isolate;
}
body.ui-premium-v3 .premium-ring::after { display: none; }
body.ui-premium-v3 .premium-ring {
  width: 96px;
  height: 96px;
  padding: 0;
  grid-auto-flow: row;
  grid-auto-rows: min-content;
  align-content: center;
  justify-items: center;
  row-gap: 4px;
  background:
    radial-gradient(circle at center, var(--surface-0) 0 55%, transparent 56%),
    conic-gradient(var(--ring-accent) var(--score, var(--active, 0%)), var(--premium-track) 0);
}
body.ui-premium-v3 .premium-ring strong,
body.ui-premium-v3 .premium-ring span {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 68px;
  margin: 0;
  text-align: center;
}
body.ui-premium-v3 .premium-ring strong {
  color: var(--text-strong);
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: .95;
  font-weight: 950;
  letter-spacing: -.04em;
  white-space: nowrap;
}
body.ui-premium-v3 .premium-ring span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.05;
  font-weight: 950;
  text-transform: none;
  white-space: normal;
}
body.ui-premium-v3 .executive-donut span,
body.ui-premium-v3 .donut-meter span,
body.ui-premium-v3 .pro-donut span {
  font-size: clamp(18px, 2vw, 23px);
  line-height: .95;
  max-width: 76px;
  white-space: nowrap;
}
body.ui-premium-v3 .executive-donut small,
body.ui-premium-v3 .donut-meter small,
body.ui-premium-v3 .pro-donut small {
  max-width: 78px;
  line-height: 1.05;
}
html[data-theme="dark"] body.ui-premium-v3 .exec-module-stat-card {
  background: rgba(8, 18, 31, .52);
  border-color: rgba(148, 163, 184, .25);
}
html[data-theme="dark"] body.ui-premium-v3 .premium-ring {
  background:
    radial-gradient(circle at center, #0b1626 0 55%, transparent 56%),
    conic-gradient(var(--ring-accent) var(--score, var(--active, 0%)), rgba(148,163,184,.22) 0);
}
html[data-theme="light"] body.ui-premium-v3 .exec-module-stat-card {
  background: rgba(248, 250, 252, .88);
  border-color: rgba(15, 23, 42, .11);
}
html[data-theme="light"] body.ui-premium-v3 .premium-ring {
  background:
    radial-gradient(circle at center, #ffffff 0 55%, transparent 56%),
    conic-gradient(var(--ring-accent) var(--score, var(--active, 0%)), rgba(15,23,42,.12) 0);
}
@media (max-width: 1260px) {
  body.ui-premium-v3 .exec-module-body { grid-template-columns: 1fr; }
  body.ui-premium-v3 .exec-radial-panel { grid-template-columns: repeat(2, 96px); }
}
@media (max-width: 640px) {
  body.ui-premium-v3 .exec-module-stat-strip,
  body.ui-premium-v3 .exec-mini-kpis { grid-template-columns: 1fr; }
  body.ui-premium-v3 .exec-radial-panel { grid-template-columns: repeat(2, minmax(82px, 96px)); }
  body.ui-premium-v3 .premium-ring { width: 88px; height: 88px; }
  body.ui-premium-v3 .exec-control-head .btn { min-width: 0; width: 100%; }
}

/* ========================================================================== 
   Executive Grade UI v5.1: contained module metrics + collision-safe meters
   ========================================================================== */
body.ui-premium-v3 .exec-module-stat.metric-green { --card-accent: var(--hr-accent); }
body.ui-premium-v3 .exec-module-stat.metric-blue { --card-accent: var(--system-accent); }
body.ui-premium-v3 .exec-module-stat.metric-teal { --card-accent: var(--accent-teal); }
body.ui-premium-v3 .exec-module-stat.metric-red { --card-accent: var(--risk-accent); }

body.ui-premium-v3 .premium-ring,
body.ui-premium-v3 .executive-donut,
body.ui-premium-v3 .donut-meter,
body.ui-premium-v3 .pro-donut {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  isolation: isolate;
}

body.ui-premium-v3 .premium-ring::after,
body.ui-premium-v3 .executive-donut::after,
body.ui-premium-v3 .donut-meter::after,
body.ui-premium-v3 .pro-donut::after {
  z-index: 0;
  pointer-events: none;
}

body.ui-premium-v3 .premium-ring strong,
body.ui-premium-v3 .premium-ring span,
body.ui-premium-v3 .executive-donut span,
body.ui-premium-v3 .executive-donut small,
body.ui-premium-v3 .donut-meter span,
body.ui-premium-v3 .donut-meter small,
body.ui-premium-v3 .pro-donut span,
body.ui-premium-v3 .pro-donut small {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  z-index: 2;
  margin: 0 !important;
  max-width: 78%;
  text-align: center;
}

body.ui-premium-v3 .exec-control-module .premium-ring {
  width: 88px;
  height: 88px;
  padding: 14px;
}
body.ui-premium-v3 .exec-control-module .premium-ring strong {
  font-size: clamp(15px, 1.45vw, 17px);
  line-height: 1;
  letter-spacing: -.025em;
}
body.ui-premium-v3 .exec-control-module .premium-ring span {
  font-size: 9px;
  line-height: 1.05;
  letter-spacing: .035em;
  text-transform: uppercase;
}

body.ui-premium-v3 .fleet-score-main .premium-ring {
  width: 98px;
  height: 98px;
}
body.ui-premium-v3 .fleet-score-main .premium-ring strong {
  font-size: 18px;
}

body.ui-premium-v3 .exec-module-stat,
body.ui-premium-v3 .exec-mini-kpis > div,
body.ui-premium-v3 .exec-insight-card,
body.ui-premium-v3 .fleet-kpi-strip > div,
body.ui-premium-v3 .executive-number-block,
body.ui-premium-v3 .executive-highlight-item {
  min-width: 0;
}

body.ui-premium-v3 .exec-module-stat strong,
body.ui-premium-v3 .exec-mini-kpis strong,
body.ui-premium-v3 .exec-insight-card strong,
body.ui-premium-v3 .fleet-kpi-strip strong,
body.ui-premium-v3 .executive-number-block strong,
body.ui-premium-v3 .executive-highlight-item strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.ui-premium-v3 .exec-module-stat span,
body.ui-premium-v3 .exec-module-stat small,
body.ui-premium-v3 .exec-mini-kpis span,
body.ui-premium-v3 .exec-insight-card span,
body.ui-premium-v3 .fleet-kpi-strip span,
body.ui-premium-v3 .executive-number-block span,
body.ui-premium-v3 .executive-highlight-item span {
  line-height: 1.15;
}

body.ui-premium-v3 .exec-cockpit-pills {
  display: none !important;
}

html[data-theme="light"] body.ui-premium-v3 .exec-module-stat,
html[data-theme="light"] body.ui-premium-v3 .exec-mini-kpis > div,
html[data-theme="light"] body.ui-premium-v3 .exec-insight-card {
  background-color: rgba(255, 255, 255, .86);
}

@media (max-width: 760px) {
  body.ui-premium-v3 .exec-module-stat-grid {
    grid-template-columns: 1fr;
  }
  body.ui-premium-v3 .exec-control-module .premium-ring {
    width: 92px;
    height: 92px;
  }
}
body.ui-premium-v3 .premium-ring strong,
body.ui-premium-v3 .premium-ring span,
body.ui-premium-v3 .executive-donut span,
body.ui-premium-v3 .executive-donut small,
body.ui-premium-v3 .donut-meter span,
body.ui-premium-v3 .donut-meter small {
  position: relative !important;
  z-index: 1;
}

/* ========================================================================== 
   Executive Grade UI v6: full-width shell + no-truncation numeric dashboards
   ========================================================================== */
body.ui-premium-v3 .page-shell,
body.ui-premium-v3.executive-premium-body .page-shell,
body.ui-premium-v3.executive-v5-body .page-shell,
body.ui-premium-v3 .workspace-premium-shell,
body.ui-premium-v3 .user-workspace-shell,
body.ui-premium-v3 .page-equipment .page-shell,
.executive-friendly-body .page-shell,
.executive-v2-body .page-shell {
  width: calc(100vw - clamp(20px, 2.2vw, 44px)) !important;
  max-width: none !important;
  padding-inline: 0 !important;
}

body.ui-premium-v3 .premium-report-head,
body.ui-premium-v3 .exec-v5-hero,
body.ui-premium-v3 .exec-v5-grid,
body.ui-premium-v3 .hr-executive-dashboard,
body.ui-premium-v3 .pev-executive-dashboard,
body.ui-premium-v3 .fleet-cockpit-grid,
body.ui-premium-v3 .pro-viz-grid,
body.ui-premium-v3 .table-panel,
body.ui-premium-v3 .hr-report-control-panel,
body.ui-premium-v3 .hr-register-card,
body.ui-premium-v3 .filter-panel {
  max-width: none !important;
}

body.ui-premium-v3 .hr-executive-dashboard,
body.ui-premium-v3 .pev-executive-dashboard {
  width: 100%;
  overflow: visible;
}

body.ui-premium-v3 .hr-executive-dashboard {
  grid-template-columns: minmax(440px, 1.5fr) minmax(240px, .75fr) minmax(270px, .9fr) minmax(240px, .75fr);
  align-items: stretch;
}

body.ui-premium-v3 .pev-executive-dashboard,
body.ui-premium-v3 .fleet-cockpit-grid {
  grid-template-columns: minmax(640px, 1.55fr) minmax(320px, .75fr);
}

body.ui-premium-v3 .executive-number-grid {
  grid-template-columns: repeat(2, minmax(185px, 1fr)) !important;
  gap: 10px;
}

body.ui-premium-v3 .executive-highlight-strip {
  grid-template-columns: repeat(3, minmax(155px, 1fr)) !important;
}

body.ui-premium-v3 .executive-number-block,
body.ui-premium-v3 .executive-highlight-item,
body.ui-premium-v3 .exec-v5-prime,
body.ui-premium-v3 .exec-v5-mini,
body.ui-premium-v3 .exec-v5-insight,
body.ui-premium-v3 .exec-module-stat,
body.ui-premium-v3 .exec-module-stat-card,
body.ui-premium-v3 .fleet-kpi-strip > div,
body.ui-premium-v3 .exec-mini-kpis > div {
  min-width: 0;
  overflow: visible !important;
}

body.ui-premium-v3 .executive-number-block strong,
body.ui-premium-v3 .executive-highlight-item strong,
body.ui-premium-v3 .exec-v5-prime strong,
body.ui-premium-v3 .exec-v5-mini strong,
body.ui-premium-v3 .exec-v5-insight strong,
body.ui-premium-v3 .exec-module-stat strong,
body.ui-premium-v3 .exec-module-stat-card strong,
body.ui-premium-v3 .exec-mini-kpis strong,
body.ui-premium-v3 .fleet-kpi-strip strong,
body.ui-premium-v3 .risk-stack strong,
body.ui-premium-v3 .driver-row strong {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body.ui-premium-v3 .executive-number-block strong,
body.ui-premium-v3 .executive-highlight-item strong {
  font-size: clamp(22px, 1.55vw, 29px) !important;
  line-height: 1.02;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

body.ui-premium-v3 .exec-v5-prime strong,
body.ui-premium-v3 .exec-v5-mini strong {
  font-size: clamp(22px, 1.55vw, 30px) !important;
  line-height: 1.02;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

body.ui-premium-v3 .exec-v5-prime.cost strong,
body.ui-premium-v3 .exec-v5-cost-pair {
  font-size: clamp(20px, 1.35vw, 27px) !important;
  letter-spacing: -.035em !important;
}

body.ui-premium-v3 .exec-v5-insight strong,
body.ui-premium-v3 .driver-row strong,
body.ui-premium-v3 .risk-stack strong {
  white-space: normal !important;
  overflow-wrap: anywhere;
}

body.ui-premium-v3 .exec-v5-insight strong.ltr-text,
body.ui-premium-v3 .exec-v5-cost-pair,
body.ui-premium-v3 .driver-row .ltr-text,
body.ui-premium-v3 .risk-stack .ltr-text,
body.ui-premium-v3 .executive-number-block .ltr-text,
body.ui-premium-v3 .executive-highlight-item .ltr-text,
body.ui-premium-v3 .exec-v5-prime .ltr-text,
body.ui-premium-v3 .exec-v5-mini .ltr-text,
body.ui-premium-v3 .fleet-kpi-strip .ltr-text,
body.ui-premium-v3 .exec-mini-kpis .ltr-text,
body.ui-premium-v3 .exec-module-stat .ltr-text,
body.ui-premium-v3 .exec-module-stat-card .ltr-text {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body.ui-premium-v3 .executive-number-block span,
body.ui-premium-v3 .executive-number-block small,
body.ui-premium-v3 .executive-highlight-item span,
body.ui-premium-v3 .executive-highlight-item small,
body.ui-premium-v3 .exec-v5-prime span,
body.ui-premium-v3 .exec-v5-prime small,
body.ui-premium-v3 .exec-v5-mini span,
body.ui-premium-v3 .exec-v5-mini small,
body.ui-premium-v3 .exec-v5-insight span,
body.ui-premium-v3 .exec-v5-insight small,
body.ui-premium-v3 .driver-row span,
body.ui-premium-v3 .driver-row small,
body.ui-premium-v3 .risk-stack span,
body.ui-premium-v3 .risk-stack small {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

body.ui-premium-v3 .exec-v5-primary-strip {
  grid-template-columns: repeat(2, minmax(210px, 1fr));
}

body.ui-premium-v3 .exec-v5-mini-grid,
body.ui-premium-v3 .exec-v5-insights {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

body.ui-premium-v3 .exec-v5-visual-row {
  grid-template-columns: minmax(190px, 230px) minmax(280px, 1fr);
}

body.ui-premium-v3 .exec-v5-ring-card span,
body.ui-premium-v3 .exec-v5-title h2,
body.ui-premium-v3 .exec-control-title h2,
body.ui-premium-v3 .fleet-status-row span,
body.ui-premium-v3 .pev-rank-label strong,
body.ui-premium-v3 .pro-bar-label strong {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

body.ui-premium-v3 .premium-ring strong,
body.ui-premium-v3 .executive-donut span,
body.ui-premium-v3 .donut-meter span,
body.ui-premium-v3 .pro-donut span,
body.ui-premium-v3 .exec-v5-donut strong {
  overflow: visible !important;
  text-overflow: clip !important;
}

@media (min-width: 1900px) {
  body.ui-premium-v3 .hr-executive-dashboard {
    grid-template-columns: minmax(640px, 1.55fr) minmax(320px, .75fr) minmax(380px, .9fr) minmax(320px, .75fr);
  }
  body.ui-premium-v3 .executive-number-grid { grid-template-columns: repeat(4, minmax(145px, 1fr)) !important; }
}

@media (max-width: 1320px) {
  body.ui-premium-v3 .hr-executive-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.ui-premium-v3 .hr-executive-dashboard .executive-main-card {
    grid-column: 1 / -1;
  }
  body.ui-premium-v3 .executive-number-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)) !important; }
  body.ui-premium-v3 .executive-highlight-strip { grid-template-columns: repeat(3, minmax(150px, 1fr)) !important; }
  body.ui-premium-v3 .pev-executive-dashboard,
  body.ui-premium-v3 .fleet-cockpit-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1040px) {
  body.ui-premium-v3 .exec-v5-grid,
  body.ui-premium-v3 .hr-executive-dashboard,
  body.ui-premium-v3 .pev-executive-dashboard,
  body.ui-premium-v3 .fleet-cockpit-grid { grid-template-columns: 1fr !important; }
  body.ui-premium-v3 .exec-v5-visual-row { grid-template-columns: 1fr; }
  body.ui-premium-v3 .exec-v5-ring-pair { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}

@media (max-width: 760px) {
  body.ui-premium-v3 .page-shell,
  body.ui-premium-v3.executive-premium-body .page-shell,
  body.ui-premium-v3.executive-v5-body .page-shell,
  body.ui-premium-v3 .workspace-premium-shell,
  body.ui-premium-v3 .user-workspace-shell {
    width: calc(100vw - 18px) !important;
  }
  body.ui-premium-v3 .executive-number-grid,
  body.ui-premium-v3 .executive-highlight-strip,
  body.ui-premium-v3 .exec-v5-primary-strip,
  body.ui-premium-v3 .exec-v5-mini-grid,
  body.ui-premium-v3 .exec-v5-insights,
  body.ui-premium-v3 .exec-v5-ring-pair { grid-template-columns: 1fr !important; }
  body.ui-premium-v3 .executive-number-block strong,
  body.ui-premium-v3 .executive-highlight-item strong,
  body.ui-premium-v3 .exec-v5-prime strong,
  body.ui-premium-v3 .exec-v5-mini strong { font-size: 24px !important; }
}

/* ========================================================================== 
   PPCM UI v7.2 final: overflow-safe HR report + full-width trend chart
   ========================================================================== */
body.ui-premium-v3 .pro-viz-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)) !important;
  grid-auto-flow: row dense !important;
  align-items: start !important;
  gap: 14px !important;
}

body.ui-premium-v3 .pro-viz-card.wide-viz,
body.ui-premium-v3 .trend-chart-card {
  grid-column: span 2 !important;
}

body.ui-premium-v3 .trend-chart-card {
  --card-accent: var(--accent-blue);
  min-height: 0 !important;
  padding: 16px !important;
  overflow: visible !important;
}

body.ui-premium-v3 .pro-viz-card,
body.ui-premium-v3 .viz-card-head,
body.ui-premium-v3 .viz-card-head > div,
body.ui-premium-v3 .pro-donut-layout,
body.ui-premium-v3 .legend-stack,
body.ui-premium-v3 .pro-legend,
body.ui-premium-v3 .pro-bar-list,
body.ui-premium-v3 .sortable-viz-list,
body.ui-premium-v3 .report-list,
body.ui-premium-v3 .trend-graph-shell,
body.ui-premium-v3 .trend-graph,
body.ui-premium-v3 .trend-bar-col {
  min-width: 0 !important;
}

body.ui-premium-v3 .pro-viz-card {
  overflow: visible !important;
}

body.ui-premium-v3 .viz-card-head,
body.ui-premium-v3 .trend-card-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

body.ui-premium-v3 .viz-card-head h2,
body.ui-premium-v3 .panel-head h2,
body.ui-premium-v3 .page-head h1,
body.ui-premium-v3 .section-header-clean h1,
body.ui-premium-v3 .executive-card-head h2 {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

body.ui-premium-v3 .viz-card-head > span,
body.ui-premium-v3 .status-percent,
body.ui-premium-v3 .executive-filter-pill {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

body.ui-premium-v3 .pro-donut-layout,
body.ui-premium-v3 .donut-wrap.pro-donut-layout {
  grid-template-columns: minmax(118px, 142px) minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: center !important;
}

body.ui-premium-v3 .pro-donut,
body.ui-premium-v3 .donut-meter.pro-donut {
  width: 126px !important;
  height: 126px !important;
  min-width: 126px !important;
  padding: 0 !important;
}

body.ui-premium-v3 .pro-donut,
body.ui-premium-v3 .donut-meter,
body.ui-premium-v3 .executive-donut,
body.ui-premium-v3 .premium-ring {
  flex: 0 0 auto !important;
  overflow: visible !important;
  contain: none !important;
}

body.ui-premium-v3 .pro-donut::after,
body.ui-premium-v3 .donut-meter::after,
body.ui-premium-v3 .executive-donut::after {
  inset: 16px !important;
}

body.ui-premium-v3 .premium-ring strong,
body.ui-premium-v3 .premium-ring span,
body.ui-premium-v3 .executive-donut span,
body.ui-premium-v3 .executive-donut small,
body.ui-premium-v3 .donut-meter span,
body.ui-premium-v3 .donut-meter small,
body.ui-premium-v3 .pro-donut span,
body.ui-premium-v3 .pro-donut small {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  padding-inline: 3px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

body.ui-premium-v3 .executive-donut span,
body.ui-premium-v3 .donut-meter span,
body.ui-premium-v3 .pro-donut span {
  font-size: clamp(16px, 1.3vw, 20px) !important;
  letter-spacing: -.05em !important;
  font-variant-numeric: tabular-nums !important;
}

body.ui-premium-v3 .executive-donut small,
body.ui-premium-v3 .donut-meter small,
body.ui-premium-v3 .pro-donut small {
  font-size: 10px !important;
  letter-spacing: -.01em !important;
}

body.ui-premium-v3 .legend-row {
  grid-template-columns: minmax(0, 1fr) max-content !important;
}

body.ui-premium-v3 .legend-row span,
body.ui-premium-v3 .legend-row strong,
body.ui-premium-v3 .pro-bar-label strong,
body.ui-premium-v3 .pro-bar-label span,
body.ui-premium-v3 .cost-category-metrics,
body.ui-premium-v3 .viz-total-line span,
body.ui-premium-v3 .trend-tile strong,
body.ui-premium-v3 .trend-tile span,
body.ui-premium-v3 .trend-tile small {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body.ui-premium-v3 .legend-row strong,
body.ui-premium-v3 .pro-bar-label span,
body.ui-premium-v3 .cost-category-metrics,
body.ui-premium-v3 .viz-total-line b,
body.ui-premium-v3 .trend-tile strong,
body.ui-premium-v3 .trend-tile small,
body.ui-premium-v3 .trend-bar-col b,
body.ui-premium-v3 .trend-bar-col small {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}

body.ui-premium-v3 .pro-bar-label {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  align-items: start !important;
}

body.ui-premium-v3 .pro-bar-label strong {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

body.ui-premium-v3 .trend-compact-total {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(180px, max-content)) !important;
  justify-content: start !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}

body.ui-premium-v3 .trend-compact-total span {
  border: 1px solid var(--premium-line) !important;
  border-radius: 999px !important;
  background: var(--premium-chip) !important;
  padding: 6px 10px !important;
  color: var(--text-soft) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

body.ui-premium-v3 .trend-graph-shell {
  border: 1px solid var(--premium-line) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(180deg, rgba(90, 167, 255, .07), transparent),
    var(--premium-faint) !important;
  padding: 14px 12px 10px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin !important;
}

body.ui-premium-v3 .trend-graph {
  display: flex !important;
  align-items: stretch !important;
  gap: 8px !important;
  min-height: 230px !important;
}

body.ui-premium-v3 .trend-bar-col {
  flex: 1 1 48px !important;
  min-width: 44px !important;
  display: grid !important;
  grid-template-rows: minmax(140px, 1fr) auto auto auto !important;
  gap: 5px !important;
  align-items: end !important;
  text-align: center !important;
}

body.ui-premium-v3 .trend-bar-stage {
  position: relative !important;
  width: 100% !important;
  height: 148px !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding-inline: 4px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(148, 163, 184, .14) !important;
  background:
    linear-gradient(180deg, rgba(148, 163, 184, .10) 1px, transparent 1px) 0 0 / 100% 25%,
    rgba(148, 163, 184, .055) !important;
}

body.ui-premium-v3 .trend-bar-stage i {
  display: block !important;
  width: min(100%, 28px) !important;
  min-height: 3px !important;
  border-radius: 999px 999px 5px 5px !important;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-green)) !important;
  box-shadow: 0 10px 18px rgba(90, 167, 255, .24) !important;
}

body.ui-premium-v3 .trend-bar-col b {
  color: var(--text-strong) !important;
  font-size: 15px !important;
  line-height: 1 !important;
}

body.ui-premium-v3 .trend-bar-col span,
body.ui-premium-v3 .trend-bar-col small {
  color: var(--muted) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

body.ui-premium-v3 .trend-bar-col:hover .trend-bar-stage {
  border-color: color-mix(in srgb, var(--accent-blue) 45%, transparent) !important;
  background-color: rgba(90, 167, 255, .08) !important;
}

html[data-theme="light"] body.ui-premium-v3 .trend-compact-total span {
  background: rgba(255,255,255,.88) !important;
  border-color: rgba(15,23,42,.12) !important;
  color: #334155 !important;
}

html[data-theme="light"] body.ui-premium-v3 .trend-graph-shell {
  background:
    linear-gradient(180deg, rgba(49, 94, 234, .055), transparent),
    rgba(255,255,255,.72) !important;
  border-color: rgba(15,23,42,.12) !important;
}

html[data-theme="light"] body.ui-premium-v3 .trend-bar-stage {
  background:
    linear-gradient(180deg, rgba(15,23,42,.07) 1px, transparent 1px) 0 0 / 100% 25%,
    rgba(15,23,42,.035) !important;
  border-color: rgba(15,23,42,.10) !important;
}

@media (max-width: 1100px) {
  body.ui-premium-v3 .pro-viz-card.wide-viz,
  body.ui-premium-v3 .trend-chart-card {
    grid-column: span 1 !important;
  }
  body.ui-premium-v3 .trend-compact-total {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 720px) {
  body.ui-premium-v3 .pro-viz-grid {
    grid-template-columns: 1fr !important;
  }
  body.ui-premium-v3 .pro-donut-layout,
  body.ui-premium-v3 .donut-wrap.pro-donut-layout {
    grid-template-columns: 1fr !important;
  }
  body.ui-premium-v3 .pro-donut {
    margin-inline: auto !important;
  }
  body.ui-premium-v3 .pro-bar-label {
    grid-template-columns: 1fr !important;
  }
  body.ui-premium-v3 .trend-graph {
    min-width: 880px !important;
  }
}

/* ========================================================================== 
   Executive Grade UI v7.2: final HR report overflow + trend chart placement
   ========================================================================== */
body.ui-premium-v3.hr-premium-report .page-shell,
body.ui-premium-v3.fleet-premium-report .page-shell,
body.ui-premium-v3.page-hr-reports .page-shell {
  width: calc(100vw - clamp(18px, 2vw, 38px)) !important;
  max-width: none !important;
  padding-inline: 0 !important;
}

body.ui-premium-v3.hr-premium-report .pro-viz-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: start !important;
  grid-auto-flow: row dense !important;
}

body.ui-premium-v3.hr-premium-report .pro-viz-card {
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body.ui-premium-v3.hr-premium-report .viz-card-head,
body.ui-premium-v3.hr-premium-report .panel-head,
body.ui-premium-v3.hr-premium-report .executive-card-head {
  min-width: 0 !important;
}

body.ui-premium-v3.hr-premium-report .viz-card-head > div,
body.ui-premium-v3.hr-premium-report .panel-head > div,
body.ui-premium-v3.hr-premium-report .executive-card-head > div {
  min-width: 0 !important;
}

body.ui-premium-v3.hr-premium-report .viz-card-head h2,
body.ui-premium-v3.hr-premium-report .panel-head h2,
body.ui-premium-v3.hr-premium-report .executive-card-head h2 {
  max-width: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  hyphens: auto;
  line-height: 1.08 !important;
}

body.ui-premium-v3.hr-premium-report .viz-card-head h2 {
  font-size: clamp(18px, 1.22vw, 25px) !important;
}

body.ui-premium-v3.hr-premium-report .viz-card-head > span,
body.ui-premium-v3.hr-premium-report .viz-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 28px !important;
  padding: 5px 9px !important;
  border: 1px solid var(--premium-line) !important;
  border-radius: 999px !important;
  background: var(--premium-chip) !important;
  color: var(--text-strong) !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
}

body.ui-premium-v3.hr-premium-report .status-mix-layout,
body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .pro-donut-layout,
body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .donut-wrap.pro-donut-layout {
  grid-template-columns: minmax(112px, 132px) minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: center !important;
}

body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .donut-meter.pro-donut,
body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .pro-donut,
body.ui-premium-v3.hr-premium-report .status-mix-card .status-donut {
  width: 112px !important;
  height: 112px !important;
  min-width: 112px !important;
  padding: 0 !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
}

body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .pro-donut::after,
body.ui-premium-v3.hr-premium-report .status-mix-card .status-donut::after {
  inset: 16px !important;
}

body.ui-premium-v3 .premium-ring,
body.ui-premium-v3 .executive-donut,
body.ui-premium-v3 .donut-meter,
body.ui-premium-v3 .pro-donut {
  overflow: visible !important;
  flex: 0 0 auto !important;
}

body.ui-premium-v3 .premium-ring strong,
body.ui-premium-v3 .executive-donut span,
body.ui-premium-v3 .donut-meter span,
body.ui-premium-v3 .pro-donut span,
body.ui-premium-v3 .exec-v5-donut strong,
body.ui-premium-v3 .pro-donut-value {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  letter-spacing: -.04em !important;
  font-variant-numeric: tabular-nums !important;
}

body.ui-premium-v3 .premium-ring span,
body.ui-premium-v3 .executive-donut small,
body.ui-premium-v3 .donut-meter small,
body.ui-premium-v3 .pro-donut small {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .pro-donut span,
body.ui-premium-v3.hr-premium-report .status-mix-card .pro-donut-value {
  font-size: clamp(17px, 1.28vw, 21px) !important;
  line-height: .95 !important;
}

body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .pro-donut small,
body.ui-premium-v3.hr-premium-report .status-mix-card .pro-donut small {
  font-size: 10px !important;
  line-height: 1.05 !important;
}

body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .legend-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
}

body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .legend-row span {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
}

body.ui-premium-v3.hr-premium-report .compact-period-card {
  max-height: 440px !important;
  min-height: 0 !important;
}

body.ui-premium-v3.hr-premium-report .compact-period-card .trend-timeline {
  max-height: 282px !important;
  overflow: auto !important;
  padding-inline-end: 4px !important;
  scrollbar-width: thin !important;
}

body.ui-premium-v3.hr-premium-report .compact-period-card .viz-total-line span:last-child {
  display: none !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-graph-card {
  --card-accent: var(--accent-blue);
  min-height: 324px !important;
  grid-column: span 2 !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-summary {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-summary span {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-width: 0 !important;
  padding: 8px 10px !important;
  border: 1px solid var(--premium-line) !important;
  border-radius: 13px !important;
  background: var(--premium-faint) !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-summary b {
  color: var(--text-strong) !important;
  white-space: nowrap !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-graph {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(42px, 1fr)) !important;
  gap: 8px !important;
  align-items: end !important;
  min-height: 196px !important;
  padding: 12px !important;
  border: 1px solid var(--premium-line) !important;
  border-radius: 16px !important;
  background:
    linear-gradient(to top, rgba(148, 163, 184, .13) 1px, transparent 1px) 0 0 / 100% 25%,
    var(--premium-faint) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin !important;
}

html[data-theme="light"] body.ui-premium-v3.hr-premium-report .hr-trend-graph {
  background:
    linear-gradient(to top, rgba(15, 23, 42, .09) 1px, transparent 1px) 0 0 / 100% 25%,
    rgba(255, 255, 255, .76) !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-bar {
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(128px, 1fr) auto auto !important;
  gap: 5px !important;
  align-items: end !important;
  text-align: center !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-bar-track {
  position: relative !important;
  height: 128px !important;
  display: flex !important;
  align-items: end !important;
  justify-content: center !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--premium-chip) 72%, transparent) !important;
  overflow: hidden !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-bar-track i {
  display: block !important;
  width: 68% !important;
  height: var(--count, 0%) !important;
  min-height: 3px !important;
  border-radius: 999px 999px 0 0 !important;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-green)) !important;
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent-blue) 28%, transparent) !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-bar-track b {
  position: absolute !important;
  left: 14% !important;
  right: 14% !important;
  bottom: var(--amount, 0%) !important;
  height: 3px !important;
  min-height: 3px !important;
  border-radius: 999px !important;
  background: var(--accent-amber) !important;
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent-amber) 34%, transparent) !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-bar small,
body.ui-premium-v3.hr-premium-report .hr-trend-bar strong,
body.ui-premium-v3 .trend-tile strong,
body.ui-premium-v3 .trend-tile small,
body.ui-premium-v3 .heat-cell b,
body.ui-premium-v3 .heat-cell small,
body.ui-premium-v3 .viz-total-line b,
body.ui-premium-v3 .pro-bar-label span,
body.ui-premium-v3 .cost-category-metrics,
body.ui-premium-v3 .amount-highlight,
body.ui-premium-v3 .report-list-row .ltr-text,
body.ui-premium-v3 .total-stack .ltr-text {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  font-variant-numeric: tabular-nums !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-bar small {
  color: var(--muted) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-bar strong {
  color: var(--text-strong) !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-legend {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 10px !important;
  color: var(--text-soft) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-legend span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 9px !important;
  border: 1px solid var(--premium-line) !important;
  border-radius: 999px !important;
  background: var(--premium-chip) !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-legend i {
  width: 18px !important;
  height: 4px !important;
  border-radius: 999px !important;
  display: inline-block !important;
  background: var(--accent-blue) !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-legend .amount-line { background: var(--accent-amber) !important; }

body.ui-premium-v3 .pro-bar-label {
  align-items: start !important;
}

body.ui-premium-v3 .pro-bar-label span,
body.ui-premium-v3 .cost-category-metrics {
  text-align: end !important;
}

body.ui-premium-v3.hr-premium-report .viz-control-stack {
  min-width: min(220px, 100%) !important;
}

body.ui-premium-v3.hr-premium-report .viz-sort-box {
  min-width: 138px !important;
}

body.ui-premium-v3 .matrix-heatmap-wrap,
body.ui-premium-v3 .cost-summary-table-wrap,
body.ui-premium-v3 .hr-scroll-shell,
body.ui-premium-v3 .table-wrap,
body.ui-premium-v3 .wide-table-wrap {
  max-width: 100% !important;
}

@media (max-width: 1260px) {
  body.ui-premium-v3.hr-premium-report .pro-viz-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.ui-premium-v3.hr-premium-report .hr-trend-graph-card,
  body.ui-premium-v3.hr-premium-report .pro-viz-card.wide-viz {
    grid-column: span 2 !important;
  }
}

@media (max-width: 1180px) {
  body.ui-premium-v3.hr-premium-report .donut-wrap.pro-donut-layout,
  body.ui-premium-v3.hr-premium-report .status-mix-layout {
    grid-template-columns: minmax(108px, 128px) minmax(0, 1fr) !important;
  }
}

@media (max-width: 760px) {
  body.ui-premium-v3.hr-premium-report .page-shell,
  body.ui-premium-v3.fleet-premium-report .page-shell,
  body.ui-premium-v3.page-hr-reports .page-shell {
    width: calc(100vw - 18px) !important;
  }
  body.ui-premium-v3.hr-premium-report .pro-viz-grid,
  body.ui-premium-v3.hr-premium-report .status-mix-layout,
  body.ui-premium-v3.hr-premium-report .hr-trend-summary {
    grid-template-columns: 1fr !important;
  }
  body.ui-premium-v3.hr-premium-report .hr-trend-graph-card,
  body.ui-premium-v3.hr-premium-report .pro-viz-card.wide-viz {
    grid-column: span 1 !important;
  }
  body.ui-premium-v3.hr-premium-report .hr-trend-graph {
    grid-template-columns: repeat(12, minmax(42px, 1fr)) !important;
    min-height: 176px !important;
  }
  body.ui-premium-v3.hr-premium-report .hr-trend-bar { grid-template-rows: minmax(104px, 1fr) auto auto !important; }
  body.ui-premium-v3.hr-premium-report .hr-trend-bar-track { height: 104px !important; }
}

/* ========================================================================== 
   PPCM UI v7.3: HR trend graph card + compact period list
   ========================================================================== */
body.ui-premium-v3 .hr-trend-graph-card {
  --card-accent: var(--accent-blue);
  grid-column: span 2 !important;
  min-height: 318px !important;
  overflow: visible !important;
}

body.ui-premium-v3 .hr-trend-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  justify-content: start;
  gap: 8px;
  margin-bottom: 10px;
}

body.ui-premium-v3 .hr-trend-summary span,
body.ui-premium-v3 .hr-trend-legend span {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--premium-line);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--premium-chip);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 900;
}

body.ui-premium-v3 .hr-trend-summary b {
  color: var(--text-strong);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

body.ui-premium-v3 .hr-trend-graph {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 196px;
  padding: 13px 12px 10px;
  border: 1px solid var(--premium-line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(148, 163, 184, .10) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, rgba(90, 167, 255, .055), transparent),
    var(--premium-faint);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

body.ui-premium-v3 .hr-trend-bar {
  min-width: 44px;
  display: grid;
  grid-template-rows: minmax(128px, 1fr) auto auto;
  align-items: end;
  gap: 5px;
  text-align: center;
}

body.ui-premium-v3 .hr-trend-bar-track {
  position: relative;
  height: 128px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 13px;
  background: color-mix(in srgb, var(--premium-chip) 68%, transparent);
  overflow: hidden;
}

body.ui-premium-v3 .hr-trend-bar-track i {
  display: block;
  width: min(72%, 28px);
  height: var(--count, 0%);
  min-height: 3px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-green));
  box-shadow: 0 10px 18px rgba(90, 167, 255, .24);
}

body.ui-premium-v3 .hr-trend-bar-track b {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: var(--amount, 0%);
  height: 3px;
  border-radius: 999px;
  background: var(--accent-amber);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent-amber) 32%, transparent);
}

body.ui-premium-v3 .hr-trend-bar strong,
body.ui-premium-v3 .hr-trend-bar small {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums;
}

body.ui-premium-v3 .hr-trend-bar strong {
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1;
}

body.ui-premium-v3 .hr-trend-bar small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
}

body.ui-premium-v3 .hr-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

body.ui-premium-v3 .hr-trend-legend i {
  display: inline-block;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent-blue);
}

body.ui-premium-v3 .hr-trend-legend .amount-line {
  background: var(--accent-amber);
}

body.ui-premium-v3 .compact-period-card {
  max-height: 440px;
  min-height: 0 !important;
}

body.ui-premium-v3 .compact-period-card .trend-timeline {
  max-height: 282px;
  overflow: auto;
  padding-inline-end: 4px;
  scrollbar-width: thin;
}

html[data-theme="light"] body.ui-premium-v3 .hr-trend-graph {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, .075) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, rgba(49, 94, 234, .055), transparent),
    rgba(255,255,255,.74);
  border-color: rgba(15,23,42,.12);
}

html[data-theme="light"] body.ui-premium-v3 .hr-trend-bar-track {
  background: rgba(15,23,42,.035);
  border-color: rgba(15,23,42,.10);
}

@media (max-width: 1100px) {
  body.ui-premium-v3 .hr-trend-graph-card { grid-column: span 1 !important; }
  body.ui-premium-v3 .hr-trend-summary { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body.ui-premium-v3 .hr-trend-graph { min-width: 640px; }
}

/* PPCM UI v7.2 compatibility: HR trend graph inserted into the dashboard gap. */
body.ui-premium-v3 .hr-trend-graph-card {
  --card-accent: var(--accent-blue);
  grid-column: span 2 !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body.ui-premium-v3 .hr-trend-summary,
body.ui-premium-v3 .hr-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

body.ui-premium-v3 .hr-trend-summary span,
body.ui-premium-v3 .hr-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--premium-line);
  border-radius: 999px;
  background: var(--premium-chip);
  color: var(--text-soft);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

body.ui-premium-v3 .hr-trend-summary b {
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

body.ui-premium-v3 .hr-trend-legend { margin-top: 10px; margin-bottom: 0; }
body.ui-premium-v3 .hr-trend-legend i {
  display: inline-block;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent-blue);
}
body.ui-premium-v3 .hr-trend-legend .amount-line { background: var(--accent-amber); }

body.ui-premium-v3 .hr-trend-graph {
  display: flex;
  align-items: stretch;
  gap: 9px;
  min-height: 230px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 14px 12px 10px;
  border: 1px solid var(--premium-line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(90, 167, 255, .07), transparent),
    var(--premium-faint);
  scrollbar-width: thin;
}

body.ui-premium-v3 .hr-trend-bar {
  flex: 1 0 58px;
  min-width: 58px;
  display: grid;
  grid-template-rows: minmax(140px, 1fr) auto auto;
  gap: 6px;
  align-items: end;
  text-align: center;
}

body.ui-premium-v3 .hr-trend-bar-track {
  position: relative;
  width: 100%;
  height: 148px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-inline: 4px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  background:
    linear-gradient(180deg, rgba(148, 163, 184, .10) 1px, transparent 1px) 0 0 / 100% 25%,
    rgba(148, 163, 184, .055);
}

body.ui-premium-v3 .hr-trend-bar-track i {
  display: block;
  width: min(100%, 28px);
  height: var(--count, 0%);
  min-height: 3px;
  border-radius: 999px 999px 5px 5px;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-green));
  box-shadow: 0 10px 18px rgba(90, 167, 255, .24);
}

body.ui-premium-v3 .hr-trend-bar-track b {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: var(--amount, 0%);
  height: 3px;
  min-height: 3px;
  border-radius: 999px;
  background: var(--accent-amber);
  box-shadow: 0 0 14px rgba(246, 191, 79, .30);
}

body.ui-premium-v3 .hr-trend-bar strong,
body.ui-premium-v3 .hr-trend-bar small {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums;
}

body.ui-premium-v3 .hr-trend-bar strong {
  color: var(--text-strong);
  font-size: 14px;
  line-height: 1;
}

body.ui-premium-v3 .hr-trend-bar small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
}

body.ui-premium-v3 .compact-period-card {
  min-height: 0 !important;
  max-height: 430px;
  overflow: visible !important;
}

body.ui-premium-v3 .compact-period-card .trend-timeline {
  max-height: 292px;
  overflow: auto;
  padding-inline-end: 4px;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  scrollbar-width: thin;
}

html[data-theme="light"] body.ui-premium-v3 .hr-trend-summary span,
html[data-theme="light"] body.ui-premium-v3 .hr-trend-legend span {
  background: rgba(255,255,255,.88);
  border-color: rgba(15,23,42,.12);
  color: #334155;
}

html[data-theme="light"] body.ui-premium-v3 .hr-trend-graph {
  background:
    linear-gradient(180deg, rgba(49, 94, 234, .055), transparent),
    rgba(255,255,255,.72);
  border-color: rgba(15,23,42,.12);
}

html[data-theme="light"] body.ui-premium-v3 .hr-trend-bar-track {
  background:
    linear-gradient(180deg, rgba(15,23,42,.07) 1px, transparent 1px) 0 0 / 100% 25%,
    rgba(15,23,42,.035);
  border-color: rgba(15,23,42,.10);
}

@media (max-width: 1100px) {
  body.ui-premium-v3 .hr-trend-graph-card { grid-column: span 1 !important; }
}

/* ========================================================================== 
   PPCM UI v7.3: HR trend graph target styling + final overflow guards
   ========================================================================== */
body.ui-premium-v3.hr-premium-report .status-donut .pro-donut-value,
body.ui-premium-v3.hr-premium-report .status-donut span {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  font-size: clamp(18px, 1.5vw, 22px) !important;
  line-height: 1 !important;
  letter-spacing: -.04em !important;
}
body.ui-premium-v3.hr-premium-report .status-donut small {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-graph-card {
  --card-accent: var(--accent-blue);
  min-height: 0 !important;
  overflow: visible !important;
}
body.ui-premium-v3.hr-premium-report .hr-trend-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}
body.ui-premium-v3.hr-premium-report .hr-trend-summary span,
body.ui-premium-v3.hr-premium-report .hr-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--premium-line);
  border-radius: 999px;
  background: var(--premium-chip);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 900;
}
body.ui-premium-v3.hr-premium-report .hr-trend-summary b {
  color: var(--text-strong);
  white-space: nowrap;
}
body.ui-premium-v3.hr-premium-report .hr-trend-graph {
  min-height: 270px;
  padding: 14px 12px 10px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--premium-line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-blue) 7%, transparent), transparent 58%),
    repeating-linear-gradient(180deg, transparent 0 49px, color-mix(in srgb, var(--premium-line) 55%, transparent) 50px 51px),
    var(--premium-faint);
  scrollbar-width: thin;
}
body.ui-premium-v3.hr-premium-report .hr-trend-bar {
  flex: 1 1 54px;
  min-width: 48px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  justify-items: center;
  gap: 6px;
  text-align: center;
}
body.ui-premium-v3.hr-premium-report .hr-trend-bar-track {
  width: 100%;
  height: 178px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding: 7px 5px;
  border: 1px solid rgba(148,163,184,.15);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(148,163,184,.11) 1px, transparent 1px) 0 0 / 100% 25%,
    rgba(148,163,184,.055);
}
body.ui-premium-v3.hr-premium-report .hr-trend-bar-track i,
body.ui-premium-v3.hr-premium-report .hr-trend-bar-track b {
  display: block;
  width: min(38%, 18px);
  min-height: 3px;
  border-radius: 999px 999px 5px 5px;
}
body.ui-premium-v3.hr-premium-report .hr-trend-bar-track i {
  height: var(--count);
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-cyan));
  box-shadow: 0 10px 20px color-mix(in srgb, var(--accent-blue) 22%, transparent);
}
body.ui-premium-v3.hr-premium-report .hr-trend-bar-track b {
  height: var(--amount);
  background: linear-gradient(180deg, var(--accent-green), var(--accent-teal));
  box-shadow: 0 10px 20px color-mix(in srgb, var(--accent-green) 18%, transparent);
}
body.ui-premium-v3.hr-premium-report .hr-trend-bar strong {
  color: var(--text-strong);
  font-size: 15px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
body.ui-premium-v3.hr-premium-report .hr-trend-bar small {
  max-width: 100%;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.05;
  font-weight: 900;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.ui-premium-v3.hr-premium-report .hr-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
body.ui-premium-v3.hr-premium-report .hr-trend-legend i {
  width: 18px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
}
body.ui-premium-v3.hr-premium-report .hr-trend-legend .count-line {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
}
body.ui-premium-v3.hr-premium-report .hr-trend-legend .amount-line {
  background: linear-gradient(90deg, var(--accent-green), var(--accent-teal));
}

body.ui-premium-v3.hr-premium-report .compact-period-card {
  max-height: 430px;
  overflow: auto !important;
}
body.ui-premium-v3.hr-premium-report .compact-period-card .trend-timeline {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  max-height: 310px;
  overflow: auto;
  padding-right: 2px;
}
body.ui-premium-v3.hr-premium-report .compact-period-card .trend-tile {
  min-height: 76px;
}

html[data-theme="light"] body.ui-premium-v3.hr-premium-report .hr-trend-summary span,
html[data-theme="light"] body.ui-premium-v3.hr-premium-report .hr-trend-legend span {
  background: rgba(255,255,255,.88);
  border-color: rgba(15,23,42,.12);
  color: #334155;
}
html[data-theme="light"] body.ui-premium-v3.hr-premium-report .hr-trend-graph {
  background:
    linear-gradient(180deg, rgba(49,94,234,.055), transparent 60%),
    repeating-linear-gradient(180deg, transparent 0 49px, rgba(15,23,42,.07) 50px 51px),
    rgba(255,255,255,.78);
  border-color: rgba(15,23,42,.12);
}
html[data-theme="light"] body.ui-premium-v3.hr-premium-report .hr-trend-bar-track {
  background:
    linear-gradient(180deg, rgba(15,23,42,.07) 1px, transparent 1px) 0 0 / 100% 25%,
    rgba(15,23,42,.035);
  border-color: rgba(15,23,42,.10);
}

@media (max-width: 720px) {
  body.ui-premium-v3.hr-premium-report .hr-trend-graph {
    min-width: 760px;
  }
}

/* ========================================================================== 
   PPCM UI v7.4: nested HR trend zone + final overflow guard
   ========================================================================== */
body.ui-premium-v3.hr-premium-report .page-shell,
body.ui-premium-v3.fleet-premium-report .page-shell,
body.ui-premium-v3.page-hr-reports .page-shell {
  width: calc(100vw - clamp(18px, 2vw, 38px)) !important;
  max-width: none !important;
}

body.ui-premium-v3.hr-premium-report .pro-viz-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: stretch !important;
  grid-auto-flow: row !important;
}

@media (min-width: 1700px) {
  body.ui-premium-v3.hr-premium-report .pro-viz-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

body.ui-premium-v3.hr-premium-report .pro-viz-card,
body.ui-premium-v3.hr-premium-report .panel,
body.ui-premium-v3.hr-premium-report .viz-card-head,
body.ui-premium-v3.hr-premium-report .viz-card-head > div,
body.ui-premium-v3.hr-premium-report .pro-bar-row,
body.ui-premium-v3.hr-premium-report .legend-row,
body.ui-premium-v3.hr-premium-report .trend-tile,
body.ui-premium-v3.hr-premium-report .hr-trend-zone,
body.ui-premium-v3.hr-premium-report .hr-trend-zone-main {
  min-width: 0 !important;
}

body.ui-premium-v3.hr-premium-report .pro-viz-card {
  min-height: 0 !important;
  overflow: visible !important;
}

body.ui-premium-v3.hr-premium-report .pro-viz-card.wide-viz {
  grid-column: span 2 !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-zone {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) minmax(320px, .92fr) !important;
  gap: 14px !important;
  align-items: stretch !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-zone:has(.compact-period-card[hidden]) {
  grid-template-columns: 1fr !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-zone-main {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: stretch !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-zone-main > .hr-trend-graph-card {
  grid-column: 1 / -1 !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-graph-card {
  --card-accent: var(--accent-blue) !important;
  min-height: 0 !important;
}

body.ui-premium-v3.hr-premium-report .compact-period-card {
  --card-accent: var(--accent-blue) !important;
  max-height: none !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.ui-premium-v3.hr-premium-report .compact-period-card .viz-total-line {
  grid-template-columns: 1fr !important;
}

body.ui-premium-v3.hr-premium-report .compact-period-card .trend-timeline {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)) !important;
  max-height: 575px !important;
  overflow: auto !important;
  padding-inline-end: 4px !important;
  scrollbar-width: thin !important;
}

body.ui-premium-v3.hr-premium-report .status-mix-layout,
body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .donut-wrap.pro-donut-layout {
  grid-template-columns: minmax(128px, 144px) minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: center !important;
}

body.ui-premium-v3.hr-premium-report .status-mix-card .status-donut,
body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .donut-meter.pro-donut {
  width: 128px !important;
  height: 128px !important;
  min-width: 128px !important;
  min-height: 128px !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  gap: 3px !important;
}

body.ui-premium-v3.hr-premium-report .status-mix-card .status-donut::after,
body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .donut-meter.pro-donut::after {
  inset: 17px !important;
}

body.ui-premium-v3 .premium-ring strong,
body.ui-premium-v3 .premium-ring span,
body.ui-premium-v3 .executive-donut span,
body.ui-premium-v3 .executive-donut small,
body.ui-premium-v3 .donut-meter span,
body.ui-premium-v3 .donut-meter small,
body.ui-premium-v3 .pro-donut span,
body.ui-premium-v3 .pro-donut small,
body.ui-premium-v3 .pro-donut-value {
  width: auto !important;
  max-width: none !important;
  min-width: max-content !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  font-variant-numeric: tabular-nums !important;
}

body.ui-premium-v3.hr-premium-report .status-mix-card .pro-donut-value,
body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .donut-meter span {
  font-size: clamp(18px, 1.22vw, 22px) !important;
  line-height: 1 !important;
  letter-spacing: -.04em !important;
}

body.ui-premium-v3.hr-premium-report .status-mix-card .pro-donut small,
body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .donut-meter small {
  font-size: 10px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

body.ui-premium-v3.hr-premium-report .legend-row {
  grid-template-columns: minmax(0, 1fr) max-content !important;
}

body.ui-premium-v3.hr-premium-report .legend-row strong,
body.ui-premium-v3.hr-premium-report .trend-tile strong,
body.ui-premium-v3.hr-premium-report .trend-tile small,
body.ui-premium-v3.hr-premium-report .hr-trend-bar strong,
body.ui-premium-v3.hr-premium-report .hr-trend-bar small,
body.ui-premium-v3.hr-premium-report .ltr-text {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  font-variant-numeric: tabular-nums !important;
}

body.ui-premium-v3.hr-premium-report .pro-bar-label {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  gap: 10px !important;
  align-items: start !important;
}

body.ui-premium-v3.hr-premium-report .pro-bar-label strong {
  min-width: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
}

body.ui-premium-v3.hr-premium-report .pro-bar-label span,
body.ui-premium-v3.hr-premium-report .cost-category-metrics {
  max-width: none !important;
  text-align: end !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body.ui-premium-v3.hr-premium-report .pro-bar-label span b,
body.ui-premium-v3.hr-premium-report .cost-category-metrics b {
  white-space: nowrap !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-summary {
  grid-template-columns: repeat(2, minmax(0, max-content)) !important;
  justify-content: start !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-graph {
  grid-template-columns: repeat(12, minmax(46px, 1fr)) !important;
  min-height: 220px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-bar {
  grid-template-rows: minmax(142px, 1fr) auto auto !important;
  min-width: 46px !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-bar-track {
  height: 142px !important;
}

body.ui-premium-v3.hr-premium-report .hr-trend-bar small {
  font-size: 10px !important;
}

html[data-theme="light"] body.ui-premium-v3.hr-premium-report .hr-trend-zone .panel,
html[data-theme="light"] body.ui-premium-v3.hr-premium-report .hr-trend-graph,
html[data-theme="light"] body.ui-premium-v3.hr-premium-report .compact-period-card .trend-tile {
  border-color: rgba(15, 23, 42, .12) !important;
}

@media (max-width: 1260px) {
  body.ui-premium-v3.hr-premium-report .pro-viz-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.ui-premium-v3.hr-premium-report .pro-viz-card.wide-viz,
  body.ui-premium-v3.hr-premium-report .hr-trend-zone {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 980px) {
  body.ui-premium-v3.hr-premium-report .hr-trend-zone,
  body.ui-premium-v3.hr-premium-report .hr-trend-zone-main,
  body.ui-premium-v3.hr-premium-report .hr-trend-summary {
    grid-template-columns: 1fr !important;
  }
  body.ui-premium-v3.hr-premium-report .hr-trend-zone-main > .hr-trend-graph-card {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 720px) {
  body.ui-premium-v3.hr-premium-report .pro-viz-grid,
  body.ui-premium-v3.hr-premium-report .status-mix-layout,
  body.ui-premium-v3.hr-premium-report [data-viz="status_mix"] .donut-wrap.pro-donut-layout {
    grid-template-columns: 1fr !important;
  }
  body.ui-premium-v3.hr-premium-report .status-mix-card .status-donut {
    margin-inline: auto !important;
  }
  body.ui-premium-v3.hr-premium-report .hr-trend-graph {
    min-width: 680px !important;
  }
  body.ui-premium-v3.hr-premium-report .compact-period-card .trend-timeline {
    max-height: 430px !important;
  }
}

/* PPCM UI v7.4.1: visual toggle safety - hidden widgets must stay hidden even when card display is forced. */
body.ui-premium-v3.hr-premium-report .pro-viz-card[hidden],
body.ui-premium-v3.hr-premium-report [data-viz][hidden],
body.ui-premium-v3.fleet-premium-report .pro-viz-card[hidden],
body.ui-premium-v3.fleet-premium-report [data-viz][hidden] {
  display: none !important;
}

/* Keep widget toggles reliable even when card-specific display rules are stronger. */
body.ui-premium-v3 [hidden],
body.ui-premium-v3.hr-premium-report [hidden] {
  display: none !important;
}

/* PPCM UI v7.4.2: use the full report width for table-heavy sections. */
body.ui-premium-v3.hr-premium-report [data-viz="matrix_heatmap"],
body.ui-premium-v3.hr-premium-report [data-viz="cost_kpi_pack"] {
  grid-column: 1 / -1 !important;
}

body.ui-premium-v3.hr-premium-report .pro-viz-card.wide-viz[data-viz="matrix_heatmap"],
body.ui-premium-v3.hr-premium-report .pro-viz-card.wide-viz[data-viz="cost_kpi_pack"] {
  grid-column: 1 / -1 !important;
}

/* ========================================================================== 
   Business Development executive dashboard/report integration
   ========================================================================== */
body.ui-premium-v3 .exec-v5-business {
  --module-accent: var(--accent-purple);
  --module-soft: var(--purple-soft);
}
body.ui-premium-v3 .exec-v5-prime.tone-business {
  border-color: color-mix(in srgb, var(--accent-purple) 38%, var(--premium-line));
  background: color-mix(in srgb, var(--accent-purple) 8%, transparent);
}
html[data-theme="light"] body.ui-premium-v3 .exec-v5-prime.tone-business {
  background: color-mix(in srgb, var(--accent-purple) 7%, #fff);
}
body.ui-premium-v3 .exec-v5-donut.tone-business { --ring-color: var(--accent-purple); }

.business-executive-report-page .business-registration-tabs,
.business-executive-report-page .business-executive-report-panel {
  max-width: none;
}
.business-executive-report-panel { --card-accent: var(--accent-purple); }
.business-executive-kpis .business-inline-kpi strong {
  font-variant-numeric: tabular-nums;
}
.bd-executive-snapshot-grid {
  display: grid;
  grid-template-columns: minmax(300px, .95fr) minmax(360px, 1.15fr) minmax(300px, .9fr);
  gap: 10px;
  align-items: stretch;
}
.bd-executive-snapshot-grid .business-inline-card {
  min-width: 0;
}
.bd-executive-rings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.bd-executive-ring {
  --ring-color: var(--accent-purple);
  --score: 0%;
  min-height: 152px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  background:
    radial-gradient(circle at center, var(--surface-0) 0 48%, transparent 50%),
    conic-gradient(var(--ring-color) var(--score), var(--premium-track) 0);
  text-align: center;
}
html[data-theme="light"] .bd-executive-ring {
  background:
    radial-gradient(circle at center, #fff 0 48%, transparent 50%),
    conic-gradient(var(--ring-color) var(--score), var(--premium-track) 0);
}
.bd-executive-ring.warning { --ring-color: var(--warning-accent); }
.bd-executive-ring strong {
  color: var(--text-strong);
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}
.bd-executive-ring span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
}
.bd-health-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--line-soft);
  border-radius: 14px;
  color: var(--text-soft);
  font-weight: 900;
}
.bd-health-line strong {
  color: var(--text-strong);
  font-size: 22px;
}
.bd-entity-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.bd-entity-card {
  min-width: 0;
  min-height: 154px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  color: inherit;
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.bd-entity-card:hover {
  transform: translateY(-1px);
  border-color: rgba(167,139,250,.38);
  background: rgba(167,139,250,.09);
}
.bd-entity-card strong {
  color: var(--text-strong);
  font-size: 14px;
}
.bd-entity-card b {
  color: var(--text-strong);
  font-size: 32px;
  line-height: 1;
  font-weight: 950;
}
.bd-entity-card small {
  color: var(--muted);
  line-height: 1.35;
}
.bd-report-matrix.business-control-matrix.improved .business-chip-matrix span,
.bd-report-matrix.business-control-matrix.improved .business-inline-chip-row.compact span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(255,255,255,.035);
  color: var(--text-soft);
  font-size: 12px;
}
.bd-report-matrix.business-control-matrix.improved .business-inline-chip-row.compact span {
  padding: 4px 7px;
  font-size: 11px;
}
.bd-report-matrix.business-control-matrix.improved .business-chip-matrix span b,
.bd-report-matrix.business-control-matrix.improved .business-inline-chip-row.compact span b {
  color: var(--text-strong);
}
@media (max-width: 1280px) {
  .bd-executive-snapshot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .bd-executive-rings,
  .bd-entity-card-grid { grid-template-columns: 1fr; }
  .bd-executive-ring { min-height: 130px; }
}
/* ========================================================================== 
   PPCM UI v10: definitive Arabic RTL executive dashboard fit
   Final override: prevents viewport clipping and keeps the 3 executive modules compact in Arabic.
   ========================================================================== */
body.ui-premium-v3.executive-v5-body .page-shell {
  width: 100% !important;
  max-width: none !important;
  padding-inline: clamp(10px, 1vw, 18px) !important;
  overflow-x: clip;
}

body.ui-premium-v3.executive-v5-body .exec-v5-grid {
  width: 100%;
  max-width: 100%;
  gap: clamp(10px, .85vw, 14px) !important;
}

body.ui-premium-v3.executive-v5-body .exec-v5-module,
body.ui-premium-v3.executive-v5-body .exec-v5-module * {
  box-sizing: border-box;
}

body.ui-premium-v3.executive-v5-body .exec-v5-module,
body.ui-premium-v3.executive-v5-body .exec-v5-module-head,
body.ui-premium-v3.executive-v5-body .exec-v5-title,
body.ui-premium-v3.executive-v5-body .exec-v5-title > div,
body.ui-premium-v3.executive-v5-body .exec-v5-primary-strip,
body.ui-premium-v3.executive-v5-body .exec-v5-visual-row,
body.ui-premium-v3.executive-v5-body .exec-v5-ring-pair,
body.ui-premium-v3.executive-v5-body .exec-v5-mini-grid,
body.ui-premium-v3.executive-v5-body .exec-v5-insights,
body.ui-premium-v3.executive-v5-body .exec-v5-primary-strip > *,
body.ui-premium-v3.executive-v5-body .exec-v5-visual-row > *,
body.ui-premium-v3.executive-v5-body .exec-v5-ring-pair > *,
body.ui-premium-v3.executive-v5-body .exec-v5-mini-grid > *,
body.ui-premium-v3.executive-v5-body .exec-v5-insights > * {
  min-width: 0 !important;
  max-width: 100%;
}

body.ui-premium-v3.executive-v5-body .exec-v5-module-head {
  grid-template-columns: minmax(0, 1fr) minmax(118px, 198px) !important;
  gap: 10px !important;
  align-items: start;
}

body.ui-premium-v3.executive-v5-body .exec-v5-title h2,
body.ui-premium-v3.executive-v5-body .exec-v5-title p,
body.ui-premium-v3.executive-v5-body .exec-v5-action,
body.ui-premium-v3.executive-v5-body .exec-v5-prime span,
body.ui-premium-v3.executive-v5-body .exec-v5-prime small,
body.ui-premium-v3.executive-v5-body .exec-v5-mini span,
body.ui-premium-v3.executive-v5-body .exec-v5-mini small,
body.ui-premium-v3.executive-v5-body .exec-v5-ring-card span,
body.ui-premium-v3.executive-v5-body .exec-v5-insight span,
body.ui-premium-v3.executive-v5-body .exec-v5-insight small,
body.ui-premium-v3.executive-v5-body .exec-v5-insight strong:not(.ltr-text) {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

body.ui-premium-v3.executive-v5-body .exec-v5-action {
  min-width: 0 !important;
  width: 100%;
  max-width: 198px;
  line-height: 1.15;
  text-align: center;
  padding: 8px 10px;
}

body.ui-premium-v3.executive-v5-body .exec-v5-primary-strip,
body.ui-premium-v3.executive-v5-body .exec-v5-mini-grid,
body.ui-premium-v3.executive-v5-body .exec-v5-insights,
body.ui-premium-v3.executive-v5-body .exec-v5-ring-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.ui-premium-v3.executive-v5-body .exec-v5-visual-row {
  grid-template-columns: minmax(150px, 184px) minmax(0, 1fr) !important;
  gap: 10px !important;
  overflow: visible !important;
}

body.ui-premium-v3.executive-v5-body .exec-v5-prime,
body.ui-premium-v3.executive-v5-body .exec-v5-mini,
body.ui-premium-v3.executive-v5-body .exec-v5-ring-card,
body.ui-premium-v3.executive-v5-body .exec-v5-insight {
  overflow: hidden !important;
}

body.ui-premium-v3.executive-v5-body .exec-v5-prime {
  min-height: 88px;
  padding: 12px 12px;
}

body.ui-premium-v3.executive-v5-body .exec-v5-mini {
  min-height: 112px;
  padding: 12px;
}

body.ui-premium-v3.executive-v5-body .exec-v5-prime strong,
body.ui-premium-v3.executive-v5-body .exec-v5-mini strong,
body.ui-premium-v3.executive-v5-body .exec-v5-insight strong,
body.ui-premium-v3.executive-v5-body .exec-v5-cost-pair {
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}

body.ui-premium-v3.executive-v5-body .exec-v5-prime strong,
body.ui-premium-v3.executive-v5-body .exec-v5-mini strong {
  font-size: clamp(20px, 1.28vw, 27px) !important;
  line-height: 1.03 !important;
  letter-spacing: -.026em !important;
  white-space: nowrap !important;
}

body.ui-premium-v3.executive-v5-body .exec-v5-prime.cost strong,
body.ui-premium-v3.executive-v5-body .exec-v5-cost-pair {
  font-size: clamp(17px, 1.08vw, 23px) !important;
  letter-spacing: -.018em !important;
  white-space: nowrap !important;
}

body.ui-premium-v3.executive-v5-body .exec-v5-insight strong:not(.ltr-text) {
  font-size: clamp(14px, .95vw, 18px) !important;
  line-height: 1.12 !important;
}

body.ui-premium-v3.executive-v5-body .exec-v5-ring-card {
  min-height: 118px;
  padding: 9px 6px;
  gap: 6px;
}

body.ui-premium-v3.executive-v5-body .exec-v5-donut {
  width: 72px !important;
  height: 72px !important;
}

body.ui-premium-v3.executive-v5-body .exec-v5-donut strong {
  max-width: 60px !important;
  font-size: 14px !important;
  text-align: center !important;
  overflow: visible !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body {
  overflow-x: hidden;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-module {
  text-align: right;
  padding-inline: clamp(14px, .9vw, 17px) !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-title h2,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-title .eyebrow,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-prime span,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-prime small,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-mini span,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-mini small,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-ring-card span,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-insight span,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-insight small {
  letter-spacing: 0 !important;
  text-transform: none !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-title h2 {
  font-size: clamp(21px, 1.3vw, 27px) !important;
  line-height: 1.12 !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-title .eyebrow {
  line-height: 1.2 !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-prime > .ltr-text,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-mini > .ltr-text,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-insight > .ltr-text,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-insight .ltr-text,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-cost-pair {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  text-align: right !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-donut .ltr-text {
  text-align: center !important;
}

@media (min-width: 1720px) {
  body.ui-premium-v3.executive-v5-body .exec-v5-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1181px) and (max-width: 1719px) {
  body.ui-premium-v3.executive-v5-body .exec-v5-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1180px) {
  body.ui-premium-v3.executive-v5-body .exec-v5-grid,
  body.ui-premium-v3.executive-v5-body .exec-v5-visual-row {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  body.ui-premium-v3.executive-v5-body .exec-v5-module-head,
  body.ui-premium-v3.executive-v5-body .exec-v5-primary-strip,
  body.ui-premium-v3.executive-v5-body .exec-v5-mini-grid,
  body.ui-premium-v3.executive-v5-body .exec-v5-insights,
  body.ui-premium-v3.executive-v5-body .exec-v5-ring-pair {
    grid-template-columns: 1fr !important;
  }

  body.ui-premium-v3.executive-v5-body .exec-v5-action {
    max-width: none;
  }
}

/* ========================================================================== 
   PPCM UI v10.1: RTL Executive Dashboard Arabic text final clamp
   ========================================================================== */
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-visual-row {
  grid-template-columns: minmax(214px, 232px) minmax(0, 1fr) !important;
  gap: 8px !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-ring-card {
  min-height: 132px !important;
  padding: 10px 6px !important;
  gap: 6px !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-donut {
  width: 74px !important;
  height: 74px !important;
  flex: 0 0 auto;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-title h2,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-prime span,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-prime small,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-mini span,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-mini small,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-insight span,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-insight small {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-ring-card span {
  display: -webkit-box !important;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  line-height: 1.07 !important;
  font-size: 11px !important;
  text-align: center !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-insight strong:not(.ltr-text) {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
  white-space: normal !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-prime strong,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-mini strong,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-insight strong.ltr-text,
html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-cost-pair {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-prime {
  min-height: 88px !important;
  padding: 11px 12px !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-mini {
  min-height: 118px !important;
  padding: 12px !important;
}

html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-insight {
  min-height: 104px !important;
  padding: 11px 12px !important;
}

@media (max-width: 1180px) {
  html[dir="rtl"] body.ui-premium-v3.executive-v5-body .exec-v5-visual-row {
    grid-template-columns: 1fr !important;
  }
}

/* Business Development Tender Tracker */
.page-business-tenders .page-shell { width: min(1680px, calc(100vw - 28px)); }
.tender-page-head h1 { overflow-wrap: anywhere; }
.tender-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.tender-detail-stat-grid { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
.tender-stat-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  padding: 16px;
  min-height: 118px;
  display: grid;
  gap: 6px;
  align-content: start;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.tender-stat-card span { color: var(--text-soft); font-size: 12px; font-weight: 900; overflow-wrap: anywhere; }
.tender-stat-card strong { font-size: clamp(24px, 2.4vw, 36px); line-height: 1.05; color: var(--text-strong); overflow-wrap: anywhere; }
.tender-stat-card small { color: var(--muted); font-weight: 800; overflow-wrap: anywhere; }
.tender-stat-card.success { border-color: rgba(73,220,136,.32); background: linear-gradient(135deg, rgba(73,220,136,.12), rgba(255,255,255,.025)); }
.tender-stat-card.warning { border-color: rgba(246,191,79,.36); background: linear-gradient(135deg, rgba(246,191,79,.13), rgba(255,255,255,.025)); }
.tender-stat-card.danger { border-color: rgba(255,107,120,.36); background: linear-gradient(135deg, rgba(255,107,120,.13), rgba(255,255,255,.025)); }
.tender-command-panel,
.tender-filter-panel,
.tender-list-panel,
.tender-detail-panel,
.tender-notes-panel,
.tender-recent-panel { --card-accent: var(--accent-purple); }
.tender-command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tender-command-card { min-height: 82px; }
.tender-recent-list { display: grid; gap: 10px; }
.tender-recent-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1.4fr) minmax(170px, .8fr) minmax(190px, .8fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.035);
  padding: 12px;
  text-decoration: none;
  color: inherit;
}
.tender-recent-row:hover { border-color: rgba(167,139,250,.44); background: rgba(167,139,250,.08); }
.tender-recent-main,
.tender-recent-deadline,
.tender-recent-status { display: grid; gap: 4px; min-width: 0; }
.tender-recent-main strong { overflow-wrap: anywhere; }
.tender-recent-main small,
.tender-recent-deadline small { color: var(--muted); overflow-wrap: anywhere; }
.tender-recent-status { justify-items: start; }
html[dir="rtl"] .tender-recent-status { justify-items: end; }
.tender-filter-grid { grid-template-columns: 1.5fr repeat(4, minmax(150px, 1fr)) auto; align-items: end; }
.tender-filter-grid label { display: grid; gap: 6px; }
.tender-filter-grid label span { color: var(--text-soft); font-size: 12px; font-weight: 900; }
.tender-filter-grid .filter-actions { display: flex; gap: 8px; align-items: center; }
.tender-scroll { overflow-x: auto; padding-bottom: 6px; }
.tender-table {
  min-width: 1460px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.tender-table th,
.tender-table td { vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.tender-table [data-col="tender_id"] { width: 88px; min-width: 88px; }
.tender-table [data-col="tender_name"] { width: 240px; min-width: 240px; }
.tender-table [data-col="client"] { width: 180px; min-width: 180px; }
.tender-table [data-col="country"],
.tender-table [data-col="city"] { width: 120px; min-width: 120px; }
.tender-table [data-col="deadline"] { width: 155px; min-width: 155px; }
.tender-table [data-col="deadline_status"],
.tender-table [data-col="submission_status"],
.tender-table [data-col="tender_status"] { width: 130px; min-width: 130px; }
.tender-table [data-col="time_left"] { width: 120px; min-width: 120px; }
.tender-table [data-col="submission_date"] { width: 125px; min-width: 125px; }
.tender-table [data-col="active"] { width: 90px; min-width: 90px; }
.tender-table [data-col="actions"] { width: 135px; min-width: 135px; }
.tender-table .table-actions { display: grid; gap: 6px; align-items: start; }
.tender-form .submitted-only-field[hidden] { display: none !important; }
.tender-detail-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tender-text-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tender-text-grid article {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255,255,255,.035);
  min-height: 130px;
}
.tender-text-grid span { display: block; color: var(--text-soft); font-size: 12px; font-weight: 900; margin-bottom: 8px; }
.tender-text-grid p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-strong); }
.badge-not-submitted,
.badge-no-deadline { color: #c3d1e2; background: rgba(148,163,184,.13); border-color: rgba(148,163,184,.25); }
.badge-under-evaluation,
.badge-due-soon,
.badge-due-today,
.badge-on-track { color: #fff3d1; background: var(--amber-soft); border-color: rgba(246,191,79,.36); }
.badge-awarded { color: #dfffea; background: var(--green-soft); border-color: rgba(73,220,136,.32); }
.badge-not-awarded,
.badge-overdue { color: #ffdce1; background: var(--red-soft); border-color: rgba(255,107,120,.32); }
.badge-cancelled,
.badge-withdrawn { color: #c3d1e2; background: rgba(148,163,184,.13); border-color: rgba(148,163,184,.25); }
body.ui-premium-v3 .badge-not-submitted,
body.ui-premium-v3 .badge-no-deadline,
body.ui-premium-v3 .badge-cancelled,
body.ui-premium-v3 .badge-withdrawn { color: var(--text-soft); background: var(--premium-chip); }
body.ui-premium-v3 .badge-under-evaluation,
body.ui-premium-v3 .badge-due-soon,
body.ui-premium-v3 .badge-due-today,
body.ui-premium-v3 .badge-on-track { color: #4a2500; background: #fde6b7; border-color: #f59e0b; }
body.ui-premium-v3 .badge-awarded { color: #063b22; background: #bdf6d5; border-color: #68d89c; }
body.ui-premium-v3 .badge-not-awarded,
body.ui-premium-v3 .badge-overdue { color: #fff; background: #c8243a; border-color: #f87171; }
html[dir="rtl"] .page-business-tenders .tender-table th,
html[dir="rtl"] .page-business-tenders .tender-table td { text-align: right; }
html[dir="rtl"] .page-business-tenders .ltr-text { direction: ltr; unicode-bidi: isolate; text-align: inherit; }
html[dir="rtl"] .page-business-tenders .tender-recent-row { grid-template-columns: 72px minmax(0, 1.4fr) minmax(170px, .8fr) minmax(190px, .8fr); }
@media (max-width: 1200px) {
  .tender-stats-grid,
  .tender-detail-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tender-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tender-recent-row { grid-template-columns: 60px minmax(0, 1fr); }
  .tender-recent-deadline,
  .tender-recent-status { grid-column: 2; }
  .tender-detail-grid,
  .tender-text-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .tender-stats-grid,
  .tender-detail-stat-grid,
  .tender-command-grid,
  .tender-filter-grid { grid-template-columns: 1fr; }
  .tender-recent-row { grid-template-columns: 1fr; }
  .tender-recent-deadline,
  .tender-recent-status { grid-column: auto; }
}

/* ========================================================================== 
   Business Development Tender Register - simplified New Tender / Tender List
   ========================================================================== */
.page-tender-register .page-shell { width: min(1680px, calc(100vw - 28px)); }
.page-tender-register .tender-page-head { --card-accent: var(--accent-purple); }
.page-tender-register .tender-command-panel,
.page-tender-register .tender-list-panel,
.page-tender-register .tender-detail-panel,
.page-tender-register .tender-form-panel,
.page-tender-register .tender-next-panel { --card-accent: var(--accent-purple); }
.page-tender-register .compact-metric-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.page-tender-register .tender-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-tender-register .tender-action-card { min-height: 88px; }
.page-tender-register .tender-next-grid,
.page-tender-register .tender-detail-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.page-tender-register .tender-note-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page-tender-register .tender-filter-grid { grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(145px, 1fr)) auto; align-items: end; }
.page-tender-register .tender-filter-grid label { display: grid; gap: 6px; min-width: 0; }
.page-tender-register .tender-filter-grid label span { color: var(--text-soft); font-size: 12px; font-weight: 900; }
.page-tender-register .tender-filter-grid .filter-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-tender-register .tender-table-scroll { overflow-x: auto; padding-bottom: 6px; }
.page-tender-register .tender-register-table { min-width: 1280px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.page-tender-register .tender-register-table th,
.page-tender-register .tender-register-table td { vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.page-tender-register .tender-register-table th:nth-child(1),
.page-tender-register .tender-register-table td:nth-child(1) { width: 90px; }
.page-tender-register .tender-register-table th:nth-child(2),
.page-tender-register .tender-register-table td:nth-child(2) { width: 210px; }
.page-tender-register .tender-register-table th:nth-child(7),
.page-tender-register .tender-register-table td:nth-child(7),
.page-tender-register .tender-register-table th:nth-child(8),
.page-tender-register .tender-register-table td:nth-child(8),
.page-tender-register .tender-register-table th:nth-child(9),
.page-tender-register .tender-register-table td:nth-child(9) { width: 140px; }
.page-tender-register .tender-register-table th:nth-child(11),
.page-tender-register .tender-register-table td:nth-child(11) { width: 128px; }
.page-tender-register .tender-register-table td small { display: block; margin-top: 4px; color: var(--muted); font-weight: 800; overflow-wrap: anywhere; }
.page-tender-register .tender-name-cell { display: block; font-weight: 900; color: var(--text-strong); }
.page-tender-register .tender-register-table .table-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; white-space: nowrap; }
.page-tender-register .tender-form-section { margin-bottom: 18px; }
.page-tender-register .compact-form-grid .span-3 { grid-column: span 3; }
.page-tender-register .form-info-note { border: 1px dashed var(--line-soft); border-radius: var(--radius-md); padding: 12px 14px; color: var(--text-soft); font-weight: 850; background: rgba(255,255,255,.035); margin: 8px 0 16px; }
.page-tender-register .field-hint { display: block; margin-top: 6px; color: var(--muted); font-weight: 800; }
.page-tender-register .is-hidden { display: none !important; }
.page-tender-register .empty-state-text { margin: 0; color: var(--muted); font-weight: 850; }
.page-tender-register .empty-table-cell { text-align: center; padding: 28px; color: var(--muted); font-weight: 850; }
.badge-ready-for-submission { color: #fff3d1; background: var(--amber-soft); border-color: rgba(246,191,79,.36); }
.badge-in-progress { color: #dbeafe; background: rgba(59,130,246,.16); border-color: rgba(59,130,246,.32); }
.badge-on-hold { color: #ede9fe; background: rgba(167,139,250,.16); border-color: rgba(167,139,250,.32); }
.badge-no-bid { color: #c3d1e2; background: rgba(148,163,184,.13); border-color: rgba(148,163,184,.25); }
.badge-deadline.badge-overdue,
.badge-overdue { color: #ffdce1; background: var(--red-soft); border-color: rgba(255,107,120,.32); }
.badge-deadline.badge-due-today,
.badge-deadline.badge-due-7,
.badge-deadline.badge-due-30,
.badge-due-7,
.badge-due-30 { color: #fff3d1; background: var(--amber-soft); border-color: rgba(246,191,79,.36); }
.badge-deadline.badge-future,
.badge-future-deadline { color: #dbeafe; background: rgba(59,130,246,.16); border-color: rgba(59,130,246,.32); }
.badge-deadline.badge-submitted,
.badge-submitted,
.badge-submitted-tender { color: #dfffea; background: var(--green-soft); border-color: rgba(73,220,136,.32); }
body.ui-premium-v3 .badge-in-progress,
body.ui-premium-v3 .badge-ready-for-submission,
body.ui-premium-v3 .badge-on-hold,
body.ui-premium-v3 .badge-no-bid,
body.ui-premium-v3 .badge-future-deadline { background: var(--premium-chip); color: var(--text-soft); }
html[dir="rtl"] .page-tender-register .tender-register-table th,
html[dir="rtl"] .page-tender-register .tender-register-table td { text-align: right; }
html[dir="rtl"] .page-tender-register .ltr-text,
html[dir="rtl"] .page-tender-register .ltr-field { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .page-tender-register .tender-filter-grid .filter-actions,
html[dir="rtl"] .page-tender-register .tender-register-table .table-actions { justify-content: flex-end; }
@media (max-width: 1200px) {
  .page-tender-register .compact-metric-grid,
  .page-tender-register .tender-next-grid,
  .page-tender-register .tender-detail-grid,
  .page-tender-register .tender-note-grid,
  .page-tender-register .tender-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-tender-register .compact-form-grid .span-3 { grid-column: span 2; }
}
@media (max-width: 720px) {
  .page-tender-register .compact-metric-grid,
  .page-tender-register .tender-action-grid,
  .page-tender-register .tender-next-grid,
  .page-tender-register .tender-detail-grid,
  .page-tender-register .tender-note-grid,
  .page-tender-register .tender-filter-grid { grid-template-columns: 1fr; }
  .page-tender-register .compact-form-grid .span-3 { grid-column: auto; }
}

/* Tender Register final table/detail tuning */
.page-tender-register .tender-table [data-col="issuer_name"] { width: 180px; min-width: 180px; }
.page-tender-register .tender-table [data-col="location"] { width: 150px; min-width: 150px; }
.page-tender-register .tender-table [data-col="submission_deadline"] { width: 130px; min-width: 130px; }
.page-tender-register .tender-table [data-col="submission_deadline_time"] { width: 120px; min-width: 120px; }
.page-tender-register .tender-table [data-col="deadline_status"] { width: 165px; min-width: 165px; }
.page-tender-register .tender-table [data-col="submission_status"] { width: 145px; min-width: 145px; }
.page-tender-register .tender-table [data-col="tender_status"] { width: 155px; min-width: 155px; }
.page-tender-register .tender-table [data-col="submission_date"] { width: 125px; min-width: 125px; }
.page-tender-register .tender-table .deadline-subtext { display: block; margin-top: 4px; color: var(--muted); font-weight: 800; }
.page-tender-register .pagination-row { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding-top: 14px; flex-wrap: wrap; }
html[dir="rtl"] .page-tender-register .pagination-row { justify-content: flex-start; }
.badge-due-in-7-days,
.badge-due-in-30-days,
.badge-due-today { color: #fff3d1; background: var(--amber-soft); border-color: rgba(246,191,79,.36); }
.badge-future-deadlines { color: #dbeafe; background: rgba(59,130,246,.16); border-color: rgba(59,130,246,.32); }

/* Executive dashboard tender capsule + 4-module layout */
body.ui-premium-v3.executive-v5-body .exec-v5-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.ui-premium-v3 .exec-v5-tender {
  --module-accent: var(--warning-accent);
  --module-soft: var(--amber-soft);
}
body.ui-premium-v3 .exec-v5-prime.tone-tender {
  border-color: color-mix(in srgb, var(--warning-accent) 42%, var(--premium-line));
  background: color-mix(in srgb, var(--warning-accent) 9%, transparent);
}
html[data-theme="light"] body.ui-premium-v3 .exec-v5-prime.tone-tender {
  background: color-mix(in srgb, var(--warning-accent) 8%, #fff);
}
body.ui-premium-v3 .exec-v5-donut.tone-tender { --ring-color: var(--warning-accent); }

/* Executive dashboard Cost Control portfolio capsule */
body.ui-premium-v3 .exec-v5-cost {
  --module-accent: var(--accent-teal);
  --module-soft: var(--teal-soft);
}
body.ui-premium-v3 .exec-v5-wide { grid-column: 1 / -1; }
body.ui-premium-v3 .exec-v5-prime.tone-cost {
  border-color: color-mix(in srgb, var(--accent-teal) 42%, var(--premium-line));
  background: color-mix(in srgb, var(--accent-teal) 9%, transparent);
}
html[data-theme="light"] body.ui-premium-v3 .exec-v5-prime.tone-cost {
  background: color-mix(in srgb, var(--accent-teal) 7%, #fff);
}
body.ui-premium-v3 .exec-v5-donut.tone-cost { --ring-color: var(--accent-teal); }
body.ui-premium-v3 .exec-v5-cost-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.ui-premium-v3 .exec-v5-cost-visual {
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: stretch;
}
body.ui-premium-v3 .exec-cost-overall-panel,
body.ui-premium-v3 .exec-cost-project-card,
body.ui-premium-v3 .exec-cost-empty {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--premium-line) 82%, var(--module-accent) 18%);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-0) 72%, transparent);
}
html[data-theme="light"] body.ui-premium-v3 .exec-cost-overall-panel,
html[data-theme="light"] body.ui-premium-v3 .exec-cost-project-card,
html[data-theme="light"] body.ui-premium-v3 .exec-cost-empty {
  background: rgba(248,250,252,.76);
  border-color: color-mix(in srgb, rgba(15,23,42,.12) 82%, var(--module-accent) 18%);
}
body.ui-premium-v3 .exec-cost-overall-panel {
  min-height: 134px;
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 12px;
}
body.ui-premium-v3 .exec-cost-overall-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
body.ui-premium-v3 .exec-cost-overall-head span,
body.ui-premium-v3 .exec-cost-project-metrics span,
body.ui-premium-v3 .exec-cost-driver span {
  display: block;
  color: var(--muted);
  font-weight: 900;
  line-height: 1.15;
}
body.ui-premium-v3 .exec-cost-overall-head strong {
  display: block;
  max-width: 100%;
  margin-top: 6px;
  color: var(--text-strong);
  font-size: clamp(18px, 1.65vw, 26px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ui-premium-v3 .exec-cost-overall-head small {
  color: var(--text-soft);
  font-weight: 950;
  white-space: nowrap;
}
body.ui-premium-v3 .exec-cost-stack {
  position: relative;
  display: flex;
  width: 100%;
  height: 28px;
  overflow: visible;
  border-radius: 999px;
  background: var(--premium-track);
  border: 1px solid color-mix(in srgb, var(--premium-line) 84%, var(--module-accent) 16%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
body.ui-premium-v3 .exec-cost-stack.compact { height: 16px; margin-top: 11px; }
body.ui-premium-v3 .exec-cost-stack i {
  display: block;
  min-width: 0;
  height: 100%;
}
body.ui-premium-v3 .exec-cost-stack i:first-child { border-radius: 999px 0 0 999px; }
body.ui-premium-v3 .exec-cost-stack i.actual {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
}
body.ui-premium-v3 .exec-cost-stack i.ctc {
  background: repeating-linear-gradient(135deg, var(--accent-amber) 0 9px, color-mix(in srgb, var(--accent-amber) 62%, #fff) 9px 18px);
}
body.ui-premium-v3 .exec-cost-stack .budget-marker {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  transform: translateX(-1px);
  border-radius: 999px;
  background: var(--accent-green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-green) 16%, transparent);
}
body.ui-premium-v3 .exec-cost-stack.compact .budget-marker { top: -4px; bottom: -4px; }
body.ui-premium-v3 .exec-cost-overall-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
body.ui-premium-v3 .exec-cost-overall-meta span {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 12px;
  border: 1px solid var(--premium-line);
  background: var(--premium-chip);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ui-premium-v3 .exec-cost-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
  gap: 10px;
  margin-top: 14px;
}
body.ui-premium-v3 .exec-cost-project-card {
  position: relative;
  overflow: hidden;
  padding: 13px;
  display: grid;
  gap: 10px;
}
body.ui-premium-v3 .exec-cost-project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent-teal);
}
body.ui-premium-v3 .exec-cost-project-card.risk-overrun {
  border-color: color-mix(in srgb, var(--risk-accent) 45%, var(--premium-line));
  background: color-mix(in srgb, var(--risk-accent) 8%, transparent);
}
body.ui-premium-v3 .exec-cost-project-card.risk-overrun::before { background: var(--risk-accent); }
body.ui-premium-v3 .exec-cost-project-card.risk-watch::before { background: var(--accent-amber); }
body.ui-premium-v3 .exec-cost-project-card.risk-ok::before { background: var(--accent-green); }
body.ui-premium-v3 .exec-cost-project-head,
body.ui-premium-v3 .exec-cost-project-title,
body.ui-premium-v3 .exec-cost-project-meta,
body.ui-premium-v3 .exec-cost-project-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
body.ui-premium-v3 .exec-cost-project-head { justify-content: space-between; padding-top: 2px; }
body.ui-premium-v3 .exec-cost-project-title { flex: 1 1 auto; }
body.ui-premium-v3 .exec-cost-project-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  max-width: 62px;
  height: 34px;
  padding: 0 8px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--module-accent) 17%, transparent);
  border: 1px solid color-mix(in srgb, var(--module-accent) 34%, var(--premium-line));
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.ui-premium-v3 .exec-cost-project-title strong {
  display: block;
  max-width: 100%;
  color: var(--text-strong);
  font-size: 15px;
  line-height: 1.12;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.ui-premium-v3 .exec-cost-project-title small {
  display: block;
  max-width: 100%;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.ui-premium-v3 .exec-cost-project-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--module-accent) 34%, var(--premium-line));
  background: color-mix(in srgb, var(--module-accent) 12%, transparent);
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 950;
}
body.ui-premium-v3 .exec-cost-project-link.disabled {
  opacity: .55;
  pointer-events: none;
}
body.ui-premium-v3 .exec-cost-project-meta,
body.ui-premium-v3 .exec-cost-project-foot {
  flex-wrap: wrap;
}
body.ui-premium-v3 .exec-cost-project-meta span,
body.ui-premium-v3 .exec-cost-project-foot span,
body.ui-premium-v3 .exec-cost-risk {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--premium-line);
  background: var(--premium-chip);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ui-premium-v3 .exec-cost-risk.risk-overrun { color: #ffdce1; border-color: color-mix(in srgb, var(--risk-accent) 42%, var(--premium-line)); background: color-mix(in srgb, var(--risk-accent) 16%, transparent); }
body.ui-premium-v3 .exec-cost-risk.risk-watch { color: #fff3d1; border-color: color-mix(in srgb, var(--accent-amber) 42%, var(--premium-line)); background: color-mix(in srgb, var(--accent-amber) 16%, transparent); }
body.ui-premium-v3 .exec-cost-risk.risk-ok { color: #dfffea; border-color: color-mix(in srgb, var(--accent-green) 42%, var(--premium-line)); background: color-mix(in srgb, var(--accent-green) 15%, transparent); }
body.ui-premium-v3 .exec-cost-project-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
body.ui-premium-v3 .exec-cost-project-metrics div {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--premium-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-0) 72%, transparent);
}
html[data-theme="light"] body.ui-premium-v3 .exec-cost-project-metrics div {
  background: rgba(255,255,255,.62);
}
body.ui-premium-v3 .exec-cost-project-metrics strong {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  color: var(--text-strong);
  font-size: 15px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ui-premium-v3 .exec-cost-project-foot { justify-content: space-between; }
body.ui-premium-v3 .exec-cost-driver {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--premium-line);
}
body.ui-premium-v3 .exec-cost-driver strong,
body.ui-premium-v3 .exec-cost-driver small {
  display: block;
  max-width: 100%;
  margin-top: 3px;
  color: var(--text-strong);
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.ui-premium-v3 .exec-cost-driver small { color: var(--muted); font-size: 11px; }
body.ui-premium-v3 .exec-cost-error,
body.ui-premium-v3 .exec-cost-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent-amber) 38%, var(--premium-line));
  background: color-mix(in srgb, var(--accent-amber) 9%, transparent);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
}
body.ui-premium-v3 .exec-cost-note { margin-top: 12px; }
body.ui-premium-v3 .exec-cost-note.muted-note {
  border-color: var(--premium-line);
  background: var(--premium-chip);
}
body.ui-premium-v3 .exec-cost-empty {
  margin-top: 14px;
  padding: 18px;
}
body.ui-premium-v3 .exec-cost-empty strong {
  display: block;
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 950;
}
body.ui-premium-v3 .exec-cost-empty p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-weight: 850;
}

@media (max-width: 980px) {
  body.ui-premium-v3 .exec-v5-cost-strip,
  body.ui-premium-v3 .exec-cost-overall-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.ui-premium-v3 .exec-v5-cost-visual { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body.ui-premium-v3 .exec-v5-cost-strip,
  body.ui-premium-v3 .exec-cost-overall-meta,
  body.ui-premium-v3 .exec-cost-project-metrics { grid-template-columns: 1fr; }
  body.ui-premium-v3 .exec-cost-overall-head,
  body.ui-premium-v3 .exec-cost-project-head { align-items: stretch; flex-direction: column; }
  body.ui-premium-v3 .exec-cost-project-link { width: 100%; }
}

@media (max-width: 1180px) {
  body.ui-premium-v3.executive-v5-body .exec-v5-grid { grid-template-columns: 1fr !important; }
}

/* Temporary Cost Control --------------------------------------------------- */
.page-cost-control .cost-control-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.page-cost-control .cost-control-line-scroll,
.page-cost-control .cost-control-scroll {
  overflow: auto;
  max-width: 100%;
}
.page-cost-control .cost-control-lines-table {
  min-width: 1220px;
}
.page-cost-control .cost-control-lines-table th,
.page-cost-control .cost-control-lines-table td {
  vertical-align: middle;
}
.page-cost-control .cost-control-lines-table td:nth-child(5) input {
  min-width: 240px;
}
.page-cost-control .cost-control-lines-table td:nth-child(10) input {
  min-width: 190px;
}
.page-cost-control .input-xs {
  min-height: 34px;
  padding: 7px 9px;
  font-size: .88rem;
}
.page-cost-control .cost-control-paste-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre;
}
.page-cost-control .cost-control-total-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  padding: 12px 0 0;
  font-size: .95rem;
}
.page-cost-control .cost-control-total-bar strong {
  font-size: 1.05rem;
}
.page-cost-control .cost-control-category-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}
.page-cost-control .cost-control-budget-table small,
.page-cost-control .cost-control-budget-lines-detail-table small {
  display: block;
  color: var(--text-muted);
}
.page-cost-control .cost-control-budget-lines-detail-table {
  min-width: 1100px;
}
.page-cost-control .cost-control-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .page-cost-control .cost-control-split-grid,
  .page-cost-control .cost-control-detail-grid,
  .page-cost-control .cost-control-category-grid {
    grid-template-columns: 1fr;
  }
  .page-cost-control .cost-control-total-bar {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Temporary Cost Control UI structure refresh -------------------------------- */
.page-cost-control .cost-control-command-grid,
.page-cost-control .cost-control-actual-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.page-cost-control .cost-control-command-card,
.page-cost-control .cost-control-workstream-card {
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.025)),
    var(--surface-1);
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.page-cost-control .cost-control-command-card:hover,
.page-cost-control .cost-control-workstream-card:hover,
.page-cost-control .cost-control-action-row:hover,
.page-cost-control .cost-control-section-link:hover {
  transform: translateY(-1px);
  border-color: rgba(90,167,255,.42);
  background: rgba(90,167,255,.09);
  color: inherit;
}
.page-cost-control .cost-control-command-card strong,
.page-cost-control .cost-control-workstream-card strong {
  color: var(--text-strong);
  font-size: 1.25rem;
  line-height: 1.1;
}
.page-cost-control .cost-control-command-card p,
.page-cost-control .cost-control-workstream-card p {
  color: var(--text-soft);
  margin: 0;
  line-height: 1.45;
}
.page-cost-control .cost-control-command-card small,
.page-cost-control .cost-control-workstream-card small,
.page-cost-control .cost-control-workstream-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}
.page-cost-control .cost-control-workstream-card {
  min-height: 230px;
}
.page-cost-control .cost-control-actual-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.page-cost-control .tone-blue { --stream-accent: var(--accent-blue); }
.page-cost-control .tone-slate { --stream-accent: var(--muted); }
.page-cost-control .tone-green { --stream-accent: var(--accent-green); }
.page-cost-control .tone-purple { --stream-accent: var(--accent-purple); }
.page-cost-control .tone-orange { --stream-accent: var(--accent-orange); }
.page-cost-control .tone-teal { --stream-accent: var(--accent-teal); }
.page-cost-control .cost-control-workstream-card .asset-type-code,
.page-cost-control .cost-control-command-card .asset-type-code {
  background: color-mix(in srgb, var(--stream-accent, var(--accent-blue)) 18%, transparent);
  border-color: color-mix(in srgb, var(--stream-accent, var(--accent-blue)) 42%, transparent);
}
.page-cost-control .cost-control-flow-list,
.page-cost-control .cost-control-action-stack,
.page-cost-control .cost-control-section-list {
  display: grid;
  gap: 10px;
}
.page-cost-control .cost-control-flow-list > div,
.page-cost-control .cost-control-action-row,
.page-cost-control .cost-control-section-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  color: inherit;
  text-decoration: none;
}
.page-cost-control .cost-control-flow-list strong,
.page-cost-control .cost-control-action-row strong,
.page-cost-control .cost-control-section-link strong {
  color: var(--text-strong);
}
.page-cost-control .cost-control-flow-list small,
.page-cost-control .cost-control-action-row small {
  grid-column: 2;
  color: var(--muted);
}
.page-cost-control .flow-dot {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--blue-soft);
  border: 1px solid rgba(90,167,255,.32);
  color: var(--text-strong);
  font-weight: 950;
}
.page-cost-control .compact-flow {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.page-cost-control .cost-control-action-row .tab-code,
.page-cost-control .cost-control-section-link .tab-code {
  align-self: stretch;
}
.page-cost-control .cost-control-section-link.active {
  border-color: rgba(90,167,255,.45);
  background: rgba(90,167,255,.12);
}
.page-cost-control .cost-control-entry-layout,
.page-cost-control .cost-control-contract-grid,
.page-cost-control .cost-control-report-grid {
  display: grid;
  grid-template-columns: minmax(260px, .34fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.page-cost-control .cost-control-contract-grid {
  grid-template-columns: minmax(320px, .78fr) minmax(0, 1.22fr);
}
.page-cost-control .cost-control-report-grid {
  grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr);
}
.page-cost-control .cost-control-disabled-form .input:disabled,
.page-cost-control .cost-control-report-filter-panel .input:disabled,
.page-cost-control .cost-control-placeholder-form .btn:disabled,
.page-cost-control .cost-control-ipc-panel .btn:disabled,
.page-cost-control .cost-control-report-filter-panel .btn:disabled {
  opacity: .72;
  cursor: not-allowed;
}
.page-cost-control .btn.disabled,
.page-cost-control a.btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: .72;
}
.page-cost-control .cost-control-placeholder-table,
.page-cost-control .cost-control-boq-table,
.page-cost-control .cost-control-report-table {
  min-width: 980px;
}
.page-cost-control .cost-control-drop-zone {
  min-height: 280px;
  border: 1px dashed rgba(90,167,255,.44);
  border-radius: 20px;
  background: rgba(90,167,255,.07);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}
.page-cost-control .cost-control-drop-zone strong {
  color: var(--text-strong);
  font-size: 1.25rem;
}
.page-cost-control .cost-control-drop-zone p {
  color: var(--text-soft);
  max-width: 420px;
  margin: 0;
}
@media (max-width: 1180px) {
  .page-cost-control .cost-control-command-grid,
  .page-cost-control .cost-control-actual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-cost-control .cost-control-entry-layout,
  .page-cost-control .cost-control-contract-grid,
  .page-cost-control .cost-control-report-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .page-cost-control .cost-control-command-grid,
  .page-cost-control .cost-control-actual-grid,
  .page-cost-control .compact-flow {
    grid-template-columns: 1fr;
  }
}

/* Temporary Cost Control - Manpower professional shell ----------------------- */
.page-cost-control-manpower .cost-control-manpower-layout {
  grid-template-columns: minmax(270px, .32fr) minmax(0, 1fr);
}
.page-cost-control-manpower .cost-control-manpower-main {
  display: grid;
  gap: 18px;
}
.page-cost-control-manpower .cost-control-manpower-mini-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}
.page-cost-control-manpower .cost-control-manpower-mini-panel h3 {
  margin: 4px 0 6px;
  color: var(--text-strong);
  font-size: 1rem;
}
.page-cost-control-manpower .cost-control-manpower-mini-panel p {
  margin: 0 0 10px;
  color: var(--text-soft);
  line-height: 1.45;
}
.page-cost-control-manpower .cost-control-chip-list,
.page-cost-control-manpower .cost-control-import-column-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.page-cost-control-manpower .cost-control-chip-list span,
.page-cost-control-manpower .cost-control-import-column-strip span {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--text-soft);
  background: rgba(255,255,255,.04);
  font-weight: 800;
  font-size: .78rem;
}
.page-cost-control-manpower .cost-control-status-ribbon {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.page-cost-control-manpower .cost-control-status-ribbon small {
  color: var(--muted);
  font-weight: 750;
}
.page-cost-control-manpower .cost-control-manpower-workflow {
  margin-top: 16px;
}
.page-cost-control-manpower .cost-control-rate-component-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.page-cost-control-manpower .cost-control-rate-component {
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}
.page-cost-control-manpower .cost-control-rate-component strong {
  display: block;
  color: var(--text-strong);
  margin-bottom: 5px;
}
.page-cost-control-manpower .cost-control-rate-component small {
  color: var(--muted);
  line-height: 1.35;
}
.page-cost-control-manpower .cost-control-rate-component.tone-base { border-color: rgba(90,167,255,.34); background: rgba(90,167,255,.08); }
.page-cost-control-manpower .cost-control-rate-component.tone-allowance { border-color: rgba(34,197,94,.28); background: rgba(34,197,94,.07); }
.page-cost-control-manpower .cost-control-rate-component.tone-accrual { border-color: rgba(168,85,247,.30); background: rgba(168,85,247,.07); }
.page-cost-control-manpower .cost-control-rate-component.tone-allocation { border-color: rgba(249,115,22,.30); background: rgba(249,115,22,.07); }
.page-cost-control-manpower .cost-control-manpower-entry-panel,
.page-cost-control-manpower .cost-control-manpower-bottom-grid {
  margin-top: 18px;
}
.page-cost-control-manpower .cost-control-manpower-import-card,
.page-cost-control-manpower .cost-control-new-employee-card {
  margin-bottom: 16px;
}
.page-cost-control-manpower .cost-control-manpower-import-grid {
  margin-top: 12px;
}
.page-cost-control-manpower .cost-control-import-status {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  color: var(--text-soft);
  font-weight: 800;
  line-height: 1.35;
}
.page-cost-control-manpower .cost-control-import-status[data-tone="success"] { border-color: rgba(34,197,94,.34); color: var(--text-strong); background: rgba(34,197,94,.08); }
.page-cost-control-manpower .cost-control-import-status[data-tone="warning"] { border-color: rgba(245,158,11,.36); color: var(--text-strong); background: rgba(245,158,11,.08); }
.page-cost-control-manpower .cost-control-import-status[data-tone="danger"] { border-color: rgba(248,113,113,.40); color: var(--text-strong); background: rgba(248,113,113,.08); }
.page-cost-control-manpower .cost-control-action-hint {
  margin-inline-end: auto;
  color: var(--muted);
  font-weight: 800;
}
.page-cost-control-manpower .cost-control-import-column-strip {
  margin-top: 10px;
  max-height: 88px;
  overflow: auto;
}
.page-cost-control-manpower .cost-control-manpower-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.page-cost-control-manpower .cost-control-manpower-table th,
.page-cost-control-manpower .cost-control-manpower-table td {
  vertical-align: middle;
  white-space: nowrap;
}
.page-cost-control-manpower .cost-control-manpower-table input,
.page-cost-control-manpower .cost-control-manpower-table select {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}
.page-cost-control-manpower .cost-control-manpower-table col[data-manpower-col="line_no"] { width: 48px; }
.page-cost-control-manpower .cost-control-manpower-table col[data-manpower-col="employee_id"] { width: 170px; }
.page-cost-control-manpower .cost-control-manpower-table col[data-manpower-col="employee_name"] { width: 320px; }
.page-cost-control-manpower .cost-control-manpower-table col[data-manpower-col="position"] { width: 260px; }
.page-cost-control-manpower .cost-control-manpower-table col[data-manpower-col="category"] { width: 120px; }
.page-cost-control-manpower .cost-control-manpower-table col[data-manpower-col="sponsor"] { width: 110px; }
.page-cost-control-manpower .cost-control-manpower-table col[data-manpower-col="package_total"],
.page-cost-control-manpower .cost-control-manpower-table col[data-manpower-col="regular_wh"],
.page-cost-control-manpower .cost-control-manpower-table col[data-manpower-col="overtime_wh"],
.page-cost-control-manpower .cost-control-manpower-table col[data-manpower-col="total_cost"] { width: 150px; }
.page-cost-control-manpower .cost-control-manpower-table col[data-manpower-col="active"] { width: 120px; }
.page-cost-control-manpower .cost-control-manpower-table col[data-manpower-col="actions"] { width: 1px; }
.page-cost-control-manpower .cost-control-manpower-table th small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 750;
}
.page-cost-control-manpower .cost-control-manpower-table [data-col="employee_id"] { min-width: 170px; }
.page-cost-control-manpower .cost-control-manpower-table [data-col="employee_name"] { min-width: 320px; }
.page-cost-control-manpower .cost-control-manpower-table [data-col="position"] { min-width: 260px; }
.page-cost-control-manpower .cost-control-manpower-table [data-col="nationality"] { min-width: 130px; }
.page-cost-control-manpower .cost-control-manpower-table [data-col="package_total"],
.page-cost-control-manpower .cost-control-manpower-table [data-col="regular_hour_rate"],
.page-cost-control-manpower .cost-control-manpower-table [data-col="overtime_hour_rate"],
.page-cost-control-manpower .cost-control-manpower-table [data-col="regular_cost"],
.page-cost-control-manpower .cost-control-manpower-table [data-col="overtime_cost"],
.page-cost-control-manpower .cost-control-manpower-table [data-col="total_cost"] { min-width: 118px; }
.page-cost-control-manpower .cost-control-manpower-table [data-col="regular_wh"],
.page-cost-control-manpower .cost-control-manpower-table [data-col="overtime_wh"] { min-width: 100px; }
.page-cost-control-manpower .cost-control-manpower-table .readonly-calc {
  background: rgba(255,255,255,.03);
  color: var(--text-soft);
  font-weight: 850;
}
.page-cost-control-manpower .cost-control-manpower-table tr.is-released {
  opacity: .62;
}
.page-cost-control-manpower .cost-control-manpower-table tr.is-filled {
  outline: 1px solid rgba(90,167,255,.14);
  outline-offset: -1px;
}
.page-cost-control-manpower .cost-control-manpower-total-bar {
  justify-content: space-between;
  flex-wrap: wrap;
  border-top: 1px solid var(--line-soft);
  margin-top: 12px;
  padding-top: 14px;
}
.page-cost-control-manpower .cost-control-manpower-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1280px) {
  .page-cost-control-manpower .cost-control-rate-component-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1180px) {
  .page-cost-control-manpower .cost-control-manpower-layout,
  .page-cost-control-manpower .cost-control-manpower-bottom-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .page-cost-control-manpower .cost-control-rate-component-grid {
    grid-template-columns: 1fr;
  }
  .page-cost-control-manpower .cost-control-status-ribbon,
  .page-cost-control-manpower .cost-control-manpower-total-bar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Project-scoped Temporary Cost Control */
.project-cost-tabs .disabled-tab {
  opacity: .48;
  cursor: not-allowed;
  filter: grayscale(.25);
}
.cost-control-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}
.cost-control-project-card {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    var(--surface-1);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.cost-control-project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(90, 167, 255, .36);
  background:
    linear-gradient(180deg, rgba(90,167,255,.095), rgba(255,255,255,.025)),
    var(--surface-2);
  color: var(--text);
}
.cost-control-project-card strong {
  color: var(--text-strong);
}
.cost-control-project-card p {
  margin: 0;
  color: var(--text-soft);
}
.cost-control-project-card small,
.cost-control-project-card .project-card-footer {
  color: var(--muted);
}
.project-card-head,
.project-card-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.project-card-metrics {
  padding: .75rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255,255,255,.028);
}
.project-card-metrics span {
  display: grid;
  gap: .15rem;
  min-width: 0;
}
.project-card-metrics b {
  color: var(--text-strong);
  font-size: 1rem;
}
.project-card-metrics small,
.project-card-footer {
  color: var(--muted);
}
.project-command-grid {
  margin-bottom: 1.2rem;
}
.cost-control-access-scroll {
  max-height: 68vh;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 20, 34, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.cost-control-access-table {
  background: var(--surface-table);
}
.cost-control-access-table th,
.cost-control-access-table td {
  vertical-align: top;
  min-width: 140px;
  border-bottom-color: var(--line-soft);
}
.cost-control-access-table th .ltr-text {
  display: block;
  margin-bottom: .15rem;
}
.cost-control-access-table th small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
  white-space: normal;
}
.cost-control-access-table td small {
  color: var(--muted);
}
.cost-control-access-table .sticky-user-col {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 260px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.014)),
    var(--surface-table);
  box-shadow: 1px 0 0 var(--line);
}
.cost-control-access-table thead .sticky-user-col {
  z-index: 3;
  background: linear-gradient(180deg, #152d49, #10233b);
}
.cost-control-access-table tbody tr:nth-child(even) .sticky-user-col {
  background: var(--surface-table-2);
}
.cost-control-access-cell {
  background: color-mix(in srgb, var(--surface-table) 92%, var(--accent-blue) 8%);
}
.cost-control-access-table tbody tr:nth-child(even) .cost-control-access-cell {
  background: color-mix(in srgb, var(--surface-table-2) 94%, var(--accent-blue) 6%);
}
.cost-control-access-table tbody tr:hover .sticky-user-col,
.cost-control-access-table tbody tr:hover .cost-control-access-cell {
  background: color-mix(in srgb, var(--surface-table-2) 84%, var(--accent-blue) 16%);
}
.access-check {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .22rem 0;
  color: var(--text-soft);
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}
.access-check span {
  color: var(--text-soft);
}
.access-check input {
  inline-size: 1rem;
  block-size: 1rem;
  accent-color: var(--accent-cyan);
}
.cost-control-access-project-picker {
  margin-bottom: 1rem;
}
html[dir="rtl"] .cost-control-access-table .sticky-user-col {
  left: auto;
  right: 0;
  box-shadow: -1px 0 0 var(--line);
}
@media (max-width: 820px) {
  .cost-control-access-table .sticky-user-col {
    position: static;
    min-width: 220px;
  }
  .project-card-metrics {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* RBAC dual matrix: UI -> Users and User -> UI */
.permission-mode-note .access-rule-pills a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(90,167,255,.28);
  background: rgba(90,167,255,.12);
  color: var(--text-strong);
  font-weight: 950;
  text-decoration: none;
}
.permission-mode-note .access-rule-pills a:hover { background: rgba(90,167,255,.2); }
.ui-to-users-matrix-panel { --card-accent: var(--accent-blue); }
.interface-permission-list, .interface-screen-list { display: grid; gap: 14px; }
.interface-group-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.interface-group-title h3,
.interface-group-title h4 { margin: 0; }
.interface-group-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.interface-screen-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.035);
}
.interface-screen-card.is-muted { opacity: .64; }
.interface-screen-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.052), rgba(255,255,255,.022));
}
.interface-screen-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.interface-screen-meta > span:not(.badge) {
  min-width: 62px;
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line-soft);
  text-align: center;
}
.interface-screen-meta small { color: var(--muted); font-size: 10px; }
.interface-screen-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}
.permission-user-copy { display: grid; gap: 2px; min-width: 0; }
.permission-user-copy strong,
.permission-user-copy small { overflow-wrap: anywhere; }
.permission-user-option.is-inactive { opacity: .68; }
.permission-user-option input { width: 15px; height: 15px; accent-color: var(--accent-blue); }
.access-picker-edit .permission-user-option input { accent-color: var(--accent-green); }
.permission-user-option:has(input:checked) { border-color: rgba(90,167,255,.34); background: rgba(90,167,255,.11); }
.access-picker-edit .permission-user-option:has(input:checked) { border-color: rgba(73,220,136,.34); background: rgba(73,220,136,.11); }
.permission-user-option:has(input:disabled) { cursor: not-allowed; opacity: .62; }
.compact-picker-tools { margin-bottom: 12px; }
html[dir="rtl"] .interface-group-summary,
html[dir="rtl"] .interface-screen-summary,
html[dir="rtl"] .access-picker-head-static { text-align: right; }
@media (max-width: 1100px) {
  .interface-screen-summary { align-items: flex-start; flex-direction: column; }
  .interface-screen-meta { justify-content: flex-start; }
  .interface-screen-body { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .interface-group-summary { align-items: flex-start; flex-direction: column; }
}

/* Tender List sorting controls */
.page-tender-register .tender-table th .table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.page-tender-register .tender-table th .table-sort-link:hover,
.page-tender-register .tender-table th .table-sort-link.is-active {
  color: var(--text-strong);
}
.page-tender-register .tender-table th .sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line-soft);
  font-size: 10px;
  line-height: 1;
}
.page-tender-register .tender-table th .table-sort-link.is-active .sort-indicator {
  color: var(--text-strong);
  background: color-mix(in srgb, var(--accent-blue) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent-blue) 42%, var(--line-soft));
}
html[data-theme="light"] .page-tender-register .tender-table th .sort-indicator {
  background: rgba(15, 23, 42, .04);
}

/* Cost Control hierarchical permissions: Cost -> Project -> section UI */
.cost-control-scope-panel,
.single-user-cost-control-scope {
  background: linear-gradient(180deg, rgba(13, 31, 52, .94), rgba(7, 19, 34, .92));
  border-color: rgba(96, 165, 250, .25);
}
.project-scope-picker {
  align-items: stretch;
  min-width: min(460px, 100%);
}
.project-scope-picker select {
  min-width: min(430px, 100%);
}
.single-user-cost-control-scope {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
}
.single-user-cost-control-scope .nested-head {
  margin-bottom: .85rem;
}
.cost-control-user-project-list {
  display: grid;
  gap: .75rem;
}
.cost-control-user-project {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255,255,255,.026);
  overflow: hidden;
}
.cost-control-user-project.has-access {
  border-color: rgba(45, 212, 191, .28);
  box-shadow: inset 3px 0 0 rgba(45, 212, 191, .65);
}
.compact-scope-scroll {
  max-height: 42vh;
  border-radius: 0 0 18px 18px;
  border-inline: 0;
  border-bottom: 0;
}
.compact-scope-scroll .cost-control-access-table th,
.compact-scope-scroll .cost-control-access-table td {
  min-width: 132px;
}

/* Integrated Cost Control project scope inside UI permission matrices */
.permission-user-option-with-projects {
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
}
.permission-user-checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}
.project-checkbox-dropdown {
  position: relative;
  width: 100%;
}
.project-checkbox-dropdown summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.045);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.project-checkbox-dropdown summary::-webkit-details-marker { display: none; }
.project-checkbox-dropdown summary::after {
  content: '▾';
  color: var(--muted);
  font-size: 11px;
  transition: transform .16s ease;
}
.project-checkbox-dropdown[open] summary::after { transform: rotate(180deg); }
.project-checkbox-dropdown summary strong {
  margin-left: auto;
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(90,167,255,.16);
  color: var(--text);
  text-align: center;
}
.access-picker-edit .project-checkbox-dropdown summary strong,
.cc-row-project-pickers .project-checkbox-dropdown:nth-child(2) summary strong {
  background: rgba(73,220,136,.16);
}
.project-checkbox-panel {
  position: absolute;
  z-index: 40;
  inset-inline-start: 0;
  top: calc(100% + 6px);
  width: min(380px, 88vw);
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-1);
  box-shadow: var(--shadow-strong);
}
.project-check-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.035);
  cursor: pointer;
}
.project-check-option:hover { background: rgba(90,167,255,.10); border-color: rgba(90,167,255,.22); }
.project-check-option input { margin-top: 2px; accent-color: var(--accent-blue); }
.project-check-option span { display: grid; gap: 2px; min-width: 0; }
.project-check-option strong { color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.project-check-option small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.cc-row-project-pickers {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 8px;
  min-width: min(520px, 100%);
}
.user-ui-permission-row:has(.cc-row-project-pickers) {
  grid-template-columns: minmax(260px, 1fr) auto minmax(420px, .9fr);
}
.mini-empty {
  padding: 8px;
  font-size: 12px;
}
html[dir="rtl"] .project-checkbox-panel {
  text-align: right;
}
@media (max-width: 1180px) {
  .user-ui-permission-row:has(.cc-row-project-pickers) { grid-template-columns: 1fr; }
  .user-ui-permission-status,
  .user-ui-permission-actions { justify-content: flex-start; }
  .cc-row-project-pickers { min-width: 0; }
}
@media (max-width: 720px) {
  .cc-row-project-pickers { grid-template-columns: 1fr; }
  .project-checkbox-panel { width: min(330px, 86vw); }
}

/* Temporary Cost Control - simplified Manpower page -------------------------- */
.page-cost-control-manpower .cost-control-manpower-simple-panel {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}
.page-cost-control-manpower .cost-control-manpower-simple-title {
  align-items: flex-start;
  gap: 16px;
}
.page-cost-control-manpower .cost-control-manpower-latest-chip {
  min-width: 190px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  text-align: end;
}
.page-cost-control-manpower .cost-control-manpower-latest-chip span,
.page-cost-control-manpower .cost-control-manpower-latest-chip small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}
.page-cost-control-manpower .cost-control-manpower-latest-chip strong {
  display: block;
  margin: 3px 0;
  color: var(--text-strong);
  font-size: 1.08rem;
}

.page-cost-control-manpower .cost-control-manpower-dashboard-duo {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 16px;
  align-items: stretch;
}
.page-cost-control-manpower .manpower-dashboard-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  min-height: 284px;
  padding: 18px;
  border: 1px solid rgba(90,167,255,.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(90,167,255,.26), transparent 35%),
    radial-gradient(circle at 98% 16%, rgba(34,211,238,.14), transparent 28%),
    linear-gradient(145deg, rgba(13,30,50,.94), rgba(7,18,32,.82));
  box-shadow: 0 18px 52px rgba(0,0,0,.22);
}
.page-cost-control-manpower .manpower-dashboard-current-card {
  border-color: rgba(245,158,11,.24);
  background:
    radial-gradient(circle at 12% 0%, rgba(245,158,11,.22), transparent 34%),
    radial-gradient(circle at 100% 12%, rgba(34,197,94,.12), transparent 30%),
    linear-gradient(145deg, rgba(29,25,12,.92), rgba(8,18,28,.86));
}
.page-cost-control-manpower .manpower-dashboard-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(90,167,255,.96), rgba(34,211,238,.62));
}
.page-cost-control-manpower .manpower-dashboard-current-card::before {
  background: linear-gradient(180deg, rgba(245,158,11,.98), rgba(34,197,94,.60));
}
.page-cost-control-manpower .manpower-dashboard-shine {
  pointer-events: none;
  position: absolute;
  inset: -45% auto auto -20%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  filter: blur(22px);
}
.page-cost-control-manpower .manpower-dashboard-card-head,
.page-cost-control-manpower .manpower-dashboard-hero,
.page-cost-control-manpower .manpower-dashboard-metrics {
  position: relative;
}
.page-cost-control-manpower .manpower-dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.page-cost-control-manpower .manpower-dashboard-card-head h2 {
  margin: 2px 0 0;
  color: var(--text-strong);
  font-size: 1.12rem;
  letter-spacing: -.02em;
}
.page-cost-control-manpower .manpower-dashboard-card-head p:not(.eyebrow) {
  margin: 5px 0 0;
  max-width: 480px;
  color: var(--muted);
  font-size: .80rem;
  font-weight: 760;
  line-height: 1.35;
}
.page-cost-control-manpower .manpower-dashboard-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.075);
  color: var(--text-strong);
  font-size: .73rem;
  font-weight: 950;
  white-space: nowrap;
}
.page-cost-control-manpower .manpower-dashboard-hero {
  display: grid;
  gap: 4px;
  padding: 16px 16px 15px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.095), rgba(255,255,255,.035)),
    rgba(255,255,255,.035);
}
.page-cost-control-manpower .manpower-dashboard-hero span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.page-cost-control-manpower .manpower-dashboard-hero strong {
  color: var(--text-strong);
  font-size: clamp(1.72rem, 2.55vw, 2.55rem);
  font-weight: 980;
  letter-spacing: -.045em;
  line-height: 1;
}
.page-cost-control-manpower .manpower-dashboard-hero strong em {
  margin-inline-end: 6px;
  color: var(--muted);
  font-size: .95rem;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0;
}
.page-cost-control-manpower .manpower-dashboard-hero small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
}
.page-cost-control-manpower .manpower-dashboard-hero small b { color: var(--text-strong); }
.page-cost-control-manpower .manpower-dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}
.page-cost-control-manpower .manpower-dashboard-current-card .manpower-dashboard-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.page-cost-control-manpower .manpower-dashboard-metrics span {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 68px;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
}
.page-cost-control-manpower .manpower-dashboard-metrics span.is-strong {
  border-color: rgba(34,211,238,.24);
  background: linear-gradient(135deg, rgba(34,211,238,.10), rgba(255,255,255,.035));
}
.page-cost-control-manpower .manpower-dashboard-current-card .manpower-dashboard-metrics span.is-strong {
  border-color: rgba(245,158,11,.26);
  background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(255,255,255,.035));
}
.page-cost-control-manpower .manpower-dashboard-metrics i {
  color: var(--muted);
  font-size: .67rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.12;
}
.page-cost-control-manpower .manpower-dashboard-metrics b {
  overflow: hidden;
  color: var(--text-strong);
  font-size: .98rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-cost-control-manpower .manpower-dashboard-card.is-empty {
  opacity: .78;
}
html[data-theme="light"] .page-cost-control-manpower .manpower-dashboard-card {
  background:
    radial-gradient(circle at 12% 0%, rgba(90,167,255,.18), transparent 34%),
    radial-gradient(circle at 98% 16%, rgba(34,211,238,.10), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(241,245,249,.88));
  box-shadow: 0 18px 42px rgba(15,23,42,.10);
}
html[data-theme="light"] .page-cost-control-manpower .manpower-dashboard-current-card {
  background:
    radial-gradient(circle at 12% 0%, rgba(245,158,11,.16), transparent 34%),
    radial-gradient(circle at 100% 12%, rgba(34,197,94,.10), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,251,235,.84));
}
html[data-theme="light"] .page-cost-control-manpower .manpower-dashboard-pill,
html[data-theme="light"] .page-cost-control-manpower .manpower-dashboard-hero,
html[data-theme="light"] .page-cost-control-manpower .manpower-dashboard-metrics span {
  border-color: rgba(15,23,42,.08);
  background: rgba(255,255,255,.72);
}
html[dir="rtl"] .page-cost-control-manpower .manpower-dashboard-card-head,
html[dir="rtl"] .page-cost-control-manpower .manpower-dashboard-hero,
html[dir="rtl"] .page-cost-control-manpower .manpower-dashboard-metrics span {
  text-align: right;
}
@media (max-width: 1320px) {
  .page-cost-control-manpower .cost-control-manpower-dashboard-duo {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 980px) {
  .page-cost-control-manpower .manpower-dashboard-metrics,
  .page-cost-control-manpower .manpower-dashboard-current-card .manpower-dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .page-cost-control-manpower .manpower-dashboard-card-head {
    flex-direction: column;
  }
  .page-cost-control-manpower .manpower-dashboard-metrics,
  .page-cost-control-manpower .manpower-dashboard-current-card .manpower-dashboard-metrics {
    grid-template-columns: 1fr;
  }
}
.page-cost-control-manpower .cost-control-manpower-cumulative-dashboard {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(90,167,255,.24);
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(90,167,255,.16), transparent 34%),
    linear-gradient(135deg, rgba(17,36,59,.82), rgba(8,22,37,.66));
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
}
.page-cost-control-manpower .cost-control-manpower-cumulative-dashboard::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(90,167,255,.95), rgba(34,211,238,.62));
}
.page-cost-control-manpower .manpower-cumulative-heading {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.page-cost-control-manpower .manpower-cumulative-heading h2 {
  margin: 2px 0 0;
  color: var(--text-strong);
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.page-cost-control-manpower .manpower-cumulative-date-chip {
  min-width: 156px;
  display: grid;
  justify-items: end;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
}
.page-cost-control-manpower .manpower-cumulative-date-chip span {
  color: var(--muted);
  font-size: .70rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.page-cost-control-manpower .manpower-cumulative-date-chip strong {
  color: var(--text-strong);
  font-size: .95rem;
  font-weight: 950;
}
.page-cost-control-manpower .manpower-cumulative-kpis {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px,.85fr) minmax(120px,.62fr) minmax(120px,.62fr) minmax(120px,.62fr) minmax(190px,1fr);
  gap: 10px;
}
.page-cost-control-manpower .manpower-cumulative-card {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
}
.page-cost-control-manpower .manpower-cumulative-card span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.page-cost-control-manpower .manpower-cumulative-card strong {
  color: var(--text-strong);
  font-size: 1.26rem;
  font-weight: 950;
  line-height: 1.05;
}
.page-cost-control-manpower .manpower-cumulative-card small {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}
.page-cost-control-manpower .manpower-cumulative-card b,
.page-cost-control-manpower .manpower-cumulative-card em {
  color: inherit;
  font-style: normal;
  font-weight: 950;
}
.page-cost-control-manpower .manpower-cumulative-card.is-headcount {
  border-color: rgba(34,197,94,.26);
  background: linear-gradient(135deg, rgba(34,197,94,.10), rgba(255,255,255,.035));
}
.page-cost-control-manpower .manpower-cumulative-card.is-total-wh {
  border-color: rgba(34,211,238,.26);
  background: linear-gradient(135deg, rgba(34,211,238,.10), rgba(255,255,255,.035));
}
.page-cost-control-manpower .manpower-cumulative-card.is-cost {
  border-color: rgba(245,158,11,.30);
  background: linear-gradient(135deg, rgba(245,158,11,.11), rgba(255,255,255,.035));
}
html[data-theme="light"] .page-cost-control-manpower .cost-control-manpower-cumulative-dashboard {
  background:
    radial-gradient(circle at top left, rgba(90,167,255,.14), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(241,245,249,.90));
  box-shadow: 0 14px 32px rgba(15,23,42,.09);
}
html[data-theme="light"] .page-cost-control-manpower .manpower-cumulative-date-chip,
html[data-theme="light"] .page-cost-control-manpower .manpower-cumulative-card {
  border-color: rgba(15,23,42,.08);
  background: rgba(255,255,255,.72);
}
.page-cost-control-manpower .cost-control-manpower-command-grid {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(190px, 1fr) minmax(120px, .55fr) minmax(240px, 1.25fr);
  gap: 14px;
  align-items: end;
}
.page-cost-control-manpower .cost-control-manpower-import-strip {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(150px, .55fr) auto minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
}
.page-cost-control-manpower .cost-control-manpower-import-actions {
  justify-content: flex-start;
  padding-bottom: 2px;
}
.page-cost-control-manpower .cost-control-manpower-export-strip {
  display: grid;
  grid-template-columns: minmax(150px, .65fr) minmax(150px, .65fr) minmax(180px, .75fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(90,167,255,.22);
  border-radius: 18px;
  background: rgba(90,167,255,.045);
}
.page-cost-control-manpower .cost-control-manpower-export-actions {
  justify-content: flex-start;
  padding-bottom: 2px;
  white-space: nowrap;
}
.page-cost-control-manpower .manpower-export-hint {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}
.page-cost-control-manpower .cost-control-manpower-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(145px, .72fr)) auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0;
}
.page-cost-control-manpower .cost-control-manpower-filter-toolbar .span-2 {
  grid-column: span 2;
}
.page-cost-control-manpower .cost-control-manpower-filter-actions {
  align-self: center;
  justify-content: flex-start;
}
.page-cost-control-manpower .cost-control-manpower-visible-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}
.page-cost-control-manpower .cost-control-manpower-visible-summary span {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}
.page-cost-control-manpower .cost-control-manpower-visible-summary i {
  color: var(--muted);
  font-size: .70rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.page-cost-control-manpower .cost-control-manpower-visible-summary b {
  color: var(--text-strong);
  font-weight: 950;
}
.page-cost-control-manpower .cost-control-manpower-visible-summary em {
  font-style: normal;
}
.page-cost-control-manpower .manpower-filter-empty {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(245,158,11,.32);
  border-radius: 16px;
  background: rgba(245,158,11,.08);
  color: var(--text-soft);
  font-weight: 850;
}
html[data-theme="light"] .page-cost-control-manpower .cost-control-manpower-visible-summary span {
  border-color: rgba(15,23,42,.08);
  background: rgba(255,255,255,.72);
}
html[dir="rtl"] .page-cost-control-manpower .cost-control-manpower-visible-summary span,
html[dir="rtl"] .page-cost-control-manpower .manpower-filter-empty {
  text-align: right;
}
.page-cost-control-manpower .cost-control-manpower-table-head {
  margin-top: 4px;
}
.page-cost-control-manpower .cost-control-manpower-table {
  min-width: 1180px;
}
.page-cost-control-manpower .cost-control-manpower-table [data-col="employee_id"] { min-width: 110px; }
.page-cost-control-manpower .cost-control-manpower-table [data-col="employee_name"] { min-width: 220px; }
.page-cost-control-manpower .cost-control-manpower-table [data-col="position"] { min-width: 170px; }
.page-cost-control-manpower .cost-control-manpower-table [data-col="category"],
.page-cost-control-manpower .cost-control-manpower-table [data-col="sponsor"],
.page-cost-control-manpower .cost-control-manpower-table [data-col="active"] { min-width: 115px; }
.page-cost-control-manpower .cost-control-manpower-table [data-col="package_total"],
.page-cost-control-manpower .cost-control-manpower-table [data-col="regular_wh"],
.page-cost-control-manpower .cost-control-manpower-table [data-col="overtime_wh"],
.page-cost-control-manpower .cost-control-manpower-table [data-col="total_cost"] { min-width: 110px; }
.page-cost-control-manpower .cost-control-manpower-save-row {
  margin-top: 0;
}
@media (max-width: 1180px) {
  .page-cost-control-manpower .manpower-cumulative-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .page-cost-control-manpower .cost-control-manpower-command-grid,
  .page-cost-control-manpower .cost-control-manpower-import-strip,
  .page-cost-control-manpower .cost-control-manpower-export-strip,
  .page-cost-control-manpower .cost-control-manpower-filter-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .page-cost-control-manpower .cost-control-manpower-latest-chip {
    text-align: start;
    width: 100%;
  }
}
@media (max-width: 760px) {
  .page-cost-control-manpower .manpower-cumulative-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .page-cost-control-manpower .manpower-cumulative-date-chip {
    justify-items: start;
    width: 100%;
  }
  .page-cost-control-manpower .manpower-cumulative-kpis,
  .page-cost-control-manpower .cost-control-manpower-command-grid,
  .page-cost-control-manpower .cost-control-manpower-import-strip,
  .page-cost-control-manpower .cost-control-manpower-export-strip,
  .page-cost-control-manpower .cost-control-manpower-filter-toolbar,
  .page-cost-control-manpower .cost-control-manpower-visible-summary {
    grid-template-columns: 1fr;
  }
  .page-cost-control-manpower .cost-control-manpower-filter-toolbar .span-2 {
    grid-column: auto;
  }
}

/* Manpower SAR-only date input, locked calendar and export refinements -------- */
.page-cost-control-manpower .compact-date-command-grid {
  grid-template-columns: minmax(320px, .95fr) minmax(320px, 1.05fr);
}
.page-cost-control-manpower .manpower-date-picker-wrap {
  position: relative;
  z-index: 20;
}
.page-cost-control-manpower .manpower-date-picker-control {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.page-cost-control-manpower .manpower-date-picker-control .input {
  min-height: 44px;
  font-weight: 900;
  cursor: pointer;
}
.page-cost-control-manpower .manpower-date-picker-control .input:disabled {
  cursor: not-allowed;
}
.page-cost-control-manpower .cost-control-manpower-date-field .input.is-invalid {
  border-color: rgba(248,113,113,.55);
  box-shadow: 0 0 0 3px rgba(248,113,113,.12);
}
.page-cost-control-manpower .manpower-date-picker-toggle {
  min-width: 96px;
  white-space: nowrap;
}
.page-cost-control-manpower .manpower-date-picker-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(360px, calc(100vw - 42px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17,36,59,.98), rgba(8,22,37,.98));
  box-shadow: 0 24px 70px rgba(0,0,0,.42);
  z-index: 90;
}
html[data-theme="light"] .page-cost-control-manpower .manpower-date-picker-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,250,252,.99));
  box-shadow: 0 22px 58px rgba(15,23,42,.18);
}
.page-cost-control-manpower .manpower-calendar-toolbar {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.page-cost-control-manpower .manpower-calendar-toolbar strong {
  text-align: center;
  color: var(--text-strong);
  font-size: .95rem;
  font-weight: 950;
}
.page-cost-control-manpower .manpower-calendar-nav {
  width: 38px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  color: var(--text-strong);
  font-size: 1.35rem;
  font-weight: 950;
  cursor: pointer;
}
.page-cost-control-manpower .manpower-calendar-nav:hover {
  border-color: rgba(90,167,255,.40);
  background: rgba(90,167,255,.12);
}
.page-cost-control-manpower .manpower-calendar-weekdays,
.page-cost-control-manpower .manpower-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.page-cost-control-manpower .manpower-calendar-weekdays {
  margin-bottom: 6px;
}
.page-cost-control-manpower .manpower-calendar-weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}
.page-cost-control-manpower .manpower-calendar-day {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(90,167,255,.20);
  border-radius: 12px;
  background: rgba(90,167,255,.08);
  color: var(--text-strong);
  font-size: .86rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}
.page-cost-control-manpower .manpower-calendar-day:hover:not(:disabled) {
  border-color: rgba(90,167,255,.60);
  background: rgba(90,167,255,.18);
  transform: translateY(-1px);
}
.page-cost-control-manpower .manpower-calendar-day.is-selected {
  border-color: rgba(34,211,238,.72);
  background: rgba(34,211,238,.18);
  box-shadow: 0 0 0 3px rgba(34,211,238,.10);
}
.page-cost-control-manpower .manpower-calendar-day.is-outside-month {
  opacity: .48;
}
.page-cost-control-manpower .manpower-calendar-day.is-locked {
  cursor: not-allowed;
  opacity: .82;
}
.page-cost-control-manpower .manpower-calendar-day.is-saved-date {
  border-color: rgba(245,158,11,.38);
  background: rgba(245,158,11,.12);
  color: var(--text-strong);
}
.page-cost-control-manpower .manpower-calendar-day.is-future-date {
  border-color: rgba(148,163,184,.22);
  background: rgba(148,163,184,.10);
  color: var(--muted);
}
.page-cost-control-manpower .manpower-calendar-day:disabled {
  pointer-events: auto;
}
.page-cost-control-manpower .manpower-calendar-day .calendar-lock {
  position: absolute;
  right: 4px;
  bottom: 3px;
  font-size: .58rem;
  opacity: .9;
}
.page-cost-control-manpower .manpower-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
}
.page-cost-control-manpower .manpower-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.page-cost-control-manpower .manpower-calendar-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  border: 1px solid transparent;
}
.page-cost-control-manpower .manpower-calendar-legend .legend-open { background: rgba(90,167,255,.18); border-color: rgba(90,167,255,.42); }
.page-cost-control-manpower .manpower-calendar-legend .legend-saved { background: rgba(245,158,11,.16); border-color: rgba(245,158,11,.44); }
.page-cost-control-manpower .manpower-calendar-legend .legend-future { background: rgba(148,163,184,.16); border-color: rgba(148,163,184,.36); }
.page-cost-control-manpower .cost-control-fixed-currency-badge {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(90,167,255,.28);
  border-radius: 14px;
  background: rgba(90,167,255,.10);
  color: var(--text-strong);
  font-weight: 900;
  letter-spacing: .03em;
}

@media (max-width: 520px) {
  .page-cost-control-manpower .manpower-date-picker-control {
    display: grid;
    grid-template-columns: 1fr;
  }
  .page-cost-control-manpower .manpower-date-picker-toggle {
    width: 100%;
  }
  .page-cost-control-manpower .manpower-date-picker-panel {
    width: min(330px, calc(100vw - 32px));
  }
}
@media (max-width: 1180px) {
  .page-cost-control-manpower .compact-date-command-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .page-cost-control-manpower .compact-date-command-grid {
    grid-template-columns: 1fr;
  }
}


/* Manpower table lock and new-person workflow ------------------------------- */
.page-cost-control-manpower .cost-control-manpower-new-person-card {
  padding: 14px;
  border: 1px solid rgba(34,197,94,.22);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(34,197,94,.055), rgba(255,255,255,.025));
}
.page-cost-control-manpower .cost-control-manpower-new-person-title {
  margin-bottom: 10px;
}
.page-cost-control-manpower .cost-control-manpower-new-person-grid {
  display: grid;
  grid-template-columns: minmax(120px,.55fr) minmax(190px,1fr) minmax(140px,.7fr) minmax(160px,.8fr) minmax(120px,.6fr) minmax(120px,.6fr) minmax(120px,.6fr) minmax(100px,.48fr) minmax(100px,.48fr) minmax(120px,.56fr);
  gap: 10px;
  align-items: end;
}
.page-cost-control-manpower .cost-control-manpower-new-person-actions {
  margin-top: 12px;
  justify-content: flex-start;
}
.page-cost-control-manpower .cost-control-manpower-table [data-mp].is-table-locked-field:not([type="hidden"]),
.page-cost-control-manpower .cost-control-manpower-table [data-mp].is-table-locked-field:disabled:not([type="hidden"]) {
  cursor: not-allowed;
  opacity: .78;
  background: rgba(255,255,255,.028);
  border-color: rgba(148,163,184,.18);
  color: var(--text-soft);
}
.page-cost-control-manpower .cost-control-manpower-table [data-mp="regular_wh"]:not(:disabled),
.page-cost-control-manpower .cost-control-manpower-table [data-mp="overtime_wh"]:not(:disabled),
.page-cost-control-manpower .cost-control-manpower-table [data-mp="active"]:not(:disabled) {
  border-color: rgba(90,167,255,.38);
  background: rgba(90,167,255,.08);
  color: var(--text-strong);
}
.page-cost-control-manpower .cost-control-manpower-table [data-col="actions"],
.page-cost-control-manpower .cost-control-manpower-table td:last-child {
  width: 1px;
  min-width: 1px;
  padding-inline: 4px;
}
@media (max-width: 1500px) {
  .page-cost-control-manpower .cost-control-manpower-new-person-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .page-cost-control-manpower .cost-control-manpower-new-person-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .page-cost-control-manpower .cost-control-manpower-new-person-grid {
    grid-template-columns: 1fr;
  }
}

/* Manpower split productivity dashboard ------------------------------------- */
.page-cost-control-manpower .manpower-split-dashboard .manpower-dashboard-card {
  grid-template-rows: auto auto auto auto;
  min-height: 430px;
}
.page-cost-control-manpower .manpower-dashboard-hero-wide {
  min-height: 116px;
}
.page-cost-control-manpower .manpower-dashboard-split-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.page-cost-control-manpower .manpower-split-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  min-height: 162px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 0%, rgba(255,255,255,.105), transparent 34%),
    rgba(255,255,255,.045);
}
.page-cost-control-manpower .manpower-split-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: rgba(34,211,238,.74);
}
.page-cost-control-manpower .manpower-split-card.is-indirect::before {
  background: rgba(245,158,11,.78);
}
.page-cost-control-manpower .manpower-split-card-head,
.page-cost-control-manpower .manpower-split-card > strong,
.page-cost-control-manpower .manpower-split-card-metrics,
.page-cost-control-manpower .manpower-mini-bar {
  position: relative;
}
.page-cost-control-manpower .manpower-split-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.page-cost-control-manpower .manpower-split-card-head span {
  color: var(--muted);
  font-size: .70rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.page-cost-control-manpower .manpower-split-card-head b {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid rgba(34,211,238,.22);
  border-radius: 999px;
  background: rgba(34,211,238,.09);
  color: var(--text-strong);
  font-size: .72rem;
  font-weight: 950;
}
.page-cost-control-manpower .manpower-split-card.is-indirect .manpower-split-card-head b {
  border-color: rgba(245,158,11,.24);
  background: rgba(245,158,11,.10);
}
.page-cost-control-manpower .manpower-split-card > strong {
  color: var(--text-strong);
  font-size: clamp(1.22rem, 1.7vw, 1.72rem);
  font-weight: 980;
  letter-spacing: -.035em;
  line-height: 1;
}
.page-cost-control-manpower .manpower-split-card > strong em {
  color: var(--muted);
  font-size: .74rem;
  font-style: normal;
  font-weight: 950;
  letter-spacing: .04em;
}
.page-cost-control-manpower .manpower-split-card-metrics {
  display: grid;
  gap: 5px;
}
.page-cost-control-manpower .manpower-split-card-metrics span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: .73rem;
  font-weight: 850;
}
.page-cost-control-manpower .manpower-split-card-metrics b {
  overflow: hidden;
  max-width: 64%;
  color: var(--text-strong);
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-cost-control-manpower .manpower-mini-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.page-cost-control-manpower .manpower-mini-bar::after {
  content: "";
  display: block;
  width: min(100%, var(--bar-width, 0%));
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(34,211,238,.88), rgba(90,167,255,.88));
}
.page-cost-control-manpower .manpower-split-card.is-indirect .manpower-mini-bar::after,
.page-cost-control-manpower .manpower-mini-bar[data-manpower-current-indirect-bar]::after {
  background: linear-gradient(90deg, rgba(245,158,11,.90), rgba(251,191,36,.74));
}
.page-cost-control-manpower .manpower-dashboard-insight-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.page-cost-control-manpower .manpower-dashboard-insight-strip span {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.page-cost-control-manpower .manpower-dashboard-insight-strip i {
  color: var(--muted);
  font-size: .65rem;
  font-style: normal;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.page-cost-control-manpower .manpower-dashboard-insight-strip b {
  overflow: hidden;
  color: var(--text-strong);
  font-size: .92rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-theme="light"] .page-cost-control-manpower .manpower-split-card,
html[data-theme="light"] .page-cost-control-manpower .manpower-dashboard-insight-strip span {
  border-color: rgba(15,23,42,.08);
  background: rgba(255,255,255,.70);
}
html[data-theme="light"] .page-cost-control-manpower .manpower-mini-bar {
  background: rgba(15,23,42,.08);
}
html[dir="rtl"] .page-cost-control-manpower .manpower-split-card,
html[dir="rtl"] .page-cost-control-manpower .manpower-dashboard-insight-strip span {
  text-align: right;
}
@media (max-width: 980px) {
  .page-cost-control-manpower .manpower-dashboard-insight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .page-cost-control-manpower .manpower-dashboard-split-grid,
  .page-cost-control-manpower .manpower-dashboard-insight-strip {
    grid-template-columns: 1fr;
  }
}

/* Temporary Cost Control - Expense actuals professional register ------------- */
.page-cost-control-expense .expense-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr) minmax(320px, .82fr);
  gap: 16px;
  margin: 16px 0 18px;
}
.page-cost-control-expense .expense-dashboard-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid rgba(90,167,255,.20);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(90,167,255,.18), transparent 34%),
    radial-gradient(circle at 100% 8%, rgba(34,211,238,.10), transparent 30%),
    linear-gradient(145deg, rgba(17,36,59,.88), rgba(8,22,37,.72));
  box-shadow: 0 18px 46px rgba(0,0,0,.20);
}
.page-cost-control-expense .expense-breakdown-card {
  border-color: rgba(34,211,238,.16);
  background:
    radial-gradient(circle at 10% 0%, rgba(34,211,238,.12), transparent 32%),
    linear-gradient(145deg, rgba(18,34,50,.84), rgba(10,23,37,.72));
}
.page-cost-control-expense .expense-card-glow {
  pointer-events: none;
  position: absolute;
  inset: -58px auto auto -46px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  filter: blur(24px);
}
.page-cost-control-expense .expense-card-head,
.page-cost-control-expense .expense-main-kpi,
.page-cost-control-expense .expense-mini-kpis,
.page-cost-control-expense .expense-bar-list { position: relative; }
.page-cost-control-expense .expense-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.page-cost-control-expense .expense-card-head.compact { align-items: center; }
.page-cost-control-expense .expense-card-head h2 {
  margin: 2px 0 0;
  color: var(--text-strong);
  font-size: 1.10rem;
  letter-spacing: -.02em;
}
.page-cost-control-expense .expense-card-head p:not(.eyebrow) {
  margin: 5px 0 0;
  max-width: 520px;
  color: var(--muted);
  font-size: .80rem;
  font-weight: 760;
  line-height: 1.38;
}
.page-cost-control-expense .expense-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.075);
  color: var(--text-strong);
  font-size: .72rem;
  font-weight: 950;
  white-space: nowrap;
}
.page-cost-control-expense .expense-main-kpi {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.095), rgba(255,255,255,.035));
}
.page-cost-control-expense .expense-main-kpi span,
.page-cost-control-expense .expense-mini-kpis i {
  color: var(--muted);
  font-size: .70rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-style: normal;
}
.page-cost-control-expense .expense-main-kpi strong {
  color: var(--text-strong);
  font-size: clamp(1.75rem, 2.6vw, 2.7rem);
  font-weight: 980;
  line-height: 1;
  letter-spacing: -.045em;
}
.page-cost-control-expense .expense-main-kpi strong em {
  margin-inline-end: 6px;
  color: var(--muted);
  font-size: .95rem;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0;
}
.page-cost-control-expense .expense-main-kpi small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
}
.page-cost-control-expense .expense-mini-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}
.page-cost-control-expense .expense-mini-kpis span {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 66px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
}
.page-cost-control-expense .expense-mini-kpis b {
  overflow: hidden;
  color: var(--text-strong);
  font-size: .95rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-cost-control-expense .expense-bar-list {
  display: grid;
  gap: 10px;
}
.page-cost-control-expense .expense-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.040);
}
.page-cost-control-expense .expense-bar-row strong {
  display: block;
  overflow: hidden;
  color: var(--text-strong);
  font-size: .86rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-cost-control-expense .expense-bar-row small,
.page-cost-control-expense .expense-bar-row span {
  color: var(--muted);
  font-size: .73rem;
  font-weight: 850;
}
.page-cost-control-expense .expense-bar-row > i {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.075);
}
.page-cost-control-expense .expense-bar-row > i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: min(var(--bar-width, 0%), 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(90,167,255,.95), rgba(34,211,238,.78));
}
html[dir="rtl"] .page-cost-control-expense .expense-bar-row > i::before { inset: 0 0 0 auto; }
.page-cost-control-expense .expense-import-panel,
.page-cost-control-expense .expense-register-panel { margin-top: 16px; }
.page-cost-control-expense .expense-import-grid {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(320px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.page-cost-control-expense .expense-import-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-self: stretch;
  align-content: center;
}
.page-cost-control-expense .expense-import-rules span {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--text-soft);
  font-size: .76rem;
  font-weight: 850;
}
.page-cost-control-expense .expense-import-actions { align-self: center; }
.page-cost-control-expense .expense-import-status {
  grid-column: 1 / -1;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  color: var(--text-soft);
  font-weight: 850;
}
.page-cost-control-expense .expense-import-status[data-tone="success"] { border-color: rgba(34,197,94,.34); color: var(--text-strong); background: rgba(34,197,94,.08); }
.page-cost-control-expense .expense-import-status[data-tone="warning"] { border-color: rgba(245,158,11,.36); color: var(--text-strong); background: rgba(245,158,11,.08); }
.page-cost-control-expense .expense-import-status[data-tone="danger"] { border-color: rgba(248,113,113,.40); color: var(--text-strong); background: rgba(248,113,113,.08); }
.page-cost-control-expense .expense-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(6, minmax(145px, .72fr)) auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0;
}
.page-cost-control-expense .expense-toolbar .span-2 { grid-column: span 2; }
.page-cost-control-expense .expense-toolbar-actions { align-self: center; }
.page-cost-control-expense .expense-visible-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}
.page-cost-control-expense .expense-visible-summary span {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}
.page-cost-control-expense .expense-visible-summary i {
  color: var(--muted);
  font-size: .70rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.page-cost-control-expense .expense-visible-summary b {
  color: var(--text-strong);
  font-weight: 950;
}
.page-cost-control-expense .expense-table-scroll {
  max-height: 66vh;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
}
.page-cost-control-expense .expense-register-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.page-cost-control-expense .expense-register-table th,
.page-cost-control-expense .expense-register-table td {
  vertical-align: middle;
  white-space: nowrap;
}
.page-cost-control-expense .expense-register-table th {
  position: sticky;
  top: 0;
  z-index: 4;
}
.page-cost-control-expense .expense-register-table input {
  width: 100%;
  min-width: 0;
}
.page-cost-control-expense .expense-register-table col[data-expense-col="line_no"] { width: 54px; }
.page-cost-control-expense .expense-register-table col[data-expense-col="account_group"] { width: 260px; }
.page-cost-control-expense .expense-register-table col[data-expense-col="ledger"] { width: 270px; }
.page-cost-control-expense .expense-register-table col[data-expense-col="voucher_no"] { width: 220px; }
.page-cost-control-expense .expense-register-table col[data-expense-col="voucher_narration"] { width: 380px; }
.page-cost-control-expense .expense-register-table col[data-expense-col="entry_narration"] { width: 430px; }
.page-cost-control-expense .expense-register-table col[data-expense-col="voucher_date"] { width: 150px; }
.page-cost-control-expense .expense-register-table col[data-expense-col="expenses"] { width: 150px; }
.page-cost-control-expense .expense-register-table col[data-expense-col="actions"] { width: 110px; }
.page-cost-control-expense .expense-register-table [data-col="voucher_narration"] input,
.page-cost-control-expense .expense-register-table [data-col="entry_narration"] input {
  min-width: 360px;
}
.page-cost-control-expense .expense-amount-cell input { text-align: right; font-weight: 900; }
.page-cost-control-expense .expense-actions-cell { text-align: center; }
html[data-theme="light"] .page-cost-control-expense .expense-dashboard-card {
  background:
    radial-gradient(circle at 12% 0%, rgba(90,167,255,.18), transparent 34%),
    radial-gradient(circle at 98% 16%, rgba(34,211,238,.10), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(241,245,249,.88));
  box-shadow: 0 18px 42px rgba(15,23,42,.10);
}
html[data-theme="light"] .page-cost-control-expense .expense-breakdown-card {
  background:
    radial-gradient(circle at 10% 0%, rgba(34,211,238,.11), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(236,254,255,.82));
}
html[data-theme="light"] .page-cost-control-expense .expense-pill,
html[data-theme="light"] .page-cost-control-expense .expense-main-kpi,
html[data-theme="light"] .page-cost-control-expense .expense-mini-kpis span,
html[data-theme="light"] .page-cost-control-expense .expense-bar-row,
html[data-theme="light"] .page-cost-control-expense .expense-import-rules span,
html[data-theme="light"] .page-cost-control-expense .expense-import-status,
html[data-theme="light"] .page-cost-control-expense .expense-visible-summary span {
  border-color: rgba(15,23,42,.08);
  background: rgba(255,255,255,.72);
}
html[dir="rtl"] .page-cost-control-expense .expense-card-head,
html[dir="rtl"] .page-cost-control-expense .expense-main-kpi,
html[dir="rtl"] .page-cost-control-expense .expense-mini-kpis span,
html[dir="rtl"] .page-cost-control-expense .expense-bar-row,
html[dir="rtl"] .page-cost-control-expense .expense-import-status,
html[dir="rtl"] .page-cost-control-expense .expense-visible-summary span { text-align: right; }
@media (max-width: 1500px) {
  .page-cost-control-expense .expense-dashboard-grid { grid-template-columns: 1fr 1fr; }
  .page-cost-control-expense .expense-dashboard-hero-card { grid-column: 1 / -1; }
  .page-cost-control-expense .expense-toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-cost-control-expense .expense-toolbar .span-2 { grid-column: span 2; }
}
@media (max-width: 1040px) {
  .page-cost-control-expense .expense-dashboard-grid,
  .page-cost-control-expense .expense-import-grid,
  .page-cost-control-expense .expense-toolbar,
  .page-cost-control-expense .expense-visible-summary { grid-template-columns: 1fr; }
  .page-cost-control-expense .expense-dashboard-hero-card,
  .page-cost-control-expense .expense-toolbar .span-2 { grid-column: auto; }
  .page-cost-control-expense .expense-mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .page-cost-control-expense .expense-card-head,
  .page-cost-control-expense .expense-register-head { flex-direction: column; }
  .page-cost-control-expense .expense-mini-kpis { grid-template-columns: 1fr; }
}


/* Material Actuals mirrors the premium Expense Actuals layout. */
.page-cost-control-material .material-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr) minmax(320px, .82fr);
  gap: 16px;
  margin: 16px 0 18px;
}
.page-cost-control-material .material-dashboard-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid rgba(90,167,255,.20);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(90,167,255,.18), transparent 34%),
    radial-gradient(circle at 100% 8%, rgba(34,211,238,.10), transparent 30%),
    linear-gradient(145deg, rgba(17,36,59,.88), rgba(8,22,37,.72));
  box-shadow: 0 18px 46px rgba(0,0,0,.20);
}
.page-cost-control-material .material-breakdown-card {
  border-color: rgba(34,211,238,.16);
  background:
    radial-gradient(circle at 10% 0%, rgba(34,211,238,.12), transparent 32%),
    linear-gradient(145deg, rgba(18,34,50,.84), rgba(10,23,37,.72));
}
.page-cost-control-material .material-card-glow {
  pointer-events: none;
  position: absolute;
  inset: -58px auto auto -46px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  filter: blur(24px);
}
.page-cost-control-material .material-card-head,
.page-cost-control-material .material-main-kpi,
.page-cost-control-material .material-mini-kpis,
.page-cost-control-material .material-bar-list { position: relative; }
.page-cost-control-material .material-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.page-cost-control-material .material-card-head.compact { align-items: center; }
.page-cost-control-material .material-card-head h2 {
  margin: 2px 0 0;
  color: var(--text-strong);
  font-size: 1.10rem;
  letter-spacing: -.02em;
}
.page-cost-control-material .material-card-head p:not(.eyebrow) {
  margin: 5px 0 0;
  max-width: 520px;
  color: var(--muted);
  font-size: .80rem;
  font-weight: 760;
  line-height: 1.38;
}
.page-cost-control-material .material-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.075);
  color: var(--text-strong);
  font-size: .72rem;
  font-weight: 950;
  white-space: nowrap;
}
.page-cost-control-material .material-main-kpi {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.095), rgba(255,255,255,.035));
}
.page-cost-control-material .material-main-kpi span,
.page-cost-control-material .material-mini-kpis i {
  color: var(--muted);
  font-size: .70rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-style: normal;
}
.page-cost-control-material .material-main-kpi strong {
  color: var(--text-strong);
  font-size: clamp(1.75rem, 2.6vw, 2.7rem);
  font-weight: 980;
  line-height: 1;
  letter-spacing: -.045em;
}
.page-cost-control-material .material-main-kpi strong em {
  margin-inline-end: 6px;
  color: var(--muted);
  font-size: .95rem;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0;
}
.page-cost-control-material .material-main-kpi small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
}
.page-cost-control-material .material-mini-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}
.page-cost-control-material .material-mini-kpis span {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 66px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
}
.page-cost-control-material .material-mini-kpis b {
  overflow: hidden;
  color: var(--text-strong);
  font-size: .95rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-cost-control-material .material-bar-list {
  display: grid;
  gap: 10px;
}
.page-cost-control-material .material-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.040);
}
.page-cost-control-material .material-bar-row strong {
  display: block;
  overflow: hidden;
  color: var(--text-strong);
  font-size: .86rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-cost-control-material .material-bar-row small,
.page-cost-control-material .material-bar-row span {
  color: var(--muted);
  font-size: .73rem;
  font-weight: 850;
}
.page-cost-control-material .material-bar-row > i {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.075);
}
.page-cost-control-material .material-bar-row > i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: min(var(--bar-width, 0%), 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(90,167,255,.95), rgba(34,211,238,.78));
}
html[dir="rtl"] .page-cost-control-material .material-bar-row > i::before { inset: 0 0 0 auto; }
.page-cost-control-material .material-import-panel,
.page-cost-control-material .material-register-panel { margin-top: 16px; }
.page-cost-control-material .material-import-grid {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(320px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.page-cost-control-material .material-import-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-self: stretch;
  align-content: center;
}
.page-cost-control-material .material-import-rules span {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--text-soft);
  font-size: .76rem;
  font-weight: 850;
}
.page-cost-control-material .material-import-actions { align-self: center; }
.page-cost-control-material .material-import-status {
  grid-column: 1 / -1;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  color: var(--text-soft);
  font-weight: 850;
}
.page-cost-control-material .material-import-status[data-tone="success"] { border-color: rgba(34,197,94,.34); color: var(--text-strong); background: rgba(34,197,94,.08); }
.page-cost-control-material .material-import-status[data-tone="warning"] { border-color: rgba(245,158,11,.36); color: var(--text-strong); background: rgba(245,158,11,.08); }
.page-cost-control-material .material-import-status[data-tone="danger"] { border-color: rgba(248,113,113,.40); color: var(--text-strong); background: rgba(248,113,113,.08); }
.page-cost-control-material .material-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(6, minmax(145px, .72fr)) auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0;
}
.page-cost-control-material .material-toolbar .span-2 { grid-column: span 2; }
.page-cost-control-material .material-toolbar-actions { align-self: center; }
.page-cost-control-material .material-visible-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}
.page-cost-control-material .material-visible-summary span {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}
.page-cost-control-material .material-visible-summary i {
  color: var(--muted);
  font-size: .70rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.page-cost-control-material .material-visible-summary b {
  color: var(--text-strong);
  font-weight: 950;
}
.page-cost-control-material .material-table-scroll {
  max-height: 66vh;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
}
.page-cost-control-material .material-register-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.page-cost-control-material .material-register-table th,
.page-cost-control-material .material-register-table td {
  vertical-align: middle;
  white-space: nowrap;
}
.page-cost-control-material .material-register-table th {
  position: sticky;
  top: 0;
  z-index: 4;
}
.page-cost-control-material .material-register-table input {
  width: 100%;
  min-width: 0;
}
.page-cost-control-material .material-register-table col[data-material-col="line_no"] { width: 54px; }
.page-cost-control-material .material-register-table col[data-material-col="account_group"] { width: 260px; }
.page-cost-control-material .material-register-table col[data-material-col="ledger"] { width: 270px; }
.page-cost-control-material .material-register-table col[data-material-col="voucher_no"] { width: 220px; }
.page-cost-control-material .material-register-table col[data-material-col="voucher_narration"] { width: 380px; }
.page-cost-control-material .material-register-table col[data-material-col="entry_narration"] { width: 430px; }
.page-cost-control-material .material-register-table col[data-material-col="voucher_date"] { width: 150px; }
.page-cost-control-material .material-register-table col[data-material-col="materials"] { width: 150px; }
.page-cost-control-material .material-register-table col[data-material-col="actions"] { width: 110px; }
.page-cost-control-material .material-register-table [data-col="voucher_narration"] input,
.page-cost-control-material .material-register-table [data-col="entry_narration"] input {
  min-width: 360px;
}
.page-cost-control-material .material-amount-cell input { text-align: right; font-weight: 900; }
.page-cost-control-material .material-actions-cell { text-align: center; }
html[data-theme="light"] .page-cost-control-material .material-dashboard-card {
  background:
    radial-gradient(circle at 12% 0%, rgba(90,167,255,.18), transparent 34%),
    radial-gradient(circle at 98% 16%, rgba(34,211,238,.10), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(241,245,249,.88));
  box-shadow: 0 18px 42px rgba(15,23,42,.10);
}
html[data-theme="light"] .page-cost-control-material .material-breakdown-card {
  background:
    radial-gradient(circle at 10% 0%, rgba(34,211,238,.11), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(236,254,255,.82));
}
html[data-theme="light"] .page-cost-control-material .material-pill,
html[data-theme="light"] .page-cost-control-material .material-main-kpi,
html[data-theme="light"] .page-cost-control-material .material-mini-kpis span,
html[data-theme="light"] .page-cost-control-material .material-bar-row,
html[data-theme="light"] .page-cost-control-material .material-import-rules span,
html[data-theme="light"] .page-cost-control-material .material-import-status,
html[data-theme="light"] .page-cost-control-material .material-visible-summary span {
  border-color: rgba(15,23,42,.08);
  background: rgba(255,255,255,.72);
}
html[dir="rtl"] .page-cost-control-material .material-card-head,
html[dir="rtl"] .page-cost-control-material .material-main-kpi,
html[dir="rtl"] .page-cost-control-material .material-mini-kpis span,
html[dir="rtl"] .page-cost-control-material .material-bar-row,
html[dir="rtl"] .page-cost-control-material .material-import-status,
html[dir="rtl"] .page-cost-control-material .material-visible-summary span { text-align: right; }
@media (max-width: 1500px) {
  .page-cost-control-material .material-dashboard-grid { grid-template-columns: 1fr 1fr; }
  .page-cost-control-material .material-dashboard-hero-card { grid-column: 1 / -1; }
  .page-cost-control-material .material-toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-cost-control-material .material-toolbar .span-2 { grid-column: span 2; }
}
@media (max-width: 1040px) {
  .page-cost-control-material .material-dashboard-grid,
  .page-cost-control-material .material-import-grid,
  .page-cost-control-material .material-toolbar,
  .page-cost-control-material .material-visible-summary { grid-template-columns: 1fr; }
  .page-cost-control-material .material-dashboard-hero-card,
  .page-cost-control-material .material-toolbar .span-2 { grid-column: auto; }
  .page-cost-control-material .material-mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .page-cost-control-material .material-card-head,
  .page-cost-control-material .material-register-head { flex-direction: column; }
  .page-cost-control-material .material-mini-kpis { grid-template-columns: 1fr; }
}

/* Machinery & Equipment timesheet dashboard polish -------------------------- */
.page-cost-control-machinery .machinery-command-panel {
  overflow: hidden;
}
.page-cost-control-machinery .machinery-dashboard-duo {
  margin: 14px 0 18px;
}
.page-cost-control-machinery .machinery-dashboard-card {
  min-height: 430px;
}
.page-cost-control-machinery .machinery-dashboard-card .manpower-dashboard-card-head h2,
.page-cost-control-machinery .machinery-dashboard-card .manpower-dashboard-card-head p,
.page-cost-control-machinery .machinery-dashboard-card .manpower-dashboard-hero,
.page-cost-control-machinery .machinery-dashboard-card .manpower-split-card,
.page-cost-control-machinery .machinery-dashboard-card .manpower-dashboard-insight-strip span {
  min-width: 0;
}
.page-cost-control-machinery .machinery-split-card.is-productive::before {
  background: rgba(34,211,238,.78);
}
.page-cost-control-machinery .machinery-split-card.is-downtime::before {
  background: rgba(248,113,113,.82);
}
.page-cost-control-machinery .machinery-split-card.is-downtime .manpower-split-card-head b {
  border-color: rgba(248,113,113,.28);
  background: rgba(248,113,113,.11);
}
.page-cost-control-machinery .machinery-downtime-bar::after,
.page-cost-control-machinery .manpower-mini-bar[data-meq-current-down-bar]::after {
  background: linear-gradient(90deg, rgba(248,113,113,.92), rgba(245,158,11,.82));
}
.page-cost-control-machinery .machinery-productive-bar::after,
.page-cost-control-machinery .manpower-mini-bar[data-meq-current-productive-bar]::after {
  background: linear-gradient(90deg, rgba(34,211,238,.90), rgba(90,167,255,.86));
}
.page-cost-control-machinery .machinery-insight-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.page-cost-control-machinery .machinery-import-strip,
.page-cost-control-machinery .machinery-export-strip,
.page-cost-control-machinery .machinery-new-equipment-card,
.page-cost-control-machinery .machinery-toolbar,
.page-cost-control-machinery .machinery-visible-summary,
.page-cost-control-machinery .machinery-table-scroll,
.page-cost-control-machinery .machinery-total-bar {
  margin-top: 14px;
}
html[data-theme="light"] .page-cost-control-machinery .machinery-split-card.is-downtime .manpower-split-card-head b {
  border-color: rgba(185,28,28,.16);
  background: rgba(254,226,226,.72);
}
@media (max-width: 980px) {
  .page-cost-control-machinery .machinery-insight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .page-cost-control-machinery .machinery-insight-strip {
    grid-template-columns: 1fr;
  }
}

/* Machinery supplier cost split -------------------------------------------- */
.page-cost-control-machinery .machinery-supplier-cost-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  margin: -4px 0 18px;
  padding: 14px;
  border: 1px solid rgba(90,167,255,.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 0%, rgba(90,167,255,.12), transparent 32%),
    linear-gradient(135deg, rgba(11,26,44,.74), rgba(8,19,32,.58));
  box-shadow: 0 14px 42px rgba(0,0,0,.14);
}
.page-cost-control-machinery .machinery-supplier-cost-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(90,167,255,.90), rgba(34,211,238,.58));
}
.page-cost-control-machinery .machinery-supplier-cost-head,
.page-cost-control-machinery .machinery-supplier-cost-grid,
.page-cost-control-machinery .machinery-supplier-list-card {
  position: relative;
}
.page-cost-control-machinery .machinery-supplier-cost-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.page-cost-control-machinery .machinery-supplier-cost-head h3 {
  margin: 2px 0 0;
  color: var(--text-strong);
  font-size: 1.02rem;
  letter-spacing: -.02em;
}
.page-cost-control-machinery .machinery-supplier-cost-head p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 780;
}
.page-cost-control-machinery .machinery-supplier-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.065);
  color: var(--text-strong);
  font-size: .72rem;
  font-weight: 950;
  white-space: nowrap;
}
.page-cost-control-machinery .machinery-supplier-cost-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  gap: 10px;
}
.page-cost-control-machinery .machinery-supplier-list-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: rgba(255,255,255,.04);
}
.page-cost-control-machinery .machinery-supplier-list-card.is-current {
  border-color: rgba(245,158,11,.18);
  background:
    radial-gradient(circle at 100% 0%, rgba(245,158,11,.09), transparent 36%),
    rgba(255,255,255,.035);
}
.page-cost-control-machinery .machinery-supplier-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 2px;
}
.page-cost-control-machinery .machinery-supplier-list-head span {
  color: var(--muted);
  font-size: .70rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.page-cost-control-machinery .machinery-supplier-list-head b {
  overflow: hidden;
  color: var(--text-strong);
  font-size: .86rem;
  font-weight: 980;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-cost-control-machinery .machinery-supplier-list {
  display: grid;
  gap: 7px;
}
.page-cost-control-machinery .machinery-supplier-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  min-height: 52px;
  padding: 9px 10px 11px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.page-cost-control-machinery .machinery-supplier-row-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.page-cost-control-machinery .machinery-supplier-row-main strong {
  overflow: hidden;
  color: var(--text-strong);
  font-size: .84rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-cost-control-machinery .machinery-supplier-row-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-cost-control-machinery .machinery-supplier-row-money {
  min-width: 118px;
  display: grid;
  gap: 2px;
  text-align: end;
}
.page-cost-control-machinery .machinery-supplier-row-money b {
  color: var(--text-strong);
  font-size: .82rem;
  font-weight: 980;
  white-space: nowrap;
}
.page-cost-control-machinery .machinery-supplier-row-money em {
  color: var(--muted);
  font-size: .67rem;
  font-style: normal;
  font-weight: 950;
}
.page-cost-control-machinery .machinery-supplier-bar {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.page-cost-control-machinery .machinery-supplier-bar::after {
  content: "";
  display: block;
  width: min(100%, var(--supplier-bar, 0%));
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(90,167,255,.90), rgba(34,211,238,.82));
}
.page-cost-control-machinery .machinery-supplier-list-card.is-current .machinery-supplier-bar::after {
  background: linear-gradient(90deg, rgba(245,158,11,.92), rgba(34,197,94,.74));
}
.page-cost-control-machinery .machinery-supplier-empty {
  padding: 12px;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 14px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  text-align: center;
}
html[data-theme="light"] .page-cost-control-machinery .machinery-supplier-cost-panel {
  border-color: rgba(15,23,42,.08);
  background:
    radial-gradient(circle at 8% 0%, rgba(90,167,255,.10), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(241,245,249,.86));
  box-shadow: 0 16px 36px rgba(15,23,42,.08);
}
html[data-theme="light"] .page-cost-control-machinery .machinery-supplier-count-pill,
html[data-theme="light"] .page-cost-control-machinery .machinery-supplier-list-card,
html[data-theme="light"] .page-cost-control-machinery .machinery-supplier-row {
  border-color: rgba(15,23,42,.08);
  background: rgba(255,255,255,.72);
}
html[data-theme="light"] .page-cost-control-machinery .machinery-supplier-list-card.is-current {
  border-color: rgba(245,158,11,.16);
  background: rgba(255,251,235,.62);
}
html[data-theme="light"] .page-cost-control-machinery .machinery-supplier-bar {
  background: rgba(15,23,42,.08);
}
html[dir="rtl"] .page-cost-control-machinery .machinery-supplier-cost-panel::before {
  inset: 0 0 0 auto;
}
html[dir="rtl"] .page-cost-control-machinery .machinery-supplier-cost-head,
html[dir="rtl"] .page-cost-control-machinery .machinery-supplier-list-head,
html[dir="rtl"] .page-cost-control-machinery .machinery-supplier-row-main,
html[dir="rtl"] .page-cost-control-machinery .machinery-supplier-empty {
  text-align: right;
}
html[dir="rtl"] .page-cost-control-machinery .machinery-supplier-row-money {
  text-align: left;
}
@media (max-width: 1180px) {
  .page-cost-control-machinery .machinery-supplier-cost-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .page-cost-control-machinery .machinery-supplier-cost-head,
  .page-cost-control-machinery .machinery-supplier-list-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-cost-control-machinery .machinery-supplier-row {
    grid-template-columns: 1fr;
  }
  .page-cost-control-machinery .machinery-supplier-row-money {
    min-width: 0;
    text-align: start;
  }
}

/* Cost Control — Service PO / Subcontract BOQ + IPC workspace */
.page-cost-control-commitments .commitment-dashboard-grid{
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:18px 0;
}
.commitment-workspace-grid{display:grid; grid-template-columns:minmax(260px,330px) minmax(0,1fr); gap:16px; align-items:start;}
.commitment-list-panel,.commitment-main-panel,.commitment-ipc-panel{border:1px solid var(--border); background:var(--surface-1); border-radius:22px; box-shadow:var(--shadow-sm);}
.commitment-record-list{display:grid; gap:10px; margin-top:12px; max-height:680px; overflow:auto; padding-right:4px;}
.commitment-record-card{display:grid; gap:5px; padding:12px 13px; border:1px solid var(--border); border-radius:16px; text-decoration:none; color:var(--text); background:linear-gradient(135deg,rgba(255,255,255,.04),rgba(255,255,255,.01)); transition:.18s ease;}
.commitment-record-card:hover,.commitment-record-card.active{transform:translateY(-1px); border-color:var(--accent-blue); box-shadow:0 14px 26px rgba(15,23,42,.12);}
.commitment-record-card strong{font-size:.95rem;}
.commitment-record-card em{font-style:normal; color:var(--muted); font-size:.82rem; line-height:1.3;}
.commitment-record-card small{display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:.78rem;}
.commitment-record-code{width:max-content; font-size:.74rem; font-weight:800; color:var(--accent-blue); padding:3px 8px; border-radius:999px; background:rgba(59,130,246,.12);}
.commitment-section-split{margin-top:18px; border-top:1px solid var(--border); padding-top:16px;}
.commitment-subhead{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px;}
.commitment-subhead h3{margin:0;}
.commitment-import-btn{position:relative; overflow:hidden;}
.commitment-boq-summary{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:10px 0 12px;}
.commitment-boq-summary span{display:flex; justify-content:space-between; gap:8px; padding:10px 12px; border:1px solid var(--border); border-radius:14px; background:var(--surface-2);}
.commitment-boq-summary i{font-style:normal; color:var(--muted); font-size:.8rem;}
.commitment-boq-summary b{font-size:.9rem;}
.commitment-table-scroll{max-height:520px; overflow:auto; border:1px solid var(--border); border-radius:16px;}
.commitment-boq-table th,.commitment-ipc-table th{white-space:nowrap;}
.commitment-boq-table td,.commitment-ipc-table td{vertical-align:middle;}
.table-input{min-width:105px; height:34px; padding:6px 8px; border-radius:10px;}
.table-input.wide{min-width:260px;}
.table-input.mini{min-width:70px;}
.table-input.num{min-width:105px; text-align:right;}
.commitment-save-actions{justify-content:flex-end; margin-top:12px;}
.commitment-alert{margin:0 0 14px; padding:10px 12px; border-radius:14px; font-size:.9rem; border:1px solid var(--border);}
.commitment-alert.info{background:rgba(59,130,246,.12); border-color:rgba(59,130,246,.25);}
.commitment-alert.success{background:rgba(34,197,94,.12); border-color:rgba(34,197,94,.25);}
.commitment-alert.error{background:rgba(239,68,68,.12); border-color:rgba(239,68,68,.25);}
.commitment-ipc-panel{margin-top:16px;}
.commitment-ipc-layout{display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:16px; align-items:start;}
.commitment-ipc-history{border:1px solid var(--border); border-radius:18px; padding:14px; background:var(--surface-2);}
.commitment-ipc-history h3{margin:0 0 10px;}
.commitment-ipc-list{display:grid; gap:10px; max-height:520px; overflow:auto;}
.commitment-ipc-list article{display:grid; gap:3px; padding:10px 12px; border-radius:14px; background:var(--surface-1); border:1px solid var(--border);}
.commitment-ipc-list article span,.commitment-ipc-list article small{color:var(--muted); font-size:.8rem;}
.danger-link{color:#ef4444;}
html[dir="rtl"] .commitment-record-list{padding-left:4px; padding-right:0;}
@media (max-width: 1180px){
  .page-cost-control-commitments .commitment-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .commitment-workspace-grid,.commitment-ipc-layout{grid-template-columns:1fr;}
}
@media (max-width: 680px){
  .page-cost-control-commitments .commitment-dashboard-grid,.commitment-boq-summary{grid-template-columns:1fr;}
}

/* Service PO / Subcontract clean register + record IPC workflow */
.page-cost-control-commitments .commitment-dashboard-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:16px 0;}
.commitment-register-panel,.commitment-detail-panel,.commitment-ipc-panel{border:1px solid var(--border);background:var(--surface-1);border-radius:22px;box-shadow:var(--shadow-sm);}
.commitment-register-head,.commitment-detail-head{align-items:flex-start;gap:16px;}
.commitment-register-tools{display:flex;align-items:center;gap:10px;min-width:min(420px,100%);}
.commitment-register-tools .input{min-width:280px;}
.commitment-register-scroll{max-height:650px;}
.commitment-register-table td{vertical-align:middle;}
.commitment-register-table td small{display:block;color:var(--muted);font-size:.76rem;margin-top:3px;}
.commitment-register-table .btn-small{padding:7px 11px;border-radius:12px;font-size:.8rem;}
.commitment-record-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:4px 0 16px;}
.commitment-record-strip span,.commitment-boq-summary span{display:flex;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:14px;background:var(--surface-2);}
.commitment-record-strip i,.commitment-boq-summary i{font-style:normal;color:var(--muted);font-size:.78rem;}
.commitment-record-strip b,.commitment-boq-summary b{font-size:.9rem;}
.commitment-section-split{margin-top:18px;border-top:1px solid var(--border);padding-top:16px;}
.commitment-subhead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;}
.commitment-subhead h3{margin:0;}
.commitment-boq-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:10px 0 12px;}
.commitment-table-scroll{max-height:520px;overflow:auto;border:1px solid var(--border);border-radius:16px;}
.commitment-boq-table th,.commitment-ipc-table th,.commitment-register-table th{white-space:nowrap;}
.commitment-boq-table td,.commitment-ipc-table td{vertical-align:middle;}
.commitment-boq-table .table-input,.commitment-ipc-table .table-input{min-width:92px;max-width:150px;padding:7px 9px;border-radius:10px;}
.commitment-boq-table .table-input.wide{min-width:260px;max-width:460px;}
.commitment-boq-table .table-input.mini{min-width:72px;max-width:90px;}
.commitment-save-actions{justify-content:flex-end;margin-top:12px;}
.commitment-alert{margin:0 0 14px;padding:10px 12px;border-radius:14px;font-size:.9rem;border:1px solid var(--border);}
.commitment-alert.info{background:rgba(59,130,246,.12);border-color:rgba(59,130,246,.25);}
.commitment-alert.success{background:rgba(34,197,94,.12);border-color:rgba(34,197,94,.25);}
.commitment-alert.error{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.25);}
.commitment-ipc-panel{margin-top:16px;}
.commitment-ipc-entry{margin-bottom:16px;padding:14px;border:1px solid var(--border);border-radius:18px;background:var(--surface-2);}
.commitment-ipc-entry[hidden]{display:none;}
.commitment-ipc-history-table h3{margin:0 0 10px;}
html[dir="rtl"] .commitment-register-tools{direction:rtl;}
@media (max-width:1100px){
  .page-cost-control-commitments .commitment-dashboard-grid,.commitment-record-strip{grid-template-columns:repeat(2,minmax(0,1fr));}
  .commitment-register-head,.commitment-detail-head{display:grid;}
  .commitment-register-tools{width:100%;}
  .commitment-register-tools .input{min-width:0;width:100%;}
}
@media (max-width:680px){
  .page-cost-control-commitments .commitment-dashboard-grid,.commitment-record-strip,.commitment-boq-summary{grid-template-columns:1fr;}
  .commitment-register-tools{display:grid;}
}

/* Commitment UI refinement: saved records open as view mode; edit is explicit. */
.commitment-mode-chip{white-space:nowrap;}
.commitment-edit-note{margin:0 0 12px;padding:9px 11px;border:1px solid var(--border);border-radius:13px;background:var(--surface-2);color:var(--muted);font-size:.84rem;}
.commitment-form.is-view-mode .input:disabled{opacity:1;color:var(--text);background:transparent;border-color:transparent;box-shadow:none;padding-left:0;padding-right:0;cursor:default;}
.commitment-form.is-view-mode textarea.input:disabled{resize:none;}
.commitment-read-cell{display:block;min-width:72px;color:var(--text);line-height:1.35;}
.commitment-read-cell.wide{min-width:240px;max-width:520px;white-space:normal;}
.commitment-detail-panel.is-view-mode .commitment-boq-table tbody tr:hover{background:var(--surface-2);}
.commitment-ipc-table input[data-progress-percent],.commitment-ipc-table input[data-cumulative-qty]{font-variant-numeric:tabular-nums;}

/* IPC history drill-down inside Service PO / Subcontract record */
.commitment-ipc-history-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:0 0 10px;}
.commitment-ipc-history-head h3{margin:0;}
.commitment-ipc-history-head p{margin:3px 0 0;color:var(--muted);font-size:.84rem;}
.commitment-ipc-history-grid td{vertical-align:middle;}
.commitment-click-row{cursor:pointer;transition:background .15s ease, box-shadow .15s ease;}
.commitment-click-row:hover,.commitment-click-row.active{background:var(--surface-2);box-shadow:inset 3px 0 0 var(--accent-blue);}
html[dir="rtl"] .commitment-click-row:hover,html[dir="rtl"] .commitment-click-row.active{box-shadow:inset -3px 0 0 var(--accent-blue);}
.commitment-ipc-detail-card{margin-top:16px;padding:14px;border:1px solid var(--border);border-radius:18px;background:var(--surface-2);}
.commitment-ipc-detail-card[hidden]{display:none;}
.commitment-ipc-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px;}
.commitment-ipc-detail-head h3{margin:0;}
.commitment-ipc-detail-head p:not(.eyebrow){margin:4px 0 0;color:var(--muted);font-size:.84rem;}
.commitment-ipc-detail-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:10px 0 12px;}
.commitment-ipc-detail-metrics span{display:flex;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:14px;background:var(--surface-1);}
.commitment-ipc-detail-metrics i{font-style:normal;color:var(--muted);font-size:.78rem;}
.commitment-ipc-detail-metrics b{font-size:.9rem;}
.commitment-ipc-detail-scroll{max-height:430px;}
.commitment-ipc-detail-table th{white-space:nowrap;}
.commitment-ipc-detail-table td{vertical-align:middle;}
@media (max-width:900px){.commitment-ipc-detail-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:640px){.commitment-ipc-detail-head{display:grid;}.commitment-ipc-detail-metrics{grid-template-columns:1fr;}}

/* IPC deductions - Service PO/Subcontract */
.commitment-deductions-box{margin:12px 0 14px;padding:12px;border:1px solid var(--border);border-radius:16px;background:var(--surface-1);}
.commitment-deductions-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px;}
.commitment-deductions-head h3,.commitment-ipc-detail-deductions h4{margin:0;font-size:.95rem;}
.commitment-deductions-head p{margin:3px 0 0;color:var(--muted);font-size:.8rem;}
.commitment-deductions-table th{white-space:nowrap;}
.commitment-deductions-table td{vertical-align:middle;}
.commitment-deductions-table .table-input.wide{min-width:260px;max-width:420px;}
.commitment-deductions-scroll{max-height:240px;}
.commitment-ipc-detail-deductions{margin:8px 0 12px;padding:10px;border:1px solid var(--border);border-radius:14px;background:var(--surface-1);}
.commitment-ipc-detail-metrics{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));}
@media (max-width:640px){.commitment-deductions-head{display:grid}.commitment-deductions-table .table-input.wide{min-width:180px;}}

/* Variation Orders & BOQ comparison - Contract / Service PO / Subcontract */
.commitment-variation-panel{margin-top:16px;border:1px solid var(--border);background:linear-gradient(135deg,var(--surface-1),var(--surface-2));border-radius:22px;box-shadow:var(--shadow-sm);}
.commitment-boq-summary{grid-template-columns:repeat(5,minmax(0,1fr));}
.commitment-vo-summary,.commitment-comparison-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin:10px 0 14px;}
.commitment-vo-summary span,.commitment-comparison-summary span{display:flex;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:14px;background:var(--surface-1);}
.commitment-vo-summary i,.commitment-comparison-summary i{font-style:normal;color:var(--muted);font-size:.78rem;}
.commitment-vo-summary b,.commitment-comparison-summary b{font-size:.9rem;}
.commitment-vo-entry,.commitment-vo-history,.commitment-comparison-box{margin-top:14px;padding:14px;border:1px solid var(--border);border-radius:18px;background:var(--surface-2);}
.commitment-vo-entry[hidden]{display:none;}
.commitment-vo-entry-head,.commitment-comparison-head,.commitment-vo-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px;}
.commitment-vo-entry-head h3,.commitment-comparison-head h3,.commitment-vo-history h3{margin:0;}
.commitment-vo-entry-head p,.commitment-comparison-head p,.commitment-vo-history p{margin:3px 0 0;color:var(--muted);font-size:.84rem;}
.commitment-vo-toolbar{align-items:center;margin-top:12px;}
.commitment-vo-totals{display:flex;flex-wrap:wrap;gap:10px;color:var(--muted);font-size:.88rem;}
.commitment-vo-table th,.commitment-vo-history-grid th,.commitment-comparison-table th{white-space:nowrap;}
.commitment-vo-table td,.commitment-vo-history-grid td,.commitment-comparison-table td{vertical-align:middle;}
.commitment-vo-table .table-input{min-width:92px;max-width:150px;padding:7px 9px;border-radius:10px;}
.commitment-vo-table .table-input.wide{min-width:280px;max-width:520px;}
.commitment-vo-table .table-input.mini{min-width:72px;max-width:90px;}
.commitment-comparison-controls{display:flex;flex-wrap:wrap;align-items:end;gap:10px;}
.commitment-comparison-controls label{display:grid;gap:5px;color:var(--muted);font-size:.8rem;min-width:190px;}
.commitment-comparison-scroll{max-height:620px;}
.commitment-comparison-table thead tr:first-child th{background:rgba(59,130,246,.10);text-align:center;font-weight:800;}
.commitment-comparison-table tbody tr.comparison-added{background:rgba(34,197,94,.10);box-shadow:inset 4px 0 0 rgba(34,197,94,.70);}
.commitment-comparison-table tbody tr.comparison-removed{background:rgba(239,68,68,.10);box-shadow:inset 4px 0 0 rgba(239,68,68,.70);}
.commitment-comparison-table tbody tr.comparison-changed{background:rgba(245,158,11,.12);box-shadow:inset 4px 0 0 rgba(245,158,11,.75);}
.commitment-comparison-table tbody tr.comparison-unchanged{opacity:.78;}
html[dir="rtl"] .commitment-comparison-table tbody tr.comparison-added{box-shadow:inset -4px 0 0 rgba(34,197,94,.70);}
html[dir="rtl"] .commitment-comparison-table tbody tr.comparison-removed{box-shadow:inset -4px 0 0 rgba(239,68,68,.70);}
html[dir="rtl"] .commitment-comparison-table tbody tr.comparison-changed{box-shadow:inset -4px 0 0 rgba(245,158,11,.75);}
.comparison-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:4px 8px;font-size:.72rem;font-weight:800;letter-spacing:.02em;}
.comparison-badge-added{background:rgba(34,197,94,.18);color:#16a34a;}
.comparison-badge-removed{background:rgba(239,68,68,.18);color:#dc2626;}
.comparison-badge-changed{background:rgba(245,158,11,.20);color:#d97706;}
.comparison-badge-unchanged{background:var(--surface-2);color:var(--muted);}
.delta-positive{color:#16a34a;font-weight:800;}
.delta-negative{color:#dc2626;font-weight:800;}
@media (max-width:900px){.commitment-boq-summary{grid-template-columns:repeat(2,minmax(0,1fr));}.commitment-vo-entry-head,.commitment-comparison-head,.commitment-vo-toolbar{display:grid;}.commitment-comparison-controls label{min-width:0;}.commitment-comparison-controls{display:grid;}}
@media (max-width:640px){.commitment-boq-summary{grid-template-columns:1fr;}}

/* Contract IPC paid status dashboard */
.contract-dashboard-compact {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .85fr);
  gap: 14px;
  margin: 14px 0 16px;
  align-items: stretch;
}
.contract-dashboard-hero,
.contract-dashboard-side article {
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface-1), var(--surface-2));
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
.contract-dashboard-hero {
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow: hidden;
  position: relative;
}
.contract-dashboard-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(59,130,246,.11);
  pointer-events: none;
}
.contract-dashboard-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}
.contract-dashboard-hero h2 {
  margin: 4px 0 2px;
  font-size: 1.45rem;
  letter-spacing: -.03em;
}
.contract-dashboard-hero p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}
.contract-dashboard-score {
  min-width: 96px;
  text-align: center;
  padding: 9px 11px;
  border: 1px solid rgba(34,197,94,.24);
  background: rgba(34,197,94,.11);
  border-radius: 16px;
}
.contract-dashboard-score strong {
  display: block;
  font-size: 1.05rem;
}
.contract-dashboard-score span {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.contract-dashboard-bars {
  display: grid;
  gap: 7px;
  position: relative;
  z-index: 1;
}
.contract-dashboard-bars div:not(.contract-progress-bar) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}
.contract-dashboard-bars b { color: var(--text); }
.contract-progress-bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(148,163,184,.22);
  overflow: hidden;
}
.contract-progress-fill {
  display: block;
  height: 100%;
  width: min(var(--contract-progress), 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(59,130,246,.65), rgba(34,197,94,.82));
}
.contract-progress-bar.payment .contract-progress-fill {
  width: min(var(--contract-payment), 100%);
  background: linear-gradient(90deg, rgba(16,185,129,.65), rgba(34,197,94,.9));
}
.contract-dashboard-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: .8rem;
  position: relative;
  z-index: 1;
}
.contract-dashboard-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.contract-dashboard-side article {
  padding: 12px;
  display: grid;
  gap: 4px;
  min-height: 92px;
}
.contract-dashboard-side span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.contract-dashboard-side strong { font-size: .95rem; }
.contract-dashboard-side small {
  color: var(--muted);
  font-size: .76rem;
}
.page-cost-control-commitments .span-3 { grid-column: span 3; }

.commitment-dashboard-compact .contract-dashboard-side {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.commitment-dashboard-hero::after {
  background: radial-gradient(circle, rgba(59,130,246,.16), rgba(34,197,94,.08) 55%, transparent 72%);
}
.commitment-payment-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.payment-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(34,197,94,.12);
  color: #16a34a;
  border: 1px solid rgba(34,197,94,.22);
  font-size: .75rem;
  font-weight: 800;
  white-space: nowrap;
}
.contract-record-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ipc-paid-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  font-weight: 800;
}
.ipc-paid-entry input,
.ipc-paid-toggle input { accent-color: #16a34a; }
.ipc-paid-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(245,158,11,.28);
  background: rgba(245,158,11,.10);
  font-size: .76rem;
  font-weight: 800;
  color: #d97706;
  cursor: pointer;
  white-space: nowrap;
}
.ipc-paid-toggle.is-paid {
  border-color: rgba(34,197,94,.28);
  background: rgba(34,197,94,.12);
  color: #16a34a;
}
.ipc-paid-toggle input:disabled { cursor: not-allowed; }
.commitment-record-strip em { font-style: normal; }
@media (max-width: 1120px) {
  .contract-dashboard-compact { grid-template-columns: 1fr; }
  .contract-dashboard-side, .commitment-dashboard-compact .contract-dashboard-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contract-record-strip, .commitment-payment-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .contract-dashboard-hero-top { display: grid; }
  .contract-dashboard-score { text-align: start; }
  .contract-dashboard-side, .commitment-dashboard-compact .contract-dashboard-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contract-record-strip, .commitment-payment-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .contract-dashboard-side,
  .commitment-dashboard-compact .contract-dashboard-side,
  .contract-record-strip,
  .commitment-payment-strip { grid-template-columns: 1fr; }
}

/* Budget actual mapping */
.page-cost-control-budget-mapping .budget-mapping-filter-grid {
  grid-template-columns: minmax(320px, 1.4fr) minmax(220px, .7fr) auto;
  align-items: end;
}
.page-cost-control-budget-mapping .budget-mapping-check {
  min-height: 54px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.035);
  font-weight:850;
  color:var(--text-strong);
}
.page-cost-control-budget-mapping .budget-mapping-check input { width:16px; height:16px; }
.page-cost-control-budget-mapping .metric-orange { --card-accent: var(--accent-amber); }
.page-cost-control-budget-mapping .budget-mapping-warning {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, .35);
  border-radius: 16px;
  background: rgba(245, 158, 11, .09);
  color: var(--text-strong);
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.page-cost-control-budget-mapping .budget-mapping-warning span { color: var(--muted); font-weight:750; }
.page-cost-control-budget-mapping .budget-line-utilization-scroll { max-height: 360px; }
.page-cost-control-budget-mapping .budget-actual-mapping-scroll { max-height: 68vh; }
.page-cost-control-budget-mapping .budget-line-utilization-table th,
.page-cost-control-budget-mapping .budget-line-utilization-table td,
.page-cost-control-budget-mapping .budget-actual-mapping-table th,
.page-cost-control-budget-mapping .budget-actual-mapping-table td {
  vertical-align: middle;
}
.page-cost-control-budget-mapping .budget-line-utilization-table td small,
.page-cost-control-budget-mapping .budget-actual-mapping-table td small {
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-weight:750;
}
.page-cost-control-budget-mapping .budget-actual-mapping-table .tab-code {
  min-width: 42px;
  text-align:center;
  display:inline-flex;
  justify-content:center;
  margin-bottom:4px;
}
.page-cost-control-budget-mapping .budget-actual-mapping-table tr.is-mapped { background: rgba(34, 197, 94, .045); }
.page-cost-control-budget-mapping .budget-actual-mapping-table tr.is-unmapped { background: rgba(245, 158, 11, .035); }
.page-cost-control-budget-mapping .budget-line-select { min-width: 340px; }
.page-cost-control-budget-mapping .compact-input { min-width: 180px; }
.page-cost-control-budget-mapping .budget-mapping-form-head { position: sticky; top: 0; z-index: 3; background: var(--panel-bg); }
.page-cost-control-budget-mapping .budget-mapping-bottom-actions { justify-content:flex-end; padding-top:14px; }
html[data-theme="light"] .page-cost-control-budget-mapping .budget-mapping-check { background:#fff; }
@media (max-width: 980px) {
  .page-cost-control-budget-mapping .budget-mapping-filter-grid { grid-template-columns: 1fr; }
  .page-cost-control-budget-mapping .budget-line-select { min-width: 260px; }
}

/* ========================================================================== 
   Temporary Cost Control · Professional Report Page
   ========================================================================== */
.cc-report-page-head h1 { letter-spacing: -.035em; }
.cc-report-control-panel { margin-bottom: 16px; }
.cc-report-filter { grid-template-columns: minmax(260px, 1.2fr) minmax(260px, 1fr) minmax(320px, 1.5fr) auto; align-items: end; }
.cc-report-hero-grid { display: grid; grid-template-columns: 1.8fr repeat(4, minmax(170px, 1fr)); gap: 14px; margin: 18px 0; }
.cc-report-hero-card,
.cc-report-mini-card,
.cc-report-snapshot-card,
.cc-report-accordion,
.cc-report-source-card,
.cc-report-variance-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(17, 36, 59, .94), rgba(12, 27, 46, .82));
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}
.cc-report-hero-main { min-height: 150px; padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; overflow: hidden; position: relative; }
.cc-report-hero-main::after { content:""; position:absolute; inset:auto -80px -100px auto; width:240px; height:240px; border-radius:999px; background:rgba(53,214,255,.10); filter:blur(4px); }
.cc-report-hero-main h2 { margin: 4px 0 4px; font-size: clamp(1.35rem, 2vw, 2.05rem); }
.cc-report-hero-main p { margin: 0; color: var(--muted); max-width: 760px; }
.cc-report-mini-card { min-height: 150px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.cc-report-mini-card span,
.cc-report-mini-card small { color: var(--muted); font-weight: 800; }
.cc-report-mini-card strong { color: var(--text-strong); font-size: clamp(1.1rem, 1.6vw, 1.55rem); letter-spacing: -.02em; }
.cc-report-mini-card.is-danger strong { color: var(--accent-red); }
.cc-report-radial { --pct: 0; flex: 0 0 auto; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; text-align: center; position: relative; background: conic-gradient(var(--accent-cyan) calc(var(--pct) * 1%), rgba(154,180,210,.14) 0); box-shadow: inset 0 0 0 10px rgba(6, 16, 29, .72); }
.cc-report-radial::after { content:""; position:absolute; inset:13px; border-radius:inherit; background: var(--surface-1); border: 1px solid var(--line-soft); }
.cc-report-radial strong,
.cc-report-radial span { position:relative; z-index:1; display:block; }
.cc-report-radial strong { color: var(--text-strong); font-size: 1.25rem; line-height: 1; }
.cc-report-radial span { color: var(--muted); font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.cc-report-snapshot-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin: 0 0 16px; }
.cc-report-snapshot-card { padding: 18px; }
.cc-report-progress-stack { display: grid; gap: 14px; }
.cc-report-progress-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
.cc-report-progress-row strong { color: var(--text-strong); display:block; }
.cc-report-progress-row span { color: var(--muted); font-size: .82rem; }
.cc-report-progress-row b { color: var(--accent-cyan); font-size: 1.05rem; }
.cc-report-progress { grid-column: 1 / -1; height: 11px; border-radius: 999px; overflow: hidden; background: rgba(154,180,210,.13); border: 1px solid var(--line-soft); }
.cc-report-progress i,
.cc-report-mini-bar i,
.cc-report-table-progress i { display:block; height:100%; max-width: 100%; border-radius:inherit; background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan), var(--accent-green)); }
.cc-report-signal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cc-report-signal-grid > div { padding: 14px; border: 1px solid var(--line-soft); border-radius: 18px; background: rgba(8, 22, 37, .42); }
.cc-report-signal-grid span,
.cc-report-signal-grid small { color: var(--muted); font-weight: 800; display:block; }
.cc-report-signal-grid strong { color: var(--text-strong); font-size: 1.12rem; display:block; margin: 4px 0; }
.cc-report-layout { display: grid; gap: 14px; margin-bottom: 28px; }
.cc-report-accordion { overflow: clip; }
.cc-report-accordion > summary,
.cc-report-source-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 19px; }
.cc-report-accordion > summary::-webkit-details-marker,
.cc-report-source-card > summary::-webkit-details-marker { display: none; }
.cc-report-accordion > summary { border-bottom: 1px solid transparent; }
.cc-report-accordion[open] > summary { border-bottom-color: var(--line-soft); }
.cc-report-accordion > summary > div,
.cc-report-source-title { min-width:0; display:flex; align-items:center; gap: 12px; }
.cc-report-accordion > summary strong,
.cc-report-source-title strong { color: var(--text-strong); display:block; font-size: 1.03rem; }
.cc-report-accordion > summary small,
.cc-report-source-title small,
.cc-report-source-amount small { color: var(--muted); display:block; font-weight: 750; }
.cc-report-accordion > summary b,
.cc-report-source-amount strong { color: var(--text-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-report-code { width: 42px; height: 34px; display:inline-grid; place-items:center; border-radius: 13px; color: #dff8ff; background: rgba(90,167,255,.20); border: 1px solid rgba(90,167,255,.28); font-size: .78rem; font-weight: 950; letter-spacing: .04em; }
.cc-report-code-green { background: rgba(73,220,136,.18); border-color: rgba(73,220,136,.32); }
.cc-report-code-slate { background: rgba(148,163,184,.18); border-color: rgba(148,163,184,.32); }
.cc-report-code-teal { background: rgba(45,212,191,.18); border-color: rgba(45,212,191,.32); }
.cc-report-code-purple { background: rgba(167,139,250,.18); border-color: rgba(167,139,250,.32); }
.cc-report-code-orange { background: rgba(251,146,60,.18); border-color: rgba(251,146,60,.32); }
.cc-report-code-cyan { background: rgba(53,214,255,.18); border-color: rgba(53,214,255,.32); }
html[data-theme="light"] .cc-report-code { color: #1e3a8a; background: rgba(37,99,235,.10); border-color: rgba(37,99,235,.20); }
html[data-theme="light"] .cc-report-code-green { color: #166534; background: rgba(34,197,94,.12); border-color: rgba(22,163,74,.22); }
html[data-theme="light"] .cc-report-code-slate { color: #334155; background: rgba(100,116,139,.12); border-color: rgba(71,85,105,.22); }
html[data-theme="light"] .cc-report-code-teal { color: #0f766e; background: rgba(20,184,166,.12); border-color: rgba(15,118,110,.22); }
html[data-theme="light"] .cc-report-code-purple { color: #6d28d9; background: rgba(124,58,237,.12); border-color: rgba(109,40,217,.22); }
html[data-theme="light"] .cc-report-code-orange { color: #9a3412; background: rgba(249,115,22,.13); border-color: rgba(194,65,12,.24); }
html[data-theme="light"] .cc-report-code-cyan { color: #0e7490; background: rgba(6,182,212,.12); border-color: rgba(14,116,144,.22); }
.cc-report-accordion-body { padding: 18px; }
.cc-report-info-strip { display:grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.cc-report-info-strip > div { border: 1px solid var(--line-soft); border-radius: 16px; background: rgba(8,22,37,.44); padding: 13px; }
.cc-report-info-strip span { color: var(--muted); font-weight: 850; display:block; }
.cc-report-info-strip strong { color: var(--text-strong); display:block; margin-top: 3px; }
.cc-report-breakdown-grid { display:grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; }
.cc-report-breakdown-item { padding: 14px; border-radius: 17px; border: 1px solid var(--line-soft); background: rgba(8,22,37,.38); }
.cc-report-breakdown-item > div:first-child { display:flex; align-items:center; justify-content:space-between; gap: 10px; }
.cc-report-breakdown-item strong { color: var(--text-strong); }
.cc-report-breakdown-item span,
.cc-report-breakdown-item small { color: var(--muted); font-weight: 800; }
.cc-report-mini-bar { height: 9px; margin: 10px 0 8px; border-radius: 999px; overflow:hidden; background: rgba(154,180,210,.13); }
.cc-report-section-card-grid { display:grid; gap: 12px; }
.cc-report-source-card { background: rgba(8,22,37,.42); box-shadow:none; }
.cc-report-source-card[open] > summary { border-bottom: 1px solid var(--line-soft); }
.cc-report-source-amount { text-align: right; }
.cc-report-source-body { padding: 16px; display:grid; gap: 14px; }
.cc-report-source-metrics { display:grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 10px; }
.cc-report-source-metrics > div { border:1px solid var(--line-soft); border-radius: 15px; padding: 12px; background: rgba(6,16,29,.35); }
.cc-report-source-metrics span { color: var(--muted); font-weight: 850; display:block; }
.cc-report-source-metrics strong { color: var(--text-strong); display:block; margin-top: 4px; overflow:hidden; text-overflow:ellipsis; }
.cc-report-detail-columns { display:grid; grid-template-columns: minmax(280px, .8fr) 1.4fr; gap: 14px; }
.cc-report-detail-columns h4 { margin:0 0 10px; color: var(--text-strong); }
.cc-report-breakdown-line { display:grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items:center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.cc-report-breakdown-line span { color: var(--text-soft); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cc-report-breakdown-line b { color: var(--text-strong); white-space:nowrap; }
.cc-report-breakdown-line i { color: var(--muted); font-style: normal; font-weight: 850; }
.cc-report-mini-table-wrap { max-height: 360px; }
.cc-report-mini-table small { display:block; color: var(--muted); margin-top: 2px; }
.status-pill { display:inline-flex; align-items:center; justify-content:center; min-height: 24px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 950; border: 1px solid var(--line-soft); background: rgba(148,163,184,.13); color: var(--muted); white-space:nowrap; }
.status-pill.success { color: #bbf7d0; background: rgba(34,197,94,.16); border-color: rgba(34,197,94,.30); }
html[data-theme="light"] .status-pill.success { color: #166534; background: rgba(34,197,94,.12); border-color: rgba(22,163,74,.24); }
html[data-theme="light"] .status-pill.warning { color: #92400e; background: rgba(245,158,11,.14); border-color: rgba(217,119,6,.28); }
html[data-theme="light"] .status-pill.danger { color: #991b1b; background: rgba(239,68,68,.12); border-color: rgba(220,38,38,.25); }
html[data-theme="light"] .status-pill.neutral { color: #475569; background: rgba(100,116,139,.10); border-color: rgba(71,85,105,.20); }
.status-pill.warning { color: #fde68a; background: rgba(245,158,11,.16); border-color: rgba(245,158,11,.32); }
.status-pill.danger { color: #fecaca; background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.32); }
.status-pill.neutral { color: var(--muted); }
.text-danger { color: var(--accent-red) !important; }
.muted-text { color: var(--muted); }
.cc-report-budget-table td:nth-child(4) { min-width: 320px; }
.cc-report-table-progress { position:relative; height: 25px; min-width: 118px; border-radius: 999px; overflow:hidden; background: rgba(154,180,210,.13); border: 1px solid var(--line-soft); }
.cc-report-table-progress span { position:absolute; inset:0; display:grid; place-items:center; color: var(--text-strong); font-size:.75rem; font-weight: 950; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.cc-report-variance-grid { display:grid; grid-template-columns: repeat(2, minmax(260px,1fr)); gap: 12px; }
.cc-report-variance-card { padding: 15px; }
.cc-report-variance-card span { color: var(--accent-cyan); font-weight: 950; font-size:.78rem; }
.cc-report-variance-card strong { display:block; color: var(--text-strong); margin: 5px 0 10px; }
.cc-report-variance-card div { display:grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cc-report-variance-card small { color: var(--muted); font-weight: 800; }
html[data-theme="light"] .cc-report-hero-card,
html[data-theme="light"] .cc-report-mini-card,
html[data-theme="light"] .cc-report-snapshot-card,
html[data-theme="light"] .cc-report-accordion,
html[data-theme="light"] .cc-report-source-card,
html[data-theme="light"] .cc-report-variance-card {
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(241,245,249,.88));
}
html[data-theme="light"] .cc-report-radial::after { background: #fff; }
html[data-theme="light"] .cc-report-source-card,
html[data-theme="light"] .cc-report-info-strip > div,
html[data-theme="light"] .cc-report-source-metrics > div,
html[data-theme="light"] .cc-report-breakdown-item,
html[data-theme="light"] .cc-report-signal-grid > div { background: rgba(248,250,252,.74); }
@media (max-width: 1280px) {
  .cc-report-hero-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .cc-report-hero-main { grid-column: 1 / -1; }
  .cc-report-filter, .cc-report-snapshot-grid, .cc-report-detail-columns { grid-template-columns: 1fr; }
  .cc-report-breakdown-grid, .cc-report-source-metrics, .cc-report-info-strip { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}
@media (max-width: 760px) {
  .cc-report-hero-grid, .cc-report-breakdown-grid, .cc-report-source-metrics, .cc-report-info-strip, .cc-report-signal-grid, .cc-report-variance-grid { grid-template-columns: 1fr; }
  .cc-report-hero-main, .cc-report-accordion > summary, .cc-report-source-card > summary { align-items:flex-start; flex-direction:column; }
  .cc-report-source-amount { text-align:left; }
}

/* Cost Control Report — old-program style bar snapshots */
.cc-report-bar-snapshot-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) minmax(320px, .9fr) minmax(320px, .9fr);
  gap: 14px;
  margin: 0 0 16px;
}
.cc-report-old-snapshot-card {
  padding: 18px;
  overflow: hidden;
  position: relative;
}
.cc-report-old-snapshot-main {
  background: linear-gradient(135deg, rgba(2,6,23,.96), rgba(15,23,42,.94) 48%, rgba(2,8,23,.96));
}
.cc-report-old-snapshot-main::after {
  content: "";
  position: absolute;
  inset: auto -90px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(53,214,255,.12);
  filter: blur(4px);
  pointer-events: none;
}
.cc-snapshot-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.cc-snapshot-card-head.compact { margin-bottom: 13px; }
.cc-snapshot-card-head h2 {
  margin: 2px 0 4px;
  color: var(--text-strong);
  font-size: 1.13rem;
  letter-spacing: -.025em;
}
.cc-snapshot-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  max-width: 620px;
}
.cc-snapshot-baseline-pill {
  min-width: 150px;
  padding: 10px 12px;
  border-radius: 17px;
  border: 1px solid rgba(154,180,210,.18);
  background: rgba(6,16,29,.58);
  text-align: right;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.cc-snapshot-baseline-pill span,
.cc-snapshot-total {
  color: var(--muted);
  font-weight: 900;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.cc-snapshot-baseline-pill strong,
.cc-snapshot-total {
  display: block;
  color: var(--text-strong);
  font-size: .98rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.cc-snapshot-main-grid {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) 1.6fr;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.cc-snapshot-kpi-stack {
  display: grid;
  gap: 9px;
}
.cc-snapshot-kpi-stack > div {
  padding: 12px;
  border-radius: 17px;
  border: 1px solid rgba(154,180,210,.16);
  background: rgba(6,16,29,.52);
}
.cc-snapshot-kpi-stack span,
.cc-snapshot-kpi-stack small {
  color: var(--muted);
  display: block;
  font-weight: 850;
}
.cc-snapshot-kpi-stack strong {
  color: var(--text-strong);
  display: block;
  margin: 4px 0 2px;
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}
.cc-snapshot-bar-stack,
.cc-snapshot-resource-list {
  display: grid;
  gap: 9px;
}
.cc-snapshot-bar-row,
.cc-snapshot-resource-row {
  display: grid;
  grid-template-columns: 132px minmax(120px, 1fr) 190px;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cc-snapshot-resource-row { grid-template-columns: 128px minmax(110px, 1fr) 176px; }
.cc-snapshot-bar-label,
.cc-snapshot-resource-label {
  color: var(--text-soft);
  font-weight: 900;
  font-size: .78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-snapshot-resource-label b {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 24px;
  margin-right: 6px;
  border-radius: 10px;
  color: #dff8ff;
  background: rgba(90,167,255,.18);
  border: 1px solid rgba(90,167,255,.25);
  font-size: .68rem;
  letter-spacing: .04em;
}
.cc-snapshot-track,
.cc-snapshot-resource-track {
  position: relative;
  height: 11px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(154,180,210,.12);
  border: 1px solid rgba(154,180,210,.14);
}
.cc-snapshot-resource-track { height: 8px; }
.cc-snapshot-bar,
.cc-snapshot-segment {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  max-width: 100%;
  border-radius: inherit;
  box-shadow: 0 0 18px rgba(53,214,255,.10);
}
.cc-snapshot-bar-contract { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.cc-snapshot-bar-budget { background: linear-gradient(90deg, #a855f7, #ec4899); }
.cc-snapshot-bar-mapped { background: linear-gradient(90deg, #22c55e, #16a34a); }
.cc-snapshot-bar-unmapped { background: linear-gradient(90deg, #f59e0b, #f97316); }
.cc-snapshot-bar-commitment { background: linear-gradient(90deg, #06b6d4, #0ea5e9); }
.cc-snapshot-bar-amount,
.cc-snapshot-resource-amount {
  color: var(--text-strong);
  text-align: right;
  font-size: .78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cc-snapshot-bar-amount span,
.cc-snapshot-resource-amount span,
.cc-snapshot-resource-amount em {
  color: var(--muted);
  font-style: normal;
  font-weight: 850;
  margin-left: 4px;
}
.cc-snapshot-resource-amount em {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(154,180,210,.18);
  background: rgba(154,180,210,.10);
  font-size: .68rem;
}
.cc-snapshot-segment { background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); }
.cc-snapshot-segment-labor,
.cc-snapshot-segment-manpower { background: linear-gradient(90deg, #22c55e, #16a34a); }
.cc-snapshot-segment-material { background: linear-gradient(90deg, #f97316, #ea580c); }
.cc-snapshot-segment-equipment,
.cc-snapshot-segment-machinery-equipment { background: linear-gradient(90deg, #0ea5e9, #1d4ed8); }
.cc-snapshot-segment-subcontract { background: linear-gradient(90deg, #fb923c, #f97316); }
.cc-snapshot-segment-service-purchase-order { background: linear-gradient(90deg, #a855f7, #7c3aed); }
.cc-snapshot-segment-expense,
.cc-snapshot-segment-indirect,
.cc-snapshot-segment-preliminaries { background: linear-gradient(90deg, #eab308, #f97316); }
.cc-snapshot-segment-general,
.cc-snapshot-segment-other { background: linear-gradient(90deg, #94a3b8, #475569); }
html[data-theme="light"] .cc-report-old-snapshot-main {
  background: linear-gradient(135deg, #0f172a, #172554 46%, #0f172a);
}
html[data-theme="light"] .cc-snapshot-kpi-stack > div,
html[data-theme="light"] .cc-snapshot-baseline-pill {
  background: rgba(15,23,42,.55);
}
@media (max-width: 1280px) {
  .cc-report-bar-snapshot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .cc-snapshot-main-grid { grid-template-columns: 1fr; }
  .cc-snapshot-bar-row,
  .cc-snapshot-resource-row { grid-template-columns: 1fr; align-items: start; gap: 6px; }
  .cc-snapshot-bar-amount,
  .cc-snapshot-resource-amount { text-align: left; }
}

/* Cost Control Report — dark analytic panels keep readable text in light mode */
.cc-report-financial-snapshot,
.cc-report-ba-snapshot,
.cc-report-cashflow {
  --text-strong: #f8fafc;
  --text-soft: #dbeafe;
  --muted: #b8c7da;
  --line-soft: rgba(154,180,210,.18);
}

/* Cost Control Report — integrated old-program financial snapshot */
.cc-report-financial-snapshot {
  position: relative;
  overflow: hidden;
  padding: 20px;
  margin: 0 0 16px;
  border: 1px solid rgba(154,180,210,.16);
  background:
    radial-gradient(circle at 12% 0%, rgba(53,214,255,.16), transparent 34%),
    linear-gradient(135deg, rgba(2,6,23,.97), rgba(15,23,42,.95) 48%, rgba(2,8,23,.98));
}
.cc-report-financial-snapshot::after {
  content: "";
  position: absolute;
  inset: auto -120px -150px auto;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: rgba(90,167,255,.13);
  filter: blur(7px);
  pointer-events: none;
}
.cc-fin-snapshot-head,
.cc-fin-kpi-strip,
.cc-fin-snapshot-wrap,
.cc-fin-legend {
  position: relative;
  z-index: 1;
}
.cc-fin-snapshot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.cc-fin-snapshot-head h2 {
  color: var(--text-strong);
  font-size: 1.22rem;
  line-height: 1.15;
  margin: 2px 0 5px;
  letter-spacing: -.03em;
}
.cc-fin-snapshot-head p {
  color: var(--muted);
  margin: 0;
  max-width: 780px;
  font-weight: 750;
  font-size: .86rem;
}
.cc-fin-snapshot-head-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(124px, auto));
  gap: 8px;
  align-items: stretch;
}
.cc-fin-snapshot-head-metrics > div,
.cc-fin-kpi-strip > div {
  border: 1px solid rgba(154,180,210,.16);
  background: rgba(6,16,29,.56);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.018);
}
.cc-fin-snapshot-head-metrics span,
.cc-fin-kpi-strip span,
.cc-fin-kpi-strip small {
  display: block;
  color: var(--muted);
  font-weight: 900;
  font-size: .71rem;
  text-transform: uppercase;
  letter-spacing: .075em;
}
.cc-fin-snapshot-head-metrics strong,
.cc-fin-kpi-strip strong {
  display: block;
  color: var(--text-strong);
  margin-top: 4px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cc-fin-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.cc-fin-kpi-strip > div.is-danger strong { color: #fecaca; }
.cc-fin-kpi-strip > div.is-good strong { color: #bbf7d0; }
.cc-fin-kpi-strip small {
  margin-top: 2px;
  font-size: .68rem;
  text-transform: none;
  letter-spacing: .02em;
}
.cc-fin-snapshot-wrap {
  --cc-fin-label-col: 230px;
  --cc-fin-amount-col: 265px;
  --cc-fin-gap: 12px;
  display: grid;
  gap: 10px;
  padding-top: 78px;
  overflow: visible;
}
.cc-fin-line-layer {
  position: absolute;
  left: calc(var(--cc-fin-label-col) + var(--cc-fin-gap));
  right: calc(var(--cc-fin-amount-col) + var(--cc-fin-gap));
  top: 78px;
  bottom: 0;
  pointer-events: none;
  z-index: 4;
}
.cc-fin-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-right: 2px dashed #0f172a;
}
.cc-fin-line span {
  position: absolute;
  left: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: .72rem;
  font-weight: 950;
  background: rgba(255,255,255,.96);
  color: #0f172a;
  box-shadow: 0 6px 18px rgba(0,0,0,.20);
  border: 1px solid rgba(15,23,42,.12);
}
.cc-fin-line-ac { border-color: #111827; z-index: 6; }
.cc-fin-line-eac { border-color: #dc2626; z-index: 5; }
.cc-fin-line-bac { border-color: #22c55e; z-index: 7; }
.cc-fin-line-ac span { top: -66px; color: #111827; }
.cc-fin-line-eac span { top: -42px; color: #991b1b; }
.cc-fin-line-bac span { top: -18px; color: #065f46; }
.cc-fin-snapshot-row {
  display: grid;
  grid-template-columns: var(--cc-fin-label-col) minmax(260px, 1fr) var(--cc-fin-amount-col);
  gap: var(--cc-fin-gap);
  align-items: center;
  min-width: 0;
}
.cc-fin-row-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text-soft);
  font-size: .82rem;
  font-weight: 950;
}
.cc-fin-row-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-fin-row-label b {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 42px;
  height: 24px;
  padding: 0 7px;
  border-radius: 10px;
  color: #dff8ff;
  background: rgba(90,167,255,.18);
  border: 1px solid rgba(90,167,255,.25);
  font-size: .66rem;
  letter-spacing: .05em;
}
.cc-fin-row-label em {
  display: none;
}
.cc-fin-track {
  position: relative;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(154,180,210,.13);
  border: 1px solid rgba(154,180,210,.15);
  box-shadow: inset 0 1px 8px rgba(0,0,0,.20);
}
.cc-fin-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  min-width: 2px;
}
.cc-fin-contract-base {
  background: rgba(59,130,246,.16);
  box-shadow: inset 0 0 0 1px rgba(147,197,253,.20);
}
.cc-fin-contract-used { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.cc-fin-contract-remaining { background: rgba(147,197,253,.28); }
.cc-fin-actual { box-shadow: 0 0 18px rgba(53,214,255,.16); }
.cc-fin-color-0 { background: linear-gradient(90deg, #ef4444, #fb7185); }
.cc-fin-color-1 { background: linear-gradient(90deg, #22c55e, #86efac); }
.cc-fin-color-2 { background: linear-gradient(90deg, #a855f7, #c084fc); }
.cc-fin-color-3 { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.cc-fin-color-4 { background: linear-gradient(90deg, #06b6d4, #67e8f9); }
.cc-fin-color-5 { background: linear-gradient(90deg, #f97316, #fdba74); }
.cc-fin-color-6 { background: linear-gradient(90deg, #14b8a6, #5eead4); }
.cc-fin-color-7 { background: linear-gradient(90deg, #64748b, #cbd5e1); }
.cc-fin-ctc {
  background: repeating-linear-gradient(45deg, #facc15 0 8px, #fde68a 8px 16px);
  box-shadow: 0 0 18px rgba(250,204,21,.12);
}
.cc-fin-ctc-overrun {
  background: linear-gradient(90deg, #dc2626, #fb7185);
  box-shadow: 0 0 18px rgba(248,113,113,.18);
}
.cc-fin-row-amount {
  color: var(--text-strong);
  text-align: right;
  font-size: .82rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cc-fin-row-amount span {
  color: var(--muted);
  font-weight: 850;
  margin-left: 6px;
}
.cc-fin-contract-row .cc-fin-row-label,
.cc-fin-contract-row .cc-fin-row-amount {
  color: var(--text-strong);
}
.cc-fin-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
}
.cc-fin-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.cc-fin-legend i {
  display: inline-block;
  width: 22px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(154,180,210,.20);
}
.cc-fin-legend i.actual { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.cc-fin-legend i.ctc { background: repeating-linear-gradient(45deg, #facc15 0 6px, #fde68a 6px 12px); }
.cc-fin-legend i.ctc-overrun { background: linear-gradient(90deg, #dc2626, #fb7185); }
.cc-fin-legend i.contract { background: rgba(147,197,253,.28); }
.cc-fin-legend i.line {
  width: 20px;
  height: 0;
  border: 0;
  border-top: 2px dashed #111827;
  border-radius: 0;
}
.cc-fin-legend i.line.eac { border-color: #dc2626; }
.cc-fin-legend i.line.bac { border-color: #22c55e; }
html[data-theme="light"] .cc-report-financial-snapshot {
  background: linear-gradient(135deg, #0f172a, #172554 46%, #0f172a);
}
html[data-theme="light"] .cc-fin-snapshot-head-metrics > div,
html[data-theme="light"] .cc-fin-kpi-strip > div {
  background: rgba(15,23,42,.58);
}
@media (max-width: 1180px) {
  .cc-fin-snapshot-head { flex-direction: column; }
  .cc-fin-snapshot-head-metrics { grid-template-columns: repeat(3, minmax(120px, 1fr)); width: 100%; }
  .cc-fin-kpi-strip { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
  .cc-fin-snapshot-wrap { --cc-fin-label-col: 190px; --cc-fin-amount-col: 220px; }
}
@media (max-width: 760px) {
  .cc-report-financial-snapshot { padding: 16px; }
  .cc-fin-snapshot-head-metrics,
  .cc-fin-kpi-strip { grid-template-columns: 1fr; }
  .cc-fin-snapshot-wrap {
    --cc-fin-label-col: 0px;
    --cc-fin-amount-col: 0px;
    --cc-fin-gap: 0px;
    padding-top: 92px;
    gap: 12px;
  }
  .cc-fin-line-layer { left: 0; right: 0; top: 92px; }
  .cc-fin-snapshot-row { grid-template-columns: 1fr; gap: 6px; }
  .cc-fin-row-label { min-height: 24px; }
  .cc-fin-row-amount { text-align: left; }
  .cc-fin-line span { font-size: .66rem; padding: 2px 6px; }
  .cc-fin-line-ac span { top: -80px; }
  .cc-fin-line-eac span { top: -53px; }
  .cc-fin-line-bac span { top: -26px; }
}

/* Cost Control Report — CTC stays on its related source row */
.cc-fin-row-amount-split {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.16;
}
.cc-fin-row-amount-split strong {
  display: block;
  color: var(--text-strong);
  font-size: .84rem;
  font-weight: 950;
}
.cc-fin-row-amount-split small {
  display: block;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 850;
  white-space: normal;
}
.cc-fin-snapshot-row .cc-fin-track .cc-fin-actual + .cc-fin-ctc {
  box-shadow: 0 0 18px rgba(250,204,21,.16), inset 0 0 0 1px rgba(120,53,15,.16);
}
@media (max-width: 760px) {
  .cc-fin-row-amount-split { align-items: flex-start; }
}

/* Cost Control Report — Budget vs Actual / VAC snapshot */
.cc-report-bva-snapshot-grid {
  grid-template-columns: minmax(520px, 1.35fr) minmax(320px, .825fr) minmax(320px, .825fr);
}
.cc-report-bva-main-card {
  min-height: 100%;
}
.cc-bva-main-grid {
  grid-template-columns: minmax(190px, .62fr) minmax(340px, 1.38fr);
  align-items: stretch;
}
.cc-bva-kpi-stack {
  grid-template-columns: 1fr;
}
.cc-bva-bar-stack {
  align-content: center;
  gap: 11px;
}
.cc-snapshot-bar-actual { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.cc-snapshot-bar-ctc { background: repeating-linear-gradient(45deg, #facc15 0 8px, #fde68a 8px 16px); }
.cc-snapshot-bar-eac { background: linear-gradient(90deg, #ef4444, #fb7185); }
.cc-snapshot-bar-vac-positive { background: linear-gradient(90deg, #22c55e, #86efac); }
.cc-snapshot-bar-vac-negative { background: linear-gradient(90deg, #dc2626, #fb7185); }
.cc-snapshot-vac-pill.is-danger strong,
.cc-snapshot-kpi-stack > div.is-danger strong,
.cc-snapshot-bar-amount.is-danger { color: #fecaca; }
.cc-snapshot-vac-pill.is-good strong,
.cc-snapshot-kpi-stack > div.is-good strong,
.cc-snapshot-bar-amount.is-good { color: #bbf7d0; }
.cc-report-budget-mix-card,
.cc-report-actual-mix-card {
  min-height: 100%;
}
.cc-report-budget-mix-card .cc-snapshot-resource-list,
.cc-report-actual-mix-card .cc-snapshot-resource-list {
  max-height: 340px;
  overflow: auto;
  padding-right: 3px;
}
.cc-report-bva-snapshot-grid .cc-snapshot-resource-label {
  display: flex;
  align-items: center;
  gap: 5px;
}
.cc-report-bva-snapshot-grid .cc-snapshot-resource-label b {
  margin-right: 0;
}
@media (max-width: 1380px) {
  .cc-report-bva-snapshot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .cc-bva-main-grid { grid-template-columns: 1fr; }
  .cc-report-budget-mix-card .cc-snapshot-resource-list,
  .cc-report-actual-mix-card .cc-snapshot-resource-list { max-height: none; }
}

/* Cost Control Report — old-program Budget vs Actual snapshot directly below financial snapshot */
.cc-report-ba-snapshot {
  position: relative;
  overflow: hidden;
  padding: 20px;
  margin: 0 0 16px;
  border: 1px solid rgba(154,180,210,.16);
  background:
    radial-gradient(circle at 10% 0%, rgba(34,197,94,.12), transparent 34%),
    linear-gradient(135deg, rgba(2,6,23,.97), rgba(15,23,42,.95) 48%, rgba(2,8,23,.98));
}
.cc-report-ba-snapshot::after {
  content: "";
  position: absolute;
  inset: auto -110px -150px auto;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background: rgba(250,204,21,.10);
  filter: blur(8px);
  pointer-events: none;
}
.cc-ba-head,
.cc-ba-rows,
.cc-ba-legend { position: relative; z-index: 1; }
.cc-ba-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.cc-ba-head h2 {
  color: var(--text-strong);
  font-size: 1.22rem;
  line-height: 1.15;
  margin: 2px 0 5px;
  letter-spacing: -.03em;
}
.cc-ba-head p {
  color: var(--muted);
  margin: 0;
  max-width: 850px;
  font-weight: 750;
  font-size: .86rem;
}
.cc-ba-head-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, auto));
  gap: 8px;
  align-items: stretch;
}
.cc-ba-head-metrics > div {
  border: 1px solid rgba(154,180,210,.16);
  background: rgba(6,16,29,.56);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.018);
}
.cc-ba-head-metrics span {
  display: block;
  color: var(--muted);
  font-weight: 900;
  font-size: .71rem;
  text-transform: uppercase;
  letter-spacing: .075em;
}
.cc-ba-head-metrics strong {
  display: block;
  color: var(--text-strong);
  margin-top: 4px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cc-ba-head-metrics > div.is-danger strong { color: #fecaca; }
.cc-ba-head-metrics > div.is-good strong { color: #bbf7d0; }
.cc-ba-rows {
  display: grid;
  gap: 10px;
}
.cc-ba-row {
  display: grid;
  grid-template-columns: 230px minmax(260px, 1fr) 385px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid rgba(154,180,210,.08);
}
.cc-ba-row:first-child { border-top: 0; padding-top: 0; }
.cc-ba-row.is-total {
  margin-top: 5px;
  padding: 13px 0 0;
  border-top: 1px solid rgba(125,211,252,.22);
}
.cc-ba-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text-soft);
  font-size: .82rem;
  font-weight: 950;
}
.cc-ba-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-ba-label em {
  display: block;
  flex-basis: 100%;
  margin-left: 49px;
  margin-top: -2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(191,203,218,.72);
  font-style: normal;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: 0;
}
.cc-ba-label {
  flex-wrap: wrap;
}
.cc-ba-label b {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 42px;
  height: 24px;
  padding: 0 7px;
  border-radius: 10px;
  color: #dff8ff;
  background: rgba(90,167,255,.18);
  border: 1px solid rgba(90,167,255,.25);
  font-size: .66rem;
  letter-spacing: .05em;
}
.cc-ba-dual {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.cc-ba-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(154,180,210,.12);
  border: 1px solid rgba(154,180,210,.15);
  box-shadow: inset 0 1px 8px rgba(0,0,0,.20);
}
.cc-ba-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 2px;
  max-width: 100%;
  border-radius: inherit;
}
.cc-ba-budget-fill {
  background: linear-gradient(90deg, #f59e0b, #fb923c);
  box-shadow: 0 0 16px rgba(245,158,11,.15);
}
.cc-ba-actual-fill {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  box-shadow: 0 0 16px rgba(56,189,248,.14);
}
.cc-ba-segment-machinery-equipment { background: linear-gradient(90deg, #ef4444, #fb7185); }
.cc-ba-segment-service-purchase-order { background: linear-gradient(90deg, #22c55e, #86efac); }
.cc-ba-segment-manpower { background: linear-gradient(90deg, #a855f7, #c084fc); }
.cc-ba-segment-expense { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.cc-ba-segment-subcontract { background: linear-gradient(90deg, #06b6d4, #67e8f9); }
.cc-ba-segment-material { background: linear-gradient(90deg, #f97316, #fdba74); }
.cc-ba-segment-grand-total { background: linear-gradient(90deg, #60a5fa, #22d3ee); }
.cc-ba-overrun-fill {
  background: linear-gradient(90deg, #dc2626, #fb7185);
  box-shadow: 0 0 16px rgba(248,113,113,.16);
}
.cc-ba-ctc-fill {
  background: repeating-linear-gradient(45deg, #facc15 0 8px, #fde68a 8px 16px);
  box-shadow: 0 0 16px rgba(250,204,21,.12);
}
.cc-ba-ctc-overrun-fill {
  background: linear-gradient(90deg, #dc2626, #fb7185);
  box-shadow: 0 0 16px rgba(248,113,113,.18);
}
.cc-ba-vac-positive-fill {
  background: repeating-linear-gradient(45deg, rgba(34,197,94,.78) 0 8px, rgba(134,239,172,.86) 8px 16px);
  box-shadow: 0 0 16px rgba(34,197,94,.12);
}
.cc-ba-budget-marker {
  width: 0 !important;
  min-width: 0 !important;
  border-right: 2px dashed rgba(255,255,255,.92);
  box-shadow: 0 0 0 1px rgba(15,23,42,.20);
  z-index: 5;
}
.cc-ba-fig {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: var(--text-strong);
  font-weight: 900;
  font-size: .78rem;
  line-height: 1.22;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.cc-ba-fig strong {
  display: block;
  color: var(--text-strong);
  font-size: .84rem;
  white-space: nowrap;
}
.cc-ba-fig span,
.cc-ba-fig small {
  display: block;
  color: var(--muted);
  font-weight: 850;
  font-size: .68rem;
  text-align: right;
}
.cc-ba-fig em {
  font-style: normal;
  font-weight: 950;
}
.cc-ba-fig em.is-danger { color: #fecaca; }
.cc-ba-fig em.is-good { color: #bbf7d0; }
.cc-ba-row.is-total .cc-ba-label,
.cc-ba-row.is-total .cc-ba-fig strong { color: #e0f2fe; }
.cc-ba-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
}
.cc-ba-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.cc-ba-legend i {
  display: inline-block;
  width: 22px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(154,180,210,.20);
}
.cc-ba-legend i.budget { background: linear-gradient(90deg, #f59e0b, #fb923c); }
.cc-ba-legend i.actual { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.cc-ba-legend i.ctc { background: repeating-linear-gradient(45deg, #facc15 0 6px, #fde68a 6px 12px); }
.cc-ba-legend i.ctc-overrun { background: linear-gradient(90deg, #dc2626, #fb7185); }
.cc-ba-legend i.vac { background: repeating-linear-gradient(45deg, rgba(34,197,94,.78) 0 6px, rgba(134,239,172,.86) 6px 12px); }
.cc-ba-legend i.over { background: linear-gradient(90deg, #dc2626, #fb7185); }
.cc-ba-legend i.marker {
  width: 0;
  height: 14px;
  border: 0;
  border-right: 2px dashed rgba(255,255,255,.92);
  border-radius: 0;
}
html[data-theme="light"] .cc-report-ba-snapshot {
  background: linear-gradient(135deg, #0f172a, #172554 46%, #0f172a);
}
html[data-theme="light"] .cc-ba-head-metrics > div {
  background: rgba(15,23,42,.58);
}
@media (max-width: 1180px) {
  .cc-ba-head { flex-direction: column; }
  .cc-ba-head-metrics { grid-template-columns: repeat(2, minmax(140px, 1fr)); width: 100%; }
  .cc-ba-row { grid-template-columns: 190px minmax(240px, 1fr) 300px; }
}
@media (max-width: 760px) {
  .cc-report-ba-snapshot { padding: 16px; }
  .cc-ba-head-metrics { grid-template-columns: 1fr; }
  .cc-ba-row { grid-template-columns: 1fr; gap: 7px; }
  .cc-ba-fig { align-items: flex-start; }
  .cc-ba-fig span,
  .cc-ba-fig small { text-align: left; }
}

/* Cost Control Report — Income vs Expense time trend */
.cc-report-cashflow {
  position: relative;
  overflow: hidden;
  padding: 20px;
  margin: 0 0 16px;
  border: 1px solid rgba(154,180,210,.16);
  background:
    radial-gradient(circle at 14% 0%, rgba(34,197,94,.13), transparent 36%),
    radial-gradient(circle at 86% 8%, rgba(239,68,68,.10), transparent 32%),
    linear-gradient(135deg, rgba(2,6,23,.97), rgba(15,23,42,.95) 48%, rgba(2,8,23,.98));
}
.cc-report-cashflow::after {
  content: "";
  position: absolute;
  inset: auto -130px -160px auto;
  width: 330px;
  height: 330px;
  border-radius: 999px;
  background: rgba(56,189,248,.10);
  filter: blur(8px);
  pointer-events: none;
}
.cc-cashflow-head,
.cc-cashflow-chart,
.cc-cashflow-table-wrap,
.cc-cashflow-legend,
.cc-cashflow-errors { position: relative; z-index: 1; }
.cc-cashflow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.cc-cashflow-head h2 {
  color: var(--text-strong);
  font-size: 1.22rem;
  line-height: 1.15;
  margin: 2px 0 5px;
  letter-spacing: -.03em;
}
.cc-cashflow-head p {
  color: var(--muted);
  margin: 0;
  max-width: 860px;
  font-weight: 750;
  font-size: .86rem;
}
.cc-cashflow-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, auto));
  gap: 8px;
  align-items: stretch;
}
.cc-cashflow-metrics > div {
  border: 1px solid rgba(154,180,210,.16);
  background: rgba(6,16,29,.56);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.018);
}
.cc-cashflow-metrics span,
.cc-cashflow-metrics small {
  display: block;
  color: var(--muted);
  font-weight: 900;
  font-size: .71rem;
  text-transform: uppercase;
  letter-spacing: .075em;
}
.cc-cashflow-metrics strong {
  display: block;
  color: var(--text-strong);
  margin-top: 4px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cc-cashflow-metrics small {
  margin-top: 2px;
  font-size: .66rem;
  text-transform: none;
  letter-spacing: .02em;
}
.cc-cashflow-metrics > div.is-danger strong { color: #fecaca; }
.cc-cashflow-metrics > div.is-good strong { color: #bbf7d0; }
.cc-cashflow-chart {
  display: grid;
  grid-template-columns: repeat(var(--cashflow-count), minmax(96px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 250px;
  padding: 14px 10px 8px;
  border: 1px solid rgba(154,180,210,.10);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15,23,42,.30), rgba(2,6,23,.12));
  overflow-x: auto;
}
.cc-cashflow-column {
  display: grid;
  grid-template-rows: minmax(150px, 1fr) 10px auto auto;
  gap: 6px;
  min-width: 96px;
  align-items: end;
}
.cc-cashflow-bars {
  height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  padding: 8px 9px 0;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(148,163,184,.09), rgba(148,163,184,.02)),
    repeating-linear-gradient(0deg, rgba(148,163,184,.09) 0 1px, transparent 1px 40px);
  border: 1px solid rgba(154,180,210,.10);
}
.cc-cashflow-bars i {
  display: block;
  width: 19px;
  min-height: 2px;
  max-height: 100%;
  border-radius: 10px 10px 3px 3px;
  box-shadow: 0 -6px 16px rgba(0,0,0,.12);
}
.cc-cashflow-income { background: linear-gradient(180deg, #86efac, #22c55e); }
.cc-cashflow-expense { background: linear-gradient(180deg, #fb7185, #ef4444); }
.cc-cashflow-net {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(154,180,210,.15);
  border: 1px solid rgba(154,180,210,.12);
}
.cc-cashflow-net span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  min-width: 2px;
  border-radius: inherit;
}
.cc-cashflow-net.is-positive span { background: linear-gradient(90deg, #22c55e, #86efac); }
.cc-cashflow-net.is-negative span { background: linear-gradient(90deg, #dc2626, #fb7185); }
.cc-cashflow-column strong {
  color: var(--text-strong);
  font-size: .74rem;
  font-weight: 950;
  text-align: center;
  white-space: nowrap;
}
.cc-cashflow-column small {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}
.cc-cashflow-table-wrap {
  margin-top: 12px;
  max-height: 280px;
}
.cc-cashflow-table th,
.cc-cashflow-table td { white-space: nowrap; }
.cc-cashflow-cumulative {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 220px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(154,180,210,.10);
  border: 1px solid rgba(154,180,210,.12);
}
.cc-cashflow-cumulative span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  min-width: 2px;
  opacity: .78;
}
.cc-cashflow-cumulative b {
  position: relative;
  z-index: 1;
  color: var(--text-strong);
  font-size: .68rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}
.cc-cashflow-cumulative.is-positive span { background: linear-gradient(90deg, rgba(34,197,94,.72), rgba(134,239,172,.78)); }
.cc-cashflow-cumulative.is-negative span { background: linear-gradient(90deg, rgba(220,38,38,.72), rgba(251,113,133,.78)); }
.cc-cashflow-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
}
.cc-cashflow-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.cc-cashflow-legend i {
  display: inline-block;
  width: 22px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(154,180,210,.20);
}
.cc-cashflow-legend i.income { background: linear-gradient(90deg, #22c55e, #86efac); }
.cc-cashflow-legend i.expense { background: linear-gradient(90deg, #dc2626, #fb7185); }
.cc-cashflow-legend i.net-positive { background: linear-gradient(90deg, #22c55e, #86efac); }
.cc-cashflow-legend i.net-negative { background: linear-gradient(90deg, #dc2626, #fb7185); }
.cc-cashflow-errors {
  margin-top: 10px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}
.cc-cashflow-errors summary { cursor: pointer; color: var(--text-soft); }
html[data-theme="light"] .cc-report-cashflow {
  background: linear-gradient(135deg, #0f172a, #172554 46%, #0f172a);
}
html[data-theme="light"] .cc-cashflow-metrics > div {
  background: rgba(15,23,42,.58);
}
@media (max-width: 1180px) {
  .cc-cashflow-head { flex-direction: column; }
  .cc-cashflow-metrics { grid-template-columns: repeat(2, minmax(140px, 1fr)); width: 100%; }
}
@media (max-width: 760px) {
  .cc-report-cashflow { padding: 16px; }
  .cc-cashflow-metrics { grid-template-columns: 1fr; }
  .cc-cashflow-chart { grid-template-columns: repeat(var(--cashflow-count), minmax(86px, 1fr)); }
  .cc-cashflow-column { min-width: 86px; }
  .cc-cashflow-bars { height: 135px; }
}

/* Cost Control Report — compact income/expense histogram with cumulative net line */
.cc-cashflow-combo {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(154,180,210,.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15,23,42,.34), rgba(2,6,23,.12)),
    repeating-linear-gradient(0deg, rgba(148,163,184,.065) 0 1px, transparent 1px 42px);
  padding: 14px 14px 12px;
  overflow: hidden;
}
.cc-cashflow-plot {
  position: relative;
  height: 260px;
  min-width: 720px;
  overflow: hidden;
}
.cc-cashflow-zero-line {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--cashflow-zero, 50%);
  border-top: 1px dashed rgba(226,232,240,.25);
  z-index: 2;
}
.cc-cashflow-line {
  position: absolute;
  inset: 8px 22px 48px 22px;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}
.cc-cashflow-area {
  fill: rgba(56,189,248,.10);
  stroke: none;
}
.cc-cashflow-polyline {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(56,189,248,.35));
}
.cc-cashflow-columns {
  position: absolute;
  inset: 8px 22px 0 22px;
  display: grid;
  grid-template-columns: repeat(var(--cashflow-count), minmax(92px, 1fr));
  gap: 10px;
  align-items: end;
  z-index: 3;
}
.cc-cashflow-period {
  min-width: 92px;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  gap: 6px;
}
.cc-cashflow-histogram {
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  padding: 0 6px;
  border-radius: 14px;
  background: rgba(15,23,42,.12);
}
.cc-cashflow-histogram i {
  display: block;
  width: 18px;
  min-height: 3px;
  max-height: 100%;
  border-radius: 10px 10px 3px 3px;
  box-shadow: 0 -8px 18px rgba(0,0,0,.14);
}
.cc-cashflow-period strong {
  color: var(--text-strong);
  font-size: .72rem;
  font-weight: 950;
  text-align: center;
  white-space: nowrap;
}
.cc-cashflow-period small {
  display: block;
  min-height: 16px;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}
.cc-cashflow-period small.is-positive { color: #bbf7d0; }
.cc-cashflow-period small.is-negative { color: #fecaca; }
.cc-cashflow-dot {
  position: absolute;
  z-index: 6;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: #38bdf8;
  border: 2px solid rgba(2,6,23,.95);
  box-shadow: 0 0 0 3px rgba(56,189,248,.18), 0 0 12px rgba(56,189,248,.50);
}
.cc-cashflow-dot.is-negative {
  background: #fb7185;
  box-shadow: 0 0 0 3px rgba(251,113,133,.18), 0 0 12px rgba(251,113,133,.45);
}
.cc-cashflow-summary-strip {
  position: relative;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 2px 0;
  scrollbar-width: thin;
}
.cc-cashflow-summary-strip span {
  flex: 0 0 auto;
  border: 1px solid rgba(154,180,210,.14);
  background: rgba(15,23,42,.38);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  white-space: nowrap;
}
.cc-cashflow-summary-strip b {
  color: var(--text-strong);
  margin-right: 4px;
}
.cc-cashflow-summary-strip span.is-positive { color: #bbf7d0; }
.cc-cashflow-summary-strip span.is-negative { color: #fecaca; }
.cc-cashflow-legend i.line.cumulative {
  height: 3px;
  border: 0;
  background: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56,189,248,.12);
}
@media (max-width: 760px) {
  .cc-cashflow-combo { overflow-x: auto; }
  .cc-cashflow-plot { min-width: 680px; height: 235px; }
  .cc-cashflow-columns { grid-template-columns: repeat(var(--cashflow-count), minmax(86px, 1fr)); }
}
.cc-cashflow-dot-layer {
  position: absolute;
  inset: 8px 22px 48px 22px;
  z-index: 6;
  pointer-events: none;
}

/* Cost Control Report — compact income/expense bars with cumulative income/expense lines */
.cc-cashflow-combo {
  padding: 10px 12px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.cc-cashflow-plot {
  height: 205px;
  min-width: max(100%, var(--cashflow-min-width, 0px));
  width: 100%;
  overflow: hidden;
}
.cc-cashflow-line {
  inset: 8px 18px 34px 18px;
  z-index: 5;
}
.cc-cashflow-area,
.cc-cashflow-zero-line,
.cc-cashflow-summary-strip { display: none; }
.cc-cashflow-polyline {
  fill: none;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cc-cashflow-income-line {
  stroke: #22c55e;
  filter: drop-shadow(0 0 6px rgba(34,197,94,.32));
}
.cc-cashflow-expense-line {
  stroke: #fb7185;
  filter: drop-shadow(0 0 6px rgba(251,113,133,.30));
}
.cc-cashflow-columns {
  inset: 8px 18px 0 18px;
  grid-template-columns: repeat(var(--cashflow-count), minmax(34px, 1fr));
  gap: 5px;
}
.cc-cashflow-period {
  min-width: 0;
  grid-template-rows: 1fr auto;
  gap: 5px;
}
.cc-cashflow-histogram {
  gap: 4px;
  padding: 0 3px;
  background: rgba(15,23,42,.08);
}
.cc-cashflow-histogram i {
  width: clamp(7px, 1.1vw, 16px);
  min-height: 3px;
}
.cc-cashflow-period strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .66rem;
}
.cc-cashflow-period small { display: none; }
.cc-cashflow-dot-layer {
  inset: 8px 18px 34px 18px;
  z-index: 6;
}
.cc-cashflow-dot {
  width: 7px;
  height: 7px;
  border-width: 1px;
}
.cc-cashflow-dot.is-income {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,.16), 0 0 10px rgba(34,197,94,.42);
}
.cc-cashflow-dot.is-expense {
  background: #fb7185;
  box-shadow: 0 0 0 2px rgba(251,113,133,.14), 0 0 10px rgba(251,113,133,.38);
}
.cc-cashflow-legend { margin-top: 10px; }
.cc-cashflow-legend i.line.income-cumulative,
.cc-cashflow-legend i.line.expense-cumulative {
  height: 3px;
  border: 0;
}
.cc-cashflow-legend i.line.income-cumulative { background: #22c55e; }
.cc-cashflow-legend i.line.expense-cumulative { background: #fb7185; }
@media (max-width: 760px) {
  .cc-cashflow-combo { overflow-x: auto; }
  .cc-cashflow-plot { min-width: max(100%, var(--cashflow-min-width, 0px)); height: 195px; }
  .cc-cashflow-columns { grid-template-columns: repeat(var(--cashflow-count), minmax(30px, 1fr)); gap: 4px; }
  .cc-cashflow-period strong { font-size: .58rem; }
}

/* Cost Control Report — final light-mode hardening and SVG trend correction
   Keeps snapshot HTML structure untouched; only targeted visual overrides. */
body.ui-premium-v3.page-cost-control-report .panel.cc-report-financial-snapshot,
body.ui-premium-v3.page-cost-control-report .panel.cc-report-cashflow,
body.ui-premium-v3.page-cost-control-report .panel.cc-report-ba-snapshot {
  --text-strong: #f8fafc;
  --text-soft: #dbeafe;
  --muted: #c7d7ea;
  --muted-2: #aebfd4;
  --line-soft: rgba(191,219,254,.18);
  color: var(--text-soft);
  border-color: rgba(148,163,184,.20) !important;
  box-shadow: 0 18px 42px rgba(15,23,42,.18), inset 0 1px 0 rgba(255,255,255,.04) !important;
}
body.ui-premium-v3.page-cost-control-report .panel.cc-report-financial-snapshot {
  background:
    radial-gradient(circle at 12% 0%, rgba(53,214,255,.16), transparent 34%),
    linear-gradient(135deg, rgba(2,6,23,.97), rgba(15,23,42,.95) 48%, rgba(2,8,23,.98)) !important;
}
body.ui-premium-v3.page-cost-control-report .panel.cc-report-cashflow {
  background:
    radial-gradient(circle at 14% 0%, rgba(34,197,94,.13), transparent 36%),
    radial-gradient(circle at 86% 8%, rgba(239,68,68,.11), transparent 32%),
    linear-gradient(135deg, rgba(2,6,23,.97), rgba(15,23,42,.95) 48%, rgba(2,8,23,.98)) !important;
}
body.ui-premium-v3.page-cost-control-report .panel.cc-report-ba-snapshot {
  background:
    radial-gradient(circle at 12% 0%, rgba(245,158,11,.14), transparent 36%),
    radial-gradient(circle at 86% 8%, rgba(56,189,248,.10), transparent 32%),
    linear-gradient(135deg, rgba(2,6,23,.97), rgba(15,23,42,.95) 48%, rgba(2,8,23,.98)) !important;
}
body.ui-premium-v3.page-cost-control-report .cc-fin-snapshot-head h2,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-head h2,
body.ui-premium-v3.page-cost-control-report .cc-ba-head h2,
body.ui-premium-v3.page-cost-control-report .cc-fin-row-amount strong,
body.ui-premium-v3.page-cost-control-report .cc-ba-fig strong,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-period strong,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-metrics strong,
body.ui-premium-v3.page-cost-control-report .cc-fin-snapshot-head-metrics strong,
body.ui-premium-v3.page-cost-control-report .cc-fin-kpi-strip strong,
body.ui-premium-v3.page-cost-control-report .cc-ba-head-metrics strong {
  color: #f8fafc !important;
  text-shadow: 0 1px 10px rgba(15,23,42,.20);
}
body.ui-premium-v3.page-cost-control-report .cc-fin-snapshot-head p,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-head p,
body.ui-premium-v3.page-cost-control-report .cc-ba-head p,
body.ui-premium-v3.page-cost-control-report .cc-fin-row-amount span,
body.ui-premium-v3.page-cost-control-report .cc-fin-row-amount small,
body.ui-premium-v3.page-cost-control-report .cc-ba-fig span,
body.ui-premium-v3.page-cost-control-report .cc-ba-fig small,
body.ui-premium-v3.page-cost-control-report .cc-fin-legend,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend,
body.ui-premium-v3.page-cost-control-report .cc-ba-legend,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-metrics span,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-metrics small,
body.ui-premium-v3.page-cost-control-report .cc-fin-snapshot-head-metrics span,
body.ui-premium-v3.page-cost-control-report .cc-fin-kpi-strip span,
body.ui-premium-v3.page-cost-control-report .cc-fin-kpi-strip small,
body.ui-premium-v3.page-cost-control-report .cc-ba-head-metrics span {
  color: #c7d7ea !important;
}
body.ui-premium-v3.page-cost-control-report .cc-fin-row-label,
body.ui-premium-v3.page-cost-control-report .cc-ba-label,
body.ui-premium-v3.page-cost-control-report .cc-fin-row-label em,
body.ui-premium-v3.page-cost-control-report .cc-ba-label small {
  color: #dbeafe !important;
}
body.ui-premium-v3.page-cost-control-report .cc-fin-snapshot-head-metrics > div,
body.ui-premium-v3.page-cost-control-report .cc-fin-kpi-strip > div,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-metrics > div,
body.ui-premium-v3.page-cost-control-report .cc-ba-head-metrics > div {
  background: rgba(15,23,42,.62) !important;
  border-color: rgba(191,219,254,.16) !important;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-combo {
  background:
    linear-gradient(180deg, rgba(15,23,42,.46), rgba(2,6,23,.20)),
    repeating-linear-gradient(0deg, rgba(226,232,240,.075) 0 1px, transparent 1px 42px) !important;
  border-color: rgba(191,219,254,.15) !important;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-histogram {
  background: rgba(148,163,184,.10) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-line {
  shape-rendering: geometricPrecision;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-polyline {
  stroke-width: 2.4px !important;
  vector-effect: non-scaling-stroke;
  fill: none !important;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-income-line {
  stroke: #22c55e !important;
  filter: drop-shadow(0 0 4px rgba(34,197,94,.45));
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-expense-line {
  stroke: #fb7185 !important;
  stroke-dasharray: 6 5;
  filter: drop-shadow(0 0 4px rgba(251,113,133,.42));
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-dot {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(2,6,23,.94);
  box-shadow: 0 0 0 2px rgba(15,23,42,.35), 0 0 9px rgba(255,255,255,.16);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-dot.is-income {
  background: #22c55e !important;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-dot.is-expense {
  background: #fb7185 !important;
}

/* Cost Report cashflow redesign v3: simple monthly histogram + clean cumulative layout */
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign {
  display: grid;
  gap: 18px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-block {
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(191, 219, 254, 0.12);
  border-radius: 22px;
  padding: 18px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-block-head h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1rem;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-block-head p {
  margin: 4px 0 0;
  color: #c7d7ea;
  font-size: .88rem;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-monthly-scroll,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-monthly-grid {
  min-width: max(100%, var(--cashflow-min-width, 0px));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 12px;
  align-items: end;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-month-card {
  min-width: 96px;
  padding: 12px 10px 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(191, 219, 254, 0.10);
  text-align: center;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-month-bars {
  height: 168px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding: 10px 8px 0;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-month-bar {
  width: 18px;
  min-height: 2px;
  border-radius: 999px 999px 4px 4px;
  box-shadow: 0 8px 20px rgba(15,23,42,.22);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-month-bar.is-income {
  background: linear-gradient(180deg, #86efac, #22c55e);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-month-bar.is-expense {
  background: linear-gradient(180deg, #fda4af, #ef4444);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-month-values {
  display: grid;
  gap: 3px;
  margin: 10px 0 8px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-month-values small {
  color: #c7d7ea;
  font-size: .68rem;
  line-height: 1.25;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-month-card strong {
  display: block;
  color: #f8fafc;
  font-size: .72rem;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-grid {
  min-width: max(100%, var(--cashflow-min-width, 0px));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-card {
  min-width: 210px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.028));
  border: 1px solid rgba(191, 219, 254, 0.10);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-head strong {
  color: #f8fafc;
  font-size: .82rem;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-gap {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: .70rem;
  font-weight: 700;
  background: rgba(148,163,184,.14);
  color: #dbeafe;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-gap.is-positive {
  background: rgba(34,197,94,.14);
  color: #bbf7d0;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-gap.is-negative {
  background: rgba(239,68,68,.14);
  color: #fecaca;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-line {
  display: grid;
  grid-template-columns: 58px minmax(84px, 1fr) auto;
  align-items: center;
  gap: 10px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-line + .cc-cashflow-running-line {
  margin-top: 10px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-line label {
  color: #c7d7ea;
  font-size: .76rem;
  font-weight: 700;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-line span {
  color: #e2e8f0;
  font-size: .74rem;
  white-space: nowrap;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-track i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-track i.is-income {
  background: linear-gradient(90deg, #22c55e, #86efac);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-track i.is-expense {
  background: linear-gradient(90deg, #ef4444, #fda4af);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple {
  margin-top: 12px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.income-cumulative,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.expense-cumulative {
  height: 4px;
  border-radius: 999px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.income-cumulative {
  background: linear-gradient(90deg, #22c55e, #86efac);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.expense-cumulative {
  background: linear-gradient(90deg, #ef4444, #fda4af);
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-block {
  background: rgba(15, 23, 42, 0.16);
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-month-card,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-card {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
}
@media (max-width: 960px) {
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }
}
@media (max-width: 720px) {
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-block {
    padding: 14px;
  }
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-month-bars {
    height: 138px;
  }
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-line {
    grid-template-columns: 52px minmax(70px, 1fr);
  }
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-running-line span {
    grid-column: 1 / -1;
    padding-left: 62px;
  }
}

/* Cost Report cashflow redesign v4: truly simple and user-friendly */
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 {
  display: grid;
  gap: 18px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-block {
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(191, 219, 254, 0.12);
  border-radius: 22px;
  padding: 18px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-block-head {
  margin-bottom: 14px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-block-head h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1rem;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-block-head p,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-hint {
  margin: 6px 0 0;
  color: #c7d7ea;
  font-size: .85rem;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-monthly-scroll,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cumulative-table-wrap {
  overflow-x: auto;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-monthly-grid-compact {
  min-width: max(100%, var(--cashflow-min-width, 0px));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 10px;
  align-items: end;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-month-card-compact {
  min-width: 74px;
  padding: 10px 8px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border: 1px solid rgba(191, 219, 254, 0.10);
  text-align: center;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-month-bars {
  height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding: 8px 0 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-month-bar {
  width: 16px;
  min-height: 2px;
  border-radius: 999px 999px 4px 4px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-month-bar.is-income {
  background: linear-gradient(180deg, #86efac, #22c55e);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-month-bar.is-expense {
  background: linear-gradient(180deg, #fda4af, #ef4444);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-month-card-compact strong {
  display: block;
  margin-top: 8px;
  color: #f8fafc;
  font-size: .72rem;
  line-height: 1.25;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cumulative-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cumulative-table thead th {
  text-align: left;
  padding: 12px 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #c7d7ea;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(191, 219, 254, 0.10);
  white-space: nowrap;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cumulative-table tbody td {
  padding: 12px 14px;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(191, 219, 254, 0.08);
  white-space: nowrap;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cumulative-table tbody tr:hover {
  background: rgba(255,255,255,.03);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cumulative-table tbody tr:last-child td {
  border-bottom: 0;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cumulative-table tbody td strong {
  color: #f8fafc;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cumulative-gap-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cumulative-gap-badge.is-positive {
  background: rgba(34,197,94,.14);
  color: #bbf7d0;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cumulative-gap-badge.is-negative {
  background: rgba(239,68,68,.14);
  color: #fecaca;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 + .cc-cashflow-legend-simple {
  margin-top: 12px;
}
@media (max-width: 720px) {
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-block {
    padding: 14px;
  }
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-monthly-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  }
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-month-bars {
    height: 124px;
  }
}

/* Cost Report cashflow redesign v5: monthly bars + cumulative lines, clean and user-friendly */
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-chart-wrap {
  overflow-x: auto;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-chart {
  position: relative;
  min-width: max(100%, var(--cashflow-min-width, 0px));
  height: 260px;
  padding: 12px 8px 28px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.018));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-chart::before {
  content: "";
  position: absolute;
  inset: 16px 10px 34px;
  border-radius: 14px;
  background: repeating-linear-gradient(0deg, rgba(191,219,254,.08) 0 1px, transparent 1px 42px);
  pointer-events: none;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-line,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-dots,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-columns {
  position: absolute;
  inset: 16px 10px 34px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-line {
  width: calc(100% - 20px);
  height: calc(100% - 50px);
  pointer-events: none;
  z-index: 2;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-polyline {
  fill: none;
  stroke-width: 2.6px;
  vector-effect: non-scaling-stroke;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-polyline.is-income {
  stroke: #22c55e;
  filter: drop-shadow(0 0 5px rgba(34,197,94,.35));
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-polyline.is-expense {
  stroke: #fb7185;
  stroke-dasharray: 5 5;
  filter: drop-shadow(0 0 5px rgba(251,113,133,.32));
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-columns {
  display: grid;
  grid-template-columns: repeat(var(--cashflow-count), minmax(54px, 1fr));
  gap: 6px;
  align-items: end;
  z-index: 1;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-period {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  min-width: 54px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-bars {
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 0 4px;
  border-radius: 12px 12px 0 0;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-bar {
  width: 14px;
  min-height: 2px;
  border-radius: 999px 999px 4px 4px;
  box-shadow: 0 6px 16px rgba(15,23,42,.24);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-bar.is-income {
  background: linear-gradient(180deg, #86efac, #22c55e);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-bar.is-expense {
  background: linear-gradient(180deg, #fda4af, #ef4444);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-period strong {
  display: block;
  margin-top: 8px;
  text-align: center;
  color: #f8fafc;
  font-size: .69rem;
  line-height: 1.2;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-dots {
  pointer-events: none;
  z-index: 3;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1.5px solid rgba(2,6,23,.95);
  box-shadow: 0 0 0 2px rgba(15,23,42,.35);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-dot.is-income {
  background: #22c55e;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-dot.is-expense {
  background: #fb7185;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.income-cumulative,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.expense-cumulative {
  width: 20px;
  height: 0;
  border-top: 3px solid currentColor;
  background: transparent !important;
  border-radius: 0;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.income-cumulative {
  color: #22c55e;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.expense-cumulative {
  color: #fb7185;
  border-top-style: dashed;
}
@media (max-width: 720px) {
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-chart {
    height: 220px;
  }
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-columns {
    grid-template-columns: repeat(var(--cashflow-count), minmax(46px, 1fr));
  }
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-bar {
    width: 12px;
  }
}

/* Cost Report cashflow v6: visually separate bar scale from cumulative line scale */
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-chart {
  height: 300px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-chart::before {
  inset: 16px 10px 34px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)),
    repeating-linear-gradient(0deg, rgba(191,219,254,.08) 0 1px, transparent 1px 42px);
}
/* Line layer keeps the full plot height for cumulative values */
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-line,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-dots {
  inset: 16px 10px 34px;
}
/* Bar layer uses its own lower-zone scale so monthly bars stay visually strong */
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-columns {
  inset: 116px 10px 34px;
  align-items: end;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-period {
  grid-template-rows: minmax(0, 1fr) auto;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-bars {
  height: 100%;
  min-height: 118px;
  align-self: end;
  padding: 0 4px 2px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-bar {
  width: 16px;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-chart::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 116px;
  bottom: 34px;
  border-top: 1px solid rgba(191,219,254,.10);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.01), rgba(255,255,255,.03));
  pointer-events: none;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-period strong {
  margin-top: 10px;
}
@media (max-width: 720px) {
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-chart {
    height: 250px;
  }
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-columns {
    inset: 96px 10px 34px;
  }
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-bars {
    min-height: 100px;
  }
  body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-chart::after {
    top: 96px;
  }
}

/* Cost Report v7: collapsed accordions + compact actual dashboards */
body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard {
  display: grid;
  gap: 16px;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis > div {
  min-height: 86px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.060), rgba(255,255,255,.030));
  border: 1px solid rgba(191,219,254,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis span,
body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis small {
  display: block;
  color: #c7d7ea;
  font-size: .74rem;
  line-height: 1.3;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis span {
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis strong {
  display: block;
  margin: 7px 0 4px;
  color: #f8fafc;
  font-size: .98rem;
  line-height: 1.25;
  word-break: break-word;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
  gap: 12px;
  align-items: stretch;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-panel,
body.ui-premium-v3.page-cost-control-report .cc-actual-action-panel {
  padding: 16px;
  border-radius: 18px;
  background: rgba(15,23,42,.26);
  border: 1px solid rgba(191,219,254,.11);
}
body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-panel h4,
body.ui-premium-v3.page-cost-control-report .cc-actual-action-panel h4 {
  margin: 0 0 10px;
  color: #f8fafc;
  font-size: .95rem;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-list {
  display: grid;
  gap: 10px;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-row {
  display: grid;
  gap: 6px;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-row > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #dbeafe;
  font-size: .82rem;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-row b {
  color: #f8fafc;
  white-space: nowrap;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148,163,184,.18);
}
body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-bar i {
  display: block;
  height: 100%;
  min-width: 2px;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
}
body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-row.is-compact {
  padding: 9px 0;
  border-bottom: 1px solid rgba(191,219,254,.08);
}
body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-row.is-compact:last-child {
  border-bottom: 0;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-action-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}
body.ui-premium-v3.page-cost-control-report .cc-actual-action-panel p {
  margin: 0;
  color: #c7d7ea;
  font-size: .86rem;
  line-height: 1.5;
}
body.ui-premium-v3.page-cost-control-report .cc-commitment-progress-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
body.ui-premium-v3.page-cost-control-report .cc-commitment-progress-list > div {
  display: grid;
  grid-template-columns: 100px minmax(120px, 1fr) 58px;
  gap: 10px;
  align-items: center;
  color: #dbeafe;
  font-size: .82rem;
}
body.ui-premium-v3.page-cost-control-report .cc-commitment-progress-list b {
  color: #f8fafc;
  text-align: right;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis > div,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-panel,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-action-panel {
  background: rgba(15,23,42,.18);
}
@media (max-width: 980px) {
  body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-main {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis {
    grid-template-columns: 1fr;
  }
  body.ui-premium-v3.page-cost-control-report .cc-commitment-progress-list > div {
    grid-template-columns: 1fr;
  }
  body.ui-premium-v3.page-cost-control-report .cc-commitment-progress-list b {
    text-align: left;
  }
}

/* Cost Report polish v8: snapshot light mode, line visibility, label separation, BVA table alignment */
body.ui-premium-v3.page-cost-control-report .cc-report-budget-table {
  table-layout: fixed;
  width: 100%;
}
body.ui-premium-v3.page-cost-control-report .cc-report-budget-table th,
body.ui-premium-v3.page-cost-control-report .cc-report-budget-table td {
  vertical-align: middle;
}
body.ui-premium-v3.page-cost-control-report .cc-report-budget-table th:nth-child(5),
body.ui-premium-v3.page-cost-control-report .cc-report-budget-table th:nth-child(6),
body.ui-premium-v3.page-cost-control-report .cc-report-budget-table th:nth-child(7),
body.ui-premium-v3.page-cost-control-report .cc-report-budget-table td:nth-child(5),
body.ui-premium-v3.page-cost-control-report .cc-report-budget-table td:nth-child(6),
body.ui-premium-v3.page-cost-control-report .cc-report-budget-table td:nth-child(7) {
  text-align: right;
  white-space: nowrap;
}
body.ui-premium-v3.page-cost-control-report .cc-report-budget-table td:nth-child(8) {
  min-width: 180px;
}
body.ui-premium-v3.page-cost-control-report .cc-fin-line {
  border-right-width: 2px;
}
body.ui-premium-v3.page-cost-control-report .cc-fin-line span {
  transform: translateX(calc(-50% + var(--label-shift, 0px)));
}
body.ui-premium-v3.page-cost-control-report .cc-fin-line-ac {
  border-color: #38bdf8;
}
body.ui-premium-v3.page-cost-control-report .cc-fin-line-ac span {
  color: #0c4a6e;
  background: rgba(240,249,255,.98);
  border-color: rgba(56,189,248,.32);
}
body.ui-premium-v3.page-cost-control-report .cc-fin-legend i.line {
  border-top-color: #38bdf8;
}
body.ui-premium-v3.page-cost-control-report .cc-fin-legend i.line.eac {
  border-top-color: #dc2626;
}
body.ui-premium-v3.page-cost-control-report .cc-fin-legend i.line.bac {
  border-top-color: #22c55e;
}

html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .panel.cc-report-financial-snapshot,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .panel.cc-report-cashflow,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .panel.cc-report-ba-snapshot {
  --text-strong: #0f172a;
  --text-soft: #1e293b;
  --muted: #475569;
  --muted-2: #64748b;
  --line-soft: rgba(148,163,184,.20);
  color: var(--text-soft);
  border-color: rgba(148,163,184,.20) !important;
  box-shadow: 0 14px 28px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.65) !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .panel.cc-report-financial-snapshot {
  background:
    radial-gradient(circle at 12% 0%, rgba(56,189,248,.10), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(241,245,249,.95) 48%, rgba(248,250,252,.98)) !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .panel.cc-report-cashflow {
  background:
    radial-gradient(circle at 14% 0%, rgba(34,197,94,.08), transparent 36%),
    radial-gradient(circle at 86% 8%, rgba(239,68,68,.06), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(241,245,249,.95) 48%, rgba(248,250,252,.98)) !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .panel.cc-report-ba-snapshot {
  background:
    radial-gradient(circle at 12% 0%, rgba(245,158,11,.08), transparent 36%),
    radial-gradient(circle at 86% 8%, rgba(56,189,248,.06), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(241,245,249,.95) 48%, rgba(248,250,252,.98)) !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-snapshot-head h2,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-head h2,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-head h2,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-amount strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-fig strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-period strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-metrics strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-snapshot-head-metrics strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-kpi-strip strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-head-metrics strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-block-head h3,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cumulative-table tbody td strong {
  color: #0f172a !important;
  text-shadow: none;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-snapshot-head p,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-head p,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-head p,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-amount span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-amount small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-fig span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-fig small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-legend,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-legend,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-metrics span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-metrics small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-snapshot-head-metrics span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-kpi-strip span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-kpi-strip small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-head-metrics span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-block-head p,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-hint,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cumulative-table thead th,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cumulative-table tbody td {
  color: #475569 !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-label,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-label,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-label em,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-label small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-snapshot-bar-label,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-snapshot-resource-label {
  color: #1e293b !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-snapshot-head-metrics > div,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-kpi-strip > div,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-metrics > div,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-head-metrics > div,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-block,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-snapshot-kpi-stack > div,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-snapshot-baseline-pill {
  background: rgba(255,255,255,.82) !important;
  border-color: rgba(148,163,184,.22) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-track,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-mixed-chart,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cumulative-table thead th,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-month-card-compact,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cumulative-table tbody tr:hover,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-snapshot-track,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-snapshot-resource-track,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-track,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-chart::after {
  background-color: rgba(226,232,240,.55);
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-chart::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05)),
    repeating-linear-gradient(0deg, rgba(148,163,184,.12) 0 1px, transparent 1px 42px);
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-old-snapshot-main {
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(241,245,249,.95) 48%, rgba(248,250,252,.98));
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-old-snapshot-main::after,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-financial-snapshot::after {
  background: rgba(59,130,246,.08);
}

/* Cost Report polish v9: BAC label lift + light mode readability cleanup */
body.ui-premium-v3.page-cost-control-report .cc-fin-line-bac span {
  top: -34px !important;
}
@media (max-width: 760px) {
  body.ui-premium-v3.page-cost-control-report .cc-fin-line-bac span {
    top: -40px !important;
  }
}

html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-accordion,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-card,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-variance-card {
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(241,245,249,.92)) !important;
  border-color: rgba(148,163,184,.20) !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-accordion > summary strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-title strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-amount strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-detail-columns h4,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-variance-card strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-panel h4,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-action-panel h4,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-row b,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-commitment-progress-list b {
  color: #0f172a !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-accordion > summary small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-title small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-amount small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-metrics span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-breakdown-line span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-variance-card small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-row > div:first-child,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-action-panel p,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-commitment-progress-list > div,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .muted-text {
  color: #475569 !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-metrics strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-breakdown-line b,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-breakdown-line i,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-variance-card span {
  color: #0f172a !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-metrics > div,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-info-strip > div,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-breakdown-item,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-signal-grid > div,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis > div,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-panel,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-action-panel {
  background: rgba(255,255,255,.86) !important;
  border-color: rgba(148,163,184,.22) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-bar,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-table-progress,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-track,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-snapshot-track,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-snapshot-resource-track,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-track {
  background: rgba(226,232,240,.92) !important;
  border-color: rgba(148,163,184,.25) !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cumulative-gap-badge.is-negative {
  color: #b91c1c;
  background: rgba(239,68,68,.12);
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cumulative-gap-badge.is-positive {
  color: #166534;
  background: rgba(34,197,94,.12);
}

/* Cost Report polish v10: aggressive light-mode readability hardening */
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report {
  --report-text-strong: #0f172a;
  --report-text: #1e293b;
  --report-muted: #475569;
  --report-faint: #64748b;
}

html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-label,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-label span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-label em,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-label,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-label span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-label em,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-legend span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-legend span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-hint,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-errors,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-mini-card span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-mini-card small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-hero-main p,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-amount span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-amount small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-row > div:first-child,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-action-panel p,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-commitment-progress-list > div,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .muted-text,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-accordion > summary small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-title small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-amount small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-metrics span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-breakdown-item small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-breakdown-item span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-info-strip span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-breakdown-line span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-variance-card small {
  color: var(--report-muted) !important;
}

html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-label b,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-label b,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-amount,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-row-amount strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-fig strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-fig span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-fig small,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-mini-card strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-hero-main h2,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-radial strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-radial span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-legend,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-legend,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-dashboard-kpis strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-panel h4,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-action-panel h4,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-actual-breakdown-row b,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-commitment-progress-list b,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-accordion > summary strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-title strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-amount strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-source-metrics strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-breakdown-item strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-info-strip strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-breakdown-line b,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-detail-columns h4,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-variance-card strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-report-variance-card span {
  color: var(--report-text-strong) !important;
}

html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-fig em.is-danger,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cumulative-gap-badge.is-negative,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-head-metrics > div.is-danger strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-kpi-strip > div.is-danger strong {
  color: #b91c1c !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-fig em.is-good,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cumulative-gap-badge.is-positive,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-head-metrics > div.is-good strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-kpi-strip > div.is-good strong {
  color: #166534 !important;
}

html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-row.is-total .cc-ba-label,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-row.is-total .cc-ba-label span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-row.is-total .cc-ba-label em,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-row.is-total .cc-ba-fig strong,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-row.is-total .cc-ba-fig span,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-row.is-total .cc-ba-fig small {
  color: var(--report-text-strong) !important;
}

html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-legend i.contract {
  background: rgba(148, 163, 184, 0.55) !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-line span {
  box-shadow: 0 10px 20px rgba(15,23,42,.10) !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-line-ac span {
  color: #0f172a !important;
  background: rgba(239, 246, 255, 0.98) !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-line-eac span {
  color: #991b1b !important;
  background: rgba(255, 241, 242, 0.98) !important;
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-line-bac span {
  color: #166534 !important;
  background: rgba(240, 253, 244, 0.98) !important;
}

html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-ba-row,
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-fin-snapshot-row {
  border-color: rgba(148,163,184,.20) !important;
}

/* Cost Report forecast controls */
.cc-report-forecast-panel{display:flex;flex-direction:column;gap:18px;overflow:hidden;}
.cc-report-forecast-panel form{display:flex;flex-direction:column;gap:18px;}
.cc-report-forecast-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;flex-wrap:wrap;}
.cc-report-forecast-head h2{margin:4px 0 6px;font-size:1.35rem;}
.cc-report-forecast-head p{margin:0;color:var(--muted);max-width:880px;}
.cc-report-forecast-date{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;min-width:280px;}
.cc-report-forecast-date label{display:flex;flex-direction:column;gap:6px;min-width:220px;}
.cc-report-forecast-date span{font-weight:800;font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.cc-report-forecast-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;}
.cc-report-forecast-kpis>div{border:1px solid rgba(148,163,184,.22);background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(248,250,252,.92));border-radius:18px;padding:14px;box-shadow:0 12px 28px rgba(15,23,42,.06);}
.cc-report-forecast-kpis span{display:block;color:var(--muted);font-weight:800;font-size:.76rem;text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px;}
.cc-report-forecast-kpis strong{display:block;font-size:1.05rem;color:var(--text);}
.cc-report-forecast-kpis small{display:block;color:var(--muted);margin-top:4px;}
.cc-report-forecast-kpis .is-danger strong{color:#b91c1c;}
.cc-report-forecast-kpis .is-good strong{color:#047857;}
.cc-report-forecast-table-wrap{overflow-x:auto;border:1px solid rgba(148,163,184,.22);border-radius:18px;background:#fff;}
.cc-report-forecast-table{width:100%;border-collapse:separate;border-spacing:0;min-width:1320px;}
.cc-report-forecast-table th{background:#f8fafc;color:#475569;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;text-align:left;padding:12px;border-bottom:1px solid rgba(148,163,184,.22);white-space:nowrap;}
.cc-report-forecast-table td{padding:12px;border-bottom:1px solid rgba(226,232,240,.9);vertical-align:top;color:#334155;}
.cc-report-forecast-table tbody tr:last-child td{border-bottom:0;}
.cc-report-forecast-table td strong{display:block;color:#0f172a;}
.cc-report-forecast-table td small{display:block;color:#64748b;margin-top:4px;font-size:.76rem;}
.cc-report-forecast-table td:nth-child(7){max-width:360px;min-width:280px;font-size:.82rem;color:#64748b;}
.cc-report-forecast-table .input{min-height:38px;font-size:.9rem;}
.cc-report-forecast-table .selected-forecast strong{font-size:1rem;}
.cc-report-forecast-table .cc-ctc-split{font-weight:850;line-height:1.25;}
.cc-report-forecast-table .cc-ctc-split.is-danger{color:#b91c1c;}
.cc-report-forecast-table .cc-ctc-split.is-good{color:#047857;}
.cc-report-forecast-table .btn-small,.cc-report-forecast-table .btn-sm{padding:8px 10px;border-radius:11px;font-size:.78rem;white-space:nowrap;}
.cc-report-forecast-income-note{display:flex;gap:12px;align-items:flex-start;border:1px solid rgba(14,165,233,.22);background:#f0f9ff;border-radius:16px;padding:12px 14px;color:#0f172a;}
.cc-report-forecast-income-note p{margin:4px 0 0;color:#64748b;}

.cc-report-forecast-fixed-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.cc-report-forecast-fixed-card{display:flex;gap:12px;align-items:flex-start;border:1px solid rgba(148,163,184,.22);background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.94));border-radius:18px;padding:14px;box-shadow:0 12px 28px rgba(15,23,42,.05);}
.cc-report-forecast-fixed-card .cc-report-code{flex:0 0 auto;}
.cc-report-forecast-fixed-card strong{display:block;color:#0f172a;margin-bottom:4px;}
.cc-report-forecast-fixed-card p{margin:0 0 6px;color:#475569;font-size:.88rem;line-height:1.45;}
.cc-report-forecast-fixed-card small{display:block;color:#64748b;font-size:.78rem;}
.cc-report-forecast-income-note{border-color:rgba(14,165,233,.26);background:linear-gradient(180deg,rgba(240,249,255,.95),rgba(255,255,255,.96));}
@media (max-width: 1180px){.cc-report-forecast-kpis{grid-template-columns:repeat(3,minmax(0,1fr));}.cc-report-forecast-fixed-grid{grid-template-columns:1fr;}}

.cc-report-forecast-errors{border:1px solid rgba(245,158,11,.28);background:#fffbeb;border-radius:14px;padding:10px 12px;color:#92400e;}
.cc-report-forecast-errors summary{cursor:pointer;font-weight:800;}
.cc-report-forecast-errors p{margin:8px 0 0;color:#92400e;}
@media (max-width: 980px){.cc-report-forecast-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}.cc-report-forecast-date{width:100%;}.cc-report-forecast-date label{flex:1;}}
@media (max-width: 640px){.cc-report-forecast-kpis{grid-template-columns:1fr;}.cc-report-forecast-head{display:block;}.cc-report-forecast-date{margin-top:14px;}}


/* Cost Report forecast + cashflow polish v11 */
body.ui-premium-v3.page-cost-control-report .cc-fin-line span {
  max-width: none;
}
body.ui-premium-v3.page-cost-control-report .cc-fin-line-eac span {
  z-index: 8;
}
body.ui-premium-v3.page-cost-control-report .cc-fin-line-bac span {
  z-index: 9;
}

body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-polyline.is-income.is-actual,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.income-cumulative.actual {
  stroke: #22c55e;
  color: #22c55e;
  border-top-style: solid;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-polyline.is-income.is-forecast,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.income-cumulative.forecast {
  stroke: #22c55e;
  color: #22c55e;
  stroke-dasharray: 6 5;
  border-top-style: dashed;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-polyline.is-expense.is-actual,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.expense-cumulative.actual {
  stroke: #fb7185;
  color: #fb7185;
  stroke-dasharray: none;
  border-top-style: solid;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-mixed-polyline.is-expense.is-forecast,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.expense-cumulative.forecast {
  stroke: #fb7185;
  color: #fb7185;
  stroke-dasharray: 6 5;
  border-top-style: dashed;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-inside {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148,163,184,.18);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-inside i.line.income-cumulative,
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-inside i.line.expense-cumulative {
  width: 22px;
  height: 0;
  border-top-width: 3px;
}

html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-panel {
  background:
    radial-gradient(circle at 10% 0%, rgba(59,130,246,.10), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(34,197,94,.08), transparent 28%),
    linear-gradient(145deg, rgba(7,16,32,.98), rgba(10,22,44,.96) 52%, rgba(7,16,32,.98)) !important;
  border-color: rgba(96,165,250,.18) !important;
}
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-head h2,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-kpis strong,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-table td strong,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-fixed-card strong,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-income-note strong {
  color: #f8fafc !important;
}
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-head p,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-kpis span,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-kpis small,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-table td,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-table td small,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-fixed-card p,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-fixed-card small,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-income-note p,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-income-note small {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-kpis > div,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-fixed-card,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-income-note {
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.82)) !important;
  border-color: rgba(96,165,250,.18) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 14px 28px rgba(2,6,23,.28);
}
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-table-wrap {
  background: rgba(8,15,29,.92) !important;
  border-color: rgba(96,165,250,.16) !important;
}
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-table th {
  background: rgba(15,23,42,.96) !important;
  color: #dbeafe !important;
  border-bottom-color: rgba(96,165,250,.16) !important;
}
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-table td {
  color: #e2e8f0 !important;
  border-bottom-color: rgba(51,65,85,.78) !important;
}
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-table .input,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-date .input,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-table select.input {
  background: rgba(15,23,42,.92) !important;
  color: #f8fafc !important;
  border-color: rgba(96,165,250,.24) !important;
}
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-errors {
  background: rgba(120,53,15,.20) !important;
  border-color: rgba(245,158,11,.28) !important;
  color: #fde68a !important;
}
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-errors p,
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-report-forecast-errors summary {
  color: #fde68a !important;
}


/* Cost report cashflow BAC budget threshold line */
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-budget-line {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 0;
  border-top: 2px dashed rgba(245, 158, 11, .95);
  z-index: 2;
  pointer-events: none;
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-budget-line span {
  position: absolute;
  right: 0;
  top: -13px;
  transform: translateY(-100%);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  color: #92400e;
  background: rgba(255, 247, 237, .96);
  border: 1px solid rgba(245, 158, 11, .35);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
}
body.ui-premium-v3.page-cost-control-report .cc-cashflow-legend-simple i.line.budget {
  width: 20px;
  height: 0;
  border-top: 3px dashed #f59e0b;
  background: transparent !important;
  border-radius: 0;
}
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-budget-line {
  border-top-color: rgba(251, 191, 36, .96);
}
html[data-theme="dark"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-budget-line span {
  color: #fde68a;
  background: rgba(69, 26, 3, .94);
  border-color: rgba(245, 158, 11, .42);
  box-shadow: 0 10px 22px rgba(2, 6, 23, .35);
}
html[data-theme="light"] body.ui-premium-v3.page-cost-control-report .cc-cashflow-redesign-v4 .cc-cashflow-budget-line span {
  color: #92400e;
  background: rgba(255, 247, 237, .98);
  border-color: rgba(245, 158, 11, .32);
}

/* Cost Report RTL fix v12: keep AC / EAC / BAC guide-line coordinates locked to the bar track.
   In Arabic/RTL the grid places the amount column on the left and the row label on the right;
   the absolute guide layer must therefore use the amount-column inset on the left. */
body.ui-premium-v3.page-cost-control-report .cc-fin-track,
body.ui-premium-v3.page-cost-control-report .cc-fin-line-layer {
  direction: ltr;
  unicode-bidi: isolate;
}
body.ui-premium-v3.page-cost-control-report .cc-fin-line span {
  direction: ltr;
  unicode-bidi: isolate;
}
@media (min-width: 761px) {
  html[dir="rtl"] body.ui-premium-v3.page-cost-control-report .cc-fin-line-layer {
    left: calc(var(--cc-fin-amount-col) + var(--cc-fin-gap));
    right: calc(var(--cc-fin-label-col) + var(--cc-fin-gap));
  }
}

/* Project Alias display for Cost Control */
.project-alias-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -.35rem 0 1rem;
  padding: 1.05rem 1.15rem;
  border: 1px solid rgba(90, 167, 255, .28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(90,167,255,.18), transparent 35%),
    linear-gradient(135deg, rgba(18, 37, 62, .88), rgba(9, 24, 43, .82));
  box-shadow: var(--shadow-sm);
}
.project-alias-banner h2 {
  margin: .1rem 0 0;
  color: var(--text-strong);
  font-size: clamp(1.65rem, 2.6vw, 2.7rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.project-alias-banner p:not(.eyebrow) {
  margin: .4rem 0 0;
  color: var(--text-soft);
  font-weight: 750;
}
.project-alias-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem .75rem;
  border: 1px solid rgba(45, 212, 191, .32);
  border-radius: 999px;
  background: rgba(45, 212, 191, .12);
  color: var(--text-strong);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.project-card-alias {
  display: block;
  font-size: 1.12rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.project-card-name {
  display: block;
  margin-top: -.35rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
html[data-theme="light"] .project-alias-banner {
  background:
    radial-gradient(circle at 0 0, rgba(90,167,255,.18), transparent 35%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(238,246,255,.96));
  border-color: rgba(37,99,235,.22);
}
html[dir="rtl"] .project-alias-pill {
  letter-spacing: 0;
}
@media (max-width: 760px) {
  .project-alias-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Temporary Cost Control version selector */
.cc-version-switcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  margin: -0.35rem 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 23, 42, .74), rgba(17, 24, 39, .52));
  box-shadow: var(--shadow-sm);
}
.cc-version-current h3 {
  margin: .05rem 0 .25rem;
  color: var(--text-strong);
  font-size: 1.15rem;
  font-weight: 950;
}
.cc-version-current p:not(.eyebrow) {
  margin: 0;
  color: var(--text-soft);
  font-weight: 700;
}
.cc-version-select-form,
.cc-version-create-form {
  display: grid;
  gap: .75rem;
  align-items: end;
}
.cc-version-select-form {
  grid-template-columns: minmax(220px, 320px) auto;
}
.cc-version-select-form label,
.cc-version-create-form label {
  display: grid;
  gap: .35rem;
  margin: 0;
}
.cc-version-select-form span,
.cc-version-create-form span {
  color: var(--text-soft);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cc-version-create-panel {
  margin-bottom: 1rem;
}
.cc-version-create-form {
  grid-template-columns: minmax(180px, 1fr) minmax(150px, .65fr) minmax(220px, 1.4fr) auto;
}
.budget-version-field small {
  color: var(--accent-orange);
  font-weight: 800;
}
html[data-theme="light"] .cc-version-switcher {
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(241,245,249,.96));
  border-color: rgba(37,99,235,.16);
}
html[dir="rtl"] .cc-version-select-form span,
html[dir="rtl"] .cc-version-create-form span {
  letter-spacing: 0;
}
@media (max-width: 900px) {
  .cc-version-switcher,
  .cc-version-select-form,
  .cc-version-create-form {
    grid-template-columns: 1fr;
  }
}

/* CBS hierarchy budget structure */
.page-cost-control .cost-control-lines-table {
  min-width: 1720px;
}
.page-cost-control .cost-control-lines-table select.input-xs {
  min-width: 168px;
}
.page-cost-control .cost-control-lines-table .budget-description {
  min-width: 240px;
}
.page-cost-control .cost-control-lines-table .budget-notes {
  min-width: 190px;
}
.page-cost-control .cbs-budget-lines-detail-table {
  min-width: 1540px;
}
.budget-structure-badge,
.cc-version-structure {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .42rem .7rem;
  border: 1px solid rgba(45, 212, 191, .32);
  border-radius: 999px;
  background: rgba(45, 212, 191, .12);
  color: var(--text-strong);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.cc-version-current .cc-version-structure {
  margin-top: .65rem;
}
.cost-control-budget-form .budget-structure-field small,
.cc-version-create-form small,
.muted-line {
  display: block;
  margin-top: .25rem;
  color: var(--text-soft);
  font-weight: 700;
}
html[dir="rtl"] .budget-structure-badge,
html[dir="rtl"] .cc-version-structure {
  letter-spacing: 0;
}
@media (max-width: 760px) {
  .page-cost-control .cost-control-lines-table {
    min-width: 1480px;
  }
}

/* CBS hierarchical budget entry */
.page-cost-control .legacy-budget-lines-table.cost-control-lines-table {
  min-width: 1280px;
}
.cbs-budget-hierarchy[hidden],
.legacy-budget-lines[hidden],
[data-legacy-line-actions][hidden] {
  display: none !important;
}
.cbs-budget-hierarchy {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.cbs-hierarchy-note {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .9rem 1rem;
  border: 1px solid rgba(45, 212, 191, .24);
  border-radius: 18px;
  background: rgba(45, 212, 191, .08);
  color: var(--text-soft);
  font-weight: 750;
}
.cbs-hierarchy-note strong {
  color: var(--text-strong);
  font-weight: 950;
}
.cbs-level1-card {
  display: grid;
  gap: .85rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 23, 42, .68), rgba(15, 23, 42, .38));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.cbs-level1-head,
.cbs-class-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-width: 0;
}
.cbs-level1-head h3 {
  margin: .15rem 0 0;
  font-size: 1.15rem;
  font-weight: 950;
  color: var(--text-strong);
}
.cbs-class-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .85rem;
  min-width: 0;
}
.cbs-class-card {
  min-width: 0;
  padding: .85rem;
  border: 1px solid rgba(96, 165, 250, .16);
  border-radius: 18px;
  background: rgba(2, 6, 23, .26);
}
.cbs-class-head {
  margin-bottom: .7rem;
}
.cbs-class-head > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: .65rem;
  row-gap: .12rem;
  min-width: 0;
}
.cbs-class-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-strong);
  font-weight: 950;
}
.cbs-class-head small {
  grid-column: 2;
  color: var(--text-soft);
  font-weight: 700;
}
.cbs-class-line-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.page-cost-control .cbs-class-lines-table {
  min-width: 1220px;
}
.page-cost-control .cbs-class-lines-table select.input-xs {
  min-width: 170px;
}
.page-cost-control .cbs-class-lines-table .budget-description {
  min-width: 220px;
}
.page-cost-control .cbs-class-lines-table .budget-notes {
  min-width: 170px;
}
html[data-theme="light"] .cbs-level1-card {
  background: linear-gradient(135deg, rgba(248,250,252,.98), rgba(241,245,249,.94));
  border-color: rgba(37,99,235,.14);
}
html[data-theme="light"] .cbs-class-card {
  background: rgba(255,255,255,.78);
  border-color: rgba(37,99,235,.13);
}
html[dir="rtl"] .cbs-class-head > div {
  grid-template-columns: minmax(0, 1fr) auto;
}
html[dir="rtl"] .cbs-class-head small {
  grid-column: 1;
}
@media (max-width: 760px) {
  .cbs-level1-head,
  .cbs-class-head,
  .cbs-hierarchy-note {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-cost-control .cbs-class-lines-table {
    min-width: 1120px;
  }
}

/* CBS class selection step: keep hierarchy compact until user selects required classes */
.cbs-class-picker {
  display: grid;
  gap: .85rem;
  padding: 1rem;
  border: 1px solid rgba(96, 165, 250, .18);
  border-radius: 22px;
  background: rgba(15, 23, 42, .38);
  min-width: 0;
}
.cbs-class-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}
.cbs-class-picker-head h3 {
  margin: .15rem 0 .25rem;
  color: var(--text-strong);
  font-size: 1.15rem;
  font-weight: 950;
}
.cbs-class-picker-head p {
  margin: 0;
  color: var(--text-soft);
  font-weight: 700;
}
.cbs-picker-main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  min-width: 0;
}
.cbs-picker-group {
  display: grid;
  gap: .7rem;
  min-width: 0;
  padding: .85rem;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 18px;
  background: rgba(2, 6, 23, .22);
}
.cbs-picker-group-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
  min-width: 0;
}
.cbs-picker-group-title strong {
  color: var(--text-strong);
  font-weight: 950;
}
.cbs-picker-group-title small {
  display: block;
  margin-top: .1rem;
  color: var(--text-soft);
  font-size: .75rem;
  font-weight: 750;
}
.cbs-picker-options {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.cbs-class-option {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-width: 0;
  padding: .45rem .62rem;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 999px;
  background: rgba(15, 23, 42, .48);
  color: var(--text-soft);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 850;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.cbs-class-option input {
  accent-color: var(--accent-cyan);
}
.cbs-class-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.cbs-class-option.selected {
  border-color: rgba(45, 212, 191, .48);
  background: rgba(45, 212, 191, .13);
  color: var(--text-strong);
}
.cbs-entry-note {
  margin-top: .1rem;
}
.cbs-level1-empty {
  padding: .9rem 1rem;
  border: 1px dashed rgba(148, 163, 184, .28);
  border-radius: 16px;
  color: var(--text-soft);
  background: rgba(15, 23, 42, .28);
  font-weight: 750;
}
.cbs-level1-empty[hidden],
.cbs-class-card[hidden] {
  display: none !important;
}
.page-cost-control .cbs-class-lines-table select[data-cost-component]:disabled {
  opacity: .58;
  cursor: not-allowed;
}
html[data-theme="light"] .cbs-class-picker,
html[data-theme="light"] .cbs-picker-group,
html[data-theme="light"] .cbs-level1-empty {
  background: rgba(255,255,255,.76);
  border-color: rgba(37,99,235,.14);
}
html[data-theme="light"] .cbs-class-option {
  background: rgba(248,250,252,.92);
  border-color: rgba(37,99,235,.14);
}
html[data-theme="light"] .cbs-class-option.selected {
  background: rgba(20,184,166,.13);
  border-color: rgba(20,184,166,.38);
}
html[dir="rtl"] .cbs-picker-group-title {
  grid-template-columns: minmax(0, 1fr) auto;
}
@media (max-width: 980px) {
  .cbs-picker-main-grid {
    grid-template-columns: 1fr;
  }
  .cbs-class-picker-head {
    flex-direction: column;
  }
}
.page-cost-control .cbs-class-lines-table select[data-cost-component].cost-component-locked {
  opacity: .58;
  cursor: not-allowed;
  pointer-events: none;
}

/* TCC CBS BOQ Activity Mapping */
.page-cost-control-boq-activity-mapping .boq-activity-list {
  display: grid;
  gap: 1rem;
}
.boq-activity-card {
  border: 1px solid var(--border-color, rgba(148, 163, 184, 0.22));
  border-radius: 18px;
  padding: 1rem;
  background: var(--card-bg, rgba(15, 23, 42, 0.72));
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10);
}
.boq-activity-item-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: .8rem;
}
.boq-activity-item-head h3 {
  margin: .15rem 0;
  font-size: 1rem;
  line-height: 1.35;
}
.boq-activity-meta {
  margin: .2rem 0 0;
  opacity: .75;
  font-size: .78rem;
}
.boq-activity-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .45rem;
}
.boq-activity-option {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .55rem;
  border: 1px solid var(--border-color, rgba(148, 163, 184, .22));
  border-radius: 12px;
  cursor: pointer;
  min-width: 0;
}
.boq-activity-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.boq-activity-option.selected {
  background: rgba(59, 130, 246, .13);
  border-color: rgba(59, 130, 246, .45);
}
.boq-activity-option input {
  flex: 0 0 auto;
}
.cbs-direct-host-cell select,
.cbs-direct-activity-cell select {
  min-width: 190px;
  max-width: 260px;
}
.cbs-indirect-host-cell {
  min-width: 110px;
  color: var(--muted-color, #94a3b8);
}
.cbs-class-lines-table th,
.cbs-class-lines-table td {
  vertical-align: top;
}
.muted-text {
  color: var(--muted-color, #94a3b8);
}
@media (max-width: 900px) {
  .boq-activity-item-head {
    flex-direction: column;
  }
  .boq-activity-options {
    grid-template-columns: 1fr;
  }
}

/* TCC CBS sequential budget entry */
.page-cost-control .cbs-class-lines-table .sequence-locked,
.page-cost-control .cbs-class-lines-table [data-sequence-controlled][disabled] {
  opacity: .55;
  cursor: not-allowed;
}

/* TCC CBS budget compact/autofit refinements */
.page-cost-control .cbs-class-line-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}
.page-cost-control .cbs-class-lines-table {
  width: 100%;
  min-width: 1280px;
  table-layout: fixed;
}
.page-cost-control .cbs-class-lines-table th,
.page-cost-control .cbs-class-lines-table td {
  padding: 8px 7px;
}
.page-cost-control .cbs-class-lines-table .input-xs,
.page-cost-control .cbs-class-lines-table select.input-xs,
.page-cost-control .cbs-direct-host-cell select,
.page-cost-control .cbs-direct-activity-cell select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.page-cost-control .cbs-class-lines-table .cbs-col-index { width: 36px; }
.page-cost-control .cbs-class-lines-table .cbs-col-wbs { width: 72px; }
.page-cost-control .cbs-class-lines-table .cbs-col-cost-code { width: 82px; }
.page-cost-control .cbs-class-lines-table .cbs-col-boq { width: 180px; }
.page-cost-control .cbs-class-lines-table .cbs-col-activity { width: 135px; }
.page-cost-control .cbs-class-lines-table .cbs-col-element { width: 118px; }
.page-cost-control .cbs-class-lines-table .cbs-col-component { width: 168px; }
.page-cost-control .cbs-class-lines-table .cbs-col-description { width: 150px; }
.page-cost-control .cbs-class-lines-table .cbs-col-unit { width: 74px; }
.page-cost-control .cbs-class-lines-table .cbs-col-qty { width: 88px; }
.page-cost-control .cbs-class-lines-table .cbs-col-rate { width: 96px; }
.page-cost-control .cbs-class-lines-table .cbs-col-amount { width: 100px; }
.page-cost-control .cbs-class-lines-table .cbs-col-notes { width: 112px; }
.page-cost-control .cbs-class-lines-table .cbs-col-actions { width: 58px; }
.page-cost-control .budget-select-preview {
  display: block;
  margin-top: .22rem;
  max-width: 100%;
  color: var(--text-soft);
  font-size: .7rem;
  font-weight: 750;
  line-height: 1.22;
  overflow-wrap: anywhere;
  white-space: normal;
}
.page-cost-control .budget-component-cell {
  min-width: 0;
}
.page-cost-control .budget-component-helper {
  margin-top: .32rem;
}
.page-cost-control .budget-component-helper[hidden] {
  display: none !important;
}
.page-cost-control .manpower-budget-helper,
.page-cost-control .fuel-budget-helper {
  display: grid;
  grid-template-columns: 1fr;
  gap: .32rem;
  padding: .38rem;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 12px;
  background: rgba(15, 23, 42, .22);
}
.page-cost-control .manpower-budget-helper label,
.page-cost-control .fuel-budget-helper label {
  display: grid;
  gap: .16rem;
  min-width: 0;
}
.page-cost-control .manpower-budget-helper span,
.page-cost-control .fuel-budget-helper span,
.page-cost-control .budget-auto-note {
  color: var(--text-soft);
  font-size: .68rem;
  font-weight: 850;
}
.page-cost-control .budget-auto-field {
  background: rgba(45, 212, 191, .08);
  border-color: rgba(45, 212, 191, .22);
  color: var(--text-strong);
}
html[data-theme="light"] .page-cost-control .manpower-budget-helper,
html[data-theme="light"] .page-cost-control .fuel-budget-helper {
  background: rgba(248,250,252,.88);
  border-color: rgba(37,99,235,.12);
}
html[data-theme="light"] .page-cost-control .budget-auto-field {
  background: rgba(20,184,166,.08);
  border-color: rgba(20,184,166,.24);
}

/* TCC CBS automatic component locks */
.page-cost-control .cbs-class-lines-table .budget-locked-field {
  pointer-events: none;
  cursor: not-allowed;
  opacity: .82;
  background: rgba(45, 212, 191, .10);
  border-color: rgba(45, 212, 191, .24);
}
.page-cost-control .cbs-class-lines-table select.budget-locked-field {
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
}
.page-cost-control .budget-amount-note {
  display: block;
  margin-top: .22rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.18;
}
html[data-theme="light"] .page-cost-control .cbs-class-lines-table .budget-locked-field {
  background: rgba(20,184,166,.09);
  border-color: rgba(20,184,166,.26);
}

@media (max-width: 1450px) {
  .page-cost-control .cbs-class-lines-table {
    min-width: 1220px;
  }
  .page-cost-control .cbs-class-lines-table .cbs-col-boq { width: 170px; }
  .page-cost-control .cbs-class-lines-table .cbs-col-component { width: 160px; }
  .page-cost-control .cbs-class-lines-table .cbs-col-description { width: 145px; }
  .page-cost-control .cbs-class-lines-table .cbs-col-notes { width: 96px; }
}

/* TCC CBS hierarchical row controls */
.page-cost-control .cbs-class-lines-table .cbs-col-actions { width: 104px; }
.page-cost-control .budget-row-actions {
  display: grid;
  gap: .25rem;
  min-width: 0;
}
.page-cost-control .budget-row-actions .btn {
  width: 100%;
  min-height: 26px;
  padding: .28rem .36rem;
  font-size: .66rem;
  line-height: 1.05;
  white-space: normal;
}
.page-cost-control .budget-row-actions .btn[hidden] {
  display: none !important;
}
.page-cost-control .budget-auto-component-row td {
  background: rgba(45, 212, 191, .045);
}
.page-cost-control .budget-auto-component-row .line-index {
  color: var(--text-soft);
  font-weight: 900;
}
.page-cost-control .budget-auto-component-row .line-index::before {
  content: "↳ ";
  color: var(--accent-cyan, #2dd4bf);
}
.page-cost-control .budget-auto-component-row .budget-wbs-cell input:not([type="hidden"]),
.page-cost-control .budget-auto-component-row .budget-cost-code-cell input,
.page-cost-control .budget-auto-component-row .cbs-direct-host-cell select,
.page-cost-control .budget-auto-component-row .cbs-direct-host-cell .budget-select-preview,
.page-cost-control .budget-auto-component-row .cbs-direct-activity-cell select,
.page-cost-control .budget-auto-component-row .budget-element-cell select {
  display: none !important;
}
.page-cost-control .budget-auto-component-row .budget-wbs-cell::after,
.page-cost-control .budget-auto-component-row .cbs-direct-host-cell::after,
.page-cost-control .budget-auto-component-row .cbs-direct-activity-cell::after,
.page-cost-control .budget-auto-component-row .budget-element-cell::after {
  content: "same as parent";
  display: block;
  color: var(--text-soft);
  font-size: .66rem;
  font-weight: 850;
  line-height: 1.15;
  opacity: .74;
}
.page-cost-control .budget-auto-component-row .budget-wbs-cell::after {
  content: "component";
  color: var(--accent-cyan, #2dd4bf);
  opacity: .9;
}
html[data-theme="light"] .page-cost-control .budget-auto-component-row td {
  background: rgba(20, 184, 166, .055);
}

/* TCC Direct Cost BOQ / Activity / Cost Element accordion budget entry */
.page-cost-control .cbs-direct-accordion-scroll {
  overflow-x: visible;
}
.page-cost-control .cbs-direct-accordion-active {
  width: 100%;
  min-width: 0 !important;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0 .55rem;
}
.page-cost-control .cbs-direct-accordion-active colgroup,
.page-cost-control .cbs-direct-accordion-active thead {
  display: none !important;
}
.page-cost-control .cbs-direct-accordion-active tbody {
  display: grid;
  gap: .55rem;
}
.page-cost-control .cbs-direct-accordion-active tr[data-budget-hierarchy-row],
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] {
  display: block;
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] {
  padding: .68rem;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 16px;
  background: rgba(15, 23, 42, .24);
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td {
  display: block;
  min-width: 0;
  padding: 0 !important;
  border: 0;
  background: transparent !important;
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] {
  display: grid;
  grid-template-columns: 38px repeat(auto-fit, minmax(116px, 1fr));
  align-items: start;
  gap: .5rem;
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td::before {
  display: block;
  margin-bottom: .16rem;
  color: var(--text-soft);
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .01em;
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(1)::before { content: "#"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(2)::before { content: "WBS"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(3)::before { content: "Cost Code"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(4)::before { content: "BOQ Item"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(5)::before { content: "Activity"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(6)::before { content: "Cost Element"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(7)::before { content: "Cost Component"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(8)::before { content: "Description"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(9)::before { content: "Unit"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(10)::before { content: "Qty"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(11)::before { content: "Unit Rate"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(12)::before { content: "Amount"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(13)::before { content: "Notes"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td:nth-child(14)::before { content: "Actions"; }
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] .line-index {
  align-self: center;
  justify-self: center;
  font-weight: 950;
  color: var(--text-soft);
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] .line-index::before {
  content: none;
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-detail-row.budget-hierarchy-has-boq .cbs-direct-host-cell,
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-detail-row.budget-hierarchy-has-activity .cbs-direct-activity-cell {
  display: none !important;
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-detail-row .budget-row-actions [data-add-same-boq-activity],
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-detail-row .budget-row-actions [data-add-same-activity-element] {
  display: none !important;
}
.page-cost-control .cbs-direct-accordion-active .budget-description,
.page-cost-control .cbs-direct-accordion-active .budget-notes {
  min-width: 0;
}
.page-cost-control .cbs-direct-accordion-active .budget-accordion-collapsed-row {
  display: none !important;
}
.page-cost-control .budget-hierarchy-row td {
  display: block;
  padding: 0 !important;
  border: 0;
  background: transparent !important;
}
.page-cost-control .budget-hierarchy-line {
  display: grid;
  grid-template-columns: auto minmax(180px, 1.25fr) minmax(220px, 1.2fr) auto auto auto;
  align-items: center;
  gap: .6rem;
  padding: .72rem .78rem;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: rgba(15, 23, 42, .44);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.page-cost-control .budget-hierarchy-boq-row .budget-hierarchy-line {
  margin-top: .35rem;
  border-color: rgba(45, 212, 191, .36);
  background: linear-gradient(135deg, rgba(45, 212, 191, .14), rgba(15, 23, 42, .46));
}
.page-cost-control .budget-hierarchy-activity-row .budget-hierarchy-line {
  margin-left: 1rem;
  border-color: rgba(96, 165, 250, .30);
  background: rgba(59, 130, 246, .09);
}
.page-cost-control .budget-hierarchy-element-row .budget-hierarchy-line {
  margin-left: 2rem;
  padding: .54rem .66rem;
  border-color: rgba(148, 163, 184, .17);
  background: rgba(2, 6, 23, .23);
}
.page-cost-control .budget-hierarchy-title {
  display: grid;
  gap: .12rem;
  min-width: 0;
}
.page-cost-control .budget-hierarchy-title small {
  color: var(--text-soft);
  font-size: .68rem;
  font-weight: 850;
}
.page-cost-control .budget-hierarchy-title strong {
  min-width: 0;
  color: var(--text-strong);
  font-size: .92rem;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.page-cost-control .budget-hierarchy-controls {
  min-width: 0;
}
.page-cost-control .budget-hierarchy-control {
  display: grid;
  gap: .16rem;
  min-width: 0;
}
.page-cost-control .budget-hierarchy-control span {
  color: var(--text-soft);
  font-size: .66rem;
  font-weight: 850;
}
.page-cost-control .budget-hierarchy-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.page-cost-control .budget-hierarchy-total,
.page-cost-control .budget-hierarchy-meta {
  padding: .32rem .52rem;
  border-radius: 999px;
  background: rgba(45, 212, 191, .11);
  color: var(--text-strong);
  font-size: .76rem;
  font-weight: 950;
  white-space: nowrap;
}
.page-cost-control .budget-hierarchy-meta {
  background: rgba(148, 163, 184, .11);
  color: var(--text-soft);
}
.page-cost-control .budget-hierarchy-actions {
  display: flex;
  justify-content: flex-end;
  gap: .34rem;
  flex-wrap: wrap;
}
.page-cost-control .budget-accordion-toggle {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0 !important;
  border-radius: 999px;
  font-weight: 950;
  line-height: 1;
}
html[data-theme="light"] .page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] {
  background: rgba(248,250,252,.78);
  border-color: rgba(37,99,235,.13);
}
html[data-theme="light"] .page-cost-control .budget-hierarchy-line {
  background: rgba(248,250,252,.94);
  border-color: rgba(37,99,235,.14);
}
html[data-theme="light"] .page-cost-control .budget-hierarchy-boq-row .budget-hierarchy-line {
  background: linear-gradient(135deg, rgba(20,184,166,.13), rgba(255,255,255,.92));
  border-color: rgba(20,184,166,.30);
}
html[data-theme="light"] .page-cost-control .budget-hierarchy-activity-row .budget-hierarchy-line {
  background: rgba(59,130,246,.07);
  border-color: rgba(37,99,235,.16);
}
html[dir="rtl"] .page-cost-control .budget-hierarchy-activity-row .budget-hierarchy-line {
  margin-left: 0;
  margin-right: 1rem;
}
html[dir="rtl"] .page-cost-control .budget-hierarchy-element-row .budget-hierarchy-line {
  margin-left: 0;
  margin-right: 2rem;
}
@media (max-width: 1100px) {
  .page-cost-control .budget-hierarchy-line {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .page-cost-control .budget-hierarchy-controls,
  .page-cost-control .budget-hierarchy-total,
  .page-cost-control .budget-hierarchy-meta,
  .page-cost-control .budget-hierarchy-actions {
    grid-column: 2;
    justify-self: stretch;
  }
  .page-cost-control .budget-hierarchy-actions {
    justify-content: flex-start;
  }
}
/* Keep Direct Cost detail rows clean once BOQ / Activity / Cost Element are promoted to accordion headers. */
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-detail-row.budget-hierarchy-has-element .budget-element-cell {
  display: none !important;
}

/* TCC budget accordion compact resource design + BOQ facts */
.page-cost-control .productivity-budget-helper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .32rem;
  padding: .38rem;
  border: 1px solid rgba(56, 189, 248, .18);
  border-radius: 12px;
  background: rgba(14, 165, 233, .08);
}
.page-cost-control .productivity-budget-helper label {
  display: grid;
  gap: .16rem;
  min-width: 0;
}
.page-cost-control .productivity-budget-helper span,
.page-cost-control .productivity-budget-helper small {
  color: var(--text-soft);
  font-size: .68rem;
  font-weight: 850;
}
.page-cost-control .productivity-budget-helper small {
  grid-column: 1 / -1;
  line-height: 1.18;
}
.page-cost-control .budget-boq-info-line {
  display: flex;
  flex-wrap: wrap;
  gap: .24rem;
  margin-top: .22rem;
}
.page-cost-control .budget-boq-info-chip {
  display: inline-flex;
  align-items: center;
  gap: .26rem;
  max-width: 100%;
  padding: .18rem .36rem;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  background: rgba(15, 23, 42, .20);
  color: var(--text-soft);
  font-size: .68rem;
  font-style: normal;
  line-height: 1.1;
  white-space: nowrap;
}
.page-cost-control .budget-boq-info-chip em {
  font-style: normal;
  font-weight: 850;
  opacity: .78;
}
.page-cost-control .budget-boq-info-chip b {
  color: var(--text-strong);
  font-weight: 950;
}
.page-cost-control .cbs-direct-accordion-active tbody {
  gap: .38rem;
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-line {
  grid-template-columns: auto minmax(0, 1fr) minmax(155px, .72fr) auto auto auto;
  gap: .42rem;
  padding: .50rem .58rem;
  border-radius: 14px;
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-boq-row .budget-hierarchy-line {
  margin-top: .20rem;
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-activity-row .budget-hierarchy-line {
  margin-left: .65rem;
  padding-left: .70rem;
  border-left: 4px solid rgba(96, 165, 250, .55);
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-element-row .budget-hierarchy-line {
  margin-left: 1.15rem;
  padding: .42rem .54rem;
  border-radius: 12px;
  border-left: 4px solid rgba(148, 163, 184, .38);
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-element-manpower .budget-hierarchy-line {
  border-left-color: rgba(45, 212, 191, .70);
  background: rgba(20, 184, 166, .07);
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-element-equipment .budget-hierarchy-line {
  border-left-color: rgba(251, 191, 36, .70);
  background: rgba(245, 158, 11, .07);
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-element-materials .budget-hierarchy-line {
  border-left-color: rgba(168, 85, 247, .64);
  background: rgba(147, 51, 234, .065);
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-element-subcontract .budget-hierarchy-line {
  border-left-color: rgba(96, 165, 250, .68);
  background: rgba(37, 99, 235, .06);
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-title {
  gap: .06rem;
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-title strong {
  font-size: .86rem;
  line-height: 1.18;
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-title small,
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-control span {
  font-size: .62rem;
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-total,
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-meta {
  padding: .24rem .42rem;
  font-size: .70rem;
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-actions {
  gap: .24rem;
}
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-actions .btn {
  min-height: 26px;
  padding: .24rem .42rem;
  font-size: .67rem;
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] {
  grid-template-columns: 28px repeat(auto-fit, minmax(86px, 1fr));
  gap: .34rem .42rem;
  padding: .46rem .54rem;
  border-radius: 12px;
  border-left: 4px solid rgba(148, 163, 184, .22);
  background: rgba(15, 23, 42, .18);
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row].budget-element-manpower {
  border-left-color: rgba(45, 212, 191, .70);
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row].budget-element-equipment {
  border-left-color: rgba(251, 191, 36, .70);
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row].budget-element-materials {
  border-left-color: rgba(168, 85, 247, .64);
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row].budget-element-subcontract {
  border-left-color: rgba(96, 165, 250, .68);
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] td::before {
  margin-bottom: .10rem;
  font-size: .58rem;
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] .input-xs,
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] select.input-xs {
  min-height: 30px;
  padding: .34rem .46rem;
  font-size: .76rem;
}
.page-cost-control .cbs-direct-accordion-active .budget-row-actions {
  grid-template-columns: 1fr;
  gap: .18rem;
}
.page-cost-control .cbs-direct-accordion-active .budget-row-actions .btn {
  min-height: 24px;
  padding: .22rem .34rem;
  font-size: .62rem;
}
.page-cost-control .cbs-direct-accordion-active .budget-component-helper {
  margin-top: .22rem;
}
html[data-theme="light"] .page-cost-control .budget-boq-info-chip {
  background: rgba(255, 255, 255, .68);
  border-color: rgba(37, 99, 235, .12);
}
html[data-theme="light"] .page-cost-control .productivity-budget-helper {
  background: rgba(14, 165, 233, .055);
  border-color: rgba(14, 165, 233, .16);
}
html[data-theme="light"] .page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] {
  background: rgba(255, 255, 255, .70);
}
html[dir="rtl"] .page-cost-control .cbs-direct-accordion-active .budget-hierarchy-activity-row .budget-hierarchy-line,
html[dir="rtl"] .page-cost-control .cbs-direct-accordion-active .budget-hierarchy-element-row .budget-hierarchy-line,
html[dir="rtl"] .page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row] {
  border-left-width: 1px;
  border-right-width: 4px;
}
@media (max-width: 1100px) {
  .page-cost-control .cbs-direct-accordion-active .budget-hierarchy-line {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .page-cost-control .productivity-budget-helper {
    grid-template-columns: 1fr;
  }
}
/* Alias singular Material cost element to the same compact purple treatment. */
.page-cost-control .cbs-direct-accordion-active .budget-hierarchy-element-material .budget-hierarchy-line {
  border-left-color: rgba(168, 85, 247, .64);
  background: rgba(147, 51, 234, .065);
}
.page-cost-control .cbs-direct-accordion-active tr[data-cbs-budget-row].budget-element-material {
  border-left-color: rgba(168, 85, 247, .64);
}

/* Budget detail: compact visual Direct / Indirect assignment map */
.page-cost-control-budget-detail .budget-assignment-panel {
  overflow: hidden;
}
.page-cost-control-budget-detail .budget-assignment-panel-head {
  align-items: flex-start;
}
.page-cost-control-budget-detail .budget-assignment-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: .75rem;
}
.page-cost-control-budget-detail .budget-assignment-total-card {
  display: grid;
  gap: .16rem;
  min-width: 0;
  padding: .72rem .82rem;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 16px;
  background: rgba(15, 23, 42, .30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.page-cost-control-budget-detail .budget-assignment-total-card span,
.page-cost-control-budget-detail .budget-assignment-node-title small,
.page-cost-control-budget-detail .budget-assignment-section-title small,
.page-cost-control-budget-detail .budget-assignment-component-head small {
  color: var(--text-soft);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.page-cost-control-budget-detail .budget-assignment-total-card strong {
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 950;
}
.page-cost-control-budget-detail .budget-assignment-total-card small {
  color: var(--text-soft);
  font-weight: 780;
}
.page-cost-control-budget-detail .budget-assignment-total-direct {
  border-color: rgba(20, 184, 166, .28);
  background: linear-gradient(135deg, rgba(20, 184, 166, .14), rgba(15, 23, 42, .28));
}
.page-cost-control-budget-detail .budget-assignment-total-indirect {
  border-color: rgba(168, 85, 247, .26);
  background: linear-gradient(135deg, rgba(168, 85, 247, .13), rgba(15, 23, 42, .27));
}
.page-cost-control-budget-detail .budget-assignment-total-all {
  border-color: rgba(245, 158, 11, .26);
  background: linear-gradient(135deg, rgba(245, 158, 11, .12), rgba(15, 23, 42, .27));
}
.page-cost-control-budget-detail .budget-assignment-element-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
  margin-bottom: .8rem;
}
.page-cost-control-budget-detail .budget-assignment-element-pill {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .34rem .54rem;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  background: rgba(15, 23, 42, .25);
  color: var(--text-soft);
  font-size: .72rem;
  font-weight: 850;
}
.page-cost-control-budget-detail .budget-assignment-element-pill b {
  color: var(--text-strong);
  font-weight: 950;
}
.page-cost-control-budget-detail .budget-assignment-element-pill em {
  font-style: normal;
  color: var(--text-soft);
}
.page-cost-control-budget-detail .budget-assignment-tree,
.page-cost-control-budget-detail .budget-assignment-boq-list,
.page-cost-control-budget-detail .budget-assignment-activity-list,
.page-cost-control-budget-detail .budget-assignment-class-list,
.page-cost-control-budget-detail .budget-assignment-element-list,
.page-cost-control-budget-detail .budget-assignment-component-grid,
.page-cost-control-budget-detail .budget-assignment-line-list {
  display: grid;
  gap: .55rem;
  min-width: 0;
}
.page-cost-control-budget-detail .budget-assignment-tree details > summary {
  list-style: none;
}
.page-cost-control-budget-detail .budget-assignment-tree details > summary::-webkit-details-marker,
.page-cost-control-budget-detail .budget-raw-lines-summary::-webkit-details-marker {
  display: none;
}
.page-cost-control-budget-detail .budget-assignment-section,
.page-cost-control-budget-detail .budget-assignment-boq-card,
.page-cost-control-budget-detail .budget-assignment-activity-card,
.page-cost-control-budget-detail .budget-assignment-class-card,
.page-cost-control-budget-detail .budget-assignment-element-card,
.page-cost-control-budget-detail .budget-assignment-component-card {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 17px;
  background: rgba(2, 6, 23, .18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.page-cost-control-budget-detail .budget-assignment-section {
  padding: .68rem;
  border-radius: 22px;
}
.page-cost-control-budget-detail .budget-assignment-direct {
  border-color: rgba(20, 184, 166, .24);
  background: linear-gradient(135deg, rgba(20, 184, 166, .10), rgba(2, 6, 23, .16));
}
.page-cost-control-budget-detail .budget-assignment-indirect {
  border-color: rgba(168, 85, 247, .22);
  background: linear-gradient(135deg, rgba(168, 85, 247, .10), rgba(2, 6, 23, .15));
}
.page-cost-control-budget-detail .budget-assignment-section-head,
.page-cost-control-budget-detail .budget-assignment-boq-head,
.page-cost-control-budget-detail .budget-assignment-activity-head,
.page-cost-control-budget-detail .budget-assignment-class-head,
.page-cost-control-budget-detail .budget-assignment-element-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .52rem;
  min-width: 0;
  cursor: pointer;
}
.page-cost-control-budget-detail .budget-assignment-section-head {
  padding: .16rem .18rem .62rem;
}
.page-cost-control-budget-detail .budget-assignment-boq-head,
.page-cost-control-budget-detail .budget-assignment-class-head {
  padding: .62rem .72rem;
  border-radius: 17px;
  background: rgba(15, 23, 42, .34);
}
.page-cost-control-budget-detail .budget-assignment-activity-head {
  padding: .52rem .62rem;
  border-radius: 15px;
  background: rgba(37, 99, 235, .09);
}
.page-cost-control-budget-detail .budget-assignment-element-head {
  padding: .44rem .55rem;
  border-radius: 13px;
  background: rgba(148, 163, 184, .07);
}
.page-cost-control-budget-detail .budget-assignment-section-title,
.page-cost-control-budget-detail .budget-assignment-node-title {
  display: grid;
  gap: .10rem;
  min-width: 0;
}
.page-cost-control-budget-detail .budget-assignment-section-title strong,
.page-cost-control-budget-detail .budget-assignment-node-title strong,
.page-cost-control-budget-detail .budget-assignment-line-main strong,
.page-cost-control-budget-detail .budget-assignment-component-head strong {
  min-width: 0;
  color: var(--text-strong);
  font-weight: 950;
  overflow-wrap: anywhere;
}
.page-cost-control-budget-detail .budget-assignment-node-title em,
.page-cost-control-budget-detail .budget-assignment-line-main small,
.page-cost-control-budget-detail .budget-assignment-line-main em {
  color: var(--text-soft);
  font-size: .70rem;
  font-style: normal;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.page-cost-control-budget-detail .budget-assignment-node-index,
.page-cost-control-budget-detail .budget-assignment-node-icon {
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 12px;
  background: rgba(45, 212, 191, .15);
  color: var(--text-strong);
  font-size: .75rem;
  font-weight: 950;
}
.page-cost-control-budget-detail .budget-assignment-indirect .budget-assignment-node-icon {
  background: rgba(168, 85, 247, .16);
}
.page-cost-control-budget-detail .budget-assignment-chip,
.page-cost-control-budget-detail .budget-assignment-amount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  padding: .28rem .48rem;
  border: 1px solid rgba(148, 163, 184, .17);
  border-radius: 999px;
  background: rgba(15, 23, 42, .30);
  color: var(--text-soft);
  font-size: .70rem;
  font-weight: 900;
  white-space: nowrap;
}
.page-cost-control-budget-detail .budget-assignment-amount {
  color: var(--text-strong);
  background: rgba(45, 212, 191, .10);
  border-color: rgba(45, 212, 191, .16);
}
.page-cost-control-budget-detail .budget-assignment-boq-facts {
  display: flex;
  flex-wrap: wrap;
  gap: .36rem;
  padding: .52rem .15rem .58rem .15rem;
}
.page-cost-control-budget-detail .budget-assignment-boq-facts span {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .24rem .42rem;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 999px;
  background: rgba(15, 23, 42, .20);
  color: var(--text-soft);
  font-size: .68rem;
}
.page-cost-control-budget-detail .budget-assignment-boq-facts em {
  font-style: normal;
  font-weight: 850;
}
.page-cost-control-budget-detail .budget-assignment-boq-facts b {
  color: var(--text-strong);
  font-weight: 950;
}
.page-cost-control-budget-detail .budget-assignment-activity-card,
.page-cost-control-budget-detail .budget-assignment-class-card {
  padding: .16rem;
}
.page-cost-control-budget-detail .budget-assignment-activity-card {
  margin-inline-start: .85rem;
  border-left: 4px solid rgba(96, 165, 250, .44);
}
.page-cost-control-budget-detail .budget-assignment-element-card {
  margin-inline-start: .85rem;
  padding: .14rem;
  border-left: 4px solid rgba(148, 163, 184, .28);
}
.page-cost-control-budget-detail .budget-assignment-element-manpower {
  border-left-color: rgba(56, 189, 248, .72);
  background: rgba(14, 165, 233, .055);
}
.page-cost-control-budget-detail .budget-assignment-element-equipment {
  border-left-color: rgba(245, 158, 11, .74);
  background: rgba(245, 158, 11, .055);
}
.page-cost-control-budget-detail .budget-assignment-element-material,
.page-cost-control-budget-detail .budget-assignment-element-materials {
  border-left-color: rgba(34, 197, 94, .68);
  background: rgba(34, 197, 94, .052);
}
.page-cost-control-budget-detail .budget-assignment-element-subcontract {
  border-left-color: rgba(168, 85, 247, .70);
  background: rgba(168, 85, 247, .052);
}
.page-cost-control-budget-detail .budget-assignment-component-grid,
.page-cost-control-budget-detail .budget-assignment-line-list,
.page-cost-control-budget-detail .budget-assignment-element-list,
.page-cost-control-budget-detail .budget-assignment-activity-list,
.page-cost-control-budget-detail .budget-assignment-class-list {
  padding: .52rem;
}
.page-cost-control-budget-detail .budget-assignment-component-card {
  padding: .52rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, .19);
}
.page-cost-control-budget-detail .budget-assignment-component-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .42rem;
}
.page-cost-control-budget-detail .budget-assignment-line-card {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: .52rem;
  padding: .48rem .55rem;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 13px;
  background: rgba(2, 6, 23, .18);
}
.page-cost-control-budget-detail .budget-assignment-line-no {
  display: inline-grid;
  place-items: center;
  min-width: 2.25rem;
  height: 1.55rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, .18);
  color: var(--text-soft);
  font-size: .66rem;
  font-weight: 950;
}
.page-cost-control-budget-detail .budget-assignment-line-main {
  display: grid;
  gap: .08rem;
  min-width: 0;
}
.page-cost-control-budget-detail .budget-assignment-line-amount {
  color: var(--text-strong);
  white-space: nowrap;
}
.page-cost-control-budget-detail .budget-raw-lines-panel {
  margin-top: .85rem;
  border-style: dashed;
}
.page-cost-control-budget-detail .budget-raw-lines-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .82rem .95rem;
  cursor: pointer;
  color: var(--text-soft);
  font-weight: 900;
}
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-total-card,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-section,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-boq-card,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-activity-card,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-class-card,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-element-card,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-component-card,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-line-card,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-element-pill,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-boq-facts span {
  background: rgba(255, 255, 255, .82);
  border-color: rgba(37, 99, 235, .12);
}
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-boq-head,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-class-head,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-component-card,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-line-card,
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-chip {
  background: rgba(248, 250, 252, .92);
}
html[dir="rtl"] .page-cost-control-budget-detail .budget-assignment-activity-card,
html[dir="rtl"] .page-cost-control-budget-detail .budget-assignment-element-card {
  border-left-width: 1px;
  border-right-width: 4px;
}
@media (max-width: 980px) {
  .page-cost-control-budget-detail .budget-assignment-overview {
    grid-template-columns: 1fr;
  }
  .page-cost-control-budget-detail .budget-assignment-section-head,
  .page-cost-control-budget-detail .budget-assignment-boq-head,
  .page-cost-control-budget-detail .budget-assignment-activity-head,
  .page-cost-control-budget-detail .budget-assignment-class-head,
  .page-cost-control-budget-detail .budget-assignment-element-head,
  .page-cost-control-budget-detail .budget-assignment-line-card {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .page-cost-control-budget-detail .budget-assignment-chip,
  .page-cost-control-budget-detail .budget-assignment-amount,
  .page-cost-control-budget-detail .budget-assignment-line-amount {
    grid-column: 2;
    justify-self: start;
  }
}
@media (max-width: 640px) {
  .page-cost-control-budget-detail .budget-assignment-activity-card,
  .page-cost-control-budget-detail .budget-assignment-element-card {
    margin-inline-start: .25rem;
  }
  .page-cost-control-budget-detail .budget-assignment-component-grid,
  .page-cost-control-budget-detail .budget-assignment-line-list,
  .page-cost-control-budget-detail .budget-assignment-element-list,
  .page-cost-control-budget-detail .budget-assignment-activity-list,
  .page-cost-control-budget-detail .budget-assignment-class-list {
    padding: .35rem;
  }
}

/* Budget detail visual tree refinements: level controls, default-collapsed readability, unit cost chips */
.page-cost-control-budget-detail .budget-assignment-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
  margin: .25rem 0 .85rem;
  padding: .58rem .66rem;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(15, 23, 42, .22));
}
.page-cost-control-budget-detail .budget-assignment-toolbar-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .42rem;
  min-width: 0;
}
.page-cost-control-budget-detail .budget-assignment-toolbar .btn-sm {
  min-height: 30px;
  padding: .36rem .62rem;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 900;
}
.page-cost-control-budget-detail .budget-assignment-level-control label {
  color: var(--text-soft);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.page-cost-control-budget-detail .budget-assignment-level-control select {
  min-height: 32px;
  max-width: 150px;
  padding: .34rem 2rem .34rem .62rem;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 10px;
  background: var(--surface-input);
  color: var(--text-strong);
  font-size: .75rem;
  font-weight: 850;
}
.page-cost-control-budget-detail .budget-assignment-section-head,
.page-cost-control-budget-detail .budget-assignment-boq-head,
.page-cost-control-budget-detail .budget-assignment-activity-head,
.page-cost-control-budget-detail .budget-assignment-class-head,
.page-cost-control-budget-detail .budget-assignment-element-head {
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  position: relative;
  padding-inline-end: 2.05rem;
}
.page-cost-control-budget-detail .budget-assignment-tree details > summary::after {
  content: "›";
  position: absolute;
  inset-inline-end: .72rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, .16);
  color: var(--text-soft);
  font-size: 1.05rem;
  font-weight: 950;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}
.page-cost-control-budget-detail .budget-assignment-tree details[open] > summary::after {
  transform: translateY(-50%) rotate(90deg);
  background: rgba(45, 212, 191, .18);
  color: var(--text-strong);
}
.page-cost-control-budget-detail .budget-assignment-node-metrics {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .32rem;
  min-width: 0;
}
.page-cost-control-budget-detail .budget-assignment-unit-cost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  padding: .28rem .48rem;
  border: 1px solid rgba(245, 158, 11, .24);
  border-radius: 999px;
  background: rgba(245, 158, 11, .12);
  color: #fde68a;
  font-size: .68rem;
  font-weight: 950;
  white-space: nowrap;
}
.page-cost-control-budget-detail .budget-assignment-boq-card {
  border-color: rgba(37, 99, 235, .30);
  background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(2, 6, 23, .16));
}
.page-cost-control-budget-detail .budget-assignment-boq-head {
  border: 1px solid rgba(96, 165, 250, .18);
  background: linear-gradient(135deg, rgba(37, 99, 235, .20), rgba(15, 23, 42, .34));
}
.page-cost-control-budget-detail .budget-assignment-activity-card {
  border-color: rgba(14, 165, 233, .36);
  background: linear-gradient(135deg, rgba(14, 165, 233, .09), rgba(2, 6, 23, .13));
}
.page-cost-control-budget-detail .budget-assignment-activity-head {
  border: 1px solid rgba(56, 189, 248, .18);
  background: rgba(14, 165, 233, .11);
}
.page-cost-control-budget-detail .budget-assignment-class-head {
  border: 1px solid rgba(168, 85, 247, .18);
  background: linear-gradient(135deg, rgba(168, 85, 247, .16), rgba(15, 23, 42, .30));
}
.page-cost-control-budget-detail .budget-assignment-element-head {
  border: 1px solid rgba(148, 163, 184, .16);
}
.page-cost-control-budget-detail .budget-assignment-tree details:not([open]) > summary {
  margin-bottom: 0;
}
.page-cost-control-budget-detail .budget-assignment-tree details:not([open]) {
  box-shadow: none;
}
.page-cost-control-budget-detail .budget-assignment-boq-facts span:last-child {
  border-color: rgba(245, 158, 11, .24);
  background: rgba(245, 158, 11, .10);
}
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-toolbar {
  background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(255, 255, 255, .96));
  border-color: rgba(37, 99, 235, .14);
}
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-unit-cost {
  background: rgba(180, 83, 9, .09);
  border-color: rgba(180, 83, 9, .20);
  color: #92400e;
}
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-boq-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, .055), rgba(255, 255, 255, .94));
  border-color: rgba(37, 99, 235, .16);
}
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-boq-head {
  background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(248, 250, 252, .98));
  border-color: rgba(37, 99, 235, .16);
}
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-activity-card {
  background: linear-gradient(135deg, rgba(8, 145, 178, .055), rgba(255, 255, 255, .96));
  border-color: rgba(8, 145, 178, .16);
}
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-activity-head {
  background: rgba(8, 145, 178, .065);
  border-color: rgba(8, 145, 178, .16);
}
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-class-head {
  background: linear-gradient(135deg, rgba(124, 58, 237, .08), rgba(248, 250, 252, .98));
  border-color: rgba(124, 58, 237, .16);
}
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-tree details > summary::after {
  background: rgba(15, 23, 42, .08);
  color: var(--text-soft);
}
html[data-theme="light"] .page-cost-control-budget-detail .budget-assignment-tree details[open] > summary::after {
  background: rgba(15, 118, 110, .12);
  color: var(--text-strong);
}
@media (max-width: 980px) {
  .page-cost-control-budget-detail .budget-assignment-section-head,
  .page-cost-control-budget-detail .budget-assignment-boq-head,
  .page-cost-control-budget-detail .budget-assignment-activity-head,
  .page-cost-control-budget-detail .budget-assignment-class-head,
  .page-cost-control-budget-detail .budget-assignment-element-head {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .page-cost-control-budget-detail .budget-assignment-unit-cost,
  .page-cost-control-budget-detail .budget-assignment-node-metrics {
    grid-column: 2;
    justify-self: start;
  }
}
@media (max-width: 640px) {
  .page-cost-control-budget-detail .budget-assignment-toolbar,
  .page-cost-control-budget-detail .budget-assignment-toolbar-group,
  .page-cost-control-budget-detail .budget-assignment-level-control {
    width: 100%;
  }
  .page-cost-control-budget-detail .budget-assignment-level-control select {
    flex: 1 1 140px;
    max-width: none;
  }
}
