:root {
  --bg-0: #08090b;
  --bg-1: #111317;
  --panel: #14171c;
  --panel-soft: #1b1f26;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 77, 97, 0.35);
  --ink: #f5f7fb;
  --muted: #a8b0bf;
  --alncom-red: #ff2f4f;
  --alncom-red-2: #c5112d;
  --ok: #28c07b;
  --warn: #ff4d61;
  --warn-soft: rgba(255, 77, 97, 0.18);
  --ok-soft: rgba(40, 192, 123, 0.2);
  --glow: 0 0 0 1px rgba(255, 77, 97, 0.2), 0 16px 42px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% -10%, rgba(255, 47, 79, 0.2), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(197, 17, 45, 0.18), transparent 34%),
    linear-gradient(150deg, var(--bg-0) 0%, var(--bg-1) 100%);
}

html {
  scroll-behavior: smooth;
}

.shell {
  display: grid;
  grid-template-columns: clamp(260px, 22vw, 320px) minmax(0, 1fr);
  min-height: 100vh;
}

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

.shell.reports-focus .sidebar {
  display: none;
}

.sidebar {
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 47, 79, 0.08) 0%, rgba(255, 47, 79, 0.01) 42%),
    #101217;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.brand-logo-light {
  display: none;
}

.brand h1,
.hero h2,
.section-head h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

.section-head h3 {
  font-size: clamp(1rem, 1.1vw + 0.65rem, 1.35rem);
  line-height: 1.12;
  text-wrap: balance;
}

.type-tabs-panel .section-head h3 {
  white-space: nowrap;
}

.type-tabs-panel .section-head .eyebrow {
  margin: 0 0 0.35rem;
  letter-spacing: 0.1em;
}

.brand h1 {
  font-size: 1.9rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #ff8fa0;
}

.lead,
.hero-copy,
.metric-label,
#last-refresh {
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.filters-panel {
  margin-top: 18px;
  padding: 16px;
}

#filters-panel {
  text-align: center;
}

#filters-panel .panel-title,
#filters-panel label span {
  text-align: center;
}

#material-types-panel .panel-title,
#material-types-panel .hero-copy,
#project-filters-panel .panel-title,
#project-filters-panel .hero-copy {
  text-align: center;
}

#filters-panel select {
  text-align: center;
  text-align-last: center;
}

.session-toggle-btn {
  padding: 0.58rem 0.86rem;
  font-size: 0.76rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #dbe2ee;
}

.session-toggle-btn:hover {
  color: #f4f7fc;
}

.session-toggle-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 77, 97, 0.24);
}

.panel-title,
.label,
table th {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-title {
  margin: 0 0 0.9rem;
  font-size: 0.76rem;
  color: #ff9bab;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.45rem;
  color: #e5eaf2;
}

.label {
  font-size: 0.72rem;
  color: var(--muted);
}

.action-link {
  display: inline-block;
  margin-top: 0.7rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
}

.filters-panel label {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.month-shortcuts {
  display: grid;
  grid-template-columns: 52px minmax(88px, 1fr) 52px;
  align-items: center;
  gap: 0.5rem;
  margin: -0.15rem 0 1rem;
  padding: 0.42rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.shortcut-btn {
  min-height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #1d222b;
  color: #e9f0fb;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#last-month-btn,
#next-month-btn {
  font-size: 1rem;
  line-height: 1;
  padding: 0.46rem 0;
}

#this-month-btn {
  background: linear-gradient(135deg, rgba(255, 47, 79, 0.28), rgba(197, 17, 45, 0.2));
  border-color: rgba(255, 77, 97, 0.8);
  color: #fff;
}

.shortcut-btn:hover {
  border-color: rgba(255, 255, 255, 0.36);
  background: #242b36;
}

#this-month-btn:hover {
  border-color: rgba(255, 77, 97, 0.95);
  background: linear-gradient(135deg, rgba(255, 47, 79, 0.36), rgba(197, 17, 45, 0.27));
}

.shortcut-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 47, 79, 0.24);
}

.filters-panel span {
  color: #e8edf5;
  font-size: 0.86rem;
}

select,
input,
button {
  font: inherit;
}

select,
input {
  width: 100%;
  padding: 0.72rem 0.84rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--panel-soft);
  color: var(--ink);
}

select:focus,
input:focus {
  outline: none;
  border-color: var(--alncom-red);
  box-shadow: 0 0 0 2px rgba(255, 47, 79, 0.18);
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.74rem 1.02rem;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--alncom-red), var(--alncom-red-2));
  color: #fff;
  font-weight: 700;
}

.btn-positive {
  background: linear-gradient(135deg, #2a8a62, #226f50) !important;
  border: 1px solid rgba(72, 165, 122, 0.65) !important;
  color: #e8f5ee !important;
}

.btn-danger {
  background: linear-gradient(135deg, #a64352, #843343) !important;
  border: 1px solid rgba(186, 97, 112, 0.65) !important;
  color: #f7eaed !important;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5fb;
  font-weight: 600;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.main-content {
  padding: 24px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) auto minmax(340px, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0 0 10px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.topbar.neutral {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.topbar-left {
  min-width: 0;
  display: flex;
  align-items: center;
}

.topbar-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.18rem;
  width: auto;
  max-width: 100%;
  overflow-x: auto;
  padding: 0 0 0.24rem;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.topbar-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #d3dced;
  border-radius: 10px 10px 0 0;
  padding: 0.56rem 1.08rem 0.62rem;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.topbar-tab:hover,
.topbar-tab:active {
  color: #dce3ef;
  text-decoration: none !important;
}

.topbar-tab:hover {
  border-color: rgba(255, 255, 255, 0.18);
  border-bottom-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.06);
  color: #eff4fc;
}

.topbar-tab.active {
  background: linear-gradient(180deg, rgba(255, 47, 79, 0.22), rgba(255, 47, 79, 0.08));
  color: #fff;
  border-color: rgba(255, 77, 97, 0.34);
  border-bottom-color: rgba(255, 77, 97, 0.95);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26), inset 0 -1px 0 rgba(255, 77, 97, 0.42);
}

.topbar-tab.disabled {
  opacity: 0.42;
  pointer-events: none;
  filter: saturate(0.75);
}

.topbar-tab:focus-visible {
  outline: none;
  border-bottom-color: rgba(255, 77, 97, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 47, 79, 0.2);
}

.topbar-summary {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
  justify-items: center;
  text-align: center;
  padding-top: 0;
}

.topbar-summary h2 {
  margin: 0;
  font-size: clamp(1.35rem, 1.5vw + 0.7rem, 1.95rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.topbar-summary .hero-copy {
  margin: 0;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-shrink: 0;
  padding-top: 0.18rem;
  position: relative;
}

.data-notice {
  margin: 0 0 12px;
  padding: 0.72rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 176, 81, 0.55);
  background: linear-gradient(135deg, rgba(255, 176, 81, 0.24), rgba(255, 140, 66, 0.16));
  color: #ffe8c9;
  font-size: 0.86rem;
  line-height: 1.35;
}

.data-notice strong {
  color: #fff2df;
  margin-right: 0.3rem;
}

#last-refresh {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #c7d0df;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.topbar-actions .session-toggle-btn,
.topbar-actions .theme-toggle-btn,
.topbar-actions #refresh-btn {
  min-height: 36px;
  padding: 0.5rem 0.92rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #f3f7ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.topbar-actions .session-toggle-btn:hover,
.topbar-actions .theme-toggle-btn:hover,
.topbar-actions #refresh-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.13);
}

.session-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 320px;
  max-width: min(92vw, 420px);
  padding: 12px;
  z-index: 20;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(20, 23, 29, 0.96), rgba(15, 18, 24, 0.97));
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.45);
}

