/* PeptiTrack Pro — estilos de la app. Los tokens de diseño compartidos con la tienda viven en tokens.css */

/* ─── BASE RESET ────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.55;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.35s ease, color 0.35s ease;
  padding-bottom: 60px;
  /* Subtle grid pattern background */
  background-image:
    radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(129, 140, 248, 0.05) 0%, transparent 50%),
    linear-gradient(rgba(99, 130, 201, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 130, 201, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}

[data-theme="light"] body,
body[data-theme="light"] {
  background-image:
    radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.04) 0%, transparent 50%);
  background-size: 100%, 100%;
}

/* ─── LAYOUT ────────────────────────────────────────────────────── */
.app-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── HEADER ────────────────────────────────────────────────────── */
.main-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: var(--bg-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border-glass);
  transition: background 0.35s ease, border-color 0.35s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
}

/* ─── BRAND LOGO ─────────────────────────────────────────────────── */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-accent) 0%, var(--cyan-accent) 100%);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 16px var(--primary-glow), 0 4px 12px rgba(0,0,0,0.3);
  animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 16px var(--primary-glow), 0 4px 12px rgba(0,0,0,0.3); }
  50%       { box-shadow: 0 0 28px var(--primary-glow), 0 4px 16px rgba(0,0,0,0.4); }
}

.brand-logo span strong {
  color: var(--primary-accent);
}

/* ─── NAV TABS ──────────────────────────────────────────────────── */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  max-width: 680px;
}

.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab-btn {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.06);
}

.nav-tab-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.15));
  color: var(--primary-accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* ─── HEADER ACTIONS ─────────────────────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--amber-accent);
  color: var(--amber-accent);
  box-shadow: 0 0 12px var(--amber-glow);
  transform: rotate(20deg);
}

/* Quick Plus Button */
.btn-quick-plus {
  background: linear-gradient(135deg, var(--primary-accent), var(--cyan-accent));
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 16px var(--primary-glow), 0 4px 12px rgba(0,0,0,0.3);
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.btn-quick-plus:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 24px var(--primary-glow), 0 6px 18px rgba(0,0,0,0.35);
}

.btn-quick-plus span:first-child {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

/* User Profile Button */
.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
  transition: var(--transition);
  white-space: nowrap;
}

.user-profile-btn:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ─── MAIN CONTENT ───────────────────────────────────────────────── */
.main-content {
  padding-top: 24px;
}

/* ─── GLASS CARD UTILITY ─────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-md), 0 0 20px var(--primary-glow);
}

/* ─── HERO BANNER ────────────────────────────────────────────────── */
.hero-banner {
  position: relative;
  background: linear-gradient(
    130deg,
    rgba(16, 185, 129, 0.12) 0%,
    rgba(6, 182, 212, 0.08) 40%,
    rgba(129, 140, 248, 0.07) 100%
  );
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: 10%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  background: linear-gradient(90deg, var(--text-main) 0%, var(--primary-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-content p {
  color: var(--text-sub);
  font-size: 12.5px;
  max-width: 500px;
  line-height: 1.5;
}

/* ─── STAT CARDS ─────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

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

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--stat-color, var(--primary-accent)), transparent);
  opacity: 0.7;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--stat-color, var(--primary-accent));
  box-shadow: var(--shadow-md), 0 0 18px rgba(var(--stat-r, 16), var(--stat-g, 185), var(--stat-b, 129), 0.2);
}

.stat-card.stat-green  { --stat-color: var(--primary-accent); }
.stat-card.stat-cyan   { --stat-color: var(--cyan-accent); }
.stat-card.stat-purple { --stat-color: var(--purple-accent); }
.stat-card.stat-amber  { --stat-color: var(--amber-accent); }

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.green  { background: rgba(16, 185, 129, 0.15); box-shadow: 0 0 10px rgba(16, 185, 129, 0.25); }
.stat-icon.blue   { background: rgba(6, 182, 212, 0.15);  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25); }
.stat-icon.purple { background: rgba(192, 132, 252, 0.15); box-shadow: 0 0 10px rgba(192, 132, 252, 0.25); }
.stat-icon.amber  { background: rgba(251, 191, 36, 0.15);  box-shadow: 0 0 10px rgba(251, 191, 36, 0.25); }

.stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1.1;
  color: var(--text-main);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ─── UNIFORM DASHBOARD GRID ─────────────────────────────────────── */
.dashboard-grid-equal { align-items: start;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 860px) {
  .dashboard-grid-equal { align-items: start; grid-template-columns: 1fr; }
}

.dashboard-uniform-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 280px;
  transition: var(--transition);
}

.dashboard-uniform-card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-md);
}

