/* Cana Brava | Portaria — tokens e base comum ao tablet e ao painel.
   Paleta da família de apps do Cana (mesma do app de Ocorrências). */
:root {
  --pagina: #f4f2ec;
  --superficie: #fdfdfb;
  --tinta: #1a2433;
  --tinta-2: #565f6d;
  --tinta-mute: #8b9099;
  --grade: #e8e5dc;
  --navy: #2c5f9c;
  --navy-escuro: #1f4675;
  --ouro: #b08d3e;
  --tijolo: #c14f44;
  --verde: #2a8a68;
  --verde-texto: #1e6f3e;
  --verde-fundo: #e3f2ea;
  --vermelho-texto: #b03a30;
  --vermelho-fundo: #fbe7e4;
  --ambar-texto: #8a5a00;
  --ambar-fundo: #fbf0d9;
  --azul-fundo: #e6eef8;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(26, 36, 51, .06), 0 4px 14px rgba(26, 36, 51, .06);
  --fonte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--pagina);
  color: var(--tinta);
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.marca { font-weight: 700; letter-spacing: .2px; display: flex; align-items: center; gap: 10px; }
.marca img { height: 28px; width: auto; display: block; }
.marca b { color: var(--ouro); font-weight: 700; }
.oculto { display: none !important; }
.mute { color: var(--tinta-mute); }
.sec { color: var(--tinta-2); }

.btn {
  border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 600;
  background: var(--navy); color: #fff; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sec2 { background: var(--superficie); color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn.perigo { background: var(--tijolo); }
.btn.ok { background: var(--verde); }
.btn.leve { background: transparent; color: var(--navy); padding: 8px 12px; min-height: 40px; }

.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label { font-size: 14px; color: var(--tinta-2); font-weight: 600; }
.campo input, .campo select, .campo textarea {
  border: 2px solid var(--grade); border-radius: 12px; padding: 12px 14px; background: #fff; min-height: 48px;
}
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--navy); }

.etiqueta {
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600;
  border-radius: 999px; padding: 3px 10px; background: var(--grade); color: var(--tinta-2); white-space: nowrap;
}
.etiqueta.verde { background: var(--verde-fundo); color: var(--verde-texto); }
.etiqueta.vermelha { background: var(--vermelho-fundo); color: var(--vermelho-texto); }
.etiqueta.ambar { background: var(--ambar-fundo); color: var(--ambar-texto); }
.etiqueta.azul { background: var(--azul-fundo); color: var(--navy-escuro); }
.etiqueta.ouro { background: #f6eedb; color: #7a5d1c; }

.aviso-ambiente {
  background: var(--ambar-fundo); color: var(--ambar-texto); text-align: center; font-size: 13px;
  font-weight: 700; padding: 4px 8px; letter-spacing: .4px;
}

/* Janela (modal) */
.veu {
  position: fixed; inset: 0; background: rgba(26, 36, 51, .45); display: flex;
  align-items: flex-end; justify-content: center; z-index: 50; padding: 0;
}
.janela {
  background: var(--superficie); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto;
  border-radius: 20px 20px 0 0; padding: 20px 20px 24px; box-shadow: var(--sombra);
}
@media (min-width: 720px) {
  .veu { align-items: center; padding: 24px; }
  .janela { border-radius: 20px; }
}
.janela h2 { font-size: 22px; margin-bottom: 4px; }
.janela .acoes { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.janela .acoes .btn { flex: 1 1 160px; }

/* Aviso flutuante */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60;
  background: var(--tinta); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--sombra);
  display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px);
}
.toast .btn { min-height: 36px; padding: 6px 12px; background: #fff; color: var(--tinta); }