.session-popover .profile-row {
  margin-bottom: 0.35rem;
  font-size: 0.86rem;
}

.session-popover .action-link {
  margin-top: 0.5rem;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 20px;
  border-color: var(--line-strong);
  box-shadow: var(--glow);
  background:
    linear-gradient(120deg, rgba(255, 47, 79, 0.12), rgba(255, 47, 79, 0.02) 45%),
    var(--panel);
}

.hero h2 {
  font-size: clamp(1.8rem, 3.8vw, 2.7rem);
}

.hero-meta {
  display: grid;
  justify-items: end;
  gap: 0.7rem;
}

.type-tabs-panel {
  margin-top: 14px;
  padding: 14px 16px 16px;
}

.page-view {
  margin-top: 14px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 190ms ease, transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.page-view.page-enter {
  opacity: 0;
  transform: translateY(10px);
}

.page-view.page-enter.page-enter-active {
  opacity: 1;
  transform: translateY(0);
}

.page-view.page-leave {
  opacity: 0;
  transform: translateY(-6px);
}

.page-view[hidden] {
  display: none;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.section-head.compact {
  margin-bottom: 0.65rem;
}

.type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

#material-types-panel .type-tabs {
  display: grid;
  gap: 0.42rem;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.sidebar-global-search input {
  width: 100%;
  text-align: center;
}

.sidebar-global-search input::placeholder {
  text-align: center;
}

.type-sidebar-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1a1e25;
  color: #dce3ef;
  border-radius: 10px;
  padding: 0.5rem 0.62rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.type-sidebar-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.34);
}

.type-sidebar-btn.active {
  border-color: rgba(255, 77, 97, 0.9);
  background: linear-gradient(135deg, rgba(255, 47, 79, 0.22), rgba(197, 17, 45, 0.18));
  color: #fff;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.metric-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.5rem;
  padding: 14px;
  min-height: 96px;
  background: #161a20;
  justify-items: center;
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

.metric-label {
  display: block;
  font-size: 0.72rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.metric-card strong {
  display: block;
  justify-self: center;
  align-self: end;
  font-size: clamp(1.45rem, 1.2vw + 1rem, 2rem);
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 14px;
}

.breakdown-panel {
  padding: 16px;
}

.full-span {
  grid-column: 1 / -1;
}

.master-stock-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)), #12161c;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
}

.master-stock-list-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

#page-zone-view {
  height: calc(100dvh - 190px);
  min-height: 0;
}

#page-zone-view .content-grid {
  height: 100%;
  min-height: 0;
}

#page-zone-view .breakdown-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#zone-grouped-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
}

#materials-grouped-body {
  transition: opacity 220ms ease, transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

#materials-grouped-body.is-filtering {
  opacity: 0.4;
  transform: translateY(8px);
}

#materials-grouped-body.is-entering .master-stock-card {
  animation: monthGroupIn 280ms both;
  animation-delay: calc(var(--stagger-index, 0) * 26ms);
}

.master-stock-search-inline {
  flex: 1 1 480px;
  max-width: 680px;
  min-width: 220px;
}

.month-search-row {
  justify-content: center;
}

.master-stock-search-inline input {
  width: 100%;
  text-align: center;
}

.master-stock-search-inline input::placeholder {
  text-align: center;
}

.master-stock-nav-buttons {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.55rem;
}

#master-stock-nav-panel {
  text-align: center;
}

#master-stock-nav-panel .panel-title,
#master-stock-nav-panel .hero-copy {
  text-align: center;
}

.master-stock-nav-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1a1e25;
  color: #dce3ef;
  border-radius: 10px;
  padding: 0.5rem 0.62rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.master-stock-nav-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.34);
}

.master-stock-nav-btn.active {
  border-color: rgba(255, 77, 97, 0.9);
  background: linear-gradient(135deg, rgba(255, 47, 79, 0.22), rgba(197, 17, 45, 0.18));
  color: #fff;
}

.switch-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #dce3ef;
  user-select: none;
}

.master-stock-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.master-stock-tools .ghost-btn,
.master-stock-tools .primary-btn {
  padding: 0.56rem 0.9rem;
  font-size: 0.78rem;
}

.master-stock-manager {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.4fr);
  gap: 0.75rem;
  margin: 0.5rem 0 0.8rem;
}

.master-stock-manager-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.68rem 0.72rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}

.master-stock-manager-head {
  margin-bottom: 0.55rem;
}

.master-stock-manager-head h4 {
  margin: 0;
  font-size: 0.98rem;
}

.master-stock-manager-head p {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.manager-form-row,
.manager-form-grid {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.56rem;
}

.manager-form-row {
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 1fr) auto;
}

.manager-form-grid {
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) minmax(120px, 1fr) auto;
  align-items: end;
}

.manager-form-grid label {
  display: grid;
  gap: 0.22rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.manager-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 220px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.015);
}

.manager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.44rem 0.56rem;
  border-bottom: 1px solid var(--line);
}

.manager-row:last-child {
  border-bottom: none;
}

.manager-row-main {
  display: grid;
  gap: 0.06rem;
  min-width: 0;
}

.manager-row-main strong,
.manager-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-row-main strong {
  font-size: 0.8rem;
}

.manager-row-main small {
  color: var(--muted);
  font-size: 0.68rem;
}

.manager-row-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.manager-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.14rem 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.manager-status-pill.iqgeo,
.manager-status-pill.protected {
  border-color: rgba(245, 158, 11, 0.42);
  color: #f1c37e;
  background: rgba(245, 158, 11, 0.12);
}

