* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-main);
}

body {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  min-height: 620px;
  margin: 0;
  overflow: hidden;
  background-color: var(--bg-main);
  background-image: linear-gradient(180deg, rgb(255 255 255 / 56%), transparent 250px);
  color: var(--text-primary);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.is-hidden {
  display: none !important;
}

.login-view {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top, #e8f5e9, var(--bg-main) 55%);
}

.login-card {
  width: min(100%, 430px);
  padding: 38px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--card-bg);
  box-shadow: var(--shadow-modal);
}

.login-logo {
  width: 190px;
  margin-bottom: 30px;
}

.login-card h1 {
  margin-bottom: 8px;
  font-size: 26px;
}

.login-subtitle {
  margin-bottom: 25px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.login-card label {
  display: block;
  margin: 16px 0 7px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-primary);
}

.password-input-wrap { position: relative; }
.password-input-wrap input { padding-right: 48px; }
.password-toggle { position: absolute; top: 50%; right: 8px; display: grid; width: 34px; height: 34px; transform: translateY(-50%); place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.password-toggle:hover { background: var(--bg-main); color: var(--text-primary); }
.password-toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.password-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.role-access-note { margin: 10px 0; color: var(--text-secondary); font-size: 12px; }

.login-submit {
  width: 100%;
  margin-top: 24px;
}

.login-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: #c62828;
  font-size: 12px;
}

.logout-button {
  margin-left: 8px;
  padding: 5px 8px;
  font-size: 11px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgb(46 125 50 / 35%);
  outline-offset: 2px;
}

.topbar {
  display: flex;
  flex: 0 0 76px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 36px;
  border-bottom: 1px solid var(--border-color);
  background: var(--card-bg);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 225px;
  height: 54px;
}

.brand img {
  display: block;
  width: auto;
  max-width: 225px;
  height: 50px;
  object-fit: contain;
  object-position: left center;
}

.topbar-actions,
.profile-chip,
.section-actions,
.section-title-line {
  display: flex;
  align-items: center;
}

.live-label span {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.topbar-actions {
  justify-content: flex-end;
  gap: 14px;
  min-width: 255px;
}

.profile-chip {
  gap: 9px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.profile-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgb(46 125 50 / 20%);
  border-radius: 50%;
  background: var(--code-chip-valid);
  color: var(--code-chip-valid-text);
  font-size: 11px;
}

.workspace {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  width: min(100%, 1600px);
  min-height: min-content;
  margin: 0 auto;
  padding: 28px 32px 32px;
}
.tab-panel.hidden { display: none !important; }
.tab-panel { animation: panel-enter 180ms ease-out both; }
@keyframes panel-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.page-heading,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-heading {
  flex: 0 0 auto;
  margin-bottom: 22px;
}

.page-heading h2 { margin: 0 0 5px; font-size: 24px; font-weight: 800; }

.eyebrow {
  margin: 0 0 7px;
  color: var(--bpjs-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

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

h1 {
  margin-bottom: 6px;
  font-size: 27px;
  font-weight: 800;
}

.page-subtitle {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.coverage-indicator {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 2px 4px;
}

.coverage-copy { display: grid; max-width: 240px; gap: 4px; }
.coverage-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.coverage-definition {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.coverage-indicator strong {
  color: var(--accent-blue);
  font-size: 16px;
}

.claims-section {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  margin-top: 22px;
}

.section-heading {
  align-items: center;
  flex: 0 0 auto;
  margin-bottom: 13px;
}

.section-title-line {
  gap: 10px;
}

.section-title-line h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.live-label span {
  width: 6px;
  height: 6px;
  flex-basis: 6px;
  background: #35a853;
}

.filter-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--card-bg);
}

.search-field {
  display: flex;
  flex: 1 1 380px;
  align-items: center;
  min-width: 180px;
  height: 40px;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text-secondary);
}

.search-field span {
  font-size: 18px;
  line-height: 1;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 11px;
}

.search-field input::placeholder {
  color: var(--text-secondary);
}

.filter-control {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: var(--text-secondary);
  font-size: 10px;
  white-space: nowrap;
}

.filter-control select {
  max-width: 136px;
  height: 36px;
  padding: 0 24px 0 9px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 11px;
}

.page-size-control select {
  min-width: 61px;
}

.toast-region {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 92px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--bpjs-primary);
  border-radius: 6px;
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
  color: var(--text-primary);
  font-size: 12px;
  animation: toast-in 180ms ease-out both;
}

.toast.is-error {
  border-left-color: var(--badge-upcoding);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-container {
  display: flex;
  width: 100%;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
}

.sidebar {
  display: flex;
  width: 260px;
  flex: 0 0 260px;
  flex-direction: column;
  padding: 22px 14px 15px;
  background: var(--sidebar-bg);
  color: #c8d5ce;
  overflow-x: hidden;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), flex-basis 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.logo-wrapper { display: flex; width: 100%; align-items: center; justify-content: flex-start; }
.logo-full {
  display: block;
  width: auto;
  max-width: 220px;
  height: 52px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  transition: transform 0.2s ease;
}
.logo-full:hover { transform: scale(1.02); }
.logo-collapsed { display: none; }

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  margin-top: 22px;
}

.nav-item {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #c8d5ce;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  transition: background-color 150ms ease, color 150ms ease;
}

.nav-item > svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: #95b3a0; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.nav-item:hover, .nav-item.active { background: rgb(255 255 255 / 11%); color: #fff; }
.nav-item.active > svg { stroke: #72d58b; }
.nav-label { overflow: hidden; text-overflow: ellipsis; }

.sidebar.collapsed { width: 72px; flex-basis: 72px; padding-right: 8px; padding-left: 8px; }
.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 4px 0 16px; min-height: 72px; }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-footer { display: none; }
.sidebar.collapsed .logo-wrapper { width: 100%; justify-content: center; }
.sidebar.collapsed .logo-full { display: none !important; }
.sidebar.collapsed .logo-collapsed {
  display: block !important;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
.sidebar.collapsed .nav-item { justify-content: center; gap: 0; padding: 0.75rem 0; }
.sidebar.collapsed .nav-item > svg { flex-basis: 22px; width: 22px; height: 22px; }

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 16px 8px 2px;
  border-top: 1px solid rgb(255 255 255 / 12%);
  color: #a7b9ae;
  font-size: 9px;
  font-weight: 700;
}

.sidebar-footer strong { margin-left: auto; color: #fff; }

.sidebar-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #35a853;
}

.main-content {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg-main);
}