.dashboard-uniform-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── CALENDAR ───────────────────────────────────────────────────── */
.calendar-card-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  transition: var(--transition);
}

.calendar-card-wrapper:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-md);
}

.calendar-header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar-month-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  text-align: center;
}

.calendar-day-header {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-day-cell {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  min-height: 46px;
  padding: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.calendar-day-cell:hover {
  border-color: var(--primary-accent);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 8px var(--primary-glow);
}

.calendar-day-cell.day-empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.calendar-day-cell.day-today {
  border-color: var(--primary-accent);
  background: rgba(16, 185, 129, 0.14);
  box-shadow: 0 0 12px var(--primary-glow), inset 0 0 8px rgba(16,185,129,0.1);
}

.calendar-day-cell.day-selected {
  background: linear-gradient(135deg, var(--primary-accent), var(--cyan-accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

.day-dot-completed {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary-accent);
  box-shadow: 0 0 4px var(--primary-glow);
}

.day-dot-pending {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber-accent);
  box-shadow: 0 0 4px var(--amber-glow);
}

/* ─── INTERACTIVE SEARCH HEADER ──────────────────────────────────── */
.interactive-search-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.interactive-search-container:focus-within {
  border-color: var(--primary-accent);
  box-shadow: var(--shadow-md), 0 0 20px var(--primary-glow);
}

.search-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 640px) {
  .search-bar-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.btn-search-back {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-search-back:hover {
  border-color: var(--cyan-accent);
  color: var(--cyan-accent);
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 10px var(--cyan-glow);
  transform: translateX(-2px);
}

.search-input-box-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-magnifier-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.2s ease;
}

.search-input-field {
  width: 100%;
  height: 46px;
  padding: 0 56px 0 44px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: var(--transition);
}

.search-input-field::placeholder { color: var(--text-muted); }

.search-input-field:hover {
  border-color: var(--border-glass);
  background: var(--bg-surface);
}

.search-input-field:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px var(--primary-glow), 0 2px 12px rgba(0,0,0,0.2);
  background: var(--bg-surface);
}

.search-input-box-wrapper:focus-within .search-magnifier-icon {
  color: var(--primary-accent);
}

.esc-kbd-badge {
  position: absolute;
  right: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.esc-kbd-badge:hover {
  border-color: var(--rose-accent);
  color: var(--rose-accent);
  box-shadow: 0 0 8px var(--rose-glow);
}

.sort-select-wrapper { flex-shrink: 0; }

.sort-select-field {
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.sort-select-field:hover {
  border-color: var(--cyan-accent);
  box-shadow: 0 0 8px var(--cyan-glow);
}

/* Research Areas */
.research-areas-header {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.category-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-chip-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cat-chip-btn:hover {
  border-color: var(--cyan-accent);
  color: var(--cyan-accent);
  background: rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.cat-chip-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.2));
  color: var(--primary-accent);
  border-color: var(--primary-accent);
  box-shadow: 0 0 14px var(--primary-glow);
  animation: chipActivate 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes chipActivate {
  0%   { transform: scale(0.92); }
  60%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ─── PEPTIDE CARD GRID ───────────────────────────────────────────── */
.peptides-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 480px) {
  .peptides-card-grid { grid-template-columns: 1fr; }
}

.peptide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  animation: fadeInScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.peptide-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-cap-color, var(--primary-accent));
  opacity: 0.9;
}

.peptide-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 90% 10%,
    rgba(var(--card-r,16), var(--card-g,185), var(--card-b,129), 0.05) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.peptide-card:hover {
  border-color: var(--card-cap-color, var(--primary-accent));
  box-shadow: var(--shadow-md), 0 0 20px rgba(var(--card-r,16), var(--card-g,185), var(--card-b,129), 0.2);
  transform: translateY(-4px);
}

.peptide-card:hover .vial-svg {
  transform: translateY(-5px) scale(1.07);
  filter: drop-shadow(0 4px 12px rgba(var(--card-r,16), var(--card-g,185), var(--card-b,129), 0.4));
}

@keyframes fadeInScale {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.peptide-card-body-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.vial-graphic-wrapper {
  width: 88px;
  height: 138px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  --bench-y: 80%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.vial-svg {
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
}

.peptide-card-main-info { flex: 1; min-width: 0; }

.peptide-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.peptide-rank-tag {
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
  border: 1px solid var(--border-color);
}

.peptide-rank-tag.top3 {
  background: rgba(251, 191, 36, 0.15);
  color: var(--amber-accent);
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 8px var(--amber-glow);
}

.peptide-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
  line-height: 1.2;
}

.peptide-alt-names {
  font-size: 11px;
  color: var(--text-muted);
}

.badge-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-a { background: rgba(16, 185, 129, 0.15);  color: var(--primary-accent);  border: 1px solid rgba(16,185,129,0.3); }
.badge-b { background: rgba(251, 191, 36, 0.15);  color: var(--amber-accent);    border: 1px solid rgba(251,191,36,0.3); }
.badge-c { background: rgba(251, 113, 133, 0.15); color: var(--rose-accent);     border: 1px solid rgba(251,113,133,0.3); }

.peptide-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
  font-size: 10.5px;
}

.meta-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 3px 7px;
  border-radius: 5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.peptide-desc {
  font-size: 11.5px;
  color: var(--text-sub);
  line-height: 1.45;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.peptide-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

/* ─── BUTTONS ────────────────────────────────────────────────────── */
.btn-primary, .btn-secondary {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-accent), var(--cyan-accent));
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow), 0 3px 10px rgba(0,0,0,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--primary-glow), 0 5px 15px rgba(0,0,0,0.35);
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
}

