/* Base / Global */
@layer tokens, base, layout, components, utilities;
@import url("./css/navigation.css");
@import url("./css/export-controls.css");
@import url("./css/hero.css");
@import url("./css/feedback.css");
@import url("./css/gydytojai.css");

:root,
:root[data-theme="light"],
body[data-theme="light"] {
  --color-bg: #eaedf3;
  --color-surface: #f8f9fb;
  --color-surface-alt: #e3e6ee;
  --color-border: rgba(37, 45, 62, 0.16);
  --color-text: #101420;
  --color-text-muted: #4f586c;
  --color-accent: #2f5bea;
  --color-accent-strong: #7fa4ff;
  --color-accent-soft: rgba(47, 91, 234, 0.12);
  --color-input-bg: rgba(47, 91, 234, 0.08);
  --color-input-bg-hover: rgba(47, 91, 234, 0.15);
  --filter-height: 38px;
  --filter-radius: 12px;
  --filter-font-size: 0.9rem;
  --filter-label-size: 0.82rem;
  --filter-padding-x: 12px;
  --filter-bg: var(--color-input-bg);
  --filter-bg-hover: var(--color-input-bg-hover);
  --filter-border: var(--color-border);
  --filter-focus-ring: 0 0 0 3px var(--color-accent-soft);
  --color-input-placeholder: rgba(16, 20, 32, 0.56);
  --color-success: #2ea07a;
  --color-warning: #d48c35;
  --color-danger: #e2444c;
  --color-danger-soft: #e2444c;
  --color-weekend: #c7802c;
  --color-weekend-soft: rgba(199, 128, 44, 0.2);
  --chart-grid: rgba(16, 20, 32, 0.14);
  --skeleton-surface: color-mix(in srgb, var(--color-surface) 88%, var(--color-surface-alt) 12%);
  --skeleton-border: color-mix(in srgb, var(--color-border) 88%, transparent);
  --skeleton-base: color-mix(in srgb, var(--color-text-muted) 16%, transparent);
  --skeleton-highlight: color-mix(in srgb, var(--color-text-muted) 28%, transparent);
  --shadow-elevated: 0 26px 52px -28px rgba(10, 16, 28, 0.55);
  --nav-glass-bg: linear-gradient(145deg, rgba(248, 250, 255, 0.92), rgba(232, 238, 250, 0.84));
  --nav-glass-border: rgba(31, 48, 94, 0.16);
  --nav-chip-bg: rgba(255, 255, 255, 0.58);
  --nav-chip-hover: rgba(47, 91, 234, 0.14);
  --nav-chip-active: rgba(47, 91, 234, 0.2);
  --nav-focus-ring: rgba(47, 91, 234, 0.38);
  --nav-shadow: 0 20px 42px -30px rgba(18, 28, 52, 0.45);
  --hero-bg: linear-gradient(135deg, #eaf1ff 0%, #dce8ff 100%);
  --hero-text: #0f172a;
  --hero-text-muted: rgba(15, 23, 42, 0.72);
  --hero-top-accent: #3f6ef8;
  --hero-bottom-border: rgba(15, 23, 42, 0.12);
  --hero-chip-bg: rgba(255, 255, 255, 0.52);
  --hero-chip-border: rgba(37, 45, 62, 0.18);
  --hero-chip-hover-bg: rgba(47, 91, 234, 0.12);
  --hero-chip-active-bg: rgba(47, 91, 234, 0.18);
  --hero-chip-color: #21304d;
  --hero-chip-active-color: #12387f;
  --report-diagnosis: #0284c7;
  --report-age: #16a34a;
  --report-referral: #ef4444;
  --report-disposition-hosp-with-referral: #ef4444;
  --report-disposition-discharged-with-referral: rgba(239, 68, 68, 0.28);
  --report-disposition-hosp-without-referral: #2563eb;
  --report-disposition-discharged-without-referral: rgba(37, 99, 235, 0.24);
  --report-referral-pspc: #2563eb;
  --report-pspc: #f59e0b;
  --report-sex-1: #8b5cf6;
  --report-sex-2: #06b6d4;
  --report-sex-3: #f59e0b;
  --report-sex-4: #10b981;
  --report-heatmap: #16a34a;
  --report-correlation-fill: rgba(37, 99, 235, 0.38);
  --report-correlation-stroke: rgba(37, 99, 235, 0.9);
  --hero-height: 0px;
  --section-nav-height: 0px;
  --summaries-jump-sticky-top: 56px;
  --summaries-jump-nav-height: 52px;
  --state-accent-border-34: rgba(47, 91, 234, 0.34);
  --state-accent-border-35: rgba(37, 99, 235, 0.35);
  --state-accent-border-36: rgba(47, 91, 234, 0.36);
  --state-accent-border-38: rgba(47, 91, 234, 0.38);
  --state-accent-border-42: rgba(47, 91, 234, 0.42);
  --state-accent-border-44: rgba(47, 91, 234, 0.44);
  --state-accent-inset-16: inset 0 0 0 1px rgba(47, 91, 234, 0.16);
  --state-accent-inset-18: inset 0 0 0 1px rgba(47, 91, 234, 0.18);
  --state-accent-inset-20: inset 0 0 0 1px rgba(47, 91, 234, 0.2);
  --state-focus-outline: 3px solid var(--nav-focus-ring);
  --state-focus-offset: 2px;
  --state-focus-shadow-soft: 0 0 0 2px rgba(255, 255, 255, 0.25);
  --state-focus-shadow-hero: 0 0 0 3px rgba(144, 174, 255, 0.38);
  --component-export-size: 32px;
  --component-export-icon-size: 16px;
  --component-export-radius: 10px;
  --component-export-tooltip-radius: 8px;
  --component-export-tooltip-padding: 6px 10px;
  --component-export-tooltip-font-size: 0.78rem;
  --component-export-tooltip-shadow: var(--shadow-popover-soft);
  --component-export-error-border: rgba(195, 75, 85, 0.35);
  --component-export-error-border-strong: rgba(195, 75, 85, 0.6);
  --component-touch-target-size: 44px;
  --component-mobile-nav-icon-size: 18px;
  --component-mobile-jump-nav-radius: 14px;
  --component-mobile-jump-nav-link-height: 40px;
  --state-accent-bg-08: rgba(37, 99, 235, 0.08);
  --state-accent-bg-12: rgba(37, 99, 235, 0.12);
  --shadow-soft-panel: 0 6px 18px -12px rgba(15, 23, 42, 0.22);
  --shadow-popover-soft: 0 10px 24px -18px rgba(15, 23, 42, 0.45);
  font-family: "Sora", "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

:root[data-theme="dark"],
body[data-theme="dark"] {
  --color-bg: #0a0d14;
  --color-surface: #141927;
  --color-surface-alt: #1b2130;
  --color-border: rgba(121, 147, 199, 0.2);
  --color-text: #e8ecf6;
  --color-text-muted: #9ca8c0;
  --color-accent: #6d8dff;
  --color-accent-strong: #a8c2ff;
  --color-accent-soft: rgba(109, 141, 255, 0.16);
  --color-input-bg: rgba(109, 141, 255, 0.14);
  --color-input-bg-hover: rgba(109, 141, 255, 0.24);
  --filter-height: 38px;
  --filter-radius: 12px;
  --filter-font-size: 0.9rem;
  --filter-label-size: 0.82rem;
  --filter-padding-x: 12px;
  --filter-bg: var(--color-input-bg);
  --filter-bg-hover: var(--color-input-bg-hover);
  --filter-border: var(--color-border);
  --filter-focus-ring: 0 0 0 3px var(--color-accent-soft);
  --color-input-placeholder: rgba(232, 236, 246, 0.78);
  --color-success: #5ad29a;
  --color-warning: #efb24f;
  --color-danger: #ff4d5d;
  --color-danger-soft: #ff4d5d;
  --color-weekend: #f0a255;
  --color-weekend-soft: rgba(240, 162, 85, 0.24);
  --chart-grid: rgba(156, 168, 192, 0.26);
  --skeleton-surface: color-mix(in srgb, var(--color-surface) 82%, var(--color-surface-alt) 18%);
  --skeleton-border: color-mix(in srgb, var(--color-border) 95%, transparent);
  --skeleton-base: color-mix(in srgb, var(--color-text-muted) 22%, transparent);
  --skeleton-highlight: color-mix(in srgb, var(--color-text-muted) 38%, transparent);
  --shadow-elevated: 0 22px 44px -28px rgba(0, 0, 0, 0.7);
  --nav-glass-bg: linear-gradient(148deg, rgba(16, 24, 45, 0.88), rgba(12, 18, 34, 0.76));
  --nav-glass-border: rgba(123, 149, 207, 0.34);
  --nav-chip-bg: rgba(109, 141, 255, 0.12);
  --nav-chip-hover: rgba(109, 141, 255, 0.24);
  --nav-chip-active: rgba(109, 141, 255, 0.3);
  --nav-focus-ring: rgba(168, 194, 255, 0.46);
  --nav-shadow: 0 22px 44px -30px rgba(2, 6, 20, 0.8);
  --hero-bg: linear-gradient(135deg, #0f1d36 0%, #1a2948 100%);
  --hero-text: #e8ecf6;
  --hero-text-muted: rgba(232, 236, 246, 0.74);
  --hero-top-accent: #8aa7ff;
  --hero-bottom-border: rgba(167, 187, 236, 0.2);
  --hero-chip-bg: rgba(109, 141, 255, 0.12);
  --hero-chip-border: rgba(167, 187, 236, 0.24);
  --hero-chip-hover-bg: rgba(109, 141, 255, 0.22);
  --hero-chip-active-bg: rgba(109, 141, 255, 0.34);
  --hero-chip-color: rgba(232, 236, 246, 0.92);
  --hero-chip-active-color: #f4f8ff;
  --report-diagnosis: #38bdf8;
  --report-age: #4ade80;
  --report-referral: #f87171;
  --report-disposition-hosp-with-referral: #f87171;
  --report-disposition-discharged-with-referral: rgba(248, 113, 113, 0.3);
  --report-disposition-hosp-without-referral: #60a5fa;
  --report-disposition-discharged-without-referral: rgba(96, 165, 250, 0.3);
  --report-referral-pspc: #60a5fa;
  --report-pspc: #fbbf24;
  --report-sex-1: #a78bfa;
  --report-sex-2: #22d3ee;
  --report-sex-3: #fbbf24;
  --report-sex-4: #34d399;
  --report-heatmap: #4ade80;
  --report-correlation-fill: rgba(96, 165, 250, 0.38);
  --report-correlation-stroke: rgba(147, 197, 253, 0.94);
  --state-focus-shadow-soft: 0 0 0 2px rgba(232, 236, 246, 0.28);
  --component-export-tooltip-shadow: 0 10px 24px -18px rgba(5, 10, 25, 0.7);
  --shadow-soft-panel: 0 6px 18px -12px rgba(8, 12, 32, 0.4);
  --shadow-popover-soft: 0 10px 24px -18px rgba(5, 10, 25, 0.7);
}

* {
  box-sizing: border-box;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-input-placeholder);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  font-family: "Sora", "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

[hidden] {
  display: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(120deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 14%);
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}

body[data-theme="dark"] select option,
body[data-theme="dark"] select optgroup {
  background: var(--color-surface);
  color: var(--color-text);
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding-left: clamp(16px, 3vw, 48px);
  padding-right: clamp(16px, 3vw, 48px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.inline-icon-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.inline-icon-label__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  color: currentColor;
}

.inline-icon-label__icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.inline-icon-label__text {
  min-width: 0;
}

.inline-icon-label--compact {
  gap: 6px;
}

.inline-icon-label--compact .inline-icon-label__icon {
  width: 0.95em;
  height: 0.95em;
}

.inline-icon-label--label {
  gap: 6px;
}

.inline-icon-label--label .inline-icon-label__icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--color-text-muted);
}

.search-field-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.search-field-wrap .inline-icon-label__icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-field-wrap input {
  width: 100%;
  padding-left: 42px;
  appearance: none;
  -webkit-appearance: none;
}

.search-field-wrap input[type="search"]::-webkit-search-decoration,
.search-field-wrap input[type="search"]::-webkit-search-cancel-button,
.search-field-wrap input[type="search"]::-webkit-search-results-button,
.search-field-wrap input[type="search"]::-webkit-search-results-decoration {
  appearance: none;
  -webkit-appearance: none;
  display: none;
}

@keyframes skeletonShimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  position: relative;
  overflow: hidden;
  display: block;
  box-shadow: inset 0 0 0 1px var(--skeleton-border);
  background: linear-gradient(
    90deg,
    var(--skeleton-base) 25%,
    var(--skeleton-highlight) 37%,
    var(--skeleton-base) 63%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
  border-radius: 12px;
}

.skeleton--title {
  height: 18px;
  max-width: 70%;
}

.skeleton--value {
  height: 34px;
  max-width: 60%;
}

.skeleton--detail {
  height: 16px;
  max-width: 100%;
}

.skeleton--chip {
  height: 12px;
  max-width: 45%;
}

.skeleton--chart-area {
  flex: 1 1 auto;
  height: clamp(200px, 28vh, 320px);
  border-radius: 16px;
}

.skeleton--chart-area--heatmap {
  height: clamp(240px, 34vh, 380px);
}

.skeleton--caption {
  height: 14px;
  max-width: 80%;
}

.skeleton--table-cell {
  width: 100%;
  min-width: 70px;
  max-width: none;
}

.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  border: none;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  box-shadow: 0 12px 28px -16px rgba(15, 23, 42, 0.65);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  pointer-events: none;
  z-index: 10;
}

.scroll-top-btn[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top-btn:hover,
.scroll-top-btn:focus-visible {
  box-shadow: 0 18px 32px -18px rgba(15, 23, 42, 0.65);
  outline: none;
}

.scroll-top-btn:focus-visible {
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.22),
    0 18px 32px -18px rgba(15, 23, 42, 0.65);
}

body[data-theme="dark"] .scroll-top-btn {
  box-shadow: 0 12px 28px -16px rgba(8, 12, 32, 0.9);
}

.tab-panel {
  margin-bottom: 32px;
  width: 100%;
}

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

.ed-dashboard {
  position: relative;
  border-radius: 32px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(47, 91, 234, 0.18), rgba(47, 91, 234, 0)),
    linear-gradient(160deg, rgba(26, 34, 52, 0.16), rgba(248, 249, 251, 0.9));
  border: 1px solid rgba(47, 91, 234, 0.14);
  box-shadow: 0 40px 80px -48px rgba(16, 22, 38, 0.48);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vw, 26px);
  overflow: hidden;
  isolation: isolate;
  min-height: 320px;
}

