@font-face { font-family: "Chillax"; src: url("fonts/Chillax-Variable.woff2") format("woff2-variations"); font-weight: 200 700; font-display: swap; }
:root {
  --forest: #164B38; --forest-deep: #103729; --ocre: #E1C140; --cream: #FFFBD8;
  --line: #E8EAE5; --muted: #6E7B73; --white: #fff; --red: #B3402A; --violet: #54577C;
}
* { box-sizing: border-box; margin: 0; }
body { font: 15px/1.5 Inter, system-ui, sans-serif; background: var(--cream); color: var(--forest); min-height: 100vh; }
h1, h2, h3 { font-family: Chillax, Inter, system-ui, sans-serif; font-weight: 500; }
h1 { font-size: 22px; } h2 { font-size: 18px; margin-bottom: 14px; } h3 { font-size: 16px; margin: 18px 0 8px; }
.top { height: 56px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 20px; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 8px; font: 500 13px Chillax, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ocre); }
.top .link { margin-left: auto; }
main { max-width: 1000px; margin: 0 auto; padding: 24px 16px 64px; display: grid; gap: 20px; }
#app { display: grid; gap: 20px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.narrow { max-width: 420px; margin: 40px auto; width: 100%; }
.grid { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } .card { padding: 16px; } }
label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; }
input, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--forest); background: var(--white); }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn { margin-top: 16px; padding: 10px 18px; background: var(--ocre); color: var(--forest); border: 1px solid var(--ocre); border-radius: 8px; font: 600 14px Inter, sans-serif; cursor: pointer; }
.btn:hover { background: #d4b436; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: var(--white); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--forest); background: var(--white); }
.btn.danger { background: var(--white); border-color: var(--red); color: var(--red); }
.btn.sm { margin: 0; padding: 5px 10px; font-size: 13px; }
.link { background: none; border: 0; color: var(--forest); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 16px; }
.seg button { padding: 8px 14px; border: 0; background: var(--white); color: var(--forest); font: 500 13px Inter, sans-serif; cursor: pointer; }
.seg button.on { background: var(--forest); color: var(--cream); }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: ui-monospace, monospace; word-break: break-all; }
.err { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 10px; }
.preview { text-align: center; }
.preview canvas { max-width: 100%; height: auto !important; border: 1px solid var(--line); border-radius: 8px; }
.preview .mono { margin: 10px 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.actions .btn { margin-top: 0; }
.head { display: flex; align-items: baseline; justify-content: space-between; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 500 12px Chillax, sans-serif; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
td.dest { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
td.act { white-space: nowrap; text-align: right; }
td.act .btn { margin-left: 4px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2F8F5B; }
.badge.off::before { background: var(--muted); }
.modal { position: fixed; inset: 0; background: rgba(16, 55, 41, .45); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal[hidden] { display: none; }
.box { background: var(--white); border-radius: 12px; padding: 24px; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; position: relative; }
.x { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.kpi { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.kpi b { display: block; font: 500 28px Chillax, sans-serif; }
.kpi span { font-size: 12px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 80px; margin: 8px 0 2px; }
.bars i { flex: 1; background: var(--forest); min-height: 2px; border-radius: 2px 2px 0 0; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.brk { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.brk div:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 520px) { .twocol { grid-template-columns: 1fr; } }