.btn-secondary:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ─── FILTER SELECT ──────────────────────────────────────────────── */
.filter-select {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-sub);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.filter-select:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 8px var(--primary-glow);
}

/* PK Mode Switcher */
.pk-mode-switch {
  display: inline-flex;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.pk-mode-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pk-mode-btn:hover {
  color: var(--text-main);
}
.pk-mode-btn.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary-accent);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 8px var(--primary-glow);
}
.pk-mode-btn.active.plasma {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.2);
}

/* ─── CALCULATOR ─────────────────────────────────────────────────── */
.calculator-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 840px) {
  .calculator-panel { grid-template-columns: 1fr; }
}

.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.calc-card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-md);
}

.form-group { margin-bottom: 15px; }

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 8px var(--primary-glow);
}

.form-input::placeholder { color: var(--text-muted); }

/* ─── SYRINGE VISUALIZER ─────────────────────────────────────────── */
.syringe-visualizer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.syringe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.syringe-title { font-size: 14px; font-weight: 700; }
.syringe-subtitle { font-size: 12px; color: var(--text-muted); }

.syringe-badge-pill {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary-accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 8px var(--primary-glow);
}

.syringe-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ─── WARNING / SYMPTOM CARDS ────────────────────────────────────── */
.warning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.warning-symptom-card {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.warning-symptom-card.warning {
  border-left: 3px solid var(--amber-accent);
  background: rgba(251, 191, 36, 0.07);
}

.warning-symptom-card.info {
  border-left: 3px solid var(--cyan-accent);
  background: rgba(6, 182, 212, 0.07);
}

.warning-symptom-card.logged-active {
  border-color: var(--primary-accent);
  box-shadow: 0 0 10px var(--primary-glow);
}

.warning-symptom-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.warning-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.warning-title { font-size: 12.5px; font-weight: 700; flex: 1; }
.warning-tag   { font-size: 10px; font-weight: 700; color: var(--primary-accent); }
.warning-desc  { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* ─── MODAL ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: var(--shadow-lg), 0 0 40px var(--primary-glow);
  position: relative;
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.93) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close-btn:hover {
  border-color: var(--rose-accent);
  color: var(--rose-accent);
  box-shadow: 0 0 10px var(--rose-glow);
}

/* ─── PRESET STACKS ───────────────────────────────────────────────── */
.preset-stacks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.preset-stack-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.preset-stack-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-md), 0 0 20px var(--primary-glow);
}

