﻿/* =============================================
   SUPLEVET DESIGN SYSTEM — Reference-Faithful
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #1E3A5F;
  --navy-dark:   #142840;
  --orange:      #F08C4B;
  --orange-dark: #C96E2A;
  --teal:        #2C7A82;
  --teal-light:  #A8DDE3;
  --teal-mid:    #5BBAC3;
  --surface:     #F2F0EC;
  --surface-low: #E8E5DF;
  --card:        #FFFFFF;
  --text:        #18202E;
  --muted:       #6B7385;
  --border:      rgba(30,58,95,0.08);
  --sidebar-w:   240px;
  --radius-lg:   20px;
  --radius-md:   14px;
  --radius-sm:   10px;

  /* Gradient palette */
  --grad-orange:  linear-gradient(135deg, #F08C4B 0%, #E06830 100%);
  --grad-teal:    linear-gradient(135deg, #2C7A82 0%, #1a5560 100%);
  --grad-navy:    linear-gradient(135deg, #1E3A5F 0%, #142840 60%, #1a5560 100%);
  --grad-warm:    linear-gradient(135deg, #FFF5EC 0%, #FDEBD0 100%);
  --grad-cool:    linear-gradient(135deg, #E8F6F8 0%, #C8E9ED 100%);
  --grad-glass:   linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  --shadow-card:  0 2px 12px rgba(30,58,95,0.08), 0 1px 3px rgba(30,58,95,0.05);
  --shadow-float: 0 8px 32px rgba(30,58,95,0.14), 0 2px 8px rgba(30,58,95,0.08);
  --shadow-hero:  0 20px 60px rgba(30,58,95,0.2);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #EDEAE4;
  background-image:
    radial-gradient(ellipse 80% 60% at 80% -10%, rgba(168,221,227,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(240,140,75,0.08) 0%, transparent 50%);
  color: var(--text);
  min-height: 100vh;
}
button { font-family: inherit; }

/* Icon aliases — support both class names */
.material-symbols-rounded,
.material-symbols-outlined {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  vertical-align: middle;
  user-select: none;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: rgba(37,60,97,0.18); border-radius: 99px; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp  { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes fillBar { from { width:0; } }
@keyframes float   { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-5px);} }
@keyframes confetti-fall { 0%{transform:translateY(0) rotate(0);opacity:1;} 100%{transform:translateY(440px) rotate(720deg);opacity:0;} }
@keyframes spin    { to { transform: rotate(360deg); } }

/* ===== BUTTONS ===== */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 99px;
  border: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  text-decoration: none;
}
.btn-orange, .btn-primary {
  background: linear-gradient(135deg, #F08C4B 0%, #D96A28 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(240,140,75,.32);
  border-radius: var(--radius-md);
  border: none;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; font-weight: 700; font-size: 13px;
  cursor: pointer; transition: all .18s cubic-bezier(.34,1.56,.64,1);
  font-family: inherit; text-decoration: none;
}
.btn-orange:hover, .btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(240,140,75,.44);
}
.btn-orange:active, .btn-primary:active { transform: scale(.97); }
.btn-ghost {
  background: rgba(30,58,95,.07);
  color: var(--navy);
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(30,58,95,.1);
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; font-weight: 600; font-size: 13px;
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.btn-ghost:hover { background: rgba(30,58,95,.12); border-color: rgba(30,58,95,.2); }

/* ── Buttons: fully clickable, no overlay issues ── */
button {
  position: relative;
  cursor: pointer;
}
/* Modal layout: footer always visible, body scrolls */
.modal-card {
  display: flex !important;
  flex-direction: column;
}
.modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.modal-footer {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.modal-card::before { pointer-events: none; flex-shrink: 0; }

/* ===== CARDS ===== */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(30,58,95,.06);
  padding: 18px;
  box-shadow: 0 2px 12px rgba(30,58,95,.07), 0 1px 3px rgba(30,58,95,.04);
  transition: box-shadow .22s, transform .22s;
}
.card:hover { box-shadow: 0 8px 28px rgba(30,58,95,.12), 0 2px 8px rgba(30,58,95,.06); }
.card-navy {
  background: linear-gradient(135deg, #1E3A5F 0%, #142840 60%, #17445a 100%);
  border: none;
  box-shadow: 0 10px 36px rgba(14,40,64,.22);
}
.card-glass {
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(30,58,95,.07);
}

/* ===== FORM ELEMENTS ===== */
/* Legacy aliases */
.label-field { display:block;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.07em;margin-bottom:6px; }
.input-field { width:100%;padding:11px 14px;border-radius:10px;border:1.5px solid rgba(37,60,97,.15);font-size:13px;font-family:inherit;color:var(--text);background:#ffffff;transition:border-color .15s,box-shadow .15s;outline:none; }
.input-field:focus { border-color:var(--orange);box-shadow:0 0 0 3px rgba(234,140,67,.12); }
.input-field::placeholder { color:#b0aaa2; }
textarea.input-field { resize:vertical; }

/* ===== NIVEL BADGES ===== */
.nivel-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 11px; border-radius: 99px;
  font-size: 10px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  box-shadow: 0 1px 4px rgba(194, 175, 175, 0.08);
}
.nivel-basico  { background: rgba(91,186,195,.18); color: #ffffff; border: 1px solid #99D3DA; }
.nivel-silver  { background: linear-gradient(135deg,#dce5ef,#c8d4e0); color: #2d4460; border: 1px solid rgba(180,195,212,.4); }
.nivel-gold    { background: linear-gradient(135deg,#FFD166,#F4B942); color: #5C3A00; border: 1px solid rgba(244,185,66,.35); box-shadow: 0 2px 8px rgba(244,185,66,.25); }
.nivel-diamond { background: linear-gradient(135deg,#A8DDE3,#7ECAD3); color: #124a52; border: 1px solid rgba(94,186,197,.35); }

/* ===== TOAST ===== */
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1E3A5F;
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border-left: 3px solid #F08C4B;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  opacity: 0;
  transition: opacity .3s, transform .3s;
  z-index: 9999;
  white-space: nowrap;
  max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== SPLASH ===== */
#splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#splash .bg-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: 0;
}
#splash .orb1 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(37,60,97,0.35), transparent); top: -100px; right: -80px; }
#splash .orb2 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(234,140,67,0.25), transparent); bottom: -80px; left: -80px; }
#splash .orb3 { width: 320px; height: 320px; background: radial-gradient(circle, rgba(43,103,109,0.5), transparent); top: 50%; left: 50%; transform: translate(-50%,-50%); }
.splash-content { text-align: center; position: relative; z-index: 2; }
.splash-logo { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; opacity: 0; transform: scale(0.6); }
.splash-title { font-family: 'Fraunces', serif; font-size: 3.2rem; font-weight: 600; color: var(--navy); opacity: 0; transform: translateY(16px); margin-bottom: 6px; }
.splash-sub { font-size: 11px; color: rgba(37,60,97,0.55); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; opacity: 0; margin-bottom: 2.5rem; }
.splash-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  box-shadow: 0 10px 36px rgba(37,60,97,0.35);
  transition: transform .2s, box-shadow .2s;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.splash-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 44px rgba(37,60,97,0.45); }

/* ===== LOGIN ===== */
#login-screen {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: linear-gradient(145deg, var(--navy) 0%, #1e3a5f 40%, var(--teal) 100%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
#login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
#login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255,255,255,0.97);
  border-radius: 28px;
  padding: 2.5rem;
  box-shadow: 0 36px 80px rgba(0,0,0,0.28);
  position: relative;
  z-index: 2;
  opacity: 1;
  transform: translateY(0) scale(1);
  min-height: 200px;
}
.login-logo { text-align: center; margin-bottom: 1.5rem; }
.login-logo h1 { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 600; color: var(--navy); margin-top: 8px; }
.login-logo p { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; margin-top: 2px; }
.login-form-group { margin-bottom: 14px; }
.login-link { background: none; border: none; color: var(--orange); font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; padding: 0; }
.login-link:hover { text-decoration: underline; }

/* ===== OTP BOXES ===== */
.otp-boxes { display: flex; gap: 10px; justify-content: center; margin: 22px 0 8px; }
.otp-box {
  width: 46px; height: 56px; border: 2px solid rgba(37,60,97,.18); border-radius: 14px;
  text-align: center; font-size: 24px; font-weight: 700; font-family: 'DM Sans', sans-serif;
  color: var(--navy); background: #f8f7f5; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  caret-color: var(--orange);
}
.otp-box:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240,140,75,.15); background: #fff; }
.otp-box.filled { border-color: var(--teal); background: #f0fafb; }
.otp-step-back { background: none; border: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; padding: 0; display: flex; align-items: center; gap: 4px; margin-bottom: 18px; }
.otp-step-back:hover { color: var(--navy); }
.otp-timer { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.otp-resend-btn { background: none; border: none; color: var(--orange); font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; padding: 0; display: block; margin: 10px auto 0; }
.otp-resend-btn:hover { text-decoration: underline; }

/* ═══ WIZARD MASCOTA ═══ */
.m-especie-btn {
  display:flex; flex-direction:column; align-items:center; gap:7px;
  padding:16px 8px; border:2.5px solid rgba(37,60,97,0.1);
  border-radius:18px; background:var(--surface-low);
  cursor:pointer; font-family:inherit; font-size:12.5px;
  font-weight:700; color:var(--muted); transition:all .2s;
  width:100%;
}
.m-especie-btn .me-icon { font-size:2.2rem; line-height:1; }
.m-especie-btn.active {
  border-color:var(--orange); background:#fff8f2; color:var(--navy);
  box-shadow:0 4px 14px rgba(234,140,67,.18);
}
.m-especie-btn:hover:not(.active) { border-color:rgba(37,60,97,.22); }

.m-genero-btn {
  padding:11px 0; border:2px solid rgba(37,60,97,0.12);
  border-radius:13px; background:var(--surface-low);
  cursor:pointer; font-family:inherit; font-size:13.5px;
  font-weight:700; color:var(--muted); transition:all .2s; width:100%;
}
.m-genero-btn.active { border-color:var(--teal); background:#f0fafb; color:var(--teal); }
.m-genero-btn:hover:not(.active) { border-color:rgba(37,60,97,.22); }

.m-wizard-header {
  padding:22px 22px 18px; position:relative;
}
.m-step-dots { display:flex; gap:6px; justify-content:center; margin-top:12px; }
.m-step-dot {
  width:7px; height:7px; border-radius:99px;
  background:rgba(255,255,255,0.28); transition:all .3s;
}
.m-step-dot.active { width:22px; background:#fff; }

/* ===== APP SHELL ===== */
#app { display: none; min-height: 100vh; }
#app.active-app { display: flex; flex-direction: row; }

/* ===== SIDEBAR ===== */
/* ===== SIDEBAR — Modern Gradient ===== */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #1E3A5F;
  color: #fff;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(12,30,50,0.18);
}
/* Remove overlay */
#sidebar::after { display: none; }
#sidebar > * { position: relative; z-index: 1; }
/* Top brand strip */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  background: linear-gradient(135deg, rgba(234,140,67,0.12), rgba(153,211,218,0.06));
  border-bottom: 1px solid rgba(153,211,218,0.1);
  margin-bottom: 0;
}
.sidebar-brand-text .name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 2.5px;
  line-height: 1;
  background: linear-gradient(90deg, #fff 40%, #99D3DA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-brand-text .sub {
  font-size: 8.5px;
  color: rgba(153,211,218,0.6);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 1px;
}
/* User card */
.sidebar-user {
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(153,211,218,0.08);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .15s;
}
.sidebar-user:hover { background: rgba(255,255,255,0.07); }
.sidebar-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #fff;
  flex-shrink: 0; overflow: hidden; position: relative;
  box-shadow: 0 0 0 2px rgba(153,211,218,0.3);
}
#sb-foto { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.sidebar-user-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Nav items */
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 4px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; cursor: pointer;
  color: rgba(255,255,255,0.55); font-size: 12.5px; font-weight: 500;
  border: none; background: transparent; text-align: left;
  font-family: inherit; width: 100%; position: relative;
  transition: all .15s; border-left: 2px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(234,140,67,0.18), rgba(234,140,67,0.04));
  color: #EA8C43; font-weight: 700; border-left-color: #EA8C43;
}
.nav-item .material-symbols-rounded { font-size: 17px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto; font-size: 9px; padding: 2px 7px; border-radius: 99px;
  background: var(--orange); color: #fff; font-weight: 800;
}
/* Sidebar section separator label */
.sb-section-label {
  font-size: 9px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: rgba(153,211,218,0.45);
  padding: 10px 12px 4px; margin-top: 4px;
}
.sidebar-footer {
  padding: 10px 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 4px;
}
.sidebar-logout {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: 10px; color: rgba(255,255,255,0.35); font-size: 12px;
  cursor: pointer; transition: all .15s; border: none;
  background: transparent; font-family: inherit; width: 100%; text-align: left;
}
.sidebar-logout:hover { color: #EA8C43; background: rgba(234,140,67,0.08); }

/* ===== MODALS — Reference Style ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(10,18,36,0.55);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 500; padding: 1rem;
}
.modal.open { display: flex; }

.modal-card {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.06);
  max-height: 94vh;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(37,60,97,0.06);
}

/* Coloured top stripe */
.modal-card::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--teal-light) 100%);
  border-radius: 20px 20px 0 0;
  flex-shrink: 0;
}

/* Header area: icon + title block + close */
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 0;
  margin-bottom: 0;
}
.modal-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-bottom: 14px;
  font-size: 22px;
  background: linear-gradient(135deg, var(--surface-low), #e8e4de);
}
.modal-title { font-family: 'Fraunces', serif; font-size: 1.25rem; color: var(--navy); font-weight: 600; line-height: 1.2; }
.modal-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 400; }

.modal-close {
  background: var(--surface-low); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .15s; margin-top: -2px;
  color: var(--muted);
}
.modal-close:hover { background: #ddd; }

/* Form body */
.modal-body { padding: 16px 22px 22px; }

/* Divider between header and body */
.modal-divider {
  height: 1px; background: rgba(37,60,97,0.07);
  margin: 14px 22px 0;
}

/* Field group inside modal */
.mfield { margin-bottom: 14px; }
.mfield .label { margin-bottom: 5px; }
.mfield .input { background: #ffffff; border-color: rgba(37,60,97,.15); border-radius: 10px; }
.mfield .input:focus { background: #fff; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240,140,75,.12); }

/* 2-col grid helper */
.mgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Modal footer buttons */
.modal-footer {
  display: flex; gap: 10px;
  padding: 0 22px 22px;
  justify-content: flex-end;
}
.modal-footer .btn-ghost { padding: 10px 22px; border-radius: 10px; }
.modal-footer .btn-primary { padding: 10px 28px; border-radius: 10px; }


/* ===== MAIN CONTENT ===== */
#main-content {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  background: var(--surface);
}

/* ===== SECTIONS ===== */
.section { display: none; padding: 28px 36px; max-width: 1140px; }
.section.active { display: block; animation: fadeUp .4s cubic-bezier(.22,.61,.36,1); }

.section-header { margin-bottom: 24px; }
.section-header::before {
  content: '';
  display: inline-block;
  width: 28px; height: 3px;
  background: var(--grad-orange);
  border-radius: 99px;
  margin-bottom: 10px;
  display: block;
}
.section-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 32px; font-weight: 600;
  color: var(--navy); letter-spacing: -.6px; line-height: 1.1;
}
.section-header p { font-size: 13.5px; color: var(--teal); font-weight: 500; margin-top: 5px; }

/* Section header row (with action button) */
.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

/* ===== SUBLEPOINTS SECTION ===== */
.pts-hero-card {
  background: linear-gradient(135deg, #253C61 0%, #1a3050 60%, #2b676d 100%);
  border-radius: 20px;
  padding: 22px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.pts-hero-card::before {
  content: '🐾';
  position: absolute;
  top: -30px;
  right: -20px;
  font-size: 200px;
  opacity: 0.05;
  pointer-events: none;
}
.pts-ring-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  flex-shrink: 0;
}
.pts-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.pts-display-num {
  font-family: 'Fraunces', serif;
  font-size: 42px;
  font-weight: 600;
  line-height: 1;
  margin-top: 4px;
}
.pts-hero-info { flex: 1; min-width: 0; }

/* Niveles card */
.nivel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 11px;
  margin-bottom: 5px;
  border: 1.5px solid transparent;
  transition: all .2s;
}
.nivel-item.current {
  background: rgba(234,140,67,0.08);
  border-color: rgba(234,140,67,0.28);
}
.nivel-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

/* Earn methods */
.earn-item {
  background: #fff;
  border: 1px solid rgba(37,60,97,0.08);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all .22s cubic-bezier(.34,1.56,.64,1);
}
.earn-item:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(37,60,97,.10); border-color: rgba(37,60,97,.15); }

/* Canje cards (dynamically rendered by JS) */
.canje-card {
  background: #fff;
  border: 1.5px solid rgba(37,60,97,0.09);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.canje-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(37,60,97,0.11); }
.canje-card.disabled { cursor: default; }
.canje-card.disabled:hover { transform: none; box-shadow: none; }

/* Historial rows */
.hist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(37,60,97,0.05);
}
.hist-row:last-child { border-bottom: none; }
.hist-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== PERFIL SECTION ===== */
.perfil-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.perfil-data-item { }
.perfil-data-label { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; }
.perfil-data-val { font-weight: 600; color: var(--text); font-size: 14px; }

/* ===== MASCOTA CARDS (dynamically rendered) ===== */
.mascota-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all .22s cubic-bezier(.34,1.56,.64,1);
}
.mascota-card:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 14px 36px rgba(37,60,97,.14); }

/* ===== PEDIDO CARDS (dynamically rendered) ===== */
.pedido-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  transition: all .2s;
}
.pedido-card:hover { box-shadow: 0 6px 20px rgba(37,60,97,0.09); }

/* ===== HISTORIA CARDS (dynamically rendered) ===== */
.historia-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  text-align: center;
  padding: 2rem;
}
.empty-state.visible { display: flex; }
.empty-state h3 { font-family: 'Fraunces', serif; font-size: 1.25rem; color: var(--navy); margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

/* ===== MODALS ===== */
/* modal and modal-card CSS is defined above in the redesigned block */
.modal.open { display: flex; }

/* ===== MOBILE NAV ===== */
#mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0e1828;
  padding: 8px 4px;
  z-index: 200;
  justify-content: space-around;
  border-top: 1px solid rgba(255,255,255,0.07);
}
#mobile-nav .nav-item {
  flex-direction: column;
  gap: 2px;
  padding: 6px 12px;
  font-size: 10px;
  border-left: none;
  border-radius: 10px;
}
#mobile-nav .nav-item.active { border-left: none; background: rgba(234,140,67,0.18); }

