/* Self-hosted Inter (variable) — no internet dependency */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --ink: #1d2433;
  --muted: #667085;
  --line: #d7dde8;
  --bg: #f4f6f8;
  --panel: #fff;
  --accent: #146c94;
  --accent2: #2f7d57;
  --warn: #b42318;
  --good: #157347;
  --accent-d: #0f5575;
  --sidebar: #fff;
  --sidebar-ink: #1f2937;
  --sidebar-muted: #667085;
  --sidebar-line: #e5e7eb;
  --sidebar-active: #f3f4f6;
  --sidebar-hover: #f8fafc;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow-sm:
    0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.04);
  --shadow-md:
    0 6px 16px rgba(16, 24, 40, 0.08), 0 2px 6px rgba(16, 24, 40, 0.05);
  --ring: 0 0 0 3px rgba(20, 108, 148, 0.18);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
.shell {
  display: block;
  --side-w: 264px;
  --appbar-h: 72px;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
}
.shell > * {
  min-width: 0;
}
.shell.side-anim {
  transition: none;
}
.shell.side-anim .side,
.shell.side-anim .main,
.shell.side-anim .appbar {
  transition:
    width 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    margin-left 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    left 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}
.shell.side-collapsed {
  --side-w: 76px;
}
.side {
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  color: var(--sidebar-ink);
  padding: 14px 12px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--side-w);
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid var(--sidebar-line);
  box-shadow: 1px 0 0 rgba(16, 24, 40, 0.02);
  z-index: 240;
}
.side-head {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 0px 12px 0px;
  margin-bottom: 0px;
  border-bottom: 1px solid var(--sidebar-line);
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  font-weight: 700;
  font-size: 15px;
  color: #111827;
  letter-spacing: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #0b74ea;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.brand-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.side-toggle {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--sidebar-line);
  color: #64748b;
  cursor: pointer;
  box-shadow: none;
}
.side-toggle:hover {
  background: var(--sidebar-hover);
  color: #111827;
}
.side-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-toggle-icon-menu,
.side-toggle-icon-close {
  display: none;
}
.appbar-icon-button .side-toggle-icon-menu {
  display: none;
}
.appbar-icon-button .side-toggle-icon-collapse {
  display: block;
}
.side-overlay {
  display: none;
}
body.side-drawer-open {
  overflow: hidden;
}
.shell.side-anim .side-toggle {
  transition:
    background 0.15s ease,
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0;
  min-height: 0;
}
.nav-section-label {
  padding: 8px 10px 6px;
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 7px;
  color: #334155;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid transparent;
  letter-spacing: 0;
}
.nav a:hover {
  background: var(--sidebar-hover);
  color: #111827;
  border-color: #eef2f7;
}
.nav a.active {
  background: #0b74ea;
  color: #ffffff;
  border-color: #0b74ea;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.nav a.active::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 99px;
  background: #ffffff;
}
.nav a.active .nav-label {
  color: #ffffff;
}
.nav-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #64748b;
}
.nav a.active .nav-ico {
  color: #ffffff;
}
.nav-ico svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--sidebar-line);
}
.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.side-user-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #e8f2f7;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.side-user-text {
  min-width: 0;
}
.side-user-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.side-user-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--sidebar-muted);
  font-size: 11px;
  line-height: 1.25;
}
.shell.side-anim .brand-text,
.shell.side-anim .nav-label,
.shell.side-anim .nav-section-label,
.shell.side-anim .side-user-text {
  transition: opacity 0.14s ease;
}
.shell.side-collapsed .side-head {
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.shell.side-collapsed .brand {
  flex: 0 0 auto;
  gap: 0;
  justify-content: center;
}
.shell.side-collapsed .brand-text,
.shell.side-collapsed .nav-label,
.shell.side-collapsed .nav-section-label,
.shell.side-collapsed .side-user-text {
  opacity: 0;
  width: 0;
  height: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}
.shell.side-collapsed .side-toggle {
  transform: rotate(180deg);
}
.shell.side-collapsed .nav a {
  justify-content: center;
  padding: 9px;
}
.shell.side-collapsed .nav a.active::before {
  left: 3px;
  height: 16px;
}
.shell.side-collapsed .side-user {
  justify-content: center;
  padding: 7px;
}
.shell.side-collapsed .nav a[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  z-index: 60;
  pointer-events: none;
}
.shell.side-collapsed .nav a[data-tip]:hover::before {
  content: "";
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #111827;
  z-index: 60;
}
.main {
  padding: 15px;
  width: calc(100% - var(--side-w));
  max-width: calc(100vw - var(--side-w));
  margin: 0 0 0 var(--side-w);
  min-width: 0;
  box-sizing: border-box;
}
.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--appbar-h);
  height: var(--appbar-h);
  margin: 0;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: fixed;
  top: 0;
  left: var(--side-w);
  right: 0;
  z-index: 200;
  overflow: visible;
}
.app-outlet {
  position: relative;
  min-width: 0;
  max-width: 100%;
  padding-top: var(--appbar-h);
  overflow-x: clip;
}
.app-page-content {
  min-width: 0;
  max-width: 100%;
}
@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}
.skeleton {
  background: #e9edf2;
  border-radius: var(--radius-sm);
  animation: skeleton-pulse 1.8s ease-in-out infinite;
}
.skeleton-kpi-card {
  height: 92px;
}
.skeleton-chart-fill {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 390px;
}
.skeleton-table-fill {
  height: 320px;
}
.skeleton-chart-groups {
  height: 480px;
}
.dashboard-trend-chart .skeleton-chart-fill {
  min-height: 480px;
}
.dashboard-rank-chart .skeleton-chart-fill {
  min-height: 390px;
}
.chart-head-meta {
  min-height: 1.35em;
}
.skeleton-meta-line {
  display: inline-block;
  width: 280px;
  height: 14px;
  vertical-align: middle;
}
.is-slot-loading {
  position: relative;
}
.slot-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: var(--radius-sm);
}
.dashboard-trend-chart.is-slot-loading,
.dashboard-rank-chart.is-slot-loading,
#icdRiskTable,
#coderRiskTable,
#icdComparisonMatrixTable {
  position: relative;
}
#icdRiskTable,
#coderRiskTable {
  min-height: 320px;
}
#icdComparisonMatrixTable {
  min-height: 0;
}
.skeleton-icd-comparison-fill {
  height: 560px;
}
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }
}
.appbar-left,
.appbar-crumbs,
.appbar-user {
  display: flex;
  align-items: center;
  min-width: 0;
}
.appbar-left {
  gap: 16px;
}
.appbar-icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #fff;
  color: #374151;
  box-shadow: none;
}
.appbar-icon-button:hover {
  background: #f8fafc;
  border-color: #e5e7eb;
  color: #111827;
  filter: none;
  box-shadow: none;
}
.appbar-icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.appbar-crumbs {
  gap: 12px;
  color: #667085;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.appbar-crumbs a:hover {
  color: #111827;
}
.appbar-crumb-sep {
  display: grid;
  place-items: center;
  color: #9ca3af;
}
.appbar-crumb-sep svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.appbar-current {
  color: #111827;
  font-weight: 600;
}
.appbar-user-menu {
  position: relative;
  flex: 0 0 auto;
  z-index: 210;
  width: max-content;
}
.appbar-user {
  gap: 8px;
  border: 1px solid #eef2f7;
  background: #fbfcfd;
  color: #111827;
  padding: 6px 8px;
  border-radius: 8px;
  box-shadow: none;
  cursor: pointer;
  min-width: 0;
  width: 100%;
}
.appbar-user:hover {
  filter: none;
  box-shadow: none;
  background: #f8fafc;
  border-color: #e5e7eb;
}
.appbar-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #0b74ea;
  color: white;
  font-size: 13px;
  font-weight: 800;
}
.appbar-user-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: left;
}
.appbar-user-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  color: #111827;
}
.appbar-user-email {
  font-size: 11px;
  color: #667085;
  line-height: 1.2;
}
.appbar-user-chevron {
  display: grid;
  place-items: center;
  color: #111827;
  margin-left: 0;
}
.appbar-user-chevron svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.appbar-user-menu.is-open .appbar-user-chevron svg {
  transform: rotate(180deg);
}
.appbar-user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  width: 100%;
  min-width: 100%;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow:
    0 14px 26px rgba(16, 24, 40, 0.12),
    0 3px 8px rgba(16, 24, 40, 0.06);
  overflow: hidden;
  z-index: 220;
}
.appbar-user-menu.is-open .appbar-user-dropdown {
  display: block;
}
.appbar-user-menu.is-open .appbar-user {
  border-bottom-color: transparent;
  border-radius: 8px 8px 0 0;
  background: #fff;
}
.appbar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 0;
  background: #fff;
  color: #b42318;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  box-shadow: none;
}
.appbar-logout svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.appbar-logout:hover {
  background: #fff1f0;
  filter: none;
  box-shadow: none;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.topbar h1 {
  font-size: 24px;
  margin: 0;
}
.sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.grid {
  display: grid;
  gap: 14px;
}
.kpis {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}
.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.kpi .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}
.kpi .value {
  font-size: 27px;
  font-weight: 700;
  margin-top: 8px;
}
.good {
  color: var(--good);
}
.bad {
  color: var(--warn);
}
button,
.btn {
  border: 0;
  border-radius: 6px;
  background: #0b74ea;
  color: white;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}
button.secondary {
  background: #0b74ea;
}
button.danger {
  background: var(--warn);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
input,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
.filters {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  align-items: end;
  margin-bottom: 14px;
}
.field label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.dashboard-period-filter-grid {
  align-items: end;
}
.multi-select {
  position: relative;
}
.multi-select-trigger {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 36px 10px 10px;
  text-align: left;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.multi-select-trigger::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  border: solid #667085;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-65%) rotate(45deg);
}
.multi-select.is-open .multi-select-trigger::after {
  transform: translateY(-25%) rotate(225deg);
}
.multi-select-menu {
  display: none;
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(16, 24, 40, 0.16);
}
.multi-select.is-open .multi-select-menu {
  display: block;
}
.multi-select-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.multi-select-option:hover {
  background: #eef6f8;
}
.multi-select-option input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}
.multi-select-option.all-option {
  font-weight: 700;
  border-bottom: 1px solid #edf0f4;
  border-radius: 6px 6px 0 0;
  margin-bottom: 4px;
}
.analysis-filter-panel {
  margin-bottom: 14px;
}
.filter-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.filter-panel-head h2 {
  font-size: 18px;
  margin: 0;
}
.filter-panel-head .filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.filter-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(300px, 1fr) minmax(
      300px,
      1fr
    );
  gap: 18px;
}
.filter-block {
  min-width: 0;
}
.filter-block-title {
  font-size: 12px;
  font-weight: 800;
  color: #475467;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.filter-fields {
  display: grid;
  gap: 12px;
}
.filter-fields.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.filter-fields.period-fields {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 0.92fr);
}
.is-hidden {
  display: none !important;
}
.filter-note {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.analysis-control-panel {
  padding: 18px;
}
.analysis-control-panel .filter-layout {
  gap: 14px;
}
.analysis-control-panel .filter-block {
  border: 1px solid #e3e8ef;
  background: #fbfcfd;
  border-radius: 8px;
  padding: 12px;
}
.analysis-control-panel .filter-block-title {
  margin-bottom: 12px;
}
.analysis-control-panel input,
.analysis-control-panel select,
.analysis-control-panel .multi-select-trigger {
  border-color: #cfd8e3;
}
.analysis-control-panel input:focus,
.analysis-control-panel select:focus,
.analysis-control-panel .multi-select-trigger:focus {
  outline: 2px solid rgba(20, 108, 148, 0.16);
  outline-offset: 1px;
  border-color: var(--accent);
}
.analysis-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.analysis-filter-actions button {
  min-height: 38px;
}
.analysis-kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  border: 1px solid #d8e1ec;
  border-radius: 14px;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.06),
    0 2px 6px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.analysis-kpi-card::before,