.manager-status-pill.custom {
  border-color: rgba(52, 211, 153, 0.42);
  color: #a9f5d5;
  background: rgba(52, 211, 153, 0.12);
}

.manager-status-pill.count {
  color: #cbd4e2;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.switch-ui {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #1a1e25;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dce3ef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  transition: transform 160ms ease, background 160ms ease;
}

.switch-control input:checked + .switch-ui {
  background: linear-gradient(135deg, var(--alncom-red), var(--alncom-red-2));
  border-color: rgba(255, 77, 97, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 47, 79, 0.18);
}

.switch-control input:checked + .switch-ui::after {
  transform: translateX(18px);
  background: #fff;
}

.switch-control:focus-within .switch-ui {
  box-shadow: 0 0 0 2px rgba(255, 47, 79, 0.24);
}

.master-stock-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 9px 10px;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.master-stock-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.36);
}

@keyframes monthGroupIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.master-stock-head {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.4rem;
  padding: 0.46rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.master-stock-head h4 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #f3f6fb;
  text-align: center;
}

.master-stock-meta {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  color: #b8c1cf;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.master-stock-table {
  table-layout: auto;
  width: auto;
  min-width: 100%;
}

.master-stock-table .col-spec-value {
  width: 58%;
}

.master-stock-table .col-stock-match {
  width: 34px;
}

.master-stock-table .col-retired {
  width: 96px;
}

.master-stock-table .col-holding-qty {
  width: 92px;
}

.master-stock-table .col-holding-plus,
.master-stock-table .col-holding-minus {
  width: 84px;
}

.master-stock-table .col-source {
  width: 72px;
}

.master-stock-table .col-actions {
  width: 158px;
}

.master-stock-table .col-held-value,
.master-stock-table .col-required-value {
  width: 120px;
}

