.ekpi-page-shell {
  --ekpi-bg: #f5f8fb;
  --ekpi-ink: #122033;
  --ekpi-muted: #617286;
  --ekpi-line: #d8e4ef;
  --ekpi-high: #0f766e;
  --ekpi-mid: #b45309;
  --ekpi-low: #b91c1c;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 18px 14px 32px;
  color: var(--ekpi-ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", "Noto Sans", "DejaVu Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ekpi-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
  padding: 24px;
  border-radius: 12px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(253, 186, 116, 0.42), transparent 32%),
    radial-gradient(circle at bottom left, rgba(45, 212, 191, 0.18), transparent 28%),
    linear-gradient(135deg, #0f172a 0%, #155e75 46%, #0f766e 100%);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
}

.ekpi-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.14);
}

.ekpi-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.ekpi-subtitle {
  max-width: 760px;
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
}

.ekpi-hero-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 220px;
}

.ekpi-badge {
  align-self: flex-end;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.ekpi-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ekpi-hero-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ekpi-card {
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--ekpi-line);
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.ekpi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.ekpi-card-header h3 {
  margin: 0;
  font-size: 18px;
}

.ekpi-card-note {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ekpi-muted);
}

.ekpi-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ekpi-chip {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.14), rgba(249, 115, 22, 0.14));
  border: 1px solid rgba(15, 118, 110, 0.12);
}

.ekpi-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ekpi-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ekpi-field label,
.ekpi-toolbar-field span,
.ekpi-metric-setting span {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
}

.ekpi-field input,
.ekpi-toolbar-field input,
.ekpi-toolbar-field select,
.ekpi-metric-setting input,
.ekpi-weight-input {
  height: 30px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #c8d6e4;
  background: #fff;
  color: var(--ekpi-ink);
  font-size: 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ekpi-field input:focus,
.ekpi-toolbar-field input:focus,
.ekpi-toolbar-field select:focus,
.ekpi-metric-setting input:focus,
.ekpi-weight-input:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.ekpi-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.ekpi-btn {
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.ekpi-btn:hover {
  transform: none;
}

.ekpi-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.ekpi-btn-primary {
  color: #fff;
  background: #0f766e;
  box-shadow: none;
}

.ekpi-btn-secondary {
  color: #0f172a;
  background: #e2e8f0;
}

.ekpi-actions .ekpi-btn {
  width: auto !important;
  flex: 0 0 auto;
}

.ekpi-btn-mini {
  height: 26px;
  min-height: 26px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.ekpi-btn-mini i {
  margin-right: 4px;
  font-size: 11px;
}

.ekpi-status {
  min-height: 22px;
  font-size: 13px;
  font-weight: 800;
  color: #0f766e;
}

.ekpi-status.is-error {
  color: #dc2626;
}

.ekpi-status.is-warn {
  color: #b45309;
}

.ekpi-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.ekpi-insights-panel {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(241, 245, 255, 0.78));
}

.ekpi-insights-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ekpi-insight {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(248, 250, 255, 0.82));
  font-size: 12px;
  line-height: 1.45;
}

.ekpi-insight strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.ekpi-tabs-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ekpi-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 7px;
  align-self: flex-start;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
}

.ekpi-tab-btn {
  min-width: 110px;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  height: auto;
  min-height: 30px;
  background: transparent;
  color: #475569;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  text-align: center;
  cursor: pointer;
  font-family: "Segoe UI Variable Text", "Segoe UI", "Noto Sans", "DejaVu Sans", sans-serif;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.ekpi-tab-btn.is-active {
  color: #fff;
  background: #2563eb;
  box-shadow: none;
}

.ekpi-tab-panel[hidden] {
  display: none !important;
}

.ekpi-tabs-shell .ekpi-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98)),
    var(--ekpi-bg);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--ekpi-line);
}

.ekpi-summary-card {
  position: relative;
  overflow: hidden;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #dbe6ef;
  background: #ffffff;
}

.ekpi-summary-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -24px auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.04);
}

.ekpi-summary-card h4 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--ekpi-muted);
}

.ekpi-summary-value {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ekpi-ink);
}

.ekpi-summary-foot {
  margin-top: 6px;
  font-size: 11px;
  color: var(--ekpi-muted);
}

