.table-scroll {
  max-height: 62vh;
  overflow: auto;
  border: 1px solid #d3ddcc;
  border-radius: 10px;
}

.herd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0 0.6rem;
}

.codes-subhead {
  margin: 1rem 0 0.4rem;
}

/* Accountants may view Naming & Codes and Translation Review but not change
   them: hide the editing controls (the data stays visible). */
body.role-accountant #naming .mini-btn,
body.role-accountant #naming button.primary,
body.role-accountant #translation .mini-btn,
body.role-accountant #translation button.primary {
  display: none;
}

/* All inputs and dropdowns on the Users page share the green pill style. */
#users input,
#users select {
  background-color: #1f7a3d9b;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(31, 122, 61, 0.4);
  padding: 0.4rem 0.5rem;
  border: none;
}

#users input::placeholder {
  color: #ffffffcc;
}

/* Keep the opened dropdown list readable (dark text on white). */
#users select option {
  color: #1f261f;
  background-color: #ffffff;
}

.import-list-wrap {
  margin-top: 0.6rem;
}

.import-list-wrap summary {
  cursor: pointer;
  font-weight: 700;
  color: #2c5238;
  font-size: 0.85rem;
}

.import-list-wrap .herd-table {
  margin-top: 0.4rem;
  white-space: normal;
}

.codes-table {
  white-space: normal;
}

.codes-table input.inline-input {
  width: 100%;
  min-width: 140px;
}

.codes-table select {
  border-radius: 8px;
  border: 1px solid #b9c7b1;
  padding: 0.3rem 0.4rem;
}

.codes-table .mini-btn {
  margin-right: 0.3rem;
}

.mini-btn.danger {
  color: #aa3c2f;
  border-color: #d8a99f;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid #cdd9c5;
  border-radius: 999px;
  background: #f3f8f1;
  font-size: 0.78rem;
  font-weight: 600;
  color: #284a32;
  cursor: pointer;
}

.legend-chip.off {
  opacity: 0.4;
  text-decoration: line-through;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.chart-wrap {
  width: 100%;
  border: 1px solid #d3ddcc;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.5rem;
  margin-bottom: 0.8rem;
}

.trend-svg {
  width: 100%;
  height: auto;
  display: block;
}

.trend-svg .axis-label {
  fill: #5a6b58;
}

.herd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  white-space: nowrap;
}

.herd-table th,
.herd-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid #e4ebdf;
  text-align: left;
}

.herd-table thead th {
  position: sticky;
  top: 0;
  background: #eef4ea;
  color: #1f5e33;
  z-index: 1;
  cursor: help;
}

.herd-table tbody tr:nth-child(even) {
  background: #f7faf5;
}

