:root{
  --bg:#0b0f14;
  --bg2:#0f1c2e;
  --panel:#111827;
  --panel-2:#162235;
  --text:#f5f7fa;
  --muted:#9aa6b2;
  --line:rgba(255,255,255,.09);
  --accent:#e10600;
  --accent-2:#c9d1d9;
  --blue:#13293d;
  --radius:22px;
  --shadow:0 20px 50px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}

body{
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top right, rgba(225,6,0,.08), transparent 28%),
    radial-gradient(circle at top left, rgba(19,41,61,.55), transparent 32%),
    linear-gradient(180deg,#08111d 0%, #0b0f14 50%, #0d1420 100%);
}

a{color:inherit;text-decoration:none}
.container{width:min(1140px, calc(100% - 32px)); margin:0 auto}

/* =========================
   TOPBAR / NAVEGACIÓN
========================= */
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(8,12,20,.78);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:76px;
  gap:20px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:800;
  text-decoration:none;
  flex-shrink:0;
  min-width:0;
}

.brand-text{
  letter-spacing:.2px;
}

/* Variante anterior por si se reutiliza el isotipo */
.brand-mark{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:#0b0f14;
  flex-shrink:0;
}

.brand-mark img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Nuevo logo completo */
.brand-full-logo{
  display:flex;
  align-items:center;
  min-width:0;
}

.brand-logo-full{
  display:block;
  height:64px;
  width:auto;
  max-width:320px;
  object-fit:contain;
  filter:drop-shadow(0 2px 10px rgba(0,0,0,.22));
}

nav{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  align-items:center;
}

nav a{
  color:#d8dee6;
  font-size:.95rem;
  transition:color .2s ease, opacity .2s ease;
}

nav a:hover{
  color:#fff;
}

nav a.active{
  color:#fff;
  font-weight:700;
}

/* =========================
   HERO
========================= */
.hero{padding:74px 0 42px}

.hero-grid{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:28px;
  align-items:center;
}

.hero-copy h1{
  font-size:clamp(2.2rem,4vw,4.1rem);
  line-height:1.02;
  margin:0 0 18px;
  font-weight:800;
  letter-spacing:-1px;
}

.hero-copy p{
  font-size:1.05rem;
  color:#d8dee6;
  max-width:62ch;
}

.eyebrow{
  font-size:.76rem;
  letter-spacing:.28em;
  color:#ff6a66;
  text-transform:uppercase;
  margin-bottom:14px;
  font-weight:700;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin:26px 0 20px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  padding:14px 20px;
  font-weight:700;
  border:1px solid transparent;
  transition:.22s ease;
  cursor:pointer;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn-primary{
  background:linear-gradient(135deg,var(--accent),#bb0905);
  color:white;
  box-shadow:0 16px 32px rgba(225,6,0,.2);
}

.btn-secondary{
  background:rgba(255,255,255,.02);
  border-color:rgba(255,255,255,.16);
  color:#edf2f7;
}

.full{width:100%}

.hero-points{
  padding:0;
  margin:18px 0 0;
  list-style:none;
  display:grid;
  gap:10px;
  color:#c7d0da;
}

.hero-points li{
  position:relative;
  padding-left:24px;
}

.hero-points li::before{
  content:"";
  position:absolute;
  left:0;
  top:.58em;
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--accent);
}

/* =========================
   TARJETAS / SECCIONES
========================= */
.card{
  background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.02));
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  border-radius:var(--radius);
  padding:26px;
}

.card h3,.card h2{margin-top:0}

.hero-visual img{
  width:100%;
  display:block;
  border-radius:16px;
}

.section{padding:42px 0}

.section.alt{
  background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.01));
}

.section-head{
  max-width:850px;
  margin-bottom:22px;
}

.section-head h2{
  font-size:clamp(1.8rem,3vw,3rem);
  line-height:1.06;
  margin:0 0 12px;
}

.section-head p{
  color:#c6ced7;
}

.three-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}

.two-col{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:18px;
  align-items:start;
}

.sector-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:18px;
}

.accent{
  background:linear-gradient(180deg,rgba(19,41,61,.95),rgba(12,18,31,.98));
}

