@font-face { font-family: "Barlow"; src: url(fonts/barlow-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/barlow-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/barlow-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/barlow-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #000;
  --card: #1A1A1A;
  --card2: #242424;
  --line: #333;
  --tx: #F2F2F2;
  --mut: #9B9B9B;
  --btn: #EDEDED;
  --ok: #5FC26E;
  --bad: #FF5A4E;
  --warn: #F2B84B;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font-family: "Barlow", system-ui, sans-serif; font-size: 17px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); overflow-x: hidden; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.muted { color: var(--mut); }
.sm { font-size: 15px; }
.pad { padding: 0 20px; }

.screen { max-width: 560px; margin: 0 auto; padding: 14px 18px 40px; }
.mark { font-weight: 600; letter-spacing: .24em; font-size: 12px; white-space: nowrap; }

/* entrar / senha */
.auth { min-height: 100dvh; display: flex; align-items: center; }
.auth-in { width: 100%; padding: 30px 6px; }
.auth h1 { font-size: 34px; font-weight: 700; margin: 34px 0 8px; letter-spacing: -0.01em; }
.auth form { margin-top: 26px; }
.auth label { display: block; font-size: 15px; color: var(--mut); margin: 16px 0 6px; }
.auth input { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--tx); padding: 15px 14px; font-size: 17px; }
.auth input:focus { outline: none; border-color: #888; }
.err { color: var(--bad); font-size: 15px; min-height: 1.4em; margin: 14px 0 6px; }
.ok { color: var(--ok); font-size: 15px; min-height: 1.4em; margin: 14px 0 6px; }
.link { display: block; background: none; border: 0; color: var(--tx); text-decoration: underline; padding: 14px 0; margin-top: 8px; cursor: pointer; font-size: 16px; }

/* botões */
.btn-w { display: block; width: 100%; border: 0; border-radius: 10px; padding: 17px; background: var(--btn); color: #000; font-weight: 600; font-size: 18px; cursor: pointer; text-align: center; text-decoration: none; }
.btn-w:active { background: #cfcfcf; }
.btn-w:disabled { opacity: .5; }
.btn-d { display: block; width: 100%; border: 0; border-radius: 10px; padding: 16px; background: var(--card2); color: var(--tx); font-weight: 600; font-size: 17px; cursor: pointer; margin-top: 12px; }
.round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--card); color: var(--tx); display: grid; place-items: center; cursor: pointer; flex: none; }
.round svg { width: 22px; height: 22px; }

/* topo */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 18px; }
.top.sub h2 { font-size: 21px; font-weight: 700; text-align: center; flex: 1; }
.top.sub .sp { width: 48px; }
.who { padding: 8px 4px 18px; }
.who h2 { font-size: 24px; font-weight: 700; }
.who p { font-size: 15px; letter-spacing: .04em; margin-top: 4px; }

/* cartões */
.card { background: var(--card); border-radius: 12px; padding: 20px 20px 22px; margin-bottom: 14px; }
.lbl { color: var(--mut); font-size: 18px; }
.big { font-size: 46px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 4px 0 18px; }
.mid { font-size: 30px; font-weight: 700; margin-top: 2px; }
.late { color: var(--bad); font-weight: 600; margin: -8px 0 16px; }
.okline { color: var(--ok); font-weight: 600; }
.bar { position: relative; height: 6px; margin: 22px 0 10px; background: repeating-linear-gradient(90deg, #444 0 2px, transparent 2px 22px); background-position: 0 2px; background-size: auto 2px; background-repeat: repeat-x; }
.bar::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 2px; background: #3a3a3a; }
.bar i { position: absolute; left: 0; top: 0; height: 6px; border-radius: 3px; background: #fff; width: 0; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.bar-l { display: flex; justify-content: space-between; color: var(--mut); font-size: 15px; margin-bottom: 14px; }

/* linhas de menu */
.rows { margin-top: 26px; }
.row { display: flex; align-items: center; gap: 18px; width: 100%; padding: 18px 6px; background: none; border: 0; color: var(--tx); text-align: left; cursor: pointer; text-decoration: none; }
.row svg { width: 28px; height: 28px; flex: none; }
.row span { flex: 1; display: flex; flex-direction: column; }
.row b { font-size: 21px; font-weight: 700; }
.row small { color: var(--mut); font-size: 15.5px; margin-top: 2px; }
.chev, .ext { width: 12px; height: 12px; border-right: 2px solid var(--tx); border-top: 2px solid var(--tx); transform: rotate(45deg); margin-right: 8px; flex: none; }
.ext { transform: none; width: 14px; height: 14px; border: 2px solid var(--tx); border-radius: 2px; position: relative; }

/* faturas */
.inv-g { color: var(--mut); font-size: 15px; margin: 18px 4px 8px; }
.inv-i { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 12px; padding: 16px; margin-bottom: 10px; }
.inv-i div { flex: 1; min-width: 0; }
.inv-i b { display: block; font-size: 18px; font-weight: 600; }
.inv-i small { color: var(--mut); font-size: 15px; }
.inv-i .v { font-weight: 700; font-size: 18px; white-space: nowrap; text-align: right; }
.pill { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 999px; margin-top: 4px; }
.pill.paga { background: rgba(95, 194, 110, .15); color: var(--ok); }
.pill.aberta { background: rgba(242, 184, 75, .15); color: var(--warn); }
.pill.atrasada { background: rgba(255, 90, 78, .15); color: var(--bad); }
.pay-s { border: 0; border-radius: 8px; padding: 10px 14px; background: var(--btn); color: #000; font-weight: 600; cursor: pointer; margin-top: 8px; }
.empty { color: var(--mut); text-align: center; padding: 40px 10px; }

/* dados */
.data { margin: 6px 0 20px; background: var(--card); border-radius: 12px; padding: 4px 18px; }
.data div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.data div:last-child { border-bottom: 0; }
.data dt { color: var(--mut); font-size: 15px; }
.data dd { margin: 2px 0 0; font-size: 18px; font-weight: 500; word-break: break-word; }

/* janela de pagamento */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .65); }
.sheet-in { position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; background: #111; border-radius: 18px 18px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); animation: sobe .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes sobe { from { transform: translateY(40px); opacity: 0; } }
.grab { width: 44px; height: 5px; border-radius: 3px; background: #444; margin: 0 auto 16px; }
.sheet h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.qr { display: block; width: min(240px, 70vw); margin: 18px auto; background: #fff; border-radius: 12px; padding: 10px; }
.code { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--tx); padding: 12px; font: 13px/1.4 ui-monospace, monospace; resize: none; margin: 8px 0 12px; }
.amount { font-size: 34px; font-weight: 700; margin: 6px 0 2px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #EDEDED; color: #000; padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 30; max-width: 90vw; text-align: center; }
.loading { position: fixed; inset: 0; display: grid; place-items: center; background: #000; z-index: 40; }
.loading span { width: 34px; height: 34px; border: 3px solid #333; border-top-color: #fff; border-radius: 50%; animation: gira .8s linear infinite; }
.loading.off { display: none; }
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.otp { font-size: 30px !important; letter-spacing: .5em; text-align: center; font-weight: 600; padding: 14px 8px !important; }
.choose { margin-top: 16px; display: grid; gap: 8px; }
.choose p { color: var(--mut); font-size: 15px; }
.choose label { display: flex !important; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; color: var(--tx) !important; margin: 0 !important; font-size: 17px !important; }
.choose input { width: auto !important; accent-color: #fff; }

/* aviso do Vinicius */
.notice { background: #2A2210; border: 1px solid #5C4A16; color: #F6DE9C; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; font-size: 16px; white-space: pre-line; }
/* status da internet */
.net { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; font-weight: 600; }
.net i { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(95, 194, 110, .18); flex: none; }
.net.off i { background: var(--bad); box-shadow: 0 0 0 4px rgba(255, 90, 78, .18); }
.net span small { display: block; font-weight: 400; color: var(--mut); font-size: 14.5px; }
/* opções de pagamento */
.opt { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--tx); margin-top: 10px; cursor: pointer; }
.opt b { display: block; font-size: 18px; }
.opt small { color: var(--mut); font-size: 15px; }
.opt.rec { border-color: #777; }
.tagok { display: inline-block; font-size: 12.5px; font-weight: 600; color: #000; background: var(--ok); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.inv-i .acts2 { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.inv-i .acts2 button { border: 1px solid var(--line); background: var(--card2); color: var(--tx); border-radius: 8px; padding: 8px 10px; font-weight: 600; cursor: pointer; font-size: 14px; }
.inv-i .acts2 .pay-s { background: var(--btn); color: #000; border: 0; margin: 0; }
.wait { color: var(--warn); font-size: 14px; display: block; margin-top: 4px; }
/* recibo (impressão / salvar PDF) */
.print-area { display: none; }
.rcb { background: #fff; color: #111; border-radius: 12px; padding: 22px; font-family: "Barlow", sans-serif; }
.rcb h4 { margin: 0 0 4px; font-size: 22px; }
.rcb .mk { letter-spacing: .3em; font-size: 11px; font-weight: 700; color: #555; }
.rcb table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 15px; }
.rcb td { padding: 8px 0; border-bottom: 1px solid #ddd; }
.rcb td:last-child { text-align: right; font-weight: 600; }
.rcb .tot { font-size: 24px; font-weight: 700; margin-top: 14px; text-align: right; }
.rcb .ft { font-size: 12px; color: #666; margin-top: 16px; }
@media print {
  body * { visibility: hidden !important; }
  .print-area, .print-area * { visibility: visible !important; }
  .print-area { display: block !important; position: absolute; left: 0; top: 0; width: 100%; }
  html, body { background: #fff !important; }
}