/* ===== GSAP ANIMATION HELPERS ===== */
.gsap-hidden { opacity: 0; transform: translateY(18px); }

/* ===== BRAND VISUAL (Content Style Guide) ===== */
.bebas { font-family: 'Bebas Neue', sans-serif; letter-spacing: 1.5px; }

/* Teal badge — Style 3 Info Cards */
.brand-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal-light); color: var(--navy);
  padding: 4px 12px; border-radius: 99px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}

/* Paw texture (decorative) */
.paw-bg { position: relative; overflow: hidden; }
.paw-bg::after { content: '🐾'; position: absolute; font-size: 120px; opacity: .035; bottom: -20px; right: -20px; pointer-events: none; line-height: 1; }

/* Hover lift */
.hover-lift { transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease; cursor: pointer; }
.hover-lift:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 14px 36px rgba(37,60,97,.13); }

/* Active nav indicator bar */
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; background: var(--orange); border-radius: 0 3px 3px 0; }

/* Pulse CTA */
@keyframes pulse-glow { 0%,100% { box-shadow: 0 4px 14px rgba(234,140,67,.28); } 50% { box-shadow: 0 6px 24px rgba(234,140,67,.5); } }
.btn-pulse { animation: pulse-glow 2.5s ease-in-out infinite; }