.cta-panel{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  padding:28px;
  border-radius:26px;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  background:linear-gradient(135deg,rgba(255,255,255,.03),rgba(255,255,255,.01));
}

.cta-panel span{color:#fff}

/* =========================
   FOOTER
========================= */
.site-footer{
  border-top:1px solid var(--line);
  padding-top:24px;
  margin-top:26px;
  background:rgba(0,0,0,.16);
}

.footer-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  padding-bottom:16px;
}

.footer-grid h3,
.footer-grid h4{
  margin:0 0 10px;
}

.footer-grid p,
.footer-grid li{
  color:#c6ced7;
}

.footer-grid ul{
  margin:0;
  padding-left:18px;
}

.legal{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:18px 0 28px;
  color:#9aa6b2;
  border-top:1px solid var(--line);
  font-size:.92rem;
}

/* =========================
   GATE / LOGIN PRIVADO
========================= */
.gate-shell{
  min-height:calc(100vh - 76px);
  display:grid;
  place-items:center;
  padding:30px;
}

.gate-card{
  width:min(560px,100%);
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  border-radius:28px;
  padding:34px;
}

.gate-card h1{
  font-size:clamp(2.3rem,6vw,4rem);
  margin:0 0 12px;
}

.gate-copy,
.gate-note{
  color:#c8d1da;
}

.gate-form{
  display:grid;
  gap:12px;
  margin-top:18px;
}

.gate-form label{
  font-weight:600;
  color:#e7edf4;
}

/* =========================
   FORMULARIOS
========================= */
input[type="password"],
input[type="file"],
textarea{
  width:100%;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:#fff;
  font:inherit;
}

textarea{
  min-height:240px;
  resize:vertical;
}

.form-error{
  color:#ff8781;
  font-weight:700;
}

.page-hero.slim{
  padding:56px 0 16px;
}

.notice{
  padding:16px 18px;
  border-radius:14px;
  background:rgba(225,6,0,.08);
  border:1px solid rgba(225,6,0,.22);
  margin-bottom:18px;
  color:#fce9e8;
}

.tool-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:18px;
}

.password-row{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:12px;
}

.password-row input{
  flex:1;
}

.toggle-password{
  min-width:54px;
  min-height:52px;
  padding:13px 12px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.12);
  color:#fff;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.toggle-password:hover{
  background:rgba(255,255,255,.08);
}

.status-line{
  margin-top:12px;
  color:#d9e2eb;
  min-height:24px;
}

.result-box{
  margin-top:12px;
}

.muted{
  color:var(--muted);
}

.clean-list{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:8px;
  color:#d2dae4;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 920px){
  .hero-grid,
  .two-col,
  .tool-grid,
  .footer-grid{
    grid-template-columns:1fr;
  }

  .three-grid,
  .sector-grid{
    grid-template-columns:1fr 1fr;
  }

  .cta-panel{
    flex-direction:column;
    align-items:flex-start;
  }

  .brand-logo-full{
    height:46px;
    max-width:220px;
  }
}

@media (max-width: 640px){
  .container{
    width:min(100% - 20px, 1140px);
  }

  nav{
    display:none;
  }

  .three-grid,
  .sector-grid{
    grid-template-columns:1fr;
  }

  .hero{
    padding-top:40px;
  }

  .card,
  .gate-card,
  .cta-panel{
    padding:20px;
  }

  .hero-copy h1{
    font-size:2.3rem;
  }

  .btn{
    width:100%;
  }

  .hero-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .legal{
    flex-direction:column;
  }

  .brand-logo-full{
    height:40px;
    max-width:190px;
  }
}


.codificador-layout{
  display:grid;
  grid-template-columns:320px 1fr;
  gap:18px;
  align-items:start;
}

.workspace-sidebar{
  position:sticky;
  top:96px;
}

.workspace-main{
  min-width:0;
}

.module-list{
  display:grid;
  gap:10px;
  margin:18px 0;
}

.module-pill{
  width:100%;
  text-align:left;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.03);
  color:#edf2f7;
  font:inherit;
  font-weight:700;
  cursor:pointer;
  transition:.22s ease;
}

.module-pill:hover,
.module-pill.active{
  background:linear-gradient(135deg,rgba(225,6,0,.18),rgba(255,255,255,.05));
  border-color:rgba(225,6,0,.35);
}

