:root {
  --bg: #eef3f8;
  --ink: #0b1220;
  --muted: #667486;
  --line: #d8e0eb;
  --panel: #fff;
  --navy: #0f2742;
  --navy2: #0b1220;
  --gold: #c59a45;
  --green: #11845b;
  --red: #b42318;
  --amber: #9a5a05;
  --shadow: 0 16px 45px rgba(15, 39, 66, .12);
}
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; max-width: 100%; overflow-x: hidden; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.app { width: 100%; max-width: 560px; margin: 0 auto; min-height: 100vh; }
.head { background: var(--navy2); color: white; padding: 18px 16px 22px; }
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: #f6d78e; font-weight: 900; background: linear-gradient(135deg, #193a5b, #0b1220);
  border: 1px solid rgba(215, 181, 109, .75); flex: 0 0 auto;
}
.brand strong { display: block; font-size: 17px; }
.brand span { display: block; color: #b6c0cd; font-size: 13px; margin-top: 2px; }
.session { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #d9e4ef; font-size: 13px; margin-bottom: 14px; }
.session b { color: #f6d78e; }
.nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nav a, .logout, .btn {
  border: 0; border-radius: 8px; min-height: 46px; padding: 12px;
  font-weight: 800; text-align: center; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center;
}
.nav a { color: #e8eef7; background: transparent; }
.nav a.active { background: rgba(255,255,255,.09); }
.logout { background: rgba(255,255,255,.08); color: white; border: 1px solid rgba(255,255,255,.12); min-height: auto; padding: 8px 10px; }
main { padding: 16px; }
.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 900; margin: 0 0 8px; }
h1 { margin: 0; font-size: 26px; line-height: 1.18; }
h2 { margin: 0; font-size: 17px; }
p { line-height: 1.45; }
.subtitle { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 16px; }
.stack { display: grid; gap: 14px; margin-top: 16px; }
.metrics { display: grid; gap: 10px; }
.metric span, .field span, label span { color: var(--muted); font-size: 13px; display: block; }
.metric strong { display: block; margin-top: 6px; font-size: 29px; line-height: 1.05; }
.metric small { display: block; color: var(--muted); margin-top: 8px; line-height: 1.35; }
.progress { height: 10px; border-radius: 99px; background: #dde6ef; overflow: hidden; margin-top: 12px; }
.progress div { height: 100%; background: var(--navy); }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 900; white-space: nowrap; }
.pill.ok { color: var(--green); background: #e8f7ef; }
.pill.warn { color: var(--amber); background: #fff4df; }
.pill.bad { color: var(--red); background: #fff1f0; }
.pill.neutral { color: #475569; background: #eef2f7; }
.field-grid { display: grid; gap: 10px; }
.field, .item { border: 1px solid var(--line); border-radius: 9px; padding: 13px; background: #fff; display: grid; gap: 10px; }
.field strong { display: block; margin-top: 4px; }
.topline { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.topline strong { display: block; }
.muted { color: var(--muted); }
.amount { font-size: 23px; font-weight: 900; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn { color: var(--ink); background: #f1f5f9; border: 1px solid var(--line); width: 100%; cursor: pointer; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: white; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1b1305; }
.btn.danger { color: var(--red); background: #fff7f7; border-color: #f1c7c4; }
.btn.whatsapp { color: white; background: #128c7e; border-color: #128c7e; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); padding: 12px; }
textarea { min-height: 104px; resize: vertical; }
.login { min-height: 100vh; display: grid; align-content: center; gap: 16px; padding: 24px 16px; }
.login .brand { color: var(--ink); }
.login .brand span { color: var(--muted); }
.notice { background: #fff8e8; border: 1px solid #ead29f; border-radius: 9px; padding: 12px; color: #624006; font-size: 14px; }
.tabs { margin-top: 14px; }
.business-select { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: white; font-weight: 750; }
.flash { border-radius: 9px; padding: 12px; margin-top: 14px; background: #e8f7ef; color: var(--green); font-weight: 800; }
.flash.error { background: #fff1f0; color: var(--red); }
@media (min-width: 720px) {
  .app { max-width: 980px; }
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .field-grid { grid-template-columns: 1fr 1fr; }
}