.ed-dashboard::before {
  content: "";
  position: absolute;
  inset: auto -40% -60% 10%;
  height: clamp(220px, 32vw, 320px);
  background: radial-gradient(circle at center, rgba(47, 91, 234, 0.28), rgba(47, 91, 234, 0));
  opacity: 0.65;
  pointer-events: none;
  filter: blur(0);
}

body[data-theme="dark"] .ed-dashboard {
  background:
    linear-gradient(135deg, rgba(109, 141, 255, 0.2), rgba(16, 22, 38, 0.6)),
    linear-gradient(155deg, rgba(12, 16, 26, 0.92), rgba(12, 16, 26, 0.86));
  border-color: rgba(109, 141, 255, 0.2);
  box-shadow: 0 48px 90px -46px rgba(4, 6, 14, 0.9);
}

body[data-theme="dark"] .ed-dashboard::before {
  background: radial-gradient(circle at center, rgba(109, 141, 255, 0.32), rgba(28, 36, 54, 0));
  opacity: 1;
}

body[data-theme="dark"] .ed-dashboard__section {
  background: linear-gradient(150deg, rgba(16, 22, 38, 0.95), rgba(16, 22, 38, 0.8));
  border-color: rgba(109, 141, 255, 0.24);
  box-shadow: 0 34px 72px -36px rgba(4, 6, 14, 0.9);
}

body[data-theme="dark"] .ed-dashboard__section-icon {
  background: rgba(109, 141, 255, 0.2);
  color: rgba(205, 216, 245, 0.95);
  box-shadow: inset 0 0 0 1px rgba(109, 141, 255, 0.35);
}

body[data-theme="dark"] .ed-dashboard__section-title {
  text-shadow: 0 4px 16px rgba(8, 12, 32, 0.9);
}

body[data-theme="dark"] .ed-dashboard__section-description {
  color: rgba(226, 232, 240, 0.92);
}

body[data-theme="dark"] .ed-dashboard__card-title,
body[data-theme="dark"] .ed-dashboard__card-value,
body[data-theme="dark"] .ed-dashboard__card-meta {
  text-shadow: 0 4px 18px rgba(5, 8, 22, 0.85);
}

.ed-dashboard__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 20px);
  margin-bottom: 0;
}

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

.ed-dashboard__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ed-dashboard__title {
  margin: 0;
  font-size: clamp(1.3rem, 1.8vw, 1.6rem);
  font-weight: 700;
  color: var(--color-text);
}

.ed-dashboard__subtitle {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.ed-dashboard__search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(360px, 100%);
  margin-top: 4px;
}

.ed-dashboard__search-label {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.95rem;
}

.ed-dashboard__search input[type="search"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--color-surface-hover);
  color: var(--color-text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.ed-dashboard__search input[type="search"]:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  background: var(--color-surface);
}

.ed-dashboard__search-hint {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.ed-dashboard__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 20px);
}

.ed-dashboard__status-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ed-dashboard__status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--state-accent-bg-12);
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: 0.035em;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.3;
  border: 1px solid rgba(37, 99, 235, 0.16);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
  white-space: nowrap;
}

.ed-dashboard__status::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.15);
}

.ed-dashboard__status[data-tone="success"] {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.2);
  color: var(--color-success);
}

.ed-dashboard__status[data-tone="success"]::before {
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18);
}

.ed-dashboard__status[data-tone="warning"] {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--color-warning);
}

.ed-dashboard__status[data-tone="warning"]::before {
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.ed-dashboard__status[data-tone="error"] {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.2);
  color: var(--color-danger);
}

.ed-dashboard__status[data-tone="error"]::before {
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18);
}

body[data-theme="dark"] .ed-dashboard__status {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.28);
  color: var(--color-accent);
}

body[data-theme="dark"] .ed-dashboard__status::before {
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.22);
}

body[data-theme="dark"] .ed-dashboard__status[data-tone="warning"] {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.26);
  color: rgba(251, 191, 36, 0.95);
}

body[data-theme="dark"] .ed-dashboard__status[data-tone="error"] {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.26);
  color: rgba(248, 113, 113, 0.95);
}

.ed-panel-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.ed-panel-close-btn svg {
  width: 1.1em;
  height: 1.1em;
}

.ed-panel-close-btn:hover,
.ed-panel-close-btn:focus-visible {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 14px 28px -20px rgba(37, 99, 235, 0.65);
  outline: none;
}

.ed-panel-close-btn:focus-visible {
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.25),
    0 14px 28px -20px rgba(37, 99, 235, 0.65);
}

body[data-theme="dark"] .ed-panel-close-btn {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(96, 165, 250, 0.35);
  color: var(--color-text);
}

body[data-theme="dark"] .ed-panel-close-btn:hover,
body[data-theme="dark"] .ed-panel-close-btn:focus-visible {
  background: rgba(96, 165, 250, 0.45);
  border-color: rgba(96, 165, 250, 0.75);
}

.ed-dashboard__cards {
  display: grid;
  gap: clamp(18px, 2.5vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-content: start;
}

.ed-dashboard__section {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 20px);
  padding: clamp(18px, 2.6vw, 26px);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(230, 234, 245, 0.86));
  border: 1px solid rgba(47, 91, 234, 0.16);
  box-shadow: 0 24px 52px -34px rgba(16, 22, 38, 0.5);
  min-height: 0;
}

.ed-dashboard__section-header {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 24px);
}

.ed-dashboard__section-header-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ed-dashboard__section-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(52px, 6vw, 64px);
  height: clamp(52px, 6vw, 64px);
  border-radius: 18px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  box-shadow: inset 0 0 0 1px rgba(47, 91, 234, 0.28);
}

.ed-dashboard__section-icon svg {
  width: 70%;
  height: 70%;
}

.ed-dashboard__section-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  text-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.ed-dashboard__section-description {
  margin: 4px 0 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--color-text);
  opacity: 0.8;
  max-width: 70ch;
}

.ed-dashboard__section-grid {
  display: grid;
  gap: clamp(14px, 2vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: stretch;
}

.ed-dashboard__section--skeleton {
  opacity: 0.95;
}

.ed-dashboard__section--skeleton .ed-dashboard__section-icon {
  background: transparent;
  box-shadow: none;
  border: 1px dashed var(--color-border-strong);
  color: transparent;
  min-width: 44px;
}

.ed-dashboard__section[data-section-key="staffing"] .ed-dashboard__section-grid {
  grid-template-columns: 1fr;
}

.ed-dashboard__card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: clamp(18px, 2vw, 26px);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(230, 234, 245, 0.9));
  border: 1px solid rgba(47, 91, 234, 0.2);
  box-shadow: 0 32px 60px -34px rgba(16, 22, 38, 0.62);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vw, 16px);
  min-height: 256px;
}

.ed-dashboard__card--skeleton {
  gap: 10px;
  box-shadow: none;
  border: 1px solid var(--skeleton-border);
  background: var(--skeleton-surface);
  opacity: 0.9;
}

.ed-dashboard__card--skeleton .skeleton--title {
  max-width: 72%;
}

.ed-dashboard__card--skeleton .skeleton--value {
  max-width: 56%;
}

.ed-dashboard__card--skeleton .skeleton--detail:nth-of-type(3) {
  max-width: 82%;
}

.ed-dashboard__card--skeleton .skeleton--detail:nth-of-type(4) {
  max-width: 70%;
}

.ed-dashboard__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(47, 91, 234, 0.14), rgba(47, 91, 234, 0));
  opacity: 0.7;
  pointer-events: none;
}

.ed-dashboard__card--donut {
  align-items: center;
  text-align: center;
  min-height: 256px;
}

.ed-dashboard__card--donut .ed-dashboard__card-title {
  text-align: center;
  width: 100%;
}

.ed-dashboard__card--donut .ed-dashboard__card-value {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.ed-dashboard__card--donut .ed-dashboard__card-meta {
  text-align: center;
}

.ed-dashboard__donut-chart {
  position: relative;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.ed-dashboard__donut-chart canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.ed-dashboard__card-hint {
  margin: 4px 0 0;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: var(--color-text-muted);
  text-align: center;
  font-weight: 500;
}

body[data-theme="dark"] .ed-dashboard__card {
  background: linear-gradient(145deg, rgba(16, 22, 38, 0.94), rgba(16, 22, 38, 0.8));
  border-color: rgba(109, 141, 255, 0.22);
  box-shadow: 0 34px 70px -36px rgba(4, 6, 14, 0.92);
}

body[data-theme="dark"] .ed-dashboard__card::after {
  background: linear-gradient(160deg, rgba(96, 165, 250, 0.12), rgba(96, 165, 250, 0));
  opacity: 0.85;
}

body[data-theme="dark"] .ed-dashboard__card-hint {
  color: rgba(226, 232, 240, 0.85);
}

.ed-dashboard__card-title {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text);
  text-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
}

.ed-dashboard__card-value {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 800;
  color: var(--color-text);
  text-shadow: 0 6px 16px rgba(15, 23, 42, 0.3);
}

.ed-dashboard__card-meta {
  margin: 0;
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  color: var(--color-text);
  opacity: 0.85;
  line-height: 1.4;
}

.ed-dashboard__card-meta:empty {
  display: none;
}

.ed-dashboard__card--comments {
  gap: 12px;
  min-height: 256px;
  max-height: 420px;
  overflow: hidden;
  background-clip: padding-box;
}

.ed-dashboard__card--feedback-rotating {
  min-height: 256px;
}

.ed-dashboard__card--feedback-rotating .ed-dashboard__card-title {
  min-height: 2.6em;
}

.ed-dashboard__card--feedback-rotating .ed-dashboard__card-value {
  min-height: 1.25em;
}

.ed-dashboard__card--feedback-rotating .ed-dashboard__card-meta {
  min-height: 1.6em;
}

.ed-dashboard__feedback-location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin-top: 2px;
}

.ed-dashboard__feedback-location-metric {
  border: 1px solid color-mix(in srgb, var(--color-text) 14%, transparent);
  border-radius: 12px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--color-bg) 74%, var(--color-accent-soft) 26%);
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
}

.ed-dashboard__feedback-location-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.ed-dashboard__feedback-location-value {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.05;
  font-weight: 800;
  color: var(--color-text);
}

.ed-dashboard__feedback-location-meta {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.ed-dashboard__feedback-location-metric .ed-dashboard__card-delta {
  margin-top: 2px;
  font-size: 0.75rem;
}

.ed-dashboard__feedback-indicators {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
}

.ed-dashboard__feedback-indicator {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text) 28%, transparent);
  opacity: 0.65;
  transition:
    transform 160ms ease,
    opacity 160ms ease,
    background-color 160ms ease;
}