.ekpi-delta-chip {
  display: inline-flex;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.ekpi-delta-chip.up { background: rgba(34, 197, 94, 0.16); color: #166534; }
.ekpi-delta-chip.down { background: rgba(239, 68, 68, 0.16); color: #991b1b; }
.ekpi-delta-chip.flat { background: rgba(148, 163, 184, 0.2); color: #334155; }

.ekpi-main-grid {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.ekpi-manage-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #35506c;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(249, 115, 22, 0.08));
  border: 1px solid rgba(15, 118, 110, 0.12);
}

.ekpi-metric-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ekpi-metric-row {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #dbe6ef;
  background: #fff;
}

.ekpi-metric-row.is-active {
  box-shadow: 0 12px 20px rgba(15, 118, 110, 0.08);
  border-color: rgba(15, 118, 110, 0.22);
}

.ekpi-metric-main {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
}

.ekpi-metric-main input[type="checkbox"] {
  margin-top: 3px;
}

.ekpi-metric-title {
  display: block;
  font-size: 15px;
  font-weight: 900;
}

.ekpi-metric-meta {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ekpi-muted);
}

.ekpi-metric-side {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.ekpi-weight-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ekpi-muted);
}

.ekpi-weight-input {
  width: 100px;
}

.ekpi-metric-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ekpi-metric-setting {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ekpi-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(5, minmax(120px, 0.7fr));
  gap: 12px;
  margin-bottom: 12px;
}

.ekpi-toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ekpi-toolbar-field input,
.ekpi-toolbar-field select {
  height: 32px;
  min-height: 32px;
  padding: 0 30px 0 10px;
  font-size: 12px;
  line-height: 32px;
  color: #111827;
  box-sizing: border-box;
  overflow: visible;
}

.ekpi-toolbar-field select {
  height: 34px;
  min-height: 34px;
  padding: 4px 28px 4px 10px;
  line-height: normal;
  display: flex;
  align-items: center;
  overflow: visible;
  text-overflow: clip;
  -webkit-appearance: none;
  appearance: none;
  vertical-align: middle;
}

.ekpi-toolbar-field span {
  font-size: 11px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.ekpi-filter-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  align-self: flex-start;
  margin-bottom: 10px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.ekpi-pill-btn {
  border: 1px solid #d8e4ef;
  background: #fff;
  color: #42566d;
  border-radius: 10px;
  min-width: 72px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.18s ease;
}

.ekpi-pill-btn.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #0f4c81, #0f766e);
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.16);
}

.ekpi-table-meta {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ekpi-muted);
  line-height: 1.5;
}

.ekpi-export-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.ekpi-table-wrap {
  min-height: 280px;
}

.ekpi-table-shell {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #d7e3ef;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.ekpi-table {
  width: 100%;
  min-width: 1320px;
  border: none;
  background: transparent;
  border-collapse: separate;
  border-spacing: 0;
}

.ekpi-table th,
.ekpi-table td {
  padding: 8px 6px;
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  text-align: center;
  vertical-align: middle;
}

.ekpi-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f172a;
  white-space: nowrap;
  background: linear-gradient(180deg, #edf5ff, #e4eefb);
}

.ekpi-table thead th.ekpi-metric-th {
  white-space: normal;
  line-height: 1.25;
  min-width: 4.5rem;
}

.ekpi-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.ekpi-header-btn i {
  font-size: 11px;
  color: #6b7c93;
}

.ekpi-table thead th.left .ekpi-header-btn {
  justify-content: flex-start;
}

.ekpi-table .left {
  text-align: left;
}

.ekpi-row {
  cursor: context-menu;
  transition: transform 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.ekpi-row:hover {
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.95), rgba(239, 246, 255, 0.95));
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.ekpi-row.is-low {
  background: linear-gradient(180deg, rgba(255, 245, 245, 0.82), rgba(254, 242, 242, 0.82));
}

.ekpi-row.is-mid {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.54), rgba(255, 247, 237, 0.54));
}

.ekpi-sticky-rank {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 52px;
  width: 52px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
}

.ekpi-sticky-code {
  position: sticky;
  left: 52px;
  z-index: 1;
  min-width: 82px;
  width: 82px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
}

.ekpi-sticky-name {
  position: sticky;
  left: 134px;
  z-index: 1;
  min-width: 220px;
  width: 220px;
  max-width: 220px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
}

.ekpi-table thead .ekpi-sticky-rank,
.ekpi-table thead .ekpi-sticky-code,
.ekpi-table thead .ekpi-sticky-name {
  z-index: 4;
  background: linear-gradient(180deg, #edf5ff, #e4eefb);
}

.ekpi-code-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  color: #3f5f84;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(237, 245, 255, 0.96));
}

.ekpi-name-cell {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ekpi-name-cell strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 160px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ekpi-rank-medal {
  font-size: 14px;
  margin-right: 6px;
}

.ekpi-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 11px;
  font-weight: 900;
}

