:root{
  --morado:#5b2cff;
  --morado-oscuro:#1a123b;
  --rosa:#ff4f9f;
  --fondo:#050514;
  --gris-claro:#e0e2ff;
  --gris-texto:#b7b9df;
  --verde:#29c38a;
  --rojo:#ff4d6d;
  --amarillo:#ffcc66;

  --card: rgba(3,3,16,0.88);
  --stroke: rgba(255,255,255,0.14);
  --stroke2: rgba(255,255,255,0.22);
  --shadow: 0 18px 60px rgba(0,0,0,0.6);
  --r1: 22px;
  --r2: 16px;
}

*{box-sizing:border-box;margin:0;padding:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;}
body{
  background: radial-gradient(circle at top left, #2b1d6b, var(--fondo) 55%);
  color:#fff; min-height:100vh; display:flex; justify-content:center;
}
a{color:inherit;}
.page{width:100%; max-width:1100px; padding:20px 16px 40px;}
header{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-bottom:18px;
}
.logo-box{display:flex; align-items:center; gap:10px;}
.logo-icon{
  width:42px;height:42px;border-radius:16px;
  background:linear-gradient(135deg,var(--rosa),var(--morado));
  display:flex;align-items:center;justify-content:center;
  font-weight:900;font-size:22px;
}
.logo-text{display:flex; flex-direction:column; gap:2px;}
.logo-text-title{font-weight:800; letter-spacing:.4px; font-size:18px;}
.logo-text-sub{font-size:11px; color:var(--gris-texto);}

.header-actions{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.badge{
  padding:4px 10px;border-radius:999px;
  border:1px solid rgba(255,255,255,0.2);
  font-size:11px;color:var(--gris-claro);
  background:rgba(10,10,35,0.35);
}
.btn-top{
  border-radius:999px; padding:8px 12px;
  border:1px solid rgba(255,255,255,0.25);
  background:rgba(10,10,35,0.55);
  color:var(--gris-claro); cursor:pointer;
  font-size:12px; font-weight:700; text-decoration:none;
  display:inline-flex; align-items:center; gap:8px;
}
.btn-top:hover{background:rgba(255,255,255,0.08);}

.hero{
  padding:18px; border-radius:var(--r1);
  background: radial-gradient(circle at top left, #392a84, #0b071f 60%);
  border:1px solid rgba(255,255,255,0.1);
  box-shadow:var(--shadow);
}
.hero-title{font-size:26px; line-height:1.25; font-weight:850; margin-bottom:10px;}
.hero-title span{
  background:linear-gradient(135deg,#ffb7e9,#f3f1ff);
  -webkit-background-clip:text; color:transparent;
}
.hero-text{font-size:13px;color:var(--gris-texto);max-width:720px;line-height:1.6;margin-bottom:14px;}
.hero-text b{color:var(--gris-claro);}

.grid-3{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px;}
@media(max-width:900px){.grid-3{grid-template-columns:1fr;}}
.card-btn{
  border-radius:18px; padding:14px;
  border:1px solid rgba(255,255,255,0.25);
  background:rgba(5,5,20,0.82);
  color:var(--gris-claro); text-align:left;
  cursor:pointer; display:flex; flex-direction:column; gap:7px;
  transition:transform .1s ease, box-shadow .1s ease, border-color .1s ease;
}
.card-btn:hover{transform:translateY(-1px); box-shadow:0 10px 30px rgba(0,0,0,0.6); border-color:rgba(255,255,255,0.5);}
.card-btn .t{font-weight:800; color:#fff; display:flex; align-items:center; justify-content:space-between; gap:10px;}
.card-btn .d{font-size:11px; color:var(--gris-texto); line-height:1.5;}
.pill{
  padding:2px 8px;border-radius:999px;
  background:rgba(91,44,255,0.18);
  border:1px solid rgba(148,124,255,0.75);
  font-size:10px; color:var(--gris-claro); white-space:nowrap;
}

.section{
  margin-top:14px;
  padding:14px;
  border-radius:18px;
  background:var(--card);
  border:1px solid var(--stroke);
}
.section-title{font-size:14px; font-weight:850; margin-bottom:6px;}
.section-sub{font-size:11px; color:var(--gris-texto); margin-bottom:10px; line-height:1.45;}

.carousel{display:flex; flex-direction:column; gap:10px;}
.carousel-frame{
  width:100%; border-radius:14px; overflow:hidden; background:#000;
  border:1px solid var(--stroke2);
  position:relative; min-height:190px;
}
.carousel-frame img{width:100%; display:block; object-fit:contain; background:#000;}
.carousel-controls{
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  font-size:11px; color:var(--gris-texto);
}
.carousel-buttons{display:flex; gap:6px; flex-wrap:wrap;}
.btn-small{
  padding:6px 10px; border-radius:999px; font-size:11px;
  border:1px solid rgba(255,255,255,0.28);
  background:rgba(10,10,30,0.9); color:#fff; cursor:pointer;
}
.btn-small:hover{background:rgba(255,255,255,0.08);}

.kpi-grid{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px;}
@media(max-width:900px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
.kpi{
  padding:12px; border-radius:16px;
  background:rgba(7,7,26,0.75);
  border:1px solid rgba(255,255,255,0.14);
}
.kpi .label{font-size:11px; color:var(--gris-texto);}
.kpi .value{font-size:18px; font-weight:900; margin-top:6px;}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.14);
}
.table th,.table td{
  padding:10px 10px;
  font-size:12px;
  border-bottom:1px solid rgba(255,255,255,0.10);
}
.table th{
  text-align:left;
  font-size:11px;
  color:var(--gris-texto);
  background:rgba(255,255,255,0.04);
}
.table tr:last-child td{border-bottom:none;}
.table td .tag{
  font-size:10px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(255,255,255,0.06);
  color:var(--gris-claro);
}

.list{
  display:flex; flex-direction:column; gap:10px;
}
.item{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:12px; border-radius:16px;
  background:rgba(7,7,26,0.7);
  border:1px solid rgba(255,255,255,0.14);
  cursor:pointer;
}
.item:hover{border-color:rgba(255,255,255,0.28);}
.item .left{display:flex; flex-direction:column; gap:2px;}
.item .name{font-weight:850;}
.item .meta{font-size:11px; color:var(--gris-texto);}
.item .amount{font-weight:900;}
.item .amount.positive{color:#bfffe9;}
.item .amount.zero{color:var(--gris-texto);}

.modal-backdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,0.55);
  display:none; align-items:center; justify-content:center;
  padding:18px;
}
.modal-backdrop.active{display:flex;}
.modal{
  width:100%; max-width:720px;
  border-radius:22px;
  background:rgba(7,7,26,0.96);
  border:1px solid rgba(255,255,255,0.16);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:14px 14px 10px;
  border-bottom:1px solid rgba(255,255,255,0.10);
}
.modal-title{font-weight:900;}
.modal-close{
  border:none; background:transparent; color:#fff; cursor:pointer; font-size:18px;
}
.modal-body{padding:14px;}
.products{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px;}
@media(max-width:900px){.products{grid-template-columns:1fr;}}
.prod{
  padding:12px; border-radius:16px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.12);
}
.prod img{width:100%; height:130px; object-fit:cover; border-radius:12px; border:1px solid rgba(255,255,255,0.08); margin-bottom:8px;}
.prod .pname{font-weight:850; margin-bottom:4px;}
.prod .pdesc{font-size:11px; color:var(--gris-texto); line-height:1.4; margin-bottom:8px;}
.prod .prow{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.prod .pcost{font-weight:900;}
.btn-primary{
  padding:7px 12px; border-radius:999px; border:none;
  background:linear-gradient(135deg,var(--rosa),var(--morado));
  color:#fff; font-weight:900; cursor:pointer; font-size:12px;
}
.btn-ghost{
  padding:7px 12px; border-radius:999px;
  border:1px solid rgba(255,255,255,0.25);
  background:rgba(255,255,255,0.06);
  color:#fff; font-weight:800; cursor:pointer; font-size:12px;
}
.btn-ghost:hover{background:rgba(255,255,255,0.10);}

.form-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
@media(max-width:700px){.form-grid{grid-template-columns:1fr;}}
.field{display:flex; flex-direction:column; gap:4px; font-size:11px; color:var(--gris-claro);}
.field input,.field textarea,.field select{
  padding:9px 10px; border-radius:12px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(4,4,20,0.95);
  color:#fff; font-size:12px; outline:none;
}
.field textarea{min-height:84px; resize:vertical;}
.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--rosa);}

.toast{
  position:fixed; right:16px; bottom:16px;
  background:rgba(8,8,30,0.95);
  border:1px solid rgba(255,255,255,0.18);
  color:#fff;
  padding:10px 12px;
  border-radius:14px;
  max-width:340px;
  box-shadow:var(--shadow);
  display:none;
  font-size:12px;
}
.toast.show{display:block; animation:pop .16s ease-out;}
@keyframes pop{from{transform:translateY(6px); opacity:0;} to{transform:translateY(0); opacity:1;}}

.footer{margin-top:18px; text-align:center; font-size:10px; color:var(--gris-texto);}
.small-note{font-size:10px; color:var(--gris-texto); margin-top:8px; line-height:1.45;}