.ed-dashboard__feedback-indicator.is-active {
  background: var(--color-accent);
  opacity: 1;
  transform: scale(1.18);
}

.ed-dashboard__comment-wrapper {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  overflow: hidden;
}

.ed-dashboard__comment-scroller {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  transform: translateY(0);
  will-change: transform;
}

.ed-dashboard__comment-wrapper.is-scrollable .ed-dashboard__comment-scroller {
  animation: ed-comment-scroll var(--scroll-duration, 12000ms) linear infinite;
}

@keyframes ed-comment-scroll {
  0%,
  10% {
    transform: translateY(0);
  }
  90%,
  100% {
    transform: translateY(calc(-1 * var(--scroll-distance, 0px)));
  }
}

.ed-dashboard__comment {
  margin: 0;
  font-size: clamp(1.1rem, 1.7vw, 1.25rem);
  line-height: 1.6;
  font-weight: 600;
  color: var(--color-text);
}

.ed-dashboard__comment-meta {
  margin: 0;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--color-text);
  opacity: 0.82;
}

.ed-dashboard__comment-rotation {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.ed-dashboard__comment-rotation-dots {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.ed-dashboard__comment-rotation-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text) 20%, transparent);
  opacity: 0.8;
  transition:
    transform 160ms ease,
    opacity 160ms ease,
    background-color 160ms ease;
}

.ed-dashboard__comment-rotation-dot.is-active {
  background: var(--color-accent);
  opacity: 1;
  transform: scale(1.22);
}

.ed-dashboard__card-progress {
  position: relative;
  width: 100%;
  height: 8px;
  background: var(--color-accent-soft);
  border-radius: 999px;
  overflow: hidden;
}

.ed-dashboard__card-progress-fill {
  position: absolute;
  inset: 0;
  width: var(--progress-width, 0%);
  background: var(--color-accent);
  border-radius: inherit;
  transition: width 0.4s ease;
}

.ed-dashboard__card-progress-fill[data-occupancy-level="normal"] {
  background: var(--color-success);
}

.ed-dashboard__card-progress-fill[data-occupancy-level="elevated"] {
  background: var(--color-warning);
}

.ed-dashboard__card-progress-fill[data-occupancy-level="critical"] {
  background: var(--color-danger);
}

.ed-dashboard__card-progress-marker {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 14px;
  background: var(--color-text);
  opacity: 0.7;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  pointer-events: none;
}

.ed-dashboard__card-delta {
  margin: 4px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
}

.ed-dashboard__card-delta[data-trend="up"] {
  color: var(--color-success);
}

.ed-dashboard__card-delta[data-trend="down"] {
  color: var(--color-danger);
}

.ed-dashboard__card-delta-arrow {
  font-size: 1rem;
  line-height: 1;
}

.ed-dashboard__card-delta-text {
  font-weight: 600;
}

.ed-dashboard__card-delta-reference {
  font-weight: 500;
  color: var(--color-text-muted);
}

body[data-theme="dark"] .ed-dashboard__card-progress {
  background: rgba(96, 165, 250, 0.18);
}

body[data-theme="dark"] .ed-dashboard__card-progress-marker {
  background: var(--color-text);
  opacity: 0.85;
}

.ed-dashboard__chart-message {
  margin-top: 8px;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: var(--color-text-muted);
  text-align: center;
  font-weight: 600;
}

.ed-dashboard__tables {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 28px);
}

@media (max-width: 768px) {
  .ed-dashboard {
    padding: 24px 20px;
    border-radius: 26px;
  }

  .ed-dashboard__status {
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  .ed-dashboard__shortcuts {
    gap: 8px;
  }

  .ed-dashboard__shortcut {
    font-size: 0.74rem;
    padding: 5px 10px;
  }
}

@media (min-width: 1100px) {
  .ed-dashboard__layout {
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1.25fr);
  }
}

@media (max-width: 768px) {
  .ed-dashboard__card {
    min-height: 256px;
  }

  .section-nav__bar {
    gap: 12px;
  }

  .section-nav__title {
    font-size: 0.85rem;
    max-width: 60%;
  }

  .section__header {
    align-items: flex-start;
  }
}

main {
  flex: 1;
  padding: 24px 0 32px;
}

.section {
  margin-bottom: 32px;
}

.section--compact {
  margin-bottom: 24px;
}

.section-band {
  margin-bottom: 32px;
  padding: clamp(18px, 2.6vw, 32px);
  border-radius: clamp(20px, 3vw, 32px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 26px 52px -36px rgba(15, 23, 42, 0.45);
}

.section-band--trends {
  background: linear-gradient(180deg, var(--color-surface-alt) 0%, var(--color-surface) 100%);
}

.section-band--time-scale {
  background: linear-gradient(180deg, rgba(47, 91, 234, 0.08) 0%, var(--color-surface) 60%);
}

.section-band--feedback {
  background: linear-gradient(180deg, var(--color-surface-alt) 0%, rgba(47, 91, 234, 0.06) 100%);
}

body[data-theme="dark"] .section-band {
  box-shadow: 0 30px 60px -40px rgba(4, 6, 14, 0.85);
}

.section-band .section {
  margin-bottom: 24px;
}

.section-band .section:last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .section-nav__link,
  .section-nav__trigger,
  .section-nav__bar::before,
  .section-nav__bar::after {
    transition: none;
  }

  .section-nav__link:hover,
  .section-nav__trigger:hover {
    transform: none;
  }
}

body[data-page="ed"] .section-band--ed {
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body[data-page="ed"] .section-band--ed .section,
body[data-page="ed"] #edStandardSection {
  margin-bottom: 0;
}

.section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section__heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.section__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.summaries-section-toggle,
.summaries-report-group-toggle {
  width: 100%;
  max-width: 100%;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.section__header.summaries-section-toggle,
.summaries-report-group__heading.summaries-report-group-toggle {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface-alt);
  color: inherit;
  padding: 10px 12px;
}

.section__header.summaries-section-toggle {
  margin-bottom: 10px;
}

.summaries-report-group__heading.summaries-report-group-toggle {
  margin-bottom: 12px;
}

.summaries-section-toggle:hover,
.summaries-section-toggle:focus-visible,
.summaries-report-group-toggle:hover,
.summaries-report-group-toggle:focus-visible {
  border-color: var(--color-accent);
  outline: none;
}

.summaries-section-panel[hidden],
.summaries-report-group__panel[hidden] {
  display: none !important;
}

.summaries-section-toggle .section__heading,
.summaries-report-group-toggle .summaries-report-group__heading-copy {
  min-width: 0;
}

.summaries-section-toggle .section__subtitle,
.summaries-report-group-toggle .summaries-report-group__heading-copy p {
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.summaries-section-toggle .section__subtitle::after,
.summaries-report-group-toggle .summaries-report-group__heading-copy p::after {
  content: "▾";
  transition: transform 160ms ease;
}

.summaries-section-toggle.is-expanded .section__subtitle::after,
.summaries-report-group-toggle.is-expanded .summaries-report-group__heading-copy p::after {
  transform: rotate(180deg);
}

.summaries-group-toggle {
  margin: 0;
}

.summaries-panel-actions {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.recent-table__legend {
  flex-basis: 100%;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  text-align: right;
}

.summaries-loading-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 22%, var(--color-border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--color-surface-alt) 88%, transparent);
  color: var(--color-text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.section__title {
  font-size: 1.35rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-title__icon {
  display: none;
}

.section-title__icon svg {
  width: 18px;
  height: 18px;
}

body[data-theme="dark"] .section-title__icon {
  background: rgba(96, 165, 250, 0.16);
}

.section-title__text {
  line-height: 1.2;
}

#kpiHeading,
#chartHeading,
#chartsOverviewHeading,
#chartsHourlyHeading,
#chartsHeatmapHeading,
#chartsHospitalTableHeading,
#recentHeading,
#yearlyHeading,
#summariesSegmentHeading,
#summariesGroupClinicalHeading,
#summariesGroupReferralHeading,
#summariesGroupPspcHeading,
#feedbackHeading {
  scroll-margin-top: calc(var(--hero-height, 0px) + 16px);
}

body[data-page="charts"] #chartHeading,
body[data-page="charts"] #chartsOverviewHeading,
body[data-page="charts"] #chartsHourlyHeading,
body[data-page="charts"] #chartsHeatmapHeading,
body[data-page="charts"] #chartsHospitalTableHeading {
  scroll-margin-top: calc(var(--hero-height, 0px) + var(--charts-jump-nav-height, 52px) + 20px);
}

body[data-page="summaries"] #yearlyHeading,
body[data-page="summaries"] #summariesGroupClinicalHeading,
body[data-page="summaries"] #summariesGroupReferralHeading,
body[data-page="summaries"] #summariesGroupPspcHeading {
  scroll-margin-top: calc(var(--hero-height, 0px) + var(--summaries-jump-nav-height, 52px) + 20px);
}

body[data-page="gydytojai"] #gydytojaiHeading,
body[data-page="gydytojai"] #gydytojaiTablesHeading,
body[data-page="gydytojai"] #gydytojaiChartsHeading {
  scroll-margin-top: calc(var(--hero-height, 0px) + var(--summaries-jump-nav-height, 52px) + 20px);
}

.section__subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.section__description {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  max-width: 720px;
}

body[data-page="feedback"] .section__title-row {
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 12px;
}

body[data-page="feedback"] .section__header {
  flex-wrap: nowrap;
  align-items: flex-start;
}

body[data-page="feedback"] .section__header > .section__heading {
  flex: 1 1 auto;
  min-width: 0;
}

body[data-page="feedback"] #feedbackHeading {
  min-width: 0;
  flex: 0 1 auto;
}

body[data-page="feedback"] #feedbackSubtitle {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  flex: 0 0 auto;
}

body[data-page="feedback"] .section__header > .feedback-filters__summary {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: flex-start;
  white-space: nowrap;
}

@media (max-width: 640px) {
  body[data-page="feedback"] .section__header {
    flex-wrap: wrap;
  }

  body[data-page="feedback"] .section__header > .feedback-filters__summary {
    margin-left: 0;
    white-space: normal;
  }
}

.charts-subsection {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .charts-subsection {
  box-shadow: inset 0 0 0 1px rgba(109, 141, 255, 0.12);
}

.charts-subsection:first-of-type {
  margin-top: 0;
}

.charts-section-toggle,
.charts-subsection-toggle {
  width: auto;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface-alt);
  color: inherit;
  font: inherit;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.charts-section-toggle {
  margin: 10px 0 8px;
}

.charts-subsection-toggle {
  margin: 12px 0 8px;
  background: color-mix(in srgb, var(--color-surface-alt) 70%, transparent);
}

.charts-section-toggle:hover,
.charts-section-toggle:focus-visible,
.charts-subsection-toggle:hover,
.charts-subsection-toggle:focus-visible {
  border-color: var(--color-accent);
  outline: none;
}

.charts-section-toggle__title,
.charts-subsection-toggle__title {
  font-weight: 700;
}

.charts-section-toggle__summary,
.charts-subsection-toggle__summary {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.charts-section-toggle__summary::after,
.charts-subsection-toggle__summary::after {
  content: "▾";
  transition: transform 160ms ease;
}

.charts-section-toggle.is-expanded .charts-section-toggle__summary::after,
.charts-subsection-toggle.is-expanded .charts-subsection-toggle__summary::after {
  transform: rotate(180deg);
}

[data-charts-section-panel][hidden],
[data-charts-subsection-panel][hidden],
#chartsMainFiltersPanel[hidden] {
  display: none !important;
}

.charts-subsection__header {
  margin-bottom: 12px;
}

.charts-subsection__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-text);
}

.charts-subsection__subtitle {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--color-text-muted);
}

.charts-subsection .chart-grid {
  gap: 12px;
}

.feedback-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0 24px;
}

.summaries-segment-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 14px;
}

.summaries-segment-controls__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.summaries-segment-controls__field select,
.summaries-segment-controls__field input {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-input-bg);
  color: var(--color-text);
  padding: 10px 12px;
  font-size: 0.95rem;
  min-height: 40px;
}

.summaries-segment-status {
  margin: 0 0 10px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.summaries-reports-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 14px;
}

.summaries-reports-controls__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.summaries-reports-controls__field select,
.summaries-reports-controls__field input {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-input-bg);
  color: var(--color-text);
  padding: 10px 12px;
  font-size: 0.95rem;
  min-height: 40px;
}