.master-stock-table th,
.master-stock-table td {
  vertical-align: middle;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.master-stock-table th:nth-child(1),
.master-stock-table td:nth-child(1) {
  text-align: center;
  padding-left: 0.08rem;
  padding-right: 0.08rem;
  white-space: nowrap;
}

.master-stock-table th:nth-child(2),
.master-stock-table td:nth-child(2) {
  text-align: left;
  padding-left: 0.28rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.master-stock-table th:nth-child(3),
.master-stock-table td:nth-child(3),
.master-stock-table th:nth-child(4),
.master-stock-table td:nth-child(4),
.master-stock-table th:nth-child(5),
.master-stock-table td:nth-child(5) {
  text-align: center;
  white-space: nowrap;
}

.master-stock-table .money-col {
  white-space: nowrap;
}

.master-stock-source {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  text-transform: uppercase;
  color: #cbd4e2;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.3rem;
  white-space: nowrap;
}

.row-action-btn {
  padding: 0.25rem 0.52rem;
  font-size: 0.7rem;
  border-radius: 7px;
  min-width: 56px;
}

.holding-edit-row {
  background: rgba(255, 47, 79, 0.07);
}

.holding-qty-value {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.holding-qty-input {
  width: 100%;
  max-width: 96px;
  margin: 0 auto;
  display: block;
  padding: 0.36rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: #1a1f27;
  color: #fff;
  text-align: center;
  line-height: 1.25;
}

.holding-qty-input.readonly {
  opacity: 0.95;
  cursor: default;
}

.holding-delta-input {
  width: 100%;
  max-width: 74px;
  margin: 0 auto;
  display: block;
  padding: 0.32rem 0.38rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #131821;
  color: #fff;
  text-align: center;
  line-height: 1.2;
}

.holding-delta-input.plus {
  border-color: rgba(40, 192, 123, 0.55);
  background: rgba(40, 192, 123, 0.14);
  color: #ccf7e4;
}

.holding-delta-input.minus {
  border-color: rgba(255, 77, 97, 0.58);
  background: rgba(255, 77, 97, 0.14);
  color: #ffd4da;
}

.holding-delta-input.plus:focus {
  outline: none;
  border-color: rgba(40, 192, 123, 0.9);
  box-shadow: 0 0 0 2px rgba(40, 192, 123, 0.2);
}

.holding-delta-input.minus:focus {
  outline: none;
  border-color: rgba(255, 77, 97, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 77, 97, 0.2);
}

.holding-qty-input:focus {
  outline: none;
  border-color: rgba(255, 77, 97, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 47, 79, 0.2);
}

.holding-qty-input,
.holding-delta-input {
  -moz-appearance: textfield;
  appearance: textfield;
}

.holding-qty-input::-webkit-outer-spin-button,
.holding-qty-input::-webkit-inner-spin-button,
.holding-delta-input::-webkit-outer-spin-button,
.holding-delta-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bom-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.07) inset;
}

.bom-dot.live {
  background: #28c07b;
  box-shadow: 0 0 10px rgba(40, 192, 123, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.07) inset;
}

.bom-dot.missing {
  background: #ff4d61;
  box-shadow: 0 0 10px rgba(255, 77, 97, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.07) inset;
}

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

table th,
table td {
  padding: 0.72rem 0.55rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.9rem;
}

table th {
  font-size: 0.72rem;
  color: #b8c1cf;
}

table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

table tbody tr {
  transition: background-color 150ms ease, color 150ms ease;
}

.month-materials-table {
  table-layout: fixed;
  width: 100%;
}

.month-materials-table .col-specification {
  width: 30%;
}

.month-materials-table .col-planned-qty,
.month-materials-table .col-installed-qty,
.month-materials-table .col-remaining-required,
.month-materials-table .col-current-stock,
.month-materials-table .col-stock-gap,
.month-materials-table .col-stock-status,
.month-materials-table .col-total-length,
.month-materials-table .col-remaining-length {
  width: 8.75%;
}

.month-materials-table th:nth-child(n + 2),
.month-materials-table td:nth-child(n + 2) {
  text-align: center;
}

.value-installed {
  color: #9df0c8;
  font-weight: 700;
}

.value-remaining {
  color: #ff9aa8;
  font-weight: 700;
  background: var(--warn-soft);
  border-radius: 8px;
  padding: 0.1rem 0.4rem;
  display: inline-block;
}

.value-remaining.zero {
  color: #86e7b7;
  background: var(--ok-soft);
}

.install-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.install-status.yes {
  color: #bdf3d8;
  background: rgba(40, 192, 123, 0.16);
  border: 1px solid rgba(40, 192, 123, 0.45);
}

.install-status.no {
  color: #ffd0d7;
  background: rgba(255, 77, 97, 0.16);
  border: 1px solid rgba(255, 77, 97, 0.45);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.table-wrap {
  overflow-x: auto;
}

.month-detail-row {
  cursor: pointer;
}

.month-detail-row.active {
  background: rgba(255, 47, 79, 0.14) !important;
}

.zone-detail-row {
  cursor: pointer;
}

.zone-detail-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.zone-card-head {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.02rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f3f6fb;
  cursor: pointer;
  transition: transform 150ms ease;
}

.zone-card-head:hover {
  transform: translateY(-1px);
}

.zone-card-head h4 {
  margin: 0;
  font-size: 1.34rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #f3f6fb;
  text-align: center;
  white-space: nowrap;
}

.zone-head-main {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.zone-head-pills {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.34rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.zone-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.24);
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.zone-toggle-inline {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  margin-right: 0.1rem;
  padding: 0;
}

.zone-metrics-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  flex-wrap: wrap;
  margin-bottom: 0.52rem;
}

.zone-metric-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.zone-progress-bar {
  margin: 0 0 0.28rem;
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 0.44rem;
}

.zone-title-inline {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: #f3f6fb;
  font-size: 1.34rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  width: clamp(170px, 16vw, 250px);
  min-width: clamp(170px, 16vw, 250px);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0;
  margin-right: 0.08rem;
  cursor: pointer;
  white-space: nowrap;
}

.zone-title-inline:hover {
  filter: brightness(1.08);
}

.zone-progress-pills {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.34rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.zone-progress-track {
  width: 100%;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(40, 192, 123, 0.36);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(40, 192, 123, 0.16);
  overflow: hidden;
}

.zone-progress-fill {
  height: 100%;
  background: rgba(40, 192, 123, 0.14);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(40, 192, 123, 0.2);
  opacity: 0.82;
}

.zone-progress-label {
  margin-top: 0;
  text-align: right;
  font-size: 0.68rem;
  color: #cfd7e4;
  font-weight: 700;
  white-space: nowrap;
}

.zone-installed {
  color: #9df0c8;
  border-color: rgba(40, 192, 123, 0.36);
  background: rgba(40, 192, 123, 0.14);
}

.zone-installed-cost {
  color: #9dd9ff;
  border-color: rgba(92, 166, 255, 0.34);
  background: rgba(92, 166, 255, 0.14);
}

.zone-outstanding {
  color: #ffb4be;
  border-color: rgba(255, 77, 97, 0.34);
  background: rgba(255, 77, 97, 0.12);
}

.zone-required {
  color: #d6deea;
  border-color: rgba(167, 182, 203, 0.3);
  background: rgba(118, 132, 154, 0.12);
}

.zone-current {
  color: #9dd9ff;
  border-color: rgba(92, 166, 255, 0.34);
  background: rgba(92, 166, 255, 0.14);
}

.zone-planned-value {
  color: #f2d49a;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.13);
}

.zone-short {
  color: #ffb4be;
  border-color: rgba(255, 77, 97, 0.42);
  background: rgba(255, 77, 97, 0.16);
}

.zone-covered {
  color: #b6f2d8;
  border-color: rgba(40, 192, 123, 0.42);
  background: rgba(40, 192, 123, 0.16);
}

.zone-material-count {
  color: #d7deea;
}

.stock-gap {
  font-weight: 700;
}

.stock-gap.negative {
  color: #ff9aa8;
}

.stock-gap.positive {
  color: #9df0c8;
}

.coverage-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 0.14rem 0.46rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.coverage-chip.short {
  color: #ffd0d7;
  background: rgba(255, 77, 97, 0.16);
  border: 1px solid rgba(255, 77, 97, 0.45);
}

.coverage-chip.covered {
  color: #bdf3d8;
  background: rgba(40, 192, 123, 0.16);
  border: 1px solid rgba(40, 192, 123, 0.45);
}

.coverage-chip.missing {
  color: #ffdca3;
  background: rgba(255, 183, 77, 0.13);
  border: 1px solid rgba(255, 183, 77, 0.4);
}

.reports-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(18, 22, 28, 0.76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.reports-panel::before {
  content: none;
}

.reports-panel > * {
  position: relative;
}

.reports-head {
  align-items: flex-start;
}

.reports-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(180px, 220px) auto;
  gap: 0.7rem;
  align-items: end;
}

.reports-filter-bar label {
  margin: 0;
  text-align: center;
}

.reports-filter-actions {
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.55rem;
}

.reports-filter-actions .ghost-btn {
  min-height: 42px;
  padding-inline: 1rem;
}

.reports-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin: 0.2rem 0 0.9rem;
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 183, 77, 0.38);
  background:
    linear-gradient(90deg, rgba(255, 183, 77, 0.16), rgba(255, 183, 77, 0.06)),
    rgba(255, 255, 255, 0.035);
  color: #ffdca3;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.reports-active-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
}

.reports-active-filter span {
  padding: 0.36rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 77, 97, 0.34);
  background: rgba(255, 77, 97, 0.1);
  color: #ffd6dd;
  font-size: 0.74rem;
  font-weight: 800;
}

.reports-insight-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 0.9rem 0 0.9rem;
}

.report-insight-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  align-content: center;
  min-height: 118px;
  padding: 0.82rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(21, 26, 33, 0.64);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.report-insight-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 77, 97, 0.1), rgba(255, 77, 97, 0.9), rgba(255, 77, 97, 0.1));
}

.report-insight-card.tone-ok::before {
  background: linear-gradient(90deg, rgba(40, 192, 123, 0.08), rgba(40, 192, 123, 0.86), rgba(40, 192, 123, 0.08));
}

.report-insight-card.tone-amber::before,
.report-insight-card.tone-cost::before {
  background: linear-gradient(90deg, rgba(255, 183, 77, 0.08), rgba(255, 183, 77, 0.78), rgba(255, 183, 77, 0.08));
}

.report-insight-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

.report-insight-card span,
.report-insight-card small {
  color: #aeb9ca;
  text-align: center;
}

.report-insight-card span {
  display: block;
  margin-bottom: 0.48rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.report-insight-card strong {
  display: block;
  max-width: 100%;
  margin-bottom: 0.42rem;
  overflow: hidden;
  color: #fff;
  font-size: clamp(1.15rem, 1.2vw + 0.85rem, 1.75rem);
  line-height: 1.02;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.reports-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 0.8rem 0 1rem;
}

.report-snapshot-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  min-height: 96px;
  padding: 0.82rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(21, 26, 33, 0.64);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.report-snapshot-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 77, 97, 0.1), rgba(255, 77, 97, 0.9), rgba(255, 77, 97, 0.1));
}

