:root {
  --bg: #f5f8f8;
  --bg-accent: #edf4f3;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: rgba(255, 255, 255, 1);
  --text: #102730;
  --muted: #61727a;
  --line: rgba(16, 39, 48, 0.1);
  --primary: #0d8f88;
  --primary-soft: #e4f5f3;
  --danger: #b0462c;
  --danger-soft: #f8e2dc;
  --shadow: 0 16px 36px rgba(16, 39, 48, 0.08);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-display: "Aptos Display", "Segoe UI Semibold", "Trebuchet MS", sans-serif;
  --font-body: "Aptos", "Segoe UI", "Verdana", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  background:
    linear-gradient(180deg, rgba(13, 143, 136, 0.07), transparent 180px),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 54%, #eff5f4 100%);
}

code {
  font-size: 0.95em;
  background: rgba(16, 24, 24, 0.06);
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
}

.app-shell {
  width: calc(100vw - 32px);
  margin: 10px auto 20px;
}

.hero {
  display: block;
  margin-bottom: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(13, 143, 136, 0.03), rgba(16, 39, 48, 0.02));
  box-shadow: var(--shadow);
}

.auth-modal-active .hero {
  position: relative;
  z-index: 70;
}

.hero-inline {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
  align-items: center;
}

.hero-copy-compact {
  min-width: 0;
}

.hero-copy-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-menu {
  position: relative;
  flex: 0 0 auto;
}

.logo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.logo-button:hover,
.logo-button:focus-visible {
  border-color: rgba(16, 39, 48, 0.12);
  background: rgba(255, 255, 255, 0.68);
  outline: none;
}

.hero-logo {
  display: block;
  width: auto;
  height: 34px;
  flex: 0 0 auto;
}

.logo-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 32px rgba(16, 39, 48, 0.14);
  z-index: 20;
  text-align: center;
}