.preset-stack-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.synergy-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ─── BODY MAP ────────────────────────────────────────────────────── */
.bodymap-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 820px) {
  .bodymap-layout-grid { grid-template-columns: 1fr; }
}

.body-map-svg { width: 220px; height: 300px; }

.body-site-node {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), fill 0.3s ease;
}

.body-site-node:hover {
  transform: scale(1.35);
  filter: drop-shadow(0 0 8px rgba(16,185,129,0.7));
}

.site-rotation-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}

.site-rotation-item:hover {
  background: var(--bg-card);
  border-color: var(--primary-accent);
  transform: translateX(4px);
  box-shadow: 0 0 10px var(--primary-glow);
}

.site-rotation-item.red    { border-left: 4px solid var(--rose-accent); }
.site-rotation-item.yellow { border-left: 4px solid var(--amber-accent); }
.site-rotation-item.green  { border-left: 4px solid var(--primary-accent); }

/* ─── PAGE SECTION HEADERS ───────────────────────────────────────── */
.page-section-header {
  margin-bottom: 22px;
}

.page-section-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--text-main) 0%, var(--primary-accent) 120%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.page-section-header p {
  color: var(--text-muted);
  font-size: 13px;
}

/* ─── INFO BANNER ────────────────────────────────────────────────── */
.info-banner {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 11.5px;
  color: var(--primary-accent);
  margin-top: 16px;
}

/* ─── SCROLLBAR ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── SELECTION ──────────────────────────────────────────────────── */
::selection {
  background: rgba(16, 185, 129, 0.3);
  color: var(--text-main);
}

/* ─── LIGHT THEME OVERRIDES FOR SPECIFIC ELEMENTS ───────────────── */
[data-theme="light"] .hero-banner {
  background: linear-gradient(130deg, rgba(16,185,129,0.08) 0%, rgba(6,182,212,0.06) 100%);
}

[data-theme="light"] .nav-tabs {
  background: rgba(0,0,0,0.04);
}

[data-theme="light"] .nav-tab-btn.active {
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(6,182,212,0.1));
}

[data-theme="light"] .calendar-day-cell:hover {
  background: rgba(16, 185, 129, 0.06);
}

[data-theme="light"] .cat-chip-btn {
  background: #fff;
  color: #3a4a62;
}

[data-theme="light"] .cat-chip-btn:hover {
  background: rgba(6, 182, 212, 0.07);
}