.report-snapshot-card.tone-ok::before {
  background: linear-gradient(90deg, rgba(40, 192, 123, 0.08), rgba(40, 192, 123, 0.86), rgba(40, 192, 123, 0.08));
}

.report-snapshot-card.tone-cost::before {
  background: linear-gradient(90deg, rgba(255, 183, 77, 0.08), rgba(255, 183, 77, 0.78), rgba(255, 183, 77, 0.08));
}

.report-snapshot-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

.report-snapshot-card span,
.report-snapshot-card small {
  color: #aeb9ca;
}

.report-snapshot-card span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.report-snapshot-card strong {
  font-size: clamp(1.25rem, 1vw + 0.95rem, 1.8rem);
  line-height: 1;
}

.report-snapshot-card small {
  font-size: 0.74rem;
}

.reports-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 0.85rem;
  align-items: stretch;
}

.report-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 18px;
  background: rgba(20, 26, 34, 0.62);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.report-card-wide {
  grid-column: auto;
}

.report-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.report-card-head h4 {
  margin: 0;
  font-size: 1.08rem;
}

.report-card-copy {
  margin: 0.22rem 0 0;
  color: #c0cad9;
  font-size: 0.78rem;
}

.reports-attention-tools,
.report-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.segmented-control {
  display: inline-flex;
  gap: 0.18rem;
  padding: 0.22rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.segmented-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.48rem 0.74rem;
  background: transparent;
  color: #c5cfdf;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.segmented-btn:hover {
  transform: translateY(-1px);
  color: #fff;
}

.segmented-btn.active {
  background: rgba(197, 17, 45, 0.9);
  color: #fff;
  box-shadow: 0 6px 14px rgba(197, 17, 45, 0.2);
}

.report-card-head .eyebrow {
  margin-bottom: 0.25rem;
}

.report-mini-btn {
  padding: 0.45rem 0.7rem;
  font-size: 0.72rem;
}

.report-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.4rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #b9c4d3;
  font-size: 0.7rem;
  font-weight: 700;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.planned {
  background: var(--alncom-red);
  box-shadow: 0 0 10px rgba(255, 47, 79, 0.52);
}

.legend-dot.installed {
  background: var(--ok);
  box-shadow: 0 0 10px rgba(40, 192, 123, 0.48);
}

.report-chart {
  display: grid;
  gap: 0.54rem;
  min-height: 280px;
}

.report-trend-row,
.report-risk-row {
  display: grid;
  grid-template-columns: minmax(128px, 0.78fr) minmax(180px, 2.25fr) minmax(122px, 0.78fr);
  gap: 0.72rem;
  align-items: center;
}

.report-trend-row {
  min-height: 30px;
  padding: 0.1rem 0.2rem;
  border-radius: 12px;
  transition: background 160ms ease, transform 160ms ease;
}

.report-trend-row:hover {
  background: rgba(255, 255, 255, 0.035);
  transform: translateX(2px);
}

.report-trend-row.selected {
  background: rgba(255, 77, 97, 0.07);
}

.report-trend-row.selected .report-bar-label {
  color: #fff;
}

.report-bar-label,
.report-bar-value,
.report-risk-value {
  font-size: 0.8rem;
  font-weight: 700;
}

.report-bar-label {
  color: #dbe4f1;
  text-align: left;
}

.report-bar-value {
  display: grid;
  gap: 0.08rem;
  justify-items: end;
  text-align: right;
  color: #edf4ff;
}

.report-bar-value small {
  color: #a8b0bf;
  font-size: 0.66rem;
  font-weight: 500;
}

.report-bar-track,
.report-risk-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.36);
}

.report-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  transition: width 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.report-bar.primary {
  background: rgba(255, 77, 97, 0.92);
  box-shadow: none;
}

.report-bar.secondary {
  height: 7px;
  top: 5.5px;
  bottom: auto;
  background: rgba(40, 192, 123, 0.9);
  box-shadow: none;
}

.report-bar-glow {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 12px rgba(40, 192, 123, 0.78);
  transform: translate(-50%, -50%);
}

.report-risk-row {
  width: 100%;
  padding: 0.62rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.012);
  color: inherit;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.report-risk-row:hover,
.report-risk-row.active {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

.report-risk-label {
  display: grid;
  gap: 0.12rem;
  text-align: left;
}

.report-risk-label strong {
  font-size: 0.83rem;
}

.report-risk-label small {
  color: #c0cad9;
  font-size: 0.66rem;
  font-weight: 600;
}

.report-risk-bar {
  display: block;
  height: 100%;
  min-width: 6px;
  border-radius: inherit;
  transition: width 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.report-risk-bar.short {
  background: rgba(255, 77, 97, 0.92);
}

.report-risk-bar.covered {
  background: rgba(40, 192, 123, 0.9);
}

.report-risk-value.negative {
  color: #ff9aa8;
}

.report-risk-value.positive {
  color: #9df0c8;
}

.reports-table {
  table-layout: fixed;
}

.reports-table th,
.reports-table td {
  font-size: 0.82rem;
}

.reports-table th:first-child,
.reports-table td:first-child {
  text-align: left !important;
}

.reports-table th:nth-child(n + 2),
.reports-table td:nth-child(n + 2) {
  text-align: center !important;
}

.report-cluster-row,
.report-attention-row {
  cursor: pointer;
}

.report-cluster-row {
  position: relative;
  background: rgba(255, 255, 255, 0.01);
}

.report-cluster-row.active,
.report-attention-row:hover,
.report-cluster-row:hover {
  background: rgba(255, 255, 255, 0.045);
}

.reports-attention-card {
  margin: 0.85rem 0;
  border-color: rgba(255, 77, 97, 0.22);
  background: rgba(20, 26, 34, 0.6);
}

.reports-attention-card.collapsed .table-wrap {
  display: none;
}

.reports-attention-card.collapsed .report-card-head {
  align-items: center;
}

.reports-attention-card .report-card-head button {
  padding: 0.32rem 0.8rem;
  font-size: 0.75rem;
}

.reports-attention-card .report-card-head {
  position: relative;
  justify-content: center;
  padding-right: 0;
}

.reports-attention-head {
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(255, 77, 97, 0.32);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 77, 97, 0.2), rgba(255, 77, 97, 0.06) 38%, rgba(255, 77, 97, 0.02)),
    rgba(14, 18, 24, 0.84);
  box-shadow: inset 4px 0 0 rgba(255, 77, 97, 0.65);
}

.reports-attention-head:focus-visible {
  outline: 2px solid rgba(255, 77, 97, 0.72);
  outline-offset: 4px;
  border-radius: 10px;
}