.analysis-period-kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 3px;
  background: #98a2b3;
}
.analysis-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.analysis-kpi-card .label,
.analysis-period-kpi .period-kpi-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #5f6b7a;
}
.analysis-kpi-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid #dde6f0;
  border-radius: 10px;
  background: #f3f7fb;
  color: #475467;
}
.analysis-kpi-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.analysis-kpi-quality .analysis-kpi-icon {
  color: #157347;
  background: #effaf3;
  border-color: #c8efd5;
}
.analysis-kpi-risk .analysis-kpi-icon {
  color: #b42318;
  background: #fff1f0;
  border-color: #fecdca;
}
.analysis-kpi-volume .analysis-kpi-icon {
  color: #146c94;
  background: #eef7fb;
  border-color: #cbe4ef;
}
.analysis-kpi-card .value {
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-top: 10px;
}
.analysis-kpi-card:hover,
.analysis-period-kpi:hover {
  transform: translateY(-2px);
  border-color: #c8d7e7;
  box-shadow:
    0 14px 28px rgba(15, 23, 42, 0.09),
    0 4px 10px rgba(15, 23, 42, 0.06);
}
.analysis-kpi-quality::before {
  background: #74c69d;
}
.analysis-kpi-risk::before {
  background: #f28482;
}
.analysis-kpi-volume::before {
  background: #6baed6;
}
.analysis-kpi-scope::before {
  background: #8a97a8;
}
.analysis-kpi-quality .value,
.analysis-kpi-quality .period-kpi-value {
  color: #157347;
}
.analysis-kpi-risk .value,
.analysis-kpi-risk .period-kpi-value {
  color: #b42318;
}
.analysis-period-kpis {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  margin: 6px 0 8px;
}
.analysis-period-kpi {
  position: relative;
  overflow: hidden;
  min-height: 108px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
  border: 1px solid #d8e1ec;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.analysis-period-kpi .period-kpi-value {
  font-size: 28px;
  margin-top: 8px;
}
.analysis-export-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  flex: 0 0 auto;
}
.export-icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  flex: 0 0 auto;
}
.analysis-export-icon.is-exporting {
  opacity: 0.7;
}
.export-icon-button.is-exporting {
  opacity: 0.7;
}
.analysis-export-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.export-icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  color: #475467;
  background: #f8fafc;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #eef3f7 0%, #dfe8ee 52%, #f7f9fb 100%);
}
.login-box {
  width: min(430px, 94vw);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d9e1ea;
  border-radius: 10px;
  padding: 28px;
  box-shadow:
    0 24px 54px rgba(16, 24, 40, 0.16),
    0 3px 10px rgba(16, 24, 40, 0.08);
}
.login-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e6ebf2;
}
.login-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #e9f6f8;
  color: var(--accent);
  border: 1px solid #cbe4ef;
  flex: 0 0 auto;
}
.login-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.login-box h1 {
  margin: 0 0 3px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  color: #101828;
}
.login-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.login-form .field label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475467;
  font-weight: 800;
}
.login-form input {
  height: 44px;
  border-color: #cfd8e3;
  background: #fbfcfd;
}
.login-form input:focus {
  background: #fff;
}
.login-submit {
  height: 44px;
  margin-top: 2px;
  font-size: 14px;
}
.message {
  margin-top: 2px;
  color: var(--warn);
  min-height: 20px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
}
.chart {
  height: 340px;
}
.upload-zone {
  border: 1px dashed #98a2b3;
  border-radius: 8px;
  padding: 24px;
  background: #fbfcfd;
}
@media (max-width: 980px) {
  .shell,
  .shell.side-collapsed {
    --side-w: 0px;
    --appbar-h: 56px;
  }
  .side-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    z-index: 280;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.22s ease,
      visibility 0.22s ease;
  }
  .shell.side-open .side-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(288px, 86vw);
    height: 100vh;
    height: 100dvh;
    transform: translateX(-105%);
    z-index: 300;
    box-shadow: none;
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .shell.side-open .side {
    transform: translateX(0);
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.14);
  }
  .side-head {
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
  }
  .side-toggle {
    display: grid;
  }
  .side-toggle-icon-collapse {
    display: none;
  }
  .side-toggle-icon-close {
    display: block;
  }
  .appbar-icon-button .side-toggle-icon-collapse {
    display: none;
  }
  .appbar-icon-button .side-toggle-icon-menu {
    display: block;
  }
  .nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-section-label {
    display: block;
  }
  .nav a {
    justify-content: flex-start !important;
    padding: 11px 12px !important;
  }
  .shell.side-collapsed .brand-text,
  .shell.side-collapsed .nav-label {
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    pointer-events: auto !important;
  }
  .shell.side-collapsed .nav a[data-tip]:hover::after,
  .shell.side-collapsed .nav a[data-tip]:hover::before {
    display: none;
  }
  .kpis,
  .two,
  .three,
  .filters {
    grid-template-columns: 1fr;
  }
  .main {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
    padding: 12px;
  }
  .appbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0 0 12px;
    padding: 0 12px;
    min-height: var(--appbar-h);
    height: var(--appbar-h);
    z-index: 220;
  }
  .app-outlet {
    padding-top: 0;
  }
  .app-page-content {
    padding: 0;
  }
  .topbar {
    align-items: center;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }
  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .card {
    padding: 14px;
  }
  .chart {
    height: min(300px, 58vw);
    min-height: 240px;
  }
  .table-scroll,
  .coder-table-scroll,
  .chase-detail-scroll,
  .icd-detail-scroll {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .app-data-table {
    min-width: 520px;
  }
  .dashboard-trend-chart,
  .dashboard-rank-chart,
  .trend-chart,
  .icd-error-chart,
  .icd-period-chart,
  .coder-period-chart,
  .per-icd-chart {
    height: min(380px, 72vw);
    min-height: 260px;
  }
  .upload-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .upload-workspace {
    grid-template-columns: 1fr;
  }
}
.analysis-filters {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  align-items: end;
}
.filter-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}
.searchbox {
  position: relative;
}
.search-results {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.14);
  max-height: 240px;
  overflow: auto;
}
.search-results:empty {
  display: none;
}
.search-results button {
  display: block;
  width: 100%;
  background: white;
  color: var(--ink);
  text-align: left;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  font-weight: 500;
}
.search-results button:hover {
  background: #eef6f8;
}
.search-hint {
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}
.trend-kpis {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  margin: 14px 0;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 8px;
}
.chart-head h2 {
  font-size: 18px;
  margin: 0;
}
.loading {
  color: var(--accent);
  font-weight: 700;
}
.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
}
.trend-chart {
  height: 440px;
}
.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}
.status-bad {
  background: #fee4e2;
  color: #912018;
}
.status-good {
  background: #dcfae6;
  color: #05603a;
}
.priority-row {
  background: #fff7f6;
}
@media (max-width: 1180px) {
  .analysis-filters,
  .trend-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-actions {
    grid-column: 1/-1;
  }
}
@media (max-width: 700px) {
  .analysis-filters,
  .trend-kpis {
    grid-template-columns: 1fr;
  }
  .filter-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .chart-head {
    flex-direction: column;
  }
  .trend-chart {
    height: 360px;
  }
}
.pagination-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
}
.pager {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pagination-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.page-size-control select {
  min-height: 34px;
  min-width: 76px;
}
.icd-table-pagination {
  align-items: center;
}

/* ICD table pagination bar (redesigned) */
.icd-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
}
.icd-pagination-info {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.icd-pagination-pagesize {
  min-height: 32px;
  width: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-weight: 600;
  color: var(--ink);
  background-color: #fff;
}
.icd-pagination-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.icd-pagination-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.icd-pagination-nav button {
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.icd-pagination-nav button:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.icd-pagination-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.icd-pagination-page {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 2px;
}
.icd-pagination-total {
  white-space: nowrap;
}
.icd-pagination-pageselect {
  min-height: 30px;
  width: 72px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  font-weight: 700;
  color: var(--ink);
  background-color: #fff;
}
@media (max-width: 640px) {
  .icd-pagination {
    justify-content: center;
  }
  .icd-pagination-nav {
    width: 100%;
    justify-content: center;
  }
}
.icd-sections {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.icd-section {
  padding: 18px;
}
.icd-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.icd-section-head h2 {
  font-size: 18px;
  margin: 0;
}
.icd-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.icd-metrics span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: #fbfcfd;
  font-size: 12px;
}
.per-icd-chart {
  height: 300px;
}
.icd-section h3 {
  font-size: 15px;
  margin: 14px 0 8px;
}
.table-scroll {
  overflow: auto;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.table-scroll table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
@media (max-width: 900px) {
  .pagination-bar,
  .icd-section-head {
    flex-direction: column;
    align-items: stretch;
  }
  .page-size-control {
    justify-content: space-between;
  }
  .icd-metrics {
    justify-content: flex-start;
  }
  .pager button {
    flex: 1;
  }
  .per-icd-chart {
    height: 280px;
  }
}
.sortable-help {
  margin-bottom: 8px;
}
.sortable-table th {
  padding: 0;
}
.expandable-row {
  cursor: pointer;
}
.expandable-row:hover {
  background: #eef6f8;
}
.expand-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  background: #475467;
}
.detail-row td {
  padding: 0;
  background: #fbfcfd;
}
.detail-panel {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.detail-title {
  font-weight: 700;
  margin-bottom: 8px;
}
.chase-detail-scroll,
.icd-detail-scroll {
  max-height: 300px;
  background: white;
}
.icd-filter-grid,
.coder-filter-grid {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}
.icd-kpis {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  margin: 14px 0;
}
.coder-kpis {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  margin: 14px 0;
}
.project-kpis {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  margin: 14px 0;
}
.icd-error-chart {
  height: 455px;
}
.icd-chart-groups,
.coder-chart-groups {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.icd-period-card,
.coder-period-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  min-width: 0;
  overflow: hidden;
}
.icd-period-title,
.coder-period-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 3px;
}
.icd-period-chart,
.coder-period-chart {
  height: 430px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.coder-table-scroll {
  max-height: 560px;
}
.period-card-head,
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.period-card-head {
  margin-bottom: 4px;
}
.table-toolbar {
  margin-bottom: 12px;
}
.table-toolbar .sortable-help {
  margin-bottom: 0;
}
button.export-button {
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  background: #475467;
}
button.export-button:hover {
  background: #344054;
}
.period-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0 8px;
}
.period-kpi {
  border: 1px solid #e3e8ef;
  background: #fbfcfd;
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}
.period-kpi-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.period-kpi-value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 5px;
  color: var(--ink);
}
.period-chart-note {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 0;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}
.period-chart-note span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dashboard-rank-note {
  margin-top: -4px;
}
.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}
.legend-good {
  background: #74c69d;
}
.legend-bad {
  background: #f28482;
}
.coder-fallback-chart {
  height: auto;
  min-height: 260px;
  padding: 12px 4px;
  display: grid;
  gap: 8px;
}
.fallback-bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 280px) 1fr 96px;
  gap: 10px;
  align-items: center;
}
.fallback-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.fallback-bar-track {
  height: 20px;
  background: #eef2f6;
  border-radius: 6px;
  overflow: hidden;
}
.fallback-bar {
  height: 100%;
  border-radius: 6px;
}
.fallback-good {
  background: #74c69d;
}
.fallback-bad {
  background: #f28482;
}
.fallback-bar-value {
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.dashboard-filter-panel {
  margin-bottom: 14px;
}
.dashboard-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.dashboard-kpis {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  margin: 14px 0;
}
.dashboard-kpi .value {
  font-size: 24px;
}
.dashboard-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.dashboard-highlight {
  border: 1px solid var(--line);
  border-left: 4px solid #98a2b3;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}
.dashboard-highlight.highlight-good {
  border-left-color: #74c69d;
}
.dashboard-highlight.highlight-bad {
  border-left-color: #f28482;
}
.highlight-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}
.highlight-value {
  font-size: 20px;
  font-weight: 800;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.highlight-detail {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.35;
}
.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}
.dashboard-chart-grid > .card,
.dashboard-table-grid > .card {
  min-width: 0;
}
.dashboard-wide-card {
  grid-column: 1/-1;
}
.dashboard-trend-chart-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: #aebed0 #edf2f7;
  scrollbar-width: thin;
}
.dashboard-trend-chart-scroll::-webkit-scrollbar {
  height: 9px;
}
.dashboard-trend-chart-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #edf2f7;
}
.dashboard-trend-chart-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #edf2f7;
  border-radius: 999px;
  background: #aebed0;
}
.dashboard-trend-chart-scroll::-webkit-scrollbar-thumb:hover {
  background: #8496aa;
}
.dashboard-trend-chart {
  position: relative;
  height: 480px;
  min-width: 100%;
  overflow: hidden;
}
.dashboard-rank-chart {
  position: relative;
  height: 390px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.small-link {
  padding: 8px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.btn.secondary {
  background: #0b74ea;
  color: #fff;
}
.section-title {
  font-size: 18px;
  margin: 0;
}
.dashboard-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
  min-width: 0;
}
.dashboard-table-scroll {
  max-height: 430px;
}
.dashboard-control-panel {
  padding: 18px;
}
.dashboard-control-panel .dashboard-filter-grid {
  gap: 14px;
}
.dashboard-control-panel .field {
  border: 1px solid #e3e8ef;
  background: #fbfcfd;
  border-radius: 8px;
  padding: 10px;
}
.dashboard-control-panel .field label {
  font-weight: 800;
  color: #475467;
  text-transform: uppercase;
  letter-spacing: 0;
}
.dashboard-control-panel input,
.dashboard-control-panel select,
.dashboard-control-panel .multi-select-trigger {
  border-color: #cfd8e3;
  background: #fff;
}
.dashboard-control-panel input:focus,
.dashboard-control-panel select:focus,
.dashboard-control-panel .multi-select-trigger:focus {
  outline: 2px solid rgba(20, 108, 148, 0.16);
  outline-offset: 1px;
  border-color: var(--accent);
}
.dashboard-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.dashboard-filter-actions button {
  min-height: 38px;
}
.dashboard-kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  border: 1px solid #d8e1ec;
  border-radius: 14px;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.06),
    0 2px 6px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.dashboard-kpi-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 3px;
  background: #98a2b3;
}
.dashboard-kpi-quality::before {
  background: #74c69d;
}
.dashboard-kpi-risk::before {
  background: #f28482;
}
.dashboard-kpi-volume::before {
  background: #6baed6;
}
.dashboard-kpi-scope::before {
  background: #8a97a8;
}
.dashboard-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.dashboard-kpi-card .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #5f6b7a;
}
.dashboard-kpi-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid #dde6f0;
  border-radius: 10px;
  background: #f3f7fb;
  color: #475467;
}
.dashboard-kpi-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dashboard-kpi-quality .dashboard-kpi-icon {
  color: #157347;
  background: #effaf3;
  border-color: #c8efd5;
}
.dashboard-kpi-risk .dashboard-kpi-icon {
  color: #b42318;
  background: #fff1f0;
  border-color: #fecdca;
}
.dashboard-kpi-volume .dashboard-kpi-icon {
  color: #146c94;
  background: #eef7fb;
  border-color: #cbe4ef;
}
.dashboard-kpi-card .value {
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-top: 10px;
}
.dashboard-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #c8d7e7;
  box-shadow:
    0 14px 28px rgba(15, 23, 42, 0.09),
    0 4px 10px rgba(15, 23, 42, 0.06);
}
.dashboard-kpi-card:hover .dashboard-kpi-icon,
.analysis-kpi-card:hover .analysis-kpi-icon,
.analysis-period-kpi:hover .analysis-kpi-icon {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}
.dashboard-kpi-icon,
.analysis-kpi-icon {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.dashboard-kpi-quality .value {
  color: #157347;
}
.dashboard-kpi-risk .value {
  color: #b42318;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 6px;
}
.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-button.is-exporting {
  opacity: 0.7;
}
.settings-page {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
}
.settings-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 0;
  background: transparent;
  border-bottom: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.settings-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #f8fafc;
  color: #667085;
  border: 1px solid #dbe2ec;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: none;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}
.settings-tab::after {
  display: none;
}
.settings-tab:hover {
  color: #344054;
  background: #fff;
  border-color: #cfd8e3;
}
.settings-tab.active {
  color: #0b74ea;
  background: #fff;
  border-color: #b2ddff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.settings-tab-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef2f6;
  color: #667085;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.settings-tab.active .settings-tab-icon {
  background: #eff6ff;
  color: #0b74ea;
}
.settings-tab-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-tab-label {
  letter-spacing: 0.01em;
}
.settings-panel {
  display: none;
  padding: 0;
  background: transparent;
}
.settings-panel.active {
  display: block;
}
.settings-section-card {
  border: 1px solid #dbe2ec;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 8px 24px rgba(15, 23, 42, 0.06);
}
.settings-section-body {
  padding: 18px 22px 22px;
}
.settings-section-card .settings-toolbar {
  margin-bottom: 0;
  padding: 20px 22px;
  border: 0;
  border-radius: 0;
  background: #fff;
  border-bottom: 1px solid #edf1f6;
}
.settings-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.settings-toolbar-copy h2 {
  font-size: 18px;
  margin: 0;
  color: #101828;
}
.settings-toolbar-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.settings-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #b2ddff;
  color: #0b74ea;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.settings-count-badge.is-empty {
  background: #f2f4f7;
  border-color: #e4e7ec;
  color: #667085;
}
.settings-toolbar-copy .sub {
  margin: 5px 0 0;
  max-width: 52ch;
}
.settings-toolbar-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}
.settings-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.settings-btn-primary {
  background: #0b74ea;
  color: #fff;
  border-color: #0b74ea;
}
.settings-btn-primary:hover:not(:disabled) {
  background: #055ec7;
  border-color: #055ec7;
}
.settings-btn-outline {
  background: #fff;
  color: #344054;
  border-color: #d0d5dd;
}
.settings-btn-outline:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #98a2b3;
  color: #101828;
}
.settings-btn-danger-outline {
  background: #fff;
  color: #b42318;
  border-color: #fecdca;
}
.settings-btn-danger-outline:hover:not(:disabled) {
  background: #fef3f2;
  border-color: #fda29b;
  color: #912018;
}
.settings-btn-danger {
  background: #d92d20;
  color: #fff;
  border-color: #d92d20;
}
.settings-btn-danger:hover:not(:disabled) {
  background: #b42318;
  border-color: #b42318;
}
.settings-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #d7e3f3;
  border-radius: 9px;
  background: #fff;
  color: #0b74ea;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}