.summaries-reports-coverage {
  margin: 0 0 12px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.charts-hospital-table-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 10px;
}

.charts-hospital-table-controls__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.charts-hospital-table-controls__field select,
.charts-hospital-table-controls__field input {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-input-bg);
  color: var(--color-text);
  padding: 10px 12px;
  font-size: 0.95rem;
  min-height: 40px;
}

.charts-hospital-table-controls__field .search-field-wrap input[type="search"] {
  padding-left: 42px;
}

.charts-hospital-table-controls__field > span:not(.search-field-wrap) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.charts-hospital-table-hint {
  margin: 0 0 12px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.charts-hospital-table-wrapper {
  max-height: min(72vh, 640px);
}

.charts-hospital-table-wrapper th:first-child,
.charts-hospital-table-wrapper td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--color-surface);
}

.charts-hospital-table-wrapper th:first-child {
  z-index: 4;
  background: var(--color-surface-alt);
}

.charts-hospital-table-wrapper th[data-charts-hospital-sort] {
  padding: 0;
  user-select: none;
}

.charts-hospital-table-wrapper th[data-charts-hospital-sort].is-sort-active {
  color: var(--color-text);
}

.charts-hospital-sort-button {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.charts-hospital-sort-button__label {
  display: block;
}

.charts-hospital-sort-button__icon {
  flex: 0 0 auto;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.charts-hospital-sort-button:hover,
.charts-hospital-sort-button:focus-visible {
  background: color-mix(in srgb, var(--color-accent-soft) 26%, transparent);
  color: var(--color-text);
  outline: none;
}

.charts-hospital-sort-button.is-sort-active {
  color: var(--color-text);
}

.charts-hospital-sort-button.is-sort-active .charts-hospital-sort-button__label {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.charts-hospital-sort-button:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 28%, transparent);
}

.charts-hospital-table-wrapper td:first-child {
  font-weight: 600;
  min-width: 220px;
  box-shadow: 8px 0 16px -14px rgba(15, 23, 42, 0.45);
}

.charts-hospital-row-button {
  width: 100%;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.charts-hospital-row-button__label {
  font-weight: 600;
}

.charts-hospital-row-button__meta {
  font-size: 0.79rem;
  color: var(--color-text-muted);
}

.charts-hospital-row-button:hover,
.charts-hospital-row-button:focus-visible {
  background: color-mix(in srgb, var(--color-accent-soft) 22%, transparent);
  outline: none;
}

.charts-hospital-row-button:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 28%, transparent);
}

.charts-hospital-row-button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--color-accent-soft) 32%, transparent);
}

.charts-hospital-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  justify-content: center;
  min-width: 94px;
  border-radius: 8px;
  padding: 6px 8px;
  font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--color-accent-soft) var(--cell-intensity, 0%), transparent);
}

.charts-hospital-cell__count {
  font-weight: 600;
  color: var(--color-text);
}

.charts-hospital-cell__pct {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.charts-hospital-cell--unclassified {
  background: color-mix(in srgb, var(--color-warning, #d97706) var(--cell-intensity, 0%), transparent);
}

.charts-hospital-total {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  white-space: nowrap;
}

.charts-hospital-table-wrapper tbody tr {
  cursor: default;
}

.charts-hospital-table-wrapper tbody tr.is-department-active td {
  background: color-mix(in srgb, var(--color-accent-soft) 42%, transparent);
}

.charts-hospital-trend {
  margin-top: 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface-alt);
  padding: 12px;
  display: grid;
  gap: 12px;
}

.charts-hospital-trend__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.charts-hospital-trend__header-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.charts-hospital-trend__clear {
  flex: 0 0 auto;
  margin-left: auto;
}

.charts-hospital-trend__header h3 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--color-text);
}

.charts-hospital-trend__header p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--color-text-muted);
}

.charts-hospital-trend__state {
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.charts-hospital-trend__state--neutral {
  border: 1px dashed color-mix(in srgb, var(--color-accent) 26%, transparent);
  background: color-mix(in srgb, var(--color-accent-soft) 18%, transparent);
  color: var(--color-text);
}

.charts-hospital-trend__state--empty {
  border: 1px solid color-mix(in srgb, var(--color-warning, #d97706) 32%, transparent);
  background: color-mix(in srgb, var(--color-warning, #d97706) 12%, transparent);
  color: var(--color-text);
}

.charts-hospital-trend canvas {
  width: 100%;
  height: clamp(260px, 32vw, 320px);
  min-height: 260px;
  max-height: 320px;
  display: block;
}

.summaries-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.summaries-report-groups {
  display: grid;
  gap: 18px;
}

.summaries-report-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
}

.summaries-report-group__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.summaries-report-group__heading-copy {
  min-width: 0;
}

.summaries-report-group__heading h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text);
}

.summaries-report-group__heading p {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--color-text-muted);
}

.summaries-report-group__grid {
  width: 100%;
}

.summaries-report-group__panel {
  width: 100%;
}

.report-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px;
  background: var(--color-surface-alt);
  display: grid;
  align-content: start;
  gap: 10px;
  position: relative;
}

.report-card--full-width {
  grid-column: 1 / -1;
}

.report-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.report-card__head h3,
.report-card__head h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text);
}

.report-card__inline-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.report-card__inline-filter span {
  white-space: nowrap;
  font-weight: 600;
}

.report-card__inline-filter select {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-input-bg);
  color: var(--color-text);
  padding: 4px 8px;
  font-size: 0.8rem;
}

.report-card__hint {
  margin: 0;
  font-size: 0.84rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.report-card canvas {
  width: 100%;
  height: 300px;
  min-height: 300px;
  max-height: 300px;
  display: block;
}

.report-card[data-loading="true"] canvas {
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    var(--skeleton-base) 25%,
    var(--skeleton-highlight) 37%,
    var(--skeleton-base) 63%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
}

.report-card[data-loading="true"] canvas + .report-card__hint {
  min-height: 1.2em;
}

#ageDiagnosisHeatmapChart,
#referralMonthlyHeatmapChart {
  min-height: 380px;
  height: 380px;
  max-height: 380px;
}

.table-wrapper--report {
  max-height: 180px;
  overflow: auto;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  grid-auto-flow: row dense;
  align-items: stretch;
}

.kpi-grid > .kpi-card {
  grid-column: span 1;
  min-width: 0;
}

.kpi-grid__section-label {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 700;
}

.kpi-grid__section-label span {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: var(--color-text-muted);
}

@media (max-width: 1440px) {
  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.kpi-controls {
  margin-bottom: 18px;
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-soft-panel);
  display: grid;
  gap: 10px;
}

.kpi-controls[data-expanded="false"] {
  display: none;
}

.kpi-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
  min-width: 0;
}

.kpi-date-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 100%;
}

.kpi-date-nav {
  min-width: 36px;
  padding-inline: 10px;
  font-weight: 700;
  line-height: 1;
}

.kpi-date-nav[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.kpi-date-input {
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  color: var(--color-text);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.1;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.kpi-date-input:hover,
.kpi-date-input:focus-visible {
  background: var(--color-input-bg-hover);
}

.kpi-date-input:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.kpi-date-clear {
  padding-inline: 12px;
  white-space: nowrap;
}

.kpi-controls__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.kpi-controls__toggle::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.kpi-controls[data-expanded="true"] .kpi-controls__toggle::after {
  transform: rotate(-135deg);
}

.kpi-controls__toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.65);
}

.kpi-controls__toggle:hover,
.kpi-controls__toggle:focus-visible {
  background: var(--state-accent-bg-12);
}

.kpi-controls__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 16px;
  align-items: end;
}

.kpi-controls[data-expanded="false"] .kpi-controls__form {
  display: none;
}

.kpi-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
  flex: 1 1 160px;
}

.kpi-filter span {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.kpi-filter select {
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-input-bg);
  color: var(--color-text);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.kpi-filter select:hover,
.kpi-filter select:focus-visible {
  background: var(--color-input-bg-hover);
}

.kpi-filter select:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.kpi-filter__segmented {
  width: 100%;
  justify-content: space-between;
}

.kpi-filter__segmented .segmented-control__button {
  flex: 1 1 0;
  padding-inline: 10px;
}

.kpi-controls__reset {
  justify-self: end;
  align-self: center;
}

.kpi-controls__summary {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--color-surface-alt);
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

.kpi-controls__summary[data-default="true"] {
  background: transparent;
  padding-inline: 0;
  color: var(--color-text-muted);
}

.kpi-card {
  list-style: none;
  background: var(--color-surface);
  border-radius: 18px;
  border: 1px solid var(--color-border);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-elevated);
  position: relative;
  overflow: hidden;
}

#kpiGrid[aria-busy="true"] {
  pointer-events: none;
}

.kpi-card--skeleton {
  box-shadow: none;
  border: 1px solid var(--skeleton-border);
  background: var(--skeleton-surface);
  opacity: 0.9;
}

.kpi-card--skeleton::before {
  display: none;
}

.kpi-card--skeleton .kpi-mainline {
  margin-bottom: 16px;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.kpi-card--skeleton .kpi-card__details {
  margin-top: 18px;
  gap: 12px;
}

.kpi-card--skeleton .kpi-card__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kpi-card--skeleton .kpi-card__header,
.kpi-card--skeleton .kpi-mainline,
.kpi-card--skeleton .kpi-card__details {
  pointer-events: none;
}

.kpi-card--skeleton .skeleton + .skeleton {
  margin-top: 10px;
}

.kpi-card--monthly {
  background: var(--color-surface-alt);
}

.kpi-card--monthly::before {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), transparent 55%);
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--state-accent-bg-08), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.kpi-card:hover::before,
.kpi-card:focus-within::before {
  opacity: 1;
}

.kpi-card__header {
  margin: 0 0 12px;
}

.kpi-card__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text-muted);
}

.kpi-card__meta {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface-alt);
  border-radius: 999px;
  padding: 2px 10px;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
  text-align: right;
  display: inline-block;
}

