@font-face { font-family: "Geist"; src: url("/assets/geist-400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/assets/geist-500.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --fundo: #000;
  --texto: #fafafa;
  --suave: #8b8b8b;
  --apagado: #5a5a5a;
  --linha: #1d1d1d;
  --bloco: #0a0a0a;
  --campo: #0e0e0e;
  --verde: #22c55e;
  --ambar: #f59e0b;
  --vermelho: #ef4444;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--fundo); color: var(--texto); }
body {
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* Entrar */
.entrar { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.form { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 10px; }
.campo { position: relative; }
.campo input {
  width: 100%; height: 50px; padding: 0 14px;
  background: var(--campo); border: 1px solid var(--linha); border-radius: 10px;
  font-size: 16px; font-weight: 400; outline: none; caret-color: var(--texto);
}
.campo input#senha { padding-right: 48px; }
.campo input:hover, .campo input:focus { border-color: var(--linha); outline: none; }
.campo input::placeholder { color: var(--apagado); font-weight: 400; opacity: 1; }
.campo input:-webkit-autofill,
.campo input:-webkit-autofill:hover,
.campo input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--texto);
  -webkit-box-shadow: 0 0 0 1000px var(--campo) inset;
  transition: background-color 9999s ease-in-out 0s;
}
.olho {
  position: absolute; top: 7px; right: 7px; width: 36px; height: 36px;
  display: grid; place-items: center; background: none; border: 0; border-radius: 8px; color: var(--suave);
}
.olho:hover { color: var(--texto); }
.botao {
  height: 50px; margin-top: 6px; border: 0; border-radius: 10px;
  background: var(--texto); color: #000; font-size: 15px; font-weight: 500;
}
.botao:disabled { opacity: .55; cursor: default; }
.erro { min-height: 18px; text-align: center; font-size: 13px; color: #f87171; }

/* Painel */
.painel {
  height: 100dvh; max-width: 1240px; margin: 0 auto; container-type: inline-size;
  display: flex; flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--suave); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--apagado); }
.status.ok i { background: var(--verde); }
.status.atrasado i { background: var(--ambar); }
.status.parado i { background: var(--vermelho); }
.sair {
  height: 34px; padding: 0 14px; border-radius: 999px;
  background: none; border: 1px solid var(--linha); color: var(--suave); font-size: 13px;
}
.sair:hover { color: var(--texto); }

.destaque {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  overflow: hidden;
}
.rotulo { font-size: 15px; color: var(--suave); }
.valor {
  display: inline-flex; align-items: flex-start;
  font-size: 160px; font-weight: 500; line-height: .95; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.moeda { font-size: .26em; letter-spacing: 0; color: var(--suave); margin: .2em .22em 0 0; }
.centavos { font-size: .42em; letter-spacing: -0.03em; color: var(--suave); margin-top: .1em; }

.blocos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bloco {
  min-width: 0; display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px; background: var(--bloco); border: 1px solid var(--linha); border-radius: 12px;
}
.bloco-rotulo { font-size: 13px; color: var(--suave); }
.bloco-valor {
  font-size: 21px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.detalhes { margin-top: 4px; }
.detalhes summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: 12px; text-align: center; font-size: 13px; color: var(--suave);
}
.detalhes summary::-webkit-details-marker { display: none; }
.detalhes summary::after { content: " ▾"; }
.detalhes[open] summary::after { content: " ▴"; }
.detalhes summary:hover { color: var(--texto); }
.tabela-caixa { max-height: 34dvh; overflow: auto; border: 1px solid var(--linha); border-radius: 12px; background: var(--bloco); }
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tabela th, .tabela td { padding: 11px 16px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--linha); font-weight: 400; }
.tabela tr:last-child th, .tabela tr:last-child td { border-bottom: 0; }
.tabela thead th { color: var(--suave); font-size: 12px; }
.tabela tbody th { text-align: left; color: var(--suave); }
.tabela td { font-weight: 500; }

@container (max-width: 760px) {
  .blocos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bloco { padding: 12px 14px; gap: 4px; }
  .bloco-valor { font-size: 17px; }
  .tabela { font-size: 13px; }
  .tabela th, .tabela td { padding: 10px 12px; }
}