.settings-icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-icon-btn:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #b2ddff;
  color: #055ec7;
}
.settings-icon-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.settings-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.settings-icon-btn-danger {
  color: #b42318;
  border-color: #fecdca;
}
.settings-icon-btn-danger:hover:not(:disabled) {
  background: #fef3f2;
  border-color: #fda29b;
  color: #912018;
}
.settings-icon-btn-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.settings-icon-btn-sm svg {
  width: 15px;
  height: 15px;
}
/* Unified application tables (dashboard, analysis, settings) */
.settings-section-card .app-table-shell,
.settings-section-card .settings-table-shell {
  border: 1px solid #edf1f6;
  border-radius: 12px;
  box-shadow: none;
}
.app-table-shell,
.settings-table-shell {
  border: 1px solid #dbe2ec;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.app-table-scroll,
.settings-table-scroll {
  max-height: 520px;
  overflow: auto;
  background: #fff;
}
.app-table-scroll--dashboard {
  max-height: 430px;
}
.app-table-scroll--analysis {
  max-height: 560px;
}
.app-data-table,
.settings-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.app-data-table thead th,
.settings-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 16px;
  background: #eef2f7;
  border-bottom: 1px solid #d8dee8;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475467;
  white-space: nowrap;
}
.app-data-table tbody td,
.settings-data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #edf1f6;
  color: #1d2433;
  vertical-align: middle;
  font-size: 13px;
  background: #fff;
  transition: background 0.12s ease;
}
.app-data-table tbody tr:nth-child(even) td,
.settings-data-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}
.app-data-table tbody tr:last-child td,
.settings-data-table tbody tr:last-child td {
  border-bottom: 0;
}
.app-data-table tbody tr:hover td,
.settings-data-table tbody tr:hover td {
  background: #f3f8ff;
}
.app-data-table tbody tr:last-child:hover td,
.settings-data-table tbody tr:last-child:hover td {
  background: #f3f8ff;
}
.app-data-table tbody tr.is-priority-row td {
  background: #fff8f7;
}
.app-data-table tbody tr.is-priority-row:nth-child(even) td {
  background: #fff4f2;
}
.app-data-table tbody tr.is-priority-row:hover td {
  background: #ffefec;
}
.app-col-sno,
.settings-col-sno {
  width: 56px;
  min-width: 56px;
  text-align: center;
  color: #667085;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.app-data-table thead th.app-col-sno,
.settings-data-table thead th.settings-col-sno {
  text-align: center;
}
.app-col-num,
.settings-col-num,
.app-data-table thead th.app-col-num,
.settings-data-table thead th.settings-col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.settings-col-center,
.settings-data-table thead th.settings-col-center {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.app-data-table tbody td.bad {
  color: #b42318;
  font-weight: 700;
}
.app-data-table tbody td.good {
  color: #027a48;
  font-weight: 700;
}
.app-data-table tbody td .app-metric-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.app-data-table tbody td .app-metric-badge--bad {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
}
.app-data-table tbody td .app-metric-badge--good {
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
}
.app-data-table tbody td .app-metric-badge--neutral {
  background: #f8fafc;
  color: #475467;
  border: 1px solid #e4e7ec;
}
.app-data-table .sortable-table th,
.app-data-table.sortable-table th {
  padding: 0;
}
.app-data-table.sortable-table {
  table-layout: auto;
}
.app-data-table.sortable-table .app-col-code,
.app-data-table.sortable-table .app-col-text {
  width: 1%;
  white-space: nowrap;
}
.app-data-table.sortable-table .app-col-num {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
.app-data-table.sortable-table .app-col-center {
  width: 1%;
  white-space: nowrap;
  text-align: center;
}
.app-data-table.sortable-table tbody td.app-col-num {
  text-align: right;
}
.app-data-table.sortable-table tbody td.app-col-center {
  text-align: center;
}
.app-data-table.sortable-table tbody td.app-col-code,
.app-data-table.sortable-table tbody td.app-col-text {
  font-weight: 600;
  color: #1d2433;
}
.app-data-table.sortable-table tbody td.app-col-text {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-data-table.sortable-table thead th {
  padding: 0;
  background: #eef2f7;
  vertical-align: middle;
}
.app-data-table.sortable-table thead th.app-col-num {
  text-align: right;
}
.app-data-table.sortable-table thead th.app-col-num .sort-header {
  justify-content: flex-end;
}
.app-data-table.sortable-table thead th.app-col-center {
  text-align: center;
}
.app-data-table.sortable-table thead th.app-col-center .sort-header {
  justify-content: center;
}
.app-data-table.sortable-table thead th.app-col-code .sort-header,
.app-data-table.sortable-table thead th.app-col-text .sort-header {
  justify-content: flex-start;
}
table.app-data-table.sortable-table button.sort-header,
.app-data-table .sort-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 40px;
  margin: 0;
  padding: 11px 16px;
  background: transparent;
  color: #475467;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  filter: none;
  transform: none;
}
table.app-data-table.sortable-table button.sort-header:hover,
.app-data-table .sort-header:hover {
  background: transparent;
  color: #475467;
  filter: none;
  box-shadow: none;
  transform: none;
}
table.app-data-table.sortable-table button.sort-header.is-sorted,
.app-data-table .sort-header.is-sorted {
  background: transparent;
  color: var(--accent-d);
}
table.app-data-table.sortable-table button.sort-header:active,
.app-data-table .sort-header:active {
  background: transparent;
  color: #475467;
  filter: none;
  transform: none;
}
table.app-data-table.sortable-table button.sort-header:focus-visible,
.app-data-table .sort-header:focus-visible {
  outline: 2px solid rgba(20, 108, 148, 0.35);
  outline-offset: -2px;
  box-shadow: none;
}
.app-data-table .sort-header-label {
  flex: 0 0 auto;
}
.app-data-table .sort-arrows {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}
.app-data-table .sort-arrows-svg {
  display: block;
  overflow: visible;
}
.app-data-table .sort-arrow {
  fill: #98a2b3;
  transition: fill 0.12s ease;
}
.app-data-table .sort-arrow.is-active {
  fill: var(--accent);
}
.app-data-table .sort-header.is-sorted .sort-header-label {
  color: var(--accent-d);
}
.app-table-empty,
.settings-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 44px 24px;
  border: 1px dashed #cfd8e3;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f8fafc 100%);
  color: #667085;
  text-align: center;
}
.app-table-empty-icon,
.settings-empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e4e7ec;
  color: #98a2b3;
}
.app-table-empty-icon svg,
.settings-empty-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-table-empty p,
.settings-empty p {
  margin: 0;
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.5;
}
.settings-col-date {
  white-space: nowrap;
  color: #475467;
}
.settings-col-file {
  max-width: 240px;
}
.settings-file-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #1d2433;
}
.settings-type-tag,
.settings-event-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f2f4f7;
  border: 1px solid #e4e7ec;
  color: #344054;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.settings-col-message {
  min-width: 220px;
  color: #475467;
  line-height: 1.45;
}
.settings-ip {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e4e9f0;
  color: #334155;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.settings-col-status {
  white-space: nowrap;
}
.settings-col-actions {
  width: 96px;
  white-space: nowrap;
}
.settings-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
}
.settings-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.settings-status-success {
  background: #ecfdf3;
  color: #027a48;
  border-color: #abefc6;
}
.settings-status-success .settings-status-dot {
  background: #12b76a;
}
.settings-status-failed {
  background: #fef3f2;
  color: #b42318;
  border-color: #fecdca;
}
.settings-status-failed .settings-status-dot {
  background: #f04438;
}
.settings-status-pending {
  background: #fffaeb;
  color: #b54708;
  border-color: #fedf89;
}
.settings-status-pending .settings-status-dot {
  background: #f79009;
}
.settings-status-neutral {
  background: #f8fafc;
  color: #64748b;
  border-color: #e4e9f0;
}
.settings-status-neutral .settings-status-dot {
  background: #94a3b8;
}
.settings-section-card .settings-empty,
.settings-section-card .app-table-empty {
  border-color: #e4e7ec;
  border-radius: 12px;
  background: #fbfcfd;
  padding: 36px 20px;
}
.app-table-scroll .row-actions,
.settings-table-scroll .row-actions,
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.settings-message {
  font-size: 13px;
  color: var(--muted);
  min-height: 20px;
  line-height: 1.45;
}
.settings-message.bad {
  color: var(--warn);
}
.settings-message.good {
  color: var(--good);
}
.settings-section-card .settings-password-card,
.settings-section-card .settings-password-aside {
  border-color: #edf1f6;
  box-shadow: none;
}
.settings-password-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.settings-password-card {
  border: 1px solid #dbe2ec;
  border-radius: 14px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.settings-password-fields {
  display: grid;
  gap: 0;
}
.settings-field {
  border: 0;
  border-bottom: 1px solid #edf1f6;
  background: #fff;
  border-radius: 0;
  padding: 18px 20px;
}
.settings-field:last-child {
  border-bottom: 0;
}
.settings-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #475467;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.settings-field input {
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
  font-size: 13px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.settings-field input:focus {
  outline: none;
  border-color: #0b74ea;
  box-shadow: 0 0 0 3px rgba(11, 116, 234, 0.12);
}
.settings-password-aside {
  border: 1px solid #dbe2ec;
  border-radius: 14px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.settings-password-aside-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  background: #eef2f7;
  border-bottom: 1px solid #d8dee8;
}
.settings-password-aside-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #d7e3f3;
  color: #0b74ea;
  flex: 0 0 auto;
}
.settings-password-aside-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-password-aside h3 {
  margin: 0;
  font-size: 14px;
  color: #101828;
}
.settings-password-rules {
  margin: 0;
  padding: 14px 18px 0;
  list-style: none;
  color: #475467;
  font-size: 13px;
  line-height: 1.45;
}
.settings-password-rules li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.settings-password-rules li + li {
  margin-top: 12px;
}
.settings-password-rule-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: #ecfdf3;
  color: #027a48;
  flex: 0 0 auto;
}
.settings-password-rule-icon svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-password-note {
  margin: 14px 18px 18px;
  padding: 12px 14px;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 12px;
  color: #667085;
  line-height: 1.45;
}
.settings-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  padding: 16px 20px;
  border-top: 1px solid #edf1f6;
  background: #f8fafc;
}
.settings-form-footer .settings-btn {
  min-width: 148px;
}
.settings-modal {
  width: min(580px, 96vw);
  border: 1px solid #dbe2ec;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}
.settings-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 0;
}
.settings-modal-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: 0 0 auto;
}
.settings-modal-icon-danger {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #d92d20;
}
.settings-modal-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-modal-head h2 {
  margin: 0;
  font-size: 20px;
  color: #101828;
}
.settings-modal-head .sub {
  margin: 6px 0 0;
}
.settings-modal .settings-summary-grid {
  margin: 18px 22px 0;
}
.settings-modal .modal-warning {
  margin: 16px 22px 0;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.settings-modal .modal-actions {
  margin: 0;
  padding: 18px 22px 22px;
  background: #f8fafc;
  border-top: 1px solid #edf1f6;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.5);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal-backdrop.is-hidden {
  display: none;
}
.modal-card {
  width: min(560px, 96vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 24px 48px rgba(16, 24, 40, 0.2);
}
.modal-card h2 {
  margin: 0;
  font-size: 20px;
}
.settings-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.summary-tile {
  border: 1px solid #e4e7ec;
  background: #fbfcfd;
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
}
.summary-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.summary-value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 5px;
  color: var(--ink);
}
.modal-warning {
  border: 1px solid #fecdca;
  background: #fff7f6;
  color: #912018;
  border-radius: 8px;
  padding: 10px;
  font-weight: 700;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.upload-console {
  padding: 0;
  overflow: hidden;
  border-color: #c8d5e3;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.upload-hero {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 22px;
  border-bottom: 1px solid #edf1f6;
  background: linear-gradient(180deg, #f9fbfc 0%, #fff 100%);
}
.upload-hero-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 1px;
  align-items: center;
  min-width: 0;
  width: 100%;
}
.upload-hero-icon {
  grid-row: 1 / -1;
  align-self: center;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #eef6f9;
  color: var(--accent);
  border: 1px solid #c8dfe8;
  box-shadow: none;
}
.upload-hero-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.upload-hero-eyebrow {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.upload-hero-title {
  grid-column: 2 / -1;
  grid-row: 2;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #101828;
}
.upload-format-pills {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  align-self: center;
}
.format-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 7px;
  letter-spacing: 0.01em;
}
.format-pill svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.format-pill-csv {
  border: 1px solid #c6e8d3;
  background: #f3faf6;
  color: #157347;
}
.format-pill-xlsx {
  border: 1px solid #c5ddef;
  background: #f2f8fc;
  color: #146c94;
}
.upload-form {
  display: grid;
  gap: 18px;
  padding: 24px 28px 28px;
}
.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.upload-template-card {
  border: 1px solid #cbdde7;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5fafc 0%, #fbfdfd 100%);
  overflow: hidden;
}
.upload-template-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.upload-template-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--accent);
  background: #fff;
  border: 1px solid #c5e0ea;
}
.upload-template-icon svg,
.upload-template-download svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.upload-template-icon svg {
  width: 21px;
  height: 21px;
}
.upload-template-copy {
  flex: 1;
  min-width: 0;
}
.upload-template-copy h3 {
  margin: 0;
  color: #101828;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}
.upload-template-copy p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}
.upload-template-download {
  flex: 0 0 auto;
  gap: 7px;
  white-space: nowrap;
  text-decoration: none;
}
.upload-template-download svg {
  width: 16px;
  height: 16px;
}
.upload-template-details {
  border-top: 1px solid #dbe7ed;
  background: rgba(255, 255, 255, 0.76);
}
.upload-template-details summary {
  position: relative;
  padding: 11px 42px 11px 16px;
  color: #344054;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}
.upload-template-details summary::-webkit-details-marker {
  display: none;
}
.upload-template-details summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 17px;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
}
.upload-template-details[open] summary::after {
  content: "−";
}
.upload-template-details summary:hover {
  background: #f8fbfc;
}
.upload-template-table-wrap {
  overflow-x: auto;
  border-top: 1px solid #edf1f4;
}
.upload-template-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12px;
}
.upload-template-table th,
.upload-template-table td {
  padding: 9px 16px;
  border-bottom: 1px solid #edf1f4;
  text-align: left;
  vertical-align: top;
}
.upload-template-table th {
  color: #475467;
  background: #f8fafb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.upload-template-table td:first-child {
  width: 66%;
  color: #344054;
  font-weight: 700;
}
.upload-template-table td:last-child {
  color: #146c94;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.upload-template-note {
  margin: 0;
  padding: 11px 16px 13px;
  color: #667085;
  font-size: 11px;
  line-height: 1.5;
}
.upload-template-note code {
  color: #344054;
  font-size: inherit;
  font-weight: 700;
}
.column-mapping-panel {
  border: 1px solid #e5b96f;
  border-radius: 16px;
  background: #fffdf8;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(106, 70, 16, 0.09);
}
.column-mapping-hero {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px 18px;
  border-bottom: 1px solid #f0dfc2;
  background: linear-gradient(135deg, #fff8e8 0%, #fffdf8 72%);
}
.column-mapping-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid #e9c887;
  border-radius: 11px;
  color: #9a6700;
  background: #fff;
}
.column-mapping-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.column-mapping-eyebrow {
  margin: 0 0 2px;
  color: #9a6700;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}
.column-mapping-hero h3 {
  margin: 0;
  color: #101828;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}
.column-mapping-hero p:last-child {
  margin: 4px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}
.column-mapping-grid-head,
.column-mapping-row {
  display: grid;
  grid-template-columns: minmax(300px, 1.15fr) 32px minmax(230px, 0.85fr) 82px;
  gap: 12px;
  align-items: center;
}
.column-mapping-grid-head {
  padding: 10px 18px;
  border-bottom: 1px solid #eaecf0;
  color: #667085;
  background: #f8fafb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.column-mapping-rows {
  background: #fff;
}
.column-mapping-row {
  padding: 11px 18px;
  border-bottom: 1px solid #edf1f4;
}
.column-mapping-row:last-child {
  border-bottom: 0;
}
.column-mapping-required {
  min-width: 0;
}
.column-mapping-required strong {
  display: block;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.column-mapping-required code {
  display: block;
  margin-top: 3px;
  overflow: visible;
  color: #667085;
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}
.column-mapping-arrow {
  color: #98a2b3;
  font-size: 19px;
  text-align: center;
}
.column-mapping-select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border-color: #cfd7e3;
  background-color: #fff;
  color: #344054;
  font-size: 12px;
}
.column-mapping-select.is-missing {
  border-color: #e5a6a1;
  background-color: #fffafa;
}
.column-mapping-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 3px 8px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  color: #667085;
  background: #f9fafb;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.column-mapping-status.is-matched {
  border-color: #b7dfc5;
  color: #157347;
  background: #f2faf5;
}
.column-mapping-status.is-review {
  border-color: #efd39d;
  color: #9a6700;
  background: #fff9eb;
}
.column-mapping-status.is-duplicate {
  border-color: #efc2be;
  color: #b42318;
  background: #fff5f4;
}
.column-mapping-status.is-data-error {
  border-color: #efaaa4;
  color: #b42318;
  background: #fff1f0;
}
.column-mapping-errors {
  border-top: 1px solid #f0c7c3;
  background: #fff8f7;
}
.column-mapping-errors-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #f5d8d5;
}
.column-mapping-errors-head strong,
.column-mapping-errors-head span {
  display: block;
}
.column-mapping-errors-head strong {
  color: #912018;
  font-size: 13px;
  font-weight: 800;
}
.column-mapping-errors-head div > span {
  margin-top: 3px;
  color: #7a423d;
  font-size: 11px;
  line-height: 1.4;
}
.column-mapping-error-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #efc2be;
  border-radius: 999px;
  color: #b42318;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}