.kpi-mainline {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.kpi-mainline--primary {
  margin-bottom: 14px;
}

.kpi-mainline__primary {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.kpi-mainline__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.kpi-mainline__value {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  line-height: 1;
}

.kpi-mainline__metric {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.kpi-mainline__share {
  font-size: clamp(0.84rem, 0.8rem + 0.25vw, 0.94rem);
  font-weight: 500;
  color: var(--color-text-muted);
}

.kpi-main-value {
  font-size: clamp(1.9rem, 1.65rem + 0.95vw, 2.25rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 0.98;
}

.kpi-unit {
  font-size: clamp(0.85rem, 0.8rem + 0.3vw, 0.95rem);
  font-weight: 500;
  color: var(--color-text-muted);
}

.kpi-card__details {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-detail {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border: 1px solid color-mix(in srgb, var(--color-border) 86%, var(--color-accent) 14%);
  font-size: 0.82rem;
}

.kpi-detail__label {
  font-weight: 500;
  color: var(--color-text-muted);
}

.kpi-detail__value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.kpi-detail__value strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text);
}

.kpi-detail__comparison {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 12px;
  width: 100%;
}

.kpi-detail__token {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.kpi-detail__token--delta {
  align-items: baseline;
}

.kpi-detail__token-label {
  font-weight: 500;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  line-height: 1;
}

.kpi-detail__token-value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}

.kpi-detail__token-value strong {
  font-size: 0.96rem;
  line-height: 1;
}

@media (max-width: 520px) {
  .kpi-detail__comparison {
    gap: 6px 10px;
  }

  .kpi-detail__token {
    white-space: normal;
  }
}

.kpi-detail__token--reference {
  color: var(--color-text);
}

.kpi-detail--comparison .kpi-detail__token--delta,
.kpi-detail--comparison .kpi-detail__token--delta .kpi-detail__token-label {
  color: var(--color-text);
}

.kpi-detail__share {
  font-weight: 600;
  color: var(--color-text-muted);
}

.kpi-detail__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.kpi-detail--muted {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.28);
  background: color-mix(in srgb, var(--color-surface-alt) 82%, rgba(148, 163, 184, 0.18));
  border-color: color-mix(in srgb, var(--color-border) 78%, rgba(148, 163, 184, 0.3));
  color: var(--color-text-muted);
}

.kpi-detail--muted .kpi-detail__value {
  color: var(--color-text-muted);
}

.kpi-detail--muted .kpi-detail__token--reference {
  color: var(--color-text-muted);
}

.kpi-detail--delta-up {
  background: var(--color-surface-alt);
  border-color: var(--color-border);
  color: var(--color-text);
}

.kpi-detail--delta-up .kpi-detail__value {
  color: var(--color-text);
}

.kpi-detail--delta-up .kpi-detail__token--delta {
  color: var(--color-text);
}

.kpi-detail--delta-down {
  background: var(--color-surface-alt);
  border-color: var(--color-border);
  color: var(--color-text);
}

.kpi-detail--delta-down .kpi-detail__value {
  color: var(--color-text);
}

.kpi-detail--delta-down .kpi-detail__token--delta {
  color: var(--color-text);
}

.kpi-detail--delta-neutral {
  background: var(--color-surface-alt);
  border-color: var(--color-border);
  color: var(--color-text);
}

.kpi-detail--delta-neutral .kpi-detail__value {
  color: var(--color-text);
}

.kpi-detail--delta-neutral .kpi-detail__token--delta {
  color: var(--color-text);
}

.kpi-detail--delta-up .kpi-detail__token--delta .kpi-detail__token-label,
.kpi-detail--delta-down .kpi-detail__token--delta .kpi-detail__token-label,
.kpi-detail--delta-neutral .kpi-detail__token--delta .kpi-detail__token-label {
  color: var(--color-text-muted);
}

.kpi-empty {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .kpi-card {
    padding: 16px;
  }

  .kpi-mainline--primary {
    margin-bottom: 12px;
  }

  .kpi-main-value {
    font-size: clamp(1.7rem, 1.5rem + 1.25vw, 2rem);
  }

  .kpi-mainline__share,
  .kpi-unit {
    font-size: 0.85rem;
  }

  .kpi-detail {
    flex-wrap: wrap;
  }

  .kpi-detail__value {
    margin-left: auto;
  }
}

@media (max-width: 520px) {
  .kpi-card {
    padding: 15px 14px;
    border-radius: 16px;
  }

  .kpi-mainline {
    gap: 8px;
  }

  .kpi-mainline__value {
    gap: 8px;
  }

  .kpi-main-value {
    font-size: clamp(1.55rem, 1.35rem + 1.2vw, 1.85rem);
  }

  .kpi-detail {
    padding: 8px 10px;
  }

  .kpi-detail__label,
  .kpi-detail__value,
  .kpi-detail__value strong {
    font-size: 0.82rem;
  }
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  grid-auto-flow: row dense;
}

.chart-card {
  background: var(--color-surface);
  border-radius: 14px;
  border: 1px solid var(--color-border);
  padding: 16px 18px;
  margin: 0;
  box-shadow: var(--shadow-soft-panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: span 4;
  position: relative;
  overflow: hidden;
}

.kpi-hourly-chart {
  margin-top: 18px;
}

.chart-card--kpi-hourly {
  min-height: 0;
}

.chart-card__canvas--kpi-hourly {
  flex: 0 0 auto;
  height: clamp(250px, 30vh, 320px);
  min-height: 250px;
  max-height: 320px;
}

.chart-card__canvas--kpi-hourly canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.chart-legend__item.is-hidden {
  opacity: 0.5;
  text-decoration: line-through;
}

.chart-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.chart-card__skeleton {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--skeleton-border);
  border-radius: inherit;
  background: var(--skeleton-surface);
  z-index: 2;
  pointer-events: none;
}

.chart-card__skeleton .skeleton--chart-area,
.chart-card__skeleton .skeleton--chart-area--heatmap {
  width: 100%;
}

.chart-card__skeleton[hidden] {
  display: none;
}

.chart-card[data-loading="true"] .chart-card__skeleton {
  display: flex;
}

.chart-card[data-loading="true"] > :not(.chart-card__skeleton) {
  visibility: hidden;
}

.chart-card__message {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--color-text-muted);
  font-weight: 600;
  line-height: 1.4;
  border-radius: 14px;
  z-index: 3;
}

body[data-theme="dark"] .chart-card__message {
  background: rgba(30, 41, 59, 0.85);
  color: var(--color-text);
}

.chart-card[data-error="true"] .chart-card__message {
  display: flex;
}

.chart-card[data-error="true"] > :not(.chart-card__message) {
  visibility: hidden;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(12px, 2.8vw, 20px);
  margin-top: 20px;
}

.chart-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: end;
  width: 100%;
}

.table-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  position: relative;
  cursor: help;
}

.table-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
  box-shadow: var(--shadow-popover-soft);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 6;
  top: calc(100% + 6px);
  left: 0;
}

.table-tooltip:hover::after,
.table-tooltip:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.chart-filters__summary {
  margin: 0;
  font-size: var(--filter-label-size);
  color: var(--color-text-muted);
  background: transparent;
  border-radius: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-filters__summary[data-default="true"] {
  opacity: 0.85;
}

.chart-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  margin-left: 0;
  width: 100%;
  min-width: 0;
  grid-column: 1 / -1;
}

.chart-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 0 0 auto;
}

.chart-filter span {
  font-weight: 600;
  font-size: var(--filter-label-size);
  color: var(--color-text-muted);
}

.chart-filter select {
  border-radius: var(--filter-radius);
  border: 1px solid var(--filter-border);
  background: var(--filter-bg);
  color: var(--color-text);
  min-height: var(--filter-height);
  height: var(--filter-height);
  padding: 0 var(--filter-padding-x);
  font-size: var(--filter-font-size);
  font-family: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.chart-filter select:hover,
.chart-filter select:focus-visible {
  background: var(--filter-bg-hover);
  border-color: color-mix(in srgb, var(--color-accent) 35%, var(--filter-border));
  outline: none;
}

.chart-filter__segmented {
  width: 100%;
  justify-content: space-between;
}

.chart-filter__segmented .segmented-control__button {
  flex: 1 1 0;
  padding-inline: 10px;
}

.chart-filter__segmented--toggle .segmented-control__button {
  min-height: var(--filter-height);
}

.chart-period {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  background: var(--color-surface-alt);
  border-radius: 16px;
  border: 1px solid var(--color-border);
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  grid-column: 1 / 2;
}

.chart-period .chip-button {
  flex: 1 1 72px;
  min-width: 72px;
  text-align: center;
}

.chart-period__more {
  position: relative;
  flex: 1 1 96px;
  min-width: 96px;
}

.chart-period__more > summary {
  list-style: none;
}

.chart-period__more > summary::-webkit-details-marker {
  display: none;
}

.chart-period__more-toggle {
  width: 100%;
  justify-content: space-between;
}

.chart-period__more-toggle::after {
  content: "▾";
  font-size: 0.72em;
  line-height: 1;
  opacity: 0.75;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.chart-period__more[open] .chart-period__more-toggle::after {
  transform: rotate(180deg);
}

.chart-period__more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 12;
  min-width: 180px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: var(--shadow-popover-soft);
}

.chart-period__more-menu .chip-button {
  width: 100%;
  text-align: left;
}

body[data-theme="dark"] .chart-period__more-menu {
  background: var(--color-surface-alt);
}

.time-scope-control {
  display: grid;
  gap: 8px;
  width: 100%;
  grid-column: 1 / -1;
}

.time-scope-control__title {
  margin: 0;
  font-weight: 600;
  font-size: var(--filter-label-size);
  color: var(--color-text-muted);
}

.chart-year-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chart-year-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.time-scope-control__summary {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

@media (min-width: 1024px) {
  .time-scope-control {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
  }

  .time-scope-control__title {
    grid-column: 1 / -1;
  }

  .chart-period {
    grid-column: 1 / 2;
  }

  .chart-year-group {
    grid-column: 2 / 3;
    justify-content: flex-end;
  }

  .chart-year-chips {
    flex-wrap: nowrap;
  }

  .time-scope-control__summary {
    grid-column: 1 / -1;
  }
}

.chart-controls__actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
  margin-left: 0;
  width: 100%;
  padding-top: 4px;
  border-top: 1px dashed color-mix(in srgb, var(--color-border) 65%, transparent);
}

.chart-controls__actions .chart-filters__summary {
  flex: 1 1 auto;
  min-width: 200px;
}

@media (max-width: 1240px) and (min-width: 769px) {
  .chart-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.chip-button,
.feedback-trend-card__button {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.1s ease;
}

.chip-button:hover,
.chip-button:focus-visible,
.feedback-trend-card__button:hover,
.feedback-trend-card__button:focus-visible {
  background: var(--state-accent-bg-12);
  color: var(--color-accent);
  outline: none;
}

.chip-button[aria-pressed="true"],
.feedback-trend-card__button[aria-pressed="true"] {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
}

body[data-theme="dark"] .chip-button:hover,
body[data-theme="dark"] .chip-button:focus-visible,
body[data-theme="dark"] .feedback-trend-card__button:hover,
body[data-theme="dark"] .feedback-trend-card__button:focus-visible {
  background: rgba(96, 165, 250, 0.18);
}

body[data-theme="dark"] .chip-button[aria-pressed="true"],
body[data-theme="dark"] .feedback-trend-card__button[aria-pressed="true"] {
  background: rgba(96, 165, 250, 0.9);
  color: #0f172a;
}

.chart-card--wide {
  grid-column: span 8;
}

.chart-card--full {
  grid-column: span 12;
}

.chart-card--heatmap {
  grid-column: span 12;
}

.chart-card--compact {
  gap: 6px;
}

.kpi-hourly-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 6px;
  padding: 6px;
  border: 1px solid var(--filter-border);
  border-radius: var(--filter-radius);
  background: var(--color-surface-alt);
}

.kpi-hourly-controls .chip-button {
  border: 1px solid transparent;
  border-radius: calc(var(--filter-radius) - 2px);
  background: transparent;
}

.kpi-hourly-controls .chip-button:hover,
.kpi-hourly-controls .chip-button:focus-visible {
  background: var(--filter-bg-hover);
  border-color: color-mix(in srgb, var(--color-accent) 30%, var(--filter-border));
}

.kpi-hourly-baseline-toggle {
  margin-left: auto;
  color: var(--color-text-muted);
}

.kpi-hourly-baseline-toggle[aria-busy="true"] {
  position: relative;
  color: var(--color-text);
}

.kpi-hourly-baseline-toggle[aria-busy="true"]::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 8px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--color-accent) 26%, transparent);
  border-top-color: var(--color-accent);
  vertical-align: -0.12em;
  animation: baselineToggleSpin 0.8s linear infinite;
}

.kpi-hourly-baseline-toggle[aria-pressed="true"] {
  color: var(--color-accent);
  border-color: color-mix(in srgb, var(--color-accent) 36%, var(--filter-border));
  background: color-mix(in srgb, var(--color-accent-soft) 55%, transparent);
}

@keyframes baselineToggleSpin {
  to {
    transform: rotate(360deg);
  }
}

.chart-card--compact canvas {
  min-height: 180px;
  height: clamp(180px, 22vh, 260px);
}

.chart-card figcaption {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  white-space: normal;
}

.chart-card figcaption span {
  display: block;
  line-height: 1.6;
}

.chart-card figcaption span + span {
  margin-top: 4px;
}

.chart-caption__label {
  display: block;
  line-height: 1.6;
  margin-bottom: 4px;
}

.chart-card--funnel {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3vw, 32px);
  gap: clamp(12px, 2.4vw, 20px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}

.chart-card--funnel canvas {
  width: 100%;
  height: clamp(260px, 30vh, 360px);
  display: block;
  border-radius: 16px;
}

