:root {
  --ink: #123b4a;
  --muted: #647a83;
  --green: #159a78;
  --teal: #4bae9b;
  --coral: #ff6b5c;
  --canvas: #f4f7f8;
  --line: #dbe5e8;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Arial, Helvetica, sans-serif; }
button, select { font: inherit; }
button { cursor: pointer; }
.nav-icon { width: 22px; text-align: center; font-size: 22px; line-height: 1; }

.app-shell { min-height: 100vh; background: radial-gradient(circle at 70% -10%, #fff 0, transparent 35%), var(--canvas); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; padding: 31px 21px; background: rgba(255,255,255,.92); border-right: 1px solid var(--line); z-index: 20; display: flex; flex-direction: column; backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 5px 35px; }
.brand-mark { width: 43px; height: 43px; border-radius: 50%; padding: 3px; background: linear-gradient(145deg, #39c0a0, #08708a); box-shadow: 0 7px 18px #159a7830; }
.brand-mark span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; color: #fff; border: 2px solid #fff; font-size: 12px; font-weight: 800; }
.brand strong { display: block; font-size: 15px; white-space: nowrap; }
.brand small { display: block; color: #799099; font-size: 9px; margin-top: 3px; }
nav { display: grid; gap: 10px; }
.nav-item { display: flex; gap: 13px; align-items: center; height: 50px; width: 100%; border: 0; border-radius: 11px; padding: 0 15px; background: transparent; color: #244c5a; font-weight: 600; font-size: 14px; text-align: left; transition: .2s ease; }
.nav-item:hover { background: #edf6f5; transform: translateX(2px); }
.nav-item.active { background: linear-gradient(135deg, #08708a, #075b70); color: white; box-shadow: 0 9px 24px #08708a2e; }
.sidebar-note { margin-top: auto; display: flex; gap: 9px; padding: 14px; border-radius: 12px; color: #54717b; background: #f2f8f7; font-size: 10px; line-height: 1.45; }
.sidebar-note p { margin: 0; }
.sidebar-note strong { color: var(--ink); }
.mobile-menu { display: none; position: fixed; z-index: 30; top: 16px; left: 16px; border: 0; border-radius: 10px; background: var(--ink); color: white; padding: 9px; }

.content { margin-left: 224px; padding: 28px 30px 20px; max-width: 1650px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 25px; margin-bottom: 17px; }
.eyebrow { margin: 0 0 4px!important; color: var(--green)!important; font-size: 10px!important; letter-spacing: .16em; font-weight: 800; }
.topbar h1 { margin: 0; font-size: clamp(27px, 2.2vw, 36px); letter-spacing: -.03em; line-height: 1.08; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.header-actions { display: flex; gap: 28px; align-items: center; }
.period-select { display: flex; align-items: center; gap: 9px; min-width: 220px; height: 46px; padding: 0 13px; border-radius: 10px; border: 1px solid #cedadd; background: #fff; box-shadow: 0 3px 12px #123b4a08; }
.period-select select { border: 0; outline: 0; flex: 1; color: var(--ink); background: #fff; font-size: 13px; }
.updated { text-align: right; font-size: 11px; }
.updated span { display: block; font-weight: 700; }
.updated i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-left: 4px; }
.updated small { color: #83969d; }

.context-banner { display: flex; justify-content: space-between; align-items: center; border: 1px solid #cce4e1; background: #eef8f6; padding: 9px 14px; border-radius: 10px; font-size: 11px; margin-bottom: 15px; }
.context-banner > div { display: flex; gap: 8px; align-items: center; }
.context-banner button, footer button { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #08708a; font-size: 11px; font-weight: 700; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 15px; }
.kpi-card { min-height: 116px; display: flex; align-items: center; gap: 16px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 16px #123b4a0a; transition: .2s ease; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px #123b4a12; }
.icon-circle { width: 49px; height: 49px; flex: 0 0 49px; border-radius: 50%; display: grid; place-items: center; }
.icon-circle.mint { color: #087f66; background: #e5f7f1; }
.icon-circle.coral { color: var(--coral); background: #fff0ed; }
.icon-circle.teal { color: #087c80; background: #e4f5f4; }
.kpi-card span { display: block; font-size: 11px; font-weight: 700; margin-bottom: 7px; }
.kpi-card strong { display: block; font-size: clamp(19px, 1.65vw, 27px); letter-spacing: -.04em; white-space: nowrap; }
.kpi-card small { display: block; margin-top: 8px; font-size: 9px; color: var(--green); font-weight: 700; }
.kpi-card small em { font-style: normal; color: #83969d; font-weight: 400; margin-left: 3px; }
.coral-text { color: var(--coral)!important; }

.dashboard-grid { display: grid; grid-template-columns: 1.28fr .92fr; gap: 15px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 16px #123b4a0a; padding: 18px 20px; overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel h2 { font-size: 15px; margin: 0; }
.panel-head p { font-size: 10px; color: #718790; margin: 4px 0 0; }
.source-chip { font-size: 8px; padding: 5px 8px; border-radius: 20px; background: #eef5f6; color: #55717b; text-transform: uppercase; letter-spacing: .06em; }
.legend { display: flex; gap: 18px; margin-top: 8px; font-size: 9px; color: #5f767f; }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.legend .income { background: var(--green); }
.legend .expense { background: var(--coral); }
.line-chart { width: 100%; height: 215px; margin-top: 2px; overflow: visible; }
.grid-line { stroke: #d9e4e6; stroke-width: 1; stroke-dasharray: 3 3; }
.axis-label, .month-label { fill: #70858d; font-size: 9px; }
.income-line, .expense-line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.income-line { stroke: var(--green); }
.expense-line { stroke: var(--coral); }
.income-dot { fill: var(--green); }
.expense-dot { fill: var(--coral); }

.impact-panel { padding-bottom: 12px; }
.demo-badge { padding: 6px 9px; border-radius: 7px; color: #a46a08; background: #fff4d8; font-size: 9px; font-weight: 700; white-space: nowrap; }
.impact-item { display: grid; grid-template-columns: 49px 1fr auto; gap: 13px; align-items: center; margin-top: 14px; padding: 12px; border: 1px solid #dce6e8; border-radius: 12px; }
.impact-icon { width: 47px; height: 47px; border-radius: 50%; display: grid; place-items: center; color: white; }
.impact-icon.dark { background: #08708a; }
.impact-icon.green { background: var(--green); }
.impact-item span { display: block; font-size: 11px; font-weight: 700; }
.impact-item strong { display: inline-block; font-size: 24px; line-height: 1; color: var(--green); margin: 4px 0; }
.impact-item small { display: block; font-size: 8px; color: #83969d; }
.impact-item b { align-self: start; color: #08708a; border: 1px dashed #08708a; border-radius: 20px; padding: 4px 7px; font-size: 7px; }
.demo-note { margin-top: 10px; padding: 7px 10px; border-radius: 7px; background: #eef5f9; color: #55717b; font-size: 8px; }

.resource-content, .trace-content { display: flex; align-items: center; gap: 26px; margin-top: 16px; min-height: 180px; }
.donut, .trace-ring { width: 150px; height: 150px; flex: 0 0 150px; border-radius: 50%; display: grid; place-items: center; }
.static-donut { background: conic-gradient(#08708a 0 49.6%, #159a78 49.6% 70.9%, #55b7ad 70.9% 83.1%, #ff6b5c 83.1% 92.3%, #f0a14a 92.3% 96.9%, #8e72b5 96.9% 100%); }
.trace-ring { background: conic-gradient(#159a78 0 97.4%, #e6edef 97.4% 100%); }
.donut::after, .trace-ring::after { content:""; width: 92px; height: 92px; background: white; border-radius: 50%; grid-area: 1/1; }
.donut > div, .trace-ring > div { z-index: 1; grid-area: 1/1; text-align: center; }
.donut strong, .trace-ring strong { display: block; font-size: 17px; }
.donut span, .trace-ring span { display: block; max-width: 74px; font-size: 8px; color: #6f848c; margin-top: 3px; }
.resource-list, .trace-list { flex: 1; min-width: 0; display: grid; gap: 8px; }
.resource-list > div { display: grid; grid-template-columns: 8px minmax(105px, 1fr) auto 32px; gap: 7px; align-items: center; font-size: 9px; }
.resource-list i { width: 7px; height: 7px; border-radius: 50%; }
.resource-list strong { font-weight: 500; white-space: nowrap; }
.resource-list em { color: #718790; font-style: normal; text-align: right; }
.trace-list > div { display: grid; grid-template-columns: 20px 1fr auto; gap: 9px; align-items: center; padding: 8px 10px; border-radius: 8px; border: 1px solid #e2e9eb; font-size: 9px; }
.trace-list svg { color: var(--green); }
.trace-list strong { font-size: 14px; }

footer { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 11px 14px; border: 1px solid #cce1eb; border-radius: 10px; background: #f2f8fb; color: #55717b; font-size: 9px; }
footer svg { color: #167da4; flex: 0 0 auto; }
footer button { margin-left: auto; white-space: nowrap; }
.auttaris-credit { padding: 13px 0 2px; text-align: center; color: #718790; font-size: 10px; }
.auttaris-credit strong { color: #08708a; }

.section-intro { display: flex; align-items: center; justify-content: space-between; gap: 34px; margin: 0 0 15px; padding: 15px 18px; border-radius: 13px; color: white; background: linear-gradient(120deg, #123b4a, #08708a); box-shadow: 0 8px 24px #123b4a20; }
.section-intro.social { background: linear-gradient(120deg, #08708a, #159a78); }
.section-intro > div { flex: 1.3; }
.section-intro > div > span { font-size: 8px; letter-spacing: .16em; font-weight: 800; color: #9de3d2; }
.section-intro h2 { margin: 4px 0 0; font-size: 17px; line-height: 1.25; }
.section-intro p { flex: 1; margin: 0; padding-left: 24px; border-left: 1px solid #ffffff40; color: #dceced; font-size: 10px; line-height: 1.55; }
.dashboard-grid.equal { grid-template-columns: 1fr 1fr; }
.dashboard-grid .span-two { grid-column: 1 / -1; }
.capacity-card { display: flex; flex-direction: column; }
.hero-number { margin-top: 18px; color: var(--green); font-size: 51px; line-height: .95; letter-spacing: -.06em; }
.capacity-card > span { color: #486872; font-size: 12px; font-weight: 700; margin-top: 5px; }
.progress { height: 8px; margin: 18px 0 12px; border-radius: 20px; overflow: hidden; background: #e4edef; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #159a78, #4bae9b); }
.capacity-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e5edef; font-size: 10px; }
.capacity-card > small { margin-top: auto; padding-top: 12px; color: #80949b; font-size: 8px; line-height: 1.45; }
.bar-list, .community-bars { display: grid; gap: 13px; margin-top: 23px; }
.bar-list > div, .community-bars > div { display: grid; grid-template-columns: 125px 1fr 45px; align-items: center; gap: 10px; font-size: 9px; }
.bar-list > div > div, .community-bars > div > div { height: 8px; overflow: hidden; border-radius: 10px; background: #edf2f3; }
.bar-list i, .community-bars i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #08708a, #4bae9b); }
.bar-list strong, .community-bars strong { text-align: right; }
.score-layout, .goal-layout { display: flex; align-items: center; gap: 34px; min-height: 205px; margin-top: 10px; }
.trace-ring.large { width: 170px; height: 170px; flex-basis: 170px; }
.trace-ring.large::after { width: 104px; height: 104px; }
.trace-ring.large strong { font-size: 24px; }
.checks { flex: 1; display: grid; gap: 3px; }
.checks p { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 7px; margin: 0; padding: 9px 0; border-bottom: 1px solid #e6edef; font-size: 9px; }
.checks svg { color: var(--green); }
.evidence-flow { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; margin-top: 42px; }
.evidence-flow > div { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.evidence-flow > div > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: white; background: #08708a; font-size: 13px; font-weight: 800; }
.evidence-flow strong { margin-top: 8px; font-size: 10px; }
.evidence-flow small { color: #80949b; font-size: 8px; }
.evidence-flow b { position: absolute; top: 9px; right: -8px; color: #6dbfae; font-size: 18px; }
.control-table { margin-top: 15px; }
.control-table > div { display: grid; grid-template-columns: 2fr 1fr .7fr .7fr; gap: 12px; align-items: center; min-height: 36px; padding: 0 12px; border-bottom: 1px solid #e5edef; font-size: 9px; }
.control-table .table-head { border-radius: 7px; background: #eef5f6; color: #718790; font-weight: 700; text-transform: uppercase; font-size: 8px; }
.control-table em { font-style: normal; }
.status { justify-self: start; padding: 4px 7px; border-radius: 12px; color: #a95d21; background: #fff0e5; }
.status.ok { color: #08785e; background: #e5f7f1; }
.funnel { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-top: 17px; }
.funnel > div { display: flex; justify-content: space-between; align-items: center; min-height: 38px; padding: 0 16px; color: white; background: linear-gradient(90deg, #08708a, #159a78); clip-path: polygon(5% 0,95% 0,100% 100%,0 100%); font-size: 9px; }
.funnel > div:nth-child(2) { opacity: .9; }.funnel > div:nth-child(3) { opacity: .8; }.funnel > div:nth-child(4) { opacity: .7; }
.funnel b { font-size: 15px; }
.goal-ring { width: 165px; height: 165px; flex: 0 0 165px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#159a78 71%, #e6edef 71%); }
.goal-ring::after { content:""; width: 105px; height: 105px; grid-area: 1/1; border-radius: 50%; background: white; }
.goal-ring > div { z-index: 1; grid-area: 1/1; text-align: center; }
.goal-ring strong { display: block; font-size: 27px; }
.goal-ring span { color: #718790; font-size: 9px; }
.goal-layout > div:last-child { flex: 1; }
.goal-layout p { display: flex; justify-content: space-between; margin: 0; padding: 8px 0; border-bottom: 1px solid #e6edef; font-size: 9px; }
.goal-layout small { display: block; margin-top: 12px; color: #718790; font-size: 8px; line-height: 1.4; }
.community-bars i { background: linear-gradient(90deg, #159a78, #75cbb6); }
.efficiency-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 17px; }
.efficiency-grid > div { padding: 13px; border-radius: 10px; border: 1px solid #deeaec; background: #fbfdfd; }
.efficiency-grid span, .efficiency-grid small { display: block; font-size: 8px; color: #718790; }
.efficiency-grid strong { display: block; margin: 5px 0; color: var(--green); font-size: 21px; letter-spacing: -.04em; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid.equal { grid-template-columns: 1fr; }
  .dashboard-grid .span-two { grid-column: auto; }
  .header-actions { gap: 12px; }
  .updated { display: none; }
}

@media (max-width: 760px) {
  .mobile-menu { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; box-shadow: 20px 0 45px #123b4a1f; }
  .sidebar.open { transform: translateX(0); }
  .content { margin-left: 0; padding: 72px 16px 20px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .header-actions, .period-select { width: 100%; }
  .context-banner { align-items: flex-start; gap: 10px; }
  .context-banner button { display: none; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-card { min-height: 102px; }
  .resource-content, .trace-content { flex-direction: column; align-items: stretch; }
  .donut, .trace-ring { align-self: center; }
  .impact-item { grid-template-columns: 46px 1fr; }
  .impact-item b { display: none; }
  footer button { display: none; }
  .section-intro { align-items: flex-start; flex-direction: column; gap: 10px; }
  .section-intro p { padding: 0; border: 0; }
  .score-layout, .goal-layout { flex-direction: column; align-items: stretch; }
  .trace-ring.large, .goal-ring { align-self: center; }
  .evidence-flow { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .evidence-flow b { display: none; }
  .control-table > div { grid-template-columns: 1.6fr 1fr .5fr; }
  .control-table > div > :last-child { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .kpi-card, .panel { animation: reveal .45s both; }
  .kpi-card:nth-child(2) { animation-delay: .05s; }
  .kpi-card:nth-child(3) { animation-delay: .1s; }
  .kpi-card:nth-child(4) { animation-delay: .15s; }
  @keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