.column-mapping-error-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 18px;
}
.column-mapping-error-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #f0cbc7;
  border-radius: 10px;
  background: #fff;
}
.column-mapping-error-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.column-mapping-error-title strong {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}
.column-mapping-error-title span {
  flex: 0 0 auto;
  color: #b42318;
  font-size: 10px;
  font-weight: 800;
}
.column-mapping-error-meta {
  margin-top: 6px;
  color: #667085;
  font-size: 10px;
  line-height: 1.5;
}
.column-mapping-error-meta code {
  color: #344054;
  font-size: inherit;
  font-weight: 700;
}
.column-mapping-error-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.column-mapping-error-example {
  max-width: 100%;
  padding: 4px 7px;
  overflow: hidden;
  border-radius: 5px;
  color: #912018;
  background: #fff1f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.column-mapping-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid #eaecf0;
  background: #f8fafb;
}
.column-mapping-message {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.column-mapping-message.is-ready {
  color: #157347;
}
.column-mapping-message.is-error {
  color: #b42318;
}
.column-mapping-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex: 0 0 auto;
}
button.mapping-change-file {
  border: 1px solid #b9c9f4;
  color: #3348a5;
  background: #eef3ff;
}
button.mapping-change-file:hover:not(:disabled) {
  color: #263b94;
  background: #dde7ff;
}
.mapping-confirmation-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(3px);
}
.mapping-confirmation-backdrop.is-hidden {
  display: none;
}
body.mapping-confirmation-open {
  overflow: hidden;
}
.mapping-confirmation-modal {
  display: flex;
  flex-direction: column;
  width: min(1480px, 97vw);
  max-height: 92vh;
  overflow: hidden;
  border: 1px solid #d8e0ea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.3);
}
.mapping-confirmation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid #e7ecf2;
  background: linear-gradient(135deg, #f5fafc 0%, #fff 72%);
}
.mapping-confirmation-head p {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}
.mapping-confirmation-head h2 {
  margin: 0;
  color: #101828;
  font-size: 19px;
  line-height: 1.3;
}
.mapping-confirmation-head span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}
button.mapping-confirmation-close {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid #d8e0ea;
  border-radius: 9px;
  color: #475467;
  background: #fff;
}
.mapping-confirmation-close svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.mapping-confirmation-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 20px;
  border-bottom: 1px solid #e7ecf2;
  background: #f8fafb;
}
.mapping-confirmation-summary span {
  padding: 5px 9px;
  border: 1px solid #dfe5ec;
  border-radius: 999px;
  color: #475467;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}
.mapping-confirmation-table-wrap {
  flex: 1;
  min-height: 260px;
  overflow: auto;
}
.mapping-confirmation-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 10px;
}
.mapping-confirmation-table th,
.mapping-confirmation-table td {
  min-width: 165px;
  max-width: 240px;
  padding: 9px 10px;
  overflow: hidden;
  border-right: 1px solid #e7ecf2;
  border-bottom: 1px solid #e7ecf2;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}
.mapping-confirmation-table th:first-child,
.mapping-confirmation-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 118px;
  max-width: 118px;
  color: #475467;
  background: #f8fafb;
  font-weight: 800;
}
.mapping-confirmation-table thead th {
  position: static;
  z-index: auto;
  overflow: visible;
  color: #344054;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-overflow: clip;
  vertical-align: middle;
  white-space: normal;
}
.mapping-confirmation-table thead tr:first-child th {
  background: #eaf5f8;
}
.mapping-confirmation-table thead tr:nth-child(2) th {
  color: #146c94;
  background: #f5fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
}
.mapping-confirmation-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
}
.mapping-confirmation-table tbody td {
  color: #344054;
  background: #fff;
}
.mapping-confirmation-table tbody tr:nth-child(even) td {
  background: #fbfcfd;
}
.mapping-confirmation-table tbody tr:nth-child(even) td:first-child {
  background: #f4f6f8;
}
.mapping-confirmation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  border-top: 1px solid #e7ecf2;
  background: #f8fafb;
}
.mapping-confirmation-footer p {
  margin: 0;
  color: #667085;
  font-size: 11px;
  line-height: 1.45;
}
.mapping-confirmation-footer > div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex: 0 0 auto;
}
.upload-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: start;
}
.upload-main-col {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.drop-zone {
  position: relative;
  min-height: 320px;
  border: 2px dashed #b8c4d4;
  border-radius: 16px;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(20, 108, 148, 0.06) 0%,
      transparent 55%
    ),
    linear-gradient(180deg, #fafcfd 0%, #f3f8fa 100%);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 36px 28px;
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.drop-zone-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(
    circle at center,
    rgba(20, 108, 148, 0.14) 0%,
    transparent 70%
  );
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(20, 108, 148, 0.1) 0%,
      transparent 55%
    ),
    linear-gradient(180deg, #f0f8fa 0%, #e8f4f7 100%);
  box-shadow: 0 0 0 5px rgba(20, 108, 148, 0.1);
}
.drop-zone:hover .drop-zone-glow,
.drop-zone.is-dragging .drop-zone-glow {
  opacity: 1;
}
.drop-zone.is-dragging {
  transform: scale(1.005);
}
.drop-zone.is-processing {
  opacity: 0.75;
  cursor: wait;
  pointer-events: none;
}
.drop-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff 0%, #e8f4f7 100%);
  color: var(--accent);
  margin-bottom: 16px;
  border: 1px solid #c5e0ea;
  box-shadow: 0 8px 24px rgba(20, 108, 148, 0.14);
}
.drop-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.drop-title {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}
.drop-sub {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}
.drop-sub strong {
  color: var(--accent);
  font-weight: 800;
}
.drop-hint {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #dce4ee;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}
.upload-side-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 25px;
  min-width: 0;
  position: sticky;
  top: 88px;
}
.upload-side-card {
  border: 1px solid #e3e8ef;
  background: linear-gradient(180deg, #fcfdfe 0%, #f8fafb 100%);
  border-radius: 14px;
  padding: 16px;
  min-width: 0;
}
.upload-side-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475467;
  font-weight: 800;
  margin-bottom: 12px;
}
.upload-file-slot {
  position: relative;
  height: 72px;
  flex-shrink: 0;
}
.upload-file-slot > .upload-empty-file,
.upload-file-slot > .selected-file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  box-sizing: border-box;
}
.upload-empty-file {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 1.5px dashed #d0d8e3;
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 0 14px;
  text-align: left;
}
.upload-empty-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f2f4f7;
  color: #98a2b3;
}
.upload-empty-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.selected-file {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #bfe0ea;
  background: linear-gradient(135deg, #f4fbfc 0%, #edf7f9 100%);
  border-radius: 12px;
  padding: 0 10px 0 12px;
}
.selected-file-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: var(--accent);
  border: 1px solid #c5e0ea;
}
.selected-file-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.selected-file-body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.selected-file-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 800;
  line-height: 1.2;
}
.selected-file-name {
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.selected-file-remove {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  min-width: 0;
  border-radius: 8px;
}
.selected-file-remove svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.upload-status-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.upload-status-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #98a2b3;
  box-shadow: 0 0 0 3px rgba(152, 162, 179, 0.2);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.upload-status-card:has(.upload-message.good) .upload-status-dot {
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(21, 115, 71, 0.18);
}
.upload-status-card:has(.upload-message.bad) .upload-status-dot {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.16);
}
.upload-status-card:has(.upload-message:not(.good):not(.bad))
  .upload-status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 108, 148, 0.16);
}
.upload-actions {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.upload-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-left: 0;
  font-size: 15px;
  font-weight: 800;
  border-radius: 12px;
}
.upload-actions button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.upload-message {
  flex: 1;
  font-size: 14px;
  color: var(--muted);
  min-height: 22px;
  font-weight: 700;
  line-height: 1.45;
}
.upload-message.bad {
  color: var(--warn);
}
.upload-message.good {
  color: var(--good);
}
.upload-result {
  border-top: 1px solid var(--line);
  padding: 22px 28px 26px;
  margin-top: 0;
  background: linear-gradient(180deg, #f9fbfc 0%, #fff 100%);
}
.upload-result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8edf3;
}
.upload-result-title {
  font-weight: 800;
  font-size: 17px;
  word-break: break-word;
  line-height: 1.35;
}
.upload-result-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.skipped-download {
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
  border-radius: 8px;
}
.upload-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 12px;
}
.upload-result-card {
  border: 1px solid #e3e8ef;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.upload-result-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.upload-result-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 800;
}
.upload-result-value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 6px;
  color: var(--ink);
  line-height: 1.1;
}
@media (max-width: 1180px) {
  .icd-filter-grid,
  .icd-kpis,
  .coder-filter-grid,
  .coder-kpis,
  .project-kpis,
  .period-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1180px) {
  .dashboard-filter-grid,
  .dashboard-kpis,
  .dashboard-highlights,
  .dashboard-chart-grid,
  .dashboard-table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-wide-card {
    grid-column: 1/-1;
  }
}
@media (max-width: 1180px) {
  .filter-layout {
    grid-template-columns: 1fr;
  }
  .filter-fields.two-col,
  .filter-fields.period-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .icd-filter-grid,
  .icd-kpis,
  .coder-filter-grid,
  .coder-kpis,
  .project-kpis,
  .period-kpis {
    grid-template-columns: 1fr;
  }
  .dashboard-filter-grid,
  .dashboard-kpis,
  .dashboard-highlights,
  .dashboard-chart-grid,
  .dashboard-table-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-trend-chart,
  .dashboard-rank-chart {
    height: 360px;
  }
  .filter-panel-head {
    flex-direction: column;
  }
  .filter-panel-head .filter-actions,
  .filter-panel-head .filter-actions button {
    width: 100%;
  }
  .dashboard-filter-actions,
  .analysis-filter-actions {
    flex-direction: column;
  }
  .dashboard-filter-actions button,
  .analysis-filter-actions button {
    width: 100%;
  }
  .filter-fields.two-col,
  .filter-fields.period-fields {
    grid-template-columns: 1fr;
  }
  .period-card-head,
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .small-link,
  button.export-button {
    width: 100%;
    text-align: center;
  }
  .analysis-export-icon {
    align-self: flex-end;
  }
  .export-icon-button {
    align-self: flex-end;
  }
  .icd-error-chart,
  .icd-period-chart,
  .coder-period-chart {
    height: 420px;
  }
  .fallback-bar-row {
    grid-template-columns: 1fr;
  }
  .fallback-bar-value {
    text-align: left;
  }
}
@media (max-width: 700px) {
  .settings-toolbar,
  .settings-form-footer,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-toolbar-actions,
  .settings-form-footer .settings-btn,
  .settings-modal .modal-actions {
    width: 100%;
  }
  .settings-toolbar-actions {
    justify-content: stretch;
  }
  .settings-toolbar-actions .settings-btn,
  .settings-form-footer .settings-btn,
  .settings-modal .modal-actions .settings-btn {
    width: 100%;
  }
  .settings-summary-grid {
    grid-template-columns: 1fr;
  }
  .settings-password-layout {
    grid-template-columns: 1fr;
  }
  .settings-tabs {
    gap: 6px;
  }
  .settings-tab {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    padding: 11px 10px;
  }
  .settings-tab-label {
    font-size: 12px;
  }
  .settings-panel {
    padding: 0;
  }
  .settings-section-card .settings-toolbar {
    padding: 16px;
  }
  .settings-section-body {
    padding: 14px 16px 16px;
  }
  .settings-modal-head,
  .settings-modal .settings-summary-grid,
  .settings-modal .modal-warning,
  .settings-modal .modal-actions {
    padding-left: 16px;
    padding-right: 16px;
  }
}
@media (max-width: 900px) {
  .upload-workspace {
    grid-template-columns: 1fr;
  }
  .upload-side-panel {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }
  .upload-actions {
    grid-column: 1/-1;
  }
  .upload-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .drop-zone {
    min-height: 260px;
  }
}
@media (max-width: 700px) {
  .upload-hero {
    padding: 14px 16px;
  }
  .upload-hero-content {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 4px;
  }
  .upload-format-pills {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
  }
  .upload-hero-title {
    grid-column: 2 / -1;
  }
  .upload-form {
    padding: 18px 20px 22px;
  }
  .upload-template-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .upload-template-copy {
    min-width: calc(100% - 56px);
  }
  .upload-template-download {
    width: 100%;
  }
  .column-mapping-grid-head {
    display: none;
  }
  .column-mapping-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 16px;
  }
  .column-mapping-required code {
    white-space: normal;
  }
  .column-mapping-arrow {
    display: none;
  }
  .column-mapping-status {
    justify-self: start;
  }
  .column-mapping-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .column-mapping-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
  .column-mapping-actions button {
    width: 100%;
  }
  .column-mapping-error-list {
    grid-template-columns: 1fr;
  }
  .mapping-confirmation-backdrop {
    padding: 8px;
  }
  .mapping-confirmation-modal {
    width: 100%;
    max-height: 96vh;
    border-radius: 12px;
  }
  .mapping-confirmation-head,
  .mapping-confirmation-summary,
  .mapping-confirmation-footer {
    padding-left: 14px;
    padding-right: 14px;
  }
  .mapping-confirmation-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .mapping-confirmation-footer > div {
    align-items: stretch;
    flex-direction: column-reverse;
  }
  .mapping-confirmation-footer button {
    width: 100%;
  }
  .upload-side-panel {
    grid-template-columns: 1fr;
  }
  .upload-actions,
  .selected-file,
  .upload-result-head {
    flex-direction: column;
    align-items: stretch;
  }
  .upload-actions button {
    width: 100%;
    margin-left: 0;
  }
  .upload-result {
    padding: 18px 20px 22px;
  }
  .upload-result-grid {
    grid-template-columns: 1fr;
  }
  .drop-zone {
    min-height: 220px;
    padding: 22px;
  }
  .drop-title {
    font-size: 18px;
  }
}

/* ============================================================
   UI polish pass — typography, depth & interaction tuning.
   Aesthetic-only rules; intentionally placed last. No layout
   or responsive grid changes here.
   ============================================================ */
h1,
h2,
h3,
h4 {
  letter-spacing: 0;
}
.topbar h1 {
  font-size: 25px;
  font-weight: 800;
  line-height: 1.18;
}
.sub {
  font-size: 12.5px;
  line-height: 1.45;
  color: #7a8699;
}
.section-title,
.chart-head h2,
.filter-panel-head h2,
.icd-section-head h2,
.settings-toolbar h2,
.upload-hero-title,
.upload-result-title {
  font-weight: 700;
  letter-spacing: 0;
  color: #101828;
}
h3 {
  color: #1d2433;
}

/* Cards: soft elevation + slightly softer borders */
.card {
  border-radius: var(--radius);
  border-color: #e6ebf2;
  box-shadow: var(--shadow-sm);
}
.modal-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* Numeric emphasis — tabular figures keep columns aligned */
.kpi .value,
.dashboard-kpi-card .value,
.analysis-kpi-card .value,
.period-kpi-value,
.summary-value,
.upload-result-value,
.highlight-value,
td {
  font-variant-numeric: tabular-nums;
}
.kpi .value,
.dashboard-kpi-card .value,
.analysis-kpi-card .value,
.highlight-value,
.upload-result-value {
  letter-spacing: 0;
  line-height: 1.12;
}
.kpi .label,
.highlight-label,
.period-kpi-label,
.summary-label,
.upload-result-label,
.upload-side-label,
.filter-block-title {
  letter-spacing: 0.045em;
  font-weight: 700;
}
.dashboard-kpi-card .label,
.analysis-kpi-card .label,
.analysis-period-kpi .period-kpi-label {
  text-transform: none;
}
.dashboard-kpi-card .label,
.analysis-kpi-card .label {
  font-size: 15px;
}
.analysis-period-kpi .period-kpi-label {
  font-size: 14px;
}

/* Buttons: consistent radius, subtle elevation, uniform hover/active feedback */
button,
.btn {
  font-size: 13.5px;
  letter-spacing: 0.005em;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  transition:
    filter 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.06s ease;
}
button:not(.settings-icon-btn):not(.settings-tab):not(
    .settings-icon-btn-sm
  ):not(.sort-header):not(.appbar-icon-button):not(.appbar-user):not(
    .analysis-export-icon
  ):not(.icon-button):not(.export-icon-button):not(.date-cell):not(.date-nav),