.logo-popover-image {
  display: block;
  width: 190px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.logo-popover-copy {
  margin: 10px 0 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.logo-popover-version {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.logo-popover-version-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #113640;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.logo-popover-version-line {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text);
}

.logo-popover-version-line + .logo-popover-version-line {
  margin-top: 4px;
}

.logo-popover-links {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  justify-content: center;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 1.45vw, 1.4rem);
  line-height: 1.04;
  color: #113640;
  display: flex;
  align-items: center;
}

.hero-card,
.kpi-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-label,
.kpi-label,
.panel-header p,
label span,
.active-title,
.pagination span {
  color: var(--muted);
}

.kpi-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.02rem;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.meta-strip-inline {
  margin-bottom: 0;
  justify-content: flex-end;
  align-items: center;
}

.top-link-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.meta-strip-inline .top-link-group {
  margin-left: 0;
}

.top-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(16, 39, 48, 0.18);
  background: linear-gradient(180deg, #ffffff, #eef3f4);
  color: #16323b;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(16, 39, 48, 0.12);
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.meta-strip-inline .top-link-button {
  min-height: 32px;
  padding: 6px 11px;
}

.top-link-button:hover,
.top-link-button:focus-visible {
  border-color: rgba(13, 143, 136, 0.56);
  background: linear-gradient(180deg, #ebfbf8, #ccefed);
  color: #0b6660;
  box-shadow: 0 12px 24px rgba(13, 143, 136, 0.18);
  transform: translateY(-1px);
  outline: none;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  align-items: center;
}

.tab-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--muted);
  padding: 7px 13px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tab-button.active {
  background: var(--primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.25);
}

.tab-section {
  display: none;
}

.tab-section.active {
  display: block;
}

.bridge-pending-panel {
  max-width: 900px;
  margin: 0 auto;
}

.bridge-pending-list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.bridge-pending-list code {
  font-size: 0.92rem;
}

.analysis-header-copy {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.analysis-header-copy p {
  white-space: nowrap;
}

.analysis-controls-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  justify-content: flex-end;
}

.analysis-controls-inline label {
  min-width: 132px;
  gap: 4px;
  align-items: center;
}

.analysis-controls-inline label span {
  font-size: 0.76rem;
  white-space: nowrap;
  text-align: center;
}

.analysis-controls-inline select {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.82rem;
}

.analysis-controls-inline label.analysis-control-disabled span {
  color: rgba(16, 39, 48, 0.42);
}

.analysis-controls-inline select.analysis-select-disabled,
.analysis-controls-inline select:disabled {
  color: rgba(16, 39, 48, 0.42);
  background: transparent;
  border-color: rgba(16, 39, 48, 0.12);
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}

.analysis-layout {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.analysis-summary-panel,
.analysis-drilldown-panel {
  padding: 14px 16px 16px;
  min-width: 0;
}

.analysis-summary-wrap,
.analysis-drilldown-wrap {
  max-height: 420px;
  max-width: 100%;
  overflow: auto;
  padding-right: 16px;
}

.analysis-summary-table,
.analysis-drilldown-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.analysis-summary-table th,
.analysis-summary-table td,
.analysis-drilldown-table th,
.analysis-drilldown-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(16, 39, 48, 0.08);
  font-size: 0.84rem;
}

.analysis-summary-table thead th,
.analysis-drilldown-table thead th {
  position: sticky;
  top: 0;
  background: rgba(245, 248, 248, 0.98);
  z-index: 1;
}

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

.analysis-summary-table.analysis-summary-table-bidi .analysis-dimension-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analysis-axis-header,
.analysis-column-header,
.analysis-matrix-cell {
  cursor: pointer;
}

.analysis-column-header:hover,
.analysis-matrix-cell:hover,
.analysis-summary-table td[data-analysis-kind="row"]:hover {
  background: rgba(13, 143, 136, 0.06);
}

.analysis-row {
  cursor: pointer;
}

.analysis-row:hover td {
  background: rgba(13, 143, 136, 0.04);
}

.analysis-dimension-cell {
  font-weight: 700;
  white-space: normal;
  line-height: 1.2;
  color: var(--text);
  user-select: text;
}

.analysis-dimension-cell-active {
  color: var(--primary);
}

.analysis-selection-row {
  background: rgba(13, 143, 136, 0.06);
}

.analysis-selection-col {
  background: rgba(13, 143, 136, 0.1) !important;
  color: var(--primary);
}

.analysis-selection-cell {
  background: rgba(13, 143, 136, 0.12);
  box-shadow: inset 0 0 0 1px rgba(13, 143, 136, 0.35);
}

.analysis-total-cell {
  font-weight: 800;
  background: rgba(16, 39, 48, 0.03);
}

.meta-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(16, 39, 48, 0.05);
}

.meta-strip-inline .meta-pill {
  min-width: 0;
  padding: 7px 11px;
}

.meta-pill strong {
  font-size: 0.95rem;
}

@media (max-width: 1200px) {
  .hero-inline {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .meta-strip-inline {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .hero-copy-inline {
    display: grid;
    gap: 4px;
  }

  .hero-logo {
    height: 30px;
  }
}

.layout {
  display: grid;
  gap: 18px;
}

.layout.layout-overview {
  grid-template-columns: 320px 1fr;
}

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

.filters-panel,
.panel {
  padding: 16px;
}

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

.panel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.panel-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #113640;
}

.panel-header p {
  margin: 0;
  font-size: 0.88rem;
}

.panel-header-lines {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.table-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(84px, max-content));
  align-items: end;
  gap: 8px;
}

.table-controls label {
  min-width: 0;
  gap: 4px;
}

.table-controls label span {
  font-size: 0.72rem;
  white-space: nowrap;
  text-align: center;
}

.table-controls select {
  min-width: 84px;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.8rem;
}

.filters-grid {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
}

select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
}

.active-filters {
  margin-top: 12px;
}

.overview-spotlight {
  margin-bottom: 16px;
}

.overview-spotlight-inline {
  margin-top: -2px;
}

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

.filter-chip {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
}

.shared-filter-strip-header > div:first-child {
  min-width: 0;
}

.common-filters-header {
  margin-bottom: 10px;
}

.common-filters-panel .panel-header h2 {
  font-size: 1.08rem;
}

.common-filters-panel .panel-header p:last-child {
  font-size: 0.8rem;
}

.shared-filter-sections {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.9fr);
  align-items: start;
  gap: 12px;
}