[data-theme="light"] body {
  background-image:
    radial-gradient(circle at 20% 10%, rgba(16,185,129,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(99,102,241,0.04) 0%, transparent 50%);
}

/* ─── PROTOCOL ITEM ──────────────────────────────────────────────── */
.protocol-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.protocol-item:hover {
  border-color: var(--primary-accent);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ─── DOSE HISTORY ITEM ──────────────────────────────────────────── */
.dose-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 12.5px;
  color: var(--text-sub);
}

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

/* ─── RESPONSIVE UTILITIES ───────────────────────────────────────── */
@media (max-width: 640px) {
  .main-header .brand-logo span:not(.logo-icon) { display: none; }
  .hero-banner { flex-direction: column; align-items: flex-start; }
  .hero-content h1 { font-size: 16px; }
  .user-profile-btn span:last-child { display: none; }
}

/* ─── INTEGRACIÓN TIENDA PURELABMX ────────────────────────── */
.brand-by {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-top: -3px;
}

.store-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: var(--radius-full);
  background: var(--gold-accent);
  color: #0b1530;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 0 12px var(--gold-glow);
  transition: var(--transition);
  white-space: nowrap;
}
.store-link-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.store-link-btn[hidden] { display: none; }

.btn-buy {
  background: var(--gold-accent);
  color: #0b1530;
  border: none;
  box-shadow: 0 0 10px var(--gold-glow);
  text-decoration: none;
}
.btn-buy:hover { filter: brightness(1.05); transform: translateY(-2px); }

.store-price-chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(242, 177, 41, 0.12);
  border: 1px solid rgba(242, 177, 41, 0.35);
  color: var(--gold-accent);
}
[data-theme="light"] .store-price-chip { color: #92400e; }

.vial-graphic-wrapper .pep-vial { width: 100%; height: 100%; }
.peptide-card:hover .pep-vial {
  transform: translateY(-5px) scale(1.07);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 3000;
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg), 0 0 18px var(--primary-glow);
  font-size: 13px;
  font-weight: 600;
  animation: fadeInScale 0.3s ease;
}

@media (max-width: 640px) {
  .store-link-btn span { display: none; }
  .brand-by { display: none; }
}
.protocol-vial { width: 100%; height: 100%; }

/* ─── CUENTA, SINCRONIZACIÓN Y AVISOS RUO ────────────────────────── */
.sync-bar { display: flex; justify-content: flex-end; padding: 10px 0 0; }
#syncStatus { font-size: 11.5px; font-family: var(--font-mono); color: var(--text-muted); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-color); background: var(--bg-card); }
#syncStatus[data-kind="ok"] { color: var(--primary-accent); border-color: rgba(16,185,129,.35); }
#syncStatus[data-kind="saving"] { color: var(--amber-accent); }
#syncStatus[data-kind="error"] { color: var(--rose-accent); border-color: rgba(251,113,133,.45); }
.tracker-ruo-strip { margin: 10px 0 14px; }
.tracker-footer { margin: 40px 0 10px; display: grid; gap: 12px; }
.tracker-footer p { font-size: 12px; color: var(--text-muted); text-align: center; }
.account-summary { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); background: var(--bg-surface); border: 1px solid var(--border-color); }
.account-summary-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary-accent), var(--cyan-accent)); }
.store-price-chip.soldout { background: rgba(220, 38, 38, .12); border-color: rgba(220, 38, 38, .4); color: #f87171; text-decoration: none; }
.btn-buy.is-soldout { filter: grayscale(1); opacity: .6; box-shadow: none; }

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 8px 0; row-gap: 8px; }
  .main-header { height: auto; }
  .nav-tabs { order: 3; flex-basis: 100%; max-width: none; }
  .btn-quick-plus { padding: 8px 12px; }
  .user-profile-btn { padding: 6px 10px; }
}

/* ─── CALCULADORA: AVISO OBLIGATORIO Y QUIZ DE SIMULACIÓN ────────── */
.sim-tag { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; vertical-align: middle;
  padding: 3px 8px; border-radius: 6px; background: rgba(242,177,41,.15); color: var(--gold-accent); border: 1px solid rgba(242,177,41,.4); }