.btn,
.settings-btn,
.filter-toggle {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover:not(:disabled):not(.settings-tab):not(.settings-icon-btn):not(
    .settings-btn
  ):not(.sort-header):not(.date-cell):not(.date-nav),
.btn:hover {
  filter: brightness(0.94);
  box-shadow: 0 3px 8px rgba(16, 24, 40, 0.16);
}
button:active:not(:disabled):not(.settings-tab):not(.settings-icon-btn):not(
    .settings-btn
  ):not(.sort-header):not(.date-cell):not(.date-nav),
.btn:active {
  transform: translateY(1px);
  filter: brightness(0.89);
}
button:focus-visible:not(.settings-tab):not(.settings-icon-btn):not(
    .settings-btn
  ):not(.sort-header):not(.date-cell):not(.date-nav),
.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.icon-button,
.analysis-export-icon,
.expand-button,
.settings-tab,
.settings-tab:hover,
.settings-tab:active,
.settings-tab:focus,
.settings-tab:focus-visible,
.settings-icon-btn,
.settings-icon-btn:hover,
.settings-icon-btn:active,
.settings-icon-btn:focus,
.settings-icon-btn:focus-visible,
.sort-header,
.sort-header:hover,
.sort-header:active,
.sort-header:focus,
.sort-header:focus-visible {
  box-shadow: none;
}
.settings-btn:hover,
.settings-btn:active,
.settings-btn:focus,
.settings-btn:focus-visible {
  filter: none;
}

/* Form controls: smooth focus ring everywhere */
input,
select,
textarea,
.multi-select-trigger {
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
input::placeholder {
  color: #98a2b3;
}
input:focus,
select:focus,
textarea:focus,
.multi-select-trigger:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

/* Tables: cleaner headers, gentle row hover */
table {
  font-size: 13px;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #5b6675;
}
.dashboard-table-scroll th {
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}
tbody tr {
  transition: background 0.12s ease;
}
tbody tr:hover {
  background: #f6f9fc;
}

/* Status pills + links */
.status-pill {
  letter-spacing: 0.02em;
}
.small-link {
  font-weight: 600;
}

/* Refined scrollbars for a desktop-app feel */
*::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
*::-webkit-scrollbar-thumb {
  background: #c4cdd9;
  border-radius: 9px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: #aab4c2;
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-track {
  background: transparent;
}

/* ============================================================
   Form controls — even typography + better dropdowns & dates
   ============================================================ */
/* Native controls do NOT inherit font-family: force Inter everywhere
   so filter labels, inputs, selects and buttons all match. */
button,
input,
select,
textarea,
optgroup,
option,
.multi-select-trigger {
  font-family: inherit;
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.multi-select-trigger {
  min-height: 40px;
  color: var(--ink);
  font-weight: 500;
}
/* Checkboxes/radios must not inherit the text-input box styling (width/padding/height) */
input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}
.field label {
  font-weight: 600;
}

/* Custom dropdown chevron + consistent affordance for native selects
   (listed explicitly so the panel rules can't strip the arrow) */
select,
.dashboard-control-panel select,
.analysis-control-panel select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 12px;
}
select:hover,
.multi-select-trigger:hover {
  border-color: #b9c4d2;
}
select option {
  padding: 8px;
  color: var(--ink);
}
select:disabled {
  background-color: #f4f6f8;
  cursor: not-allowed;
}

/* Date inputs: align height, tidy the calendar picker, accent the popup */
input[type="date"] {
  accent-color: var(--accent);
  cursor: pointer;
  padding-right: 12px;
  color: var(--ink);
}
input[type="date"]::-webkit-datetime-edit {
  padding: 0;
  color: var(--ink);
}
input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  font-variant-numeric: tabular-nums;
}
input[type="date"]:in-range::-webkit-datetime-edit-year-field,
input[type="date"]:invalid::-webkit-datetime-edit {
  color: #98a2b3;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.55;
  border-radius: 5px;
  padding: 3px;
  margin-left: 4px;
  transition:
    opacity 0.15s ease,
    background 0.15s ease;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  background: #eef3f7;
}

/* Year / Month multi-selects: make them look and size like native selects */
.field {
  min-width: 0;
}
.field > select,
.field > input,
.field > .multi-select {
  min-width: 0;
  max-width: 100%;
}
.multi-select {
  min-width: 0;
}
.multi-select-trigger {
  min-height: 40px;
  font-weight: 500;
  padding: 10px 34px 10px 12px;
  border-color: var(--line);
}
/* Replace the square caret with the same chevron the native selects use */
.multi-select-trigger::after {
  border: 0;
  width: 12px;
  height: 12px;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
  transition: transform 0.15s ease;
}
.multi-select.is-open .multi-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Dropdown menu: size to its content (no wrapped text), grow leftward from the
   trigger's right edge so it never spills outside the panel/viewport */
.multi-select-menu {
  border-color: #e2e8f0;
  box-shadow: var(--shadow-md);
  padding: 7px;
  left: auto;
  right: 0;
  min-width: 200px;
  max-width: 280px;
}
.multi-select-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  font-size: 13px;
  padding: 8px 9px;
  white-space: nowrap;
  transition: background 0.12s ease;
}
.multi-select-option span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.multi-select-option:hover {
  background: #eef6f9;
}
.multi-select-option input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* Dashboard and analysis filter dropdowns */
.dashboard-control-panel .multi-select,
.analysis-control-panel .multi-select {
  z-index: 5;
}
.dashboard-control-panel .multi-select.is-open,
.analysis-control-panel .multi-select.is-open {
  z-index: 80;
}
.dashboard-control-panel .multi-select.is-open .multi-select-trigger,
.analysis-control-panel .multi-select.is-open .multi-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 108, 148, 0.14);
}
.dashboard-control-panel .multi-select-menu,
.analysis-control-panel .multi-select-menu {
  left: 0;
  right: auto;
  width: max(100%, 220px);
  max-width: min(320px, calc(100vw - 48px));
  max-height: 300px;
  padding: 8px;
  border-color: #cfd8e3;
  border-radius: 8px;
  background: #fff;
  box-shadow:
    0 18px 38px rgba(16, 24, 40, 0.18),
    0 4px 10px rgba(16, 24, 40, 0.08);
}
.dashboard-control-panel .multi-select-option,
.analysis-control-panel .multi-select-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #344054;
  font-weight: 600;
  line-height: 1.25;
}
.dashboard-control-panel .multi-select-option.all-option,
.analysis-control-panel .multi-select-option.all-option {
  background: #f8fafc;
  border-bottom: 1px solid #e6ebf2;
  color: #1d2433;
}
.dashboard-control-panel .multi-select-option:hover,
.analysis-control-panel .multi-select-option:hover {
  background: #eaf3f6;
  color: #101828;
}
.dashboard-control-panel .multi-select-option input,
.analysis-control-panel .multi-select-option input {
  width: 15px;
  height: 15px;
  align-self: center;
  justify-self: center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.filter-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.collapsible-filter-panel {
  display: none;
  margin-bottom: 14px;
}
.collapsible-filter-panel.is-open {
  display: block;
}
.unified-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  align-items: end;
}
.unified-period-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  align-items: end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e6ebf2;
}
.custom-range-row {
  display: none;
  grid-column: span 2;
  width: 300px;
  max-width: 100%;
  min-width: 0;
}
.custom-range-row.is-open {
  display: block;
}
.filter-date-range {
  font-weight: 600;
}
.search-multi {
  position: relative;
  min-width: 0;
}
.search-multi-trigger {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 34px 10px 12px;
  text-align: left;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
}
.search-multi-trigger::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
  transition: transform 0.15s ease;
}
.search-multi.is-open .search-multi-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 108, 148, 0.14);
}
.search-multi.is-open .search-multi-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}
.search-multi-menu {
  display: none;
  position: absolute;
  z-index: 90;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 280px);
  max-width: min(380px, calc(100vw - 48px));
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #fff;
  box-shadow:
    0 18px 38px rgba(16, 24, 40, 0.18),
    0 4px 10px rgba(16, 24, 40, 0.08);
  padding: 8px;
}
.search-multi.is-open .search-multi-menu {
  display: block;
}
.search-multi-tools {
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e6ebf2;
  margin-bottom: 6px;
}
.search-multi-search {
  min-height: 36px;
}
.search-multi-actions {
  display: flex;
  gap: 6px;
}
.search-multi-actions button {
  flex: 1;
  min-height: 30px;
  padding: 6px 8px;
  background: #eef2f6;
  color: #344054;
  box-shadow: none;
}
.search-multi-options {
  max-height: 240px;
  overflow: auto;
  display: grid;
  gap: 2px;
}
.search-multi .search-multi-option {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #344054;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
}
.search-multi .search-multi-option:hover {
  background: #eaf3f6;
  color: #101828;
}
.search-multi .search-multi-option input {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
}
.search-multi .search-multi-option span {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-multi-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}
.date-range-picker {
  position: relative;
  width: 100%;
  max-width: 100%;
}
.date-range-picker .date-range-input {
  cursor: pointer;
  background: #fff;
  padding-left: 38px !important;
  padding-right: 44px !important;
  width: 100%;
  max-width: none;
  min-width: 0;
  text-overflow: ellipsis;
}
.date-range-icon {
  position: absolute;
  left: 12px;
  top: 20px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #667085;
  pointer-events: none;
  z-index: 1;
}
.date-range-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.date-range-caret {
  position: absolute;
  right: 13px;
  top: 20px;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
  transition: transform 0.15s ease;
}
.date-range-picker.is-open .date-range-caret {
  transform: translateY(-50%) rotate(180deg);
}
.date-range-menu {
  display: none;
  position: absolute;
  z-index: 95;
  top: calc(100% + 6px);
  left: 0;
  width: min(330px, calc(100vw - 48px));
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #fff;
  box-shadow:
    0 18px 38px rgba(16, 24, 40, 0.18),
    0 4px 10px rgba(16, 24, 40, 0.08);
  padding: 10px;
}
.date-range-picker.is-open .date-range-menu {
  display: block;
}
.date-range-head {
  display: grid;
  grid-template-columns: 34px 1fr 92px 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.date-range-title {
  text-align: center;
  font-weight: 800;
  color: #1d2433;
}
.date-range-head select {
  min-height: 36px;
  padding: 8px 30px 8px 10px;
  font-weight: 700;
}
.date-nav {
  height: 34px;
  width: 34px;
  padding: 0;
  background: #eef2f6;
  color: #344054;
  box-shadow: none;
  font-size: 18px;
  line-height: 1;
}
.date-range-weekdays,
.date-range-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.date-range-weekdays span {
  font-size: 11px;
  color: #667085;
  text-align: center;
  font-weight: 800;
  text-transform: uppercase;
}
.date-cell {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border-radius: 6px;
  background: #fff;
  color: #344054;
  box-shadow: none;
  padding: 0;
  font-weight: 700;
}
button.date-cell:hover {
  background: #eaf3f6;
  color: #101828;
  filter: none;
  transform: none;
}
.date-cell.is-empty {
  min-height: 34px;
}
.date-cell.is-disabled {
  background: #f8fafc;
  color: #b8c0cc;
  cursor: not-allowed;
  box-shadow: none;
}
.date-cell.is-disabled:hover {
  background: #f8fafc;
  color: #b8c0cc;
}
.date-cell.is-in-range {
  background: #eaf3f6;
  color: #0f5575;
}
.date-cell.is-selected {
  background: var(--accent);
  color: #fff;
}
.date-range-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #e6ebf2;
  margin-top: 10px;
  padding-top: 10px;
}
.date-range-footer button {
  min-height: 34px;
  padding: 7px 10px;
}
.date-range-summary {
  font-size: 12px;
  color: #667085;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 1180px) {
  .unified-filter-grid,
  .unified-period-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app-table-scroll,
  .settings-table-scroll,
  .table-scroll,
  .dashboard-table-scroll,
  .coder-table-scroll,
  .chase-detail-scroll,
  .icd-detail-scroll {
    max-height: 56vh;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 700px) {
  .app-table-scroll,
  .settings-table-scroll,
  .table-scroll,
  .dashboard-table-scroll,
  .coder-table-scroll,
  .chase-detail-scroll,
  .icd-detail-scroll {
    max-height: 52vh;
  }
  .unified-filter-grid,
  .unified-period-grid {
    grid-template-columns: 1fr;
  }
  .custom-range-row {
    grid-column: 1;
  }
  .date-range-input {
    min-width: 0;
  }
  .date-range-footer {
    grid-template-columns: 1fr 1fr;
  }
  .date-range-summary {
    grid-column: 1/-1;
  }
  .collapsible-filter-panel .dashboard-filter-actions,
  .collapsible-filter-panel .analysis-filter-actions {
    flex-direction: column;
  }
  .collapsible-filter-panel .dashboard-filter-actions button,
  .collapsible-filter-panel .analysis-filter-actions button {
    width: 100%;
  }
}
.dashboard-control-panel .multi-select-option span,
.analysis-control-panel .multi-select-option span {
  display: block;
  line-height: 1.25;
}

/* Top navbar buttons sit above the broad app button rules. */
button.appbar-icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #fff;
  color: #374151;
  box-shadow: none;
}
button.appbar-icon-button:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #e5e7eb;
  color: #111827;
  filter: none;
  box-shadow: none;
  transform: none;
}
button.appbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #eef2f7;
  background: #fbfcfd;
  color: #111827;
  padding: 6px 8px;
  border-radius: 8px;
  box-shadow: none;
  cursor: pointer;
  min-width: 0;
  width: 100%;
}
button.appbar-user:hover:not(:disabled) {
  filter: none;
  box-shadow: none;
  background: #f8fafc;
  border-color: #e5e7eb;
  transform: none;
}
button.appbar-user:active:not(:disabled),
button.appbar-icon-button:active:not(:disabled) {
  transform: none;
  filter: none;
}
.main.upload-page .app-page-content {
  width: 100%;
  min-width: 0;
}
.main.upload-page .topbar,
.main.upload-page .upload-console {
  width: 100%;
  min-width: 0;
}
@media (max-width: 700px) {
  .appbar {
    gap: 10px;
  }
  .appbar-crumbs {
    gap: 6px;
    font-size: 12px;
  }
  .appbar-crumbs a,
  .appbar-current {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
  }
  .appbar-user-copy,
  .appbar-user-chevron {
    display: none;
  }
  button.appbar-user {
    min-width: 0;
    padding: 6px;
  }
  .appbar-avatar {
    width: 36px;
    height: 36px;
  }
  .appbar-icon-button {
    width: 34px;
    height: 34px;
  }
  .main {
    padding: 10px;
  }
  .card {
    padding: 12px;
  }
  .upload-result-grid {
    grid-template-columns: 1fr;
  }
  .pagination-bar {
    align-items: stretch;
    gap: 10px;
  }
  .pager {
    width: 100%;
  }
  .pager button {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
}

/* Sortable table headers must beat global button chrome. */
table.app-data-table.sortable-table button.sort-header {
  background: transparent;
  color: #475467;
  border-radius: 0;
  box-shadow: none;
  filter: none;
}
table.app-data-table.sortable-table button.sort-header:hover,
table.app-data-table.sortable-table button.sort-header.is-sorted,
table.app-data-table.sortable-table button.sort-header:active {
  background: transparent;
  filter: none;
  box-shadow: none;
  transform: none;
}

/* KPI redesign v3: clean split-panel cards (static, no hover effects) */
.dashboard-kpis {
  gap: 14px;
}
.icd-kpis,
.coder-kpis,
.project-kpis,
.period-kpis {
  gap: 10px;
}
.dashboard-kpi-card,
.analysis-kpi-card,
.analysis-period-kpi {
  position: relative;
  overflow: hidden;
  min-height: 120px;
  border: 1px solid #d6e0eb;
  border-radius: 12px;
  padding: 14px 14px 12px;
  background: #ffffff;
  box-shadow: none;
}
.dashboard-kpi-card::before,
.analysis-kpi-card::before,
.analysis-period-kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: #98a2b3;
}
.dashboard-kpi-top,
.analysis-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dashboard-kpi-card .label,
.analysis-kpi-card .label,
.analysis-period-kpi .period-kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #667085;
}
.dashboard-kpi-icon,
.analysis-kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #dce5ef;
  background: #f8fafc;
  box-shadow: none;
}
.dashboard-kpi-card .value,
.analysis-kpi-card .value {
  margin-top: 12px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.analysis-period-kpi .period-kpi-value {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.dashboard-kpi-scope::before,
.analysis-kpi-scope::before {
  background: #64748b;
}
.dashboard-kpi-volume::before,
.analysis-kpi-volume::before {
  background: #0284c7;
}
.dashboard-kpi-risk::before,
.analysis-kpi-risk::before {
  background: #dc2626;
}
.dashboard-kpi-quality::before,
.analysis-kpi-quality::before {
  background: #16a34a;
}
.dashboard-kpi-icon,
.analysis-kpi-icon,
.dashboard-kpi-card,
.analysis-kpi-card,
.analysis-period-kpi {
  transition: none;
}
.dashboard-kpi-card:hover,
.analysis-kpi-card:hover,
.analysis-period-kpi:hover {
  transform: none;
  border-color: #d6e0eb;
  box-shadow: none;
}
@media (max-width: 1100px) {
  .dashboard-kpi-card,
  .analysis-kpi-card,
  .analysis-period-kpi {
    min-height: 112px;
  }
  .dashboard-kpi-card .value,
  .analysis-kpi-card .value {
    font-size: 20px;
  }
  .analysis-period-kpi .period-kpi-value {
    font-size: 18px;
  }
}

/* ICD Comparison matrix */
.icd-comparison-section {
  overflow: hidden;
}
.icd-comparison-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 14px;
}
.icd-comparison-title-row h2 {
  font-size: 18px;
  margin: 0 0 4px;
}
.icd-comparison-title-row .sub {
  color: var(--muted);
  font-size: 13px;
}
.icd-comparison-control-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.icd-comparison-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.icd-control-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.icd-control-field.icd-top-field {
  width: 160px;
}
.icd-control-field.icd-top-field select {
  width: 100%;
}
.icd-control-field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #667085;
}
.icd-control-field select {
  width: 100%;
  min-height: 38px;
}
.icd-comparison-side-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
#exportCoderComparisonExcel[hidden],
#exportProjectComparisonExcel[hidden] {
  display: none !important;
}
.icd-export-menu {
  position: relative;
  display: inline-flex;
}
.icd-export-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 156px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(16, 24, 40, 0.16);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.icd-export-menu-list[hidden] {
  display: none;
}
.icd-export-menu-list button {
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
}
.icd-export-menu-list button:hover {
  background: #eef4ff;
}
.icd-comparison-side-actions .icon-button,
.icd-comparison-side-actions .icon-button.analysis-export-icon {
  width: 45px;
  height: 45px;
}
.icd-comparison-view-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.icd-comparison-display-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.icd-comparison-metric-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}
.icd-comparison-metric-box select {
  width: 100%;
  min-height: 38px;
}
.icd-comparison-metric-box > label,
.icd-comparison-display-box > label,
.icd-comparison-view-box > label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #667085;
}
.segmented-control {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #f8fafc;
  gap: 2px;
}
.segmented-control button {
  border: 0;
  background: transparent;
  color: #475467;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.segmented-control button:hover {
  background: #eef2f7;
  color: #1d2433;
}
.segmented-control button.active {
  background: #0b74ea;
  color: #fff;
  box-shadow: 0 1px 2px rgba(11, 116, 234, 0.25);
}
.icd-comparison-count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.icd-comparison-count {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}
.icd-comparison-count:empty {
  display: none;
}
.icd-comparison-shell {
  margin-top: 4px;
}
.icd-comparison-scroll {
  max-height: 560px;
}
.icd-comparison-table {
  min-width: max-content;
}
.icd-comparison-table thead th {
  text-align: center;
  vertical-align: middle;
  z-index: 5;
}
/* Two-row header (month/period group row + sub-header row): keep BOTH rows
   pinned while scrolling. The first row stays at the top; the second row is
   offset by the first row's height so the merged month/period headers do not
   scroll away or get hidden behind the sub-headers. */