/* Section kicker label (Bebas Neue sky accent) */
.section-kicker { font-family: 'Bebas Neue', sans-serif; font-size: 13px; letter-spacing: 3px; color: var(--teal); text-transform: uppercase; margin-bottom: 4px; display: block; }

/* Sky teal card */
.card-teal { background: linear-gradient(135deg, #99D3DA 0%, #7ac5ce 100%); border: none; color: var(--navy); }

/* ===== BRAND PERSONALITY ===== */
.section-head::before, .section-head-row::before {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--teal-light));
  border-radius: 99px;
  margin-bottom: 10px;
}
.section-head p, .section-head-row p { color: var(--teal); font-weight: 500; }
.sb-brand .name {
  background: linear-gradient(90deg, #fff 60%, rgba(153,211,218,.85));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.sb-user { border-bottom: 1px solid rgba(153,211,218,.15); padding-bottom: 14px; }
#toast { background: var(--navy); border-left: 4px solid var(--orange); border-radius: 12px; }
#pts-ring-fill { filter: drop-shadow(0 0 6px rgba(234,140,67,.4)); }
.hist-row:hover { background: rgba(37,60,97,.02); border-radius: 10px; transition: background .15s; }
.nivel-item.current { border-left: 3px solid var(--orange) !important; }
.card:not(.card-navy) { transition: box-shadow .2s, transform .2s; }
.card:not(.card-navy):hover { box-shadow: 0 6px 22px rgba(37,60,97,.09); }

/* ===== RESPONSIVE — Mobile First ===== */
@media (max-width: 768px) {
  /* ── Layout ── */
  #sidebar { display: none; }
  #mobile-nav { display: flex; }
  #main-content { padding-bottom: 72px; padding-left: 0; padding-right: 0; }
  .section { padding: 16px; }

  /* ── Class-based grid overrides ── */
  .resp-grid-2col,
  .resp-grid-3col {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  /* ── Puntos hero ── */
  .pts-hero-card { flex-direction: column; align-items: center; padding: 20px 16px; }
  .pts-ring-wrap { width: 130px; height: 130px; margin-bottom: 16px; }
  .pts-display-num { font-size: 32px; }
  .pts-hero-info { width: 100%; }

  /* ── Grids → single column ── */
  .perfil-data-grid { grid-template-columns: 1fr; }
  .mgrid2 { grid-template-columns: 1fr !important; }

  /* ── Canjes grid ── */
  #canjes-grid { grid-template-columns: 1fr !important; max-height: none !important; }

  /* ── Mascotas grid ── */
  #mascotas-grid { grid-template-columns: 1fr !important; }

  /* ── Mascotas row en inicio ── */
  #inicio-mascotas-row { grid-template-columns: 1fr !important; }

  /* ── Historias grid ── */
  #historias-grid { grid-template-columns: 1fr !important; }

  /* ── Ranking tabla — ocultar col mascotas, solo rank+cliente+puntos ── */
  .rank-row { grid-template-columns: 44px 1fr 90px !important; }
  .rank-row > span:nth-child(3) { display: none; }

  /* ── Modales ── */
  .modal-card {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: 90vh !important;
    border-radius: 20px !important;
    margin: 0 auto;
  }
  .modal-footer { flex-wrap: wrap; gap: 8px; }
  .modal-footer button { flex: 1; min-width: 100px; justify-content: center; }

  /* ── Section header ── */
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-header button, .section-header a { align-self: stretch; justify-content: center; }

  /* ── Salud / ficha grid (2 col → 1 col) ── */
  #pet-tab-content [style*="grid-template-columns:repeat(2,1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* ── Inicio balance card font size ── */
  #inicio-pts { font-size: 38px !important; }

  /* ── Toast position ── */
  #toast { bottom: 80px; left: 12px; right: 12px; max-width: none; }

  /* ── Stories row ── */
  #stories-row { padding-bottom: 8px; }

  /* ── Comunidad layout: feed + sidebar stacked ── */
  .comunidad-layout { flex-direction: column !important; }
}

@media (max-width: 400px) {
  .section { padding: 12px; }
  .pts-display-num { font-size: 28px; }
  #inicio-pts { font-size: 32px !important; }
  .modal-card {
    width: 100vw !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 95vh !important;
    position: fixed !important;
    bottom: 0 !important;
  }
}


/* ══════════════════════════════════════════════
   SUPLEVET — Modern Design Overrides
   ══════════════════════════════════════════════ */

/* ── Earn items ── */
.earn-item {
  background: #fff;
  border: 1px solid rgba(30,58,95,.07);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex; gap: 14px; align-items: center;
  transition: all .22s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 1px 4px rgba(30,58,95,.05);
}
.earn-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(30,58,95,.1);
  border-color: rgba(30,58,95,.12);
}

/* ── Mascota cards ── */
.mascota-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(30,58,95,.06);
  box-shadow: var(--shadow-card);
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
.mascota-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 16px 40px rgba(30,58,95,.15);
}

/* ── Canje cards ── */
.canje-card {
  background: #fff;
  border: 1px solid rgba(30,58,95,.07);
  border-radius: var(--radius-md);
  padding: 16px; cursor: pointer;
  transition: all .22s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 1px 4px rgba(30,58,95,.05);
}
.canje-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(30,58,95,.13);
}
.canje-card.disabled { cursor: default; }
.canje-card.disabled:hover { transform: none; box-shadow: none; }

