/* ============================================================
   Club ONTA BEBE — Portal Cliente (Mobile-First)
   ============================================================ */

:root {
  --onta-primary:   #5BA4CF;
  --onta-secondary: #F48FB1;
  --onta-light-bg:  #f0f7fb;
  --onta-text:      #2c3e50;
  --onta-gold:      #ffc107;
}

* { box-sizing: border-box; }

body {
  font-family: 'Nunito', sans-serif;
  background-color: #f5f8fc;
  color: var(--onta-text);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* ---- Topbar cliente ---- */
.client-topbar {
  background: linear-gradient(135deg, #1a3a5c 0%, #2c6fad 100%);
  color: #fff;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.client-topbar .brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.client-topbar .user-name {
  font-size: 0.8rem;
  opacity: 0.85;
}

/* ---- Bottom nav (mobile) ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e0e7ef;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #aaa;
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 700;
  flex: 1;
  padding: 4px 0;
  transition: color 0.2s;
}

.bottom-nav a i {
  font-size: 1.3rem;
}

.bottom-nav a.active,
.bottom-nav a:hover {
  color: var(--onta-primary);
}

/* ---- Main content area (con espacio para bottom-nav) ---- */
.client-body {
  padding: 1rem;
  padding-bottom: 80px;
  max-width: 520px;
  margin: 0 auto;
}

/* ---- Hero card (puntos + nivel) ---- */
.points-hero {
  background: linear-gradient(135deg, #1a3a5c 0%, #2c6fad 100%);
  border-radius: 20px;
  color: #fff;
  padding: 1.8rem 1.5rem;
  margin-bottom: 1.2rem;
  position: relative;
  overflow: hidden;
}

.points-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.points-hero .pts-label {
  font-size: 0.8rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.points-hero .pts-number {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}

.points-hero .pts-sub {
  font-size: 0.8rem;
  opacity: 0.7;
}

.tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 30px;
  padding: 4px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  backdrop-filter: blur(4px);
}

/* ---- Progress bar de nivel ---- */
.tier-progress {
  margin-top: 1rem;
}

.tier-progress-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.2);
  overflow: hidden;
}

.tier-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #F48FB1, #ffc107);
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* ---- Cards generales ---- */
.client-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border: 1px solid #e8edf3;
}

.client-card .card-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--onta-text);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.client-card .card-title i {
  color: var(--onta-primary);
}

/* ---- Transacciones ---- */
.tx-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f2f5;
}

.tx-item:last-child { border-bottom: none; }

.tx-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tx-icon.positive { background: #e8f8ed; color: #28a745; }
.tx-icon.negative { background: #fde8e8; color: #dc3545; }

.tx-desc {
  flex: 1;
  min-width: 0;
}

.tx-desc .tx-name {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-desc .tx-date {
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 2px;
}

.tx-pts {
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
}

.tx-pts.positive { color: #28a745; }
.tx-pts.negative { color: #dc3545; }

/* ---- Recompensas ---- */
.reward-card {
  background: #fff;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 0.8rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #e8edf3;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.reward-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e8f4fb, #d0e9f5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  color: var(--onta-primary);
}

.reward-icon.cupon {
  background: linear-gradient(135deg, #fce4ec, #f8bbd9);
  color: #c2185b;
}

.reward-info { flex: 1; min-width: 0; }

.reward-name {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.reward-pts {
  font-size: 0.8rem;
  color: var(--onta-primary);
  font-weight: 700;
}

.btn-redeem {
  background: linear-gradient(135deg, var(--onta-primary), #4a8fc0);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-redeem:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(91,164,207,0.3); }
.btn-redeem:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- Formularios cliente ---- */
.client-form {
  max-width: 420px;
  margin: 0 auto;
}

.client-login-box {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(160deg, #e8f4fb 0%, #fce4ec 100%);
}

.client-login-card {
  background: #fff;
  border-radius: 24px;
  padding: 2rem 1.8rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
}

.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo img {
  max-width: 100px;
  height: auto;
}

.login-logo h2 {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--onta-text);
  margin-top: 0.5rem;
}

.login-logo p {
  font-size: 0.85rem;
  color: #888;
  margin: 0;
}

.form-control-client {
  border-radius: 12px;
  border: 2px solid #e8edf3;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  font-family: 'Nunito', sans-serif;
  width: 100%;
  transition: border-color 0.2s;
}

.form-control-client:focus {
  border-color: var(--onta-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(91,164,207,0.15);
}

.btn-primary-client {
  background: linear-gradient(135deg, #1a3a5c, #2c6fad);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.85rem;
  font-size: 1rem;
  font-weight: 800;
  width: 100%;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary-client:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(44,111,173,0.3);
}

/* ---- Encuestas ---- */
.survey-option {
  display: block;
  padding: 0.75rem 1rem;
  border: 2px solid #e8edf3;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.9rem;
  font-weight: 600;
}

.survey-option:hover { border-color: var(--onta-primary); background: #f0f7fb; }
.survey-option input { margin-right: 8px; }

/* ---- Scale 1-5 ---- */
.scale-opts {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.scale-opt {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  border: 2px solid #e8edf3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}

.scale-opt:hover,
.scale-opt.selected { border-color: var(--onta-primary); background: #e8f4fb; color: var(--onta-primary); }

/* ---- Alert ---- */
.client-alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-alert.success { background: #e8f8ed; color: #1a7a3a; border: 1px solid #b7e4c7; }
.client-alert.danger  { background: #fde8e8; color: #9b1c1c; border: 1px solid #f5b7b1; }
.client-alert.info    { background: #e8f4fb; color: #1a5276; border: 1px solid #a9cce3; }

/* ---- Banners publicitarios ---- */
.banners-section {
  margin-bottom: 1rem;
}

.banner-item {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.banner-item:last-child {
  margin-bottom: 0;
}

a.banner-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.13);
}

.banner-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- Children list ---- */
.child-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #f0f2f5;
}

.child-item:last-child { border-bottom: none; }

.child-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fce4ec, #e1f5fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.child-info { flex: 1; }
.child-name { font-size: 0.88rem; font-weight: 700; }
.child-bday { font-size: 0.75rem; color: #888; }