:root {
  --pine-950: #122418;
  --pine-900: #173322;
  --pine-700: #2b5b3d;
  --earth-700: #6d5436;
  --wheat-100: #f5f0df;
  --wheat-50: #fcf9ee;
  --ink-900: #1f261f;
  --alert: #aa3c2f;
  --ok: #2e7e4d;
  --shadow: 0 18px 40px rgba(14, 25, 15, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink-900);
  background: radial-gradient(circle at 10% 10%, #ebf2e7 0%, #e4ebdf 40%, #d6dfd0 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(17, 28, 20, 0.55);
  z-index: 10;
  padding: 1rem;
}

.auth-gate.visible {
  display: grid;
}

.login-card {
  width: min(420px, 96vw);
  max-height: 94vh;
  overflow-y: auto;
  display: grid;
  gap: 0.7rem;
  background: #f9fbf6;
  border: 1px solid #c7d3c0;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.login-head {
  display: grid;
  gap: 0.15rem;
}

.auth-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.auth-step-chip {
  border: 1px solid #c5d2bf;
  background: #f3f8f1;
  color: #49624d;
  border-radius: 999px;
  font-size: 0.74rem;
  text-align: center;
  padding: 0.3rem 0.45rem;
  font-weight: 700;
}

.auth-step-chip.active {
  background: linear-gradient(140deg, #dbead7, #ebf5e8);
  border-color: #95b88f;
  color: #1f5e33;
}

.next-action {
  border: 1px solid #b9cbb2;
  border-radius: 10px;
  background: #eef6eb;
  color: #254f33;
  padding: 0.45rem 0.6rem;
  font-size: 0.84rem;
}

.auth-step {
  display: grid;
  gap: 0.55rem;
  background: #ffffff;
  border: 1px solid #d3ddcc;
  border-radius: 12px;
  padding: 0.85rem;
  animation: authStepIn 0.22s ease;
}

@keyframes authStepIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-sub,
.auth-hint {
  margin: 0;
  font-size: 0.82rem;
  color: #51664f;
}

.auth-hint {
  margin-top: 0.2rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #cdd9c5;
}

.mfa-qr {
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid #cdd9c5;
  border-radius: 10px;
  padding: 0.6rem;
}

.mfa-qr svg {
  width: min(220px, 60vw);
  height: auto;
}

.mfa-manual summary,
.diag-card summary {
  cursor: pointer;
  font-weight: 700;
  color: #2c5238;
  font-size: 0.82rem;
}

.mfa-manual {
  font-size: 0.8rem;
}

.mfa-manual[open] summary {
  margin-bottom: 0.4rem;
}

.mono {
  font-family: "Courier New", monospace;
  word-break: break-all;
  background: #f0f6ee;
  border: 1px solid #bfd0b8;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  margin: 0;
}

.mono.small {
  font-size: 0.75rem;
}

.diag-card {
  border: 1px solid #c8d5c2;
  border-radius: 12px;
  background: #f7faf5;
  padding: 0.6rem;
}

.diag-card h3 {
  margin-bottom: 0.35rem;
}

.login-card label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.login-card input {
  border-radius: 10px;
  border: 1px solid #b9c7b1;
  padding: 0.55rem 0.62rem;
}

h1, h2, h3, h4 {
  font-family: "Cormorant Garamond", serif;
  margin: 0;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(40px);
  z-index: -1;
}

.ambient-a {
  width: 320px;
  height: 320px;
  background: rgba(62, 120, 75, 0.35);
  top: -70px;
  right: -40px;
}

.ambient-b {
  width: 420px;
  height: 420px;
  background: rgba(150, 127, 85, 0.26);
  left: -140px;
  bottom: -120px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.4rem;
  /* Lift the header's stacking context above the content below so the
     security dropdown isn't painted behind the cards (both .topbar and
     .app-shell get a stacking context from the .reveal transform). */
  position: relative;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-content: center;
  color: var(--wheat-50);
  background: linear-gradient(135deg, var(--pine-900), var(--pine-700));
  font-weight: 800;
  box-shadow: var(--shadow);
}

.brand-overline {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: #355744;
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

select, button {
  font: inherit;
}

.top-controls label {
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.top-controls select,
button {
  border-radius: 10px;
  border: 1px solid #c0ccb8;
  padding: 0.52rem 0.7rem;
  background: #f9fbf6;
}

.secure-pill {
  background: linear-gradient(140deg, var(--pine-900), #274a33);
  color: #f6f8f2;
  border: none;
  cursor: pointer;
}

.security-wrap {
  position: relative;
  display: inline-block;
}

.security-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 60;
  width: 320px;
  max-width: 88vw;
  padding: 0.75rem 0.85rem;
  background: #fff;
  color: #20302a;
  border: 1px solid #c4d2bf;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(31, 73, 52, 0.22);
}

.security-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.security-panel-close {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: #5b6b5d;
  padding: 0 0.2rem;
}

.security-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.security-list li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  grid-template-areas: 'mark label' 'mark detail';
  column-gap: 0.5rem;
  align-items: start;
  font-size: 0.85rem;
}

.security-list .sec-mark {
  grid-area: mark;
  font-weight: 800;
  text-align: center;
}

.security-list .sec-label {
  grid-area: label;
  font-weight: 600;
}

.security-list .sec-detail {
  grid-area: detail;
  font-size: 0.78rem;
  color: #6a7a6c;
}

.security-list .sec-ok .sec-mark {
  color: #1f7a3d;
}

.security-list .sec-warn .sec-mark {
  color: #b3711f;
}

.security-meta {
  margin: 0.6rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid #e3eadf;
  font-size: 0.76rem;
  color: #6a7a6c;
}

.ghost {
  background: transparent;
}

.danger {
  color: #8c2e25;
  border-color: #bb8a80;
}

.danger:hover {
  background: #f8ece9;
}

.user-badge {
  padding: 0.4rem 0.55rem;
  border: 1px solid #c3d0bc;
  border-radius: 8px;
  font-size: 0.8rem;
  background: rgba(248, 251, 245, 0.9);
}

.env-badge {
  padding: 0.38rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #bfd0b8;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.env-ok {
  background: #edf6ea;
  color: #245333;
  border-color: #95b48c;
}

.env-warn {
  background: #fff3e6;
  color: #8a4a17;
  border-color: #d6a069;
}

.canonical-link {
  font-size: 0.78rem;
  color: #2a5f3a;
  font-weight: 700;
  text-decoration: underline;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  padding: 0 1.4rem 1.2rem;
}

.sidebar {
  background: rgba(250, 252, 246, 0.72);
  border: 1px solid #d0d9c8;
  border-radius: 18px;
  padding: 0.8rem;
  display: grid;
  align-content: start;
  gap: 0.5rem;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.nav-btn {
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
}

.nav-btn.active {
  background: #eaf2e8;
  border-color: #b7c9b1;
  font-weight: 700;
}

.content {
  display: grid;
  min-width: 0;
}

.view {
  display: none;
  gap: 1rem;
  min-width: 0;
  animation: fadeIn 340ms ease;
}

.view.active {
  display: grid;
}

.hero-media {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 220px;
}

.hero-media img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  filter: saturate(0.9) contrast(0.95);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(16, 36, 24, 0.72), rgba(19, 39, 26, 0.28));
  color: #f2f6ef;
  padding: 1.2rem;
  display: grid;
  align-content: end;
}

.kpis {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.kpis article,
.panel {
  min-width: 0;
  background: rgba(252, 252, 247, 0.88);
  border: 1px solid #ccd8c6;
  border-radius: 16px;
  padding: 0.95rem;
  box-shadow: var(--shadow);
}

.kpis p {
  margin: 0;
  font-size: 0.78rem;
  color: #4c5a48;
}

.kpis h3 {
  font-size: 1.55rem;
}

.kpis span {
  font-size: 0.82rem;
  color: #3f714b;
}

.kpis article.kpi-good {
  background: #edf6ea;
  border-color: #95b48c;
}

.kpis article.kpi-bad {
  background: #faece9;
  border-color: #c89a91;
}

.kpis article.kpi-neutral {
  background: rgba(252, 252, 247, 0.88);
  border-color: #ccd8c6;
}

.grid-two {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.9rem;
}

.bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.2rem;
  align-items: end;
  height: 150px;
  margin-top: 0.8rem;
}

.bars div {
  height: var(--h);
  min-height: 2px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #89a87f, #2e6846);
}

.bar-h-48 { --h: 48%; }
.bar-h-56 { --h: 56%; }
.bar-h-52 { --h: 52%; }
.bar-h-60 { --h: 60%; }
.bar-h-70 { --h: 70%; }
.bar-h-66 { --h: 66%; }
.bar-h-78 { --h: 78%; }

.panel ul {
  margin: 0.7rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.45rem;
}

.dropzone {
  margin: 0.8rem 0;
  border: 2px dashed #9db297;
  border-radius: 14px;
  padding: 1.2rem;
  text-align: center;
  color: #32553f;
  background: #f3f8f0;
}

.dropzone.drag-over {
  border-color: #5b7e5f;
  background: #e8f2e4;
}

.primary {
  margin-top: 0.8rem;
  background: linear-gradient(140deg, var(--pine-900), var(--pine-700));
  color: #f5f7ef;
  border: none;
}

.inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.6rem;
}

.inline-actions {
  display: flex;
  align-items: end;
  gap: 0.5rem;
}

.master-create-grid {
  margin-top: 0.6rem;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.master-create-grid label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
}

.master-create-grid input,
#masterSearchInput,
#uploadTranslationMode {
  border: 1px solid #b8c7b0;
  border-radius: 8px;
  padding: 0.4rem 0.45rem;
  background: #f8fbf6;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.62rem;
  border-bottom: 1px solid #d6dfd1;
}

