:root {
  --ora-navy: #041E42;
  --ora-navy-deep: #011E41;
  --ora-navy-ink: #071832;
  --ora-blue: #0085CA;
  --ora-blue-soft: #E7F6FC;
  --ora-copper: #AC441E;
  --ora-copper-soft: #F9ECE6;
  --ora-stone: #C4BEB6;
  --ora-stone-soft: #EFEAE4;
  --ora-cream: #F7F5F1;
  --ora-white: #FFFFFF;
  --bg: #F5F1EA;
  --panel: rgba(255,255,255,.92);
  --panel-solid: #FFFFFF;
  --panel-soft: #FBFAF7;
  --text: #152033;
  --muted: #667085;
  --line: #E2DCD2;
  --danger: #B42318;
  --success: #107349;
  --warning: #9A5B00;
  --shadow: 0 24px 70px rgba(4, 30, 66, .12);
  --shadow-soft: 0 12px 34px rgba(4, 30, 66, .08);
  --radius-xl: 30px;
  --radius: 22px;
  --radius-sm: 14px;
  --sidebar-width: 318px;
  --font: Gibbs, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    linear-gradient(120deg, rgba(247,245,241,.96), rgba(247,245,241,.84)),
    url("brand/ora-pattern-stone.png") right -160px top -120px / 560px auto no-repeat,
    radial-gradient(circle at 14% 4%, rgba(0,133,202,.20), transparent 30rem),
    radial-gradient(circle at 92% 12%, rgba(172,68,30,.15), transparent 30rem),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4,30,66,.03), transparent 34%),
    radial-gradient(circle at 55% 88%, rgba(0,133,202,.08), transparent 32rem);
  z-index: -1;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { line-height: 1.62; }
strong { font-weight: 850; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  transform: translateY(-140%);
  z-index: 30;
  background: var(--ora-white);
  color: var(--ora-navy);
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  font-weight: 850;
}
.skip-link:focus { transform: translateY(0); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  color: var(--ora-white);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: auto;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(4,30,66,.95), rgba(1,20,44,.98) 68%, #041225),
    url("brand/ora-pattern-navy.png") left -160px bottom -120px / 520px auto no-repeat;
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: 24px 0 60px rgba(4,30,66,.18);
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 4%, rgba(0,133,202,.26), transparent 18rem),
    radial-gradient(circle at 92% 22%, rgba(172,68,30,.18), transparent 18rem);
}
.sidebar::after {
  content: "";
  position: absolute;
  right: -90px;
  top: 78px;
  width: 180px;
  height: 180px;
  background: url("brand/ora-element-copper.png") center / contain no-repeat;
  opacity: .16;
  z-index: -1;
}

.brand {
  display: grid;
  gap: 13px;
  padding: 13px;
  text-decoration: none;
  border-radius: 28px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  padding: 15px 16px;
  border-radius: 22px;
  background: rgba(247,245,241,.96);
  border: 1px solid rgba(255,255,255,.28);
}
.brand-logo img {
  width: 174px;
  height: auto;
  object-fit: contain;
}
.brand-copy { display: block; padding: 0 4px 3px; }
.brand-copy strong {
  display: block;
  color: var(--ora-white);
  font-size: 16px;
  letter-spacing: -.025em;
}
.brand-copy span {
  display: block;
  color: rgba(233,238,245,.76);
  font-size: 12px;
  margin-top: 4px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}