.sidebar-meta{
  padding:14px 16px;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  margin:16px 0;
}

.meta-label{
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.18em;
  color:#9aa6b2;
  margin-bottom:6px;
}

.meta-value{
  font-weight:800;
  font-size:1rem;
}

.tool-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

.status-badge{
  padding:8px 12px;
  border-radius:999px;
  background:rgba(225,6,0,.12);
  border:1px solid rgba(225,6,0,.24);
  color:#ffd4d2;
  font-size:.82rem;
  font-weight:700;
  white-space:nowrap;
}

.status-badge.soft{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.12);
  color:#d7dfe8;
}

.inline-meta,
.recover-meta{
  margin-top:14px;
  padding:14px 16px;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  color:#d9e2eb;
}

.inline-meta:empty,
.recover-meta:empty{
  display:none;
}

.inline-meta div + div{
  margin-top:6px;
}

.recover-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 16px;
}

.recover-grid span{
  display:block;
  color:#9aa6b2;
  font-size:.82rem;
  margin-bottom:4px;
}

.recover-grid strong{
  display:block;
  color:#eef3f8;
  word-break:break-word;
}

.hash-cell{
  font-size:.88rem;
}

.action-row.wrap{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem;
  margin:.75rem 0 0.25rem;
}

.clean-list.compact{
  gap:6px;
}

.small-note{
  margin-top:12px;
}

.single-field{
  margin-top:12px;
}

.two-stack{
  grid-template-columns:1fr;
}

@media (max-width: 1040px){
  .codificador-layout{
    grid-template-columns:1fr;
  }

  .workspace-sidebar{
    position:relative;
    top:0;
  }
}

@media (max-width: 640px){
  .recover-grid{
    grid-template-columns:1fr;
  }
}


.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
  margin:24px 0 28px;
}

.stat-card{
  min-height:170px;
}

.accent-card{
  background:linear-gradient(180deg, rgba(225,6,0,.12), rgba(255,255,255,.03));
}

.stat-label{
  font-size:.82rem;
  text-transform:uppercase;
  letter-spacing:.16em;
  color:#ff8b87;
  margin-bottom:12px;
  font-weight:700;
}

.stat-value{
  font-size:clamp(1.55rem,2.2vw,2.2rem);
  font-weight:800;
  margin-bottom:10px;
}

.two-panel-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:22px;
}

.compact-head{
  margin-bottom:14px;
}

.table-wrap{
  overflow:auto;
}

.history-table{
  width:100%;
  border-collapse:collapse;
  font-size:.95rem;
}

.history-table th,
.history-table td{
  text-align:left;
  padding:12px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  vertical-align:top;
}

.history-table th{
  color:#ff8b87;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:.75rem;
}

