/* Tipografías alojadas en el propio servidor (licencia SIL OFL 1.1): sin peticiones a Google → sin transferencia de la IP del visitante */
@font-face{font-family:'Bebas Neue';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/BebasNeue-400-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Bebas Neue';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/BebasNeue-400-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/IBMPlexMono-400-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/IBMPlexMono-400-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/IBMPlexMono-500-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/IBMPlexMono-500-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/IBMPlexSans-400-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/IBMPlexSans-400-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/IBMPlexSans-500-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/IBMPlexSans-500-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/IBMPlexSans-600-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/IBMPlexSans-600-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/IBMPlexSans-700-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/IBMPlexSans-700-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}

:root {
  --bg: #050505;
  --bg-elev: #0e0e0e;
  --bg-soft: #141414;
  --line: #2a2a2a;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --red: #e10600;
  --red-dim: #8b0400;
  --red-text: #ff5a4f;
  --red-glow: rgba(225, 6, 0, 0.25);
  --ok: #3ddc97;
  --warn: #f5a623;
  --radius: 4px;
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Bebas Neue', Impact, 'Arial Narrow Bold', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, var(--red-glow), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(255,255,255,0.04), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--red-text); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.container-wide { width: min(1280px, calc(100% - 2rem)); margin-inline: auto; }

.brand {
  font-family: var(--display);
  letter-spacing: 0.06em;
  font-size: 1.75rem;
  color: var(--text);
}
.brand span { color: var(--red-text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { background: #b30400; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--red); color: var(--red-text); background: transparent; }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.875rem; }
.btn-block { width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(5,5,5,0.85);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}
.nav { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active { box-shadow: inset 0 -2px 0 var(--red); }

.hero {
  padding: 5.5rem 0 4rem;
  min-height: calc(100vh - 64px);
  display: grid;
  align-items: center;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(3.2rem, 8vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  margin: 0 0 1rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--red-text);
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36ch;
  margin: 0 0 1.75rem;
}
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-panel {
  background: linear-gradient(160deg, #161616, #0a0a0a);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  animation: rise 0.8s ease both;
}
.hero-panel::after {
  content: '';
  position: absolute;
  top: auto; left: auto; right: -20%; bottom: -40%;
  width: 180px; height: 180px;
  background: var(--red-glow);
  filter: blur(40px);
  pointer-events: none;
}
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: 1.25rem; }
.stat {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.85rem;
}
.stat b { display: block; font-family: var(--mono); font-size: 1.1rem; color: var(--red-text); }
.stat span { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.section { padding: 4rem 0; border-top: 1px solid var(--line); }
.section h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
}
.section .sub { color: var(--muted); margin: 0 0 2rem; max-width: 50ch; }

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.feature {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 1.35rem;
  transition: border-color .2s ease, transform .2s ease;
}
.feature:hover { border-color: var(--red); transform: translateY(-3px); }
.feature h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.feature .tag {
  display: inline-block;
  color: var(--red-text);
  font-family: var(--mono);
  font-size: 0.7rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.plan {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.plan.featured {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red-glow);
}
.plan .price {
  font-family: var(--display);
  font-size: 2.6rem;
  letter-spacing: 0.04em;
}
.plan .price small { font-size: 1rem; color: var(--muted); font-family: var(--font); }
.plan ul { margin: 0; padding-left: 1.1rem; color: var(--muted); flex: 1; }
.plan li { margin-bottom: 0.35rem; }

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.auth-box {
  width: min(420px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  padding: 2rem;
  animation: rise .5s ease both;
}
.auth-box h1 {
  font-family: var(--display);
  letter-spacing: 0.05em;
  font-size: 2.2rem;
  margin: 0.5rem 0 0.25rem;
}
.auth-box .hint { color: var(--muted); margin-bottom: 1.5rem; font-size: 0.95rem; }

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.75rem; }
.form-error {
  background: rgba(225,6,0,0.12);
  border: 1px solid var(--red-dim);
  color: #ffb4b0;
  padding: 0.65rem 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: none;
}
.form-error.show { display: block; }

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #080808;
  border-right: 1px solid var(--line);
  padding: 1.25rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.sidebar nav { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; overflow-y: auto; }
.nav-group {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-text);
  margin: 0.85rem 0.8rem 0.35rem;
  font-weight: 600;
}
.nav-group:first-child { margin-top: 0; }

@media print {
  .sidebar, .site-header, .btn, .no-print { display: none !important; }
  .app-shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; color: #000; }
  .print-sheet { border: none !important; background: #fff !important; color: #000 !important; }
}

.print-sheet {
  background: #fff;
  color: #111;
  padding: 2rem;
  border: 1px solid var(--line);
}
.print-sheet h1 { color: #111; font-family: var(--display); letter-spacing: 0.04em; }
.print-sheet table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.print-sheet th, .print-sheet td { border-bottom: 1px solid #ddd; padding: 0.5rem; text-align: left; color: #111; }
.print-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin: 1.5rem 0; }
.print-total { font-size: 1.4rem; font-weight: 700; color: #e10600; margin-top: 1rem; }
.sidebar nav a {
  padding: 0.65rem 0.8rem;
  color: var(--muted);
  border-radius: var(--radius);
  font-weight: 500;
}
.sidebar nav a:hover { background: var(--bg-soft); color: var(--text); }
.sidebar nav a.active {
  background: rgba(225,6,0,0.12);
  color: #fff;
  border-left: 3px solid var(--red);
}
.main { padding: 1.5rem 1.75rem 3rem; }
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.page-title h1 {
  font-family: var(--display);
  letter-spacing: 0.05em;
  font-size: 2.4rem;
  margin: 0;
}
.page-title p { margin: 0.25rem 0 0; color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.kpi {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 1.1rem 1.2rem;
  animation: rise .5s ease both;
}
.kpi .label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.kpi .value { font-family: var(--mono); font-size: 1.6rem; margin-top: 0.35rem; }
.kpi .value.red { color: var(--red-text); }

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.panel h2 {
  font-size: 1.05rem;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.panel h2 .badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--red-text);
  border: 1px solid var(--red-dim);
  padding: 0.15rem 0.45rem;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
table.data th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
table.data tr:hover td { background: rgba(255,255,255,0.02); }
.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge-ok { color: var(--ok); border-color: rgba(61,220,151,0.35); }
.badge-warn { color: var(--warn); border-color: rgba(245,166,35,0.35); }
.badge-red { color: var(--red-text); border-color: var(--red-dim); }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}

.user-chip {
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.user-chip strong { color: var(--text); display: block; }
.user-chip .version-badge {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-family: var(--mono, ui-monospace, monospace);
  color: #c4a574;
  text-decoration: none;
  border-bottom: 1px dotted rgba(196,165,116,.5);
}
.user-chip .version-badge:hover { color: #fff; }

.version-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  padding: 0.55rem 0.75rem;
  background: #111;
  border: 1px solid var(--line, #333);
  color: #eee;
  text-decoration: none;
  font-size: 0.72rem;
  line-height: 1.2;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.version-fab strong {
  font-family: var(--mono, ui-monospace, monospace);
  color: #c4a574;
  font-size: 0.8rem;
}
.version-fab span { color: var(--muted, #888); }
.version-fab:hover { border-color: #c4a574; }

.version-current-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.version-current-pill strong {
  font-family: var(--mono, ui-monospace, monospace);
  color: #c4a574;
}
.version-current-pill span { font-size: 0.85rem; color: var(--muted); }

.changelog-list { display: flex; flex-direction: column; gap: 1rem; }
.changelog-entry.is-latest { border-color: rgba(196,165,116,.45); }
.changelog-ver {
  display: inline-block;
  margin-right: 0.4rem;
  font-family: var(--mono, ui-monospace, monospace);
  color: #c4a574;
  font-size: 0.9rem;
}
.changelog-ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  line-height: 1.55;
  color: var(--muted);
}
.changelog-ul li { margin: 0.25rem 0; }

/* ——— Gestoría: mensajes y notificaciones ——— */
.nav-badge {
  display: inline-block;
  min-width: 1.1rem;
  padding: 0.05rem 0.35rem;
  margin-left: 0.25rem;
  font-size: 0.65rem;
  font-family: var(--mono);
  line-height: 1.3;
  text-align: center;
  background: var(--warn);
  color: #111;
  border-radius: 99px;
  vertical-align: middle;
}
.sidebar nav a.active .nav-badge { background: #fff; color: var(--red); }

.ges-modal-backdrop {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 10000;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.ges-modal-backdrop[hidden] { display: none !important; }
.ges-modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  margin: 0;
}

.ges-msg-list { display: flex; flex-direction: column; gap: 0.65rem; }
.ges-msg-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: #0a0a0a;
}
.ges-msg-card header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}
.ges-msg-card p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.ges-msg-card.is-unread {
  border-color: rgba(245,166,35,.45);
  background: rgba(245,166,35,.06);
}
.ges-msg-card.is-urgent {
  border-left: 3px solid var(--red);
  background: rgba(225,6,0,.08);
}
.ges-msg-card.is-mine {
  border-left: 3px solid rgba(61,220,151,.55);
  background: rgba(61,220,151,.05);
}
.ges-ready { font-weight: 600; }
.ges-filters { align-items: end; }
.ges-filters label.check-line { flex-direction: row; align-items: center; gap: 0.4rem; }
.ges-msg-history { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 0.75rem; }
.ges-msg-item { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.ges-msg-item p { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--muted); }

.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ——— Suite negocio (UX tipo Holded / Quipu) ——— */
.suite-page { animation: rise .35s ease; }
.suite-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.suite-top h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: 0.04em;
  margin: 0.15rem 0 0.35rem;
  line-height: 1;
}
.suite-eyebrow {
  margin: 0;
  color: var(--red-text);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.suite-lead { margin: 0; color: var(--muted); max-width: 42rem; font-size: 0.95rem; }
.suite-back {
  display: inline-block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}
.suite-top-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.suite-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  margin-bottom: 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: sticky;
  top: 0;
  z-index: 5;
}
.suite-rail a {
  padding: 0.35rem 0.65rem;
  border-radius: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}
.suite-rail a:hover { color: var(--text); background: var(--bg-soft); }
.suite-rail a.on {
  color: #fff;
  background: var(--red);
}
.suite-rail-g {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: 0.5rem;
  opacity: 0.7;
}

.suite-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.suite-kpi-grid.compact { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.suite-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, #141414 0%, #0c0c0c 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 88px;
  transition: border-color .15s, transform .15s;
}
a.suite-kpi:hover { border-color: var(--red); transform: translateY(-2px); color: inherit; }
.suite-kpi.static { cursor: default; }
.suite-kpi .lab {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.suite-kpi .val {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
}
.suite-kpi.ok .val { color: var(--ok); }
.suite-kpi.warn .val { color: var(--warn); }
.suite-kpi.bad .val { color: var(--red-text); }

.suite-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.suite-panel { padding: 1.1rem 1.2rem; }
.suite-panel-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.suite-panel-h h2 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}
.muted-sm { color: var(--muted); font-size: 0.8rem; }

.suite-focus { list-style: none; margin: 0; padding: 0; }
.suite-focus li { border-bottom: 1px solid var(--line); }
.suite-focus li:last-child { border-bottom: 0; }
.suite-focus a {
  display: block;
  padding: 0.85rem 0;
  color: inherit;
}
.suite-focus a:hover strong { color: var(--red-text); }
.suite-focus strong { display: block; margin-bottom: 0.2rem; }
.suite-focus span { color: var(--muted); font-size: 0.88rem; }

.suite-mod-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
  max-height: 420px;
  overflow: auto;
}
.suite-mod {
  display: flex;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a0a0a;
  transition: border-color .15s, background .15s;
}
.suite-mod:hover { border-color: var(--red); background: #111; color: inherit; }
.suite-mod .ico {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--red-text);
  flex-shrink: 0;
  font-size: 0.85rem;
}
.suite-mod .txt { min-width: 0; }
.suite-mod strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
}
.suite-mod em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suite-footnote {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 1rem 0 0;
}
.suite-hint {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-left: 3px solid var(--red);
}
.suite-hint.warn { border-left-color: var(--warn); color: var(--text); }

.suite-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.7rem 0.85rem;
}
.suite-form .full { grid-column: 1 / -1; }
.suite-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.suite-form input,
.suite-form select,
.suite-form textarea,
.suite-csv {
  background: #080808;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.92rem;
}
.suite-form input:focus,
.suite-form select:focus,
.suite-form textarea:focus,
.suite-csv:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.suite-csv { width: 100%; min-height: 160px; font-family: var(--mono); font-size: 0.82rem; }
.suite-form-actions { display: flex; gap: 0.5rem; align-items: center; padding-top: 0.25rem; }

.suite-table-wrap { overflow-x: auto; }
.suite-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.suite-table td.act, .suite-table th.act { text-align: right; white-space: nowrap; }
.suite-table td.num { font-family: var(--mono); text-align: right; }
.suite-table td.num.ok { color: var(--ok); }
.suite-table td.num.bad, .suite-table .bad { color: var(--red-text); }
.suite-table tr.row-warn td { background: rgba(245,166,35,0.06); }

.suite-empty {
  text-align: left;
  padding: 1.5rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.suite-empty strong { display: block; color: var(--text); margin-bottom: 0.35rem; }
.suite-empty p { margin: 0; font-size: 0.9rem; }

.suite-kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 0.55rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  padding-bottom: 0.25rem;
}
.suite-col {
  background: #0a0a0a;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.suite-col header {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.suite-col header strong { color: var(--text); font-family: var(--mono); font-size: 0.75rem; text-transform: none; }
.suite-col-body { padding: 0.5rem; flex: 1; display: flex; flex-direction: column; gap: 0.45rem; }
.suite-card-deal {
  background: #121212;
  border: 1px solid var(--line);
  border-left: 2px solid var(--red);
  padding: 0.55rem 0.6rem;
  border-radius: 3px;
}
.suite-card-deal strong { display: block; font-size: 0.85rem; margin-bottom: 0.15rem; }
.suite-card-deal .meta { display: block; color: var(--muted); font-size: 0.75rem; }
.suite-card-deal .amt { display: block; font-family: var(--mono); margin: 0.35rem 0; font-size: 0.9rem; }
.suite-card-deal .ops { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.col-empty { margin: 0; color: var(--muted); font-size: 0.75rem; padding: 0.5rem; }

.suite-checks { display: flex; flex-direction: column; }
.suite-check {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.suite-check.done strong { color: var(--ok); }
.suite-hashes { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.suite-hash {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.suite-hash code {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  word-break: break-all;
}

.suite-calc-out {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.55rem;
}
.suite-calc-out div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.85rem;
  background: #0a0a0a;
  border: 1px solid var(--line);
}
.suite-calc-out span { color: var(--muted); }
.suite-calc-out strong { font-family: var(--mono); }

.suite-loading {
  padding: 2.5rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
}

.suite-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 80;
  padding: 0.75rem 1rem;
  background: #111;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  font-size: 0.9rem;
  animation: rise .2s ease;
}
.suite-toast.err { border-left-color: var(--red); }

@media (max-width: 1100px) {
  .suite-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .suite-split { grid-template-columns: minmax(0, 1fr); }
  .suite-kanban { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .q-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .suite-kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .suite-mod-grid { grid-template-columns: minmax(0, 1fr); }
  .suite-kanban { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .suite-rail { position: static; }
  .q-models { grid-template-columns: minmax(0, 1fr); }
  .q-alert { flex-direction: column; align-items: flex-start; }
  .page-title { flex-direction: column; align-items: stretch; }
  .q-period { width: 100%; }
}

/* ——— Trimestral enriquecido ——— */
.q-title { align-items: flex-start; }
.q-period {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end;
}
.q-period label {
  display: flex; flex-direction: column; gap: 0.25rem;
  font-size: 0.7rem; color: var(--muted); text-transform: uppercase;
}
.q-period input, .q-period select {
  background: #0a0a0a; border: 1px solid var(--line); color: #fff;
  padding: 0.45rem 0.55rem; border-radius: var(--radius); min-width: 5rem;
}
.q-alert {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.15rem; margin-bottom: 1rem;
  border: 1px solid var(--line); border-left: 4px solid var(--ok);
  background: var(--bg-elev); border-radius: var(--radius);
}
.q-alert strong { display: block; margin-bottom: 0.2rem; }
.q-alert span { color: var(--muted); font-size: 0.88rem; }
.q-alert-amt { text-align: right; }
.q-alert-amt span { display: block; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; }
.q-alert-amt strong { font-family: var(--mono); font-size: 1.35rem; color: var(--red-text); }
.q-alert-hot { border-left-color: var(--warn); }
.q-alert-warm { border-left-color: var(--warn); }
.q-alert-late { border-left-color: var(--red); background: rgba(225,6,0,0.08); }
.q-kpis { margin-bottom: 1rem; }
.q-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1rem;
}
.q-models {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
}
.q-model {
  border: 1px solid var(--line);
  background: #0a0a0a;
  padding: 0.75rem;
  border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 0.35rem;
}
.q-model header { display: flex; justify-content: space-between; align-items: center; }
.q-model p { margin: 0; font-size: 0.8rem; color: var(--muted); line-height: 1.35; min-height: 2.4em; }
.q-model-amt { font-family: var(--mono); font-size: 1.1rem; }
.q-model small { color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
.q-model.pay { border-top: 2px solid var(--red); }
.q-model.pay .q-model-amt { color: var(--red-text); }
.q-model.comp { border-top: 2px solid var(--ok); }
.q-model.comp .q-model-amt { color: var(--ok); }
.q-model.opt, .q-model.zero { opacity: 0.85; }
.q-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.q-progress {
  height: 6px; background: #1a1a1a; border-radius: 99px; overflow: hidden; margin-bottom: 0.85rem;
}
.q-progress i { display: block; height: 100%; background: var(--red); }
.q-check { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.q-check li { border-bottom: 1px solid var(--line); }
.q-check label {
  display: flex; gap: 0.65rem; align-items: flex-start;
  padding: 0.65rem 0.15rem; cursor: pointer; font-size: 0.88rem;
}
.q-check input { margin-top: 0.2rem; accent-color: var(--red); width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.q-check li.done span { color: var(--muted); text-decoration: line-through; }
.q-sede { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }

/* ——— Responsive global: móvil, tablet, iPad, desktop ——— */
.nav-toggle {
  display: none;
  position: fixed;
  top: 0.85rem; left: 0.85rem;
  z-index: 60;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: #0e0e0e;
  border-radius: var(--radius);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; background: #fff;
  transition: transform .2s, opacity .2s;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.sidebar-backdrop {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.55); z-index: 45;
}

.main {
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 2.5rem;
  min-width: 0;
  width: 100%;
}
.page-title {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.page-title h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 5vw, 2.6rem);
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1;
}
.data { width: 100%; overflow-x: auto; display: block; }
table.data { display: table; min-width: 520px; }
.btn, .btn-sm { min-height: 44px; }
.btn-sm { min-height: 38px; }
.form-group input, .form-group select, .form-group textarea,
.suite-form input, .suite-form select, .suite-form textarea {
  font-size: 16px; /* evita zoom iOS */
  min-height: 44px;
}
.suite-form textarea { min-height: 72px; }

@media (max-width: 900px) {
  .hero-grid, .features, .pricing, .grid-3, .grid-2, .app-shell { grid-template-columns: minmax(0, 1fr); }
  .stat-row { grid-template-columns: minmax(0, 1fr); }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle { display: inline-flex; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(300px, 86vw);
    height: 100vh;
    z-index: 50;
    transform: translateX(-105%);
    transition: transform .25s ease;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .sidebar nav { flex-direction: column; flex-wrap: nowrap; }
  .main { padding-top: 4rem; }
  .auth-box { width: min(100%, 420px); margin: 1rem; }
  .container, .container-wide { width: calc(100% - 1.25rem); }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .sidebar { width: auto; }
}

@media (pointer: coarse) {
  .sidebar nav a { padding: 0.8rem 0.9rem; }
  .suite-rail a { padding: 0.5rem 0.75rem; }
}

@media print {
  .nav-toggle, .sidebar-backdrop, .q-actions, .no-print { display: none !important; }
  .q-alert { border-color: #ccc; }
}

@supports (padding: max(0px)) {
  .main {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }
}

/* ——— Legal / trust / vault visuals ——— */
.legal-page { padding: 2rem 0 4rem; }
.legal-wrap {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.legal-nav {
  position: sticky;
  top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.legal-nav a {
  padding: 0.55rem 0.75rem;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.92rem;
}
.legal-nav a:hover, .legal-nav a.active {
  color: var(--text);
  border-color: var(--line);
  background: var(--bg-elev);
}
.legal-body h2 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  letter-spacing: 0.02em;
}
.legal-body ul { color: var(--muted); padding-left: 1.2rem; }
.legal-body li { margin: 0.35rem 0; }
.legal-callout {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  background:
    linear-gradient(135deg, rgba(225,6,0,0.08), transparent 55%),
    var(--bg-soft);
}
.legal-callout.warn { border-left-color: var(--warn); }
.legal-callout p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.92rem; }
.trust-mini {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  text-align: center;
}
.trust-mini .lock-orb {
  width: 42px; height: 42px; margin: 0 auto 0.6rem;
  border-radius: 50%;
  border: 2px solid var(--red);
  box-shadow: 0 0 24px var(--red-glow);
  background:
    radial-gradient(circle at 35% 35%, #fff2, transparent 50%),
    #1a0505;
  animation: pulse-orb 2.8s ease-in-out infinite;
}
.trust-mini strong { display: block; font-size: 0.9rem; }
.trust-mini span { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }

.vault-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem 1.4rem;
}
.landing-vault {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 50% 80% at 0% 50%, var(--red-glow), transparent 60%),
    var(--bg-elev);
  padding: 1.75rem;
}
.vault-visual {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}
.vault-ring {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.7;
}
.vault-ring.r1 { animation: spin-slow 18s linear infinite; border-color: rgba(225,6,0,0.35); border-style: dashed; }
.vault-ring.r2 { top: 18px; right: 18px; bottom: 18px; left: 18px; animation: spin-slow 12s linear infinite reverse; border-color: rgba(255,255,255,0.12); }
.vault-core {
  position: absolute;
  top: 38px; right: 38px; bottom: 38px; left: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #3a1010, #0a0a0a 70%);
  border: 1px solid var(--red);
  box-shadow: 0 0 30px var(--red-glow), inset 0 0 20px rgba(0,0,0,0.6);
  display: grid;
  place-items: center;
}
.vault-lock {
  width: 18px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 3px 3px 2px 2px;
  position: relative;
  opacity: 0.9;
}
.vault-lock::before {
  content: '';
  position: absolute;
  top: -10px; left: 2px;
  width: 10px; height: 10px;
  border: 2px solid #fff;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}
.vault-shards span {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 1px;
  opacity: 0.55;
  animation: float-shard 3s ease-in-out infinite;
}
.vault-shards span:nth-child(1) { top: 8px; right: 22px; animation-delay: 0s; }
.vault-shards span:nth-child(2) { bottom: 18px; left: 10px; animation-delay: .6s; }
.vault-shards span:nth-child(3) { top: 48px; left: -4px; animation-delay: 1.2s; }
.lead-sm { color: var(--muted); font-size: 1rem; margin: 0; max-width: 36rem; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}
.trust-card {
  padding: 1.1rem 1rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 40%),
    var(--bg-elev);
  transition: border-color .2s ease, transform .2s ease;
}
.trust-card:hover { border-color: rgba(225,6,0,0.45); transform: translateY(-2px); }
.trust-ico {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--red-text);
  margin-bottom: 0.5rem;
}
.trust-card h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.trust-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }

.trust-section h2 { margin-bottom: 0.35rem; }

.reg-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin: 0.75rem 0 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--mono);
}
.reg-trust-strip .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 0.35rem;
  box-shadow: 0 0 8px rgba(61,220,151,0.5);
  vertical-align: middle;
}
.legal-checks { margin: 1rem 0; display: flex; flex-direction: column; gap: 0.65rem; }
.check-line {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.4;
}
.check-line input { margin-top: 0.2rem; flex-shrink: 0; }
.check-line a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.auth-box-wide { width: min(480px, 100%); }

@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes pulse-orb {
  0%, 100% { box-shadow: 0 0 16px var(--red-glow); }
  50% { box-shadow: 0 0 32px rgba(225,6,0,0.45); }
}
@keyframes float-shard {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-6px); opacity: 0.9; }
}

@media (max-width: 800px) {
  .legal-wrap { grid-template-columns: minmax(0, 1fr); }
  .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .vault-hero, .landing-vault { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .vault-visual { margin: 0 auto; }
}


/* ===== Compatibilidad, accesibilidad y textos legales (v1.14) ===== */
.skip-link {
  position: absolute; left: .75rem; top: -4rem; z-index: 100000;
  background: #fff; color: #000; padding: .6rem 1rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: .75rem; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px var(--red); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.pending { display: inline-block; background: #7a1020; color: #fff; font-weight: 700; font-size: .8em; letter-spacing: .04em; padding: .05rem .5rem; border-radius: 3px; }
.legal-table { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: .55rem .65rem; border: 1px solid var(--line); font-size: .9rem; }
.legal-table th { background: var(--bg-soft); }
.decl { margin: 1rem 0; }
.decl dt { font-weight: 600; margin-top: 1rem; }
.decl dd { margin: .25rem 0 0; padding: .6rem .8rem; border-left: 3px solid var(--red); background: var(--bg-soft); }
.decl-l { color: var(--red-text); font-family: var(--mono); }
.compat-banner { position: fixed; left: 0; right: 0; top: 0; z-index: 100001; background: #fff3cd; color: #3b2f00; padding: .75rem 1rem; font: 15px/1.4 Arial, sans-serif; text-align: center; border-bottom: 2px solid #b58900; }
.taxpayer-chip { display: block; margin-top: .25rem; font-family: var(--mono); font-size: .78rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print {
  .site-header, .legal-nav, .footer, .no-print, .skip-link, .version-fab, .nav-toggle, .sidebar { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .legal-wrap { display: block !important; }
  .decl dd { background: #fff; border-left: 3px solid #000; }
  .pending { background: #fff; color: #000; border: 1px solid #000; }
}
@media (forced-colors: active) { .pending { border: 1px solid CanvasText; } }

/* Botones dentro de la navegación pública: el color de enlace gris no debe pisar el texto del botón */
.nav a.btn, .nav a.btn:hover { color: #fff; }
/* Enlaces dentro de párrafos: se distinguen sin depender sólo del color (WCAG 1.4.1) */
.legal-body p a, .legal-body li a, .legal-body dd a, .legal-callout a, .muted-sm a, .panel p a, .panel li a { text-decoration: underline; text-underline-offset: 2px; }
/* Tablas anchas no deben ensanchar la página: la columna del grid se encoge y la tabla desplaza dentro de su panel */
.panel, .suite-panel { min-width: 0; max-width: 100%; }
/* Envoltorio (lo añade app.js) que desplaza las tablas anchas sin ensanchar la página */
.table-scroll { position: relative; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll > table { min-width: 100%; }
.table-scroll:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
@media (max-width: 640px) {
  .suite-form, .suite-kpi-grid, .suite-kpi-grid.compact, .suite-mod-grid, .q-models, .q-grid, .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .suite-form > *, .suite-kpi-grid > * { min-width: 0; }
  input, select, textarea { max-width: 100%; }
}
/* Cuadrícula de plantillas: en pantallas estrechas, una sola columna (la columna 1fr quedaba en ~20 px) */
@media (max-width: 900px) { .plantillas-grid { grid-template-columns: minmax(0, 1fr) !important; } }

/* Historial de cambios y diálogos */
.file-btn { cursor: pointer; }
.file-btn:focus-within { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px var(--red); }
dialog.hist-dialog { background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; width: min(640px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); overflow: auto; }
dialog.hist-dialog::backdrop { background: rgba(0,0,0,.65); }
.hist-list { list-style: none; margin: .75rem 0 0; padding: 0; }
.hist-list li { border-left: 3px solid var(--red); padding: .35rem 0 .35rem .75rem; margin-bottom: .6rem; }
.hist-list .h-when { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.hist-list .h-what { font-weight: 600; }
.hist-list .h-sum { font-size: .9rem; overflow-wrap: anywhere; }
.hist-list .h-who { font-size: .78rem; color: var(--muted); }

/* Barra de filtros y orden de los listados */
.doc-tools { display: flex; flex-wrap: wrap; gap: .6rem .9rem; align-items: end; margin: 0 0 .9rem; padding: .7rem; border: 1px dashed var(--line); }
.doc-tools label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--muted); }
.doc-tools input, .doc-tools select { background: var(--bg); color: var(--text); border: 1px solid var(--line); padding: .4rem .5rem; min-height: 2.2rem; }
.doc-tools .doc-count { margin-left: auto; align-self: center; }
@media (max-width: 640px) { .doc-tools label { flex: 1 1 42%; } .doc-tools .btn { flex: 1 1 100%; text-align: center; } }

/* Mi dinero */
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: .6rem .9rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--red); }
.month-nav { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.money-hero { text-align: center; }
.money-big { font-family: var(--display); font-size: clamp(2.6rem, 9vw, 4.6rem); letter-spacing: .03em; line-height: 1; }
.money-big.pos { color: var(--ok); }
.money-big.neg { color: var(--red-text); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Controles sueltos (fuera de .form-group): mismo aspecto y contraste que el resto */
select, td input[type=text], td input[type=number] { background: var(--bg); color: var(--text); border: 1px solid var(--line); padding: .3rem .4rem; font: inherit; }
select option { background: var(--bg-elev); color: var(--text); }

/* Autocomprobación fiscal */
.selftest-list { list-style: none; margin: .4rem 0 1rem; padding: 0; }
.selftest-list li { padding: .45rem .6rem; border-left: 3px solid var(--line); margin-bottom: .35rem; background: var(--bg-soft); overflow-wrap: anywhere; }
.selftest-list .st-ico { display: inline-block; width: 1.4rem; font-weight: 700; }
.selftest-list li.st-ok { border-left-color: var(--ok); }
.selftest-list li.st-ok .st-ico { color: var(--ok); }
.selftest-list li.st-fail { border-left-color: var(--red); }
.selftest-list li.st-fail .st-ico { color: var(--red-text); }
.selftest-list li.st-warn { border-left-color: var(--warn); }
.selftest-list li.st-warn .st-ico { color: var(--warn); }
.selftest-list .st-fix { margin: .25rem 0 0 1.4rem; font-size: .88rem; color: var(--text); }
/* Formularios en pantallas estrechas: nada debe ser más ancho que su contenedor (selects con textos largos, input de archivo) */
.suite-form label, .form-group { min-width: 0; }
.suite-form select, .suite-form input, .suite-form textarea, .form-group select, .form-group input { max-width: 100%; min-width: 0; }
select { text-overflow: ellipsis; }
input[type=file] { max-width: 100%; }

/* Pantallas de TPV, suscripción y pagos del dueño: campos con el mismo aspecto que .form-group */
.tri-form label { display: block; font-size: .85rem; margin: 0 0 .5rem; }
.tri-form label > input:not([type=checkbox]):not([type=radio]):not([type=file]),
.tri-form label > select, .tri-form label > textarea,
.tri-form input[type=search], .tri-form input#q {
  display: block; width: 100%; margin-top: .25rem; box-sizing: border-box; min-width: 0; max-width: 100%;
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .6rem .7rem; font: inherit; font-size: 16px; min-height: 44px;
}
.tri-form input#q { margin-top: 0; width: auto; }
.tri-form label > input:focus, .tri-form label > select:focus, .tri-form input#q:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px var(--red-glow); }
.tri-form .btn-sm { min-height: 32px; }

/* Entrada rápida (v1.43): desplegables con búsqueda y listas paginadas */
.fast-wrap { position: relative; flex: 1; min-width: 0; }
.fast-input { width: 100%; }
.fast-box { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 2px); max-height: 18rem; overflow: auto; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.fast-box[hidden] { display: none !important; }
.fast-opt { display: flex; flex-direction: column; gap: .05rem; padding: .45rem .65rem; cursor: pointer; }
.fast-opt.on, .fast-opt:hover { background: var(--red-glow, rgba(200,0,0,.15)); }
.fast-t { font-weight: 500; }
.fast-s { font-size: .78rem; color: var(--muted); }
.fast-empty { padding: .6rem .7rem; color: var(--muted); font-size: .85rem; }
.fast-clear { align-self: center; }
.doc-tools .fl-q { flex: 1 1 14rem; }
.doc-tools .fl-q input { width: 100%; }
.fl-info { margin: 0 0 .5rem; }
.fast-clear[hidden], .btn[hidden] { display: none !important; }

/* ——— Barra de menús superior tipo programa (v1.51) ——— */
.app-shell { display: block; }
.menubar { position: sticky; top: 0; z-index: 70; display: flex; align-items: center; gap: .5rem; padding: 0 1rem; min-height: 52px; background: #080808; border-bottom: 1px solid var(--line); }
.menubar .brand { font-size: 1.25rem; padding-right: .8rem; margin: 0; white-space: nowrap; }
.menubar .menus { flex: 1; min-width: 0; }
.menu-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .1rem; flex-wrap: wrap; }
.menu { position: relative; }
.menu-top { display: inline-flex; align-items: center; gap: .35rem; padding: .85rem .8rem; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none; }
.menu-top:hover, .menu.open > .menu-top { color: var(--text); background: var(--bg-soft); }
.menu.on > .menu-top { color: #fff; border-bottom-color: var(--red); }
.menu-top:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .7; }
.submenu { display: none; position: absolute; left: 0; top: 100%; min-width: 250px; background: #0e0e0e; border: 1px solid var(--line); border-top: 2px solid var(--red); box-shadow: 0 14px 34px rgba(0,0,0,.55); padding: .5rem; z-index: 80; }
.submenu.right { left: auto; right: 0; min-width: 290px; }
.submenu.wide { display: none; grid-auto-flow: column; gap: .6rem; min-width: 0; }
.menu.open > .submenu { display: block; }
.menu.open > .submenu.wide { display: grid; }
.sub-col { display: flex; flex-direction: column; min-width: 230px; }
.sub-head { font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red-text); font-weight: 600; margin: .45rem .8rem .25rem; }
.sub-col:first-child .sub-head:first-child { margin-top: .2rem; }
.submenu a { padding: .5rem .8rem; color: var(--muted); border-radius: var(--radius); font-weight: 500; text-decoration: none; display: block; }
.submenu a:hover, .submenu a:focus-visible { background: var(--bg-soft); color: var(--text); outline: none; }
.submenu a.active { background: rgba(225,6,0,.12); color: #fff; border-left: 3px solid var(--red); }
.menubar .account { margin-left: auto; }
.menubar .who { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.submenu .user-chip { padding: .6rem .8rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; font-size: .82rem; line-height: 1.5; color: var(--muted); }
.submenu .user-chip strong { display: block; color: var(--text); font-size: .95rem; }
.main { padding-top: 1.5rem; }
@media (max-width: 900px) {
  .menubar { padding-left: 4rem; flex-wrap: wrap; position: sticky; }
  .menubar .brand { padding: .6rem 0; }
  .nav-toggle { top: .4rem; left: .6rem; z-index: 90; }
  .menubar .menus { display: none; flex-basis: 100%; order: 3; max-height: calc(100vh - 56px); overflow-y: auto; }
  body.nav-open .menubar .menus { display: block; }
  .menubar .account { order: 2; margin-left: auto; }
  .menu-list { flex-direction: column; align-items: stretch; }
  .menu-top { width: 100%; justify-content: space-between; padding: .85rem .9rem; border-bottom: 1px solid var(--line); }
  .submenu, .submenu.wide, .submenu.right { position: static; box-shadow: none; border: 0; border-left: 2px solid var(--red); margin: 0 0 .4rem .6rem; min-width: 0; }
  .menu.open > .submenu.wide { display: block; }
  .submenu.right { position: absolute; right: .5rem; left: auto; width: min(92vw, 320px); border: 1px solid var(--line); background: #0e0e0e; }
  .sub-col { min-width: 0; }
  .menubar .who { max-width: 8rem; }
  .main { padding-top: 1.2rem; }
}
@media (min-width: 901px) and (max-width: 1180px) { .menu-top { padding: .85rem .55rem; font-size: .92rem; } .menubar .brand { padding-right: .4rem; } }
@media print { .menubar { display: none !important; } }
.submenu.w2 { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(230px, 1fr)); }
.submenu.flip { left: auto; right: 0; }
@media (max-width: 900px) { .submenu.w2 { display: block; } .submenu.flip { right: auto; } }
@media (min-width: 901px) { .menu-list { flex-wrap: nowrap; } .menu-top { padding: .85rem .62rem; font-size: .95rem; } .menubar .who { max-width: 9rem; } .menubar { padding: 0 .6rem; } }
@media (min-width: 901px) and (max-width: 1240px) { .menu-top { padding: .85rem .45rem; font-size: .88rem; } .menubar .brand { font-size: 1.1rem; padding-right: .3rem; } .menubar .who { max-width: 6rem; } }