.top-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 76px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 32px;
  border-bottom: 1px solid var(--border-color);
  background: var(--card-bg);
}

.header-left { display: flex; min-width: 0; align-items: center; gap: 14px; }
.sidebar-toggle { border-radius: 5px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.top-header .status-badge { display: inline-flex; min-width: 0; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.top-header .status-connected { background: var(--code-chip-valid); color: var(--code-chip-valid-text); }
.top-header .status-disconnected { background: var(--code-chip-invalid); color: var(--code-chip-invalid-text); }
.status-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #35a853; }
.status-dot.is-error { background: var(--badge-upcoding); }
.sidebar-toggle svg { display: block; width: 20px; height: 20px; }
.profile-chip { display: flex; align-items: center; gap: 8px; color: var(--text-primary); font-size: 12px; font-weight: 700; white-space: nowrap; }
.profile-role { padding: 4px 8px; border-radius: 999px; background: var(--code-chip-valid); color: var(--code-chip-valid-text); font-size: 10px; font-weight: 700; }
.profile-avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: var(--code-chip-valid); color: var(--code-chip-valid-text); font-size: 10px; }

@media (max-width: 900px) {
  .topbar { padding: 0 20px; }
  .workspace { padding: 20px; }
  .topbar-actions { margin-left: auto; }
  .sidebar { width: 260px; flex-basis: 260px; }
  .top-header { padding: 10px 20px; }
  .filter-bar { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .claims-section { margin-top: 16px; }
}

@media (max-width: 640px) {
  body { height: 100vh; min-height: 0; overflow: hidden; }
  .app-container { min-height: 0; flex-direction: column; }
  .sidebar { width: 100%; flex: 0 0 auto; gap: 12px; padding: 8px 10px 0; }
  .sidebar-brand { min-height: 42px; padding: 0 4px 7px; border: 0; }
  .logo-full { height: 36px; }
  .logo-collapsed { height: 34px; }
  .sidebar-footer { display: none; }
  .sidebar-nav { display: flex; gap: 4px; margin: 0 -10px; padding: 0 10px 8px; overflow-x: auto; scrollbar-width: none; }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .nav-item { min-height: 38px; flex: 0 0 auto; gap: 6px; padding: 0 9px; font-size: 10px; white-space: nowrap; }
  .nav-item > span { width: 16px; font-size: 15px; }
  .main-content { min-height: 0; }
  .sidebar.collapsed { width: 100%; flex: 0 0 auto; }
  .sidebar.collapsed .sidebar-brand { justify-content: flex-start; }
  .sidebar.collapsed .sidebar-nav { justify-content: flex-start; }
  .top-header { min-height: 58px; padding: 8px 14px; }
  .header-left { gap: 8px; }
  .top-header .status-badge { max-width: min(54vw, 300px); padding: 7px 8px; font-size: 9px; }
  .top-header .status-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-right { gap: 7px; }
  .profile-name { display: none; }
  .workspace { width: 100%; padding: 17px 14px 28px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; }
  h1 { font-size: 21px; }
  .coverage-indicator { width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 0; }
  .coverage-copy { max-width: none; flex: 1 1 auto; text-align: left; }
  .section-heading { align-items: flex-start; }
  .section-actions { gap: 6px; }
  .section-actions .button-quiet { width: 38px; overflow: hidden; gap: 0; padding: 0; font-size: 0; }
  .section-actions .button-quiet span { font-size: 18px; }
  .section-actions .button-primary { min-height: 36px; padding: 0 9px; font-size: 10px; }
  .filter-bar { gap: 7px; padding: 8px; }
  .filter-control { flex: 1 1 42%; justify-content: space-between; padding: 0 3px; }
  .filter-control select { max-width: 120px; }
  .page-size-control { flex: 0 0 auto; }
  .table-frame { min-height: 430px; }
  .toast-region { right: 14px; bottom: 80px; }
}

.compact-heading { margin-bottom: 10px; }
.compact-heading h2 { margin: 0; font-size: 14px; }
.manual-form-section, .work-section, .report-panel, .report-summary {
  margin-bottom: 20px;
  padding: 17px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
}
.manual-form-section { margin-top: 14px; margin-bottom: 0; padding: 0; }
.manual-form-toggle {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}
.manual-form-toggle:hover { color: var(--bpjs-primary); }
.manual-form-toggle-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--bpjs-primary);
  font-size: 19px;
  line-height: 1;
  transition: transform 180ms ease;
}
.manual-form-toggle[aria-expanded="true"] .manual-form-toggle-icon { transform: rotate(45deg); }
.manual-form-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height 260ms ease, opacity 180ms ease, visibility 0s linear 260ms;
}
.manual-form-panel.is-open {
  max-height: 480px;
  opacity: 1;
  visibility: visible;
  transition: max-height 260ms ease, opacity 180ms ease;
}
.manual-form-panel-inner { padding: 14px 16px 16px; }
.manual-form-panel-inner > p { margin: 0 0 12px; color: var(--text-secondary); font-size: 11px; }
.manual-form-section:has(.manual-form-panel.is-open) { border: 1px solid var(--border-color); border-radius: 7px; background: var(--card-bg); box-shadow: var(--shadow-soft); }
.manual-claim-form {
  display: grid;
  grid-template-columns: minmax(100px, 0.9fr) minmax(180px, 1.8fr) minmax(125px, 1fr) minmax(90px, 0.65fr) minmax(125px, 1fr) auto;
  align-items: end;
  gap: 10px;
}
.manual-claim-form label, .batch-form label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
}
.manual-claim-form input, .manual-claim-form select, .batch-form input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 11px;
}
.manual-claim-form .button { min-height: 38px; white-space: nowrap; }
.manual-result { margin-top: 12px; padding: 11px 13px; border-left: 3px solid var(--bpjs-primary); background: var(--surface-muted); font-size: 12px; }
.manual-result.is-error { border-color: var(--badge-upcoding); }
.batch-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.8fr); align-items: start; gap: 14px; }
.batch-layout > .work-section { margin-bottom: 0; }
.batch-result-table-section { margin-top: 22px; }
.batch-result-table-section .section-heading { margin-bottom: 12px; }
.batch-size-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; }
.batch-size-chip {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}
.batch-size-chip:hover, .batch-size-chip.is-active { border-color: var(--bpjs-primary); background: var(--code-chip-valid); color: var(--code-chip-valid-text); }
.batch-form { display: flex; align-items: end; gap: 10px; max-width: 560px; }
.batch-form label { flex: 1 1 auto; }
.batch-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.batch-result-item { padding: 13px; border: 1px solid var(--border-color); border-radius: 5px; background: var(--surface-muted); }
.batch-result-item span { display: block; color: var(--text-secondary); font-size: 9px; }
.batch-result-item strong { display: block; margin-top: 6px; font-size: 17px; }
.batch-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border-color); }
.batch-summary-item span { display: block; color: var(--text-secondary); font-size: 10px; }
.batch-summary-item strong { display: block; margin-top: 4px; color: var(--text-primary); font-size: 14px; }
.model-performance h2 { margin: 0 0 15px; font-size: 14px; }
.model-performance dl { display: grid; gap: 13px; margin: 0; }
.model-performance dl > div { display: grid; grid-template-columns: 1fr; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }
.model-performance dl > div:last-child { padding-bottom: 0; border: 0; }
.model-performance dt { color: var(--text-secondary); font-size: 10px; font-weight: 700; }
.model-performance dd { margin: 0; color: var(--text-primary); font-size: 12px; font-weight: 700; line-height: 1.5; }
/* Enhanced Analytics & Medical Intelligence Dashboard */
.analytics-heading-actions { display: flex; align-items: center; gap: 10px; }
.analytics-kpis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.analytics-kpi-card {
  padding: 16px 18px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.analytics-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.analytics-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--kpi-accent, var(--bpjs-primary));
}
.analytics-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.analytics-kpi-title {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.analytics-kpi-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text-secondary);
}
.analytics-kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.analytics-kpi-sub {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.analytics-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
}
.analytics-filters-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.analytics-filter-select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
}
.analytics-chip-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.analytics-chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.analytics-chip:hover {
  border-color: var(--bpjs-primary);
  color: var(--text-primary);
}
.analytics-chip.is-active {
  background: var(--sidebar-bg);
  color: #fff;
  border-color: var(--sidebar-bg);
}

