* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f6fb;
  color: #111827;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* SETUP / LOGIN */
.setup-screen,
.login-screen {
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.setup-card,
.login-card {
  width: 100%;
  max-width: 460px;
  background: white;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 25px 70px rgba(0,0,0,.25);
}

.setup-card h1,
.login-card h1 {
  margin: 0;
  font-size: 34px;
}

.subtitle,
.login-card p {
  color: #64748b;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 22px 0;
}

.step-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.step-dot.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
}

.setup-step {
  display: none;
}

.setup-step.active {
  display: block;
}

input,
select {
  width: 100%;
  padding: 15px;
  margin: 9px 0;
  border-radius: 14px;
  border: 1px solid #dbe3ef;
  font-size: 16px;
  background: white;
}

.setup-card button,
.login-card button {
  width: 100%;
  padding: 15px;
  margin-top: 10px;
  border-radius: 14px;
  background: #2563eb;
  color: white;
  font-size: 16px;
  font-weight: 800;
}

.setup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.secondary {
  background: #e5e7eb !important;
  color: #111827 !important;
}

.error {
  color: #dc2626 !important;
  font-weight: 700;
}

/* APP */
.app-screen {
  display: none;
  min-height: 100vh;
  background: #f3f6fb;
}

/* SIDEBAR */
aside {
  width: 280px;
  min-height: 100vh;
  background: linear-gradient(180deg, #020617, #0f172a);
  color: white;
  padding: 26px 18px;
  position: sticky;
  top: 0;
}

aside h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 900;
}

#usuarioActivo {
  display: block;
  margin-top: 6px;
  margin-bottom: 24px;
  color: #cbd5e1;
  font-size: 15px;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

nav button {
  width: 100%;
  text-align: left;
  padding: 15px 16px;
  border-radius: 14px;
  background: transparent;
  color: #dbeafe;
  font-size: 16px;
  font-weight: 700;
  transition: .2s;
}

nav button:hover {
  background: rgba(255,255,255,.10);
}

nav button:first-child {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
}

.logout {
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dc2626, #e11d48) !important;
  color: white;
  font-size: 16px;
  font-weight: 800;
}

/* MAIN */
main {
  flex: 1;
  padding: 34px;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.section h1 {
  margin: 0 0 8px;
  font-size: 42px;
  font-weight: 900;
}

.section p {
  color: #64748b;
  font-size: 18px;
}

/* CARDS */
.summary-item {
  background: white;
  padding: 20px;
  border-radius: 18px;
  margin-bottom: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
  font-size: 18px;
}

.danger {
  width: 100%;
  padding: 17px;
  border-radius: 16px;
  background: #dc2626;
  color: white;
  font-size: 18px;
  font-weight: 900;
}

/* MOBILE */
@media (max-width: 768px) {
  .app-screen {
    flex-direction: column;
  }

  aside {
    width: 100%;
    min-height: auto;
    position: relative;
    padding: 26px 22px;
    border-radius: 0 0 30px 30px;
  }

  aside h2 {
    font-size: 34px;
  }

  nav {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    padding: 14px;
    border-radius: 22px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  nav button {
    text-align: center;
    padding: 16px 10px;
    border-radius: 16px;
    background: #2563eb;
    color: white;
    font-size: 16px;
  }

  nav button:first-child {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
  }

  .logout {
    margin-top: 16px;
    border-radius: 18px;
  }

  main {
    padding: 28px 18px;
  }

  .section.active {
    background: white;
    padding: 24px;
    border-radius: 26px;
    box-shadow: 0 20px 45px rgba(15,23,42,.08);
  }

  .section h1 {
    font-size: 34px;
  }
}

/* Mejorar opciones de configuración */
#preguntasNegocio {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

#preguntasNegocio label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 600;
  color: #111827;
  box-sizing: border-box;
}

#preguntasNegocio input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: #2563eb;
  flex-shrink: 0;
}

#preguntasNegocio label:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

@media (max-width: 600px) {
  #preguntasNegocio label {
    font-size: 16px;
    padding: 15px 16px;
  }

  #preguntasNegocio input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }
}

/* Dashboard moderno */
.page-subtitle {
  color: #64748b;
  font-size: 18px;
  margin-top: -10px;
  margin-bottom: 26px;
}

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

.stat-card {
  color: white;
  padding: 24px;
  border-radius: 22px;
  min-height: 130px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.stat-card span {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.stat-card strong {
  display: block;
  font-size: 30px;
  margin-bottom: 8px;
}

.stat-card small {
  opacity: .9;
}

.stat-card.blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.stat-card.green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card.purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.stat-card.orange { background: linear-gradient(135deg, #f97316, #ea580c); }

.quick-panel,
.panel-card,
.info-banner {
  background: white;
  border-radius: 22px;
  padding: 24px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
  margin-bottom: 24px;
}

.quick-panel h2,
.panel-card h2 {
  margin-top: 0;
  margin-bottom: 18px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.quick-grid button {
  background: #f8fafc;
  color: #111827;
  border: 1px solid #e5e7eb;
  padding: 20px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 800;
  text-align: left;
}

.quick-grid button:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #e5e7eb;
}

.list-row:last-child {
  border-bottom: none;
}

.list-row strong {
  color: #16a34a;
}

.info-banner {
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  color: #1e293b;
}

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

  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

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