[data-theme="light"] .sim-tag { color: #92400e; }
.calc-ack-gate { display: grid; gap: 14px; margin-bottom: 20px; }
.calc-ack-check { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: var(--radius-sm); cursor: pointer;
  background: rgba(242,177,41,.08); border: 1px solid rgba(242,177,41,.45); font-size: 13px; color: var(--text-sub); line-height: 1.55; }
.calc-ack-check strong { color: var(--text-main); }
.calc-ack-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary-accent); flex-shrink: 0; }
.quiz-card { margin-top: 20px; display: grid; gap: 14px; }
.quiz-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.quiz-head h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.quiz-head p { font-size: 12.5px; color: var(--text-muted); max-width: 640px; }
.quiz-score { text-align: center; padding: 8px 14px; border-radius: var(--radius-sm); background: var(--bg-main); border: 1px solid var(--border-color); flex-shrink: 0; }
.quiz-score span { display: block; font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--primary-accent); }
.quiz-score small { font-size: 10.5px; color: var(--text-muted); }
.quiz-body { display: grid; gap: 12px; }
.quiz-prompt { font-size: 14.5px; line-height: 1.6; padding: 14px; border-radius: var(--radius-sm); background: var(--bg-main); border: 1px solid var(--border-color); }
.quiz-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.quiz-form .form-input { max-width: 200px; }
.quiz-form .btn-primary { flex: 0 0 auto; }
.quiz-unit { font-family: var(--font-mono); color: var(--text-muted); font-size: 13px; }
.quiz-feedback { padding: 14px; border-radius: var(--radius-sm); display: grid; gap: 10px; font-size: 13px; line-height: 1.6; }
.quiz-feedback.ok { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.4); }
.quiz-feedback.bad { background: rgba(251,113,133,.08); border: 1px solid rgba(251,113,133,.4); }
.quiz-verdict { font-weight: 700; }
.quiz-expl { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-sub); }
.quiz-source { font-size: 11.5px; color: var(--text-muted); }
.quiz-disclaimer { font-size: 12px; padding: 10px; border-radius: 8px; background: rgba(242,177,41,.1); border: 1px dashed rgba(242,177,41,.5); color: var(--text-main); }
@media (max-width: 640px) { .quiz-head { flex-direction: column; } .quiz-form .form-input { max-width: none; flex: 1; } }

/* ─── SELECTS CON BÚSQUEDA INTEGRADA (SEARCHABLE COMBOBOX) ────────── */
.searchable-select-wrap {
  position: relative;
  width: 100%;
}
.searchable-select-trigger {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: left;
}
.searchable-select-trigger:focus,
.searchable-select-wrap.open .searchable-select-trigger {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  outline: none;
}
.searchable-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-grow: 1;
}
.searchable-select-arrow {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.searchable-select-wrap.open .searchable-select-arrow {
  transform: rotate(180deg);
}
.searchable-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 1000;
  overflow: hidden;
  animation: fadeIn 0.15s ease;
}
.searchable-select-wrap.open .searchable-select-dropdown {
  display: flex;
  flex-direction: column;
}
.searchable-select-search-box {
  padding: 8px;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 6px;
}
.searchable-select-search-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: var(--bg-surface);
  color: var(--text-main);
}
.searchable-select-search-input:focus {
  border-color: var(--primary-accent);
}
.searchable-select-options {
  max-height: 220px;
  overflow-y: auto;
  list-style: none;
  padding: 4px;
  margin: 0;
}
.searchable-select-option {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-main);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.searchable-select-option:hover,
.searchable-select-option.highlighted {
  background: rgba(16, 185, 129, 0.12);
}
.searchable-select-option.selected {
  background: rgba(16, 185, 129, 0.2);
  color: var(--primary-accent);
  font-weight: 600;
}
.searchable-select-empty {
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
}