.inline-input {
  width: 100%;
  border: 1px solid #b8c7b0;
  border-radius: 8px;
  padding: 0.38rem 0.45rem;
  background: #f8fbf6;
}

.mini-btn {
  border: 1px solid #a5b7a0;
  border-radius: 8px;
  padding: 0.35rem 0.52rem;
  background: #edf4e9;
  cursor: pointer;
}

.lang-toggle {
  display: inline-flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
  margin-bottom: 0.35rem;
}

.lang-toggle .mini-btn.active {
  background: #dfeedd;
  border-color: #7ea27a;
  color: #1d5232;
  font-weight: 700;
}

/* Float the Analysis language toggle so EN/CS stay visible while scrolling the
   drill-down. Scoped to #analysis so the Reports toggle is unaffected; the
   float only renders when the Analysis view is active (others are display:none). */
#analysis .lang-toggle {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  margin: 0;
  padding: 0.4rem 0.55rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #c4d2bf;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(31, 73, 52, 0.18);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.waterfall {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.waterfall span {
  padding: 0.4rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  background: #e9eee7;
}

.waterfall .up,
.waterfall .good {
  border: 1px solid #95b48c;
  color: #1f5f34;
}

.waterfall .down,
.waterfall .bad {
  border: 1px solid #bb8a80;
  color: #6f2f26;
}

.waterfall .neutral {
  border: 1px solid #b5c3b2;
  color: #4e5d50;
}
.waterfall .total { border: 1px solid #7f9b79; font-weight: 700; }

.analysis-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.mode-toggle,
.expand-toggle {
  display: inline-flex;
  gap: 0.45rem;
}

.mode-toggle .mini-btn.active {
  background: #dfeedd;
  border-color: #7ea27a;
  color: #1d5232;
  font-weight: 700;
}

.analysis-period-pickers {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.6rem;
}

.analysis-period-pickers label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.82rem;
}

