/* ==========================================================================
   Beyond The Sea — Panel Central · Sistema de diseño
   Tokens heredados de AcuarIA (C:\dev\acuaria-website\css\variables.css)
   para mantener una sola identidad en app + web + panel + tienda.
   ========================================================================== */

:root {
  /* Marca / navy */
  --navy-deep: #0D1B2A;
  --navy: #18344A;
  --navy-mid: #162D50;
  --navy-dark: #080F1A;

  /* Acento primario (teal) */
  --teal: #1BB8A0;
  --teal-light: #48D9C4;
  --teal-dark: #0F9682;

  /* Acento secundario (coral) */
  --coral: #FF6B35;
  --coral-light: #FF8A5B;

  /* Neutros premium */
  --cream: #F8F5F0;
  --cream-off: #F2EDE4;
  --white: #FFFFFF;
  --sand: #ECE4D6;

  /* Texto */
  --text-dark: #18344A;
  --text-muted: #6B7280;
  --text-on-dark: rgba(242, 237, 228, 0.88);

  /* Estados */
  --green: #22C55E;
  --gold: #EAB308;
  --red: #EF4444;
  --violet: #8B5CF6;

  /* Bordes */
  --border: #E6E0D6;
  --border-strong: #D8D0C2;

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, .05);
  --shadow-md: 0 2px 8px rgba(13, 27, 42, .06), 0 1px 2px rgba(13, 27, 42, .04);
  --shadow-lg: 0 12px 34px rgba(13, 27, 42, .10);
  --glow-teal: 0 8px 26px rgba(27, 184, 160, .28);

  /* Layout */
  --sidebar-w: 264px;
  --topbar-h: 64px;

  /* Marcas (color por marca) */
  --brand-bts: #1BB8A0;
  --brand-hygger: #2E90C4;
  --brand-pyc: #FF6B35;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html { background: var(--cream); }
body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: transparent;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display { font-family: 'Fraunces', Georgia, 'Times New Roman', serif; }

::selection { background: rgba(27, 184, 160, .22); }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { letter-spacing: -0.02em; }

/* Scrollbar sutil */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd6dd; border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b6bfc8; background-clip: content-box; }

