:root { --pos: var(--teal-dark); --neg: var(--orange); --seq: var(--teal-dark); --grid: var(--line); --axis: #c3c9d1; --ink: var(--text); --ink-2: var(--muted); --wash: rgba(44,46,61,.05); --up: var(--good); --down: var(--bad); }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Poppins', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
.hidden { display: none !important; }
.page { padding: 28px; max-width: 1500px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
h1 { margin: 0; font-size: 22px; color: var(--navy); }
.meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.pill { display: inline-block; font-size: 11px; font-weight: 500; border-radius: 999px; padding: 2px 9px; background: #eef1f4; color: var(--muted); }
.pill.live { background: #e0f6f9; color: var(--blue); }

.btn { font: inherit; font-weight: 500; font-size: 13px; background: var(--teal); color: #fff; border: 0; border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.btn:hover { background: var(--teal-dark); }
.btn.ghost { background: #fff; color: var(--teal-dark); border: 1px solid #d5dae1; }
input[type=search], select { font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid #d5dae1; border-radius: 10px; background: #fff; color: var(--text); }
input:focus, select:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.seg { display: inline-flex; border: 1px solid #d5dae1; border-radius: 10px; overflow: hidden; }
.seg button { font: inherit; font-size: 13px; background: #fff; border: 0; padding: 8px 14px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--teal); color: #fff; font-weight: 500; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.chk input { accent-color: var(--teal); }
.banner { background: #fff4e5; color: #8a4b00; border: 1px solid #fde0b8; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.banner.error { background: #fdecea; color: #8a1c0f; border-color: #f6c8c1; }
code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.tile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; border-top: 4px solid var(--teal); }
.tile:nth-child(2) { border-color: var(--purple); } .tile:nth-child(3) { border-color: var(--orange); } .tile:nth-child(4) { border-color: var(--blue); } .tile:nth-child(5) { border-color: var(--slate); }
.tile .label { color: var(--muted); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.tile .value { font-size: 24px; font-weight: 600; color: var(--navy); letter-spacing: -0.01em; }
.tile .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-bottom: 16px; }
.card { min-width: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.span12 { grid-column: span 12; } .span6 { grid-column: span 6; }
@media (max-width: 1000px) { .span6 { grid-column: span 12; } .page { padding: 16px; } }
.card h2 { font-size: 15px; font-weight: 600; margin: 0 0 2px; color: var(--navy); }
.cardhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card .hint { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
button.xp { font: inherit; font-size: 12px; color: var(--muted); background: transparent; border: 1px solid #d5dae1; border-radius: 8px; padding: 3px 10px; cursor: pointer; white-space: nowrap; }
button.xp:hover { background: #eaf7fa; color: var(--blue); border-color: var(--teal); }

.last { display: grid; font-size: 13px; }
.last .r { display: grid; grid-template-columns: 1.3fr 1.6fr auto auto; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.last .r:last-child { border-bottom: 0; }
.last .d { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; white-space: nowrap; }
.last .m { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.last .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.last .a { font-variant-numeric: tabular-nums; text-align: right; font-weight: 500; }

svg { display: block; width: 100%; height: auto; overflow: visible; }
.gridline { stroke: var(--grid); stroke-width: 1; } .baseline { stroke: var(--axis); stroke-width: 1; }
.tick { fill: var(--muted); font-size: 11px; } .lbl { fill: var(--muted); font-size: 12px; } .val { fill: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; }
.hit { fill: transparent; cursor: default; } .hit:hover + .bar, .bar:hover { opacity: .85; }
.tip { position: fixed; pointer-events: none; z-index: 80; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.15); display: none; max-width: 280px; }
.tip b { display: block; margin-bottom: 2px; }
.tip .row { display: flex; justify-content: space-between; gap: 12px; } .tip .k { color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--c); }

.tablehead { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.tablewrap { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: #fff; background: var(--navy); font-weight: 500; font-size: 12px; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.in { color: var(--up); font-weight: 500; }
td.desc { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.state { font-size: 11px; border-radius: 999px; padding: 1px 8px; border: 1px solid #d5dae1; color: var(--muted); }
.state.declined, .state.reverted, .state.failed, .state.cancelled { color: var(--down); border-color: currentColor; }
.state.pending { color: #a15c07; border-color: currentColor; }
.empty { color: var(--muted); padding: 24px; text-align: center; }
.loading { opacity: .5; pointer-events: none; }
