/* DeliveFit — layout escuro DeliveFood: fundo quase preto com brilho verde, painéis verdes escuros, números grandes em verde. */
:root {
  --bg: #060907; --panel: #0d140f; --panel2: #111b14; --line: #1c2a20; --fg: #eef6f0; --muted: #9fb3a5;
  --green: #18A957; --green-hi: #2EE07A; --on-green: #04130a; --warn: #f2b84b; --red: #ff7a6b; --blue: #6cc6ff;
  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif; --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --nav-h: 68px; --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); }
body {
  color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.45; min-height: 100vh;
  background: var(--bg) radial-gradient(circle at 95% 0%, #18A95733, transparent 45%) no-repeat fixed;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
}
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--green-hi); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
.up { color: var(--green-hi); } .dn { color: var(--red); } .warn-t { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; }

/* topo */
header.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0 12px; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
.brand span { color: var(--green-hi); }
.brand small { display: block; font-family: var(--body); font-weight: 600; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.quem { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.quem b { color: var(--fg); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 12px; font-weight: 600; }
.pill.demo { border-color: #f2b84b66; color: var(--warn); }

/* título de seção com losango */
h2.sec { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; }
h2.sec::before { content: ""; width: 8px; height: 8px; background: var(--green-hi); border-radius: 2px; transform: rotate(45deg); flex: none; }
h2.sec .n { color: var(--green-hi); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green-hi); }
.hero { margin: 16px 0 6px; display: grid; gap: 6px; }
.hero h1 { font-size: clamp(24px, 6vw, 34px); font-weight: 800; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--green-hi); }

/* cards de números */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; background: #0d140f99; min-width: 0; }
.stat .l { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat b { font-family: var(--display); font-size: clamp(24px, 7vw, 32px); font-weight: 800; color: var(--green-hi); line-height: 1; font-variant-numeric: tabular-nums; }
.stat b.alerta { color: var(--warn); } .stat b.ruim { color: var(--red); }
.stat span { font-size: 12px; color: var(--muted); }

.barra { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--green-hi); border-radius: 99px; transition: width .4s; }
.barra i.over { background: var(--warn); }

/* painéis */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 820px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.lista { display: grid; gap: 8px; }
.linha { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.linha .t { min-width: 0; flex: 1; }
.linha .t b { display: block; font-weight: 600; }
.linha .t small { color: var(--muted); font-size: 12.5px; }
.linha .v { font-family: var(--display); font-weight: 800; color: var(--green-hi); white-space: nowrap; font-variant-numeric: tabular-nums; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--line); }

.flag { border-left: 3px solid var(--green-hi); background: #18A95714; padding: 10px 12px; border-radius: 0 10px 10px 0; font-size: 14px; margin: 8px 0; }
.flag b { color: var(--green-hi); }
.flag.warn { border-left-color: var(--warn); background: #f2b84b14; } .flag.warn b { color: var(--warn); }
.flag.red { border-left-color: var(--red); background: #ff7a6b14; } .flag.red b { color: var(--red); }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); font-weight: 700; }
.btn:hover { border-color: #2a3f30; }
.btn.prim { background: var(--green); color: var(--on-green); border-color: var(--green); }
.btn.prim:hover { background: var(--green-hi); }
.btn.peq { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.fant { background: transparent; }
.btn.perigo { color: var(--red); }
.btn:disabled { opacity: .5; cursor: default; }
.acoes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
@media (max-width: 560px) { .acoes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.acao { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); text-align: left; min-height: 92px; }
.acao svg { width: 26px; height: 26px; color: var(--green-hi); }
.acao b { font-size: 15px; }
.acao small { color: var(--muted); font-size: 12px; }
.acao.destaque { background: linear-gradient(160deg, #18A95733, var(--panel) 70%); border-color: #18A95766; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 600; }
.chip.on { background: var(--green); color: var(--on-green); border-color: var(--green); }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

/* formulários */
label.campo { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0a110c; color: var(--fg); }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: none; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .form { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--fg); font-weight: 500; }
.check input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--green); }

/* tabelas */
.tw { border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--line); font-size: 13.5px; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; white-space: normal; }
th { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: var(--panel); }
tr:last-child td { border-bottom: 0; }
tr.destaque td { background: var(--green); color: var(--on-green); font-weight: 800; }

/* navegação inferior */
nav.baixo { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #070b08f2; backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding: 6px max(8px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-right, 0px)); }
nav.baixo .in { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; }
nav.baixo a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; padding: 6px 0; }
nav.baixo a svg { width: 24px; height: 24px; }
nav.baixo a.on { color: var(--green-hi); }
nav.baixo a.mic { position: relative; top: -14px; }
nav.baixo a.mic span.bola { width: 60px; height: 60px; border-radius: 50%; background: var(--green); color: var(--on-green); display: grid; place-items: center; box-shadow: 0 0 0 4px var(--bg), 0 6px 24px #18A95766; }
nav.baixo a.mic span.bola svg { width: 28px; height: 28px; }

/* folha (modal de baixo) */
.veu { position: fixed; inset: 0; background: #000a; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.folha { width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 20px 20px 0 0;
  padding: 16px max(16px, env(safe-area-inset-left, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 12px; }
.folha .alca { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 4px; }
.folha h3 { font-size: 20px; font-weight: 800; }
@media (min-width: 700px) { .veu { align-items: center; } .folha { border-radius: 20px; } }

/* itens editáveis */
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #0a110c; }
.item .nome b { font-weight: 600; }
.item .nome small { display: block; color: var(--muted); font-size: 12px; }
.item .g { display: flex; align-items: center; gap: 6px; }
.item .g input { width: 78px; min-height: 38px; text-align: center; padding: 6px; }
.item .g button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); font-weight: 800; }
.item .real { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.item .real input { width: 90px; min-height: 36px; }
.conf { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.conf.alta { background: #18A95726; color: var(--green-hi); } .conf.media { background: #f2b84b22; color: var(--warn); } .conf.baixa { background: #ff7a6b22; color: var(--red); }

/* voz */
.voz { display: grid; justify-items: center; gap: 14px; padding: 20px 0; text-align: center; }
.voz .botao { width: 120px; height: 120px; border-radius: 50%; border: 0; background: var(--green); color: var(--on-green); display: grid; place-items: center; box-shadow: 0 0 0 10px #18A9571f, 0 0 0 22px #18A9570d; }
.voz .botao svg { width: 46px; height: 46px; }
.voz .botao.ouvindo { background: var(--red); animation: pulsa 1.2s infinite; box-shadow: 0 0 0 10px #ff7a6b26, 0 0 0 22px #ff7a6b10; }
@keyframes pulsa { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .voz .botao.ouvindo { animation: none; } }
.bolhas { display: grid; gap: 10px; width: 100%; }
.bolha { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 15px; text-align: left; }
.bolha.eu { justify-self: end; background: var(--green); color: var(--on-green); border-bottom-right-radius: 4px; }
.bolha.ia { justify-self: start; background: var(--panel2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }

/* treino */
.cron { text-align: center; display: grid; gap: 6px; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); }
.cron .fase { font-family: var(--display); font-size: 28px; font-weight: 800; }
.cron .fase.corre { color: var(--green-hi); } .cron .fase.anda { color: var(--blue); }
.cron .tempo { font-family: var(--display); font-size: 64px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dia { border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; text-align: center; font-size: 11px; color: var(--muted); background: var(--panel); min-width: 0; }
.dia b { display: block; font-size: 13px; color: var(--fg); }
.dia.hoje { border-color: var(--green); }
.dia.feito { background: #18A95726; }
.dia i { font-style: normal; display: block; font-size: 10.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* gráfico */
.grafico svg { width: 100%; height: auto; display: block; }
.grafico text { fill: var(--muted); font-size: 11px; font-family: var(--body); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--green); color: var(--on-green); padding: 10px 18px; border-radius: 12px; font-weight: 700; box-shadow: 0 8px 30px #0008; max-width: calc(100vw - 32px); }
.toast.erro { background: var(--red); color: #1a0703; }
.carregando { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.vazio { padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; font-size: 14px; }

/* login */
.login { max-width: 420px; margin: 8vh auto 0; display: grid; gap: 16px; }
.login .brand { font-size: 40px; }