.analytics-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}
.analytics-chart-card {
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}
.analytics-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.analytics-chart-header h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}
.analytics-chart-subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}
.analytics-chart-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--bpjs-primary);
  white-space: nowrap;
}
.chart-container-large {
  position: relative;
  height: 290px;
  width: 100%;
}

.clinical-insights-section {
  margin-bottom: 22px;
}
.clinical-insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.clinical-insight-card {
  padding: 16px 18px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
  border-left: 4px solid var(--insight-accent, #3b82f6);
  position: relative;
}
.clinical-insight-icon {
  font-size: 18px;
  margin-bottom: 8px;
  display: inline-block;
}
.clinical-insight-card h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}
.clinical-insight-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.clinical-insight-stat {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
}

.high-impact-section {
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
}
.high-impact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.high-impact-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.high-impact-header p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.report-context-grid { margin-top: 14px; }
.report-panel h3 { margin: 0 0 14px; font-size: 15px; }
.report-method-intro { margin: 0 0 12px; color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.report-method-list { display: grid; gap: 11px; margin: 0; padding-left: 21px; color: var(--text-primary); font-size: 13px; line-height: 1.6; }
.report-method-list strong { color: var(--bpjs-primary); }
.report-context-meta { margin: 13px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.report-source-list { display: grid; gap: 0; margin: 12px 0 0; padding: 0; list-style: none; }
.report-source-list li { padding: 9px 0; border-bottom: 1px solid var(--border-color); color: var(--text-primary); font-size: 13px; line-height: 1.45; }
.report-source-list li:last-child { border-bottom: 0; }
.chart-wrap { position: relative; height: 270px; }
.report-summary { color: var(--text-secondary); font-size: 13px; line-height: 1.65; }
.assistant-workspace { min-height: 0; height: calc(100vh - 76px); flex: 1 1 auto; padding: 0; }
.rag-status { color: var(--text-secondary); font-size: 11px; }
.assistant-panel { display: flex; min-height: 0; height: calc(100vh - 75px); flex-direction: column; overflow: hidden; border: 1px solid var(--border-color); border-radius: 7px; background: var(--card-bg); }
.assistant-panel .chat-header { flex: 0 0 60px; }
.assistant-panel .chat-messages { flex: 1 1 auto; overflow-y: auto; padding: 1.5rem; gap: 14px; }

@media (max-width: 900px) {
  .manual-claim-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .batch-layout { grid-template-columns: minmax(0, 1fr); }
  .analytics-kpis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-charts-grid { grid-template-columns: 1fr; }
  .clinical-insights-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .manual-claim-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-claim-form .notes-field { grid-column: 1 / -1; }
  .manual-claim-form .button { grid-column: 1 / -1; }
  .report-grid { grid-template-columns: 1fr; }
  .chart-wrap { height: 220px; }
  .chart-container-large { height: 230px; }
  .analytics-kpis-grid { grid-template-columns: 1fr; }
  .analytics-filter-bar { flex-direction: column; align-items: stretch; }
  .analytics-filters-left { flex-direction: column; align-items: stretch; }
  .analytics-filter-select { width: 100%; }
  .batch-form { align-items: stretch; flex-direction: column; }
  .batch-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-summary { grid-template-columns: 1fr; }
  .assistant-workspace { height: auto; flex: 1 1 auto; padding: 0 14px 14px; }
  .assistant-panel { height: 100%; min-height: 320px; }
  .manual-form-panel.is-open { max-height: 760px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