.time-picker-elegant {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  color: var(--cyan-accent);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}
.time-picker-elegant:hover, .time-picker-elegant:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
}
/* Style the clock icon specifically for webkit (Chrome/Safari/Mobile) */
.time-picker-elegant::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: brightness(0.8) sepia(1) hue-rotate(120deg) saturate(3);
  opacity: 0.7;
  transition: opacity 0.2s;
}
.time-picker-elegant:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
}

/* ─── MODAL DE ADHERENCIA Y CONSEJOS CLÍNICOS ───────────────────────── */
#cardAdherenceRate {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
#cardAdherenceRate:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.adherence-hero-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.adherence-score-ring {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.adherence-score-val {
  font-size: 38px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #f59e0b;
  line-height: 1;
}

.adherence-score-label {
  font-size: 13px;
  color: var(--text-muted);
}

.adherence-peptide-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-accent);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.adherence-peptide-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.adherence-peptide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.adherence-peptide-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.adherence-grid-tips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .adherence-grid-tips {
    grid-template-columns: 1fr;
  }
}

.adherence-tip-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.adherence-tip-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.adherence-tip-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.adherence-universal-box {
  background: rgba(6, 182, 212, 0.04);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 20px;
}

.adherence-universal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .adherence-universal-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── FICHAS DE PROTOCOLO Y CONTROL DE VIALES ───────────────────────── */
.protocol-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

@media (max-width: 680px) {
  .protocol-cards-grid {
    grid-template-columns: 1fr;
  }
}

.protocol-card-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: visible;
}

.protocol-card-item:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md), 0 0 20px rgba(16, 185, 129, 0.1);
}

.protocol-card-item.is-near-empty {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.vial-alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.4;
}

.vial-alert-banner.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #f59e0b;
  animation: pulseAmber 2.5s infinite;
}

.vial-alert-banner.alert-finished {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #ef4444;
  animation: pulseRed 2.5s infinite;
}

@keyframes pulseAmber {
  0%, 100% { box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.35); }
}

@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.35); }
}

.vial-level-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.vial-level-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease, background-color 0.5s ease;
}

.protocol-bottle-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.bottle-stat-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--text-sub);
}

.bottle-stat-row .stat-bullet {
  font-size: 13px;
  flex-shrink: 0;
}

.pulse-btn {
  animation: pulseBtn 2s infinite;
}

@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 0 0 rgba(16, 185, 129, 0); }
  50% { box-shadow: 0 0 14px rgba(16, 185, 129, 0.5); }
}

/* ─── Efectos Parallax & Depth 3D (Tracker) ───────────────────────── */
.scroll-progress-bar {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--primary-accent), var(--cyan-accent), var(--indigo-accent));
  transform-origin: left center; transform: scaleX(0);
  transition: transform .08s linear; z-index: 210;
  box-shadow: 0 0 10px var(--primary-glow);
}
.main-header.header-scrolled {
  background: var(--bg-card);
  border-bottom-color: var(--border-active);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.parallax-bg-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden;
}
.parallax-orb {
  position: absolute; border-radius: 50%; filter: blur(75px); opacity: .4;
  will-change: transform; transition: margin-left .4s cubic-bezier(.16,1,.3,1);
}
.parallax-orb.orb-1 {
  width: 520px; height: 520px; top: -100px; left: -120px;
  background: radial-gradient(circle, rgba(16,185,129,.18) 0%, rgba(6,182,212,.08) 50%, transparent 70%);
}
.parallax-orb.orb-2 {
  width: 600px; height: 600px; top: 35%; right: -160px;
  background: radial-gradient(circle, rgba(129,140,248,.16) 0%, rgba(192,132,252,.08) 50%, transparent 70%);
}
.parallax-orb.orb-3 {
  width: 500px; height: 500px; bottom: 5%; left: 15%;
  background: radial-gradient(circle, rgba(6,182,212,.14) 0%, rgba(16,185,129,.06) 50%, transparent 70%);
}
[data-theme="light"] .parallax-orb { opacity: .22; filter: blur(90px); }