.chart-card--funnel figcaption {
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.chart-caption__context {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Chart.js turi gauti stabilų konteinerio aukštį; kitaip auto-height kortelėse gali formuotis resize ciklas. */
.chart-card__canvas--chart {
  width: 100%;
  flex: 1 1 auto;
  min-height: 280px;
  height: clamp(280px, 30vh, 400px);
  display: flex;
}

/* Papildomas aukštis pacientų srautų grafiko kortelėms. */
.chart-card--tall {
  min-height: 460px;
}

.chart-card--hourly {
  min-height: 520px;
}

.chart-card__canvas {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
}

.chart-card__canvas--hourly {
  height: clamp(360px, 42vh, 520px);
}

.chart-card--tall .chart-card__canvas--chart {
  min-height: 380px;
  height: clamp(380px, 42vh, 520px);
}

.chart-card__canvas canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
}

.chart-card--hourly canvas {
  min-height: 0;
  height: 100%;
}

.heatmap-toolbar {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hourly-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  align-items: stretch;
}

.hourly-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hourly-toolbar__row--actions {
  justify-content: flex-end;
}

.hourly-toolbar__actions-inline {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hourly-toolbar__field {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.hourly-toolbar__field--metric {
  min-width: 220px;
}

.hourly-toolbar__hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-left: auto;
  white-space: nowrap;
}

.hourly-compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.hourly-compare-toggle input {
  margin: 0;
  width: 14px;
  height: 14px;
  accent-color: var(--color-accent);
}

.hourly-compare-toggle:hover,
.hourly-compare-toggle:focus-within {
  color: var(--color-text);
  background: var(--color-surface);
  border-color: rgba(37, 99, 235, 0.35);
}

.segmented-control {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  overflow: hidden;
}

.segmented-control__button {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.segmented-control__button[aria-pressed="true"] {
  background: var(--color-accent);
  color: #fff;
}

.segmented-control__button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chip-button--ghost {
  background: var(--color-surface-alt);
  border: 1px dashed var(--color-border);
  color: var(--color-text-muted);
}

.chip-button--ghost:hover,
.chip-button--ghost:focus-visible {
  color: var(--color-accent);
  border-color: rgba(37, 99, 235, 0.35);
}

.hourly-toolbar select,
.hourly-toolbar .chip-button,
.hourly-toolbar .segmented-control__button,
.hourly-toolbar #hourlyDepartment,
.hourly-department__toggle {
  height: 34px;
  min-height: 34px;
}

.segmented-control {
  min-height: 34px;
  align-items: stretch;
}

.segmented-control__button,
.hourly-toolbar .chip-button {
  line-height: 34px;
  padding-top: 0;
  padding-bottom: 0;
}

.hourly-toolbar select {
  background: rgba(15, 23, 42, 0.7);
  color: var(--color-text);
  border-color: rgba(96, 165, 250, 0.25);
}

.hourly-toolbar select:hover,
.hourly-toolbar select:focus-visible {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(96, 165, 250, 0.5);
}

.chart-card--hourly label[for="hourlyDepartment"] {
  flex: 1 1 280px;
  min-width: 220px;
}

.hourly-department {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--color-input-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: visible;
  position: relative;
}

.chart-card--hourly #hourlyDepartment {
  min-width: 220px;
  border: none;
  background: transparent;
  color: var(--color-text);
  padding: 8px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  min-height: 36px;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.hourly-department__toggle {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  padding: 8px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.hourly-department__toggle:hover,
.hourly-department__toggle:focus-visible {
  background: var(--color-input-bg-hover);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--color-accent);
  outline: none;
}

.chart-card--hourly #hourlyDepartment:hover,
.chart-card--hourly #hourlyDepartment:focus-visible {
  background: var(--color-input-bg-hover);
  border-color: rgba(37, 99, 235, 0.35);
  outline: none;
}

.hourly-department:focus-within {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 2px var(--state-accent-bg-12);
}

.hourly-suggestions {
  position: absolute;
  margin-top: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 12px 26px -20px rgba(15, 23, 42, 0.45);
  max-height: 320px;
  overflow-y: auto;
  z-index: 20;
  min-width: 220px;
}

.hourly-department .hourly-suggestions {
  top: 100%;
  right: 0;
  left: auto;
  margin-top: 6px;
}

.hourly-suggestions__item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.85rem;
}

.hourly-suggestions__item[aria-selected="true"],
.hourly-suggestions__item:hover {
  background: var(--state-accent-bg-12);
  color: var(--color-accent);
}

body[data-theme="dark"] .hourly-suggestions {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(96, 165, 250, 0.25);
  box-shadow: 0 16px 40px -28px rgba(15, 23, 42, 0.85);
}

.heatmap-toolbar__field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 6px 10px;
}

.heatmap-toolbar__label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.heatmap-toolbar__field--segmented {
  padding-right: 6px;
}

.heatmap-toolbar__segmented .segmented-control__button {
  min-width: 44px;
  padding-inline: 12px;
}

.heatmap-toolbar select {
  appearance: none;
  background: var(--color-input-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 6px 28px 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.heatmap-toolbar select:hover,
.heatmap-toolbar select:focus-visible {
  background: var(--color-input-bg-hover);
  border-color: rgba(37, 99, 235, 0.35);
  outline: none;
}

body[data-theme="dark"] .heatmap-toolbar__field {
  background: rgba(15, 23, 42, 0.4);
}

body[data-theme="dark"] .heatmap-toolbar select {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(96, 165, 250, 0.25);
  color: var(--color-text);
}

body[data-theme="dark"] .heatmap-toolbar select:hover,
body[data-theme="dark"] .heatmap-toolbar select:focus-visible {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(96, 165, 250, 0.5);
}

body[data-theme="dark"] .segmented-control {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(96, 165, 250, 0.25);
}

body[data-theme="dark"] .segmented-control__button[aria-pressed="true"] {
  background: rgba(96, 165, 250, 0.9);
  color: #0f172a;
}

/* Filter system: shared utility classes + mapped legacy selectors */
.filter-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--filter-border);
  border-radius: 14px;
  background: var(--color-surface-alt);
}

.filter-panel__head {
  display: grid;
  gap: 6px;
}

.filter-panel__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.filter-panel__title {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.filter-panel__subtitle {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.84rem;
}

.filter-panel__primary {
  margin: 0;
}

.filter-panel__summary {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed color-mix(in srgb, var(--color-border) 65%, transparent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.filter-panel__summary-title {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--filter-label-size);
  min-width: 110px;
}

.filter-panel__summary-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
}

.filter-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.gydytojai-filter-panel[data-loading="true"] {
  position: relative;
  pointer-events: none;
  cursor: progress;
}

.gydytojai-filter-panel[data-loading="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.06) 25%,
    rgba(148, 163, 184, 0.14) 37%,
    rgba(148, 163, 184, 0.06) 63%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
}

.gydytojai-filter-panel[data-loading="true"] .gydytojai-filter-panel__primary {
  opacity: 0.72;
}

#gydytojaiFiltersMainRow .gydytojai-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

#gydytojaiFiltersMainRow.gydytojai-filters-main-row {
  display: grid;
  grid-template-columns:
    minmax(108px, 0.68fr)
    minmax(148px, 0.9fr)
    minmax(0, 1fr)
    minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  margin: 0;
}

#gydytojaiFiltersMainRow .chip-button {
  padding-inline: 10px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.filter-field,
.kpi-filter,
.chart-filter,
.feedback-filters__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-label,
.kpi-filter span,
.chart-filter span,
.chart-year-group > span,
.feedback-filters__field label,
.heatmap-toolbar__label {
  font-weight: 600;
  font-size: var(--filter-label-size);
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}

.feedback-filters__field label,
.feedback-trend-card__controls-label,
.feedback-trend-card__mode-label,
.compare-card__header h3 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-select,
.kpi-filter select,
.chart-filter select,
.feedback-filter-select,
.heatmap-toolbar select,
.hourly-toolbar select {
  border-radius: var(--filter-radius);
  border: 1px solid var(--filter-border);
  background: var(--filter-bg);
  color: var(--color-text);
  min-height: var(--filter-height);
  height: var(--filter-height);
  padding: 0 var(--filter-padding-x);
  font-size: var(--filter-font-size);
  font-family: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.filter-select:hover,
.filter-select:focus-visible,
.kpi-filter select:hover,
.kpi-filter select:focus-visible,
.chart-filter select:hover,
.chart-filter select:focus-visible,
.feedback-filter-select:hover,
.feedback-filter-select:focus-visible,
.heatmap-toolbar select:hover,
.heatmap-toolbar select:focus-visible,
.hourly-toolbar select:hover,
.hourly-toolbar select:focus-visible {
  background: var(--filter-bg-hover);
  border-color: color-mix(in srgb, var(--color-accent) 35%, var(--filter-border));
}

.filter-select:focus-visible,
.kpi-filter select:focus-visible,
.chart-filter select:focus-visible,
.feedback-filter-select:focus-visible,
.heatmap-toolbar select:focus-visible,
.hourly-toolbar select:focus-visible {
  outline: none;
  box-shadow: var(--filter-focus-ring);
}

.filter-summary,
.kpi-controls__summary,
.chart-filters__summary,
.feedback-filters__summary {
  margin: 0;
  font-size: var(--filter-label-size);
  color: var(--color-text-muted);
  background: var(--color-surface-alt);
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.summaries-reports-controls__actions .feedback-filters__summary,
.feedback-controls .feedback-filters__summary {
  margin-left: auto;
}

.filter-chip-group,
.feedback-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-chip-group {
  padding: 6px;
  border: 1px solid var(--filter-border);
  border-radius: var(--filter-radius);
  background: var(--color-surface-alt);
}

.feedback-chip-group .chip-button {
  border: 1px solid transparent;
  border-radius: calc(var(--filter-radius) - 2px);
  background: transparent;
}

.feedback-chip-group .chip-button:hover,
.feedback-chip-group .chip-button:focus-visible {
  background: var(--filter-bg-hover);
  border-color: color-mix(in srgb, var(--color-accent) 30%, var(--filter-border));
}

.segmented-control,
.chip-button,
.feedback-trend-card__button,
.heatmap-toolbar__field,
.chart-filter--toggle .chart-toggle,
.hourly-compare-toggle {
  border-radius: var(--filter-radius);
  border-color: var(--filter-border);
}

.segmented-control {
  min-height: var(--filter-height);
  align-items: stretch;
}

.segmented-control__button,
.chip-button,
.feedback-trend-card__button {
  min-height: var(--filter-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  padding: 0 var(--filter-padding-x);
  font-size: var(--filter-font-size);
}

.chip-button .inline-icon-label__icon,
.feedback-trend-card__button .inline-icon-label__icon,
.btn .inline-icon-label__icon {
  width: 0.95em;
  height: 0.95em;
}

.hourly-toolbar .chip-button,
.hourly-toolbar .segmented-control__button,
.hourly-toolbar select {
  min-height: var(--filter-height);
  height: var(--filter-height);
  line-height: 1.1;
}

.chip-button--ghost {
  min-height: var(--filter-height);
}

.heatmap-toolbar__field,
.hourly-compare-toggle {
  min-height: var(--filter-height);
  font-size: var(--filter-font-size);
  padding: 0 10px;
  background: var(--color-surface-alt);
}

.hourly-compare-toggle:hover,
.hourly-compare-toggle:focus-within,
.heatmap-toolbar__field:focus-within {
  border-color: color-mix(in srgb, var(--color-accent) 35%, var(--filter-border));
}

.hourly-department {
  border: 1px solid var(--filter-border);
  border-radius: var(--filter-radius);
  background: var(--filter-bg);
  min-height: var(--filter-height);
}

.hourly-department:focus-within {
  border-color: color-mix(in srgb, var(--color-accent) 35%, var(--filter-border));
  box-shadow: var(--filter-focus-ring);
}

.chart-card--hourly #hourlyDepartment {
  border: none;
  background: transparent;
  color: var(--color-text);
  min-height: var(--filter-height);
  height: var(--filter-height);
}

@media (max-width: 768px) {
  .filter-panel {
    padding: 8px;
  }

  .kpi-controls__form,
  .feedback-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .chart-filters {
    width: 100%;
    flex-basis: 100%;
  }

  .chart-filter,
  .kpi-filter,
  .feedback-filters__field {
    min-width: 0;
  }

  .feedback-chip-group {
    display: none;
  }

  .feedback-filter-select {
    display: block;
  }
}

@media (min-width: 769px) {
  .feedback-chip-group {
    display: flex;
  }

  .feedback-filter-select {
    display: none;
  }
}

body[data-theme="dark"] .chart-card--hourly #hourlyDepartment {
  background: transparent;
  border-color: transparent;
  color: var(--color-text);
}

body[data-theme="dark"] .hourly-department {
  background: var(--filter-bg);
  border-color: var(--filter-border);
}

.hourly-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hourly-action__hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  position: relative;
  line-height: 1;
}

.hourly-action[aria-expanded="true"] .hourly-action__hint {
  color: var(--color-accent);
}

.hourly-action__hint::after {
  content: attr(data-tooltip);
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
  box-shadow: var(--shadow-popover-soft);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  margin-left: 6px;
  z-index: 10;
}

.hourly-action__hint:hover::after,
.hourly-action__hint:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

body[data-theme="dark"] .hourly-department__toggle {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(96, 165, 250, 0.25);
  color: rgba(203, 213, 225, 0.85);
}

.hourly-department.is-disabled {
  opacity: 0.55;
  filter: grayscale(0.15);
  pointer-events: none;
}

body[data-theme="dark"] .chart-card--hourly #hourlyDepartment:hover,
body[data-theme="dark"] .chart-card--hourly #hourlyDepartment:focus-visible {
  background: transparent;
  border-color: transparent;
}

.heatmap-scroll {
  width: 100%;
  overflow-x: auto;
}

.heatmap-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  font-size: 0.8rem;
  min-width: 960px;
}

