:root {
  --acento: #1c3a63; --acento-osc: #13284a; --acento-suave: #eaf0f7; --verde: #059669; --verde-suave: #ecfdf5;
  --rojo: #dc2626; --rojo-suave: #fef2f2; --ambar: #b45309; --ambar-suave: #fffbeb;
  --fondo: #f2f4f7; --panel: #fff; --borde: #e4e7ee; --texto: #0f172a; --suave: #5b6779; --tenue: #94a0b3;
  --sombra: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .05); --sombra-m: 0 10px 30px rgba(16, 24, 40, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--texto); background: var(--fondo); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--acento); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; }
.envoltura { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 11px; border: 1px solid #d3d8e2; background: #fff; color: var(--texto); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform .06s, box-shadow .12s, background .12s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.p { background: linear-gradient(180deg, #2a4f84, #1c3a63); border-color: #1c3a63; color: #fff; box-shadow: 0 6px 16px rgba(28, 58, 99, .28); }
.btn.v { background: linear-gradient(180deg, #10b981, #059669); border-color: #059669; color: #fff; }
.btn.chico { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn.fantasma { border-color: transparent; background: transparent; }
.btn.peligro { color: var(--rojo); }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #d3d8e2; border-radius: 10px; font: inherit; background: #fff; color: var(--texto); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--acento); box-shadow: 0 0 0 4px rgba(28, 58, 99, .13); }
label.campo { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--suave); font-weight: 600; }
.rejilla { display: grid; gap: 14px; }
.dos { grid-template-columns: 1fr 1fr; }
.panel { background: var(--panel); border: 1px solid var(--borde); border-radius: 16px; box-shadow: var(--sombra); }
.etiqueta { display: inline-flex; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #f1f5f9; color: #334155; white-space: nowrap; }
.etiqueta.verde { background: var(--verde-suave); color: #047857; } .etiqueta.rojo { background: var(--rojo-suave); color: #b91c1c; }
.etiqueta.ambar { background: var(--ambar-suave); color: var(--ambar); } .etiqueta.azul { background: var(--acento-suave); color: var(--acento-osc); }
.suave { color: var(--suave); } .chico { font-size: 13px; } .tenue { color: var(--tenue); }
.error { background: var(--rojo-suave); color: #991b1b; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.ok { background: var(--verde-suave); color: #065f46; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crece { flex: 1; }
.oculto { display: none !important; }
.fondo-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 18px; width: 520px; max-width: 100%; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; box-shadow: 0 30px 80px rgba(2, 6, 23, .35); }
.modal h3 { font-size: 20px; margin-bottom: 4px; }
code.clave { display: block; padding: 12px; background: #0f172a; color: #e2e8f0; border-radius: 10px; font-size: 12px; word-break: break-all; max-height: 120px; overflow: auto; }

/* ---- Página pública ---- */
.encabezado { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--borde); }
.encabezado .envoltura { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #2a4f84, #b4764c); color: #fff; display: grid; place-items: center; font-weight: 800; box-shadow: 0 4px 12px rgba(28, 58, 99, .3); }
.marca { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; color: var(--texto); }
.encabezado nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.encabezado nav a { color: var(--suave); font-weight: 500; }
.heroe { background: radial-gradient(900px 420px at 15% -10%, #dde6f2 0, transparent 60%), radial-gradient(700px 380px at 100% 0%, #f5e6da 0, transparent 60%); padding: 80px 0 60px; }
.heroe h1 { font-size: 50px; line-height: 1.05; letter-spacing: -.035em; max-width: 780px; }
.heroe h1 span { background: linear-gradient(90deg, #1c3a63, #b4764c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.heroe p { font-size: 19px; color: var(--suave); max-width: 640px; margin: 18px 0 28px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.chips span { background: #fff; border: 1px solid var(--borde); border-radius: 99px; padding: 6px 12px; font-size: 13px; color: var(--suave); }
section { padding: 64px 0; }
section > .envoltura > h2 { font-size: 32px; margin-bottom: 8px; }
section > .envoltura > p.sub { color: var(--suave); margin: 0 0 30px; font-size: 17px; }
.funciones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.funcion { padding: 20px; }
.funcion .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--acento-suave); font-size: 20px; margin-bottom: 12px; }
.funcion h4 { font-size: 16px; margin-bottom: 4px; }
.funcion p { margin: 0; color: var(--suave); font-size: 14px; }
.paquetes { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 14px; }
.paquete { padding: 24px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.paquete.destacado { border: 2px solid var(--acento); box-shadow: var(--sombra-m); }
.paquete.destacado::before { content: 'El más pedido'; position: absolute; top: -12px; left: 20px; background: var(--acento); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.paquete .precio { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.paquete .precio small { font-size: 14px; color: var(--suave); font-weight: 500; }
.paquete p { margin: 0; color: var(--suave); font-size: 14px; flex: 1; }
.descargas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.descarga { padding: 18px; display: flex; gap: 14px; align-items: center; }
.descarga .ic { font-size: 26px; }
.pie { padding: 30px 0 50px; color: var(--tenue); font-size: 13px; border-top: 1px solid var(--borde); }
.wa-flotante { position: fixed; right: 20px; bottom: 20px; width: 60px; height: 60px; display: grid; place-items: center; background: #22c55e; border-radius: 50%; box-shadow: 0 10px 24px rgba(34, 197, 94, .4); z-index: 30; }
@media (max-width: 860px) {
  .heroe { padding: 48px 0 36px; } .heroe h1 { font-size: 34px; } .heroe p { font-size: 16px; }
  .funciones { grid-template-columns: 1fr 1fr; } .dos { grid-template-columns: 1fr; }
  .encabezado nav a:not(.btn) { display: none; }
  section { padding: 44px 0; } section > .envoltura > h2 { font-size: 26px; }
}

/* ---- Panel de administrador ---- */
.admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin aside { background: linear-gradient(180deg, #0b1220, #0f1a2e); color: #b8c2d3; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.admin aside .marca { color: #fff; padding: 4px 8px 18px; font-size: 15px; }
.admin aside button { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: inherit; font: inherit; font-weight: 500; text-align: left; padding: 9px 12px; border-radius: 9px; cursor: pointer; }
.admin aside button:hover { background: rgba(255, 255, 255, .06); }
.admin aside button.activo { background: linear-gradient(90deg, rgba(185, 122, 80, .30), rgba(185, 122, 80, .10)); color: #fff; box-shadow: inset 3px 0 0 #d39b72; }
.admin aside .cuenta { margin-left: auto; }
.admin main { padding: 26px 30px; min-width: 0; }
.admin main h2 { font-size: 24px; margin-bottom: 4px; }
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 18px 0; }
.tarjeta { padding: 16px 18px; }
.tarjeta b { font-size: 26px; letter-spacing: -.03em; display: block; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eef1f5; vertical-align: top; }
th { background: #f8fafc; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #64748b; }
.tabla { overflow-x: auto; }
.cliente { padding: 18px; margin-bottom: 12px; }
.equipo { border: 1px solid var(--borde); border-radius: 12px; padding: 12px; margin-top: 10px; background: #fafbfd; }
.acceso { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1000px 500px at 20% 0%, #13284a 0, transparent 60%), #0b1220; padding: 16px; }
.acceso .modal { width: 380px; }
@media (max-width: 860px) { .admin { grid-template-columns: 1fr; } .admin aside { flex-direction: row; overflow-x: auto; } .admin aside .marca { display: none; } .admin main { padding: 18px 14px; } }

.paquete .iva { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); margin-top: -6px; }
#modal .modal { position: relative; padding-top: 30px; background: radial-gradient(400px 160px at 90% 0%, #f6e9de 0, transparent 70%), #fff; }
#modal .raya { position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, #1c3a63, #d39b72, #059669); border-radius: 18px 18px 0 0; }
#modal .modal h3 { font-size: 26px; letter-spacing: -.03em; }
#modal input { padding: 14px 16px; border-width: 2px; border-color: #e6eaf0; }

/* ---- Marca DVIR ---- */
.logo.img { background: none; box-shadow: none; width: 40px; height: 40px; }
.logo.img img { width: 100%; height: 100%; object-fit: contain; }
.marca .nombre-dvir { font-weight: 800; letter-spacing: .14em; color: var(--acento); font-size: 19px; }
.admin aside .nombre-dvir { color: #fff; }
.heroe { background: radial-gradient(900px 420px at 10% -10%, #dde6f2 0, transparent 60%), radial-gradient(700px 380px at 100% 0%, #f5e6da 0, transparent 60%); }
.heroe h1 span { background: linear-gradient(90deg, #1c3a63, #b4764c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.funcion .ic { background: linear-gradient(135deg, #eaf0f7, #f7ede5); }
.paquete.destacado::before { background: linear-gradient(90deg, #1c3a63, #b4764c); }
.paquete .precio { color: var(--acento); }
.heroe .logo-grande { width: 92px; height: 92px; margin-bottom: 18px; filter: drop-shadow(0 10px 18px rgba(28, 58, 99, .25)); }
.admin aside { background: linear-gradient(180deg, #0e1c33, #132845); }
.acceso { background: radial-gradient(1000px 500px at 20% 0%, #2a4f84 0, transparent 60%), radial-gradient(700px 420px at 100% 100%, #8a5634 0, transparent 55%), #0b1628; }
.heroe .envoltura { position: relative; }
@media (min-width: 861px) {
  .heroe .logo-grande { position: absolute; right: 30px; top: -10px; width: 300px; height: 300px; margin: 0; }
  .heroe h1, .heroe p { max-width: 680px; }
}
@media (max-width: 860px) { .heroe .logo-grande { width: 72px; height: 72px; } }

.logo-completo { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.logo-completo img { width: 230px; height: 230px; filter: drop-shadow(0 12px 22px rgba(28, 58, 99, .22)); }
.logo-completo b { font-size: 64px; line-height: 1; font-weight: 800; letter-spacing: .06em; color: #1c3a63; margin-top: 4px; }
.logo-completo span { font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #3d5a80; }
@media (min-width: 861px) { .heroe .logo-completo { position: absolute; right: 20px; top: -24px; } }
@media (max-width: 860px) { .heroe .logo-completo { align-items: flex-start; margin-bottom: 18px; } .logo-completo img { width: 84px; height: 84px; } .logo-completo b { font-size: 34px; } .logo-completo span { font-size: 10px; } }
.codigo-grande { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 30px; font-weight: 800; letter-spacing: .08em; color: var(--acento); background: #f2f5f9; border: 2px dashed #c9d6e8; border-radius: 14px; padding: 16px; text-align: center; margin: 10px 0; user-select: all; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .04em; }