.status-chip{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:6px 10px;
  font-size:.75rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.status-chip.ok{
  background:rgba(38, 208, 124, .12);
  color:#7ef3b5;
  border:1px solid rgba(126,243,181,.18);
}

.status-chip.warn{
  background:rgba(255, 170, 0, .12);
  color:#ffd27a;
  border:1px solid rgba(255,210,122,.18);
}

.cta-mini{
  margin-top:18px;
  display:grid;
  gap:16px;
}

.clean-list.spaced li + li{
  margin-top:10px;
}

@media (max-width: 1024px){
  .stats-grid,
  .two-panel-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 720px){
  .stats-grid,
  .two-panel-grid{
    grid-template-columns:1fr;
  }

  .history-table{
    min-width:700px;
  }
}


/* =========================
   PUBLIC PREVIEW V6
========================= */
.public-hero{padding-top:64px;padding-bottom:34px}
.hero-grid-public{align-items:start}
.public-meta-strip{display:flex;gap:14px;flex-wrap:wrap;margin-top:18px;color:#9fb1c2;font-size:.95rem}
.auth-panel{padding:0;overflow:hidden}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--line)}
.auth-tab{background:transparent;color:#dce5ee;border:0;padding:16px 18px;font:inherit;font-weight:700;cursor:pointer}
.auth-tab.active{background:rgba(255,255,255,.04);color:#fff}
.auth-form-wrap{display:none;padding:26px}.auth-form-wrap.active{display:block}
.stack-form{display:grid;gap:10px}.stack-form label{font-weight:600;color:#e7edf4}
input[type="email"],input[type="text"]{width:100%;padding:14px 16px;border-radius:14px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:#fff;font:inherit}
.checkbox-row{display:flex;gap:10px;align-items:flex-start;color:#d5dee7;font-size:.96rem}
.checkbox-row input{margin-top:3px}
.form-success{color:#9ef0b0;font-weight:700;margin:10px 0}
.mini-actions{margin-top:14px;font-size:.95rem}
.mini-actions a{color:#c9d7e6;text-decoration:underline}
.compact-shell{min-height:calc(100vh - 180px)}
.footer-grid-public{grid-template-columns:1.2fr .9fr .9fr}
.prose-card{line-height:1.75;color:#d4dde6}
.prose-card p{margin:0 0 16px}
.stats-grid{display:grid;gap:18px}.stats-grid.four-up{grid-template-columns:repeat(4,1fr)}.stats-grid.three-up{grid-template-columns:repeat(3,1fr)}
.stat-card{padding:22px}.stat-label{font-size:.76rem;letter-spacing:.16em;text-transform:uppercase;color:#ff807a;font-weight:700;margin-bottom:10px}.stat-value{font-size:2rem;font-weight:800;line-height:1.05}
.accent-card{background:linear-gradient(180deg,rgba(110,15,20,.28),rgba(15,24,38,.98))}
.codificador-layout{display:grid;grid-template-columns:300px 1fr;gap:18px;margin-top:20px}
.workspace-sidebar h2{margin:0 0 10px}.module-list{display:grid;gap:10px;margin:18px 0}.module-pill{padding:12px 14px;border-radius:14px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.03);color:#fff;font:inherit;font-weight:700;cursor:pointer;text-align:left}.module-pill.active{background:rgba(225,6,0,.14);border-color:rgba(225,6,0,.45)}
.sidebar-meta{padding:14px;border-radius:16px;background:rgba(255,255,255,.03);margin:18px 0}.meta-label{font-size:.72rem;letter-spacing:.15em;text-transform:uppercase;color:#a9b7c7}.meta-value{margin-top:6px;font-size:1.05rem;font-weight:800}
.tool-grid.two-stack{grid-template-columns:1fr;gap:18px}.workspace-main .tool-grid{display:grid}.tool-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:10px}.status-badge{display:inline-flex;padding:8px 12px;border-radius:999px;background:rgba(225,6,0,.12);color:#ffd7d5;font-size:.78rem;font-weight:700}.status-badge.soft{background:rgba(255,255,255,.05);color:#d7e0eb}.inline-meta{margin-top:10px;color:#aab7c5;font-size:.92rem}.single-field{margin-top:12px}.action-row.wrap{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.small-note{font-size:.92rem}.recover-meta{margin-top:12px}.meta-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:12px}.meta-grid div{padding:12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.03)}.meta-grid span{display:block;font-size:.74rem;letter-spacing:.1em;text-transform:uppercase;color:#9fb0c3}.meta-grid strong{display:block;margin-top:6px;word-break:break-word}.hash-cell{font-size:.8rem}
.table-wrap{overflow:auto}.history-table{width:100%;border-collapse:collapse}.history-table th,.history-table td{padding:12px 10px;border-bottom:1px solid var(--line);text-align:left;font-size:.95rem}.history-table th{color:#ff807a;text-transform:uppercase;font-size:.74rem;letter-spacing:.12em}.status-chip{display:inline-flex;padding:6px 10px;border-radius:999px;font-size:.72rem;font-weight:700}.status-chip.ok{background:rgba(46,160,67,.18);color:#9ef0b0}.status-chip.warn{background:rgba(225,132,6,.18);color:#ffd18d}
.two-panel-grid{display:grid;grid-template-columns:1.3fr .7fr;gap:18px}.compact-head{margin-bottom:16px}.commercial-side-panel h2{margin-top:0}.compact-actions{display:grid;gap:10px}.public-preview-cards{margin-top:0}
@media (max-width: 920px){.stats-grid.four-up,.stats-grid.three-up,.codificador-layout,.two-panel-grid,.footer-grid-public{grid-template-columns:1fr}.public-meta-strip{flex-direction:column;gap:6px}}
