/* ═══════════════════════════════════════════════════════════
   KOKITO STAR · SISTEMA DE DISEÑO
   Extraído del proyecto KITS. CSS puro, sin dependencias.
   Pegar en cualquier proyecto y usar las clases directamente.
   ═══════════════════════════════════════════════════════════ */

/* ── 1. TOKENS ───────────────────────────────────────────── */
:root {
  /* Fondos */
  --color-bg:            #0a0010;   /* casi negro con tinte morado */
  --color-bg-2:          #1a0030;   /* morado oscuro, centro del fondo */

  /* Marca */
  --color-primary:       #d400ff;   /* morado neón, color principal */
  --color-secondary:     #8b00ff;   /* morado profundo */
  --color-accent:        #ff00cc;   /* magenta neón */
  --color-brand-magenta: #e4087e;   /* magenta oficial del logo */

  /* Superficies translúcidas (vidrio) */
  --color-surface:       rgba(255, 255, 255, 0.04);
  --color-surface-md:    rgba(255, 255, 255, 0.07);
  --color-surface-high:  rgba(255, 255, 255, 0.12);

  /* Texto */
  --color-text:          #ffffff;
  --color-text-muted:    rgba(255, 255, 255, 0.55);
  --color-text-subtle:   rgba(255, 255, 255, 0.35);

  /* Bordes: siempre morado translúcido, nunca gris */
  --color-border:        rgba(212, 0, 255, 0.25);
  --color-border-strong: rgba(212, 0, 255, 0.55);

  /* Estados */
  --color-success:       #22c55e;
  --color-warning:       #eab308;
  --color-danger:        #ef4444;
  --color-info:          #38bdf8;

  /* Radios */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Tipografía */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── 2. BASE ─────────────────────────────────────────────── */
/* El fondo es la firma visual: degradado radial, no plano,
   y fijo para que no se desplace al hacer scroll. */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: radial-gradient(circle at center,
              var(--color-bg-2) 0%, var(--color-bg) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── 3. TIPOGRAFÍA ───────────────────────────────────────── */
/* Todos los encabezados en negrita 700 e interlineado apretado.
   OJO: esta regla pisa cualquier clase de peso que pongas en un
   h1-h6. Para texto no-negrita usa <span> o <p>. */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }

p { line-height: 1.6; color: var(--color-text-muted); margin: 0 0 1em; }

.text-glow     { text-shadow: 0 0 24px rgba(212, 0, 255, 0.75); }
.text-primary  { color: var(--color-primary); }
.text-muted-ds { color: var(--color-text-muted); }
.text-subtle   { color: var(--color-text-subtle); }

/* ── 4. PANELES DE VIDRIO ────────────────────────────────── */
/* Tres niveles de opacidad. Todos con borde morado y desenfoque
   de lo que pasa por detrás. Es el contenedor por defecto. */
.glass {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.glass-card {
  background: var(--color-surface-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.glass-strong {
  background: var(--color-surface-high);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
}

/* Tarjeta sólida, para cuando el vidrio no contrasta bien */
.card-ds {
  background: rgba(26, 0, 48, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card-ds:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 0 20px rgba(212, 0, 255, 0.12);
}

/* Borde animado en degradado. Para destacar UNA cosa por pantalla. */
.border-shimmer {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(26,0,48,0.8), rgba(26,0,48,0.8)) padding-box,
    linear-gradient(45deg, #8b00ff, #d400ff, #ff00cc, #8b00ff) border-box;
  background-size: 300% 100%;
  animation: shimmer-border 4s linear infinite;
}
@keyframes shimmer-border {
  0%   { background-position: 0 0, 0% 50%; }
  100% { background-position: 0 0, 300% 50%; }
}

.box-glow { box-shadow: 0 0 24px rgba(212, 0, 255, 0.22); }

/* ── 5. BOTONES ──────────────────────────────────────────── */
/* Base + variante. Ejemplo: class="btn btn-primary btn-lg" */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn:hover    { transform: translateY(-1px); }
.btn:active   { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, #d400ff, #8b00ff);
  color: #fff;
  box-shadow: 0 0 16px rgba(212, 0, 255, 0.4);
}
.btn-primary:hover { box-shadow: 0 0 28px rgba(212, 0, 255, 0.65); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  box-shadow: inset 0 0 10px rgba(212, 0, 255, 0.2);
}
.btn-outline:hover {
  background: rgba(212, 0, 255, 0.1);
  box-shadow: inset 0 0 18px rgba(212, 0, 255, 0.35);
}

.btn-ghost {
  background: rgba(212, 0, 255, 0.08);
  color: var(--color-text-muted);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: rgba(212, 0, 255, 0.15); color: var(--color-primary); }

.btn-success { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; box-shadow: 0 0 12px rgba(34,197,94,0.3); }
.btn-danger  { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff; box-shadow: 0 0 12px rgba(239,68,68,0.3); }
.btn-warning { background: linear-gradient(135deg, #ca8a04, #a16207); color: #fff; box-shadow: 0 0 12px rgba(234,179,8,0.3); }
.btn-whatsapp{ background: linear-gradient(135deg, #25d366, #128c7e); color: #fff; }

/* Botón estrella: degradado en movimiento. Uno por pantalla. */
.btn-shiny {
  background: linear-gradient(110deg, #8b00ff 20%, #d400ff 40%, #ff00cc 60%, #8b00ff 80%);
  background-size: 250% 100%;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  animation: shimmer-btn 2.5s linear infinite;
  box-shadow: 0 0 20px rgba(212, 0, 255, 0.45);
}
@keyframes shimmer-btn {
  from { background-position: 200% center; }
  to   { background-position: -200% center; }
}

.btn-sm   { padding: 0.35rem 0.85rem; font-size: 0.78rem; }
.btn-lg   { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn-icon { padding: 0.5rem; border-radius: var(--radius-md); }

/* ── 6. CAMPOS DE FORMULARIO ─────────────────────────────── */
.form-input,
input[type="text"], input[type="email"], input[type="number"],
input[type="password"], input[type="search"], input[type="tel"],
textarea, select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.6rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus, .form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(212, 0, 255, 0.18);
}
input::placeholder, textarea::placeholder { color: var(--color-text-subtle); }

/* IMPORTANTE: las <option> las dibuja el sistema operativo con fondo
   blanco. Sin esta regla heredan el color blanco del <select> y el
   texto queda invisible al desplegar. */
select option,
select optgroup {
  background-color: #1a0030;
  color: #ffffff;
}
select option:checked { background-color: #2d0052; }

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

/* ── 7. INSIGNIAS ────────────────────────────────────────── */
.badge-ds {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-primary-ds { background: rgba(212,0,255,0.18); color: var(--color-primary); border: 1px solid rgba(212,0,255,0.35); }
.badge-success-ds { background: rgba(34,197,94,0.15); color: var(--color-success); border: 1px solid rgba(34,197,94,0.3); }
.badge-warning-ds { background: rgba(234,179,8,0.15); color: var(--color-warning); border: 1px solid rgba(234,179,8,0.3); }
.badge-danger-ds  { background: rgba(239,68,68,0.15); color: var(--color-danger);  border: 1px solid rgba(239,68,68,0.3); }

/* ── 8. TABLAS ───────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead tr { background: rgba(212,0,255,0.08); border-bottom: 1px solid var(--color-border); }
th {
  padding: 0.75rem 1rem; text-align: left;
  font-weight: 600; font-size: 0.78rem;
  color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(212,0,255,0.08); color: var(--color-text); }
tbody tr:hover { background: rgba(212,0,255,0.05); }
tbody tr:last-child td { border-bottom: none; }

/* ── 9. NAVEGACIÓN ───────────────────────────────────────── */
.nav-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background 0.18s, color 0.18s;
  margin-bottom: 2px;
}
.nav-item:hover  { background: rgba(212,0,255,0.12); color: var(--color-primary); }
.nav-item.active { background: rgba(212,0,255,0.2);  color: var(--color-primary); font-weight: 600; }

/* ── 10. AVISOS Y AVATARES ───────────────────────────────── */
.toast-ds {
  background: rgba(26,0,48,0.95);
  border: 1px solid var(--color-border-strong);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.25rem;
  font-size: 0.875rem;
  color: var(--color-text);
  box-shadow: 0 0 30px rgba(212,0,255,0.2);
}
.avatar-ds {
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: #fff; flex-shrink: 0;
}

/* ── 11. BARRA DE DESPLAZAMIENTO ─────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(212,0,255,0.35); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212,0,255,0.6); }
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ── 12. ANIMACIONES ─────────────────────────────────────── */
@keyframes fade-in      { from { opacity:0; transform:translateY(8px);  } to { opacity:1; transform:translateY(0); } }
@keyframes slide-up     { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse-glow   { 0%,100% { box-shadow:0 0 14px rgba(212,0,255,0.35); } 50% { box-shadow:0 0 30px rgba(212,0,255,0.70); } }
@keyframes bounce-soft  { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-10px); } }
@keyframes spin-slow    { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }

.fade-in             { animation: fade-in 0.35s ease; }
.animate-slide-up    { animation: slide-up 0.5s ease-out; }
.pulse-glow          { animation: pulse-glow 2.5s ease-in-out infinite; }
.animate-bounce-soft { animation: bounce-soft 1s ease-in-out; }
.animate-spin-slow   { animation: spin-slow 3s linear infinite; }

/* ── 13. ELEMENTOS SELECCIONABLES ────────────────────────── */
/* Se elevan al pasar por encima; al quedar elegidos, laten. */
.motif-item, .color-option { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.motif-item:hover, .color-option:hover { transform: translateY(-2px) scale(1.05); }
.motif-item.selected, .color-option.selected {
  transform: translateY(-1px);
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ── 14. BOTÓN FLOTANTE DE WHATSAPP ──────────────────────── */
.whatsapp-btn {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 3.25rem; height: 3.25rem; border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  cursor: pointer; z-index: 999; text-decoration: none;
  transition: transform 0.2s;
}
.whatsapp-btn:hover { transform: scale(1.1); }
