/* Marca Nuvia (mismos tokens que nuvia-web). */
@font-face { font-family: "Inter"; src: url(/static/fuentes/inter.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url(/static/fuentes/sora.woff2) format("woff2"); font-weight: 500 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #050a18; --bg-2: #08122a;
  --surface: linear-gradient(160deg, rgba(20, 40, 80, .55), rgba(8, 18, 42, .45));
  --campo: rgba(3, 9, 24, .65);
  --border: rgba(80, 190, 255, .16); --border-strong: rgba(80, 210, 255, .38);
  --cyan: #2ee6ff; --blue: #3b8bff; --violet: #7c5cff;
  --grad: linear-gradient(115deg, #2ee6ff 0%, #3b8bff 50%, #7c5cff 100%);
  --text: #eaf2ff; --muted: #93a4c6; --dim: #5f7096;
  --ok: #4ade9a; --ok-fondo: rgba(74, 222, 154, .1); --ok-borde: rgba(74, 222, 154, .3);
  --alerta: #fbbf5a; --alerta-fondo: rgba(251, 191, 90, .1); --alerta-borde: rgba(251, 191, 90, .3);
  --error: #ff7a85; --error-fondo: rgba(255, 92, 110, .1); --error-borde: rgba(255, 92, 110, .35);
  --radius: 18px; --radius-sm: 12px;
  --font-display: "Sora", system-ui, sans-serif; --font-body: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; font: 15px/1.55 var(--font-body); color: var(--text); background: var(--bg); }
/* Resplandores de fondo fijos detrás de todo el contenido. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(46, 230, 255, .10), transparent 60%),
    radial-gradient(800px 600px at 100% 110%, rgba(124, 92, 255, .14), transparent 60%); }
a { color: var(--cyan); text-decoration-color: rgba(46, 230, 255, .4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--cyan); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; color: var(--text); }
h1 { font-size: 1.75rem; letter-spacing: -.5px; margin: 0 0 .3rem; }
h2 { font-size: 1.1rem; letter-spacing: -.2px; margin: 0 0 .9rem; }
.sub { color: var(--muted); margin: 0 0 1.75rem; }
::selection { background: rgba(46, 230, 255, .3); }

/* Estructura: menú lateral + contenido */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.lateral { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 30;
  background: rgba(5, 10, 24, .82); backdrop-filter: blur(14px); border-right: 1px solid var(--border); }
.marca { display: flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none;
  padding: 1.1rem 1.15rem; border-bottom: 1px solid var(--border); }
.marca img { width: 38px; height: auto; display: block; }
.marca .nombre { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: 2px; line-height: 1.1; }
.marca small { display: block; font-weight: 500; font-size: .74rem; color: var(--muted); }
.menu { flex: 1; overflow-y: auto; padding: .9rem .7rem; display: flex; flex-direction: column; gap: .2rem; }
.menu a { display: flex; align-items: center; gap: .7rem; padding: .58rem .8rem; border-radius: var(--radius-sm); color: var(--muted);
  text-decoration: none; font-size: .92rem; font-weight: 500; border: 1px solid transparent; transition: color .2s, background .2s; }
.menu a:hover { color: var(--text); background: rgba(80, 190, 255, .07); }
.menu a.activo { color: var(--text); font-weight: 600; background: rgba(46, 230, 255, .08); border-color: var(--border-strong);
  box-shadow: inset 3px 0 0 var(--cyan); }
.menu a.activo .icono { color: var(--cyan); }
.icono { width: 18px; height: 18px; flex: none; }
.quien { display: flex; align-items: center; gap: .3rem; padding: .85rem .9rem; border-top: 1px solid var(--border); }
.quien form { margin: 0; }
.quien-datos { min-width: 0; flex: 1; line-height: 1.25; }
.quien-datos strong { display: block; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quien-datos span { display: block; font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icono-boton { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent;
  background: none; color: var(--muted); cursor: pointer; text-decoration: none; transition: color .2s, background .2s; }
.icono-boton:hover, .icono-boton.activo { color: var(--text); background: rgba(80, 190, 255, .08); }
.icono-boton.salir:hover { color: var(--error); background: var(--error-fondo); }
.icono-boton:focus-visible, .menu a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.contenido { min-width: 0; display: flex; flex-direction: column; }
.cabecera { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; height: 56px; padding: 0 2rem;
  background: rgba(5, 10, 24, .7); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.titulo-seccion { font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.empresa-actual { margin-left: auto; font-size: .8rem; color: var(--muted); padding: .2rem .7rem; border: 1px solid var(--border); border-radius: 999px; }
.hamburguesa, .velo { display: none; }

main { width: 100%; max-width: 1160px; margin: 0 auto; padding: 2rem 2rem 4rem; }
body:not(:has(.app)) main { padding-inline: 16px; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-100%); transition: transform .25s var(--ease);
    background: rgba(5, 10, 24, .97); }
  .menu-abierto .lateral { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .6); }
  .menu-abierto .velo { display: block; position: fixed; inset: 0; z-index: 25; border: 0; background: rgba(0, 0, 0, .55); }
  .hamburguesa { display: inline-grid; margin-left: -.4rem; }
  .cabecera { padding: 0 16px; }
  main { padding: 1.5rem 16px 4rem; }
}

/* Tarjetas tipo vidrio */
.tarjeta { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem;
  margin-bottom: 1.25rem; backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 20px 50px -30px rgba(0, 0, 0, .8); }
.grilla { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }

.aviso { padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid transparent; }
.aviso.ok { background: var(--ok-fondo); color: var(--ok); border-color: var(--ok-borde); }
.aviso.error { background: var(--error-fondo); color: var(--error); border-color: var(--error-borde); }
.aviso.alerta { background: var(--alerta-fondo); color: var(--alerta); border-color: var(--alerta-borde); }
.aviso ul { margin: .25rem 0 0; padding-left: 1.2rem; }

/* Formularios */
label { display: block; font-weight: 600; font-size: .88rem; margin: .95rem 0 .35rem; color: var(--text); }
.ayuda { font-weight: 400; color: var(--muted); font-size: .82rem; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit;
  background: var(--campo); color: var(--text); transition: border-color .2s, box-shadow .2s; }
input::placeholder, textarea::placeholder { color: var(--dim); }
select option { background: var(--bg-2); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(46, 230, 255, .15); }
input[type=checkbox], input[type=radio] { accent-color: var(--cyan); width: 1.05rem; height: 1.05rem; }
input[type=file] { color: var(--muted); font: inherit; }
input[type=file]::file-selector-button { font: inherit; margin-right: .75rem; padding: .45rem .9rem; border-radius: 999px;
  border: 1px solid var(--border-strong); background: rgba(46, 230, 255, .06); color: var(--text); cursor: pointer; }

/* Botones */
.boton { display: inline-flex; align-items: center; gap: .4rem; background: var(--grad); color: #04101f; border: 1px solid transparent;
  padding: .62rem 1.2rem; border-radius: 999px; font: inherit; font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  cursor: pointer; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s;
  box-shadow: 0 8px 30px -8px rgba(46, 230, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .4); }
.boton:hover { transform: translateY(-1px); box-shadow: 0 12px 36px -8px rgba(46, 230, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .4); }
.boton:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.boton.secundario { background: rgba(8, 18, 42, .6); color: var(--text); border-color: var(--border-strong); box-shadow: none; }
.boton.secundario:hover { background: rgba(46, 230, 255, .08); }
.boton.peligro { background: transparent; color: var(--error); border-color: var(--error-borde); box-shadow: none; }
.boton.peligro:hover { background: var(--error-fondo); }
.boton.chico { padding: .32rem .75rem; font-size: .82rem; font-weight: 500; }
.boton[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.acciones { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.25rem; }
.acciones form { margin: 0; }

/* Tablas */
.tabla-envoltura { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-family: var(--font-display); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(80, 190, 255, .04); }
td .ayuda { display: block; }
td.cuit { white-space: nowrap; font-variant-numeric: tabular-nums; }
.boton.chico { white-space: nowrap; }
.vacio { color: var(--muted); padding: 1rem 0; }

.etiqueta { display: inline-block; font-size: .74rem; font-weight: 600; padding: .12rem .6rem; border-radius: 999px; white-space: nowrap;
  background: rgba(46, 230, 255, .07); color: var(--cyan); border: 1px solid rgba(46, 230, 255, .2); }
.etiqueta.ok { background: var(--ok-fondo); color: var(--ok); border-color: var(--ok-borde); }
.etiqueta.alerta { background: var(--alerta-fondo); color: var(--alerta); border-color: var(--alerta-borde); }
.etiqueta.error { background: var(--error-fondo); color: var(--error); border-color: var(--error-borde); }

/* Pasos de puesta en marcha */
.pasos { list-style: none; margin: 0; padding: 0; }
.pasos li { display: flex; gap: .85rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.pasos li:last-child { border-bottom: 0; }
.tilde { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .85rem;
  background: rgba(80, 190, 255, .06); color: var(--dim); border: 1px solid var(--border); }
.hecho .tilde { background: var(--grad); color: #04101f; border-color: transparent; }
.pasos a { margin-left: auto; }

.docs { display: grid; gap: .55rem; }
.doc { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; align-items: center; padding: .7rem .8rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(3, 9, 24, .35); }
.doc label { margin: 0; }
.doc input[type=text] { grid-column: 2; }

.link-copia { display: flex; gap: .5rem; margin-top: .5rem; }
.link-copia input { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: .84rem; }

/* Pantallas de ingreso */
.centrado { max-width: 440px; margin: 9vh auto; }
.logo-grande { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.5rem; }
.logo-grande img { width: 54px; height: auto; }
.logo-grande span { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: 3px; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-size: .72rem; font-weight: 600;
  letter-spacing: 1.8px; text-transform: uppercase; color: var(--cyan); background: rgba(46, 230, 255, .07);
  border: 1px solid rgba(46, 230, 255, .2); border-radius: 999px; padding: .35rem .85rem; margin: 0 0 1rem; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.degrade { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.angosta { max-width: 560px; }
.separado { margin-top: 1.5rem; }
.pie { color: var(--muted); font-size: .82rem; margin-top: 2rem; }

/* Manual de uso (/ayuda) */
.menu-ayuda { margin-top: auto; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
.indice ol { margin: 0; padding-left: 1.3rem; columns: 2; column-gap: 2rem; }
.indice li { margin: .3rem 0; break-inside: avoid; }
.manual, .indice { max-width: 900px; }
.manual section { scroll-margin-top: 72px; }
.manual h2 { font-size: 1.25rem; margin-bottom: .75rem; }
.manual h3 { font-size: 1rem; margin: 1.5rem 0 .5rem; color: var(--text); }
.manual p, .manual li { color: #c9d6ee; }
.manual p { margin: .5rem 0 .8rem; }
.manual ol, .manual ul { padding-left: 1.3rem; margin: .4rem 0 .9rem; }
.manual li { margin: .35rem 0; }
.manual li::marker { color: var(--cyan); font-weight: 600; }
.manual strong { color: var(--text); }
.manual code { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: .85em; padding: .08rem .35rem; border-radius: 6px;
  background: rgba(46, 230, 255, .07); border: 1px solid var(--border); color: var(--text); }
.manual .aviso { margin: 1rem 0; }
.manual table { margin: .4rem 0 1rem; }
.manual td { color: #c9d6ee; }
table.ejemplo td { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: .82rem; white-space: nowrap; }
.diagrama { margin: 1.25rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(3, 9, 24, .45); }
.diagrama img { display: block; width: 100%; height: auto; }
.diagrama figcaption { margin-top: .6rem; font-size: .82rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 640px) {
  h1 { font-size: 1.45rem; }
  .tarjeta { padding: 1.15rem .9rem; }
  th, td { padding: .6rem .25rem; font-size: .88rem; }
  th { letter-spacing: .6px; font-size: .66rem; }
  td.cuit { font-size: .78rem; }
  td .boton.chico { padding: .28rem .55rem; }
  .indice ol { columns: 1; }
  .diagrama { padding: .5rem; }
  table:not(.completa) th:nth-child(n+4):not(:last-child), table:not(.completa) td:nth-child(n+4):not(:last-child) { display: none; }
}