.nav-label {
  display: block;
  margin: 12px 8px 3px;
  color: rgba(233,238,245,.50);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.nav-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 9px;
  border-radius: 18px;
  color: rgba(255,255,255,.86);
  text-decoration: none;
  border: 1px solid transparent;
  transition: .18s ease;
}
.nav-item:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.10);
  transform: translateX(2px);
}
.nav-item.active {
  background: rgba(255,255,255,.14);
  border-color: rgba(0,133,202,.38);
  box-shadow: inset 4px 0 0 var(--ora-blue), 0 12px 26px rgba(0,0,0,.12);
}
.nav-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.09);
  color: var(--ora-white);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
  border: 1px solid rgba(255,255,255,.10);
}
.nav-item.active .nav-icon {
  background: linear-gradient(135deg, var(--ora-blue), #12A3DC);
  box-shadow: 0 12px 24px rgba(0,133,202,.22);
}
.nav-item strong {
  display: block;
  color: inherit;
  font-size: 13px;
  letter-spacing: -.01em;
}
.nav-item small {
  display: block;
  color: rgba(233,238,245,.60);
  font-size: 11px;
  margin-top: 2px;
  line-height: 1.25;
}
.nav-item.active small { color: rgba(255,255,255,.74); }

.sidebar-card {
  margin-top: auto;
  padding: 17px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.055)),
    url("brand/ora-pattern-blue.png") right -58px bottom -48px / 210px auto no-repeat;
  border: 1px solid rgba(255,255,255,.12);
}
.sidebar-card .eyebrow { color: #8EDBFF; margin-bottom: 8px; }
.sidebar-card strong {
  display: block;
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
}
.sidebar-card p {
  margin: 8px 0 0;
  color: rgba(233,238,245,.68);
  font-size: 12px;
  line-height: 1.5;
}

.main {
  margin-left: var(--sidebar-width);
  padding: 30px clamp(22px, 3vw, 42px) 44px;
  min-width: 0;
}
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
  padding: clamp(22px, 3vw, 34px);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(251,250,247,.90)),
    url("brand/ora-pattern-stone.png") right -120px top -140px / 460px auto no-repeat;
  border: 1px solid rgba(226,220,210,.86);
  box-shadow: var(--shadow);
}
.topbar::after {
  content: "";
  position: absolute;
  right: 32px;
  top: 26px;
  width: 82px;
  height: 82px;
  background: url("brand/ora-element-blue.png") center / contain no-repeat;
  opacity: .10;
  pointer-events: none;
}
.topbar-copy { max-width: 820px; position: relative; z-index: 1; }
.eyebrow {
  color: var(--ora-copper);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: .72;
}
h1 {
  margin: 0;
  color: var(--ora-navy);
  font-size: clamp(33px, 4.4vw, 58px);
  line-height: .94;
  letter-spacing: -.075em;
  font-weight: 300;
}
h2 {
  margin: 0;
  color: var(--ora-navy);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.05;
  letter-spacing: -.045em;
  font-weight: 850;
}
h3 {
  margin: 0 0 8px;
  color: var(--ora-navy);
  letter-spacing: -.025em;
}
.topbar p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.flash-area {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 15px;
  border-radius: 18px;
  background: var(--ora-blue-soft);
  border: 1px solid #BDE8F7;
  color: var(--ora-navy);
  box-shadow: var(--shadow-soft);
}
.flash.error { background: #FDEAE7; border-color: #F6CFC8; color: var(--danger); }
.flash.success { background: #E7F5EE; border-color: #C1E6D4; color: var(--success); }
.flash.info { background: var(--ora-blue-soft); border-color: #BFE8F7; color: var(--ora-blue); }
.flash-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  color: currentColor;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.card, .panel {
  background: var(--panel);
  border: 1px solid rgba(226,220,210,.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}
.card.stat {
  position: relative;
  padding: 19px;
  overflow: hidden;
  min-height: 138px;
  display: grid;
  align-content: space-between;
}
.card.stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--ora-blue), var(--ora-copper));
}
.card.stat::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(0,133,202,.08);
}
.card.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.card.stat strong {
  display: block;
  color: var(--ora-navy);
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: -.07em;
  line-height: .9;
  margin-top: 14px;
  font-weight: 300;
}
.card.stat small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  display: block;
}