.shared-filter-group {
  padding: 10px 12px;
  border: 1px solid rgba(13, 143, 136, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 247, 0.94)),
    var(--panel);
}

.shared-filter-group-local {
  border-color: rgba(16, 39, 48, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 249, 0.96)),
    var(--panel);
}

.shared-filter-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.shared-filter-group-header h4,
.shared-filter-group-header p {
  margin: 0;
}

.shared-filter-group-header h4 {
  font-size: 0.8rem;
  font-weight: 800;
  color: #113640;
}

.shared-filter-group-header p {
  font-size: 0.72rem;
  color: var(--muted);
}

.shared-filter-grid,
.local-filter-grid {
  display: grid;
  gap: 6px;
}

.shared-filter-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.ghost-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}

.content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.pnl-panel {
  min-width: 0;
  background:
    linear-gradient(135deg, rgba(228, 245, 243, 0.72), rgba(255, 255, 255, 0.96)),
    var(--panel);
}

.pnl-header-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.pnl-header-copy p {
  white-space: nowrap;
  font-size: 0.78rem;
}

.pnl-top-overview {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}

.pnl-header-row {
  margin-bottom: 0;
}

.pnl-top-overview > .pnl-meta-grid {
  display: contents;
}

.pnl-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 4px;
}

.pnl-meta-grid,
.pnl-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 0;
}

.pnl-meta-grid .spotlight-card,
.pnl-summary-grid .spotlight-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
}

.pnl-meta-grid .spotlight-card strong,
.pnl-summary-grid .spotlight-card strong {
  font-size: 0.86rem;
  margin-top: 0;
  white-space: nowrap;
}

.pnl-meta-grid .spotlight-card .hero-label,
.pnl-summary-grid .spotlight-card .hero-label {
  white-space: nowrap;
  margin: 0;
}

.pnl-summary-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 246, 0.92)),
    var(--panel);
  min-height: 0;
}

.pnl-summary-card strong {
  line-height: 1.1;
}

.subpanel {
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.pnl-filter-strip {
  padding: 6px 8px;
  margin-bottom: 8px;
}

.pnl-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.pnl-active-filters-inline {
  justify-content: flex-end;
  max-width: 100%;
}

.shared-filter-sections-pnl {
  gap: 8px;
}

.shared-filter-group-pnl {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.shared-filter-group-pnl .shared-filter-group-header {
  margin-bottom: 6px;
}

.shared-filter-group-pnl .shared-filter-group-header h4 {
  font-size: 0.76rem;
}

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

.shared-filter-grid label,
.local-filter-grid label,
.pnl-filter-grid label {
  gap: 4px;
  font-size: 0.84rem;
}

.shared-filter-grid label span,
.local-filter-grid label span,
.pnl-filter-grid label span {
  font-size: 0.72rem;
}

.shared-filter-grid select,
.local-filter-grid select,
.pnl-filter-grid select {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 0.78rem;
}

.local-filter-grid-pnl {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.pnl-detail-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: 64vh;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
  padding-right: 0;
  padding-bottom: 4px;
}

.pnl-detail-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.pnl-detail-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin: 8px 0 8px;
}

.pnl-detail-status-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pnl-detail-copy h3,
.pnl-detail-copy p {
  margin: 0;
}

.pnl-detail-copy p {
  font-size: 0.78rem;
  color: var(--muted);
}

.pnl-detail-status {
  font-size: 0.76rem;
  color: var(--muted);
}

.pnl-area-sort-label {
  display: grid;
  gap: 4px;
  min-width: 128px;
}

.pnl-area-sort-label span {
  font-size: 0.76rem;
}

.pnl-area-sort-label select {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.8rem;
}

.pnl-ranking-header-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pnl-area-sort-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pnl-area-sort-inline span {
  white-space: nowrap;
}

.pnl-area-summary-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-accent);
  z-index: 1;
  font-size: 0.66rem;
}

.pnl-area-summary-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-right: 0;
}

.pnl-area-summary-table th,
.pnl-area-summary-table td {
  padding: 5px 6px;
  font-size: 0.74rem;
  line-height: 1.05;
}

.pnl-area-row {
  cursor: pointer;
}

.pnl-area-row:hover td {
  background: rgba(13, 143, 136, 0.04);
}

