/* Visor movil de Nova Necesidades: mismos colores que la app de escritorio (identidad de Nova Cartografia) */
:root {
  color-scheme: light;
  --brand: #EE7245; --accent: #B8461C; --accent-soft: #FFE9E2; --bg: #FAF8F7; --surface: #fff; --surface-2: #F6F2F0;
  --text: #333; --muted: #6B6560; --border: #EBE3DF;
  --ok: #1e7b46; --ok-bg: #e2f4ea; --warn: #8a5a00; --warn-bg: #fdf0d5; --bad: #b3261e; --bad-bg: #fbe4e2;
  --neutral: #5f5a56; --neutral-bg: #efebe8;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 "Open Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg); color: var(--text); padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
a { color: var(--accent); text-decoration: none; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: var(--surface); border-bottom: 3px solid var(--brand); }
.top .logo { width: 34px; height: 34px; }
.tit { flex: 1; display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tit b { font-size: 17px; letter-spacing: .3px; }
.tit small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-icon { border: 1px solid var(--border); background: var(--surface); color: var(--accent); font-size: 20px;
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
.btn-icon.girando { animation: giro 1s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }

.aviso { margin: 10px 16px 0; padding: 10px 12px; border-radius: 8px; font-size: 13px; background: var(--warn-bg); color: var(--warn); }
.aviso.mal { background: var(--bad-bg); color: var(--bad); }

main { padding: 12px 16px 16px; max-width: 760px; margin: 0 auto; }
h1 { font-size: 20px; margin: 4px 0 4px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 20px 0 8px; display: flex; gap: 8px; align-items: center; }
.meta { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.vacio { color: var(--muted); text-align: center; padding: 28px 8px; }

.buscar { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin: 4px 0 10px; }
.buscar:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.seg { display: flex; gap: 6px; margin: 0 0 10px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.seg button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }

.lista { display: flex; flex-direction: column; gap: 8px; }
.item { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; color: var(--text); }
a.item:active { background: var(--surface-2); }
.item.venc { border-left: 4px solid var(--bad); }
.item.hecha { opacity: .65; }
.fila { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.nombre { font-weight: 600; }
.so { font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 12px; background: var(--accent-soft);
  color: var(--accent); padding: 1px 6px; border-radius: 4px; white-space: nowrap; margin-right: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--neutral-bg); color: var(--neutral); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.eq { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); font-weight: 400; }
.cnt { font-size: 12px; font-weight: 700; background: var(--accent); color: #fff; border-radius: 10px; padding: 0 7px; }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0 4px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; color: var(--text); }
.kpi b { display: block; font-size: 22px; line-height: 1.1; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi.warn b { color: var(--warn); } .kpi.bad b { color: var(--bad); }
.volver { display: inline-block; margin: 2px 0 6px; font-size: 14px; }

.login { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.login label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.login input { font: inherit; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.login input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.login .aviso { margin: 0; }
.btn-primario { font: inherit; font-weight: 700; padding: 12px 16px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; cursor: pointer; }
.btn-primario:disabled { opacity: .6; }

.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 8px; font-size: 11px; color: var(--muted); }
.tabs a span { font-size: 20px; line-height: 1.1; filter: grayscale(1); opacity: .7; }
.tabs a.on { color: var(--accent); font-weight: 700; }
.tabs a.on span { filter: none; opacity: 1; }
.tabs a i { position: absolute; top: 3px; left: calc(50% + 8px); font-style: normal; font-size: 10px; font-weight: 700;
  background: var(--bad); color: #fff; border-radius: 8px; padding: 0 5px; }
