:root { --text: #1d1d1f; --text-2: #6e6e73; --text-3: #a1a1a6; --fill: #f5f5f7; --fill-2: #e8e8ed; --hair: rgba(0, 0, 0, .09); --brand: #7900e9; --brand-2: #b14bff; --green: #1f9d48; --red: #d70015; --red-bg: #fff0f1;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif; --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--fill); -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
a { color: var(--brand); }
h1 { font-family: var(--display); font-size: 34px; letter-spacing: -.03em; margin: 0; }
h2 { font-size: 18px; margin: 0 0 14px; letter-spacing: -.01em; }
h2 small { font-weight: 500; color: var(--text-3); font-size: 14px; margin-left: 6px; }
.sub { color: var(--text-2); margin: 6px 0 22px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 12px; }
input { font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 0; background: var(--fill); color: var(--text); outline: none; box-shadow: inset 0 0 0 1px transparent; width: 100%; }
input:focus { box-shadow: inset 0 0 0 2px var(--brand); background: #fff; }
button, .btn { font: inherit; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; border-radius: 99px; padding: 11px 20px; background: var(--brand); color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:hover, .btn:hover { background: #5f00b8; }
.ghost { background: var(--fill); color: var(--text); padding: 8px 14px; font-size: 14px; }
.ghost:hover { background: var(--fill-2); }
.danger { color: var(--red); }
button.danger:not(.ghost) { background: var(--red); color: #fff; }
.err { background: var(--red-bg); color: var(--red); padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.okmsg { background: #e9f8ee; color: var(--green); padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.hint { font-size: 13px; color: var(--text-2); line-height: 1.45; margin: 0 0 14px; font-weight: 400; }
.inline { display: inline; margin: 0; }

/* ---------- Entrada ---------- */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(900px 500px at 50% -10%, #f1e6fd, #f5f5f7 60%); }
.box { width: min(400px, 100%); background: #fff; border-radius: 26px; padding: 34px 28px; box-shadow: 0 0 0 1px var(--hair), 0 30px 60px -30px rgba(40, 0, 80, .35); }
.box .logo { height: 26px; display: block; margin-bottom: 22px; }
.box h1 { font-size: 26px; }
.box button { width: 100%; margin-top: 6px; }

/* ---------- Panel ---------- */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 24px; background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
.top .logo { height: 22px; }
.pill { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); background: #f1e6fd; padding: 4px 9px; border-radius: 99px; }
.top nav { display: flex; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.top nav a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; }
.top nav a:hover { color: var(--brand); }
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 30px 0 60px; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 16px; }
.kpi { background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); display: grid; gap: 4px; }
.kpi b { font-family: var(--display); font-size: 36px; letter-spacing: -.03em; line-height: 1; }
.kpi span { color: var(--text-2); font-size: 14px; }
.kpi em { font-style: normal; font-size: 12.5px; color: var(--text-3); }
.kpi.accent { background: linear-gradient(150deg, #1c0033, #3b0a6b); color: #fff; }
.kpi.accent span { color: #e9d6ff; } .kpi.accent em { color: #cdb4ee; }
.card { background: #fff; border-radius: 22px; padding: 20px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); margin-bottom: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-h h2 { margin: 0; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid2 > .card { margin-bottom: 0; }
.grid2 + .search { margin-top: 16px; }
.legend { display: flex; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: -8px; vertical-align: -1px; }
.lg-line { background: #1d1d1f; height: 3px !important; border-radius: 2px !important; }
.lg-l { background: var(--brand); } .lg-n { background: #d6b3ff; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--fill-2); stroke-width: 1; }
.chart .ax { font-size: 11px; fill: var(--text-3); font-family: var(--font); }
.chart .bar-l { fill: var(--brand); } .chart .bar-n { fill: #d6b3ff; }
.chart .line { fill: none; stroke: #1d1d1f; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: #1d1d1f; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto 44px; gap: 10px; align-items: center; font-size: 14px; }
.bar-k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-svg { width: 100%; height: 10px; display: block; }
.bar-bg { fill: var(--fill); } .bar-fg { fill: var(--brand); }
.bar-row b { font-variant-numeric: tabular-nums; }
.bar-row em { font-style: normal; color: var(--text-3); font-size: 12.5px; text-align: right; }
.empty { color: var(--text-2); font-size: 14px; line-height: 1.5; margin: 0; }
.search { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.search input { flex: 1; min-width: 220px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--hair); }
td { padding: 10px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td a { text-decoration: none; }
.tag { display: inline-block; font-size: 12.5px; background: var(--fill); padding: 3px 9px; border-radius: 99px; }
details.del summary { list-style: none; cursor: pointer; color: var(--red); font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 99px; background: var(--red-bg); display: inline-block; }
details.del summary::-webkit-details-marker { display: none; }
details.del[open] summary { margin-bottom: 8px; }
details.del form { display: grid; gap: 8px; max-width: 240px; font-size: 13px; color: var(--text-2); }
details.del button { padding: 8px 14px; font-size: 13px; }
details.copy { margin-top: 14px; font-size: 14px; }
details.copy summary { cursor: pointer; color: var(--brand); font-weight: 600; }
textarea { width: 100%; margin-top: 8px; font: inherit; font-size: 13px; border: 0; border-radius: 12px; background: var(--fill); padding: 10px; resize: vertical; }
.stack { display: grid; gap: 4px; align-content: start; }
.stack b { margin: 6px 0 6px; }
.stack button { justify-self: start; }
.foot { text-align: center; font-size: 12.5px; color: var(--text-3); }
@media (max-width: 600px) { h1 { font-size: 28px; } .top { padding: 10px 14px; } .bar-row { grid-template-columns: 90px 1fr auto 38px; } }