.ekpi-status-badge.high { background: rgba(34, 197, 94, 0.16); color: #166534; }
.ekpi-status-badge.mid { background: rgba(245, 158, 11, 0.18); color: #9a3412; }
.ekpi-status-badge.low { background: rgba(239, 68, 68, 0.16); color: #991b1b; }

.ekpi-trend-stack {
  display: grid;
  gap: 2px;
  font-size: 10px;
  color: #475569;
}

.ekpi-trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
}

.ekpi-trend-chip.up { color: #15803d; }
.ekpi-trend-chip.down { color: #b91c1c; }

.ekpi-spark {
  width: 122px;
  height: 30px;
}

.ekpi-progress-wrap {
  display: grid;
  gap: 4px;
}

.ekpi-progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.ekpi-progress > span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #14b8a6, #3b82f6);
}

.ekpi-simulation-shell {
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(248,250,252,0.7));
  padding: 10px;
  position: sticky;
  top: 8px;
  z-index: 6;
  backdrop-filter: blur(8px);
}

.ekpi-sim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
}

.ekpi-sim-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.ekpi-sim-control {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 8px;
  background: rgba(255,255,255,0.7);
  font-size: 11px;
}

.ekpi-sim-control input { width: 100%; }

.ekpi-name-cell strong::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #60a5fa, #22c55e);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
  flex: 0 0 auto;
}

.ekpi-total-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #0f172a;
  background:
    linear-gradient(90deg, rgba(34, 197, 94, 0.22) 0%, rgba(34, 197, 94, 0.22) var(--score-pct), rgba(241, 245, 249, 0.95) var(--score-pct), rgba(241, 245, 249, 0.95) 100%);
}

.ekpi-total-pill.mid {
  background:
    linear-gradient(90deg, rgba(245, 158, 11, 0.22) 0%, rgba(245, 158, 11, 0.22) var(--score-pct), rgba(241, 245, 249, 0.95) var(--score-pct), rgba(241, 245, 249, 0.95) 100%);
}

.ekpi-total-pill.low {
  background:
    linear-gradient(90deg, rgba(239, 68, 68, 0.18) 0%, rgba(239, 68, 68, 0.18) var(--score-pct), rgba(241, 245, 249, 0.95) var(--score-pct), rgba(241, 245, 249, 0.95) 100%);
}

.ekpi-total-score {
  font-size: 14px;
  font-weight: 900;
}

.ekpi-total-delta {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
}

.ekpi-total-delta.up { color: #166534; }
.ekpi-total-delta.down { color: #991b1b; }
.ekpi-total-delta.flat { color: #334155; }

.ekpi-raw-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.96));
  color: #27445c;
}

.ekpi-raw-chip.is-strong {
  border-color: rgba(34, 197, 94, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 244, 0.96));
  color: #166534;
}

.ekpi-raw-chip.is-mid {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 235, 0.96));
  color: #b45309;
}

.ekpi-raw-chip.is-low {
  border-color: rgba(239, 68, 68, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(254, 242, 242, 0.96));
  color: #b91c1c;
}

.ekpi-inline-btn {
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #155e75, #0f766e);
  cursor: pointer;
}

.ekpi-context-menu {
  position: fixed;
  z-index: 10020;
  width: min(320px, calc(100vw - 24px));
  padding: 7px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(16px);
}

.ekpi-context-menu[hidden] {
  display: none !important;
}

.ekpi-context-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(239, 246, 255, 0.98));
  cursor: pointer;
  text-align: left;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.ekpi-context-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.12);
  background: linear-gradient(180deg, rgba(236, 253, 245, 1), rgba(204, 251, 241, 1));
}

.ekpi-context-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f4c81, #0f766e);
  color: #fff;
  font-size: 10px;
  box-shadow: 0 6px 12px rgba(15, 118, 110, 0.14);
}

.ekpi-context-action strong {
  display: block;
  margin-bottom: 1px;
  font-size: 12px;
  line-height: 1.15;
  color: #000;
}

.ekpi-context-action small {
  display: block;
  font-size: 10px;
  line-height: 1.1;
  color: var(--ekpi-muted);
}

.ekpi-header-filter-modal {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.ekpi-header-filter-modal[hidden] {
  display: none !important;
}

.ekpi-header-filter-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(6px);
}

.ekpi-header-filter-card {
  position: relative;
  width: min(540px, 96vw);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.ekpi-header-filter-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.ekpi-header-filter-kicker {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f766e;
}

.ekpi-header-filter-top h3 {
  margin: 0;
  font-size: 22px;
  color: var(--ekpi-ink);
}

.ekpi-header-filter-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--ekpi-ink);
  font-size: 20px;
  cursor: pointer;
}

.ekpi-header-filter-body {
  padding: 18px;
}

.ekpi-filter-section + .ekpi-filter-section {
  margin-top: 18px;
}