.grid.two {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.35fr);
  gap: 18px;
  margin-bottom: 18px;
}
.grid.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.panel {
  padding: clamp(18px, 2vw, 24px);
  margin-bottom: 18px;
  overflow: hidden;
}
.panel.narrow { max-width: 880px; }
.panel.hero-panel,
.panel.feature {
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(251,250,247,.92)),
    url("brand/ora-pattern-stone.png") right -110px bottom -120px / 430px auto no-repeat;
}
.panel.dark {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(4,30,66,.98), rgba(3,19,41,.96)),
    url("brand/ora-pattern-blue.png") right -130px bottom -130px / 440px auto no-repeat;
  border-color: rgba(255,255,255,.12);
}
.panel.dark h2, .panel.dark h3, .panel.dark strong { color: #fff; }
.panel.dark p, .panel.dark .hint { color: rgba(233,238,245,.72); }

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.panel-header.vertical {
  flex-direction: column;
}
.panel-header p {
  margin: 7px 0 0;
  color: var(--muted);
}
.panel-title {
  display: grid;
  gap: 4px;
}

.hint, .muted {
  color: var(--muted);
}
.hint {
  font-size: 13px;
  margin: 8px 0 0;
}
.empty-state {
  padding: 20px;
  border: 1px dashed rgba(4,30,66,.18);
  border-radius: 18px;
  background: rgba(251,250,247,.72);
  color: var(--muted);
}
.empty-state strong {
  color: var(--ora-navy);
  display: block;
  margin-bottom: 4px;
}

.flow {
  margin: 16px 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
  display: grid;
  gap: 10px;
}
.flow li {
  counter-increment: flow;
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}
.flow li::before {
  content: counter(flow, decimal-leading-zero);
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--ora-navy);
  font-size: 11px;
  font-weight: 950;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.actions.compact {
  gap: 8px;
  margin-top: 0;
  align-items: center;
}
.actions.compact a {
  display: inline-flex;
  color: var(--ora-blue);
  text-decoration: none;
  font-weight: 850;
  font-size: 12px;
  padding: 5px 0;
}
.narrow-actions { max-width: 880px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--ora-navy);
  border-radius: 999px;
  background: var(--ora-navy);
  color: #fff;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -.01em;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(4,30,66,.13);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(4,30,66,.17);
  background: #061832;
}
.button.secondary {
  background: var(--ora-blue);
  border-color: var(--ora-blue);
  color: #fff;
}
.button.secondary:hover { background: #0076B5; }
.button.tertiary {
  background: var(--ora-copper);
  border-color: var(--ora-copper);
}
.button.ghost {
  background: rgba(255,255,255,.66);
  color: var(--ora-navy);
  border-color: rgba(4,30,66,.14);
  box-shadow: none;
}
.button.ghost:hover { background: #fff; }
.button.small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
}
.button:disabled,
button:disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.link-button {
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-solid);
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
th {
  text-align: left;
  padding: 12px 11px;
  color: #fff;
  background: var(--ora-navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .045em;
}
th:first-child { border-top-left-radius: 16px; }
th:last-child { border-top-right-radius: 16px; }
td {
  padding: 12px 11px;
  border-bottom: 1px solid #EEE8DE;
  vertical-align: middle;
  background: rgba(255,255,255,.90);
}
tbody tr:nth-child(even) td { background: #FBFAF6; }
tbody tr:hover td { background: #EEF8FD; }
tbody tr:last-child td { border-bottom: 0; }
.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.code-cell {
  font-weight: 950;
  color: var(--ora-navy);
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  background: #F1ECE5;
  color: #475467;
  border: 1px solid rgba(4,30,66,.05);
  gap: 6px;
  white-space: nowrap;
}
.pill.big {
  font-size: 16px;
  padding: 12px 15px;
}
.pill.sucesso, .pill.ok { background: #E7F5EE; color: var(--success); }
.pill.erro, .pill.error { background: #FDEAE7; color: var(--danger); }
.pill.aviso, .pill.warning { background: #FFF4D8; color: var(--warning); }
.pill.info { background: var(--ora-blue-soft); color: var(--ora-blue); }
.pill.neutral { background: #F2EFE8; color: var(--ora-navy); }
.pill.copper { background: var(--ora-copper-soft); color: var(--ora-copper); }

.form-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
label {
  font-weight: 850;
  font-size: 13px;
  color: var(--ora-navy);
}
input, select, textarea {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 11px 12px;
  font: inherit;
  background: rgba(255,255,255,.96);
  color: var(--text);
  min-width: 0;
  outline: 0;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(0,133,202,.72);
  box-shadow: 0 0 0 4px rgba(0,133,202,.12);
  background: #fff;
}
textarea {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
}
input[type="file"] {
  width: 100%;
  padding: 16px;
  border-style: dashed;
  background: linear-gradient(135deg, #fff, #FBFAF7);
}
.file-feedback {
  display: none;
  font-size: 12px;
  color: var(--ora-blue);
  font-weight: 850;
  margin-top: -4px;
}
.file-feedback.active { display: block; }

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.inline-form input { min-width: 150px; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}
.filters.wide { width: 100%; }
.filters input { min-width: 240px; }
.filters select { min-width: 170px; }
.filters .small-input { min-width: 80px; width: 90px; }
.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 750;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line);
}
.check input {
  min-width: auto;
  accent-color: var(--ora-blue);
}

.upload-zone {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 22px;
  border: 1px dashed rgba(4,30,66,.22);
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(251,250,247,.86)),
    url("brand/ora-element-stone.png") right -70px bottom -72px / 210px auto no-repeat;
}
.upload-zone strong {
  color: var(--ora-navy);
  font-size: 18px;
}
.upload-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}
.progress {
  width: 520px;
  max-width: 100%;
  height: 12px;
  background: #E5DED4;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 14px;
  box-shadow: inset 0 1px 2px rgba(4,30,66,.14);
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ora-blue), var(--success));
  border-radius: inherit;
}

.nature-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 14px 0 16px;
}
.nature-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  box-shadow: 0 5px 16px rgba(4,30,66,.06);
  transition: .16s ease;
}
.nature-chip strong { color: var(--ora-navy); }
.nature-chip span { color: var(--muted); font-weight: 850; }
.nature-chip.active, .nature-chip:hover {
  border-color: var(--ora-blue);
  background: var(--ora-blue-soft);
  transform: translateY(-1px);
}
.depara-groups {
  display: grid;
  gap: 14px;
}
.nature-section {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(4,30,66,.04);
}
.nature-section summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  background: linear-gradient(90deg, #fff, #FBFAF6);
  border-bottom: 1px solid var(--line);
}
.nature-section summary::-webkit-details-marker { display: none; }
.nature-section summary > div:first-child {
  display: flex;
  align-items: center;
  gap: 11px;
}
.nature-code {
  width: 46px;
  height: 34px;
  border-radius: 14px;
  background: var(--ora-navy);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
}
.summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.kpi-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
}
.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.kpi-card strong {
  display: block;
  color: var(--ora-navy);
  font-size: 22px;
  letter-spacing: -.035em;
  margin-top: 7px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 2px 0;
  color: var(--muted);
  font-size: 12px;
}
.footer span:first-child {
  color: var(--ora-navy);
  font-weight: 900;
}

@media (max-width: 1180px) {
  :root { --sidebar-width: 286px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two, .grid.three, .kpi-grid { grid-template-columns: 1fr; }
  .topbar { grid-template-columns: 1fr; align-items: start; }
  .topbar-actions { justify-content: flex-start; }
}
@media (max-width: 920px) {
  .sidebar {
    position: static;
    width: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .main {
    margin-left: 0;
    padding: 20px;
  }
  .sidebar-card { margin-top: 8px; }
  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav-label { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  body { background-size: auto; }
  .main { padding: 14px; }
  .topbar { padding: 22px; border-radius: 24px; }
  h1 { font-size: clamp(34px, 14vw, 46px); }
  .cards, .sidebar-nav { grid-template-columns: 1fr; }
  .filters input, .filters select, .inline-form input {
    width: 100%;
    min-width: 0;
  }
  .inline-form { width: 100%; flex-wrap: wrap; }
  .button { width: 100%; }
  .actions.compact .button, .actions.compact .link-button, .topbar-actions .button { width: auto; }
  .progress-row, .nature-section summary {
    grid-template-columns: 1fr;
    align-items: flex-start;
    flex-direction: column;
  }
  .footer { flex-direction: column; }
}