.pnl-area-summary-table .pnl-area-selection-active {
  color: var(--primary);
  font-weight: 800;
}

.pnl-area-summary-table tr.pnl-area-selection-row {
  background: rgba(13, 143, 136, 0.1);
  box-shadow: inset 4px 0 0 var(--primary);
}

.pnl-area-summary-table tr.pnl-area-selection-row td {
  background: rgba(13, 143, 136, 0.06);
}

.pnl-area-summary-table tr:has(.pnl-area-selection-active) td {
  background: rgba(13, 143, 136, 0.06);
}

.pnl-area-summary-table td:nth-child(n + 2),
.pnl-area-summary-table th:nth-child(n + 2) {
  text-align: right;
}

.pnl-area-chip-active {
  background: rgba(13, 143, 136, 0.14);
  color: var(--primary);
}

.pnl-area-chip-all {
  background: rgba(16, 39, 48, 0.06);
  color: var(--muted);
}

.pnl-detail-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-accent);
  z-index: 1;
}

.pnl-detail-table th,
.pnl-detail-table td {
  padding: 7px 6px;
  font-size: 0.74rem;
  white-space: nowrap;
}

.pnl-detail-table th {
  font-size: 0.64rem;
}

.pnl-detail-table td:nth-child(n + 6):nth-child(-n + 12),
.pnl-detail-table th:nth-child(n + 6):nth-child(-n + 12) {
  text-align: right;
  font-size: 0.72rem;
}

.pnl-detail-table.pnl-detail-table-area-focused td:nth-child(n + 5):nth-child(-n + 11),
.pnl-detail-table.pnl-detail-table-area-focused th:nth-child(n + 5):nth-child(-n + 11) {
  text-align: right;
  font-size: 0.72rem;
}

.pnl-detail-table th:nth-child(1),
.pnl-detail-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f7fbfa;
}