.heatmap-table thead th {
  text-align: center;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 4px 2px;
  white-space: nowrap;
}

.heatmap-table tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 6px 8px;
  white-space: nowrap;
}

.heatmap-table td {
  padding: 0;
}

.heatmap-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.1s ease;
}

.heatmap-cell:hover,
.heatmap-cell:focus-visible {
  transform: scale(1.05);
  outline: 2px solid rgba(37, 99, 235, 0.25);
  outline-offset: 1px;
}

.heatmap-empty {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.heatmap-legend {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

@media (max-width: 1200px) {
  .chart-card {
    grid-column: span 6;
  }

  .chart-card--wide {
    grid-column: span 12;
  }
}

@media (max-width: 768px) {
  :is(.charts-jump-nav, .summaries-jump-nav) {
    padding: 6px;
  }

  .charts-jump-nav {
    margin: 8px 0 14px;
  }

  .summaries-jump-nav {
    margin: 8px 0 12px;
  }

  :is(.charts-jump-nav__link, .summaries-jump-nav__link) {
    min-height: 36px;
  }

  .charts-subsection {
    padding: 12px;
  }

  .kpi-header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-left: 0;
  }

  .kpi-header-actions .kpi-controls__toggle {
    width: 100%;
    justify-content: space-between;
  }

  .kpi-header-actions .kpi-controls__summary {
    width: 100%;
    justify-content: flex-start;
  }

  .kpi-controls__form {
    grid-template-columns: 1fr;
  }

  .kpi-controls__reset {
    justify-self: stretch;
  }

  .chart-card__canvas--chart {
    min-height: 280px;
    height: clamp(280px, 55vh, 340px);
  }

  .chart-card--tall .chart-card__canvas--chart {
    min-height: 340px;
    height: clamp(340px, 65vh, 400px);
  }

  .chart-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .chart-period {
    grid-column: 1 / -1;
    flex: 1 1 auto;
  }

  .chart-period__more {
    flex: 1 1 100%;
    min-width: 0;
  }

  .chart-period__more-menu {
    left: 0;
    right: auto;
    min-width: max(180px, 70vw);
  }

  .chart-year-group {
    width: 100%;
  }

  .chart-year-chips {
    width: 100%;
  }

  .chart-controls__actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .chart-filters {
    grid-template-columns: 1fr;
  }

  .chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .chart-card,
  .chart-card--wide {
    grid-column: 1 / -1;
  }

  .chart-card__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .chart-period {
    align-self: stretch;
  }

  .heatmap-table {
    min-width: 640px;
  }

  .table-wrapper {
    max-height: 360px;
    padding: 10px;
  }
}

.table-wrapper {
  background: var(--color-surface);
  border-radius: 14px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft-panel);
  padding: 12px;
  overflow: auto;
  max-height: 480px;
}

.table-wrapper--full-height {
  max-height: none;
  overflow: visible;
}

.table-wrapper--feedback {
  max-height: none;
  overflow: visible;
}

.feedback-table-actions {
  justify-content: flex-end;
  margin: 10px 0 8px;
}

.feedback-table-meta {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.feedback-comments-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
  display: grid;
  gap: 14px;
}

.feedback-comments-section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: end;
}

.feedback-comments-section__titles {
  min-width: 0;
}

.feedback-comments-section__title {
  margin: 0;
  font-size: 1rem;
}

.feedback-comments-section__subtitle {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.feedback-comments-section__meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-align: right;
}

.feedback-comments-section__list {
  display: grid;
  gap: 12px;
}

.feedback-comment {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--color-surface) 94%, white 6%),
    var(--color-surface)
  );
  box-shadow: 0 16px 30px -24px rgba(15, 23, 42, 0.35);
  display: grid;
  gap: 10px;
}

.feedback-comment__text {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--color-text);
  white-space: pre-wrap;
}

.feedback-comment__meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.feedback-comments-section__empty {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--color-border) 72%, transparent);
  background: color-mix(in srgb, var(--color-surface-alt) 70%, transparent);
  color: var(--color-text-muted);
}

.feedback-comments-section__actions {
  display: flex;
  justify-content: center;
}

.feedback-comments-section__more {
  min-height: 38px;
  padding-inline: 14px;
}

.table-wrapper--feedback table {
  table-layout: fixed;
}

.table-wrapper--feedback th,
.table-wrapper--feedback td {
  word-break: break-word;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.4;
}

th {
  font-weight: 600;
  color: var(--color-text-muted);
  position: sticky;
  top: 0;
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  z-index: 2;
}

.compare-card {
  margin-bottom: 16px;
  padding: 18px 20px;
  background: var(--color-surface);
  border-radius: 16px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-elevated);
}

.compare-monthly {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compare-monthly__stats {
  display: grid;
  gap: 12px;
}

.compare-monthly__sparkline {
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-surface-alt) 0%, var(--color-surface) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 140px;
  text-align: center;
}

.compare-monthly__sparkline-title {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.compare-monthly__sparkline svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0 auto;
}

.compare-monthly__empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

body[data-theme="dark"] .compare-monthly__sparkline {
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.12) 0%, rgba(15, 23, 42, 0.6) 100%);
  border-color: rgba(96, 165, 250, 0.32);
}

@media (min-width: 960px) {
  .compare-monthly {
    flex-direction: row;
    align-items: stretch;
  }

  .compare-monthly__stats,
  .compare-monthly__sparkline {
    flex: 1 1 0;
  }
}

.compare-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.compare-card__header h3 {
  margin: 0;
  font-size: 1rem;
}

.compare-card__body {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

footer {
  padding: 24px 0 36px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

dialog {
  width: min(720px, 92vw);
  border: none;
  border-radius: 24px;
  padding: 0;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 35px 65px -28px rgba(15, 23, 42, 0.55);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

dialog.global-search {
  width: min(760px, 94vw);
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.08), transparent 54%), var(--color-surface);
  box-shadow: 0 36px 78px -30px rgba(15, 23, 42, 0.62);
}

dialog.global-search[open] {
  display: block;
  position: fixed;
  top: 8vh;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  z-index: 1000;
}

.global-search__shell {
  display: grid;
  gap: 10px;
  max-height: min(78vh, 720px);
}

.global-search__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px 14px 0;
}

.global-search__input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-input-bg);
  color: var(--color-text);
  padding: 12px 14px;
  font: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.global-search__input:hover,
.global-search__input:focus-visible {
  background: var(--color-input-bg-hover);
}

.global-search__input:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.global-search__close {
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  border-radius: 12px;
  padding: 0 12px;
  min-width: 56px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.global-search__close:hover,
.global-search__close:focus-visible {
  outline: none;
  background: var(--state-accent-bg-08);
  color: var(--color-accent);
  border-color: rgba(37, 99, 235, 0.28);
}

.global-search__help {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  padding: 0 16px;
}

.global-search__empty {
  margin: 6px 14px 14px;
  border: 1px dashed var(--color-border);
  border-radius: 14px;
  padding: 16px;
  color: var(--color-text-muted);
  text-align: center;
  background: var(--color-surface-alt);
}

.global-search__results {
  overflow: auto;
  padding: 0 10px 12px;
  display: grid;
  gap: 8px;
}

.global-search__group {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-surface-alt) 78%, transparent);
  overflow: clip;
}

.global-search__group-title {
  margin: 0;
  padding: 10px 12px 8px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 75%, transparent);
}

.global-search__group-list {
  display: grid;
}

.global-search__option {
  width: 100%;
  text-align: left;
  border: none;
  border-top: 1px solid color-mix(in srgb, var(--color-border) 55%, transparent);
  background: transparent;
  color: inherit;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  cursor: pointer;
}

.global-search__group-list .global-search__option:first-child {
  border-top: none;
}

.global-search__option:hover,
.global-search__option:focus-visible,
.global-search__option.is-active {
  outline: none;
  background: color-mix(in srgb, var(--state-accent-bg-08) 65%, transparent);
}

.global-search__option.is-active {
  box-shadow: inset 3px 0 0 0 var(--color-accent);
}

.global-search__option-title {
  font-weight: 600;
  line-height: 1.25;
}

.global-search__option-subtitle {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.settings-form {
  display: flex;
  flex-direction: column;
  max-height: min(80vh, 760px);
}

.settings-header {
  padding: 24px 28px 12px;
  border-bottom: 1px solid var(--color-border);
}

.settings-header h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.settings-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.settings-scroll {
  padding: 24px 28px;
  overflow-y: auto;
  display: grid;
  gap: 28px;
}

.settings-section {
  display: grid;
  gap: 16px;
}

.settings-section h3 {
  margin: 0;
  font-size: 1.1rem;
}

.settings-fieldset {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 0;
  display: grid;
  gap: 16px;
  background: rgba(37, 99, 235, 0.05);
}

body[data-theme="dark"] .settings-fieldset {
  background: rgba(96, 165, 250, 0.08);
}

.settings-fieldset legend {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 6px;
}

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

.settings-field label span,
.settings-field > span {
  font-weight: 600;
  font-size: 0.95rem;
}

.settings-field input,
.settings-field textarea,
.settings-field select {
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-input-bg);
  color: var(--color-text);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.settings-field input:hover,
.settings-field textarea:hover,
.settings-field select:hover,
.settings-field input:focus-visible,
.settings-field textarea:focus-visible,
.settings-field select:focus-visible {
  background: var(--color-input-bg-hover);
}

.settings-field input:focus-visible,
.settings-field textarea:focus-visible,
.settings-field select:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.settings-field textarea {
  min-height: 120px;
  resize: vertical;
}

.settings-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.settings-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--color-text);
}

.settings-checkbox input {
  margin-top: 3px;
}

.settings-hint {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.settings-footer {
  padding: 18px 28px 24px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.settings-footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.3s ease,
    border-color 0.3s ease;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 12px 30px -18px rgba(37, 99, 235, 0.7);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px -18px rgba(37, 99, 235, 0.75);
  outline: none;
}

.btn-secondary {
  background: transparent;
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--color-accent);
}

.btn-secondary[aria-pressed="true"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 30px -18px rgba(15, 23, 42, 0.4);
}

body[data-theme="dark"] .btn-secondary[aria-pressed="true"] {
  box-shadow: 0 12px 30px -18px rgba(15, 23, 42, 0.65);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  transform: translateY(-1px);
  background: var(--state-accent-bg-08);
  border-color: rgba(37, 99, 235, 0.55);
  outline: none;
}

.btn-secondary[aria-pressed="true"]:hover,
.btn-secondary[aria-pressed="true"]:focus-visible {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 16px 36px -18px rgba(15, 23, 42, 0.5);
  outline: none;
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: #b91c1c;
  border-color: rgba(248, 113, 113, 0.4);
}

.btn-danger:hover,
.btn-danger:focus-visible {
  transform: translateY(-1px);
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.55);
  outline: none;
}

.btn-tertiary {
  background: transparent;
  border: 1px dashed var(--color-border);
  color: var(--color-text-muted);
}

.btn-tertiary:hover,
.btn-tertiary:focus-visible {
  background: var(--state-accent-bg-08);
  color: var(--color-accent);
  border-style: solid;
  outline: none;
}

