@font-face { font-family: 'Plus Jakarta Sans'; src: url('fonts/jakarta.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }

:root {
  --bg: #F2F5F3; --card: #fff; --ink: #13231E; --pine: #1F4238; --pine-2: #35594E; --pine-3: #0F2A22;
  --soft: #E1EBE6; --muted: #4E5D57; --line: #D3DDD8; --clay: #B04F29; --peach: #E9A27F;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sh-1: 0 1px 2px rgb(16 38 31 / .05), 0 4px 14px -4px rgb(16 38 31 / .08);
  --sh-2: 0 2px 5px rgb(16 38 31 / .06), 0 18px 40px -16px rgb(16 38 31 / .22);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--pine); }
h1, h2, h3 { letter-spacing: -0.025em; margin: 0; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 750; }
h3 { font-size: 15px; font-weight: 700; }

.top { position: sticky; top: 0; z-index: 10; background: rgb(242 245 243 / .85); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 0 rgb(19 35 30 / .09); }
.top .row { max-width: 1120px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { font-weight: 800; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand span { color: var(--pine); }
.tabs { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--muted); }
.tabs a:hover { background: var(--soft); }
.tabs a[aria-current] { background: var(--pine); color: #fff; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 20px 60px; display: flex; flex-direction: column; gap: 20px; }
.card { background: var(--card); border-radius: 18px; padding: 18px; box-shadow: var(--sh-1); }
.card + .card { margin-top: 0; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border-radius: 16px; padding: 16px; box-shadow: var(--sh-1); }
.kpi b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13px; color: var(--muted); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12.5px; text-transform: none; color: var(--muted); font-weight: 600; padding: 0 10px 8px; }
td { padding: 12px 10px; border-top: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: #FAFCFB; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.tag { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--pine); white-space: nowrap; }
.tag.warn { background: #FBE7DD; color: #8F3C1B; }
.tag.ok { background: var(--pine); color: #fff; }
.tag.off { background: #E7EBE9; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 12px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--pine); color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), 0 1px 2px rgb(15 42 34 / .2); transition: background .2s var(--ease), transform .35s var(--ease); text-decoration: none; }
.btn:hover { background: var(--pine-3); }
.btn:active { transform: scale(.975); }
.btn.ghost { background: transparent; color: var(--pine); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--peach); outline-offset: 1px; border-color: var(--pine-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.note { background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.55; }
.flash { background: var(--pine); color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 600; box-shadow: var(--sh-1); }
.flash.err { background: #8F3C1B; }

details.lead > summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; }
details.lead > summary::-webkit-details-marker { display: none; }
details.lead > summary::before { content: '▸ '; }
details.lead[open] > summary::before { content: '▾ '; }
.detail { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 18px; font-size: 13.5px; }
.detail div b { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }

.login { max-width: 380px; margin: 14vh auto; }
.login .card { display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 680px) {
  table, thead, tbody, tr, td, th { display: block; }
  thead { display: none; }
  tr { border-top: 1px solid var(--line); padding: 8px 0; }
  td { border: 0; padding: 4px 0; }
  td.num { text-align: left; }
}
