/* ============================================================
   HormoLand Design System v3 — "Growing with confidence"
   Tipografía de marca, arte oficial, animaciones y degradados
   ============================================================ */
:root {
  --coral: #F0876A; --coral-deep: #E8684A; --coral-soft: #FBE3D6;
  --teal: #35B5AA; --teal-deep: #2A968D; --teal-dark: #1F7A72; --teal-soft: #DFF2F0;
  --sun: #F7C873; --berry: #C96B85; --grape: #8A6FB8; --grape-deep: #6E549A;
  --ink: #2E2A45; --ink-deep: #211D35; --ink-soft: #4A4468;
  --text: #3A3357; --gray: #8B85A3; --line: #EFE8E4;
  --bg: #FAF3EE; --card: #FFFFFF;
  --ok: #2FA871; --warn: #DD8F1C; --bad: #D95555;
  --r: 18px; --shadow: 0 4px 18px rgba(46,42,69,.08);
  --shadow-hover: 0 14px 34px rgba(46,42,69,.14);
  font-size: 15px;
}
* { box-sizing: border-box; margin: 0; }
body { font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(rgba(53,181,170,.055) 1.6px, transparent 1.6px),
                    radial-gradient(rgba(240,135,106,.05) 1.6px, transparent 1.6px);
  background-size: 34px 34px, 34px 34px; background-position: 0 0, 17px 17px; }
a { color: var(--teal-deep); text-decoration: none; }
h1, h2, h3 { color: var(--ink); font-family: 'Baloo 2', 'Nunito', sans-serif; font-weight: 700; }
::selection { background: var(--coral-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D9D2E6; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--grape); }

