/* ============================================================
   GRUPO J&S — Feedback System CSS
   Línea gráfica: Negro/Rojo/Blanco + Glassmorphism
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:        #000;
  --white:        #fff;
  --red:          #FF2B2B;
  --red-soft:     #ff4444;
  --red-dim:      rgba(255,43,43,.10);
  --red-glow:     rgba(255,43,43,.32);
  --red-border:   rgba(255,43,43,.22);
  --glass:        rgba(255,255,255,.04);
  --glass-md:     rgba(255,255,255,.07);
  --glass-border: rgba(255,255,255,.08);
  --muted:        rgba(255,255,255,.45);
  --muted-light:  rgba(255,255,255,.25);
  --subtle:       rgba(255,255,255,.06);
  --green:        #25D366;
  --yellow:       #FFD600;
  --blue:         #3B82F6;
  --surface:      #0a0a0a;
  --surface2:     #111;
}

html { scroll-behavior: smooth; }
body {
  background: #000;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 2px; }

/* ── Noise texture ─────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: .3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ── Typography ────────────────────────────────────────────── */
.font-syne { font-family: 'Syne', sans-serif; }
h1,h2,h3,h4 { font-family: 'Syne', sans-serif; font-weight: 800; letter-spacing: -.5px; }

/* ── Grid background ───────────────────────────────────────── */
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
}

/* ── Glow ambient ──────────────────────────────────────────── */
.hero-ambient {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(255,43,43,.07) 0%, transparent 68%);
}

/* ── Section label ─────────────────────────────────────────── */
.s-label {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px;
}

/* ── Glass cards ───────────────────────────────────────────── */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative; overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
}

/* ── Botones ───────────────────────────────────────────────── */
.btn-red {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--red); color: #fff;
  padding: 14px 32px; border-radius: 100px;
  font-size: 15px; font-weight: 500; font-family: 'DM Sans', sans-serif;
  border: none; cursor: pointer; text-decoration: none;
  transition: transform .25s, box-shadow .25s;
  position: relative; overflow: hidden;
}
.btn-red::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.16), transparent);
  opacity: 0; transition: opacity .2s;
}
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 16px 40px var(--red-glow); color: #fff; }
.btn-red:hover::before { opacity: 1; }
.btn-red:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--muted);
  padding: 10px 22px; border-radius: 100px;
  font-size: 13px; font-weight: 500; font-family: 'DM Sans', sans-serif;
  border: 1px solid var(--glass-border); cursor: pointer;
  text-decoration: none; transition: all .25s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,.22); background: var(--subtle); color: #fff; }

.btn-sm {
  padding: 6px 16px !important;
  font-size: 12px !important;
  border-radius: 100px !important;
}

/* ── Formulario base ───────────────────────────────────────── */
.form-label-custom {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-light); display: block; margin-bottom: 8px;
}

.input-custom {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 13px 18px;
  color: #fff; font-size: 15px;
  font-family: 'DM Sans', sans-serif; font-weight: 300;
  outline: none; width: 100%;
  transition: border-color .25s, background .25s, box-shadow .25s;
  -webkit-appearance: none; appearance: none;
}
.input-custom::placeholder { color: rgba(255,255,255,.2); }
.input-custom:focus {
  border-color: var(--red);
  background: rgba(255,43,43,.04);
  box-shadow: 0 0 0 3px rgba(255,43,43,.09);
}
.input-custom:hover:not(:focus) {
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
}

textarea.input-custom { resize: none; min-height: 110px; line-height: 1.62; }