@media (max-width: 640px) {
  dialog {
    width: 96vw;
    border-radius: 18px;
  }

  dialog.global-search {
    width: 96vw;
    border-radius: 16px;
  }

  .global-search__header {
    grid-template-columns: 1fr;
  }

  .global-search__close {
    justify-self: end;
    min-height: 36px;
  }

  .settings-header,
  .settings-scroll,
  .settings-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .settings-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-footer-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .settings-footer-actions .btn,
  .settings-footer .btn-danger {
    width: 100%;
  }

  .scroll-top-btn {
    right: 16px;
    bottom: 16px;
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

@media (min-width: 431px) and (max-width: 768px) {
  :root,
  :root[data-theme="light"],
  :root[data-theme="dark"],
  body[data-theme="light"],
  body[data-theme="dark"] {
    --filter-height: 42px;
  }

  .container {
    padding-left: clamp(14px, 3.2vw, 26px);
    padding-right: clamp(14px, 3.2vw, 26px);
  }

  .feedback-cards {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .feedback-cards > * {
    flex: 1 1 min(280px, 100%);
  }

  body[data-page="feedback"] .section__title-row {
    flex-wrap: nowrap;
    gap: 8px;
  }

  body[data-page="feedback"] #feedbackHeading {
    font-size: 1.2rem;
  }

  body[data-page="feedback"] #feedbackSubtitle {
    white-space: nowrap;
    font-size: 0.82rem;
  }
}

@media (max-width: 430px) {
  :root,
  :root[data-theme="light"],
  :root[data-theme="dark"],
  body[data-theme="light"],
  body[data-theme="dark"] {
    --filter-height: 44px;
    --filter-padding-x: 14px;
    --mobile-page-pad: 12px;
    --mobile-card-gap: 12px;
    --mobile-card-radius: 16px;
  }

  html,
  body {
    overflow-x: hidden;
  }

  .container {
    padding-left: var(--mobile-page-pad);
    padding-right: var(--mobile-page-pad);
  }

  header.hero {
    padding: 8px 0;
  }

  .hero__content {
    gap: 10px;
  }

  .hero__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .hero__status {
    width: 100%;
    justify-content: flex-start;
    min-width: 0;
  }

  .hero__buttons {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  button.icon-button,
  .hero__buttons button.icon-button,
  :is(.export-icon-btn, .chart-copy-btn, .chart-download-btn) {
    width: var(--component-touch-target-size);
    height: var(--component-touch-target-size);
  }

  .btn,
  .btn-small {
    min-height: var(--component-touch-target-size);
  }

  .section-nav__bar {
    padding: 4px 0;
  }

  .section-nav__inner {
    gap: 8px;
  }

  .section-nav__link,
  .section-nav__trigger,
  .section-nav--compact .section-nav__link {
    min-height: var(--component-touch-target-size);
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .section-nav__icon {
    width: var(--component-mobile-nav-icon-size);
    height: var(--component-mobile-nav-icon-size);
  }

  .section-nav__icon svg {
    width: var(--component-mobile-nav-icon-size);
    height: var(--component-mobile-nav-icon-size);
  }

  .feedback-controls {
    margin: 12px 0 16px;
    gap: 10px;
  }

  .summaries-segment-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .summaries-reports-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .summaries-report-group {
    padding: 10px;
  }

  .charts-hospital-table-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .charts-hospital-trend__header {
    flex-direction: column;
  }

  .charts-hospital-trend__clear {
    width: 100%;
    margin-left: 0;
  }

  .charts-hospital-trend canvas {
    height: 320px;
    min-height: 320px;
    max-height: 320px;
  }

  :is(.charts-jump-nav, .summaries-jump-nav) {
    border-radius: var(--component-mobile-jump-nav-radius);
  }

  :is(.charts-jump-nav__link, .summaries-jump-nav__link) {
    min-height: var(--component-mobile-jump-nav-link-height);
  }

  .summaries-reports-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-card__head h3,
  .report-card__head h4 {
    width: 100%;
  }

  .report-card__actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .report-card canvas {
    height: 260px;
    min-height: 260px;
    max-height: 260px;
  }

  .feedback-filters {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .feedback-filters__field {
    min-width: 0;
  }

  .feedback-filter-select {
    width: 100%;
  }

  .feedback-cards {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: var(--mobile-card-gap);
    overflow-x: visible;
  }

  .feedback-cards > * {
    flex: 1 1 auto;
    min-width: 100%;
  }

  .feedback-card {
    border-radius: var(--mobile-card-radius);
    padding: 16px;
  }

  .feedback-trend-card__header {
    gap: 12px;
  }

  .feedback-trend-card__titles {
    flex-basis: 100%;
  }

  .feedback-trend-card__controls {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .feedback-trend-card__controls-label {
    width: 100%;
  }

  .feedback-trend-card__buttons {
    width: 100%;
    justify-content: space-between;
  }

  .feedback-trend-card__button {
    min-height: 44px;
    flex: 1 1 0;
    padding: 0 12px;
  }

  .table-wrapper--feedback {
    overflow: auto;
    position: relative;
    max-width: 100%;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
  }

  .table-wrapper--feedback table {
    table-layout: auto;
    min-width: 760px;
  }

  .feedback-comments-section__head {
    grid-template-columns: minmax(0, 1fr);
  }

  .feedback-comments-section__meta {
    text-align: left;
  }

  .table-wrapper--feedback th,
  .table-wrapper--feedback td {
    white-space: nowrap;
    word-break: normal;
  }

  .table-wrapper--feedback th:first-child,
  .table-wrapper--feedback td:first-child {
    position: sticky;
    left: 0;
    background: var(--color-surface);
    box-shadow: 10px 0 18px -16px rgba(15, 23, 42, 0.6);
  }

  .table-wrapper--feedback th:first-child {
    z-index: 4;
    background: var(--color-surface-alt);
  }

  .table-wrapper--feedback td:first-child {
    z-index: 3;
  }

  .table-wrapper--feedback::before,
  .table-wrapper--feedback::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 18px;
    pointer-events: none;
    opacity: 0;
    z-index: 5;
  }

  .table-wrapper--feedback::before {
    left: 0;
    background: linear-gradient(90deg, var(--color-bg), transparent);
  }

  .table-wrapper--feedback::after {
    right: 0;
    background: linear-gradient(270deg, var(--color-bg), transparent);
  }

  .table-wrapper--feedback[data-scrollable="true"]:not([data-scroll-start="true"])::before {
    opacity: 1;
  }

  .table-wrapper--feedback[data-scrollable="true"]:not([data-scroll-end="true"])::after {
    opacity: 1;
  }

  .ed-dashboard {
    padding: 16px 14px;
    border-radius: 20px;
  }

  .ed-dashboard__header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .ed-dashboard__title-row {
    align-items: flex-start;
  }

  .ed-dashboard__header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .ed-dashboard__header-actions > * {
    flex: 1 1 auto;
    justify-content: center;
  }

  .ed-dashboard__status {
    white-space: normal;
    font-size: 0.82rem;
    padding: 8px 12px;
  }

  .ed-dashboard__cards,
  .ed-dashboard__section-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .ed-dashboard__section {
    border-radius: var(--mobile-card-radius);
    padding: 14px;
  }

  .ed-dashboard__section-header {
    gap: 10px;
  }

  .ed-dashboard__section-title {
    font-size: 1.08rem;
    letter-spacing: 0.02em;
  }

  .ed-dashboard__section-description {
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
}
.export-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.export-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.export-menu__caret {
  font-size: 0.72rem;
}

.export-menu__list {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  display: none;
  min-width: 11rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.14));
  background: var(--surface-panel, #101722);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  z-index: 20;
}

.export-menu[data-open="true"] .export-menu__list {
  display: grid;
  gap: 0.25rem;
}

.export-menu__item {
  appearance: none;
  border: 0;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.export-menu__item:hover,
.export-menu__item:focus-visible {
  background: color-mix(in srgb, var(--accent, #2f89ff) 16%, transparent);
  outline: none;
}

.export-menu__source {
  display: none !important;
}

.table-wrapper thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-panel, #101722);
}

.table-wrapper table th:first-child,
.table-wrapper table td:first-child {
  position: sticky;
  left: 0;
  background: inherit;
}

.table-wrapper table th:first-child {
  z-index: 3;
}

.table-row--selectable {
  cursor: pointer;
}

.recent-table__value {
  display: block;
}

.recent-table__cell--anomaly {
  background: color-mix(in srgb, var(--color-accent-soft) 16%, transparent);
}

.recent-table__cell--high {
  background: color-mix(in srgb, #ef4444 14%, var(--color-surface));
}

.recent-table__cell--low {
  background: color-mix(in srgb, #2563eb 12%, var(--color-surface));
}

.recent-table__anomaly-badge {
  display: inline-flex;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.recent-table__anomaly-badge--high {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.recent-table__anomaly-badge--low {
  background: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
}

.recent-table__row--anomalous td:first-child {
  font-weight: 700;
}

body[data-theme="dark"] .recent-table__cell--high {
  background: color-mix(in srgb, #ef4444 18%, var(--color-surface));
}

body[data-theme="dark"] .recent-table__cell--low {
  background: color-mix(in srgb, #60a5fa 18%, var(--color-surface));
}

body[data-theme="dark"] .recent-table__anomaly-badge--high {
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

body[data-theme="dark"] .recent-table__anomaly-badge--low {
  background: rgba(96, 165, 250, 0.22);
  color: #bfdbfe;
}

.table-row--selectable:hover td {
  background: color-mix(in srgb, var(--accent, #2f89ff) 10%, transparent);
}

.inline-clear-field {
  position: relative;
  display: inline-flex;
  width: 100%;
}

.inline-clear-field > input {
  width: 100%;
}

.inline-clear-field__button {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.6rem;
  height: 1.6rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-panel, #101722) 70%, var(--accent, #2f89ff) 20%);
  color: inherit;
  cursor: pointer;
}

.feedback-trend-card__mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-text);
  border: 1px solid var(--filter-border);
  background: var(--filter-bg);
  border-radius: var(--filter-radius);
  min-height: 40px;
  padding: 0 12px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.feedback-trend-card__mode-toggle:focus-visible {
  outline: none;
  box-shadow: var(--filter-focus-ring);
}

.feedback-trend-card__mode-label {
  white-space: nowrap;
}

.feedback-trend-card__mode-toggle[aria-pressed="true"] {
  background: color-mix(in srgb, var(--color-accent) 16%, var(--filter-bg));
  border-color: color-mix(in srgb, var(--color-accent) 45%, var(--filter-border));
  color: var(--color-text);
}

.feedback-trend-card__metrics-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-trend-card__metrics-dropdown {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.feedback-trend-card__metrics-trigger {
  list-style: none;
  border: 1px solid var(--filter-border);
  background: var(--filter-bg);
  border-radius: var(--filter-radius);
  min-height: 40px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--color-text);
  cursor: pointer;
  width: 100%;
}

.feedback-trend-card__metrics-trigger::after {
  content: "▾";
  font-size: 0.74rem;
  color: var(--color-text-muted);
}

.feedback-trend-card__metrics-dropdown[open] .feedback-trend-card__metrics-trigger::after {
  content: "▴";
}

.feedback-trend-card__metrics-trigger::-webkit-details-marker {
  display: none;
}

.feedback-trend-card__metrics-menu {
  margin-top: 6px;
  border: 1px solid var(--filter-border);
  border-radius: var(--filter-radius);
  background: var(--color-surface);
  display: grid;
  gap: 6px;
  padding: 8px;
}

.feedback-trend-card__metrics-item {
  min-height: 32px;
  border: 1px solid var(--filter-border);
  border-radius: calc(var(--filter-radius) - 2px);
  background: var(--filter-bg);
  color: var(--color-text);
  text-align: left;
  padding: 0 10px;
  font-size: 0.82rem;
}

.feedback-trend-card__metrics-item[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--color-accent) 40%, var(--filter-border));
  background: color-mix(in srgb, var(--color-accent) 14%, var(--filter-bg));
}

.feedback-trend-card__hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted, #9cb0c3);
}

.feedback-trend-card__header {
  display: grid;
  gap: 12px;
}

.feedback-trend-card__topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 12px;
}

.feedback-trend-card__titles {
  min-width: 0;
}

.feedback-trend-card__actions {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.feedback-trend-summary {
  margin: 0;
}

.feedback-trend-card__filters {
  display: grid;
  grid-template-columns: minmax(15rem, 0.9fr) minmax(20rem, 1.35fr) minmax(15rem, 0.95fr);
  gap: 12px;
  align-items: stretch;
}

.feedback-trend-card__filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--filter-border);
  border-radius: calc(var(--filter-radius) + 4px);
  background: color-mix(in srgb, var(--color-surface-alt) 78%, var(--color-surface));
}

.feedback-trend-card__group-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.feedback-trend-card__group-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feedback-trend-card__filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.feedback-trend-card__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#feedbackTrendControls,
#feedbackTrendAggregationControls,
#feedbackTrendCompareControls {
  padding: 6px;
  border: 1px solid var(--filter-border);
  border-radius: var(--filter-radius);
  background: var(--color-surface-alt);
}

.feedback-trend-card__button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.84rem;
}

.feedback-trend-card__select {
  min-height: 34px;
  height: 34px;
}

@media (max-width: 900px) {
  .feedback-trend-card__topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .feedback-trend-card__actions {
    justify-content: flex-start;
  }

  .feedback-trend-card__filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .feedback-trend-card__metrics-row {
    flex-wrap: wrap;
  }

  .feedback-trend-card__metrics-dropdown,
  .feedback-trend-card__mode-toggle {
    width: 100%;
    flex: 1 1 100%;
  }

  .feedback-trend-card__button {
    flex: 1 1 calc(50% - 6px);
  }
}

@media (max-width: 1023px) {
  #gydytojaiFiltersMainRow.gydytojai-filters-main-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #gydytojaiFiltersMainRow.gydytojai-filters-main-row {
    grid-template-columns: 1fr;
  }
}