.pnl-detail-table th:nth-child(2),
.pnl-detail-table td:nth-child(2) {
  position: sticky;
  left: var(--pnl-sticky-left-2, 76px);
  z-index: 2;
  background: #f7fbfa;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pnl-detail-table th:nth-child(3),
.pnl-detail-table td:nth-child(3) {
  position: sticky;
  left: var(--pnl-sticky-left-3, 192px);
  z-index: 2;
  background: #f7fbfa;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pnl-detail-table thead th:nth-child(1),
.pnl-detail-table thead th:nth-child(2),
.pnl-detail-table thead th:nth-child(3) {
  z-index: 3;
  background: var(--bg-accent);
}

.pnl-detail-table.pnl-detail-table-area-focused th:nth-child(1),
.pnl-detail-table.pnl-detail-table-area-focused td:nth-child(1) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pnl-detail-table.pnl-detail-table-area-focused th:nth-child(2),
.pnl-detail-table.pnl-detail-table-area-focused td:nth-child(2) {
  left: var(--pnl-sticky-left-2, 116px);
}

.pnl-detail-table.pnl-detail-table-area-focused th:nth-child(3),
.pnl-detail-table.pnl-detail-table-area-focused td:nth-child(3) {
  left: var(--pnl-sticky-left-3, 312px);
}

.pnl-detail-table th:nth-child(4),
.pnl-detail-table td:nth-child(4),
.pnl-detail-table th:nth-child(5),
.pnl-detail-table td:nth-child(5) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pnl-detail-table th:nth-child(13),
.pnl-detail-table td:nth-child(13) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pnl-detail-table th:nth-child(14),
.pnl-detail-table td:nth-child(14),
.pnl-detail-table th:nth-child(15),
.pnl-detail-table td:nth-child(15) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pnl-panel.detail-expanded .subpanel,
.pnl-panel.detail-expanded .pnl-filter-strip,
.pnl-panel.detail-expanded .pnl-meta-grid,
.pnl-panel.detail-expanded .pnl-summary-grid {
  display: none;
}

.pnl-panel.detail-expanded .pnl-detail-table-wrap {
  max-height: calc(100vh - 160px);
}

.metric-drilldown-button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: right;
}

.metric-drilldown-button:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.difference-drilldown-button {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
}

.difference-drilldown-button:hover {
  text-decoration: underline;
}

.difference-drilldown-month-button {
  display: inline-flex;
  justify-content: flex-end;
  width: 100%;
}

.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 31, 43, 0.42);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-dialog {
  width: min(1100px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: var(--panel-strong);
  border: 1px solid rgba(16, 39, 48, 0.14);
  border-radius: var(--radius-xl);
  box-shadow: 0 28px 90px rgba(16, 31, 43, 0.28);
  padding: 16px;
}

.invoice-drilldown-header {
  margin-bottom: 10px;
}

.invoice-drilldown-meta {
  margin-bottom: 10px;
}

.invoice-drilldown-message {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #f4faf9;
  color: var(--text);
  font-size: 0.92rem;
}

.invoice-drilldown-message-warning {
  background: #fff6ed;
  border-color: rgba(184, 86, 32, 0.22);
  color: #a1481c;
}

.ui-access-gate-modal {
  width: min(780px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

.ui-access-gate-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.ui-access-gate-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.ui-access-gate-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.auth-login-modal {
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-modal-active #auth-login-modal {
  pointer-events: none;
}

.auth-modal-active #auth-login-modal .modal-dialog {
  pointer-events: auto;
}

.auth-login-form {
  display: grid;
  gap: 12px;
}

.auth-login-form label {
  display: grid;
  gap: 6px;
}

.auth-login-form input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.auth-login-error {
  margin: 0;
  border: 1px solid rgba(176, 70, 44, 0.25);
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.88rem;
  padding: 8px 10px;
}

.auth-logins-modal {
  width: min(1280px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-logins-table-wrap {
  max-height: min(66vh, 680px);
}

.invoice-drilldown-table-wrap {
  max-height: min(62vh, 620px);
  border: 1px solid rgba(16, 39, 48, 0.08);
  border-radius: 14px;
  background: #ffffff;
}

.invoice-drilldown-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.8rem;
  background: #ffffff;
}

.invoice-drilldown-table th,
.invoice-drilldown-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.invoice-drilldown-table th {
  position: sticky;
  top: 0;
  background: #eef5f4;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.68rem;
  z-index: 1;
}

.invoice-drilldown-table tbody tr {
  background: #ffffff;
}

.invoice-drilldown-table tbody tr:nth-child(even) {
  background: #fbfcfc;
}

.invoice-drilldown-table tbody tr.invoice-drilldown-row-special-error,
.invoice-drilldown-table tbody tr.invoice-drilldown-row-special-error:nth-child(even) {
  background: #fff4ea;
}

.invoice-drilldown-table tbody tr.invoice-drilldown-row-special-error td:last-child {
  color: #a1481c;
  font-weight: 600;
}

.invoice-drilldown-table th:nth-child(6),
.invoice-drilldown-table td:nth-child(6) {
  text-align: right;
}

.differences-drilldown-modal {
  width: min(1280px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.differences-drilldown-header {
  margin-bottom: 0;
}

.differences-drilldown-meta {
  margin-bottom: 0;
}

.differences-drilldown-message {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #f4faf9;
  color: var(--text);
  font-size: 0.92rem;
}

.differences-drilldown-table-wrap {
  max-height: min(64vh, 660px);
  border: 1px solid rgba(16, 39, 48, 0.08);
  border-radius: 14px;
  background: #ffffff;
}

.differences-drilldown-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.76rem;
  background: #ffffff;
}

.differences-drilldown-table th,
.differences-drilldown-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.differences-drilldown-table thead th {
  position: sticky;
  top: 0;
  background: #eef5f4;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.68rem;
  z-index: 1;
}

.differences-drilldown-table th:nth-child(4),
.differences-drilldown-table td:nth-child(4),
.differences-drilldown-table th:nth-child(5),
.differences-drilldown-table td:nth-child(5),
.differences-drilldown-table th:nth-child(6),
.differences-drilldown-table td:nth-child(6) {
  text-align: right;
}

.differences-drilldown-table tbody tr {
  background: #ffffff;
}

.differences-drilldown-table tbody tr:nth-child(even) {
  background: #fbfcfc;
}

.differences-drilldown-table tbody tr.annual-difference-row-aligned,
.differences-drilldown-table tbody tr.annual-difference-row-aligned:nth-child(even) {
  background: #f4faf9;
}

.differences-drilldown-table tbody tr.annual-difference-row-deviation,
.differences-drilldown-table tbody tr.annual-difference-row-deviation:nth-child(even) {
  background: #fff4ea;
}

.differences-drilldown-table .annual-manager-col {
  text-align: left;
}

.annual-section {
  position: relative;
}

.annual-controls,
.annual-table-panel,
.annual-drilldown-panel {
  padding: 14px;
}

.annual-header-inline {
  align-items: baseline;
}

.annual-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.annual-filter-grid label {
  gap: 4px;
  font-size: 0.84rem;
}

.annual-filter-action-cell {
  display: flex;
  align-items: end;
  justify-content: flex-start;
}

.annual-filter-grid-shared {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.annual-filter-grid-local {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.annual-filter-grid select {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 0.8rem;
}

.annual-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.annual-active-filters-inline {
  justify-content: flex-end;
  flex: 1 1 auto;
}

.annual-table-wrap,
.annual-drilldown-table-wrap {
  overflow: auto;
  padding-right: 16px;
}

.annual-table,
.annual-drilldown-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.annual-table {
  font-size: 0.78rem;
}

.annual-drilldown-table {
  font-size: 0.74rem;
  line-height: 1.1;
}

.annual-table thead th,
.annual-drilldown-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-accent);
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  z-index: 1;
  vertical-align: middle;
}

.annual-table th,
.annual-table td,
.annual-drilldown-table th,
.annual-drilldown-table td {
  padding: 8px 6px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.annual-row-header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-left: 0;
}

.annual-table-header-inline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.annual-table-header-inline h3,
.annual-table-header-inline p {
  margin: 0;
}

.annual-table-header-inline p {
  flex: 1 1 auto;
}

.annual-row-header-button,
.annual-cell-button,
.annual-column-button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.annual-row-header-button {
  text-align: left;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.15;
}

.annual-column-button {
  text-align: right;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.annual-cell-button {
  text-align: right;
  font-size: 0.74rem;
  line-height: 1.1;
}

.annual-selection-active {
  outline: 2px solid rgba(13, 71, 255, 0.38);
  outline-offset: -2px;
  border-radius: 10px;
  background: linear-gradient(180deg, #2b70ff, #1150ff);
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(13, 71, 255, 0.24);
  padding: 4px 6px;
}

.annual-selection-active:hover,
.annual-selection-active:focus-visible {
  color: #fff !important;
}

.annual-table tbody tr.annual-derived-row {
  background: rgba(228, 245, 243, 0.55);
}

.annual-table tbody tr.annual-facturacion-row th {
  border-top: 2px solid rgba(16, 39, 48, 0.12);
}

.annual-table tbody tr.annual-facturacion-row td,
.annual-table tbody tr.annual-transitoria-row td {
  font-weight: 700;
}

.annual-drilldown-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.annual-drilldown-summary {
  display: grid;
  gap: 10px;
  align-content: start;
}

.annual-drilldown-actions {
  display: flex;
  gap: 8px;
}

.annual-action-button {
  flex: 0 0 auto;
  min-height: 38px;
  font-size: 0.82rem;
  font-weight: 700;
}

.grid-reset-button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 10px;
  font-size: 0.72rem;
  white-space: nowrap;
  box-shadow: none;
}

.annual-clear-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 0;
  padding: 4px 14px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.annual-expand-button {
  min-height: 34px;
  padding: 6px 12px;
}

.annual-manager-col,
.annual-drilldown-table td:last-child,
.annual-drilldown-table th:last-child {
  text-align: center !important;
}

.annual-empty {
  text-align: center !important;
  color: var(--muted);
  padding: 18px;
}

.annual-section.detail-expanded .annual-controls,
.annual-section.detail-expanded .annual-table-panel {
  display: none;
}

.annual-section.detail-expanded .annual-drilldown-panel {
  position: fixed;
  inset: 18px;
  z-index: 40;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 248, 0.98)),
    var(--panel);
  box-shadow: 0 24px 48px rgba(16, 39, 48, 0.16);
}

.annual-section.detail-expanded .annual-drilldown-layout {
  min-height: calc(100vh - 150px);
}

.annual-section.detail-expanded .annual-drilldown-table-wrap {
  max-height: calc(100vh - 190px);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi-card {
  padding: 14px 16px;
}

.kpi-card strong {
  margin-top: 5px;
  font-size: 1.02rem;
  font-family: var(--font-body);
  font-weight: 700;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 24px;
}

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

.spotlight-grid-inline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.spotlight-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
}

.spotlight-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.15rem;
}

.spotlight-grid-inline .spotlight-card {
  padding: 14px 16px;
  box-shadow: var(--shadow);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 251, 250, 0.96)),
    var(--panel-strong);
}

