:root {
  --bg: #0f1017; --panel: #181a24; --panel2: #20222e; --line: #2c2f3d; --text: #ecebf5; --muted: #9a98ad;
  --accent: #8c5cff; --accent2: #b28cff; --ok: #3ed48a; --bad: #ff5d6c;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 28px; margin: 8px 0 18px; }
h2 { font-size: 19px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
small, .muted { color: var(--muted); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px;
       border-bottom: 1px solid var(--line); background: #12131b; position: sticky; top: 0; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; color: var(--text); }
.top nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top nav a { color: var(--text); }
.top nav .cta { background: var(--accent); padding: 7px 14px; border-radius: 9px; }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }

.hero { padding: 40px 0 24px; max-width: 720px; }
.hero h1 { font-size: 38px; line-height: 1.15; }
.hero p { color: var(--muted); font-size: 17px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.cards, .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 4px; }
.stats strong { display: block; font-size: 28px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card.big { display: flex; flex-direction: column; justify-content: center; }
.balance { font-size: 56px; line-height: 1.1; color: var(--accent2); }

.form-card { max-width: 440px; margin: 24px auto; background: var(--panel); border: 1px solid var(--line);
             border-radius: 16px; padding: 24px; }
label { display: block; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
label.check { display: flex; gap: 8px; align-items: center; color: var(--text); }
input, select { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border-radius: 9px;
                border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; }
label.check input { width: auto; margin: 0; }
input:focus, select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1; }
.row > button, .row > .button { flex: 0 0 auto; }
form.row { justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }

.button { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 10px;
          padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; text-align: center; }
.button:hover { filter: brightness(1.1); text-decoration: none; }
.button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.button.small { padding: 6px 12px; font-size: 13px; }
.button.danger { background: var(--bad); }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; background: rgba(62, 212, 138, .12);
         border: 1px solid rgba(62, 212, 138, .4); }
.flash.erro { background: rgba(255, 93, 108, .12); border-color: rgba(255, 93, 108, .45); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.num { text-align: right; white-space: nowrap; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.tag { background: var(--accent); color: #fff; border-radius: 6px; padding: 1px 6px; font-size: 11px; }
.prose p { color: #cfcde0; }
footer { text-align: center; padding: 24px; color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .top { padding: 12px 16px; }
  .hero h1 { font-size: 28px; }
  table { font-size: 13px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
}