/* --------------------------------------------------------------------------
   Layout shell
   -------------------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--navy-deep);
  color: var(--text-on-dark);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width .2s var(--ease), transform .26s var(--ease);
}

.sidebar__logo {
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  padding: 22px 22px 18px; margin-bottom: 4px;
}
.sidebar__logo img { height: 42px; width: auto; display: block; }
.sidebar__panel {
  font-size: 9.5px; letter-spacing: .28em; text-transform: uppercase; font-weight: 700;
  color: rgba(255,255,255,.5); padding-left: 2px;
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 9px; width: 100%;
}
.sidebar__wordmark { line-height: 1; }
.sidebar__wordmark b { display: block; font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 15px; letter-spacing: .04em; color: #fff; text-transform: uppercase; }
.sidebar__wordmark span { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.5); }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 6px 12px 20px; }
.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); }

.nav-group { margin-top: 16px; }
.nav-group__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.38); padding: 0 12px 8px; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: rgba(255,255,255,.72);
  font-size: 13.5px; font-weight: 500;
  transition: background .18s var(--ease), color .18s var(--ease);
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .82; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.is-active { background: rgba(27,184,160,.14); color: #fff; }
.nav-item.is-active svg { opacity: 1; color: var(--teal-light); }
.nav-item.is-active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--teal);
}
.nav-item__badge { margin-left: auto; font-size: 10.5px; font-weight: 700; background: var(--coral); color: #fff; border-radius: 999px; padding: 1px 7px; }

.sidebar__footer { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  background: rgba(248,245,240,.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}

.brand-switch {
  display: flex; align-items: center; gap: 9px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 6px 12px 6px 10px;
  font-size: 13px; font-weight: 600; color: var(--navy);
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.brand-switch:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.brand-switch { white-space: nowrap; }
.brand-switch svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .6; }
.searchbar svg { width: 18px; height: 18px; flex-shrink: 0; }

.brand-dot { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }
.brand-dot--all { background: linear-gradient(135deg,#1BB8A0,#FF6B35); }
.brand-dot--bts { background: var(--brand-bts); }
.brand-dot--hygger { background: var(--brand-hygger); }
.brand-dot--pyc { background: var(--brand-pyc); }

.searchbar {
  flex: 1; max-width: 440px;
  display: flex; align-items: center; gap: 9px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 8px 14px;
  color: var(--text-muted); font-size: 13px;
  cursor: text; transition: border-color .15s, box-shadow .15s;
}
.searchbar:hover { border-color: var(--border-strong); }
.searchbar kbd {
  margin-left: auto; font-family: inherit; font-size: 11px; font-weight: 600;
  background: var(--cream-off); border: 1px solid var(--border);
  border-radius: 6px; padding: 1px 6px; color: var(--text-muted);
}

.topbar__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-md);
  display: grid; place-items: center; color: var(--navy);
  background: transparent; border: none; cursor: pointer; position: relative;
  transition: background .15s;
}
.icon-btn:hover { background: rgba(13,27,42,.05); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; background: var(--coral); border-radius: 999px; border: 1.5px solid var(--cream); }

.avatar {
  width: 34px; height: 34px; border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  color: #fff; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; cursor: pointer;
}

.content { padding: 26px 30px 60px; max-width: 1360px; width: 100%; }

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.breadcrumb b { color: var(--navy); font-weight: 600; }
.page-title { font-size: 26px; font-weight: 800; color: var(--navy-deep); margin: 0; }
.page-sub { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  padding: 9px 16px; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .12s var(--ease), box-shadow .15s, background .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--teal); color: #04211d; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-dark); color: #fff; box-shadow: var(--glow-teal); }
.btn-dark { background: var(--navy-deep); color: #fff; }
.btn-dark:hover { background: var(--navy); }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--navy); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--border-strong); }
.btn-outline:hover { background: rgba(13,27,42,.04); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: rgba(13,27,42,.05); color: var(--navy); }
.btn-danger { background: #fff; color: var(--red); border-color: #f3c6c6; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.card--pad { padding: 20px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card__title { font-size: 14.5px; font-weight: 700; color: var(--navy-deep); }
.card__sub { font-size: 12px; color: var(--text-muted); }

/* Stat cards */
.stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-md); }
.stat__label { font-size: 12px; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat__icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.stat__value { font-size: 27px; font-weight: 800; color: var(--navy-deep); margin-top: 10px; letter-spacing: -0.02em; }
.stat__delta { font-size: 12px; font-weight: 600; margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; }
.delta-up { color: var(--green); }
.delta-down { color: var(--red); }

/* --------------------------------------------------------------------------
   Chips / badges de estado
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; line-height: 1;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.chip .d { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.chip-success { background: rgba(34,197,94,.12); color: #15803d; }
.chip-warn { background: rgba(234,179,8,.14); color: #a16207; }
.chip-danger { background: rgba(239,68,68,.11); color: #b91c1c; }
.chip-info { background: rgba(46,144,196,.12); color: #1e6f9c; }
.chip-teal { background: rgba(27,184,160,.13); color: #0f7f6f; }
.chip-neutral { background: rgba(13,27,42,.07); color: #475569; }
.chip-violet { background: rgba(139,92,246,.12); color: #6d28d9; }
.chip-coral { background: rgba(255,107,53,.13); color: #c2410c; }

/* Brand tag */
.brand-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--navy); }