.spotlight-grid-inline .spotlight-card strong {
  margin-top: 5px;
  font-size: 1.02rem;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-item {
  display: grid;
  gap: 7px;
}

.bar-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  font-size: 0.92rem;
  line-height: 1.2;
}

.bar-title {
  font-size: 0.97rem;
}

.bar-values {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
}

.bar-track {
  overflow: hidden;
  height: 14px;
  border-radius: 999px;
  background: rgba(16, 39, 48, 0.08);
}

.bar-segment {
  height: 100%;
}

.bar-plan {
  background: linear-gradient(90deg, #164b5c, #1b6877);
}

.bar-real {
  background: linear-gradient(90deg, #0d8f88, #34b8b0);
}

.bar-negative-plan {
  background: linear-gradient(90deg, #935126, #bf7340);
}

.bar-negative-real {
  background: linear-gradient(90deg, #c36f2d, #e7a55f);
}

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

.differences-section {
  gap: 14px;
}

.tab-section.differences-section.active {
  display: grid;
}

.differences-header-inline {
  align-items: center;
  margin-bottom: 4px;
}

.differences-header-copy {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.differences-header-copy p {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.differences-context-panel {
  padding: 8px 12px;
}

.differences-rules-header {
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.differences-rules-header > div:first-child {
  min-width: max-content;
}

.differences-rules-header h3 {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.1;
}

.differences-rule-chips-inline {
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
}

.differences-rule-chips-inline .filter-chip {
  white-space: nowrap;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.differences-status-header {
  margin-top: 0;
  margin-bottom: 0;
}

.differences-summary-table th:nth-child(1),
.differences-summary-table td:nth-child(1) {
  min-width: 148px;
}

.difference-label-cell {
  display: grid;
  gap: 2px;
}

.difference-label-cell strong {
  font-size: 0.94rem;
}

.difference-severity-copy {
  color: var(--muted);
  font-size: 0.77rem;
}

.difference-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.difference-status-aligned {
  background: rgba(25, 167, 123, 0.12);
  color: #0f7b5b;
}

.difference-status-deviation {
  background: rgba(211, 106, 67, 0.14);
  color: #a33b20;
}

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

.differences-detail-card {
  padding-top: 14px;
}

.differences-card-header {
  align-items: center;
}

.differences-card-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.differences-monthly-table th:nth-child(1),
.differences-monthly-table td:nth-child(1) {
  min-width: 92px;
}

.budget-lines-table-wrap {
  padding-right: 16px;
}

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

.resizable-grid {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
  max-width: none;
}

.resizable-grid th {
  position: relative;
}

.resizable-grid th.is-resizing {
  user-select: none;
}

.column-resize-handle {
  position: absolute;
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
}

.column-resize-handle::after {
  content: "";
  position: absolute;
  top: 16%;
  bottom: 16%;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(13, 143, 136, 0.16);
  border-radius: 999px;
  transition: background 120ms ease;
}

.resizable-grid th:hover .column-resize-handle::after,
.resizable-grid th.is-resizing .column-resize-handle::after {
  background: rgba(13, 143, 136, 0.48);
}

th,
td {
  padding: 11px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  vertical-align: top;
}

th {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

tbody tr:hover {
  background: rgba(13, 143, 136, 0.04);
}

.compact-table th,
.compact-table td {
  padding: 9px 7px;
}

.compact-table td,
.compact-table tbody td {
  font-size: 0.86rem;
}

.compact-table th {
  font-size: 0.71rem;
}

.budget-lines-table-wrap th:nth-child(1),
.budget-lines-table-wrap td:nth-child(1) {
  width: 72px;
}

.budget-lines-table-wrap th:nth-child(2),
.budget-lines-table-wrap td:nth-child(2),
.budget-lines-table-wrap th:nth-child(3),
.budget-lines-table-wrap td:nth-child(3) {
  width: 220px;
}

.budget-lines-table-wrap th:nth-child(4),
.budget-lines-table-wrap td:nth-child(4) {
  width: 150px;
}

.budget-lines-table-wrap th:nth-child(5),
.budget-lines-table-wrap td:nth-child(5),
.budget-lines-table-wrap th:nth-child(6),
.budget-lines-table-wrap td:nth-child(6),
.budget-lines-table-wrap th:nth-child(7),
.budget-lines-table-wrap td:nth-child(7) {
  width: 110px;
}

#monthly-table-wrap {
  max-height: 574px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  padding-right: 18px;
}

#monthly-table-wrap::-webkit-scrollbar {
  width: 14px;
}

#monthly-table-wrap::-webkit-scrollbar-track {
  background: rgba(16, 39, 48, 0.08);
  border-radius: 999px;
}

#monthly-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(13, 143, 136, 0.55);
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.92);
}

#monthly-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(13, 143, 136, 0.72);
}

#monthly-table-wrap table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}

#monthly-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.98);
}

#monthly-table-wrap th:nth-child(1),
#monthly-table-wrap td:nth-child(1) {
  width: 84px;
}

#monthly-table-wrap th:nth-child(2),
#monthly-table-wrap td:nth-child(2) {
  width: 240px;
}