.reports-attention-head .eyebrow {
  color: #ff8093;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 800;
}

.reports-attention-head #reports-attention-title {
  color: #ff4d61;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.46rem;
  line-height: 1.08;
  margin-top: 0.1rem;
}

.reports-attention-head .report-card-copy {
  color: #fca5b3;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0.32rem;
}

.reports-attention-card .report-card-head > div:first-child {
  text-align: center;
}

.reports-attention-subheader td {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(238, 246, 255, 0.95);
  font-weight: 800;
  padding: 0.44rem 0.38rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(14, 20, 28, 0.62);
  text-align: center;
}

.reports-top-shortages {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.reports-top-shortages-head {
  margin-bottom: 0.5rem;
  color: #ff9aa8;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.top-shortage-btn {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: center;
  width: 100%;
  margin-bottom: 0.38rem;
  padding: 0.5rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.028);
  color: #edf4ff;
  text-align: left;
  cursor: pointer;
}

.top-shortage-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-shortage-btn strong {
  color: #ff9aa8;
}

.reports-attention-table th:first-child,
.reports-attention-table td:first-child {
  width: 22%;
}

.reports-attention-table {
  table-layout: auto;
}

.reports-attention-table th:nth-child(4),
.reports-attention-table td:nth-child(4) {
  width: 260px;
}

.coverage-meter {
  display: inline-block;
  width: min(258px, 100%);
  height: 8px;
  overflow: hidden;
  vertical-align: middle;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4);
}

.coverage-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(40, 192, 123, 0.94), rgba(157, 240, 200, 0.74));
}

.coverage-label {
  display: block;
  margin-top: 0.18rem;
  color: #a8b0bf;
  font-size: 0.66rem;
  font-weight: 700;
}

.reports-attention-group-row td {
  border-bottom: 0;
}

.reports-attention-group-cell {
  padding: 0.62rem 0;
  color: #f2f7ff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.reports-attention-table .reports-attention-group-row td.reports-attention-group-cell {
  text-align: center !important;
}

.stock-missing-pill,
.next-impact-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.stock-missing-pill {
  color: #ffdca3;
  background: rgba(255, 183, 77, 0.12);
  border: 1px solid rgba(255, 183, 77, 0.36);
}

.next-impact-pill {
  color: #cfe8ff;
  background: rgba(90, 160, 255, 0.12);
  border: 1px solid rgba(90, 160, 255, 0.34);
}

.report-row-actions .report-mini-btn {
  padding: 0.34rem 0.5rem;
}

.report-mini-btn.amber {
  color: #ffdca3;
  border-color: rgba(255, 183, 77, 0.34);
  background: rgba(255, 183, 77, 0.09);
}

.reports-cluster-drawer {
  margin-top: 0.85rem;
  border-color: rgba(90, 160, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(90, 160, 255, 0.07), rgba(255, 255, 255, 0.014) 42%),
    rgba(13, 17, 23, 0.78);
}

.reports-cluster-detail-table th:first-child,
.reports-cluster-detail-table td:first-child {
  width: 44%;
}

.reports-cluster-table-wrap {
  max-height: 430px;
  overflow: auto;
}

.reports-cluster-table-wrap table {
  table-layout: fixed;
}

.cluster-risk-chart {
  min-height: 520px;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 170ms ease;
}

.detail-modal[hidden] {
  display: none !important;
}

.detail-modal.is-open,
.detail-modal.is-closing {
  opacity: 1;
}

.detail-modal.is-open {
  pointer-events: auto;
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.74);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 170ms ease;
}

.detail-modal-dialog {
  position: relative;
  width: min(1200px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 16px;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(120deg, rgba(255, 47, 79, 0.07), rgba(255, 47, 79, 0.02) 42%),
    #12161d;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.58);
  transform: translateY(12px) scale(0.985);
  opacity: 0;
  transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 180ms ease;
}

.detail-modal.is-open .detail-modal-backdrop,
.detail-modal.is-closing .detail-modal-backdrop {
  opacity: 1;
}

.detail-modal.is-open .detail-modal-dialog,
.detail-modal.is-closing .detail-modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.detail-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.detail-modal-close {
  padding: 0.48rem 0.86rem;
  font-size: 0.76rem;
  border-radius: 999px;
}

.detail-totals-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.62rem;
  margin: 0.2rem 0 0.85rem;
}

.detail-total-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.2rem;
  min-height: 64px;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(92, 166, 255, 0.22);
  border-radius: 12px;
  background: rgba(8, 13, 22, 0.72);
  text-align: center;
}

.detail-total-card span {
  font-size: 0.67rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.detail-total-card strong {
  font-size: 1rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
}

.empty-state {
  padding: 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.compact {
  font-size: 0.9rem;
}

@media (max-width: 1320px) {
  .shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .topbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .main-content,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .topbar-summary {
    justify-items: start;
    text-align: left;
  }

  .master-stock-search-inline {
    flex: 1 1 100%;
    max-width: none;
    order: 3;
  }

  .topbar-summary .hero-copy {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .reports-filter-bar,
  .reports-grid {
    grid-template-columns: 1fr;
  }

  .master-stock-manager {
    grid-template-columns: 1fr;
  }

  .manager-form-row,
  .manager-form-grid {
    grid-template-columns: 1fr;
  }

  .reports-filter-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

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

  .reports-attention-card .report-card-head {
    padding-right: 0;
    justify-content: flex-start;
  }

  .reports-attention-card .report-card-head > div:first-child {
    width: 100%;
    text-align: left;
  }

  .report-trend-row,
  .report-risk-row {
    grid-template-columns: 1fr;
  }

  .report-bar-value {
    justify-items: center;
    text-align: center;
  }

  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .detail-totals-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    min-height: 88px;
  }

  .type-sidebar-btn {
    font-size: 0.72rem;
  }

  #page-zone-view {
    height: calc(100dvh - 160px);
  }
}

@media (max-width: 540px) {
  .detail-totals-strip {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}

/* Global alignment rule:
   center all text/number entry fields and table columns,
   except first table column which stays left-aligned. */
input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  text-align: center;
}

select {
  text-align-last: center;
}

table th,
table td {
  text-align: center;
}

table th:first-child,
table td:first-child {
  text-align: left;
}

/* Enforce override for table variants with custom per-column rules. */
.master-stock-table th:nth-child(1),
.master-stock-table td:nth-child(1),
.month-materials-table th:nth-child(1),
.month-materials-table td:nth-child(1) {
  text-align: left !important;
}

.master-stock-table th:nth-child(2),
.master-stock-table td:nth-child(2) {
  text-align: left !important;
}

.master-stock-table th:nth-child(n + 2),
.master-stock-table td:nth-child(n + 2),
.month-materials-table th:nth-child(n + 2),
.month-materials-table td:nth-child(n + 2) {
  text-align: center !important;
}

/* Keep Master Stock Spec Value column left-aligned (column 2) */
.master-stock-table th:nth-child(2),
.master-stock-table td:nth-child(2) {
  text-align: left !important;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg-0: #f6f8fc;
  --bg-1: #e8eef6;
  --panel: #ffffff;
  --panel-soft: #f1f5fa;
  --line: rgba(15, 23, 42, 0.12);
  --line-strong: rgba(214, 31, 60, 0.24);
  --ink: #102033;
  --muted: #5d6b80;
  --glow: 0 0 0 1px rgba(15, 23, 42, 0.05), 0 16px 36px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 15% -10%, rgba(214, 31, 60, 0.08), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(214, 31, 60, 0.05), transparent 34%),
    linear-gradient(150deg, var(--bg-0) 0%, var(--bg-1) 100%);
}