/* ── Post cards ── */
.post-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid rgba(30,58,95,.06);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
  transition: box-shadow .2s;
}
.post-card:hover { box-shadow: var(--shadow-float); }

/* ── Historia cards ── */
.historia-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid rgba(30,58,95,.06);
  box-shadow: var(--shadow-card);
}

/* ── Pedido cards ── */
.pedido-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid rgba(30,58,95,.06);
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s;
}
.pedido-card:hover { box-shadow: var(--shadow-float); }

/* ── Logro items ── */
.logro-item {
  aspect-ratio: 1;
  background: #f8f6f2;
  border: 1.5px dashed rgba(107,115,133,.2);
  border-radius: var(--radius-md);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: .55; padding: 6px;
  transition: all .22s;
}
.logro-item.got {
  background: linear-gradient(135deg,#fff8f0,#fdebd0);
  border: 1.5px solid rgba(240,140,75,.3);
  opacity: 1;
  box-shadow: 0 2px 10px rgba(240,140,75,.15);
}
.logro-item:hover { transform: scale(1.06); }

/* ── Ranking rows ── */
.rank-row {
  display: grid;
  grid-template-columns: 56px 1fr 80px 120px;
  padding: 12px 18px; align-items: center;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(30,58,95,.04);
  transition: background .15s;
}
.rank-row:hover { background: rgba(30,58,95,.025); }
.rank-row.me {
  background: linear-gradient(90deg,rgba(240,140,75,.08),transparent);
  border-left: 3px solid var(--orange);
}

/* ── Historial rows ── */
.hist-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 11px 4px;
  border-bottom: 1px solid rgba(30,58,95,.05);
  transition: background .15s;
  border-radius: var(--radius-sm);
}
.hist-row:last-child { border-bottom: none; }
.hist-row:hover { background: rgba(30,58,95,.03); }