/* ---- Animaciones base ---- */
@keyframes aparecer { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes flotarSuave { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-14px) rotate(1.5deg); } }
@keyframes gradienteVivo { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(53,181,170,.45); } 70% { box-shadow: 0 0 0 16px rgba(53,181,170,0); } 100% { box-shadow: 0 0 0 0 rgba(53,181,170,0); } }
@keyframes destello { from { left: -80%; } to { left: 130%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- Layout ---- */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 26px 32px; flex: 1; animation: aparecer .45s ease both; }

/* ---- Sidebar ---- */
.sidebar { width: 248px; color: #fff; padding: 20px 14px 14px; display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: radial-gradient(600px 300px at -20% -10%, rgba(240,135,106,.18), transparent 60%),
              radial-gradient(500px 320px at 120% 110%, rgba(53,181,170,.14), transparent 60%),
              linear-gradient(178deg, var(--ink) 0%, var(--ink-deep) 100%); }
.sidebar::-webkit-scrollbar { width: 4px; } .sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border: 0; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 20px; }
.brand img { filter: drop-shadow(0 4px 10px rgba(240,135,106,.4)); animation: flotar 5s ease-in-out infinite; }
.brand-name { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.24rem; letter-spacing: .3px; color: #fff; }
.brand-name em { color: var(--coral); font-style: normal; }
.brand-tag { font-size: .58rem; opacity: .65; letter-spacing: 1px; color: #fff; }
.nav-sec { font-size: .6rem; text-transform: uppercase; letter-spacing: 1.8px; opacity: .45; padding: 16px 14px 6px; color: #fff; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 14px; border-radius: 12px; color: #C9C4DD;
  font-size: .93rem; font-weight: 600; transition: all .18s ease; position: relative; overflow: hidden; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(4px); }
.nav-item.activo { background: linear-gradient(90deg, var(--coral-deep), var(--coral)); color: #fff; font-weight: 800;
  box-shadow: 0 6px 18px rgba(232,104,74,.45); }
.nav-item.activo::after { content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); animation: destello 2.8s ease 1s 2; }
.nav-item svg { width: 17px; height: 17px; flex: none; }
.nav-badge { margin-left: auto; background: var(--teal); color: #fff; font-size: .68rem; font-weight: 800; border-radius: 20px; padding: 2px 8px; }
.nav-item.activo .nav-badge { background: rgba(255,255,255,.25); }
.user-card { margin-top: auto; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 10px 12px; color: #fff; transition: .18s; }
.user-card:hover { background: rgba(255,255,255,.12); }
.user-card small { color: #C9C4DD; display: block; font-size: .72rem; }

/* ---- Topbar (vidrio) ---- */
.topbar { background: rgba(255,255,255,.82); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--line); padding: 14px 32px; display: flex; align-items: center; gap: 16px; }
.topbar h1 { font-size: 1.35rem; font-weight: 800;
  background: linear-gradient(90deg, var(--ink), var(--teal-deep)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.topbar .sub { color: var(--gray); font-size: .8rem; }
.buscador { margin-left: auto; position: relative; }
.buscador input { border: 1.5px solid var(--line); border-radius: 24px; padding: 9px 16px 9px 38px; width: 300px;
  font-size: .87rem; background: var(--bg); font-family: inherit; transition: .2s; }
.buscador input:focus { outline: none; border-color: var(--teal); background: #fff; width: 340px; box-shadow: 0 0 0 4px var(--teal-soft); }
.buscador svg { position: absolute; left: 13px; top: 10px; width: 16px; height: 16px; color: var(--gray); }
.campanita { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center; position: relative; color: var(--ink); transition: .18s; }
.campanita:hover { transform: rotate(14deg) scale(1.06); border-color: var(--coral); color: var(--coral-deep); }
.campanita .punto { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--coral-deep); animation: pulso 2s infinite; }

/* ---- Héroe ---- */
.hero { border-radius: 24px; padding: 32px 36px; color: #fff; position: relative; overflow: hidden; margin-bottom: 22px;
  background: linear-gradient(105deg, var(--coral-deep), var(--coral) 22%, #EFA05F 45%, var(--teal) 78%, var(--teal-deep));
  background-size: 220% 220%; animation: gradienteVivo 14s ease infinite; box-shadow: 0 12px 34px rgba(232,104,74,.3); }
.hero::before { content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.2) 1.6px, transparent 1.6px); background-size: 24px 24px; }
.hero::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; right: -80px; top: -140px;
  background: rgba(255,255,255,.12); }
.hero > * { position: relative; z-index: 1; }
.hero h2 { color: #fff; font-size: 1.65rem; font-weight: 800; margin-bottom: 6px; text-shadow: 0 2px 8px rgba(46,42,69,.18); }
.hero p { font-size: .96rem; opacity: .97; max-width: 58ch; }
.hero .mascota { position: absolute; right: 34px; bottom: -10px; height: 132px; z-index: 1;
  filter: drop-shadow(0 10px 16px rgba(46,42,69,.3)); animation: flotarSuave 4.5s ease-in-out infinite; }
.btn-hero { background: rgba(255,255,255,.94); color: var(--coral-deep); font-weight: 800; }
.btn-hero.sec { background: rgba(255,255,255,.2); color: #fff; border: 1.5px solid rgba(255,255,255,.65); }

/* ---- Cards / KPIs ---- */
.grid { display: grid; gap: 18px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 22px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px 22px;
  transition: transform .2s ease, box-shadow .2s ease; animation: aparecer .5s ease both; }
.card:hover { box-shadow: var(--shadow-hover); }
.card h3 { font-size: 1.02rem; margin-bottom: 13px; }
.grid > .card:nth-child(2) { animation-delay: .06s; } .grid > .card:nth-child(3) { animation-delay: .12s; }
.grid > .card:nth-child(4) { animation-delay: .18s; } .grid > .card:nth-child(5) { animation-delay: .24s; }
.kpi-solid { border-radius: 22px; padding: 20px; color: #fff; position: relative; overflow: hidden; min-height: 142px;
  display: flex; flex-direction: column; box-shadow: var(--shadow); animation: aparecer .5s ease both;
  transition: transform .22s ease, box-shadow .22s ease; }
.kpi-solid:hover { transform: translateY(-5px) scale(1.015); box-shadow: var(--shadow-hover); }
.kpis > .kpi-solid:nth-child(2) { animation-delay: .07s; } .kpis > .kpi-solid:nth-child(3) { animation-delay: .14s; }
.kpis > .kpi-solid:nth-child(4) { animation-delay: .21s; } .kpis > .kpi-solid:nth-child(5) { animation-delay: .28s; }
.kpis > .kpi-solid:nth-child(6) { animation-delay: .35s; }
.kpi-solid::before { content: ''; position: absolute; width: 190px; height: 190px; border-radius: 50%;
  right: -60px; top: -90px; background: rgba(255,255,255,.13); }
.kpi-solid .icono { width: 44px; height: 44px; opacity: .95; }
.kpi-solid .icono svg { width: 44px; height: 44px; }
.kpi-solid .lbl { font-size: .82rem; opacity: .93; margin-top: 4px; font-weight: 700; letter-spacing: .3px; }
.kpi-solid .val { font-size: 1.85rem; font-weight: 800; margin-top: auto; font-family: 'Baloo 2', sans-serif; }
.kpi-solid .extra { display: inline-block; background: rgba(255,255,255,.24); border-radius: 16px; padding: 3px 10px;
  font-size: .72rem; font-weight: 800; margin-top: 6px; align-self: flex-start; }
.kpi-solid .mascota { position: absolute; right: 10px; bottom: 0; height: 76px; width: auto; opacity: .98; z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(46,42,69,.25)); animation: flotar 4s ease-in-out infinite; }
.kpi-solid:nth-child(even) .mascota { animation-delay: 1.2s; }
.kpi-solid.coral { background: linear-gradient(140deg, var(--coral), var(--coral-deep)); }
.kpi-solid.teal { background: linear-gradient(140deg, var(--teal), var(--teal-deep)); }
.kpi-solid.ink { background: linear-gradient(140deg, var(--ink-soft), var(--ink)); }
.kpi-solid.grape { background: linear-gradient(140deg, var(--grape), var(--grape-deep)); }
.kpi-solid.sun { background: linear-gradient(140deg, var(--sun), #E8A54B); }
.kpi-solid.berry { background: linear-gradient(140deg, var(--berry), #B05270); }

/* ---- Tabs ---- */
.tabs { display: inline-flex; background: #fff; border-radius: 26px; padding: 5px; box-shadow: var(--shadow); gap: 4px; }
.tabs a { padding: 8px 20px; border-radius: 20px; font-size: .88rem; font-weight: 700; color: var(--gray); transition: .18s; }
.tabs a:hover { color: var(--ink); background: var(--bg); }
.tabs a.activo { background: linear-gradient(90deg, var(--teal-deep), var(--teal)); color: #fff; box-shadow: 0 4px 12px rgba(53,181,170,.35); }

/* ---- Tablas ---- */
.tabla { width: 100%; border-collapse: collapse; font-size: .89rem; }
.tabla th { text-align: left; color: var(--gray); font-size: .7rem; text-transform: uppercase; letter-spacing: .9px;
  padding: 10px 12px; border-bottom: 2px solid var(--line); }
.tabla td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; transition: background .15s; }
.tabla tbody tr { transition: .15s; }
.tabla tbody tr:hover td { background: #FDF6F1; }
.tabla tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--coral); }
.tabla .acciones { white-space: nowrap; text-align: right; }

/* ---- Chips ---- */
.chip { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: .73rem; font-weight: 800; }
.chip.ok { background: #E0F4EA; color: var(--ok); } .chip.warn { background: #FBEFD9; color: var(--warn); }
.chip.bad { background: #FAE3E3; color: var(--bad); } .chip.info { background: var(--teal-soft); color: var(--teal-dark); }
.chip.neutro { background: #F0EDEA; color: var(--gray); }
.chip.cat { color: #fff; } .chip.cat.aaa { background: linear-gradient(90deg, var(--coral), var(--coral-deep)); }
.chip.cat.aa { background: linear-gradient(90deg, var(--teal), var(--teal-deep)); }
.chip.cat.a { background: var(--ink-soft); } .chip.cat.b { background: var(--grape); } .chip.cat.c { background: #B9B4C7; }

/* ---- Botones / formularios ---- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 13px; padding: 10px 19px;
  font-weight: 800; font-size: .88rem; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease;
  text-decoration: none; font-family: inherit; position: relative; overflow: hidden; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-primario { background: linear-gradient(90deg, var(--coral-deep), var(--coral)); color: #fff; box-shadow: 0 6px 16px rgba(232,104,74,.38); }
.btn-primario::after { content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transition: left .5s ease; }
.btn-primario:hover::after { left: 130%; }
.btn-teal { background: linear-gradient(90deg, var(--teal-deep), var(--teal)); color: #fff; box-shadow: 0 6px 16px rgba(53,181,170,.32); }
.btn-suave { background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: var(--shadow); }
.btn-suave:hover { border-color: var(--teal); }
.btn-peligro { background: #FAE3E3; color: var(--bad); }
.btn-mini { padding: 6px 12px; font-size: .78rem; border-radius: 10px; }
label { display: block; font-size: .8rem; font-weight: 800; color: var(--ink); margin-bottom: 5px; }
.input, select.input, textarea.input { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px;
  font-size: .9rem; background: #fff; color: var(--text); font-family: inherit; transition: border .18s, box-shadow .18s; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.campo { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.error { color: var(--bad); font-size: .78rem; margin-top: 3px; }

/* ---- Alertas / utilidades ---- */
.alerta { border-radius: 14px; padding: 13px 17px; margin-bottom: 16px; font-size: .9rem; font-weight: 700; animation: aparecer .4s ease both; }
.alerta.ok { background: #E0F4EA; color: var(--ok); border-left: 4px solid var(--ok); }
.alerta.bad { background: #FAE3E3; color: var(--bad); border-left: 4px solid var(--bad); }
.fila { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.derecha { margin-left: auto; }
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; }
.paginacion { display: flex; gap: 6px; margin-top: 16px; }
.paginacion a, .paginacion span { padding: 6px 13px; border-radius: 10px; background: #fff; border: 1.5px solid var(--line); font-size: .85rem; transition: .15s; }
.paginacion a:hover { border-color: var(--coral); color: var(--coral-deep); transform: translateY(-2px); }
.paginacion .activo { background: var(--ink); color: #fff; border-color: var(--ink); }
.vacio { text-align: center; color: var(--gray); padding: 44px 20px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.userchip { display: flex; align-items: center; gap: 10px; }

/* ---- Login ---- */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--coral) 0%, var(--sun) 42%, var(--teal) 100%);
  background-size: 200% 200%; animation: gradienteVivo 16s ease infinite; }
.login-card { background: rgba(255,255,255,.95); backdrop-filter: blur(12px); border-radius: 28px; padding: 42px 40px;
  width: 392px; max-width: 92vw; box-shadow: 0 26px 70px rgba(46,42,69,.38); position: relative; z-index: 2; animation: aparecer .6s ease both; }
.login-card h1 { text-align: center; font-size: 1.55rem; font-weight: 800; }
.login-card .tag { text-align: center; color: var(--gray); font-size: .78rem; margin: 4px 0 24px; letter-spacing: 1.6px; }
.molecula { position: absolute; border-radius: 50%; background: rgba(255,255,255,.15); animation: flotar 7s ease-in-out infinite; }
.login-masc { position: absolute; z-index: 1; filter: drop-shadow(0 12px 20px rgba(46,42,69,.3)); animation: flotarSuave 5s ease-in-out infinite; }
.login-masc:nth-of-type(odd) { animation-delay: 1.4s; }
.login-masc:nth-of-type(3) { animation-delay: 2.3s; }

/* ---- HormoBot ---- */
#botBurbuja { position: fixed; right: 26px; bottom: 26px; width: 62px; height: 62px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: #fff; font-size: 1.75rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 90;
  box-shadow: 0 8px 24px rgba(31,122,114,.45); transition: transform .18s; animation: pulso 3.2s infinite; }
#botBurbuja:hover { transform: scale(1.12) rotate(-8deg); }
#botPanel { position: fixed; right: 26px; bottom: 100px; width: 362px; max-width: 92vw; height: 482px; max-height: 70vh;
  background: #fff; border-radius: 22px; box-shadow: 0 20px 60px rgba(46,42,69,.35); z-index: 91;
  display: none; flex-direction: column; overflow: hidden; animation: aparecer .3s ease both; }
.bot-cab { background: linear-gradient(90deg, var(--teal-dark), var(--teal)); color: #fff; padding: 13px 16px; }
#botChat { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.bot-msg { background: var(--teal-soft); border-radius: 13px; padding: 9px 13px; font-size: .86rem; max-width: 88%;
  white-space: pre-wrap; align-self: flex-start; animation: aparecer .25s ease both; }
.bot-msg.mia { background: linear-gradient(90deg, var(--coral-deep), var(--coral)); color: #fff; align-self: flex-end; }

/* ---- Cotizador / solicitudes / calendario ---- */
.tarjeta-prod { cursor: pointer; border: 2px solid transparent !important; transition: .18s; }
.tarjeta-prod:hover { border-color: var(--teal) !important; transform: translateY(-4px); }
.panel-solicitudes { background: linear-gradient(140deg, #FFF9EF, #FFF3DE); border: 1.5px solid #F2D9A4; border-radius: var(--r); padding: 18px 20px; }
.carrusel { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.carrusel::-webkit-scrollbar { height: 8px; } .carrusel::-webkit-scrollbar-thumb { background: #E8D5AC; }
.tarjeta-sol { min-width: 320px; max-width: 340px; flex: none; border: 1px solid #F2D9A4; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border-radius: 8px; overflow: hidden; }
.cal-cab { margin-bottom: 1px; }
.cal-cab div { background: #fff; text-align: center; font-weight: 800; padding: 8px 0; font-size: .8rem; color: var(--ink); }
.cal-dia { background: #fff; min-height: 108px; padding: 6px; transition: .15s; }
.cal-dia:hover { background: #FDF8F4; }
.cal-dia.fuera { background: #FAF8F6; } .cal-dia.fuera .cal-num { color: #C9C4DD; }
.cal-dia.hoy { outline: 2px solid var(--teal); outline-offset: -2px; }
.cal-num { font-weight: 800; font-size: .85rem; margin-bottom: 4px; }
.cal-evento { font-size: .67rem; font-weight: 700; border-radius: 5px; padding: 2px 5px; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); transition: .12s; }
.cal-evento:hover { transform: scale(1.03); }

/* ---- Permisos ---- */
.permisos-tabla td, .permisos-tabla th { text-align: center; }
.permisos-tabla td:first-child, .permisos-tabla th:first-child { text-align: left; }

@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 50; transform: translateX(-100%); transition: .2s; }
  .sidebar.abierta { transform: none; }
  .content { padding: 16px; }
  .buscador input { width: 160px; }
  .hero .mascota { display: none; }
}

/* ---- Banner de módulo con personaje ---- */
.banner-mod { border-radius: 20px; padding: 16px 26px 16px 24px; color: #fff; display: flex; align-items: center;
  justify-content: space-between; gap: 18px; margin-bottom: 18px; position: relative; overflow: visible;
  background-size: 200% 200%; animation: gradienteVivo 12s ease infinite, aparecer .5s ease both; box-shadow: var(--shadow); }
.banner-mod::before { content: ''; position: absolute; inset: 0; border-radius: 20px;
  background-image: radial-gradient(rgba(255,255,255,.18) 1.4px, transparent 1.4px); background-size: 20px 20px; }
.banner-mod h2 { color: #fff; font-size: 1.25rem; margin: 0; text-shadow: 0 2px 6px rgba(46,42,69,.2); }
.banner-mod p { font-size: .84rem; opacity: .95; margin: 2px 0 0; }
.banner-mod img { height: 96px; margin: -26px 6px -14px 0; z-index: 1;
  filter: drop-shadow(0 8px 14px rgba(46,42,69,.3)); animation: flotar 4.2s ease-in-out infinite; }
.banner-mod.coral { background-image: linear-gradient(110deg, var(--coral-deep), var(--coral), #EFA05F); }
.banner-mod.teal { background-image: linear-gradient(110deg, var(--teal-dark), var(--teal), #6FD0C6); }
.banner-mod.grape { background-image: linear-gradient(110deg, var(--grape-deep), var(--grape), #A98FD4); }
.banner-mod.ink { background-image: linear-gradient(110deg, var(--ink-deep), var(--ink-soft), var(--grape-deep)); }
.banner-mod.sun { background-image: linear-gradient(110deg, #E8A54B, var(--sun), #FBDCA0); }
.banner-mod.sun h2, .banner-mod.sun p { color: #5C4A1E; text-shadow: none; }
.banner-mod.berry { background-image: linear-gradient(110deg, #B05270, var(--berry), #E08BA5); }

/* ---- Glow e iluminación de botones ---- */
.btn { will-change: transform, box-shadow, filter; }
.btn:hover { filter: brightness(1.07) saturate(1.08); }
.btn-primario:hover { box-shadow: 0 10px 26px rgba(232,104,74,.55); }
.btn-teal:hover { box-shadow: 0 10px 26px rgba(53,181,170,.5); }
.btn-suave:hover { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-dark);
  box-shadow: 0 8px 20px rgba(53,181,170,.25); }
.btn-peligro:hover { background: var(--bad); color: #fff; box-shadow: 0 8px 20px rgba(217,85,85,.4); }
.btn-hero:hover { box-shadow: 0 10px 26px rgba(255,255,255,.35); }

/* ---- Burbuja del bot con personaje ---- */
#botBurbuja { background: linear-gradient(135deg, #fff, var(--teal-soft)); border: 3px solid var(--teal);
  width: 68px; height: 68px; overflow: hidden; }
#botBurbuja img { height: 54px; margin-top: 10px; transition: .2s; }
#botBurbuja:hover img { transform: scale(1.12); }

/* ---- Tarjetas de reportes ---- */
.card .grid > .card { border-top: 4px solid transparent; }
.card .grid > .card:nth-child(6n+1) { border-top-color: var(--teal); }
.card .grid > .card:nth-child(6n+2) { border-top-color: var(--ink-soft); }
.card .grid > .card:nth-child(6n+3) { border-top-color: var(--berry); }
.card .grid > .card:nth-child(6n+4) { border-top-color: var(--sun); }
.card .grid > .card:nth-child(6n+5) { border-top-color: var(--grape); }
.card .grid > .card:nth-child(6n+6) { border-top-color: var(--coral); }
.card .grid > .card:hover { transform: translateY(-4px); }

/* ---- Tablas premium (filas tipo tarjeta) ---- */
.tabla { border-collapse: separate; border-spacing: 0 7px; }
.tabla thead th { border-bottom: 0; padding-bottom: 4px; }
.tabla tbody tr { background: #FBF6F1; }
.tabla tbody td { border-bottom: 0; }
.tabla tbody td:first-child { border-radius: 12px 0 0 12px; }
.tabla tbody td:last-child { border-radius: 0 12px 12px 0; }
.tabla tbody tr:hover { transform: translateY(-2px) scale(1.002); box-shadow: 0 8px 20px rgba(46,42,69,.1); }
.tabla tbody tr:hover td { background: #fff; }
.tabla tbody tr:hover td:first-child { box-shadow: inset 4px 0 0 var(--coral); }

/* ---- Mini KPI (barra de estadísticas de módulo) ---- */
.mini-kpi { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 16px 18px;
  display: flex; align-items: center; gap: 14px; animation: aparecer .5s ease both; transition: .2s; }
.mini-kpi:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.grid > .mini-kpi:nth-child(2) { animation-delay: .07s; } .grid > .mini-kpi:nth-child(3) { animation-delay: .14s; }
.grid > .mini-kpi:nth-child(4) { animation-delay: .21s; }
.mini-kpi .num { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.45rem; color: var(--ink); line-height: 1.1; }
.mini-kpi .lbl { font-size: .78rem; color: var(--gray); font-weight: 700; }

/* ---- Chip de icono con degradado ---- */
.icono-chip { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center;
  justify-content: center; color: #fff; flex: none; box-shadow: var(--shadow); }
.icono-chip svg { width: 26px; height: 26px; }
.icono-chip.coral { background: linear-gradient(135deg, var(--coral), var(--coral-deep)); }
.icono-chip.teal { background: linear-gradient(135deg, var(--teal), var(--teal-deep)); }
.icono-chip.ink { background: linear-gradient(135deg, var(--ink-soft), var(--ink)); }
.icono-chip.grape { background: linear-gradient(135deg, var(--grape), var(--grape-deep)); }
.icono-chip.sun { background: linear-gradient(135deg, var(--sun), #E8A54B); }
.icono-chip.berry { background: linear-gradient(135deg, var(--berry), #B05270); }

/* ---- Tarjetas de reportes con color ---- */
.rep-card { border-radius: 18px; padding: 16px; text-align: center; box-shadow: var(--shadow);
  transition: .2s; animation: aparecer .5s ease both; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rep-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.rep-card strong { font-size: .88rem; }
.rep-card.teal { background: linear-gradient(160deg, #EFFAF8, #DFF2F0); }
.rep-card.ink { background: linear-gradient(160deg, #F1EFF8, #E4E0F0); }
.rep-card.berry { background: linear-gradient(160deg, #FBEFF3, #F6DEE6); }
.rep-card.sun { background: linear-gradient(160deg, #FEF7E8, #FBEDD0); }
.rep-card.grape { background: linear-gradient(160deg, #F3EFFA, #E8E1F4); }
.rep-card.coral { background: linear-gradient(160deg, #FDF1EC, #FBE3D6); }

/* ---- Panel de filtros desplegable ---- */
.panel-filtros { display: none; margin-bottom: 18px; }
.panel-filtros.abierto { display: block; animation: aparecer .3s ease both; }

/* ================= v7 ================= */

/* ---- Logo oficial en sidebar ---- */
.brand { justify-content: center; padding: 6px 10px 18px; }
.brand-logo { height: 86px; width: auto; filter: drop-shadow(0 4px 12px rgba(240,135,106,.35)); animation: flotar 6s ease-in-out infinite; }

/* ---- ADN animado (hélice de puntos) ---- */
@keyframes hebraA { 0%, 100% { top: 6%; transform: scale(1.15); z-index: 2; } 50% { top: 78%; transform: scale(.55); z-index: 1; } }
@keyframes hebraB { 0%, 100% { top: 78%; transform: scale(.55); z-index: 1; } 50% { top: 6%; transform: scale(1.15); z-index: 2; } }
.adn { display: flex; gap: 16px; height: 110px; align-items: stretch; }
.adn span { position: relative; width: 12px; }
.adn span::before, .adn span::after { content: ''; position: absolute; left: 0; width: 12px; height: 12px; border-radius: 50%; }
.adn span::before { background: var(--coral); animation: hebraA 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.26s); }
.adn span::after { background: var(--teal); animation: hebraB 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.26s); }

/* ---- Pantalla de carga ---- */
#cargaInicial { position: fixed; inset: 0; z-index: 999; display: flex; flex-direction: column; align-items: center;
  justify-content: center; background: linear-gradient(160deg, #FFFDFB, var(--bg));
  transition: opacity .55s ease, visibility .55s; }
#cargaInicial.fuera { opacity: 0; visibility: hidden; }

/* ---- Bienvenida con mascota gigante ---- */
@keyframes brincar { 0% { transform: translateY(120%) scale(.6); opacity: 0; } 60% { transform: translateY(-4%) scale(1.04); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes globoPop { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
#bienvenida { position: fixed; inset: 0; z-index: 998; cursor: pointer;
  background: rgba(27,23,44,.66); backdrop-filter: blur(4px); animation: aparecer .35s ease both; transition: opacity .45s ease; }
#bienvenida.fuera { opacity: 0; }
.bienvenida-esc { position: absolute; left: 40px; bottom: 0; display: flex; align-items: flex-end; }
.bienvenida-esc img { height: min(58vh, 460px); filter: drop-shadow(0 20px 40px rgba(0,0,0,.5));
  animation: brincar .85s cubic-bezier(.34,1.4,.5,1) both; }
.bienvenida-esc .globo { background: #fff; border-radius: 22px 22px 22px 5px; box-shadow: 0 20px 50px rgba(0,0,0,.4); padding: 20px 26px;
  font-family: 'Baloo 2', sans-serif; font-size: 1.35rem; color: var(--ink); max-width: 360px;
  margin-left: -20px; margin-bottom: min(46vh, 380px); animation: globoPop .5s .6s ease both; position: relative; }
.bienvenida-esc .globo small { display: block; font-family: 'Nunito', sans-serif; color: var(--gray); font-size: .88rem; margin-top: 6px; }
.bienvenida-esc .globo .pista { display: block; font-family: 'Nunito', sans-serif; font-size: .7rem; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase; color: var(--teal-deep); margin-top: 12px; animation: pulso 2.4s infinite; border-radius: 8px; padding: 2px 0; }
.bienvenida-esc .globo::after { content: ''; position: absolute; left: -9px; bottom: 16px; border: 11px solid transparent; border-right-color: #fff; }

/* ---- Login v2 (split) ---- */
.login2 { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(135deg, #FDF3EC, var(--bg) 45%, #E9F6F4); }
.login2-caja { display: grid; grid-template-columns: 420px 1fr; width: min(1180px, 100%); min-height: 640px;
  background: #fff; border-radius: 30px; overflow: hidden; box-shadow: 0 30px 80px rgba(46,42,69,.22); animation: aparecer .6s ease both; }
.login2-form { padding: 44px 42px; display: flex; flex-direction: column; justify-content: center; }
.login2-form h1 { font-size: 1.5rem; text-align: center; margin-top: 10px; }
.login2-form .sub { text-align: center; color: var(--gray); font-size: .9rem; margin: 4px 0 24px; }
.login2-form label { display: flex; align-items: center; gap: 7px; }
.login2-form label svg { width: 15px; height: 15px; color: var(--teal-deep); }
.login2-pie { display: flex; justify-content: center; gap: 16px; margin-top: 26px; color: var(--gray); font-size: .72rem; font-weight: 700; }
.login2-pie span { display: flex; align-items: center; gap: 5px; }
.login2-pie svg { width: 14px; height: 14px; color: var(--teal); }
.login2-show { position: relative; padding: 40px 44px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  background: radial-gradient(700px 400px at 85% -10%, rgba(53,181,170,.35), transparent 60%),
              radial-gradient(600px 400px at -10% 110%, rgba(240,135,106,.3), transparent 55%),
              linear-gradient(155deg, var(--ink) 0%, var(--teal-dark) 130%); }
.login2-show::before { content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.13) 1.5px, transparent 1.5px); background-size: 26px 26px; }
.adn-show { position: absolute; right: 44px; top: 34px; opacity: .95; }
.cita-card { position: relative; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px);
  border-radius: 18px; padding: 18px 22px; color: #fff; font-family: 'Baloo 2', sans-serif; font-size: 1.25rem; max-width: 330px; animation: aparecer .7s .2s ease both; }
.cita-card small { display: block; font-family: 'Nunito', sans-serif; font-size: .8rem; color: #C9C4DD; margin-top: 8px; }
.elenco { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 4px; margin: 10px 0; }
.elenco img { height: 170px; filter: drop-shadow(0 14px 22px rgba(0,0,0,.35)); animation: flotarSuave 5s ease-in-out infinite; animation-delay: var(--d, 0s); }
.rasgos { position: relative; display: flex; gap: 14px; justify-content: space-between; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 14px 18px; color: #fff; animation: aparecer .7s .35s ease both; }
.rasgos > div { display: flex; align-items: center; gap: 10px; font-size: .82rem; line-height: 1.25; }
.rasgos small { color: #C9C4DD; }
.rasgos .icono-chip { width: 40px; height: 40px; border-radius: 12px; }
.rasgos .icono-chip svg { width: 20px; height: 20px; }
@media (max-width: 940px) { .login2-caja { grid-template-columns: 1fr; } .login2-show { display: none; } }

/* ---- Mapa monitor con overlays ---- */
.mapa-marco { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); animation: aparecer .5s ease both; }
#mapaMon { height: 74vh; min-height: 480px; }
.mapa-chip { position: absolute; top: 16px; left: 16px; z-index: 500; background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-radius: 14px; box-shadow: var(--shadow); padding: 9px 14px; display: flex; align-items: center; gap: 9px; }
.mapa-chip small { color: var(--gray); font-weight: 700; }
.mapa-envivo { position: absolute; top: 16px; right: 16px; z-index: 500; background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-radius: 16px; box-shadow: var(--shadow); padding: 12px 18px; min-width: 190px; }
.punto-vivo { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); animation: pulso 2s infinite; display: inline-block; }
.cifra-vivo { width: 54px; height: 54px; border-radius: 50%; color: #fff; font-family: 'Baloo 2', sans-serif; font-weight: 800;
  font-size: 1.3rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 4px; }
.cifra-vivo.coral { background: linear-gradient(135deg, var(--coral), var(--coral-deep)); }
.cifra-vivo.ok { background: linear-gradient(135deg, #43C287, var(--ok)); }
.mapa-panel { position: absolute; right: 16px; bottom: 16px; z-index: 500; width: 330px; max-width: 76vw;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-radius: 18px; box-shadow: var(--shadow-hover); padding: 14px 16px; }
.rep-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pin-moto { font-size: 24px; filter: drop-shadow(0 3px 5px rgba(0,0,0,.3)); }

/* ================= Login v3 — pantalla completa ================= */
.login3 { display: grid; grid-template-columns: minmax(400px, 44%) 1fr; min-height: 100vh; }
.login3-izq { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center;
  padding: 40px clamp(34px, 5vw, 78px); background: linear-gradient(165deg, #FFFDFB, var(--bg));
  border-radius: 0 56px 56px 0; box-shadow: 26px 0 60px rgba(46,42,69,.16); }
.login3-logo { position: absolute; top: 30px; left: clamp(34px, 5vw, 78px); height: 84px; animation: flotar 6s ease-in-out infinite; }
.login3-caja { max-width: 400px; width: 100%; margin: 0 auto; animation: aparecer .6s ease both; }
.login3-titulo { font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: 1.08; }
.login3-titulo span { background: linear-gradient(90deg, var(--coral-deep), var(--coral) 40%, var(--teal));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.login3-izq .sub { color: var(--gray); font-size: .92rem; margin: 8px 0 26px; }
.login3-izq label { display: flex; align-items: center; gap: 7px; }
.login3-izq label svg { width: 15px; height: 15px; color: var(--teal-deep); }
.login3-izq .input { padding: 12px 16px; border-radius: 14px; }
.login3-btn { width: 100%; justify-content: center; padding: 15px; font-size: 1.02rem; border-radius: 15px; }
.login3-der { position: relative; overflow: hidden; margin-left: -56px; padding: 44px 54px 34px calc(56px + 44px);
  display: flex; flex-direction: column;
  background: radial-gradient(760px 460px at 88% -8%, rgba(53,181,170,.4), transparent 60%),
              radial-gradient(700px 480px at -6% 112%, rgba(240,135,106,.34), transparent 55%),
              linear-gradient(150deg, #262138 0%, var(--ink) 45%, var(--teal-dark) 135%); }
.login3-der::before { content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1.5px, transparent 1.5px); background-size: 28px 28px; }
.adn-gigante { position: absolute; right: 52px; top: 40px; height: 150px; gap: 20px; opacity: .95; }
.adn-gigante span { width: 14px; }
.adn-gigante span::before, .adn-gigante span::after { width: 14px; height: 14px; }
.login3-frase { position: relative; color: #fff; font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.25; max-width: 430px; margin-top: 22px; animation: aparecer .7s .2s ease both; }
.login3-frase .comilla { font-size: 3rem; color: var(--coral); line-height: .6; margin-bottom: 6px; }
.login3-frase .t { color: var(--teal); } .login3-frase .c { color: var(--coral); }
.login3-frase small { display: block; font-family: 'Nunito', sans-serif; font-size: .85rem; color: #C9C4DD; margin-top: 10px; }
/* Logo protagonista del escenario (centrado respecto al área visible) */
.marca-wrap { position: relative; z-index: 3; align-self: center; left: -28px; margin: auto; }
/* Medallón oscuro: la onda pasa por detrás y el logo se lee limpio */
.marca-wrap::before { content: ''; position: absolute; inset: -130px -190px; border-radius: 50%; z-index: -1;
  background: radial-gradient(ellipse at center,
    rgba(33,29,53,.96) 0%, rgba(33,29,53,.82) 24%, rgba(33,29,53,.55) 44%,
    rgba(33,29,53,.3) 62%, rgba(33,29,53,.12) 78%, transparent 100%); }
.login3-marca { display: block; height: clamp(140px, 16vw, 200px); animation: flotar 5.5s ease-in-out infinite;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,.4)); }

/* Onda ADN de degradado animado */
@keyframes ondaMueve { to { transform: translateX(-50%); } }
.ondas { position: absolute; left: -4%; right: -4%; top: 44%; height: 120px; z-index: 0;
  display: flex; width: 208%; animation: ondaMueve 13s linear infinite; opacity: .8;
  filter: drop-shadow(0 0 14px rgba(240,135,106,.35)); pointer-events: none; }
.ondas svg { width: 50%; height: 100%; flex: none; }

/* Elenco asomándose desde abajo (sin pies) */
@keyframes asomar { from { transform: translateY(105%); } to { transform: translateY(0); } }
.elenco3 { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; justify-content: center;
  gap: clamp(4px, 2vw, 40px); align-items: flex-end; margin: 0; }
.elenco3 img { height: var(--h, clamp(150px, 17vw, 208px)); margin-bottom: -72px;
  animation: asomar .9s var(--d, 0s) cubic-bezier(.3,1.25,.5,1) both;
  transition: translate .25s ease-out; filter: drop-shadow(0 -6px 24px rgba(0,0,0,.35)); }
.elenco3 img { transition: translate .25s ease-out, margin-bottom .3s ease; }
.elenco3 img:hover { margin-bottom: -50px; }

.rasgos3 { position: relative; z-index: 2; margin-top: auto; margin-bottom: clamp(160px, 21vh, 220px);
  background: rgba(38,33,56,.6); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12); }
@media (max-width: 940px) {
  .login3 { grid-template-columns: 1fr; }
  .login3-izq { border-radius: 0; box-shadow: none; padding-top: 130px; }
  .login3-der { display: none; }
}

/* ---- Responsivo: menú hamburguesa y tablas ---- */
.hamb { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); align-items: center; justify-content: center; cursor: pointer; flex: none; }
.hamb svg { width: 20px; height: 20px; }
.sidebar-velo { display: none; position: fixed; inset: 0; background: rgba(33,29,53,.5); z-index: 49; }
.sidebar-velo.activo { display: block; }
@media (max-width: 900px) {
  .hamb { display: flex; }
  .topbar { padding: 12px 16px; gap: 10px; }
  .topbar h1 { font-size: 1.05rem; }
  .topbar .sub { display: none; }
  .buscador input { width: 130px; }
  .buscador input:focus { width: 160px; }
  .content .card { overflow-x: auto; }
  .grid { grid-template-columns: 1fr !important; }
  .banner-mod img { height: 68px; margin-top: -14px; }
  .hero { padding: 22px; }
  .kpi-solid .mascota { height: 60px; }
  #botBurbuja { right: 14px; bottom: 14px; }
  #botPanel { right: 8px; left: 8px; width: auto; }
}
