/* Ledgwise — brandbook: Azul profundo #0B1F3B · Dourado #C9A227 · Cinza claro #F5F7FA · Inter */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --navy: #0B1F3B; --navy-2: #13294B; --navy-3: #1E3A63;
  --gold: #C9A227; --gold-soft: #F6EDD0;
  --bg: #F5F7FA; --card: #FFFFFF; --line: #E3E8EF; --line-2: #EEF1F5;
  --text: #0F1B2D; --muted: #5B6B80; --faint: #8C99AB;
  --ok: #1E8E5A; --ok-bg: #E4F4EC; --warn: #B7791F; --warn-bg: #FDF3E1;
  --err: #C0392B; --err-bg: #FBE9E7; --info: #2B6CB0; --info-bg: #E6F0FA;
  --radius: 10px; --shadow: 0 1px 2px rgba(11,31,59,.06), 0 1px 1px rgba(11,31,59,.04);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg);
  color: var(--text); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--navy-3); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* layout */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #C8D2E0; padding: 18px 14px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; }
.brand img { width: 30px; height: 30px; }
.brand b { font-size: 17px; letter-spacing: .01em; }
.brand small { display: block; color: var(--gold); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.side a.nav { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px;
  color: #C8D2E0; font-weight: 500; }
.side a.nav:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.side a.nav.on { background: var(--navy-3); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.side .sect { margin: 16px 10px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #7F90A8; font-weight: 600; }
.side .co { font-size: 13px; }
.side .foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--navy-3); font-size: 12px; }
.side .foot button { background: none; border: 0; color: #9FB0C6; padding: 0; cursor: pointer; font: inherit; }
.main { padding: 26px 32px 60px; max-width: 1320px; width: 100%; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.top .sub { color: var(--muted); margin-top: 4px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--gold); font-weight: 600; }
.pill { display: inline-block; min-width: 20px; padding: 0 7px; border-radius: 99px; font-size: 11.5px; font-weight: 600;
  background: var(--gold); color: var(--navy); text-align: center; line-height: 19px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd { padding: 14px 18px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card > .bd { padding: 16px 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g2, .g3, .g4 { grid-template-columns: 1fr 1fr; } .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; } }
.stat { padding: 16px 18px; }
.stat .k { color: var(--muted); font-size: 12px; font-weight: 500; }
.stat .v { font-size: 26px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat.hl { background: var(--navy); color: #fff; border-color: var(--navy); }
.stat.hl .k { color: #AFC0D6; } .stat.hl .v small { color: var(--gold); }
.bar { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar > span { display: block; height: 100%; background: var(--gold); }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #FAFBFD; white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #FBFCFE; }
.desc { max-width: 360px; }
.desc .raw { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
.amt-in { color: var(--ok); font-weight: 600; } .amt-out { color: var(--text); }

/* badges */
.b { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.b.ok { background: var(--ok-bg); color: var(--ok); } .b.warn { background: var(--warn-bg); color: var(--warn); }
.b.info { background: var(--info-bg); color: var(--info); } .b.muted { background: var(--line-2); color: var(--muted); }
.b.gold { background: var(--gold-soft); color: #7A5F0F; } .b.err { background: var(--err-bg); color: var(--err); }
.conf { font-size: 11.5px; color: var(--muted); }

/* forms */
label { display: block; font-weight: 500; font-size: 12.5px; margin-bottom: 5px; color: #2A3A50; }
input[type=text], input[type=email], input[type=password], input[type=month], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #CDD5E0; border-radius: 8px; font: inherit; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(201,162,39,.35); border-color: var(--gold); }
textarea { min-height: 70px; resize: vertical; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 140px; margin-bottom: 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--navy);
  background: var(--navy); color: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--navy-3); text-decoration: none; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn.gold:hover { background: #B8931F; }
.btn.ghost { background: #fff; color: var(--navy); border-color: #CDD5E0; }
.btn.ghost:hover { background: var(--bg); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.link { background: none; border: 0; color: var(--navy-3); padding: 0; font-weight: 500; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 12.5px; color: var(--muted); margin: 0; }
.decide { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.decide select { width: 230px; padding: 6px 8px; font-size: 13px; }
.decide input[type=text] { width: 150px; padding: 6px 8px; font-size: 13px; }

/* flashes */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 10px; font-weight: 500; border: 1px solid transparent; }
.flash.ok { background: var(--ok-bg); color: #155F3D; border-color: #BFE3CF; }
.flash.error { background: var(--err-bg); color: #8E2A20; border-color: #F2C6C0; }
.flash.info { background: var(--info-bg); color: #1F4E80; border-color: #C5DAF0; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.reason { font-size: 12px; color: var(--warn); }
details summary { cursor: pointer; color: var(--navy-3); font-weight: 500; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; padding: 8px 0 8px 34px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 7px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--line-2); color: var(--muted); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.steps li.done::before { content: "✓"; background: var(--ok-bg); color: var(--ok); }

/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth .hero { background: var(--navy); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  background-image: linear-gradient(rgba(201,162,39,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(201,162,39,.08) 1px, transparent 1px);
  background-size: 34px 34px; }
.auth .hero h1 { font-size: 38px; line-height: 1.1; max-width: 460px; }
.auth .hero h1 em { color: var(--gold); font-style: normal; }
.auth .hero p { color: #AFC0D6; max-width: 420px; font-size: 15px; }
.auth .panel { display: grid; place-items: center; padding: 40px; }
.auth form { width: 100%; max-width: 360px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth .hero { display: none; } }
