/* Identidad BFE+ (BFE+ Design System): azul PANTONE 2153 C, Franklin Gothic URW, esquinas casi rectas */
@font-face { font-family: "Franklin Gothic URW"; src: url("/fonts/FranklinGothicURW-Boo.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Franklin Gothic URW"; src: url("/fonts/FranklinGothicURW-Dem.otf") format("opentype"); font-weight: 600; font-display: swap; }
:root {
  --bg: #f7f8f9; --surface: #ffffff; --sunk: #eef1f3; --ink: #10171c; --muted: #4a555d; --line: #dfe3e6;
  --accent: #005486; --accent-hover: #004169; --accent-deep: #00304d; --accent-soft: #e3ebf2; --on-accent: #ffffff;
  --brand-band: linear-gradient(135deg, #0a5c8f 0%, #00304d 100%);
  --ok: #2f7d5a; --ok-bg: #e5f1eb; --warn: #8f6112; --warn-bg: #f7eedd; --bad: #a52f2f; --bad-bg: #f6e4e4;
  --radius: 3px;
  --f-d: "Franklin Gothic URW", "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --f-b: "Franklin Gothic URW", "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --f-m: ui-monospace, "SF Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b141a; --surface: #111e27; --sunk: #182833; --ink: #e8eef2; --muted: #a3b2bd; --line: #24384a;
    --accent: #8aa8c4; --accent-hover: #c0d1e0; --accent-deep: #c0d1e0; --accent-soft: #15324a; --on-accent: #00304d;
    --brand-band: linear-gradient(135deg, #004169 0%, #00253b 100%);
    --ok: #74c49c; --ok-bg: #16302a; --warn: #e2b260; --warn-bg: #352a14; --bad: #ec8f8f; --bad-bg: #3a1c1c;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-b);
  padding-inline: max(16px, env(safe-area-inset-left)); padding-block: env(safe-area-inset-top) calc(96px + env(safe-area-inset-bottom));
}
html, body { overflow-x: clip; }
[hidden] { display: none !important; }
img { max-width: 100%; }
.wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
header.top {
  margin-inline: calc(50% - 50vw); margin-top: calc(-1 * env(safe-area-inset-top));
  padding: calc(18px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-left)) 18px;
  background: var(--brand-band); color: #ffffff;
}
header.top .in { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
header.top .logo { width: 56px; height: 56px; flex: none; }
header.top .tit { flex: 1; min-width: 0; }
header.top .eyebrow { color: rgba(255, 255, 255, .75); }
header.top .user { color: rgba(255, 255, 255, .85); font-size: 13px; display: flex; gap: 10px; align-items: center; }
header.top .user a { color: #ffffff; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .55); }
h1 { font: 400 26px/1.18 var(--f-d); letter-spacing: -0.01em; margin: 0; }
h2 { font: 400 20px/1.25 var(--f-d); letter-spacing: -0.01em; margin: 0; color: var(--ink); }
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.mb { margin-bottom: 6px; } .m0 { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card.install { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; background: var(--accent-soft); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.num { font-family: var(--f-m); font-variant-numeric: tabular-nums; }
.link { color: var(--accent); font-weight: 600; text-decoration: none; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; min-width: 0; }
label.req > span::after { content: " *"; color: var(--bad); }
label.full { grid-column: 1 / -1; }
label.check { flex-direction: row; align-items: center; gap: 6px; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 10px; width: 100%; }
input[type="checkbox"] { width: auto; }
.auto { width: auto; }
textarea { min-height: 64px; resize: vertical; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 auto; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 10px 12px; font: 500 14px var(--f-b); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn { display: inline-block; border: 0; border-radius: var(--radius); padding: 11px 16px; font: 600 15px var(--f-b); cursor: pointer; background: var(--accent); color: var(--on-accent); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; }
.tipo-def { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); font-size: 13px; color: var(--ink); }
.btn:hover:not(:disabled) { background: var(--accent-hover); }
.btn.ghost:hover:not(:disabled) { background: var(--accent-soft); }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.drop { border: 1.5px dashed var(--accent); border-radius: var(--radius); padding: 22px 16px; text-align: center; background: var(--accent-soft); cursor: pointer; align-items: center; }
.drop b { font-size: 17px; color: var(--ink); }
.drop img { max-height: 200px; border-radius: var(--radius); }
.drop input { display: none; }
.card.fiscal { background: var(--accent-soft); border-color: var(--accent); gap: 8px; }
.fx { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; font-size: 14px; }
.fx dt { color: var(--muted); } .fx dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.banner { background: var(--bad); color: var(--surface); border-radius: var(--radius); padding: 12px 14px; font-weight: 600; font-size: 14px; }
.banner small { display: block; font-weight: 400; margin-top: 2px; }
.status.bad { background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.status {font-size: 13px; padding: 10px 12px; border-radius: var(--radius); background: var(--sunk); }
.status.ok { background: var(--ok-bg); color: var(--ok); } .status.warn { background: var(--warn-bg); color: var(--warn); }
details.read { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; }
details.read summary { cursor: pointer; padding: 10px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
details.read[open] { padding-bottom: 12px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.tag { background: var(--sunk); color: var(--muted); }
.item { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.item:first-child { border-top: 0; padding-top: 0; }
.item .head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.item .title { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.alerts { margin: 0; padding-left: 18px; font-size: 13px; }
.alerts li.bad { color: var(--bad); } .alerts li.warn { color: var(--warn); } .alerts li.ok { color: var(--ok); }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
td.r, th.r { text-align: right; }
tfoot td { font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kpi { background: var(--sunk); border-radius: var(--radius); padding: 10px 12px; }
.kpi b { display: block; font: 500 20px var(--f-m); font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--sunk); border-radius: var(--radius); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
.bar span.hi { background: var(--bad); }
.tope { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.empty { padding: 18px; text-align: center; color: var(--muted); background: var(--sunk); border-radius: var(--radius); }
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: center; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
nav.tabs button { flex: 1; max-width: 190px; background: none; border: 0; color: var(--muted); font: 600 13px var(--f-b); padding: 10px 4px; border-radius: var(--radius); cursor: pointer; }
nav.tabs button[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius); font-size: 14px; max-width: calc(100% - 32px); }