.icd-comparison-table thead tr:first-child th {
  top: 0;
  height: 36px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.icd-comparison-table thead tr:nth-child(2) th {
  top: 36px;
}
.icd-comparison-table thead th.sticky-col {
  text-align: left;
  z-index: 7;
}
.icd-comparison-table tbody td {
  text-align: center;
}
.icd-comparison-table tbody td.sticky-col {
  text-align: left;
  font-weight: 600;
}
.icd-comparison-table .sticky-col.sticky-code {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 110px;
  max-width: 160px;
  box-shadow: 1px 0 0 #edf1f6;
}
.icd-comparison-table thead th.sticky-col.sticky-code {
  z-index: 8;
  background: #eef2f7;
}
.icd-comparison-table tbody tr:nth-child(even) td.sticky-col.sticky-code {
  background: #fbfcfe;
}
.icd-comparison-table tbody tr:hover td.sticky-col.sticky-code {
  background: #f3f8ff;
}
body[data-analysis-entity="coder"]
  .icd-comparison-table
  .sticky-col.sticky-code {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left !important;
}
body[data-analysis-entity="coder"]
  .icd-comparison-table
  .sticky-col.sticky-code
  .icd-code-drilldown {
  display: block !important;
  width: 100%;
  max-width: 100%;
  padding: 0 !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left !important;
  justify-content: flex-start !important;
}
.icd-comparison-table thead th.icd-day-header,
.icd-comparison-table thead th.icd-week-header {
  white-space: normal;
  line-height: 1.2;
  min-width: 72px;
}
.icd-group-header {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-left: 2px solid #d0d5dd;
}
.icd-group-header.icd-month-group.previous {
  background: #edf7ee !important;
  color: #05603a;
}
.icd-group-header.icd-month-group.current {
  background: #e9f5f8 !important;
  color: #026aa2;
}
.icd-group-header.icd-month-group.difference {
  background: #fff4d6 !important;
  color: #b54708;
}
.icd-group-header.icd-period-group {
  background: #f0f4f8 !important;
  color: #344054;
}
.icd-comparison-table th.icd-group-end,
.icd-comparison-table td.icd-group-end {
  border-right: 2px solid #d0d5dd;
}
.icd-accuracy-period {
  min-width: 92px;
  padding: 8px 10px !important;
  text-align: center;
  vertical-align: middle;
}
.icd-accuracy-period.is-empty {
  color: #98a2b3;
  background: #fff;
}
.icd-accuracy-main {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.icd-accuracy-sub {
  margin-top: 3px;
  font-size: 10px;
  color: #667085;
  line-height: 1.25;
  white-space: nowrap;
}
.icd-accuracy-period.accuracy-excellent .icd-accuracy-main {
  color: #05603a;
}
.icd-accuracy-period.accuracy-good .icd-accuracy-main {
  color: #3f6212;
}
.icd-accuracy-period.accuracy-attention .icd-accuracy-main {
  color: #b54708;
}
.icd-accuracy-period.accuracy-critical .icd-accuracy-main {
  color: #b42318;
}
.icd-accuracy-period.accuracy-excellent {
  background: #e8f7ee;
}
.icd-accuracy-period.accuracy-good {
  background: #f0f8e8;
}
.icd-accuracy-period.accuracy-attention {
  background: #fff4d6;
}
.icd-accuracy-period.accuracy-critical {
  background: #fee4e2;
}
.icd-comparison-table
  tbody
  tr:nth-child(even)
  td.icd-accuracy-period.accuracy-excellent,
.icd-comparison-table tbody tr:hover td.icd-accuracy-period.accuracy-excellent {
  background: #e8f7ee;
}
.icd-comparison-table
  tbody
  tr:nth-child(even)
  td.icd-accuracy-period.accuracy-good,
.icd-comparison-table tbody tr:hover td.icd-accuracy-period.accuracy-good {
  background: #f0f8e8;
}
.icd-comparison-table
  tbody
  tr:nth-child(even)
  td.icd-accuracy-period.accuracy-attention,
.icd-comparison-table tbody tr:hover td.icd-accuracy-period.accuracy-attention {
  background: #fff4d6;
}
.icd-comparison-table
  tbody
  tr:nth-child(even)
  td.icd-accuracy-period.accuracy-critical,
.icd-comparison-table tbody tr:hover td.icd-accuracy-period.accuracy-critical {
  background: #fee4e2;
}
.icd-comparison-table tbody tr:nth-child(even) td.icd-accuracy-period.is-empty,
.icd-comparison-table tbody tr:hover td.icd-accuracy-period.is-empty {
  background: #fff;
}
.icd-trend-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.icd-trend-badge.trend-improving {
  background: #dcfae6;
  color: #05603a;
}
.icd-trend-badge.trend-declining {
  background: #fee4e2;
  color: #b42318;
}
.icd-trend-badge.trend-stable {
  background: #eef2f6;
  color: #475467;
}
.icd-comparison-table .icd-comparison-sort {
  width: 100%;
  justify-content: center;
}
.icd-comparison-table .sort-header.active {
  color: #0b74ea;
}
.icd-code-drilldown {
  appearance: none;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: #0b74ea;
  padding: 0;
  font: inherit;
  font-weight: 800;
  line-height: 1.3;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: none;
}
.icd-code-drilldown:hover,
.icd-code-drilldown:focus-visible {
  color: #075ea8;
  background: transparent;
  outline: none;
}
.icd-code-drilldown:focus-visible {
  box-shadow: 0 0 0 3px rgba(11, 116, 234, 0.18);
  border-radius: 4px;
}
.icd-coder-comparison-modal {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.icd-coder-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
}
.icd-coder-modal-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.icd-coder-modal-head .sub {
  color: #667085;
  font-size: 13px;
}
.icd-coder-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.icd-coder-modal-actions .analysis-export-icon:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
#icdCoderComparisonBody {
  min-height: 220px;
  overflow: hidden;
}
.icd-coder-comparison-modal .icd-comparison-scroll {
  max-height: calc(100vh - 235px);
}
.icd-coder-comparison-modal .icd-comparison-table .sticky-col.sticky-code {
  width: 270px;
  min-width: 270px;
  max-width: 270px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.icd-coder-comparison-modal .icd-comparison-table tbody td.sticky-col.sticky-code {
  line-height: 1.35;
}
body.modal-open {
  overflow: hidden;
}
.icd-expanded-chart-modal {
  width: min(1320px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.icd-expanded-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
  flex: 0 0 auto;
}
.icd-expanded-chart-head h2 {
  margin: 0 0 4px;
  font-size: 19px;
}
.icd-expanded-chart-head .sub {
  color: #667085;
  font-size: 13px;
}
#icdExpandedChartBody {
  min-height: 300px;
  overflow-y: auto;
  padding-right: 2px;
}
.icd-expanded-chart-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.icd-expanded-chart-kpi {
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #e4e7ec;
  border-radius: 9px;
  background: #f8fafc;
}
.icd-expanded-chart-kpi.is-selected {
  border-color: rgba(11, 116, 234, 0.48);
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px rgba(11, 116, 234, 0.08);
}
.icd-expanded-chart-kpi span {
  display: block;
  margin-bottom: 3px;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.icd-expanded-chart-kpi strong {
  display: block;
  color: #101828;
  font-size: 18px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icd-expanded-chart-kpi strong.bad {
  color: var(--warn);
}
.icd-expanded-chart-selected {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: #475467;
  font-size: 12px;
}
.icd-expanded-chart-selected strong {
  color: #101828;
}
.icd-expanded-chart-selected span {
  margin-left: auto;
  color: #0b74ea;
  font-weight: 800;
}
.icd-expanded-chart-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  padding: 10px 8px 2px;
}
.icd-expanded-area-chart {
  width: auto;
  min-width: 100%;
  max-width: none;
  height: auto;
}
.icd-expanded-point-value {
  fill: #344054;
  font-size: 11px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
}
.icd-expanded-axis-label {
  font-size: 11px;
  font-weight: 650;
}
.icd-expanded-chart-help {
  margin-top: 8px;
  color: #667085;
  font-size: 11px;
  text-align: center;
}
.icd-comparison-chart-shell {
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fafafa;
  padding: 16px;
  position: relative;
}
.icd-comparison-chart-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.icd-comparison-chart-note {
  color: black;
  font-size: 14px;
  font-weight: 700;
  margin: 4px 0 0;
}
.icd-comparison-chart-toolbar .icd-comparison-metric-box {
  flex-shrink: 0;
}
.icd-comparison-chart-toolbar-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* Weekly grouped bar chart */
.icd-bar-chart-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 760px;
  overflow-y: auto;
  padding-right: 4px;
}
.icd-bar-chart-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 14px 8px;
  background: #fff;
}
.icd-bar-chart-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.icd-bar-chart-block-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.icd-bar-chart-block-metric {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.icd-bar-chart-block-month {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 6px;
  white-space: nowrap;
}
.icd-bar-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.icd-bar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.icd-bar-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.icd-bar-chart-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}
.icd-bar-chart-svg {
  display: block;
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  flex: 0 0 auto;
}
.icd-bar-rect {
  transition: opacity 0.15s ease;
}
.icd-bar-rect:hover {
  opacity: 0.82;
}
.icd-bar-value {
  font-size: 9px;
  font-weight: 600;
  fill: var(--muted);
}
.icd-bar-group-label {
  font-weight: 700;
}
.coder-bar-group-label {
  font-size: 10px;
  font-weight: 650;
}
body[data-analysis-entity="coder"] .icd-bar-chart-list {
  max-height: none;
  overflow: visible;
}
.shadcn-chart-shell {
  --chart-1: 221 83% 53%;
  --chart-2: 142 76% 36%;
  --chart-3: 24 95% 53%;
  --chart-4: 262 83% 58%;
  --chart-5: 316 70% 50%;
}
.shadcn-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}
.shadcn-chart-card {
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.shadcn-chart-card.is-expandable {
  cursor: zoom-in;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}
.shadcn-chart-card.is-expandable:hover {
  border-color: #b8c7dc;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.1);
  transform: translateY(-1px);
}
.shadcn-chart-card.is-expandable:focus-visible {
  outline: none;
  border-color: #0b74ea;
  box-shadow: 0 0 0 3px rgba(11, 116, 234, 0.18);
}
.shadcn-chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 8px;
}
.shadcn-chart-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #18181b;
  letter-spacing: -0.01em;
}
.shadcn-chart-card-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: #71717a;
}
.shadcn-chart-card-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.shadcn-chart-expand-hint {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  background: #f8fafc;
  color: #475467;
}
.shadcn-chart-expand-hint svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.shadcn-chart-card-body {
  padding: 0 6px 4px;
}
.shadcn-area-chart {
  width: 100%;
  height: auto;
  display: block;
}
.shadcn-chart-grid-line {
  stroke: #e4e4e7;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.shadcn-chart-target-line {
  stroke: #a1a1aa;
  stroke-width: 1;
  stroke-dasharray: 5 4;
  opacity: 0.85;
}
.shadcn-chart-axis-label,
.shadcn-chart-y-label {
  fill: #71717a;
  font-size: 10px;
  font-weight: 500;
}
.shadcn-chart-point-hit {
  fill: transparent;
  cursor: pointer;
}
.shadcn-chart-point {
  pointer-events: none;
  transition: r 0.15s ease;
}
.shadcn-chart-card:hover .shadcn-chart-point {
  r: 4.25;
}
.shadcn-chart-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px 12px;
  border-top: 1px solid #f4f4f5;
  font-size: 11px;
  color: #71717a;
}
.shadcn-chart-card-footer strong {
  color: #18181b;
  font-weight: 700;
}
.shadcn-chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fff;
  box-shadow:
    0 10px 24px rgba(16, 24, 40, 0.12),
    0 2px 6px rgba(16, 24, 40, 0.06);
  pointer-events: none;
}
.shadcn-chart-tooltip-label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #18181b;
}
.shadcn-chart-tooltip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.shadcn-chart-tooltip-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}
.shadcn-chart-tooltip-name {
  flex: 1;
  color: #52525b;
  font-weight: 600;
}
.shadcn-chart-tooltip-value {
  font-weight: 700;
  color: #18181b;
}
.shadcn-chart-tooltip-value.accuracy-excellent {
  color: #05603a;
}
.shadcn-chart-tooltip-value.accuracy-good {
  color: #3f6212;
}
.shadcn-chart-tooltip-value.accuracy-attention {
  color: #b54708;
}
.shadcn-chart-tooltip-value.accuracy-critical {
  color: #b42318;
}
.shadcn-chart-tooltip-meta {
  margin-top: 6px;
  font-size: 11px;
  color: #71717a;
}
@media (max-width: 1100px) {
  .icd-comparison-control-layout {
    grid-template-columns: 1fr;
  }
  .icd-comparison-side-actions {
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
  }
  .icd-comparison-display-box,
  .icd-comparison-view-box {
    flex: 1 1 220px;
  }
  .icd-comparison-chart-toolbar {
    flex-wrap: wrap;
    align-items: flex-end;
  }
}
@media (max-width: 700px) {
  .icd-expanded-chart-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .icd-expanded-chart-selected span {
    width: 100%;
    margin-left: 0;
  }
  .icd-comparison-controls {
    grid-template-columns: 1fr 1fr;
  }
  .segmented-control {
    width: 100%;
  }
  .segmented-control button {
    flex: 1 1 0;
    padding: 8px 8px;
    font-size: 12px;
  }
  .icd-comparison-scroll {
    max-height: 420px;
  }
  .shadcn-chart-grid {
    grid-template-columns: 1fr;
    max-height: 560px;
  }
}