/* --------------------------------------------------------------------------
   Tablas
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); font-weight: 600; padding: 11px 16px;
  border-bottom: 1px solid var(--border); background: #fbfaf7; white-space: nowrap;
}
.data-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-dark); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: #fbfaf7; }
.cell-primary { font-weight: 600; color: var(--navy-deep); }
.cell-muted { color: var(--text-muted); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--sand); flex-shrink: 0; border: 1px solid var(--border); }
.thumb-lg { width: 60px; height: 60px; border-radius: 12px; }

/* --------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.label { display: block; font-size: 12.5px; font-weight: 600; color: var(--navy); margin-bottom: 7px; }
.label .opt { color: var(--text-muted); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; font-family: inherit; font-size: 13.5px; color: var(--text-dark);
  background: var(--white); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(27,184,160,.16); }
.textarea { min-height: 96px; resize: vertical; }
.help { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; background: var(--cream-off); border: 1px solid var(--border-strong); color: var(--text-muted); font-size: 13px; font-weight: 600; }
.input-group .addon:first-child { border-right: none; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group .input { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* Segmented control */
.segmented { display: inline-flex; background: var(--cream-off); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px; }
.segmented button { border: none; background: transparent; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: all .15s; }
.segmented button.is-active { background: var(--white); color: var(--navy-deep); box-shadow: var(--shadow-sm); }