.ekpi-filter-section h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ekpi-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ekpi-filter-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.ekpi-filter-actions-grid--compact {
  margin-top: 10px;
}

.ekpi-filter-search {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #fff;
  color: var(--ekpi-ink);
  font-size: 13px;
  font-weight: 600;
  outline: none;
}

.ekpi-filter-search:focus {
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.ekpi-filter-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  margin-top: 10px;
  padding: 4px;
  overflow: auto;
}

.ekpi-filter-checkrow {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
}

.ekpi-filter-checkrow input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.ekpi-filter-checkrow span {
  color: var(--ekpi-ink);
  font-size: 13px;
  font-weight: 700;
  word-break: break-word;
}

.ekpi-filter-action {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.98));
  color: var(--ekpi-ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.ekpi-filter-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.08);
}

.ekpi-filter-action.is-active {
  border-color: rgba(15, 118, 110, 0.26);
  background: linear-gradient(135deg, rgba(204, 251, 241, 0.98), rgba(240, 253, 250, 0.98));
  color: #115e59;
}

.ekpi-filter-footer {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ekpi-filter-apply {
  padding: 8px 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f4c81, #0f766e);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.ekpi-filter-clear {
  padding: 8px 12px;
  border: none;
  border-radius: 12px;
  background: #eef2f7;
  color: var(--ekpi-ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.ekpi-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 20px;
  border-radius: 12px;
  border: 1px dashed #c9d7e4;
  background: rgba(248, 251, 255, 0.9);
  text-align: center;
  color: var(--ekpi-muted);
  font-weight: 700;
}

.ekpi-drawer {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(6px);
}

.ekpi-drawer[hidden] {
  display: none !important;
}

.ekpi-drawer-card {
  width: min(980px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
}

.ekpi-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px 8px;
}

.ekpi-drawer-header h3 {
  margin: 0;
  font-size: 24px;
}

.ekpi-drawer-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ekpi-muted);
}

.ekpi-drawer-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  background: #e2e8f0;
  color: #0f172a;
}

.ekpi-drawer-body {
  padding: 10px 22px 24px;
}

.ekpi-chart-card {
  width: min(1220px, 100%);
}

.ekpi-chart-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 220px)) 1fr;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}

.ekpi-chart-actions {
  margin-top: 0;
  justify-content: flex-end;
}

.ekpi-chart-canvas-wrap {
  border: 1px solid #d7e3ef;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  overflow-x: auto;
}

.ekpi-chart-canvas-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
}

.ekpi-report-narrative {
  font-size: 13px;
  line-height: 1.5;
  color: #1f2937;
}

.ekpi-report-narrative h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.ekpi-report-narrative ol {
  margin: 0;
  padding-left: 20px;
}

.ekpi-report-narrative li {
  margin: 0 0 6px;
}

.ekpi-report-note {
  margin-top: 10px;
  font-weight: 600;
}

.ekpi-report-copy-btn {
  align-self: flex-start;
}

.ekpi-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.ekpi-detail-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #d8e4ef;
  background: linear-gradient(180deg, #ffffff, #f5f9fd);
}

.ekpi-detail-card h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ekpi-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ekpi-detail-card strong {
  font-size: 24px;
  font-weight: 900;
}

.ekpi-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.ekpi-detail-tag {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #23435a;
  background: #eef5fb;
}

.ekpi-detail-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d8e4ef;
}

.ekpi-detail-table th,
.ekpi-detail-table td {
  padding: 12px;
  border-bottom: 1px solid #e8eff5;
  text-align: center;
}

.ekpi-detail-table th {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4a6078;
  background: linear-gradient(180deg, #f9fcff, #edf5fb);
}

.ekpi-detail-table .left {
  text-align: left;
}

.ekpi-product-list {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.ekpi-product-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(241, 245, 249, 0.8);
  font-size: 12px;
}

.ekpi-table-shell {
  max-height: 68vh;
}

@media (max-width: 1180px) {
  .ekpi-main-grid {
    grid-template-columns: 1fr;
  }

  .ekpi-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .ekpi-hero {
    flex-direction: column;
  }

  .ekpi-hero-side,
  .ekpi-hero-pills {
    justify-content: flex-start;
    align-items: flex-start;
  }

  .ekpi-filter-grid,
  .ekpi-toolbar,
  .ekpi-chart-toolbar,
  .ekpi-detail-grid,
  .ekpi-summary-grid,
  .ekpi-metric-settings,
  .ekpi-insights-body {
    grid-template-columns: 1fr;
  }

  .ekpi-sticky-rank,
  .ekpi-sticky-code,
  .ekpi-sticky-name {
    position: static;
    box-shadow: none;
  }

  .ekpi-table {
    min-width: 760px;
  }
}