/* Right-side overlay filter drawer (ICD Analysis) */
.filter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
  z-index: 1100;
}
.filter-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}
.icd-floating-filter {
  position: fixed;
  top: 92px;
  right: -22px;
  z-index: 1080;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0 14px;
  gap: 0;
  justify-content: flex-start;
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  background: #0b74ea;
  color: #fff;
  box-shadow: -4px 5px 16px rgba(11, 116, 234, 0.28);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition:
    right 0.2s ease,
    width 0.2s ease,
    min-width 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.icd-floating-filter svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  transition:
    opacity 0.14s ease,
    transform 0.2s ease;
}
.icd-floating-filter-edge-icon {
  position: absolute;
  left: 4px;
  opacity: 1;
  transform: translateX(0);
}
.icd-floating-filter-main-icon {
  opacity: 0;
  transform: translateX(5px);
}
.icd-floating-filter:hover .icd-floating-filter-edge-icon,
.icd-floating-filter:focus-visible .icd-floating-filter-edge-icon,
.icd-floating-filter.is-dragging .icd-floating-filter-edge-icon {
  opacity: 0;
  transform: translateX(-4px);
}
.icd-floating-filter:hover .icd-floating-filter-main-icon,
.icd-floating-filter:focus-visible .icd-floating-filter-main-icon,
.icd-floating-filter.is-dragging .icd-floating-filter-main-icon {
  opacity: 1;
  transform: translateX(0);
}
.icd-floating-filter-label {
  display: block;
  max-width: 0;
  margin-left: 0;
  overflow: hidden;
  opacity: 0;
  font-weight: 750;
  transition:
    max-width 0.2s ease,
    margin-left 0.2s ease,
    opacity 0.14s ease;
}
.icd-floating-filter:hover,
.icd-floating-filter:focus-visible,
.icd-floating-filter.is-dragging {
  right: 0;
  width: 112px;
  min-width: 112px;
  background: #0967d2;
  filter: none;
  transform: none;
  box-shadow: -7px 7px 20px rgba(11, 116, 234, 0.32);
}
.icd-floating-filter:hover .icd-floating-filter-label,
.icd-floating-filter:focus-visible .icd-floating-filter-label,
.icd-floating-filter.is-dragging .icd-floating-filter-label {
  max-width: 52px;
  margin-left: 9px;
  opacity: 1;
}
.icd-floating-filter.is-dragging {
  cursor: grabbing;
  transition:
    right 0.12s ease,
    width 0.12s ease,
    min-width 0.12s ease;
}
.icd-floating-filter:focus-visible {
  outline: 3px solid rgba(11, 116, 234, 0.24);
  outline-offset: 2px;
}
.filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 100%);
  background: var(--panel);
  box-shadow: -18px 0 40px rgba(16, 24, 40, 0.18);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 1200;
  display: flex;
  flex-direction: column;
}
.filter-drawer.is-open {
  transform: translateX(0);
}
.filter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.filter-drawer-header h2 {
  margin: 0;
  font-size: 18px;
}
.filter-drawer-body {
  padding: 18px 20px;
  display: grid;
  gap: 16px;
  align-content: start;
  overflow-y: auto;
  flex: 1;
}

/* The date range is the final field in the ICD filter drawer. Open its
   calendar above the trigger so the drawer's scrolling viewport does not
   clip the dates or place them behind the fixed action bar. */
.filter-drawer .date-range-picker.is-open {
  z-index: 100;
}
.filter-drawer .date-range-menu {
  top: auto;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
}
.filter-drawer.dashboard-control-panel {
  padding: 0;
}
.filter-drawer.dashboard-control-panel .filter-drawer-body {
  grid-template-columns: minmax(0, 1fr);
}
.dashboard-period-state[hidden] {
  display: none !important;
}
.filter-drawer.dashboard-control-panel
  .filter-drawer-body
  > .custom-range-row {
  grid-column: 1;
  width: 100%;
}
.filter-drawer.dashboard-control-panel .date-range-menu {
  top: calc(100% + 6px);
  bottom: auto;
}

/* Dashboard analytics overview */
.dashboard-section-kicker,
.dashboard-card-kicker {
  display: block;
  margin-bottom: 5px;
  color: #0b74ea;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.dashboard-overview-kpis {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  margin: 14px 0;
}
.dashboard-signal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.dashboard-signal-card {
  display: flex;
  min-width: 0;
  min-height: 92px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dce4ed;
  border-radius: 11px;
  background: #fff;
}
.dashboard-signal-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid #dce5ef;
  border-radius: 9px;
  background: #f7f9fc;
  color: #526071;
}
.dashboard-signal-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dashboard-signal-risk .dashboard-signal-icon {
  border-color: #f5c7c3;
  background: #fff4f2;
  color: #b42318;
}
.dashboard-signal-quality .dashboard-signal-icon {
  border-color: #bde7cd;
  background: #f0faf4;
  color: #157347;
}
.dashboard-signal-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.dashboard-signal-copy span {
  overflow: hidden;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.dashboard-signal-copy strong {
  margin-top: 3px;
  color: #172033;
  font-size: 21px;
  line-height: 1;
}
.dashboard-signal-risk .dashboard-signal-copy strong {
  color: #b42318;
}
.dashboard-signal-quality .dashboard-signal-copy strong {
  color: #157347;
}
.dashboard-signal-copy small {
  margin-top: 5px;
  overflow: hidden;
  color: #8792a2;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 2px 10px;
}
.dashboard-section-heading h2,
.dashboard-analysis-workspace-head h2 {
  margin: 0;
  color: #1d2939;
  font-size: 20px;
  letter-spacing: -0.015em;
}
.dashboard-section-heading p,
.dashboard-analysis-workspace-head p {
  max-width: 600px;
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}
.dashboard-trend-view-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.dashboard-trend-view-box > label {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dashboard-trend-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.icd-period-picker.dashboard-trend-period-picker {
  margin-left: 0;
}
.icd-period-picker.dashboard-trend-period-picker .multi-select-trigger {
  min-height: 38px;
  min-width: 178px;
}
.dashboard-trend-period-picker .icd-period-menu {
  z-index: 80;
}
.dashboard-overview-card {
  min-width: 0;
  border-radius: 12px;
}
.dashboard-driver-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}
.dashboard-driver-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 12px;
}
.dashboard-driver-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: #64748b;
}
.dashboard-driver-project::before {
  background: #0b74ea;
}
.dashboard-driver-icd::before {
  background: #7c3aed;
}
.dashboard-driver-coder::before {
  background: #0f9f78;
}
.dashboard-driver-card .chart-head {
  min-height: 70px;
  align-items: flex-start;
}
.dashboard-driver-card .chart-head h2 {
  margin-top: 0;
  font-size: 16px;
}
.dashboard-driver-card .dashboard-rank-chart {
  height: 350px;
}
.dashboard-driver-card .dashboard-rank-note {
  gap: 9px;
  font-size: 10px;
}
.dashboard-driver-workspace {
  min-width: 0;
  overflow: hidden;
  border-radius: 12px;
}
.dashboard-combined-workspace {
  margin-top: 20px;
}
.dashboard-driver-workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e6ebf1;
}
.dashboard-driver-workspace-head h2 {
  margin: 0;
  color: #1d2939;
  font-size: 19px;
  letter-spacing: -0.015em;
}
.dashboard-driver-workspace-head p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 12px;
}
.dashboard-driver-tabs {
  padding-bottom: 4px;
}
.dashboard-driver-chart {
  position: relative;
  width: 100%;
  height: 450px;
  min-width: 0;
  overflow: hidden;
}
.dashboard-driver-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  padding-top: 10px;
  border-top: 1px solid #eef1f5;
  color: #667085;
  font-size: 11px;
  font-weight: 650;
}
.dashboard-driver-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dashboard-combined-table-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #dfe6ee;
}
.dashboard-combined-table-head {
  margin-bottom: 12px;
}
.dashboard-combined-table-head h3 {
  margin: 0;
  color: #1d2939;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.dashboard-combined-workspace .dashboard-analysis-panels {
  min-width: 0;
}
.dashboard-combined-workspace .dashboard-table-scroll {
  max-height: 520px;
}
.dashboard-bar-key {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #64748b;
}
.dashboard-bar-key.bar-good {
  background: #22a06b;
}
.dashboard-bar-key.bar-risk {
  background: #ef4444;
}
.dashboard-analysis-workspace {
  margin-top: 26px;
  overflow: hidden;
  border-radius: 12px;
}
.dashboard-analysis-workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e6ebf1;
}
.dashboard-analysis-workspace-head p {
  margin-top: 5px;
  text-align: left;
}
.dashboard-analysis-tabs {
  display: flex;
  gap: 5px;
  padding: 14px 0 10px;
}
.dashboard-analysis-tabs button {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}
.dashboard-analysis-tabs button:hover,
.dashboard-analysis-tabs button.active {
  border-color: #cfe0f2;
  background: #eef6ff;
  box-shadow: none;
  color: #075ea8;
  filter: none;
  transform: none;
}
.dashboard-analysis-panels [hidden] {
  display: none !important;
}
.dashboard-analysis-panels .dashboard-table-scroll {
  max-height: 520px;
}
.dashboard-analysis-panels table {
  min-width: 760px;
}

@media (max-width: 1320px) {
  .dashboard-overview-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .dashboard-signal-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .dashboard-driver-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-driver-card:last-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 850px) {
  .dashboard-section-heading,
  .dashboard-driver-workspace-head,
  .dashboard-analysis-workspace-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-overview-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-section-heading p {
    text-align: left;
  }
  .dashboard-trend-view-box {
    width: 100%;
  }
  .dashboard-signal-grid,
  .dashboard-driver-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-driver-card:last-child {
    grid-column: auto;
  }
}
@media (max-width: 620px) {
  .dashboard-overview-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-signal-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-analysis-workspace-head .small-link {
    width: 100%;
    text-align: center;
  }
  .dashboard-driver-workspace-head .small-link {
    width: 100%;
    text-align: center;
  }
  .dashboard-driver-chart {
    height: 410px;
  }
  #qualityTrendSection .chart-head {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-trend-actions {
    justify-content: space-between;
  }
  .icd-period-picker.dashboard-trend-period-picker {
    flex: 1;
  }
  .icd-period-picker.dashboard-trend-period-picker .multi-select-trigger {
    width: 100%;
  }
  .dashboard-trend-view-box .segmented-control {
    width: 100%;
  }
  .dashboard-trend-view-box .segmented-control button {
    flex: 1;
  }
  .dashboard-analysis-tabs {
    overflow-x: auto;
  }
}
.filter-drawer-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.filter-drawer-actions button {
  flex: 1;
}

/* Uploaded-data month selector above the display/view toggles */
/* Merged Year + Month period picker (single dropdown) */
.icd-period-picker {
  width: auto;
  margin-left: auto;
}
.icd-period-picker .multi-select-trigger {
  min-width: 170px;
  width: auto;
  font-weight: 600;
}
.icd-period-menu.multi-select-menu {
  left: auto;
  right: 0;
  min-width: 260px;
  padding: 12px;
}
.icd-period-year-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.icd-period-year-row label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.icd-period-year-row select {
  flex: 1;
  min-height: 38px;
}
.icd-period-month-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  max-height: 240px;
  overflow: auto;
}
.icd-period-month-list .multi-select-option.all-option {
  grid-column: 1 / -1;
}