/* Toggle */
.toggle { width: 40px; height: 23px; border-radius: 999px; background: #cdd5db; position: relative; cursor: pointer; transition: background .18s; border: none; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 18px; height: 18px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s var(--ease); }
.toggle.is-on { background: var(--teal); }
.toggle.is-on::after { transform: translateX(17px); }

/* Filtros */
.filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--navy); background: var(--white); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); padding: 7px 13px; cursor: pointer; transition: all .15s; }
.filter-pill:hover { border-color: var(--navy); }
.filter-pill.is-active { background: var(--navy-deep); color: #fff; border-color: var(--navy-deep); }
.filter-pill svg { width: 14px; height: 14px; }

/* Divider */
.hr { height: 1px; background: var(--border); border: none; margin: 20px 0; }

/* Utilidad grid responsive */
.grid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 1100px) { .grid-stats { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-stats { grid-template-columns: 1fr; } .content { padding: 18px 16px 50px; } }

/* Avatar de cliente */
.cust-av { width: 34px; height: 34px; border-radius: 999px; background: var(--sand); color: var(--navy); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }

/* Placeholder de imagen tipo galería (con cáusticas de luz vivas) */
.reef-thumb { background: radial-gradient(120% 120% at 30% 20%, #2b6c8f 0%, #0d2a3f 55%, #071a29 100%); position: relative; overflow: hidden; }
.reef-thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 70% 75%, rgba(255,107,53,.5), transparent 60%), radial-gradient(40% 40% at 25% 70%, rgba(27,184,160,.55), transparent 60%); animation: breathe 6s ease-in-out infinite; }
.reef-thumb::before { content: ""; position: absolute; inset: -40%; background: repeating-linear-gradient(115deg, transparent 0 18px, rgba(120,220,255,.10) 18px 22px, transparent 22px 40px); mix-blend-mode: screen; animation: caustics 9s linear infinite; }

/* --------------------------------------------------------------------------
   Sidebar colapsable + responsive móvil
   -------------------------------------------------------------------------- */
.nav-toggle { color: var(--navy); }

/* Desktop colapsado → riel de solo iconos */
.app-shell.is-collapsed .sidebar { width: 74px; }
.app-shell.is-collapsed .sidebar__panel,
.app-shell.is-collapsed .sidebar__logo img[data-full],
.app-shell.is-collapsed .nav-group__label,
.app-shell.is-collapsed .nav-item span,
.app-shell.is-collapsed .nav-item__badge { display: none; }
.app-shell.is-collapsed .sidebar__logo { justify-content: center; padding: 20px 0 16px; }
.app-shell.is-collapsed .nav-item { justify-content: center; padding: 11px 0; }
.app-shell.is-collapsed .nav-group { margin-top: 10px; }
.app-shell.is-collapsed .nav-group__label { height: 4px; }
.app-shell.is-collapsed .nav-item.is-active::before { display: none; }

/* Backdrop del drawer móvil */
.nav-backdrop { position: fixed; inset: 0; background: rgba(8,15,26,.45); z-index: 110; opacity: 0; visibility: hidden; transition: opacity .2s ease; }
.nav-backdrop.show { opacity: 1; visibility: visible; }
@media (min-width: 1024px) { .nav-backdrop { display: none; } }

/* Móvil / tablet → sidebar off-canvas */
@media (max-width: 1023px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 120; transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .app-shell.nav-open .sidebar { transform: translateX(0); }
  /* En móvil el drawer siempre muestra las etiquetas completas (ignora colapso) */
  .app-shell.is-collapsed .sidebar { width: var(--sidebar-w); }
  .app-shell.is-collapsed .sidebar__panel,
.app-shell.is-collapsed .sidebar__logo img[data-full],
  .app-shell.is-collapsed .nav-group__label,
  .app-shell.is-collapsed .nav-item span,
  .app-shell.is-collapsed .nav-item__badge { display: revert; }
  .app-shell.is-collapsed .nav-item { justify-content: flex-start; padding: 9px 12px; }
  .app-shell.is-collapsed .sidebar__logo { justify-content: flex-start; padding: 20px 22px 16px; }
}

/* Topbar en pantallas chicas */
@media (max-width: 760px) { .searchbar { display: none; } }
@media (max-width: 520px) {
  #brandLabel { display: none; }
  .topbar { gap: 8px; padding: 0 14px; }
  .brand-switch { padding: 8px 10px; }
  .page-title { font-size: 22px; }
}

/* ==========================================================================
   FX · Animaciones, color y vida de océano
   ========================================================================== */
@keyframes reveal-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bubble-rise { 0% { transform: translateY(0) scale(1); opacity: 0; } 12% { opacity: .5; } 90% { opacity: .35; } 100% { transform: translateY(-260px) scale(1.15); opacity: 0; } }
@keyframes float-y { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes gradient-pan { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes pulse-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(27,184,160,.45); } 50% { box-shadow: 0 0 0 7px rgba(27,184,160,0); } }
@keyframes shimmer { 0% { transform: translateX(-120%); } 60%,100% { transform: translateX(220%); } }
@keyframes breathe { 0%,100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes caustics { 0% { transform: translate(0,0); } 100% { transform: translate(40px,40px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot-pulse { 0%,100% { r: 4; opacity: 1; } 50% { r: 6.5; opacity: .55; } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes hue-drift { 0%,100% { filter: hue-rotate(0deg); } 50% { filter: hue-rotate(-12deg); } }

/* Reveal escalonado del contenido al cargar */
@media (prefers-reduced-motion: no-preference) {
  .content > * { animation: reveal-up .55s var(--ease) both; }
  .content > *:nth-child(1){ animation-delay:.02s } .content > *:nth-child(2){ animation-delay:.08s }
  .content > *:nth-child(3){ animation-delay:.14s } .content > *:nth-child(4){ animation-delay:.20s }
  .content > *:nth-child(5){ animation-delay:.26s } .content > *:nth-child(6){ animation-delay:.32s }
  .content > *:nth-child(n+7){ animation-delay:.36s }
}

/* Texto con gradiente de marca */
.text-grad { background: linear-gradient(100deg, var(--teal) 0%, var(--teal-light) 40%, var(--coral) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Stat cards con color y acento animado */
.stat { position: relative; overflow: hidden; --accent1: var(--teal); --accent2: var(--teal-light); transition: transform .18s var(--ease), box-shadow .2s var(--ease); }
.stat::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--accent1), var(--accent2)); background-size: 200% 100%; animation: gradient-pan 4s linear infinite alternate; }
.stat:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--accent1) 55%, transparent); }
.stat.accent-teal   { --accent1:#1BB8A0; --accent2:#48D9C4; }
.stat.accent-blue   { --accent1:#2E90C4; --accent2:#48D9C4; }
.stat.accent-coral  { --accent1:#FF6B35; --accent2:#FF8A5B; }
.stat.accent-violet { --accent1:#8B5CF6; --accent2:#48D9C4; }
.stat.accent-gold   { --accent1:#EAB308; --accent2:#FF8A5B; }
.stat__icon { transition: transform .25s var(--ease); }
.stat:hover .stat__icon { transform: scale(1.12) rotate(-4deg); }

/* Cards: elevación + glow suave al hover */
.card { transition: transform .18s var(--ease), box-shadow .22s var(--ease); }
.card:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -16px rgba(13,27,42,.28); }

/* Botón primario con brillo que barre */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-120%); }
.btn-primary:hover::after { animation: shimmer 1.1s var(--ease); }

/* Puntos de marca con latido */
.brand-dot { position: relative; }
.stat .brand-dot, .brand-tag .brand-dot { animation: float-y 4s ease-in-out infinite; }

/* Barras de progreso: relleno animado + gradiente */
.prog > i { transition: width 1.1s var(--ease); background-image: linear-gradient(90deg, rgba(255,255,255,.25), rgba(255,255,255,0)) !important; background-blend-mode: overlay; }

/* Chips WYSIWYG / estado con leve pulso */
.chip-teal { animation: none; }

/* Nav activo: glow que respira */
@media (prefers-reduced-motion: no-preference) {
  .nav-item.is-active::before { animation: pulse-glow 2.6s ease-in-out infinite; }
}
.nav-item svg { transition: transform .2s var(--ease); }
.nav-item:hover svg { transform: translateX(1px) scale(1.08); }

/* Burbujas ambientales del sidebar */
.sidebar__bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.sidebar__logo, .sidebar__nav, .sidebar__footer { position: relative; z-index: 1; }
.bubble { position: absolute; bottom: -20px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(120,220,255,.5), rgba(27,184,160,.18)); box-shadow: 0 0 8px rgba(72,217,196,.35); animation: bubble-rise linear infinite; }

/* Resplandor aquático inferior del sidebar */
.sidebar::after { content: ""; position: absolute; left: -30%; right: -30%; bottom: -60px; height: 180px; background: radial-gradient(closest-side, rgba(27,184,160,.34), transparent 70%); pointer-events: none; animation: breathe 7s ease-in-out infinite; }

/* Gráfica: trazo que se dibuja + punto que late */
.spark-line { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.6s var(--ease) forwards; }
.spark-area { opacity: 0; animation: reveal-up .9s ease .5s forwards; }
.spark-dot { animation: dot-pulse 2.2s ease-in-out infinite; }

/* Avatares / iconos gradiente con leve deriva de color */
.avatar, .cust-av { animation: hue-drift 10s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .content > *, .spark-line, .spark-area, .stat::before, .nav-item.is-active::before,
  .reef-thumb::after, .reef-thumb::before, .bubble, .sidebar::after, .avatar, .cust-av { animation: none !important; }
  .spark-line { stroke-dashoffset: 0; }
  .spark-area { opacity: 1; }
}

/* ==========================================================================
   FX 2 · Océano inmersivo (fondo vivo, rayos de luz, peces, olas)
   ========================================================================== */
@keyframes drift { 0% { transform: translate(0,0); } 100% { transform: translate(3%,2%); } }
@keyframes swim { from { transform: translateX(-140px) scaleX(1); } to { transform: translateX(120vw) scaleX(1); } }
@keyframes swim-back { from { transform: translateX(120vw) scaleX(-1); } to { transform: translateX(-140px) scaleX(-1); } }
@keyframes sway { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes wave-x { to { transform: translateX(-50%); } }

/* Fondo ambiental submarino (fijo, detrás de todo) */
.ocean-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ocean-bg::before {
  content: ""; position: absolute; inset: -25%;
  background:
    radial-gradient(30% 34% at 14% 18%, rgba(27,184,160,.20), transparent 60%),
    radial-gradient(28% 30% at 86% 12%, rgba(46,144,196,.17), transparent 60%),
    radial-gradient(34% 34% at 78% 88%, rgba(255,107,53,.12), transparent 60%),
    radial-gradient(30% 30% at 22% 90%, rgba(139,92,246,.12), transparent 60%);
  animation: drift 26s ease-in-out infinite alternate;
}
.ocean-bg .rays { position: absolute; inset: -45%; background: repeating-linear-gradient(101deg, transparent 0 44px, rgba(120,205,255,.055) 44px 49px, transparent 49px 95px); animation: caustics 18s linear infinite; }

/* Peces silueta que nadan */
.fish { position: absolute; background-repeat: no-repeat; background-size: contain; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 56'%3E%3Cpath fill='%23ffffff' d='M6 28C20 8 52 4 74 16c6-6 15-9 20-10-4 6-5 12-3 18 2 6 6 11 12 14-8 2-19 1-27-6C54 44 22 42 6 28Z'/%3E%3Ccircle cx='26' cy='24' r='2.6' fill='%230d1b2a'/%3E%3C/svg%3E"); }

/* Divisor inferior retirado: era una ola SVG con borde duro (la "raya") sobre la
   tarjeta redondeada. Ya no se usa — el hero es una tarjeta de gradiente limpia. */
.wave-divider { display: none; }

/* Vaivén suave del gradiente del hero — recorre solo el centro del degradado,
   nunca envuelve el extremo oscuro hacia un borde (evita la franja dura). */
@keyframes ocean-hero-pan { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }

/* ---- Banner "ocean hero" reutilizable ---- */
.ocean-hero {
  position: relative; overflow: hidden; border-radius: 22px; color: #fff;
  padding: 30px 34px; margin-bottom: 22px;
  background: linear-gradient(118deg, #0d2c42 0%, #124a5e 46%, #12907f 100%);
  background-size: 150% 150%; background-repeat: no-repeat;
  animation: ocean-hero-pan 16s ease-in-out infinite alternate;
  box-shadow: 0 20px 44px -20px rgba(11,27,42,.55);
}
.ocean-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(46% 78% at 90% 6%, rgba(72,217,196,.42), transparent 62%), radial-gradient(52% 90% at 4% 104%, rgba(255,107,53,.24), transparent 60%);
  animation: breathe 9s ease-in-out infinite; }
.ocean-hero > * { position: relative; z-index: 3; }
.ocean-hero .bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.ocean-hero .fish { z-index: 2; }
.ocean-hero .eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.66); font-weight: 600; }
.ocean-hero h1 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: clamp(26px,3.4vw,38px); margin: 6px 0 6px; line-height: 1.06; }
.ocean-hero p { color: rgba(255,255,255,.78); font-size: 14px; margin: 0; }
.ocean-hero .btn-secondary { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.ocean-hero .btn-secondary:hover { background: rgba(255,255,255,.2); border-color: #fff; }
.ocean-hero .btn-primary { background: linear-gradient(100deg, var(--teal-light), var(--teal)); color: #04211d; }

/* KPIs vívidos: fondo tintado + número con gradiente */
.stat.vivid { background: linear-gradient(160deg, color-mix(in srgb, var(--accent1) 12%, #fff) 0%, #fff 65%); border-color: color-mix(in srgb, var(--accent1) 26%, var(--border)); }
.stat.vivid .stat__value { background: linear-gradient(100deg, var(--accent1), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Título de página con acento animado */
.page-title { position: relative; }
.accent-underline { display: inline-block; height: 4px; width: 54px; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--coral)); background-size: 200% 100%; animation: gradient-pan 4s linear infinite alternate; margin-top: 10px; }

/* Chips de cuidado (livestock) coloreados por tipo */
.care .c.t-sps { background: rgba(27,184,160,.16); color: #0f7f6f; }
.care .c.t-lps { background: rgba(139,92,246,.14); color: #6d28d9; }
.care .c.t-soft { background: rgba(46,144,196,.14); color: #1e6f9c; }
.care .c.t-fish { background: rgba(255,107,53,.14); color: #c2410c; }
.care .c.t-inv { background: rgba(234,179,8,.16); color: #a16207; }

/* Hover más vivo en tarjetas de galería */
.spec-card:hover { box-shadow: 0 20px 42px -18px rgba(27,184,160,.5); }
.spec-card:hover .spec-photo::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .ocean-bg *, .ocean-bg::before, .fish, .wave-divider svg, .ocean-hero, .accent-underline { animation: none !important; }
}

/* Sidebar colapsado: logo compacto */
.app-shell.is-collapsed .sidebar__panel { display: none; }
.app-shell.is-collapsed .sidebar__logo { align-items: center; padding: 20px 0 16px; }
.app-shell.is-collapsed .sidebar__logo img { height: 30px; }