html[data-theme="light"] .sidebar {
  background:
    linear-gradient(180deg, rgba(214, 31, 60, 0.06) 0%, rgba(214, 31, 60, 0.01) 42%),
    #f7f9fc;
}

html[data-theme="light"] .panel,
html[data-theme="light"] .hero,
html[data-theme="light"] .report-card,
html[data-theme="light"] .report-snapshot-card,
html[data-theme="light"] .report-insight-card,
html[data-theme="light"] .session-popover,
html[data-theme="light"] .filters-panel,
html[data-theme="light"] .topbar-nav,
html[data-theme="light"] .detail-modal-dialog,
html[data-theme="light"] .master-stock-card,
html[data-theme="light"] .master-stock-manager-card,
html[data-theme="light"] .manager-list,
html[data-theme="light"] .master-stock-nav-btn,
html[data-theme="light"] .type-sidebar-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--line);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .type-sidebar-btn,
html[data-theme="light"] .master-stock-nav-btn,
html[data-theme="light"] .shortcut-btn {
  background: #eef3f9;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

html[data-theme="light"] .type-sidebar-btn:hover,
html[data-theme="light"] .master-stock-nav-btn:hover,
html[data-theme="light"] .shortcut-btn:hover {
  background: #e3eaf4;
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

html[data-theme="light"] .type-sidebar-btn.active,
html[data-theme="light"] .master-stock-nav-btn.active,
html[data-theme="light"] #this-month-btn {
  background: linear-gradient(135deg, rgba(214, 31, 60, 0.16), rgba(214, 31, 60, 0.08));
  border-color: rgba(214, 31, 60, 0.28);
  color: #111827;
}

html[data-theme="light"] .switch-control {
  color: #0f172a;
}

html[data-theme="light"] .switch-ui {
  background: #dbe5f1;
  border-color: rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .switch-ui::after {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

html[data-theme="light"] .topbar-nav {
  background: rgba(255, 255, 255, 0.72);
  border-bottom-color: var(--line);
}

html[data-theme="light"] .topbar-tab {
  color: #334155;
}

html[data-theme="light"] .topbar-tab:hover {
  background: rgba(15, 23, 42, 0.05);
  color: #111827;
}

html[data-theme="light"] .topbar-tab.active {
  background: linear-gradient(135deg, rgba(214, 31, 60, 0.14), rgba(214, 31, 60, 0.08));
  color: #111827;
  border-color: rgba(214, 31, 60, 0.25);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08), inset 0 -1px 0 rgba(214, 31, 60, 0.34);
}

html[data-theme="light"] .ghost-btn,
html[data-theme="light"] #last-refresh {
  background: rgba(15, 23, 42, 0.05);
  color: #1f2937;
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .ghost-btn:hover {
  background: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] input,
html[data-theme="light"] select {
  background: #fff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .filters-panel span,
html[data-theme="light"] .switch-control,
html[data-theme="light"] .label,
html[data-theme="light"] .panel-title,
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .manager-row-main small,
html[data-theme="light"] .topbar-summary .hero-copy,
html[data-theme="light"] .report-card-copy,
html[data-theme="light"] .report-insight-card span,
html[data-theme="light"] .report-insight-card small,
html[data-theme="light"] .report-snapshot-card span,
html[data-theme="light"] .report-snapshot-card small,
html[data-theme="light"] .report-risk-label small,
html[data-theme="light"] .report-bar-value small,
html[data-theme="light"] .coverage-label,
html[data-theme="light"] .metric-label,
html[data-theme="light"] .hero-copy,
html[data-theme="light"] .table-wrap th,
html[data-theme="light"] .table-wrap td {
  color: #334155;
}

html[data-theme="light"] .brand h1,
html[data-theme="light"] .topbar-summary h2,
html[data-theme="light"] .report-snapshot-card strong,
html[data-theme="light"] .report-insight-card strong,
html[data-theme="light"] .report-card-head h4,
html[data-theme="light"] .section-head h3,
html[data-theme="light"] .panel,
html[data-theme="light"] .master-stock-card,
html[data-theme="light"] .master-stock-manager-card {
  color: #0f172a;
}

html[data-theme="light"] .brand-logo-dark {
  display: none;
}

html[data-theme="light"] .brand-logo-light {
  display: inline-block;
}

html[data-theme="light"] .manager-status-pill {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.18);
  color: #1f2937;
}

html[data-theme="light"] .manager-status-pill.custom {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.38);
  color: #065f46;
}

html[data-theme="light"] .manager-status-pill.iqgeo,
html[data-theme="light"] .manager-status-pill.protected {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.38);
  color: #92400e;
}

html[data-theme="light"] .zone-card-head {
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .zone-card-head h4 {
  color: #0f172a;
}

html[data-theme="light"] .zone-title-inline {
  color: #0f172a;
}

html[data-theme="light"] .zone-toggle-icon {
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.2);
  background: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .zone-metric-pill {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .zone-planned-value {
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.16);
}

html[data-theme="light"] .zone-progress-track {
  border-color: rgba(22, 163, 74, 0.38);
  background: rgba(22, 163, 74, 0.12);
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.12);
}

html[data-theme="light"] .zone-progress-fill {
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.88), rgba(16, 185, 129, 0.88));
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

html[data-theme="light"] .zone-progress-label {
  color: #1f2937;
}

html[data-theme="light"] .zone-short {
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.16);
}

html[data-theme="light"] .zone-covered {
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(16, 185, 129, 0.16);
}