select.input-custom { cursor: pointer; }
select.input-custom option { background: #111; color: #fff; }

/* ── Star rating ───────────────────────────────────────────── */
.star-row { display: flex; flex-direction: row-reverse; gap: 4px; justify-content: flex-end; }
.star-row input[type="radio"] { display: none; }
.star-row label {
  font-size: 26px; color: rgba(255,255,255,.18); cursor: pointer;
  transition: color .15s, transform .15s;
  line-height: 1;
}
.star-row label:hover,
.star-row label:hover ~ label,
.star-row input[type="radio"]:checked ~ label { color: var(--yellow); }
.star-row label:hover { transform: scale(1.15); }

/* ── NPS Bar ───────────────────────────────────────────────── */
.nps-bar { display: flex; gap: 4px; flex-wrap: wrap; }
.nps-btn {
  width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass); color: var(--muted);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .2s; display: flex; align-items: center; justify-content: center;
  font-family: 'DM Sans', sans-serif;
}
.nps-btn:hover { border-color: var(--red); color: #fff; }
.nps-btn.active { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 16px var(--red-glow); }
.nps-btn.p { background: rgba(37,211,102,.15); border-color: rgba(37,211,102,.4); color: #25D366; }
.nps-btn.n { background: rgba(255,43,43,.15); border-color: rgba(255,43,43,.4); color: var(--red); }

/* ── Progress steps ────────────────────────────────────────── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 40px; }
.step-item { display: flex; align-items: center; flex: 1; }
.step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--glass-border);
  background: var(--glass); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  transition: all .3s;
}
.step-circle.active { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 14px var(--red-glow); }
.step-circle.done { background: rgba(37,211,102,.2); border-color: var(--green); color: var(--green); }
.step-line { flex: 1; height: 1px; background: var(--glass-border); margin: 0 8px; }
.step-line.done { background: var(--green); }
.step-label { font-size: 10px; color: var(--muted); text-align: center; margin-top: 6px; letter-spacing: .05em; white-space: nowrap; }

/* ── Navber admin ──────────────────────────────────────────── */
.admin-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--glass-border);
  padding: 14px 5%;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-nav-logo { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: #fff; text-decoration: none; }
.admin-nav-logo span { color: var(--red); }
.admin-nav-links { display: flex; gap: 4px; }
.nav-link-item {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 100px;
  color: var(--muted); text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: all .2s;
}
.nav-link-item:hover { background: var(--subtle); color: #fff; }
.nav-link-item.active { background: var(--red-dim); color: #fff; border: 1px solid var(--red-border); }
.nav-link-item svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── KPI cards ─────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.kpi-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 16px; padding: 22px 20px;
  position: relative; overflow: hidden;
  transition: border-color .25s;
}
.kpi-card:hover { border-color: rgba(255,255,255,.16); }
.kpi-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--accent, var(--red));
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s ease;
}
.kpi-card:hover::after { transform: scaleX(1); }
.kpi-icon { font-size: 22px; margin-bottom: 10px; }
.kpi-value { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.kpi-label { color: var(--muted); font-size: 12px; margin-top: 5px; font-weight: 300; }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--glass-border); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  padding: 13px 16px; text-align: left;
  font-size: 10px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted); background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}
tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle; color: rgba(255,255,255,.8);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,.025); }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; white-space: nowrap;
}
.badge-red    { background: rgba(255,43,43,.15); color: var(--red); border: 1px solid var(--red-border); }
.badge-green  { background: rgba(37,211,102,.12); color: #25D366; border: 1px solid rgba(37,211,102,.3); }
.badge-yellow { background: rgba(255,214,0,.12); color: #FFD600; border: 1px solid rgba(255,214,0,.3); }
.badge-blue   { background: rgba(59,130,246,.12); color: #60a5fa; border: 1px solid rgba(59,130,246,.3); }
.badge-gray   { background: var(--glass); color: var(--muted); border: 1px solid var(--glass-border); }

/* ── Stars display ─────────────────────────────────────────── */
.stars-display { color: var(--yellow); font-size: 14px; letter-spacing: 1px; }

/* ── Sidebar admin mobile ──────────────────────────────────── */
@media (max-width: 768px) {
  .admin-nav-links { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .nps-btn { width: 36px; height: 36px; font-size: 12px; }
}

/* ── Reveal animations ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; } .reveal-d4 { transition-delay: .32s; }

/* ── Login page ────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px; position: relative;
}
.login-card { width: 100%; max-width: 420px; padding: 48px; }

/* ── Misc ──────────────────────────────────────────────────── */
.dot-red   { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red-glow); }
.dot-green { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.dot-yellow{ display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }

.section-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--glass-border), transparent); margin: 36px 0; }

.chart-wrap { position: relative; height: 260px; }

/* ── Filters bar ───────────────────────────────────────────── */
.filters-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.filters-bar .input-custom { max-width: 180px; padding: 9px 14px; font-size: 13px; }

/* ── Page header ───────────────────────────────────────────── */
.page-header { padding: 32px 5% 0; }
.page-header h1 { font-size: clamp(22px,3.5vw,34px); font-weight: 800; letter-spacing: -1px; }
.page-content { padding: 28px 5% 60px; }