/* Production upload workflow */
.main.upload-page {
  padding: 0;
  background:
    radial-gradient(circle at 92% 4%, rgba(11, 116, 234, 0.08), transparent 27rem),
    #f5f7fa;
}
.main.upload-page .app-page-content {
  padding: 12px clamp(10px, 1.2vw, 18px) 30px;
}
.qm-upload-experience {
  --qm-upload-ink: #162033;
  --qm-upload-muted: #657188;
  --qm-upload-line: #dce3eb;
  --qm-upload-soft: #f6f9fb;
  --qm-upload-brand: #0b74ea;
  --qm-upload-brand-dark: #075dbd;
  width: min(100%, 1480px);
  margin: 0 auto;
  color: var(--qm-upload-ink);
}
.qm-upload-stepper {
  position: relative;
  margin-bottom: 18px;
  padding: 18px 22px;
  overflow: hidden;
  border: 1px solid var(--qm-upload-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 7px 24px rgba(26, 42, 64, 0.055);
}
.qm-upload-stepper ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.qm-upload-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding-right: 28px;
}
.qm-upload-step:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 19px;
  right: 10px;
  left: 48px;
  height: 2px;
  content: "";
  background: #e3e8ee;
}
.qm-upload-step-marker {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #d9e0e8;
  border-radius: 12px;
  background: #f6f8fa;
  color: #7b8798;
  font-size: 13px;
  font-weight: 800;
  transition: 180ms ease;
}
.qm-upload-step-copy {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  padding: 2px 8px 2px 0;
  background: #fff;
}
.qm-upload-step-copy strong {
  overflow: hidden;
  color: #546176;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qm-upload-step-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: #919bab;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qm-upload-step.is-active .qm-upload-step-marker {
  border-color: var(--qm-upload-brand);
  background: var(--qm-upload-brand);
  color: #fff;
  box-shadow: 0 6px 15px rgba(11, 116, 234, 0.22);
}
.qm-upload-step.is-active .qm-upload-step-copy strong {
  color: var(--qm-upload-ink);
}
.qm-upload-step.is-complete .qm-upload-step-marker {
  border-color: #a9caf2;
  background: #eaf3ff;
  color: transparent;
}
.qm-upload-step.is-complete .qm-upload-step-marker::after {
  position: absolute;
  width: 10px;
  height: 5px;
  border-bottom: 2px solid #176fc5;
  border-left: 2px solid #176fc5;
  content: "";
  transform: translateY(-2px) rotate(-45deg);
}
.qm-upload-step.is-complete:not(:last-child)::after {
  background: #94bde9;
}
.qm-upload-step.is-complete .qm-upload-step-copy strong {
  color: #275f98;
}
.qm-upload-surface {
  min-width: 0;
}
.qm-upload-form {
  display: block;
  padding: 0;
}
.qm-upload-selection-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.72fr);
  gap: 18px;
  align-items: stretch;
}
.qm-upload-experience[data-current-step="2"] .qm-upload-selection-stage,
.qm-upload-experience[data-current-step="3"] .qm-upload-selection-stage {
  display: none;
}
.qm-upload-experience[data-current-step="2"] .qm-column-mapping {
  margin-top: 0;
}
.qm-upload-experience[data-current-step="3"] .qm-column-mapping {
  display: none;
}
.qm-upload-primary-card,
.qm-upload-preflight-card,
.qm-column-mapping,
.qm-upload-review-stage,
.qm-upload-result {
  border: 1px solid var(--qm-upload-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(24, 39, 61, 0.065);
}
.qm-upload-primary-card {
  height: 100%;
  padding: clamp(20px, 2.2vw, 30px);
}
.qm-upload-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}
.qm-upload-card-icon {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: #eaf5f7;
  color: var(--qm-upload-brand);
}
.qm-upload-card-icon svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.qm-upload-card-head > div:last-child > span,
.qm-upload-preflight-head > div > span {
  color: var(--qm-upload-brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.qm-upload-card-head h2,
.qm-upload-preflight-head h2 {
  margin: 3px 0 0;
  color: var(--qm-upload-ink);
  font-size: 18px;
  letter-spacing: -0.015em;
}
.qm-upload-card-head p {
  margin: 5px 0 0;
  color: var(--qm-upload-muted);
  font-size: 13px;
}
.qm-upload-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  min-height: 292px;
  margin: 0;
  padding: 34px 22px;
  overflow: hidden;
  border: 1.5px dashed #a8c4e3;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(238, 246, 255, 0.9), rgba(250, 252, 255, 0.96));
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.qm-upload-dropzone:hover,
.qm-upload-dropzone.is-dragging {
  border-color: var(--qm-upload-brand);
  background: #eaf3ff;
  transform: translateY(-1px);
}
.qm-upload-dropzone.is-processing {
  pointer-events: none;
  opacity: 0.7;
}
.drop-zone-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  width: 260px;
  height: 190px;
  border-radius: 50%;
  background: rgba(11, 116, 234, 0.1);
  filter: blur(38px);
  transform: translateX(-50%);
}
.qm-upload-drop-visual {
  position: relative;
  display: grid;
  width: 70px;
  height: 70px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid #b9d1ec;
  border-radius: 22px;
  background: #fff;
  color: var(--qm-upload-brand);
  box-shadow: 0 10px 22px rgba(11, 116, 234, 0.11);
}
.qm-upload-drop-visual svg {
  width: 31px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.qm-upload-drop-ring {
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(8, 117, 139, 0.12);
  border-radius: 26px;
}
.qm-upload-dropzone .drop-title {
  color: #172338;
  font-size: 19px;
  font-weight: 750;
}
.qm-upload-dropzone .drop-sub {
  margin-top: 6px;
  color: #728097;
  font-size: 13px;
}
.qm-upload-dropzone .drop-sub strong {
  color: var(--qm-upload-brand-dark);
}
.qm-upload-drop-formats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 19px;
}
.qm-upload-drop-formats > span {
  padding: 5px 8px;
  border: 1px solid #d9e5e9;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.76);
  color: #647386;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.qm-upload-control-dock {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 0.7fr) auto;
  gap: 10px;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid #e1e7ed;
  border-radius: 14px;
  background: #f8fafb;
}
.qm-upload-file-state {
  min-width: 0;
}
.qm-upload-empty-file,
.qm-upload-selected-file {
  min-height: 54px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.qm-upload-empty-file {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #657188;
}
.qm-upload-empty-file .upload-empty-icon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #dbe3ea;
  border-radius: 9px;
  background: #fff;
}
.qm-upload-empty-file span:last-child,
.qm-upload-selected-file .selected-file-body {
  display: grid;
  min-width: 0;
}
.qm-upload-empty-file strong {
  color: #364156;
  font-size: 12px;
}
.qm-upload-empty-file small {
  margin-top: 2px;
  color: #8a95a5;
  font-size: 10px;
}
.qm-upload-selected-file {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  gap: 10px;
}
.qm-upload-selected-file .selected-file-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.qm-upload-selected-file .selected-file-icon svg {
  width: 17px;
}
.qm-upload-selected-file .selected-file-name {
  font-size: 11px;
}
.qm-upload-selected-file #clearFileBtn {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #b8d2f1;
  border-radius: 7px;
  background: #e9f3ff;
  color: #0b63c7;
  box-shadow: none;
}
.qm-upload-selected-file #clearFileBtn:hover:not(:disabled) {
  border-color: #8eb9ea;
  background: #d9eaff;
  color: #084f9e;
  box-shadow: none;
}
.qm-upload-selected-file #clearFileBtn svg {
  display: block;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.25;
}
.qm-upload-status-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 11px;
  border-left: 1px solid #e1e7ed;
}
.qm-upload-status-box > div {
  min-width: 0;
}
.qm-upload-status-box small {
  color: #8a95a5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.qm-upload-status-box .upload-message {
  margin-top: 3px;
  overflow: hidden;
  color: #58657a;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qm-upload-status-box:has(.upload-message.good) .upload-status-dot {
  background: var(--qm-upload-brand);
  box-shadow: 0 0 0 4px rgba(11, 116, 234, 0.12);
}
.qm-upload-status-box:has(.upload-message.bad) .upload-status-dot {
  background: #d95555;
  box-shadow: 0 0 0 4px rgba(217, 85, 85, 0.12);
}
.qm-upload-experience .upload-message.good {
  color: #155fae;
}
.qm-upload-actions {
  align-self: stretch;
  margin: 0;
}
.qm-upload-actions button {
  height: 100%;
  min-height: 50px;
  padding: 0 17px;
  border-radius: 11px;
  white-space: nowrap;
}
.qm-upload-preflight-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  padding: 22px;
}
.qm-upload-preflight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5eaf0;
}
.qm-upload-preflight-head h2 {
  font-size: 16px;
}
.qm-upload-ready-pill {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 7px;
  background: #eaf3ff;
  color: #155fae;
  font-size: 10px;
  font-weight: 800;
}
.qm-upload-checklist {
  display: grid;
  gap: 14px;
  padding: 19px 0;
}
.qm-upload-checklist > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.qm-upload-check {
  display: grid;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  margin-top: 1px;
  place-items: center;
  border-radius: 50%;
  background: #eaf3ff;
  color: #146bc2;
  font-size: 11px;
  font-weight: 900;
}
.qm-upload-checklist p {
  display: grid;
  gap: 3px;
  margin: 0;
}
.qm-upload-checklist strong {
  color: #354156;
  font-size: 12px;
}
.qm-upload-checklist small {
  color: #7d8999;
  font-size: 11px;
  line-height: 1.45;
}
.qm-upload-template {
  padding: 15px;
  border: 1px solid #dbe4eb;
  border-radius: 13px;
  background: #f8fafc;
  box-shadow: none;
}
.qm-upload-preflight-card .qm-upload-template {
  margin-top: auto;
}
.qm-upload-template .upload-template-head {
  align-items: center;
}
.qm-upload-template .upload-template-icon {
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  border-radius: 10px;
}
.qm-upload-template .upload-template-copy h3 {
  font-size: 13px;
}
.qm-upload-template .upload-template-copy p {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.4;
}
.qm-upload-template .upload-template-download {
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  border-color: var(--qm-upload-brand);
  background: var(--qm-upload-brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}
.qm-upload-template .upload-template-download:hover {
  background: var(--qm-upload-brand-dark);
  color: #fff;
}
.qm-upload-template .upload-template-details {
  margin-top: 8px;
}
.qm-upload-template .upload-template-details summary {
  font-size: 11px;
}
.qm-upload-template .upload-template-table-wrap {
  max-height: 250px;
}
.qm-upload-template .upload-template-table th,
.qm-upload-template .upload-template-table td {
  padding: 8px;
  font-size: 10px;
}
.qm-column-mapping {
  margin-top: 18px;
  padding: clamp(20px, 2.4vw, 32px);
  overflow: hidden;
}
.qm-column-mapping .column-mapping-hero {
  margin: calc(clamp(20px, 2.4vw, 32px) * -1);
  margin-bottom: 0;
  padding: 24px clamp(20px, 2.4vw, 32px);
  border-bottom: 1px solid #dce6e9;
  background: linear-gradient(110deg, #eaf3ff 0%, #f8fbff 72%);
}
.qm-column-mapping .column-mapping-icon {
  background: #fff;
  color: var(--qm-upload-brand);
  box-shadow: 0 5px 15px rgba(11, 116, 234, 0.1);
}
.qm-column-mapping .column-mapping-grid-head {
  margin: 22px 0 0;
  padding: 10px 14px;
  border: 1px solid #dfe6ec;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #f4f7f9;
}
.qm-column-mapping .column-mapping-rows {
  overflow: hidden;
  border: 1px solid #dfe6ec;
  border-radius: 0 0 10px 10px;
}
.qm-column-mapping .column-mapping-row {
  padding: 14px;
}
.qm-column-mapping .column-mapping-row:hover {
  background: #fbfdfe;
}
.qm-column-mapping .column-mapping-status.is-matched {
  border-color: #b7d2f2;
  background: #edf5ff;
  color: #155fae;
}
.qm-column-mapping .column-mapping-message.is-ready {
  color: #155fae;
}
.qm-column-mapping .column-mapping-select {
  min-width: 0;
  min-height: 42px;
  border-radius: 9px;
  background-color: #fff;
}
.qm-column-mapping .column-mapping-required strong,
.qm-column-mapping .column-mapping-required code {
  overflow-wrap: anywhere;
  white-space: normal;
}
.qm-column-mapping .column-mapping-footer {
  position: sticky;
  z-index: 3;
  bottom: 0;
  margin: 24px -10px -10px;
  padding: 14px 10px 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}
.qm-column-mapping .column-mapping-actions button {
  min-height: 42px;
}
.qm-column-mapping .column-mapping-actions button svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.qm-column-mapping .mapping-change-file {
  border-color: #b8d0ec;
  background: #edf5ff;
  color: #235f9d;
}
.qm-upload-result {
  padding: clamp(22px, 3vw, 38px);
  overflow: hidden;
}
.qm-upload-experience.is-complete .qm-upload-selection-stage,
.qm-upload-experience.is-complete .qm-column-mapping {
  display: none;
}
.qm-upload-result .upload-result-head {
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid #e4e9ee;
}
.qm-upload-result .qm-upload-success-heading {
  display: flex;
  align-items: center;
  gap: 15px;
}
.qm-upload-success-mark {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: #eaf3ff;
  color: #126bc5;
}
.qm-upload-success-mark svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}
.qm-upload-result .upload-result-title {
  font-size: 18px;
}
.qm-upload-result .upload-result-grid {
  margin-top: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.qm-upload-result .upload-result-card {
  min-height: 105px;
  border-color: #e1e7ed;
  border-radius: 12px;
  background: #f8fafb;
  box-shadow: none;
}
.qm-upload-result .status-good {
  background: #e7f2ff;
  color: #0b5eb8;
}
.qm-upload-result .qm-upload-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding: 15px 17px;
  border-radius: 12px;
  background: #eef6ff;
  color: #315e8b;
  font-size: 12px;
}
.qm-upload-result-footer button {
  flex: 0 0 auto;
}
.qm-upload-review-stage {
  overflow: hidden;
}
.qm-upload-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 2.5vw, 34px);
  border-bottom: 1px solid #dbe7f4;
  background: linear-gradient(112deg, #eaf3ff 0%, #f7fbff 68%, #fff 100%);
}
.qm-upload-review-heading {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  min-width: 0;
}
.qm-upload-review-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #bed6f2;
  border-radius: 14px;
  background: #fff;
  color: var(--qm-upload-brand);
  box-shadow: 0 6px 16px rgba(11, 116, 234, 0.1);
}
.qm-upload-review-icon svg,
.qm-upload-review-summary-icon svg,
.qm-upload-review-footer button svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qm-upload-review-icon svg {
  width: 24px;
  stroke-width: 1.7;
}
.qm-upload-review-heading p {
  margin: 0 0 3px;
  color: var(--qm-upload-brand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}
.qm-upload-review-heading h2 {
  margin: 0;
  color: #142038;
  font-size: 21px;
  letter-spacing: -0.018em;
}
.qm-upload-review-heading div > span {
  display: block;
  margin-top: 5px;
  color: #68778e;
  font-size: 12px;
  line-height: 1.5;
}
.qm-upload-review-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(180px, 0.75fr));
  gap: 12px;
  padding: 20px clamp(20px, 2.5vw, 34px) 0;
}
.qm-upload-review-summary article {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dfe7f0;
  border-radius: 12px;
  background: #f9fbfd;
}
.qm-upload-review-summary-icon {
  display: grid;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 9px;
  background: #e8f2ff;
  color: #146bc2;
}
.qm-upload-review-summary-icon svg {
  width: 18px;
  stroke-width: 1.55;
}
.qm-upload-review-summary article > span:last-child {
  display: grid;
  min-width: 0;
}
.qm-upload-review-summary small {
  color: #7c899b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.qm-upload-review-summary strong {
  margin-top: 3px;
  overflow: hidden;
  color: #26364f;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qm-upload-review-summary b {
  color: #0b63bd;
}
.qm-upload-review-table-card {
  margin: 18px clamp(20px, 2.5vw, 34px) 0;
  overflow: hidden;
  border: 1px solid #dce5ef;
  border-radius: 13px;
  background: #fff;
}
.qm-upload-review-table-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #e3e9f0;
  background: #f8fafc;
}
.qm-upload-review-table-card header span {
  color: var(--qm-upload-brand);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}
.qm-upload-review-table-card h3 {
  margin: 3px 0 0;
  color: #24334b;
  font-size: 13px;
}
.qm-upload-review-table-card header small {
  flex: 0 0 auto;
  color: #7c899a;
  font-size: 10px;
}
.qm-upload-review-stage .mapping-confirmation-table-wrap {
  min-height: 240px;
  max-height: min(52vh, 560px);
  overflow: auto;
}
.mapping-confirmation-table th,
.mapping-confirmation-table td {
  min-width: 190px;
  max-width: 190px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.mapping-confirmation-table th:first-child,
.mapping-confirmation-table td:first-child {
  min-width: 130px;
  max-width: 130px;
}
.mapping-confirmation-table thead th {
  vertical-align: top;
}
.mapping-confirmation-table thead tr:first-child th {
  background: #eaf3ff;
}
.mapping-confirmation-table thead tr:nth-child(2) th {
  background: #f4f8ff;
  color: #0b63bd;
}
.qm-upload-review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 17px clamp(20px, 2.5vw, 34px);
  border-top: 1px solid #e0e7ef;
  background: #f8fafc;
}
.qm-upload-review-footer p {
  margin: 0;
  color: #67758a;
  font-size: 11px;
}
.qm-upload-review-footer p.is-working {
  color: #155fae;
  font-weight: 700;
}
.qm-upload-review-footer p.is-error {
  color: #b42318;
  font-weight: 700;
}
.qm-upload-review-footer > div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.qm-upload-review-footer button {
  gap: 7px;
  min-height: 42px;
}
.qm-upload-review-footer button svg {
  width: 15px;
  stroke-width: 1.9;
}
@media (max-width: 1180px) {
  .qm-upload-selection-stage {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .qm-upload-control-dock {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .qm-upload-status-box {
    grid-column: 1 / -1;
    grid-row: 2;
    border-top: 1px solid #e1e7ed;
    border-left: 0;
  }
}
@media (max-width: 930px) {
  .qm-upload-selection-stage {
    grid-template-columns: 1fr;
  }
  .qm-upload-stepper {
    overflow-x: auto;
  }
  .qm-upload-stepper ol {
    min-width: 720px;
  }
  .qm-upload-preflight-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }
  .qm-upload-preflight-card .qm-upload-template {
    margin-top: 0;
  }
  .qm-upload-preflight-head {
    grid-column: 1 / -1;
  }
  .qm-upload-review-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .qm-upload-review-summary article:first-child {
    grid-column: 1 / -1;
  }
  .qm-upload-result .upload-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .main.upload-page .app-page-content {
    padding: 10px 8px 26px;
  }
  .qm-upload-stepper {
    margin-inline: -4px;
    padding: 14px;
    border-radius: 13px;
  }
  .qm-upload-stepper ol {
    min-width: 620px;
  }
  .qm-upload-primary-card,
  .qm-upload-preflight-card,
  .qm-column-mapping,
  .qm-upload-review-stage,
  .qm-upload-result {
    border-radius: 14px;
  }
  .qm-upload-control-dock {
    grid-template-columns: 1fr;
  }
  .qm-upload-status-box,
  .qm-upload-actions {
    grid-column: 1;
  }
  .qm-upload-status-box {
    grid-row: auto;
  }
  .qm-upload-actions button {
    width: 100%;
  }
  .qm-upload-preflight-card {
    display: block;
  }
  .qm-upload-preflight-card .qm-upload-template {
    margin-top: 18px;
  }
  .qm-upload-review-head {
    align-items: stretch;
    flex-direction: column;
  }
  .qm-upload-review-summary {
    grid-template-columns: 1fr;
  }
  .qm-upload-review-summary article:first-child {
    grid-column: auto;
  }
  .qm-upload-review-table-card {
    margin-inline: 14px;
  }
  .qm-upload-review-table-card > header,
  .qm-upload-review-footer,
  .qm-upload-review-footer > div {
    align-items: stretch;
    flex-direction: column;
  }
  .qm-column-mapping .column-mapping-grid-head {
    display: none;
  }
  .qm-column-mapping .column-mapping-rows {
    margin-top: 20px;
    border-radius: 10px;
  }
  .qm-column-mapping .column-mapping-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px;
  }
  .qm-column-mapping .column-mapping-required,
  .qm-column-mapping .column-mapping-select {
    grid-column: 1 / -1;
  }
  .qm-column-mapping .column-mapping-arrow {
    display: none;
  }
  .qm-column-mapping .column-mapping-status {
    justify-self: start;
  }
  .qm-column-mapping .column-mapping-footer,
  .qm-column-mapping .column-mapping-actions,
  .qm-upload-result .upload-result-head,
  .qm-upload-result .qm-upload-result-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .qm-column-mapping .column-mapping-actions button,
  .qm-upload-review-footer button {
    width: 100%;
  }
}
@media (max-width: 480px) {
  .qm-upload-dropzone {
    min-height: 260px;
  }
  .qm-upload-result .upload-result-grid {
    grid-template-columns: 1fr;
  }
}

/* Shared password visibility control */
.password-input-wrap {
  position: relative;
  width: 100%;
}
.password-input-wrap input {
  padding-right: 48px !important;
}
button.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px !important;
  padding: 0 !important;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #98a2b3;
  box-shadow: none !important;
  opacity: 0.72;
  filter: none !important;
  transform: translateY(-50%) !important;
  transition:
    background-color 0.14s ease,
    color 0.14s ease,
    opacity 0.14s ease !important;
}
button.password-visibility-toggle:hover:not(:disabled) {
  background: #f2f4f7;
  color: #667085;
  box-shadow: none !important;
  opacity: 0.92;
  filter: none !important;
  transform: translateY(-50%) !important;
}
button.password-visibility-toggle:active:not(:disabled) {
  background: #eaecf0;
  box-shadow: none !important;
  filter: none !important;
  transform: translateY(-50%) !important;
}
button.password-visibility-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(11, 116, 234, 0.18) !important;
  opacity: 0.92;
  transform: translateY(-50%) !important;
}
.password-visibility-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
  pointer-events: none;
}
.password-visibility-slash {
  opacity: 0;
  transition: opacity 0.14s ease;
}
.password-visibility-toggle.is-visible {
  color: #667085;
  opacity: 0.86;
}
.password-visibility-toggle.is-visible .password-visibility-slash {
  opacity: 1;
}