html[data-theme="light"] .report-trend-row:hover,
html[data-theme="light"] .report-risk-row:hover,
html[data-theme="light"] .report-cluster-row:hover,
html[data-theme="light"] .report-attention-row:hover,
html[data-theme="light"] .report-trend-row.selected,
html[data-theme="light"] .report-cluster-row.active {
  background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .install-status.yes,
html[data-theme="light"] .coverage-chip.covered,
html[data-theme="light"] .stock-missing-pill,
html[data-theme="light"] .next-impact-pill,
html[data-theme="light"] .coverage-chip.short,
html[data-theme="light"] .coverage-chip.missing,
html[data-theme="light"] .install-status.no,
html[data-theme="light"] .reports-active-filter span {
  border-width: 1px;
  font-weight: 800;
}

html[data-theme="light"] .install-status.yes,
html[data-theme="light"] .coverage-chip.covered {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.42);
  color: #065f46;
}

html[data-theme="light"] .install-status.no,
html[data-theme="light"] .coverage-chip.short {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.42);
  color: #991b1b;
}

html[data-theme="light"] .coverage-chip.missing,
html[data-theme="light"] .stock-missing-pill,
html[data-theme="light"] .reports-warning,
html[data-theme="light"] .next-impact-pill {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.36);
  color: #92400e;
}

html[data-theme="light"] .reports-active-filter span {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.28);
  color: #991b1b;
}

html[data-theme="light"] .report-bar-track,
html[data-theme="light"] .report-risk-track,
html[data-theme="light"] .coverage-meter {
  background: rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 4px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .value-installed {
  color: #047857;
  font-weight: 800;
  text-shadow: 0 0 0 transparent;
}

html[data-theme="light"] .value-remaining {
  color: #b4233e;
  font-weight: 800;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.34);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  min-width: 30px;
}

html[data-theme="light"] .value-remaining.zero {
  color: #065f46;
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.36);
}

html[data-theme="light"] .holding-delta-input.plus {
  border-color: rgba(34, 146, 90, 0.42);
  background: rgba(34, 146, 90, 0.14);
  color: #0f5c35;
  -webkit-text-fill-color: #0f5c35;
}

html[data-theme="light"] .holding-delta-input.minus {
  border-color: rgba(193, 28, 57, 0.42);
  background: rgba(193, 28, 57, 0.14);
  color: #8c1a2e;
  -webkit-text-fill-color: #8c1a2e;
}

html[data-theme="light"] .report-insight-card::before,
html[data-theme="light"] .report-snapshot-card::before {
  opacity: 0.9;
}

html[data-theme="light"] .report-legend {
  background: rgba(15, 23, 42, 0.04);
  color: #334155;
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .legend-dot.planned {
  box-shadow: 0 0 0 2px rgba(255, 47, 79, 0.12), 0 0 10px rgba(255, 47, 79, 0.25);
}

html[data-theme="light"] .legend-dot.installed {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12), 0 0 10px rgba(16, 185, 129, 0.25);
}

html[data-theme="light"] .report-chart {
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
}

html[data-theme="light"] .report-bar-label,
html[data-theme="light"] .report-bar-value,
html[data-theme="light"] .report-risk-value,
html[data-theme="light"] .report-trend-row.selected .report-bar-label {
  color: #0f172a;
}

html[data-theme="light"] .report-bar-value small,
html[data-theme="light"] .report-risk-label small,
html[data-theme="light"] .coverage-label {
  color: #475569;
}

html[data-theme="light"] .report-bar-track,
html[data-theme="light"] .report-risk-track {
  box-shadow: inset 0 1px 4px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .reports-warning {
  background: rgba(255, 183, 77, 0.12);
  color: #8a5b14;
  border-color: rgba(255, 183, 77, 0.35);
}

html[data-theme="light"] .detail-modal-dialog {
  background: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .data-notice {
  border-color: rgba(180, 83, 9, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(249, 115, 22, 0.14));
  color: #7c2d12;
}

html[data-theme="light"] .data-notice strong {
  color: #9a3412;
}

html[data-theme="light"] .report-attention-card {
  background: rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .reports-attention-head {
  border-color: rgba(193, 28, 57, 0.28);
  background:
    linear-gradient(90deg, rgba(193, 28, 57, 0.14), rgba(193, 28, 57, 0.05) 38%, rgba(193, 28, 57, 0.02)),
    rgba(255, 255, 255, 0.86);
  box-shadow: inset 4px 0 0 rgba(193, 28, 57, 0.58);
}

html[data-theme="light"] .reports-attention-head .eyebrow {
  color: #9f1239;
  font-size: 0.78rem;
  font-weight: 800;
}

html[data-theme="light"] .reports-attention-head #reports-attention-title {
  color: #be123c;
  font-size: 1.42rem;
  line-height: 1.08;
}

html[data-theme="light"] .reports-attention-head .report-card-copy {
  color: #7f1d1d;
  font-size: 0.98rem;
  font-weight: 600;
}

html[data-theme="light"] .reports-attention-subheader td {
  color: #1f2a3a;
  border-top-color: rgba(15, 23, 42, 0.18);
  border-bottom-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .reports-attention-group-cell {
  color: #0f172a;
  border-top-color: rgba(15, 23, 42, 0.18);
  border-bottom-color: rgba(15, 23, 42, 0.14);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.03));
}

html[data-theme="light"] .report-insight-card span,
html[data-theme="light"] .report-snapshot-card span {
  color: #475569;
}

html[data-theme="light"] .report-insight-card small,
html[data-theme="light"] .report-snapshot-card small,
html[data-theme="light"] .report-card-copy,
html[data-theme="light"] .coverage-label,
html[data-theme="light"] .report-risk-label small,
html[data-theme="light"] .report-bar-value small,
html[data-theme="light"] .metric-label {
  color: #475569;
}

html[data-theme="light"] .report-snapshot-card strong,
html[data-theme="light"] .report-insight-card strong,
html[data-theme="light"] .topbar-summary h2,
html[data-theme="light"] .section-head h3,
html[data-theme="light"] .report-card-head h4,
html[data-theme="light"] .brand h1 {
  color: #0f172a;
}

html[data-theme="light"] .reports-top-shortages-head {
  color: #be123c;
  font-weight: 900;
}

html[data-theme="light"] .top-shortage-btn {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

html[data-theme="light"] .top-shortage-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.24);
}

html[data-theme="light"] .top-shortage-btn span {
  color: #1f2937;
  font-weight: 700;
}

html[data-theme="light"] .top-shortage-btn strong {
  color: #be123c;
  font-weight: 900;
}