/* ── Modal icon ── */
.modal-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--surface-low), #dedad4);
  box-shadow: 0 2px 8px rgba(30,58,95,.08);
}

/* ── Mfield inputs ── */
.mfield .input {
  background: #ffffff;
  border: 1.5px solid rgba(37,60,97,.15);
  border-radius: var(--radius-sm);
}
.mfield .input:focus {
  background: #fff;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240,140,75,.12);
}

/* ── Global .input / select / textarea base ── */
.input, select.input, textarea.input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(37,60,97,.15);
  background: #ffffff;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: auto;
}
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240,140,75,.12);
}
.input::placeholder, textarea.input::placeholder {
  color: #b0aaa2;
}

/* ── Nav active indicator ── */
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--orange);
  border-radius: 0 3px 3px 0;
}

/* ── Section kicker ── */
.section-kicker {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px; letter-spacing: 3px;
  color: var(--teal-mid); text-transform: uppercase;
  margin-bottom: 3px; display: block;
}

/* ── Pts ring glow ── */
#pts-ring-fill { filter: drop-shadow(0 0 8px rgba(240,140,75,.45)); }

/* ── Carnet ── */
.carnet-front {
  background: linear-gradient(135deg,#F08C4B 0%,#D96A28 50%,#C4571E 100%);
  border-radius: var(--radius-lg);
  padding: 26px; color: #fff;
  position: relative; overflow: hidden;
  min-height: 290px;
  box-shadow: 0 20px 50px rgba(201,110,42,.3);
}

/* ── Pet tabs ── */
.pet-tab {
  padding: 10px 18px; font-size: 13px; font-weight: 600;
  border: none; background: none; cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; font-family: inherit; transition: all .15s;
}
.pet-tab.active { color: var(--orange); border-bottom-color: var(--orange); }
.pet-tab:hover { color: var(--navy); }

/* ── Section head-row ── */
.section-head-row::before {
  content: '';
  display: block;
  width: 28px; height: 3px;
  background: var(--grad-orange);
  border-radius: 99px;
  margin-bottom: 10px;
}

/* ── Responsive tweaks ── */
@media (max-width: 768px) {
  .section { padding: 16px; }
  #mobile-nav { display: flex; }
  #sidebar { display: none; }
  #main-content { padding-bottom: 72px; }
}

/* ── Ocultar temporalmente pestañas Historias y Comunidad ──
   NO se borra nada: las páginas y el código siguen intactos.
   Para reactivarlas, elimina este bloque. */
[onclick*="showSection('historias')"],
[onclick*="showSection('comunidad')"] { display: none !important; }

/* ── Scrollbar brand ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb {
  background: rgba(44,122,130,.25);
  border-radius: 99px;
}
::-webkit-scrollbar-track { background: transparent; }