#monthly-table-wrap th:nth-child(3),
#monthly-table-wrap td:nth-child(3),
#monthly-table-wrap th:nth-child(4),
#monthly-table-wrap td:nth-child(4),
#monthly-table-wrap th:nth-child(5),
#monthly-table-wrap td:nth-child(5) {
  width: 112px;
}

.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.negative {
  color: var(--danger);
}

.positive {
  color: var(--primary);
}

.pagination {
  display: flex;
  justify-content: end;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

@media (max-width: 1100px) {
  .hero,
  .layout,
  .two-column {
    grid-template-columns: 1fr;
  }

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

  .spotlight-grid {
    grid-template-columns: 1fr;
  }

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

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

  .pnl-top-overview {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .pnl-top-overview > .pnl-meta-grid {
    display: grid;
  }

  .pnl-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shared-filter-sections {
    grid-template-columns: 1fr;
  }

  .shared-filter-grid,
  .annual-filter-grid-shared {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .annual-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .annual-filter-grid-local {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .annual-drilldown-layout {
    grid-template-columns: 1fr;
  }

  .differences-card-grid {
    grid-template-columns: 1fr;
  }

  .differences-header-copy {
    display: grid;
    gap: 4px;
  }

  .differences-header-copy p {
    white-space: normal;
  }

  .differences-rules-header {
    align-items: start;
  }

  .differences-rule-chips-inline {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .app-shell {
    width: calc(100vw - 20px);
    margin-top: 10px;
  }

  .hero,
  .filters-panel,
  .panel {
    padding: 18px;
  }

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

  .pnl-meta-grid,
  .pnl-summary-grid {
    grid-template-columns: 1fr;
  }

  .pnl-top-overview {
    gap: 6px;
  }

  .pnl-top-overview > .pnl-meta-grid {
    display: grid;
  }

  .shared-filter-group-header {
    display: grid;
    gap: 4px;
  }

  .shared-filter-grid,
  .local-filter-grid,
  .annual-filter-grid-shared,
  .annual-filter-grid-local {
    grid-template-columns: 1fr;
  }

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

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

  .annual-filter-summary-row,
  .annual-drilldown-actions,
  .pnl-detail-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .annual-section.detail-expanded .annual-drilldown-panel {
    inset: 8px;
  }

  .annual-section.detail-expanded .annual-drilldown-layout {
    min-height: calc(100vh - 110px);
  }

  .annual-section.detail-expanded .annual-drilldown-table-wrap {
    max-height: calc(100vh - 220px);
  }

  .pagination {
    justify-content: space-between;
  }

  .top-link-group {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}