.analysis-period-pickers select {
  border: 1px solid #b8c7b0;
  border-radius: 8px;
  padding: 0.4rem 0.45rem;
  background: #f8fbf6;
}

.comparison-table {
  margin-top: 0.8rem;
}

.comparison-table td:nth-child(4),
.comparison-table th:nth-child(4),
.comparison-table td:nth-child(5),
.comparison-table th:nth-child(5) {
  text-align: right;
}

.comparison-table .good {
  color: #1f5f34;
  font-weight: 700;
}

.comparison-table .bad {
  color: #7a2e28;
  font-weight: 700;
}

.comparison-table .neutral {
  color: #516253;
}

/* Indentation per drill level is applied inline in JS; these rules cover
   typography and the row banding for the four tiers (metric, class, account,
   cost centre). */
.analysis-row.level-0 td {
  font-weight: 700;
  border-top: 2px solid #d7e2d2;
}

.analysis-row.level-1 td:first-child {
  font-weight: 600;
  color: #2f4935;
}

.analysis-row.level-2 td:first-child {
  color: #3f4f44;
}

.analysis-row.level-3 td {
  color: #5b6b5d;
  font-size: 0.92em;
  background: #fafcf8;
}

.tree-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  margin-right: 0.2rem;
  border: 1px solid #b6c5b1;
  border-radius: 4px;
  background: #f0f6ed;
  color: #2f4935;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
}

.tree-spacer {
  display: inline-block;
  width: 1.2rem;
  margin-right: 0.2rem;
}

.analysis-label {
  vertical-align: middle;
}

.financial-layout h3 {
  margin-bottom: 0.35rem;
}

.statement-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 1rem;
}

.statement-columns h4 {
  margin-bottom: 0.45rem;
}

.amount-col {
  text-align: right;
  white-space: nowrap;
}

.naming-table {
  margin: 0.4rem 0 1.2rem;
}

.naming-input {
  width: 100%;
  min-width: 160px;
  padding: 0.3rem 0.45rem;
  border: 1px solid #c4d2bf;
  border-radius: 6px;
  background: #fff;
}

.naming-default {
  color: #6a7a6c;
  font-size: 0.9em;
}

.user-create-grid {
  align-items: end;
}

.users-table {
  margin-top: 0.6rem;
}

.users-table .user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.users-table .user-inactive td {
  color: #8a988b;
  background: #f6f7f5;
}

.user-role-select {
  padding: 0.25rem 0.4rem;
  border: 1px solid #c4d2bf;
  border-radius: 6px;
}

.mini-btn.danger {
  border-color: #c8a59e;
  color: #7a2e28;
}

.cost-centre-heading td {
  background: #2f4935;
  color: #f4f8f1;
  font-size: 0.95rem;
  border-top: 3px solid #20302a;
}

.test-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #f0e6c8;
  color: #6b5a1f;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: middle;
}

.naming-tag {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  background: #e7f0e2;
  color: #2f5f34;
  font-size: 0.7rem;
  font-weight: 700;
}

.statement-total td {
  font-weight: 700;
  background: #f1f6ef;
}

.statement-group td {
  font-weight: 700;
  color: #2f4935;
  background: #eef4ea;
  border-top: 1px solid #d7e2d2;
}

.statement-account {
  padding-left: 1rem;
}

.footer-note {
  padding: 0.35rem 1.4rem 1rem;
  color: #39513f;
  font-size: 0.82rem;
}

.status-line {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #355744;
}

.status-ok {
  color: #1f6b3b;
}

.status-error {
  color: #8c2e25;
}

.status-line a {
  color: #235f3c;
  font-weight: 700;
}

.batch-chip {
  display: inline-block;
  background: #eef4ea;
  border: 1px solid #bfd0b8;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.82rem;
  color: #2c4d35;
  margin-top: 0.35rem;
  margin-bottom: 0.7rem;
}

.reveal {
  /* No fill-mode: after the entrance animation the element reverts to
     transform:none (visually identical to translateY(0)). Keeping a persisted
     transform here would make it the containing block for position:fixed
     descendants, which broke the floating Analysis language toggle. */
  animation: rise 420ms ease;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-auto-flow: column;
    overflow-x: auto;
    white-space: nowrap;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .grid-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-controls {
    flex-wrap: wrap;
  }

  .kpis,
  .inline-grid {
    grid-template-columns: 1fr;
  }

  .analysis-period-pickers {
    grid-template-columns: 1fr;
  }

  .master-create-grid {
    grid-template-columns: 1fr;
  }

  .statement-columns {
    grid-template-columns: 1fr;
  }
}
