/* ============================================================
   IA Elián — Sistema de Diseño Web
   Paleta seleccionable por usuario, dark mode por defecto
   ============================================================ */

/* === PALETAS DE COLOR === */
:root {
  /* Paleta Celestial (Predeterminada) - Más vibrante y premium */
  --primary: #5C9FFF;
  --primary-rgb: 92, 159, 255;
  --secondary: #3B7DD8;
  --secondary-rgb: 59, 125, 216;
  --accent: #A5C9FF;
  --accent-rgb: 165, 201, 255;
  
  --bg: #06090E;
  --bg-rgb: 6, 9, 14;
  --surface: rgba(13, 20, 33, 0.45);
  --surface-hover: rgba(22, 32, 50, 0.6);
  --surface-hi: rgba(30, 42, 62, 0.75);
  
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shine: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
  
  --text: #F8FAFF;
  --text-muted: rgba(248, 250, 255, 0.65);
  --text-light: rgba(248, 250, 255, 0.45);
  
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-inset: inset 0 1px 1px rgba(255, 255, 255, 0.05);
  
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 10px;
  --sidebar-w: 280px;
  --sidebar-collapsed: 88px;
  --transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Modo claro */
body.light-mode {
  --bg: #F2F4F8;
  --surface: #FFFFFF;
  --surface-hover: #F5F7FA;
  --surface-hi: #E3E8F0;
  --border: rgba(0,0,0,0.07);
  --border-strong: rgba(0,0,0,0.12);
  --text: #0D1420;
  --text-muted: rgba(13,20,32,0.55);
  --text-light: rgba(13,20,32,0.35);
  --shadow: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.07);
}

/* Paleta: Verde Vivo */
body.palette-verdant { --primary: #3ABF8B; --primary-rgb: 58,191,139; --secondary: #2E9E72; --secondary-rgb: 46,158,114; --accent: #7FD9B6; }
body.palette-verdant:not(.light-mode) { --bg: #0B1210; --surface: #101E18; --surface-hi: #1B2B23; }
body.palette-verdant.light-mode { --bg: #F1F7F4; --surface: #FFFFFF; --surface-hi: #E1EEE8; }

/* Paleta: Azul Profundo */
body.palette-ocean { --primary: #4B8FD8; --primary-rgb: 75,143,216; --secondary: #3D7ABF; --secondary-rgb: 61,122,191; --accent: #A1B6D9; }
body.palette-ocean:not(.light-mode) { --bg: #0A1017; --surface: #121A25; --surface-hi: #1E2837; }
body.palette-ocean.light-mode { --bg: #F2F6FB; --surface: #FFFFFF; --surface-hi: #E3ECF5; }

/* Paleta: Studio Aurora */
body.palette-studio { --primary: #3FB6FF; --primary-rgb: 63,182,255; --secondary: #B86BFF; --secondary-rgb: 184,107,255; --accent: #4B2B6D; }
body.palette-studio:not(.light-mode) { --bg: #0C1016; --surface: #151C25; --surface-hi: #212A36; }
body.palette-studio.light-mode { --bg: #F1F4F8; --surface: #FFFFFF; --surface-hi: #E3E8F0; }

/* Paleta: Solar Noir */
body.palette-amber { --primary: #E0B44B; --primary-rgb: 224,180,75; --secondary: #B8842E; --secondary-rgb: 184,132,46; --accent: #F2D08A; }
body.palette-amber:not(.light-mode) { --bg: #14100B; --surface: #1B160C; --surface-hi: #2A2112; }
body.palette-amber.light-mode { --bg: #FBF7EF; --surface: #FFFFFF; --surface-hi: #F1E7D6; }

/* Paleta: Carmesí */
body.palette-crimson { --primary: #E06B6B; --primary-rgb: 224,107,107; --secondary: #B83C3C; --secondary-rgb: 184,60,60; --accent: #F3A6A6; }
body.palette-crimson:not(.light-mode) { --bg: #120B0B; --surface: #1C1111; --surface-hi: #2A1717; }
body.palette-crimson.light-mode { --bg: #FBF3F3; --surface: #FFFFFF; --surface-hi: #F2DDDD; }

/* Paleta: Violeta */
body.palette-violet { --primary: #A66BFF; --primary-rgb: 166,107,255; --secondary: #6D40D8; --secondary-rgb: 109,64,216; --accent: #D1B4FF; }
body.palette-violet:not(.light-mode) { --bg: #0F0B16; --surface: #191428; --surface-hi: #271D3D; }
body.palette-violet.light-mode { --bg: #F4F0FB; --surface: #FFFFFF; --surface-hi: #E8DFF7; }

/* Paleta: Rosa */
body.palette-rose { --primary: #D46AA0; --primary-rgb: 212,106,160; --secondary: #B2487D; --secondary-rgb: 178,72,125; --accent: #F0A7C8; }
body.palette-rose:not(.light-mode) { --bg: #120D12; --surface: #1C1420; --surface-hi: #2A1C2F; }
body.palette-rose.light-mode { --bg: #FBF2F6; --surface: #FFFFFF; --surface-hi: #F1DEE8; }

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  transition: background var(--transition), color var(--transition);
}
a { text-decoration: none; color: inherit; cursor: pointer; }
button { border: none; background: none; cursor: pointer; font-family: inherit; color: inherit; }
input, textarea { font-family: inherit; }
ul { list-style: none; }

/* === SPLASH SCREEN === */
#splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 32px;
}
.splash-logo {
  display: flex; align-items: center; gap: 14px;
  animation: fadeUp 0.6s ease both;
}
.splash-icon {
  width: 64px; height: 64px;
  background: var(--surface);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.splash-logo span {
  font-size: 32px; font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent;
}
.splash-loader {
  width: 200px; height: 3px;
  background: var(--surface-hi);
  border-radius: 2px; overflow: hidden;
  animation: fadeUp 0.6s 0.2s ease both;
}
.splash-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  border-radius: 2px;
  animation: loadBar 1.2s ease forwards;
}
@keyframes loadBar { to { width: 100%; } }

/* === MINISTRY STYLES === */
.ministry-tabs {
  display: flex; gap: 4px; padding: 4px;
  background: var(--surface); border-radius: 14px;
  margin-bottom: 24px; border: 1px solid var(--border);
}
.ministry-tab {
  flex: 1; padding: 10px; border-radius: 10px;
  font-size: 13px; font-weight: 600; text-align: center;
  cursor: pointer; transition: 0.2s; color: var(--text-muted);
}
.ministry-tab.active {
  background: var(--bg); color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.activity-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 20px;
  transition: 0.2s ease;
}
.activity-card:hover { border-color: var(--primary-light); transform: translateY(-2px); }
.stat-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px; text-align: center;
}
.stat-value { font-size: 18px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }


/* === UTILIDADES === */
.hidden { display: none !important; }

/* === PANTALLA DE AUTH === */
#auth-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  overflow: auto;
  padding: 24px;
}
.auth-bg {
  position: fixed; inset: 0;
  background: var(--bg);
  overflow: hidden;
}
.auth-glow {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.15;
}
.auth-glow-1 {
  width: 600px; height: 600px;
  background: var(--primary);
  top: -200px; left: -200px;
}
.auth-glow-2 {
  width: 400px; height: 400px;
  background: var(--secondary);
  bottom: -100px; right: -100px;
}
.auth-card {
  position: relative; z-index: 1;
  background: rgba(13, 20, 33, 0.7);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--border-strong);
  border-radius: 32px;
  padding: 48px;
  width: 100%; max-width: 460px;
  box-shadow: var(--shadow);
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.auth-logo {
  text-align: center; margin-bottom: 32px;
}
.auth-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.auth-logo h1 {
  font-size: 24px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--text);
}
.auth-logo p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.auth-form h2 {
  font-size: 20px; font-weight: 700; margin-bottom: 24px;
  color: var(--text);
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 8px;
}
.form-group input {
  width: 100%; padding: 12px 16px;
  background: rgba(11,17,27,0.7);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus {
  border-color: rgba(var(--primary-rgb), 0.6);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}
.input-wrap { position: relative; }
.input-wrap input { padding-right: 48px; }
.toggle-pw {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); opacity: 0.6;
  transition: opacity var(--transition);
}
.toggle-pw:hover { opacity: 1; }
.btn-primary {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white; font-size: 15px; font-weight: 700;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative; overflow: hidden;
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.3);
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.12) 0%, transparent 100%);
  pointer-events: none;
}
.btn-primary:hover { opacity: 0.93; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(var(--primary-rgb), 0.4); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.2); }
.btn-primary.loading span::after {
  content: ''; display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 8px; vertical-align: middle;
}
.auth-switch { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 16px; }
.auth-switch a { color: var(--primary); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.auth-error {
  background: rgba(224,107,107,0.12);
  border: 1px solid rgba(224,107,107,0.3);
  color: #e06b6b; font-size: 13px;
  padding: 10px 14px; border-radius: var(--radius-xs);
  margin-bottom: 12px;
}
.auth-success {
  background: rgba(58,191,139,0.12);
  border: 1px solid rgba(58,191,139,0.3);
  color: #3abf8b; font-size: 13px;
  padding: 10px 14px; border-radius: var(--radius-xs);
  margin-bottom: 12px;
}

/* === APP LAYOUT === */
#app {
  display: flex; height: 100vh; overflow: hidden;
}

/* === SIDEBAR === */
#sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: width var(--transition), background var(--transition);
  flex-shrink: 0;
  overflow: hidden;
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  position: relative;
}
#sidebar::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border-strong), transparent);
}
#sidebar.collapsed { width: var(--sidebar-collapsed); }
#sidebar.collapsed .sidebar-logo-text,
#sidebar.collapsed .nav-label,
#sidebar.collapsed .nav-badge,
#sidebar.collapsed .user-details { display: none; }
#sidebar.collapsed .user-name,
#sidebar.collapsed .user-email { display: none; }
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 12px; overflow: hidden;
}
.sidebar-logo-text {
  font-size: 20px; font-weight: 900; letter-spacing: -0.5px;
  white-space: nowrap;
  background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 60%, var(--primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerText 4s linear infinite;
}
@keyframes shimmerText {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.sidebar-toggle-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover { background: var(--surface-hi); color: var(--text); }
.sidebar-nav {
  flex: 1; padding: 12px 8px;
  overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 2px;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform 0.15s;
  color: var(--text-muted);
  white-space: nowrap;
  position: relative;
  font-size: 13.5px; font-weight: 500;
  user-select: none;
}
.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.2), rgba(var(--primary-rgb), 0.06));
  color: var(--primary);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--primary);
}
.nav-item.active .nav-icon svg { stroke: var(--primary); }
.nav-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 9px;
  transition: background var(--transition);
}
.nav-item.active .nav-icon {
  background: rgba(var(--primary-rgb), 0.15);
}
.nav-item:not(.active):hover .nav-icon {
  background: rgba(255,255,255,0.05);
}
.nav-label { flex: 1; }
.nav-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 20px;
  flex-shrink: 0;
}
.nav-badge.new {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white;
}
.sidebar-footer {
  padding: 12px 8px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.user-info {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white;
  flex-shrink: 0; overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.user-details { overflow: hidden; min-width: 0; }
.user-name { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { display: block; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-actions { display: flex; gap: 4px; padding: 0 4px; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.icon-btn:hover { background: var(--surface-hi); color: var(--text); }

/* === MAIN CONTENT === */
#main-content {
  flex: 1; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.section { display: none; height: 100%; overflow-y: auto; min-height: 0; }
.section.active { display: flex; flex-direction: column; min-height: 0; }

/* === HEADER DE SECCIÓN === */
.section-header {
  padding: 32px 40px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  background: rgba(var(--bg-rgb), 0.7);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
}
.section-title { 
  font-family: 'Libre Baskerville', serif; 
  font-size: 26px; 
  font-weight: 700; 
  letter-spacing: -0.5px;
  color: var(--text);
}
.section-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.section-body {
  flex: 1; padding: 32px 40px;
  overflow-y: auto; min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.section-body::-webkit-scrollbar { width: 4px; }
.section-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* === CARDS === */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--glass-shine);
  pointer-events: none;
}
.card:hover {
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: var(--shadow), 0 0 0 1px rgba(var(--primary-rgb), 0.15);
  transform: translateY(-6px) scale(1.01);
  background: var(--surface-hover);
}
.card-clickable { cursor: pointer; }
.card-clickable:hover { transform: translateY(-2px); }

/* === GRID LAYOUTS === */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* === TEXTO DIARIO CARD === */
.daily-text-card {
  background: linear-gradient(135deg, var(--secondary), var(--primary), var(--accent));
  background-size: 200% 200%;
  animation: shimmerText 8s ease infinite;
  border-radius: var(--radius);
  padding: 32px 36px;
  color: white;
  position: relative; overflow: hidden;
  box-shadow: 0 16px 40px rgba(var(--primary-rgb), 0.3);
}
.daily-text-card::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.daily-text-card::after {
  content: '';
  position: absolute; bottom: -40px; left: -20px;
  width: 140px; height: 140px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.daily-text-date {
  font-size: 12px; font-weight: 600; opacity: 0.8;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.daily-text-scripture {
  font-family: 'Libre Baskerville', serif;
  font-size: 17px; font-weight: 700; line-height: 1.4;
  margin-bottom: 14px;
}
.daily-text-content {
  font-size: 14px; opacity: 0.9; line-height: 1.6;
}
.daily-text-actions { display: flex; gap: 10px; margin-top: 20px; z-index: 1; position: relative; }
.btn-glass {
  padding: 8px 18px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  color: white; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background var(--transition);
  backdrop-filter: blur(4px);
}
.btn-glass:hover { background: rgba(255,255,255,0.28); }

/* === QUICK ACCESS CARDS === */
.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
  backdrop-filter: blur(12px);
}
.quick-card:hover {
  border-color: rgba(var(--primary-rgb), 0.5);
  transform: translateY(-8px);
  background: var(--surface-hi);
  box-shadow: var(--shadow);
}
.quick-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.quick-card-title { font-size: 14px; font-weight: 700; }
.quick-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* === SKELETON LOADER === */
.skeleton {
  background: linear-gradient(90deg, var(--surface-hi) 25%, var(--surface) 50%, var(--surface-hi) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}
@keyframes skeleton-shimmer { to { background-position: -200% 0; } }
.skeleton-text { height: 16px; border-radius: 4px; margin-bottom: 10px; }
.skeleton-title { height: 24px; width: 60%; border-radius: 4px; margin-bottom: 16px; }
.skeleton-block { height: 120px; border-radius: var(--radius); }

/* === STUDIO / CHAT === */
.section.active.chat-layout { display: flex; flex-direction: row; height: 100%; }
.chat-history {
  width: 268px; min-width: 220px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  flex-shrink: 0;
}
.chat-history-header {
  padding: 16px 14px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.chat-history-header h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: var(--text-muted); text-transform: uppercase; }
.chat-history-list { flex: 1; overflow-y: auto; padding: 6px; }
.chat-history-list::-webkit-scrollbar { width: 3px; }
.chat-history-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.chat-history-item {
  display: flex; align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  gap: 8px;
}
.chat-history-item:hover { background: var(--surface); color: var(--text); }
.chat-history-item.active {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--text);
  font-weight: 600;
}
.chat-main {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 24px 36px;
  display: flex; flex-direction: column; gap: 20px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.chat-msg { display: flex; gap: 0; max-width: 820px; }
.chat-msg.user { flex-direction: row-reverse; align-self: flex-end; }
.chat-msg.assistant { align-self: flex-start; }
.chat-bubble {
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 14px; line-height: 1.7;
  max-width: 640px;
}
.chat-msg.assistant .chat-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px 16px 16px 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white;
  border-radius: 16px 2px 16px 16px;
  box-shadow: 0 2px 12px rgba(var(--primary-rgb), 0.28);
}

/* Markdown styling inside chat bubbles */
.markdown-body p { margin-bottom: 8px; }
.markdown-body p:last-child { margin-bottom: 0; }
.markdown-body ul, .markdown-body ol { margin-bottom: 8px; padding-left: 20px; }
.markdown-body li { margin-bottom: 4px; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { font-size: 1.1em; margin: 12px 0 8px; }
.markdown-body code { background: rgba(0,0,0,0.2); padding: 2px 4px; border-radius: 4px; font-family: monospace; }
.chat-msg.user .markdown-body code { background: rgba(255,255,255,0.2); }
.markdown-body strong { font-weight: 700; }
.markdown-body blockquote { border-left: 3px solid var(--border-strong); padding-left: 12px; font-style: italic; opacity: 0.8; }
.chat-avatar { display: none; }
.chat-input-area {
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg);
}
.chat-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 12px 16px;
  resize: none; min-height: 48px; max-height: 180px;
  font-size: 14px; color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}
.chat-input:focus {
  border-color: rgba(var(--primary-rgb), 0.6);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.08);
}
.chat-input::placeholder { color: var(--text-muted); }
.chat-send-btn {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 3px 14px rgba(var(--primary-rgb), 0.3);
}
.chat-send-btn:hover { opacity: 0.93; transform: scale(1.06); box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.45); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* PDF upload button */
.chat-pdf-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); flex-shrink: 0;
  transition: all var(--transition); cursor: pointer;
  margin-bottom: 4px;
}
.chat-pdf-btn:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.4);
  color: var(--primary);
}

/* Micrófono grabando (dictado por voz) */
.chat-pdf-btn.recording {
  background: rgba(229, 57, 53, 0.12);
  border-color: rgba(229, 57, 53, 0.6);
  color: #E53935;
  animation: studio-mic-pulse 1.3s ease-in-out infinite;
}
@keyframes studio-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(229, 57, 53, 0); }
}

/* Botón "Escuchar" reproduciendo (TTS) */
.chat-action-btn.speaking {
  border-color: rgba(var(--primary-rgb), 0.5);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.12);
}

/* === TABLA === */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  background: var(--surface-hi);
  padding: 12px 16px; text-align: left;
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
td { padding: 14px 16px; border-top: 1px solid var(--border); }
tr:hover td { background: var(--surface-hover); }

/* === BADGE === */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 700;
}
.badge-primary { background: rgba(75,123,184,0.15); color: var(--primary); }
.badge-success { background: rgba(58,191,139,0.15); color: #3abf8b; }
.badge-warn { background: rgba(224,180,75,0.15); color: #e0b44b; }
.badge-muted { background: var(--surface-hi); color: var(--text-muted); }

/* === BOTONES === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-accent {
  background: var(--primary); color: white;
}
.btn-accent:hover { opacity: 0.85; }
.btn-outline {
  border: 1px solid var(--border-strong); background: transparent;
  color: var(--text);
}
.btn-outline:hover { background: var(--surface-hi); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-hi); }
.btn-danger { background: rgba(224,107,107,0.1); color: #e06b6b; border: 1px solid rgba(224,107,107,0.2); }
.btn-danger:hover { background: rgba(224,107,107,0.18); }

/* === SEARCH === */
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: border-color var(--transition);
}
.search-box:focus-within { border-color: var(--primary); }
.search-box input {
  border: none; background: transparent;
  font-size: 14px; color: var(--text); outline: none; flex: 1;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box svg { color: var(--text-muted); flex-shrink: 0; }

/* === PROGRESS BAR === */
.progress-track {
  height: 8px; background: var(--surface-hi); border-radius: 4px; overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* === EMPTY STATE === */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 60px 20px; text-align: center; color: var(--text-muted);
}
.empty-state svg { opacity: 0.3; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.empty-state p { font-size: 13px; max-width: 280px; }

/* === TOAST === */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: rgba(26,36,53,0.95);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 11px 22px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  animation: toastIn 0.28s cubic-bezier(.4,0,.2,1) both;
  white-space: nowrap;
}
.toast.success { border-color: rgba(58,191,139,0.4); color: #3abf8b; background: rgba(10,28,22,0.95); }
.toast.error { border-color: rgba(224,107,107,0.4); color: #e06b6b; background: rgba(28,12,12,0.95); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* === ANIMATIONS === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-up { animation: fadeUp 0.4s ease both; }
.animate-in { animation: fadeIn 0.3s ease both; }
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }

/* === SETTINGS === */
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.setting-label h4 { font-size: 14px; font-weight: 600; }
.setting-label p { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.toggle-switch {
  width: 44px; height: 24px;
  background: var(--surface-hi); border-radius: 12px;
  position: relative; cursor: pointer;
  transition: background var(--transition);
}
.toggle-switch.on { background: var(--primary); }
.toggle-switch::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: white;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle-switch.on::after { transform: translateX(20px); }
.palette-grid {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px;
}
.palette-dot {
  width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; border: 3px solid transparent;
  transition: transform var(--transition), border-color var(--transition);
  position: relative;
}
.palette-dot:hover { transform: scale(1.15); }
.palette-dot.active { border-color: white !important; }
.palette-dot::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white;
  opacity: 0;
}
.palette-dot.active::after { opacity: 1; }

/* === NOTES === */
.section.active.notes-layout { display: flex; flex-direction: row; height: 100%; }
.notes-list {
  width: 300px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  background: var(--surface);
}
.notes-list-header {
  padding: 16px; border-bottom: 1px solid var(--border);
}
.notes-items { flex: 1; overflow-y: auto; padding: 8px; }
.note-item {
  padding: 12px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background var(--transition);
  margin-bottom: 4px;
}
.note-item:hover, .note-item.active { background: var(--surface-hi); }
.note-item-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-item-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.note-item-date { font-size: 11px; color: var(--text-light); margin-top: 6px; }
.notes-editor { flex: 1; display: flex; flex-direction: column; }
.notes-editor-header { padding: 20px 28px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: center; }
.note-title-input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 18px; font-weight: 700; color: var(--text);
}
.note-title-input::placeholder { color: var(--text-muted); }
.note-content-input {
  flex: 1; padding: 24px 28px;
  background: none; border: none; outline: none; resize: none;
  font-size: 14px; line-height: 1.8; color: var(--text);
  font-family: inherit;
}
.note-content-input::placeholder { color: var(--text-muted); }

/* === TASKS / CHECKLIST === */
.task-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.task-item:hover { background: var(--surface-hover); }
.task-checkbox {
  width: 20px; height: 20px; flex-shrink: 0;
  border: 2px solid var(--border-strong);
  border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); margin-top: 1px;
}
.task-checkbox.checked {
  background: var(--primary); border-color: var(--primary);
}
.task-checkbox.checked::after { content: '✓'; color: white; font-size: 12px; font-weight: 700; }
.task-text { font-size: 14px; line-height: 1.5; }
.task-text.done { text-decoration: line-through; color: var(--text-muted); }

/* === MINISTRY CARD === */
.person-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.person-card:hover { border-color: var(--primary); transform: translateX(4px); }
.person-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: white; flex-shrink: 0;
}
.person-info { flex: 1; min-width: 0; }
.person-name { font-size: 15px; font-weight: 600; }
.person-detail { font-size: 12px; color: var(--text-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-meta { flex-shrink: 0; text-align: right; }
.person-date { font-size: 11px; color: var(--text-muted); }

/* === SCROLL === */
.scrollable { overflow-y: auto; }
.scrollable::-webkit-scrollbar { width: 4px; }
.scrollable::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .section-body { padding: 16px; }
  .section-header { padding: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .chat-history { display: none; }
}

/* === TOOLTIP === */
[data-tip] { position: relative; }
[data-tip]:hover::before {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--surface-hi);
  color: var(--text); font-size: 12px;
  padding: 5px 10px; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
  border: 1px solid var(--border);
  z-index: 100;
}

/* === DIVIDER === */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* === STUDIO FOLDERS === */
.studio-folder { margin-bottom: 1px; }
.studio-folder-header {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.studio-folder-header:hover { background: var(--surface); color: var(--text); }
.studio-folder-count {
  font-size: 10px; font-weight: 700;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: 1px 5px; border-radius: 8px;
  flex-shrink: 0; margin-left: auto;
}
.studio-folder-items { padding-left: 8px; padding-bottom: 2px; }
.studio-section-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 14px 10px 5px;
  opacity: 0.6;
}
.studio-item-menu-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 3px 5px; border-radius: 4px;
  line-height: 1; flex-shrink: 0;
}
.studio-item-menu-btn:hover { background: var(--surface-hi); color: var(--text); }
.chat-history-item:hover .studio-item-menu-btn,
.studio-folder-header:hover .studio-item-menu-btn { display: flex; }

/* === STUDIO CONTEXT MENU === */
.studio-context-menu {
  position: fixed; z-index: 9999;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  min-width: 200px; padding: 6px;
  animation: fadeIn 0.1s ease;
}
.studio-context-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 6px 10px 4px;
}
.studio-context-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 7px;
  font-size: 13px; cursor: pointer; color: var(--text);
  transition: background var(--transition);
}
.studio-context-item:hover { background: var(--surface-hi); }
.studio-context-item.danger { color: #ef4444; }
.studio-context-item.danger:hover { background: rgba(239,68,68,0.1); }
.studio-context-divider { height: 1px; background: var(--border); margin: 5px 0; }

/* === STUDIO DIALOGS === */
.studio-dialog-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.15s ease;
}
.studio-dialog {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px; width: 340px; max-width: 90vw;
  box-shadow: 0 16px 48px rgba(0,0,0,0.25);
  animation: slideUp 0.2s ease;
}
.studio-dialog h3 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* === STUDIO TOOLTIP === */
.studio-tooltip { position: relative; }
.studio-tooltip[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--surface-hi); color: var(--text);
  font-size: 11px; padding: 4px 8px; border-radius: 5px;
  white-space: nowrap; pointer-events: none;
  border: 1px solid var(--border); z-index: 100;
}

/* Section scroll styles */
#main-content .section { overflow-y: auto; }
#main-content .section::-webkit-scrollbar { width: 4px; }

/* ============================================================
   Congregation Tabs
   ============================================================ */
.cong-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cong-tab:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.cong-tab.active {
  background: var(--primary);
  color: #fff;
}

/* ============================================================
   Home: redesign components
   ============================================================ */

/* Date chip */
.home-date-chip {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; padding: 5px 12px;
  text-transform: capitalize;
}

/* Daily text card */
.daily-text-card {
  background: linear-gradient(135deg, var(--surface), rgba(75,123,184,0.06));
  border-left: 4px solid var(--primary);
  padding: 24px;
}
.daily-text-meta {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.daily-text-badge {
  font-size: 10px; font-weight: 800; color: var(--primary);
  letter-spacing: 1.2px; text-transform: uppercase;
}
.daily-text-date { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.daily-text-verse {
  font-size: 18px; font-weight: 800; line-height: 1.4; margin-bottom: 12px;
  font-family: 'Libre Baskerville', Georgia, serif;
}
.daily-text-comment {
  font-size: 14px; color: var(--text-muted); line-height: 1.65; margin-bottom: 20px;
}
.daily-text-btn {
  display: inline-flex; align-items: center; border-radius: 10px; padding: 8px 16px;
}

/* Studio card (premium) */
.home-studio-card {
  background: linear-gradient(135deg, var(--surface), rgba(63,182,255,0.05));
  border: 1px solid rgba(63,182,255,0.2);
  border-radius: 20px;
  padding: 18px 20px;
}
.home-studio-card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.home-studio-icon {
  width: 36px; height: 36px; background: rgba(63,182,255,0.15); color: #3FB6FF;
  border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.home-studio-input-row { display: flex; gap: 8px; }
.home-studio-input-row input {
  flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; font-size: 14px; color: var(--text); outline: none; transition: border-color 0.2s;
}
.home-studio-input-row input:focus { border-color: #3FB6FF; }
.home-studio-send-btn {
  background: var(--primary); color: #fff; border: none; border-radius: 12px;
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: opacity 0.2s;
}
.home-studio-send-btn:hover { opacity: 0.85; }

/* Studio locked → nuevo banner compacto */
.home-studio-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 14px 18px; cursor: pointer;
  transition: all 0.2s; margin-bottom: 28px;
}
.home-studio-banner:hover {
  background: var(--surface-hover);
  border-color: rgba(224,180,75,0.35);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.home-studio-banner-left { display: flex; align-items: center; gap: 12px; }
.home-studio-banner-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: rgba(224,180,75,0.12); color: #E0B44B;
  display: flex; align-items: center; justify-content: center;
}
.home-studio-banner-title { font-size: 14px; font-weight: 700; }
.home-studio-banner-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.home-studio-banner-badge {
  font-size: 12px; font-weight: 800; color: #E0B44B;
  background: rgba(224,180,75,0.12); border: 1px solid rgba(224,180,75,0.3);
  padding: 5px 12px; border-radius: 99px; white-space: nowrap; flex-shrink: 0;
}

/* Studio locked (clase legacy — mantener por compatibilidad) */
.home-studio-locked {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 16px 20px; cursor: pointer;
  transition: background 0.2s;
}
.home-studio-locked:hover { background: var(--surface-hover); }
.home-studio-locked-inner { display: flex; align-items: center; gap: 10px; }

/* Quick grid */
.home-block-title {
  font-size: 11px; font-weight: 800;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 12px;
}
.home-quick-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.home-quick-item {
  display: flex; flex-direction: row; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px 16px; cursor: pointer; transition: all 0.2s;
}
.home-quick-item:hover {
  background: var(--surface-hover);
  border-color: rgba(var(--primary-rgb), 0.25);
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}
.home-quick-item-icon {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.home-quick-item:hover .home-quick-item-icon { transform: scale(1.08); }
.home-quick-item-body { flex: 1; min-width: 0; }
.home-quick-item-label { display: block; font-size: 14px; font-weight: 700; }
.home-quick-item-desc { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-quick-chevron { color: var(--text-muted); flex-shrink: 0; transition: transform 0.2s; }
.home-quick-item:hover .home-quick-chevron { transform: translateX(2px); color: var(--primary); }
@media (max-width: 500px) { .home-quick-grid { grid-template-columns: 1fr; } }

/* Summary grid */
.home-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 700px) { .home-summary-grid { grid-template-columns: 1fr; } }
.home-summary-skeleton { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.home-summary-card { padding: 16px 18px; }
.home-summary-card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.home-summary-card-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Badge PRO */
.badge-pro {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 900; color: var(--primary);
  background: rgba(var(--primary-rgb), 0.12);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  padding: 3px 8px; border-radius: 99px; letter-spacing: 0.5px;
}

/* ============================================================
   Settings: redesign
   ============================================================ */
.settings-container { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }

.settings-group { display: flex; flex-direction: column; gap: 8px; }
.settings-group-label {
  font-size: 11px; font-weight: 800; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; padding-left: 4px;
}

/* Profile card */
.settings-profile-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 20px; display: flex; align-items: center; gap: 16px;
}
.settings-avatar-wrap {
  flex-shrink: 0; position: relative; width: 68px; height: 68px;
  cursor: pointer;
}
.settings-avatar-wrap:hover .settings-avatar-edit { opacity: 1; }
.settings-avatar-edit {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s; color: white;
}
.settings-avatar-img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; display: block; }
.settings-avatar-initials {
  width: 68px; height: 68px; border-radius: 50%;
  background: rgba(var(--primary-rgb), 0.15); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800;
}
.settings-profile-name { font-size: 18px; font-weight: 800; margin-bottom: 3px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.settings-profile-email { font-size: 13px; color: var(--text-muted); }
.settings-profile-role { font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 4px; }

/* Rows card */
.settings-rows-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
}
.settings-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer; transition: background 0.15s;
}
.settings-row:hover { background: var(--surface-hover); }
.settings-row-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.settings-row-body { flex: 1; min-width: 0; }
.settings-row-label { font-size: 14px; font-weight: 600; }
.settings-row-value { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.settings-row-divider { height: 1px; background: var(--border); margin: 0 16px; }
.settings-chevron { color: var(--text-muted); flex-shrink: 0; }

/* Settings select */
.settings-select {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 13px; font-weight: 600; padding: 6px 10px;
  outline: none; cursor: pointer;
}

/* Premium card */
.settings-premium-card {
  background: linear-gradient(135deg, var(--surface), rgba(224,180,75,0.06));
  border: 1px solid rgba(224,180,75,0.3);
  border-radius: 16px; padding: 16px 20px; cursor: pointer;
  transition: background 0.2s;
}
.settings-premium-card:hover { background: linear-gradient(135deg, var(--surface-hover), rgba(224,180,75,0.1)); }

/* Danger btn */
.btn-danger {
  background: rgba(224,107,107,0.15); color: #E06B6B;
  border: 1px solid rgba(224,107,107,0.3);
}
.btn-danger:hover { background: rgba(224,107,107,0.25); }

/* ===== BIBLE SECTION ===== */
.bible-progress-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 20px;
}
.bible-progress-inner {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.bible-ring-wrap {
  position: relative; flex-shrink: 0;
  width: 120px; height: 120px;
}
.bible-ring-svg {
  width: 120px; height: 120px; transform: rotate(-90deg);
}
.bible-ring-bg { stroke: var(--border-strong); }
.bible-ring-fill {
  stroke: var(--primary); stroke-linecap: round;
  transition: stroke-dashoffset 0.7s cubic-bezier(.4,0,.2,1);
}
.bible-ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.bible-ring-pct {
  font-size: 22px; font-weight: 900; color: var(--text);
  line-height: 1;
}
.bible-ring-label {
  font-size: 10px; color: var(--text-muted); margin-top: 2px;
}

/* Stats column */
.bible-stats-col {
  display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 110px;
}
.bible-stat-row {
  display: flex; flex-direction: column; padding: 4px 0;
}
.bible-stat-val {
  font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.1;
}
.bible-stat-label {
  font-size: 11px; color: var(--text-muted);
}
.bible-stat-divider {
  height: 1px; background: var(--border); margin: 4px 0;
}

/* Goal area */
.bible-goal-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-hi); border: 1px solid var(--border);
  color: var(--text); font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
}
.bible-goal-btn:hover { background: rgba(var(--primary-rgb), 0.15); color: var(--primary); }

/* History entries */
.bible-entry-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px;
  transition: background 0.15s;
}
.bible-entry-card:hover { background: var(--surface-hover); }
.bible-entry-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(var(--primary-rgb), 0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; color: var(--primary);
}
.bible-icon-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: transparent; border: none;
  color: var(--text-muted); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.bible-icon-btn:hover { background: var(--surface-hi); color: var(--text); }
.bible-wol-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--primary);
  text-decoration: none; font-weight: 600;
  padding: 2px 6px; border-radius: 6px;
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  transition: background 0.15s;
}
.bible-wol-link:hover { background: rgba(var(--primary-rgb), 0.1); }

/* Options menu items */
.bible-menu-item {
  padding: 14px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; border-radius: 10px;
  transition: background 0.15s; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.bible-menu-item:hover { background: var(--surface-hi); }

#main-content .section::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ===== NOTES SECTION ===== */
.notes-masonry {
  column-count: 2;
  column-gap: 12px;
}
@media (max-width: 560px) {
  .notes-masonry { column-count: 1; }
}
.note-card {
  break-inside: avoid;
  margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px;
  cursor: pointer; transition: background 0.15s, transform 0.15s;
}
.note-card:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
}
.note-card-title {
  font-size: 15px; font-weight: 700; margin-bottom: 6px;
  color: var(--text);
  display: -webkit-box; 
  -webkit-line-clamp: 2; 
  line-clamp: 2;
  -webkit-box-orient: vertical; 
  overflow: hidden;
}
.note-card-content {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; 
  -webkit-line-clamp: 6; 
  line-clamp: 6;
  -webkit-box-orient: vertical; 
  overflow: hidden;
  margin-bottom: 10px;
}
.note-card-date {
  font-size: 11px; color: var(--text-light);
}

/* Notes search */
.notes-search-wrap {
  position: relative; flex: 1; max-width: 280px;
}
.notes-search-input {
  width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 12px 7px 32px; font-size: 13px; color: var(--text);
  outline: none; transition: border-color 0.15s;
}
.notes-search-input:focus { border-color: var(--primary); }

/* Notes FAB */
.notes-fab {
  position: fixed; bottom: 28px; right: 28px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s; z-index: 20;
}
.notes-fab:hover { transform: scale(1.08); box-shadow: 0 6px 26px rgba(0,0,0,0.4); }

/* Notes icon button */
.notes-icon-btn {
  width: 30px; height: 30px; border-radius: 7px;
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: background 0.15s, color 0.15s;
}
.notes-icon-btn:hover { background: var(--surface-hi); color: var(--text); }

/* Note title/content inputs in modal */
.note-title-input {
  background: none; border: none;
  border-bottom: 1px solid var(--border);
  padding: 0 0 12px; font-size: 20px; font-weight: 800;
  color: var(--text); outline: none; width: 100%; margin-bottom: 14px;
}
.note-title-input::placeholder { color: var(--text-light); }
.note-content-input {
  flex: 1; background: none; border: none;
  color: var(--text); font-size: 15px; line-height: 1.65;
  outline: none; resize: none; min-height: 260px; width: 100%;
}
.note-content-input::placeholder { color: var(--text-light); }

/* Tasks in notes */
.notes-task-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 14px; cursor: pointer;
  transition: background 0.15s;
}
.notes-task-row:hover { background: var(--surface-hover); }
.notes-task-check {
  width: 18px; height: 18px; border-radius: 5px;
  border: 2px solid var(--border-strong); flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.notes-task-row:hover .notes-task-check {
  border-color: var(--primary); background: rgba(var(--primary-rgb),0.1);
}
.notes-task-label { font-size: 13px; color: var(--text); flex: 1; }

/* ===== MOBILE BOTTOM NAV ===== */
#mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  height: 60px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  align-items: stretch;
}
.mob-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 10px; font-weight: 600;
  padding: 6px 4px; transition: color 0.15s;
}
.mob-nav-item svg { flex-shrink: 0; }
.mob-nav-item.active { color: var(--primary); }
.mob-nav-item:active { opacity: 0.7; }

/* Mobile drawer */
.mobile-drawer {
  position: fixed; bottom: 60px; left: 0; right: 0; z-index: 201;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
  animation: slideUp 0.22s cubic-bezier(.4,0,.2,1);
}
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
#mobile-drawer-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
}
.mob-drawer-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 16px;
  background: none; border: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--text);
  border-radius: 10px; text-align: left;
  transition: background 0.15s;
}
.mob-drawer-item:hover, .mob-drawer-item:active { background: var(--surface-hi); }

/* ===== RESPONSIVE: TABLET (≤ 900px) ===== */
@media (max-width: 900px) {
  /* Fijar altura explícita para que el scroll funcione en tablet */
  #main-content { height: 100vh; overflow: hidden; }
  .section { height: 100vh; }
  .section.active { height: 100vh; }

  /* Habilitar scroll táctil en contenedores scrollables */
  .section-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .section.scrollable { overflow-y: auto; -webkit-overflow-scrolling: touch; }

  /* Sidebar collapse ya manejado, reducir padding de secciones */
  .section-header { padding: 20px 20px 14px; }
  .section-body { padding: 20px; }

  /* Congregation tabs: solo mostrar icono si espacio es justo */
  .cong-tab { font-size: 12px; padding: 8px 6px; }

  /* Bible progress adaptar */
  .bible-progress-inner { flex-wrap: wrap; gap: 16px; }
  .bible-ring-wrap { margin: 0 auto; }
  .bible-stats-col { flex-direction: row; flex-wrap: wrap; gap: 0; justify-content: space-around; width: 100%; }
  .bible-stat-divider { display: none; }
  .bible-stat-row { align-items: center; flex-direction: column; min-width: 80px; }

  /* Ministry tabs ajustar */
  .ministry-tab { font-size: 12px; padding: 8px 4px; }
  .ministry-tab span { display: block; }

  /* Home studio card */
  .home-studio-input-row { flex-wrap: wrap; gap: 8px; }
  .home-studio-input-row textarea { min-height: 48px; }

  /* Settings grid */
  .settings-container { max-width: 100% !important; }
}

/* ===== RESPONSIVE: MOBILE (≤ 640px) ===== */
@media (max-width: 640px) {
  /* Ocultar sidebar completamente, mostrar bottom nav */
  #sidebar { display: none !important; }
  #mobile-bottom-nav { display: flex; }

  /* Contenido ocupa todo el ancho */
  #app { flex-direction: column; }
  #main-content { height: calc(100vh - 60px); overflow: hidden; }
  .section { height: calc(100vh - 60px); }

  /* Padding reducido */
  .section-header { padding: 16px; }
  .section-body { padding: 16px; padding-bottom: 24px; }

  /* Grids a 1 columna */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .chat-history { display: none; }

  /* FAB notas sube sobre bottom nav */
  .notes-fab { bottom: 74px; right: 16px; width: 48px; height: 48px; }

  /* Section header title */
  .section-title { font-size: 18px; }

  /* Home summary grid → 1 col */
  .home-summary-grid { grid-template-columns: 1fr !important; }

  /* Home quick grid → 1 col en móvil */
  .home-quick-grid { grid-template-columns: 1fr !important; }

  /* Cards auth */
  .auth-card { padding: 28px 24px; }

  /* Chat input row */
  .chat-input-row { flex-wrap: wrap; gap: 8px; }

  /* Ministry activity cards — stack */
  .activity-card { padding: 14px; }

  /* Ministry tabs iconos sin texto en muy pequeño */
  .ministry-tab svg { display: block; margin: 0 auto 2px; }
  .ministry-tab span { font-size: 11px; }

  /* Bible ring centrado */
  .bible-ring-wrap { margin: 0 auto; }
  .bible-progress-inner { justify-content: center; }
  .bible-stats-col { justify-content: space-around; }

  /* Congregation tabs */
  .cong-tab { font-size: 11px; padding: 8px 4px; gap: 3px; }
  .cong-tab svg { display: none; }

  /* Modales: full width casi */
  .studio-dialog { border-radius: 14px; padding: 18px; }

  /* Settings: sin doble columna */
  .settings-palette-grid { grid-template-columns: repeat(4, 1fr) !important; }

  /* Stat boxes 2x2 → mantener */
  .stat-box { padding: 10px 8px; }
  .stat-value { font-size: 15px; }

  /* Notes masonry → 1 col en < 480px se maneja ya */
  .notes-masonry { column-count: 1; }

  /* Home date chip */
  .home-date-chip { font-size: 11px; padding: 5px 12px; }

  /* Section header compact */
  .section-header { gap: 8px; }
  .section-subtitle { font-size: 12px; }

  /* Eliminate large inner scroll on mobile */
  .section.scrollable { overflow-y: auto; -webkit-overflow-scrolling: touch; }

  /* Toast sube sobre bottom nav */
  .toast { bottom: 72px !important; }
}

/* ============================================================
   MEJORAS ESTÉTICAS v1.13 — Tema adaptable
   ============================================================ */

/* === ANIMACIÓN DE ENTRADA PARA SECCIONES === */
@keyframes sectionEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.section.active > .section-header,
.section.active > .section-body {
  animation: sectionEnter 0.28s cubic-bezier(.4,0,.2,1) both;
}
.section.active > .section-body { animation-delay: 0.06s; }

/* === AUTH CARD: ADAPTACIÓN A MODO CLARO Y PALETA === */
body.light-mode .auth-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.98) 0%, rgba(242,244,248,0.99) 100%);
  border-color: var(--border-strong);
  box-shadow: 0 12px 48px rgba(0,0,0,0.1), 0 0 0 1px rgba(var(--primary-rgb),0.08);
}
body.light-mode .form-group input {
  background: rgba(242,244,248,0.9);
  border-color: var(--border-strong);
  color: var(--text);
}
body.light-mode .form-group input::placeholder { color: var(--text-muted); }

/* === AUTH CARD: BORDE BRILLANTE CON COLOR DE PALETA === */
.auth-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12) 0%, transparent 40%, rgba(var(--primary-rgb), 0.05) 100%);
  pointer-events: none;
}

/* === HOME QUICK ITEMS: hover manejado por la clase principal === */

/* === CARD: MEJOR GLOW EN HOVER === */
.card:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(var(--primary-rgb), 0.1), 0 0 30px rgba(var(--primary-rgb), 0.06);
  transform: translateY(-3px);
}

/* === SIDEBAR: INDICADOR LATERAL MÁS SUAVE === */
.nav-item.active {
  box-shadow: inset 3px 0 0 var(--primary), 0 2px 12px rgba(var(--primary-rgb), 0.1);
}

/* === BTN-PRIMARY: GLOW DINÁMICO === */
.btn-primary {
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.35);
}
.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(var(--primary-rgb), 0.45);
}

/* === CHAT SEND BTN GLOW === */
.chat-send-btn:hover {
  box-shadow: 0 6px 24px rgba(var(--primary-rgb), 0.5);
}

/* === PALETTE SWATCHES (nuevo selector con etiquetas) === */
.palette-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}
@media (max-width: 480px) {
  .palette-swatches { grid-template-columns: repeat(4, 1fr); gap: 7px; }
}
.palette-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer;
  border-radius: 12px;
  padding: 10px 6px 8px;
  border: 2px solid transparent;
  background: var(--surface-hi);
  transition: all 0.2s;
  position: relative;
}
.palette-swatch:hover { transform: translateY(-2px); background: var(--surface-hover); }
.palette-swatch.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
}
.palette-swatch-color {
  width: 32px; height: 32px; border-radius: 50%;
  position: relative; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.palette-swatch.active .palette-swatch-color::after {
  content: '✓';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.palette-swatch-name {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted); text-align: center;
  letter-spacing: 0.2px; line-height: 1.2;
}
.palette-swatch.active .palette-swatch-name { color: var(--primary); }

/* === LIGHT MODE: AJUSTE PALETTE-SWATCH === */
body.light-mode .palette-swatch { background: var(--surface-hi); }
body.light-mode .palette-swatch:hover { background: var(--border-strong); }

/* === SECTION HEADER: MEJORA VISUAL MODO CLARO === */
body.light-mode .section-header {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  box-shadow: 0 1px 0 var(--border);
}

/* === SIDEBAR MODO CLARO === */
body.light-mode #sidebar {
  border-right-color: var(--border-strong);
}

/* === HOME DATE CHIP MODO CLARO === */
body.light-mode .home-date-chip {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-muted);
}

/* === MOBILE BOTTOM NAV: INDICADOR ACTIVO === */
.mob-nav-item.active {
  color: var(--primary);
  position: relative;
}
.mob-nav-item.active::after {
  content: '';
  position: absolute; top: 6px;
  left: 50%; transform: translateX(-50%);
  width: 24px; height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}

/* === TOGGLE SWITCH: COLOR DE PALETA === */
.toggle-switch.on { background: var(--primary); }

/* === SPLASH SCREEN: COLOR DE PALETA EN BARRA === */
.splash-bar {
  background: linear-gradient(90deg, var(--secondary), var(--primary), var(--accent));
  background-size: 200% 100%;
  animation: loadBar 1.2s ease forwards, shimmerBar 2s linear infinite;
}
@keyframes shimmerBar { 0%{background-position:0 0} 100%{background-position:200% 0} }

/* === SEARCH BOX: GLOW FOCO === */
.search-box:focus-within {
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.08);
}

/* === NOTE CARD: ACENTO LATERAL SUTIL === */
.note-card:hover {
  border-color: rgba(var(--primary-rgb), 0.3);
  box-shadow: -3px 0 0 var(--primary), 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

/* === HOME QUICK ITEMS: COLORES FIJOS POR SECCIÓN === */
.home-qi-ministry  { background: rgba(75,143,216,0.15); color: #4B8FD8; }
.home-qi-cong      { background: rgba(58,191,139,0.15); color: #3ABF8B; }
.home-qi-bible     { background: rgba(166,107,255,0.15); color: #A66BFF; }
.home-qi-notes     { background: rgba(224,180,75,0.15);  color: #E0B44B; }

/* El borde al hover sigue usando el color del tema general */
.home-quick-item:hover .home-qi-ministry { background: rgba(75,143,216,0.25); }
.home-quick-item:hover .home-qi-cong     { background: rgba(58,191,139,0.25); }
.home-quick-item:hover .home-qi-bible    { background: rgba(166,107,255,0.25); }
.home-quick-item:hover .home-qi-notes    { background: rgba(224,180,75,0.25); }

/* === HOME SUMMARY SKELETON: 3 columnas === */
.home-summary-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
@media (max-width: 800px) { .home-summary-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .home-summary-grid { grid-template-columns: 1fr; } }

/* ===== RESPONSIVE: VERY SMALL (≤ 380px) ===== */
@media (max-width: 380px) {
  .mob-nav-item span { display: none; }
  .mob-nav-item { justify-content: center; gap: 0; }
  .ministry-tab span { display: none; }
  .cong-tab { padding: 8px 2px; }
  .section-body { padding: 12px; }
}

/* ===== STUDIO IA: REDISEÑO COMPLETO ===== */

/* --- Header del chat --- */
.studio-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-height: 58px;
  gap: 12px;
}

.studio-chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.studio-chat-header-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.25), rgba(var(--primary-rgb), 0.1));
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.studio-chat-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
  outline: none;
  border-radius: 6px;
  padding: 2px 6px;
  cursor: text;
  transition: background 0.15s;
}
.studio-chat-title:focus {
  background: rgba(var(--primary-rgb), 0.08);
  white-space: normal;
  overflow: visible;
}

/* --- Botón "Nuevo" del header --- */
.studio-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-hi);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.studio-header-btn:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.3);
  color: var(--primary);
}

/* Chip de Energía IA (créditos) */
.studio-credits-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(224, 180, 75, 0.35);
  background: rgba(224, 180, 75, 0.10);
  color: #E0B44B;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.studio-credits-chip:hover {
  background: rgba(224, 180, 75, 0.18);
  border-color: rgba(224, 180, 75, 0.6);
}
.studio-credits-chip.low {
  border-color: rgba(229, 57, 53, 0.5);
  background: rgba(229, 57, 53, 0.10);
  color: #E5746E;
}

/* Aviso de Energía IA insuficiente */
.studio-credit-notice {
  border: 1px solid rgba(224, 180, 75, 0.35) !important;
  background: rgba(224, 180, 75, 0.07) !important;
}

/* Banner de descarga de la app (Home) */
.home-app-banner {
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.07), rgba(var(--secondary-rgb), 0.04));
  border-color: rgba(var(--primary-rgb), 0.18);
}
.home-store-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.home-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
}
.home-store-btn:hover { transform: translateY(-1px); opacity: 0.9; }
.home-store-btn span { display: flex; flex-direction: column; line-height: 1.15; font-size: 15px; }
.home-store-btn span small {
  font-size: 9px;
  font-weight: 600;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* --- Input area rediseñada --- */
.studio-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  background: var(--surface-hi);
  border: 1.5px solid var(--border-strong);
  border-radius: 16px;
  padding: 8px 10px 8px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.studio-input-wrap:focus-within {
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.07);
}

.studio-input-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin: 5px 0 0;
  opacity: 0.7;
}

/* --- Burbuja del chat: wrapper + acciones --- */
.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.chat-msg-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
  padding-left: 2px;
}
.chat-msg:hover .chat-msg-actions { opacity: 1; }

.chat-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-hi);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.chat-action-btn:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
}
.chat-action-btn.copied {
  border-color: rgba(58,191,139,0.5);
  color: #3ABF8B;
  background: rgba(58,191,139,0.1);
}

/* --- Pantalla de bienvenida (estado vacío) --- */
.studio-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px 32px;
  gap: 12px;
  flex: 1;
}

.studio-welcome-icon {
  width: 72px; height: 72px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.2), rgba(var(--primary-rgb), 0.05));
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
  box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.12);
}

.studio-welcome-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.studio-welcome-sub {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.6;
  margin: 0;
}

/* --- Chips de sugerencias --- */
.studio-suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
  max-width: 480px;
}

.studio-suggestion {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-hi);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
  line-height: 1.35;
}
.studio-suggestion:hover {
  border-color: rgba(var(--primary-rgb), 0.3);
  background: rgba(var(--primary-rgb), 0.06);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1);
}

/* --- Responsive Studio --- */
@media (max-width: 600px) {
  .studio-suggestions { grid-template-columns: 1fr; }
  .studio-welcome { padding: 32px 16px 24px; }
  .studio-chat-header { padding: 10px 14px; }
}

/* --- Light mode ajustes Studio --- */
body.light-mode .studio-chat-header { background: var(--bg); }
body.light-mode .studio-input-wrap { background: var(--surface); }
body.light-mode .studio-header-btn { background: var(--bg); }
body.light-mode .chat-action-btn { background: var(--bg); }

/* === STUDIO UNIFIED SIDEBAR === */
body.studio-active #sidebar {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Sidebar nav shrinks to content so chat-history can fill the rest */
body.studio-active .sidebar-nav {
  flex: 0 0 auto;
  overflow-y: auto;
  max-height: 40vh;
}
/* Footer always at bottom */
body.studio-active .sidebar-footer {
  flex-shrink: 0;
}
/* Chat-history inside sidebar: unified look */
body.studio-active #sidebar .chat-history {
  width: 100% !important;
  min-width: unset !important;
  flex: 1;
  border: none;
  border-top: 1px solid var(--border);
  background: transparent;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.studio-active #sidebar .chat-history-header {
  background: transparent;
}
/* When studio active, section only has .chat-main → full width */
body.studio-active .section.chat-layout {
  flex-direction: row;
}

/* === TOOLTIPS GLOBALES === */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
  padding: 6px 12px; background: #1E293B; color: #F8FAFF;
  font-size: 11px; font-weight: 600; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap; pointer-events: none; opacity: 0;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3); z-index: 1000;
}
[data-tooltip]:hover::before {
  opacity: 1; transform: translateX(-50%) translateY(-10px);
}

/* === FLOATING ACTION BUTTON (FAB) === */
.fab {
  position: fixed; bottom: 32px; right: 32px;
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px rgba(var(--primary-rgb), 0.4);
  cursor: pointer; z-index: 100;
  transition: all var(--transition);
  animation: fabShow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.fab:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 16px 48px rgba(var(--primary-rgb), 0.5);
}
@keyframes fabShow {
  from { opacity: 0; transform: scale(0.5) translateY(40px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Ocultar en móvil cuando el bottom nav está presente - SE HA MARCADO COMO INNECESARIO POR EL USUARIO */
.fab { display: none !important; }

/* === HOME QUICK ITEMS ENHANCEMENT === */
.home-quick-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.home-quick-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 20px;
  display: flex; align-items: center; gap: 16px;
  transition: all var(--transition); cursor: pointer;
  position: relative; overflow: hidden;
  backdrop-filter: blur(10px);
}
.home-quick-item:hover {
  background: var(--surface-hi); border-color: rgba(var(--primary-rgb), 0.4);
  transform: translateX(4px) translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.home-quick-item-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform 0.3s;
}
.home-quick-item:hover .home-quick-item-icon {
  transform: scale(1.1) rotate(-5deg);
}
/* Colores de iconos adaptados con color primario dinámico */
.home-qi-ministry { background: rgba(var(--primary-rgb), 0.12); color: var(--primary); }
.home-qi-cong      { background: rgba(var(--secondary-rgb), 0.12); color: var(--secondary); }
.home-qi-bible     { background: rgba(var(--primary-rgb), 0.12); color: var(--primary); }
.home-qi-notes     { background: rgba(var(--secondary-rgb), 0.12); color: var(--secondary); }

.home-quick-item-label { font-size: 15px; font-weight: 700; color: var(--text); display: block; }
.home-quick-item-desc { font-size: 12px; color: var(--text-muted); }
.home-quick-chevron { margin-left: auto; color: var(--text-light); transition: transform 0.3s; }
.home-quick-item:hover .home-quick-chevron { transform: translateX(4px); color: var(--primary); }

/* Ajuste de badges para que usen color primario */
.badge-pro {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white; padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 800;
}
.badge-primary { background: var(--primary) !important; color: white !important; }

.donate-item { color: var(--primary) !important; font-weight: 700; opacity: 1 !important; }
.donate-item:hover { background: rgba(var(--primary-rgb), 0.1) !important; }

/* =====================================================================
   STUDIO IA — REDISEÑO MINIMAL
   Sin bordes visibles · iconos sin fondo · superficies por contraste
   sutil y espacio · elegante, limpio e intuitivo.
   ===================================================================== */

/* — Superficies principales: fuera bordes — */
.chat-history { border-right: none; background: transparent; }
.chat-history-header { border-bottom: none; padding: 18px 16px 8px; }
.chat-history-header h3 { font-size: 11px; letter-spacing: 0.06em; }
.studio-chat-header { border-bottom: none; background: transparent; min-height: 64px; padding: 16px 28px; }
.chat-input-area { border-top: none; background: transparent; padding: 6px 28px 22px; }
.chat-messages { padding: 28px 28px 8px; }

/* — Header del chat: icono sin fondo — */
.studio-chat-header-icon { background: none !important; box-shadow: none; width: auto; height: auto; color: var(--primary); }
.studio-chat-title { font-size: 16px; }

/* — Botón "Nuevo": fantasma sin borde — */
.studio-header-btn {
  border: none; background: transparent; color: var(--text-muted);
  padding: 8px 13px; border-radius: 10px;
}
.studio-header-btn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }

/* — Chip Energía IA: sin borde, fondo sutil — */
.studio-credits-chip { border: none; background: color-mix(in srgb, #E0B44B 14%, transparent); padding: 7px 13px; }
.studio-credits-chip:hover { background: color-mix(in srgb, #E0B44B 24%, transparent); }
.studio-credits-chip.low { border: none; background: color-mix(in srgb, #E5746E 15%, transparent); }

/* — Lista de conversaciones: limpia, gestionable — */
.chat-history-list { padding: 4px 10px; }
.chat-history-item { padding: 10px 12px; border-radius: 11px; font-size: 13.5px; }
.chat-history-item:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.chat-history-item.active { background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--text); font-weight: 600; }

/* Botón de 3 puntos por conversación: fantasma, aparece en hover */
.studio-item-menu-btn { border: none; background: transparent; border-radius: 8px; opacity: 0.5; }
.studio-item-menu-btn:hover { background: color-mix(in srgb, var(--text) 12%, transparent); opacity: 1; }

/* Carpetas sin borde */
.studio-folder-header { border-radius: 11px; }
.studio-folder-header:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.studio-folder-count { border: none; background: color-mix(in srgb, var(--primary) 15%, transparent); }

/* Botones del header de historial (nueva carpeta / nuevo): fantasma */
.chat-history-header .icon-btn { border: none; background: transparent; color: var(--text-muted); }
.chat-history-header .icon-btn:hover { background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); }

/* — Menú contextual: sin borde duro, sombra suave — */
.studio-context-menu { border: none; border-radius: 14px; box-shadow: 0 14px 44px rgba(0,0,0,0.30); padding: 6px; }
.studio-context-item { border-radius: 9px; }
.studio-context-divider { background: color-mix(in srgb, var(--text) 8%, transparent); }

/* — Burbujas: asistente sin borde ni sombra dura — */
.chat-msg.assistant .chat-bubble {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: none;
  border-radius: 4px 18px 18px 18px;
  box-shadow: none;
}
.chat-msg.user .chat-bubble {
  border-radius: 18px 4px 18px 18px;
  box-shadow: 0 4px 18px rgba(var(--primary-rgb), 0.20);
}

/* — Input: pill sin borde, glow suave al enfocar — */
.studio-input-wrap {
  border: none;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border-radius: 22px;
  padding: 8px 8px 8px 16px;
  transition: background 0.2s, box-shadow 0.2s;
}
.studio-input-wrap:focus-within {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.22);
}
.chat-input { background: transparent; border: none; }
.chat-input:focus { border: none; box-shadow: none; }
.studio-input-hint { opacity: 0.6; }

/* — Botones de input: iconos fantasma — */
.chat-pdf-btn { border: none; background: transparent; color: var(--text-muted); }
.chat-pdf-btn:hover { background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--primary); }
.chat-pdf-btn.recording { border: none; background: color-mix(in srgb, #E53935 14%, transparent); color: #E53935; }
.chat-send-btn { box-shadow: none; }
.chat-send-btn:hover { box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.35); }

/* — Acciones de mensaje: fantasma sin borde — */
.chat-action-btn { border: none; background: transparent; color: var(--text-muted); padding: 5px 9px; }
.chat-action-btn:hover { border: none; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--primary); }
.chat-action-btn.speaking { border: none; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.chat-action-btn.copied { border: none; background: color-mix(in srgb, #3ABF8B 14%, transparent); color: #3ABF8B; }

/* — Estado de chat nuevo (welcome) — elegante — */
.studio-welcome { padding: 7vh 24px 32px; gap: 14px; }
.studio-welcome-icon {
  width: 60px; height: 60px;
  background: none; border: none; box-shadow: none;
  color: var(--primary); position: relative;
}
.studio-welcome-icon::after {
  content: ''; position: absolute; inset: -16px; z-index: -1;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.20) 0%, transparent 68%);
}
.studio-welcome-title {
  font-size: 27px; font-weight: 800; letter-spacing: -0.01em;
  background: linear-gradient(115deg, var(--text) 35%, var(--primary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.studio-welcome-sub { max-width: 440px; }

/* Sugerencias: tarjetas sin borde, fondo sutil */
.studio-suggestions { gap: 10px; margin-top: 18px; max-width: 520px; }
.studio-suggestion {
  border: none;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border-radius: 14px;
  padding: 13px 16px;
  transition: background 0.16s, transform 0.16s;
}
.studio-suggestion:hover {
  border: none;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: none;
}
.studio-suggestion svg { color: var(--primary); opacity: 0.9; }

/* Aviso de Energía IA insuficiente: sin borde duro */
.studio-credit-notice { border: none !important; background: color-mix(in srgb, #E0B44B 9%, transparent) !important; }

/* Diálogos: sin borde, sombra suave */
.studio-dialog { border: none; box-shadow: 0 20px 60px rgba(0,0,0,0.35); }
.studio-dialog input { border: none !important; background: color-mix(in srgb, var(--text) 7%, transparent) !important; }

/* =====================================================================
   MENÚS (nav + conversaciones) — REDISEÑO MINIMAL + OCULTAR/MOSTRAR
   ===================================================================== */

/* Sidebar sin bordes */
#sidebar { border-right: none; }
#sidebar::after { display: none; }
.sidebar-header { border-bottom: none; padding: 18px 16px 8px; }
.sidebar-footer { border-top: none; padding-top: 8px; }

/* Botón ocultar/mostrar (fantasma) */
.sidebar-toggle-btn { border: none; background: transparent; cursor: pointer; border-radius: 10px; }
.sidebar-toggle-btn:hover { background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); }

/* Navegación: items limpios, iconos SIN fondo */
.nav-item { border-radius: 12px; padding: 10px 12px; gap: 12px; font-size: 14px; }
.nav-item:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); transform: none; }
.nav-item.active {
  background: color-mix(in srgb, var(--primary) 13%, transparent);
  color: var(--primary); font-weight: 700; box-shadow: none;
}
.nav-icon { width: 24px; height: 24px; border-radius: 0; background: none !important; }
.nav-item.active .nav-icon, .nav-item:not(.active):hover .nav-icon { background: none !important; }
.nav-badge.new { background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); }

/* Footer: usuario + acciones fantasma */
.user-info { border-radius: 12px; }
.icon-btn { border: none; background: transparent; }
.icon-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }

/* Selector de idioma sin borde ni líneas */
.lang-selector-mini { border-top: none !important; }
.lang-badge { border: none !important; }

/* Cabecera "CONVERSACIONES" */
.chat-history-header h3 { font-weight: 700; }

/* — Ocultar / mostrar el menú — */
#sidebar { transition: width 0.26s ease; }
body.sidebar-hidden #sidebar { width: 0 !important; min-width: 0 !important; pointer-events: none; }
#sidebar-show-btn {
  display: none;
  position: fixed; top: 14px; left: 14px; z-index: 60;
  width: 40px; height: 40px; border-radius: 12px;
  align-items: center; justify-content: center;
  background: var(--surface); color: var(--text);
  border: none; cursor: pointer;
  box-shadow: 0 6px 22px rgba(0,0,0,0.20);
  transition: background 0.15s, transform 0.15s;
}
#sidebar-show-btn:hover { transform: scale(1.06); background: var(--surface-hi); }
body.sidebar-hidden #sidebar-show-btn { display: flex; }

/* =====================================================================
   HOME — REDISEÑO MINIMAL (sin bordes, iconos sin fondo, limpio)
   ===================================================================== */
.home-v2 {
  padding: 44px 44px 72px;
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  overflow-y: auto;
}

/* Hero saludo */
.home-hero { margin-bottom: 28px; }
.home-hero-kicker { font-size: 13px; color: var(--text-muted); margin: 0 0 8px; }
.home-hero-kicker #home-greeting::first-letter { text-transform: uppercase; }
.home-hero-title {
  font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 0; line-height: 1.15;
  background: linear-gradient(115deg, var(--text) 42%, var(--primary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* Preguntar a Elián — acción principal */
.home-ask { margin-bottom: 42px; }
.home-ask-bar {
  display: flex; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border-radius: 18px; padding: 8px 8px 8px 18px;
  transition: background 0.2s, box-shadow 0.2s;
}
.home-ask-bar:focus-within {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.22);
}
.home-ask-spark { color: var(--primary); flex-shrink: 0; }
.home-ask-bar input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 15px; padding: 13px 0;
}
.home-ask-send {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--secondary), var(--primary)); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.home-ask-send:hover { transform: scale(1.05); box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.35); }

/* Títulos de bloque */
.home-block-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin: 0 0 14px;
}

/* Accesos rápidos — tiles minimal, iconos SIN fondo */
.home-quick-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 42px;
}
.home-quick-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 16px; cursor: pointer; border: none;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  transition: background 0.16s, transform 0.16s;
}
.home-quick-item:hover {
  background: color-mix(in srgb, var(--text) 7%, transparent);
  transform: translateY(-2px); box-shadow: none;
}
.home-quick-item-icon {
  width: 26px; height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: none !important; border-radius: 0;
}
.home-quick-item:hover .home-quick-item-icon { transform: none; }
.home-qi-ministry { color: #4B8FD8 !important; background: none !important; }
.home-qi-cong     { color: #3ABF8B !important; background: none !important; }
.home-qi-bible    { color: #A66BFF !important; background: none !important; }
.home-qi-notes    { color: #E0B44B !important; background: none !important; }
.home-quick-item:hover .home-qi-ministry,
.home-quick-item:hover .home-qi-cong,
.home-quick-item:hover .home-qi-bible,
.home-quick-item:hover .home-qi-notes { background: none !important; }
.home-quick-item-label { font-size: 15px; font-weight: 700; color: var(--text); display: block; }
.home-quick-item-desc { font-size: 12.5px; color: var(--text-muted); display: block; margin-top: 2px; }
.home-quick-chevron { margin-left: auto; color: var(--text-muted); opacity: 0.5; flex-shrink: 0; }

/* Tu actividad — tarjetas sin borde */
.home-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 42px; }
.home-summary-card, .home-summary-skeleton {
  background: color-mix(in srgb, var(--text) 4%, transparent) !important;
  border: none !important; border-radius: 16px; box-shadow: none !important;
  padding: 18px;
}
.home-summary-card-icon { background: none !important; color: var(--primary) !important; width: auto; height: auto; }
.home-summary-card-header { gap: 8px; }

/* Banner descarga app — minimal (arriba del home) */
.home-app-banner {
  border: none !important; border-radius: 18px; margin: 0 0 26px;
  background: color-mix(in srgb, var(--primary) 7%, transparent) !important;
}

@media (max-width: 760px) {
  .home-v2 { padding: 26px 18px 90px; }
  .home-hero-title { font-size: 24px; }
  .home-quick-grid { grid-template-columns: 1fr; }
  .home-summary-grid { grid-template-columns: 1fr; }
}


/* =====================================================================
   ENERGÍA IA — tarjeta del inicio
   ===================================================================== */
.home-energy {
  background: color-mix(in srgb, #E0B44B 9%, transparent);
  border-radius: 18px; padding: 18px 20px; margin-bottom: 28px;
}
.home-energy-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.home-energy-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; color: #E0B44B; }
.home-energy-total { font-size: 24px; font-weight: 800; color: var(--text); display: inline-flex; align-items: baseline; gap: 6px; }
.home-energy-total small { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.home-energy-bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.home-energy-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #E0B44B, #E8C76E); transition: width 0.4s ease; }
.home-energy-meta { display: flex; flex-wrap: wrap; gap: 5px 18px; margin-top: 10px; font-size: 12.5px; color: var(--text-muted); }
.home-energy-meta strong { color: var(--text); font-weight: 700; }

/* =====================================================================
   RESPONSIVE — tablet (overlay sidebar) + ajustes móvil
   ===================================================================== */
@media (max-width: 1024px) {
  /* Sidebar como panel deslizable sobre el contenido */
  #sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 130;
    width: 290px !important; max-width: 86vw;
    box-shadow: 8px 0 40px rgba(0,0,0,0.30);
    transition: transform 0.26s ease;
  }
  body.sidebar-hidden #sidebar { transform: translateX(-100%); }
  #main-content { width: 100%; }
  /* Botón flotante para abrir el menú */
  body.sidebar-hidden #sidebar-show-btn { display: flex; }

  /* Home más compacto en tablet */
  .home-v2 { padding: 28px 28px 64px; max-width: 760px; }
  .home-hero-title { font-size: 26px; }
}

/* Tablet vertical / móvil grande */
@media (max-width: 760px) {
  .home-v2 { padding: 24px 18px 90px; }
  .home-hero-title { font-size: 23px; }
  .home-quick-grid { grid-template-columns: 1fr; }
  .home-summary-grid { grid-template-columns: 1fr; }
  .home-ask-bar input { font-size: 16px; } /* evita zoom en iOS */
  .home-store-btn { flex: 1; justify-content: center; }
}

/* Móvil: bottom nav manda, sin botón flotante */
@media (max-width: 640px) {
  #sidebar-show-btn { display: none !important; }
  .studio-chat-header { padding: 12px 16px; min-height: 56px; }
  .chat-messages { padding: 16px 16px 8px; }
  .chat-input-area { padding: 6px 12px 16px; }
  .chat-msg .chat-bubble { max-width: 86vw; }
  .home-energy { padding: 16px; }
  .home-energy-total { font-size: 21px; }
}

/* =====================================================================
   CONGREGACIÓN — minimal
   ===================================================================== */
.cong-tabs { display:flex; gap:4px; background: color-mix(in srgb, var(--text) 5%, transparent); border-radius:14px; padding:4px; margin-bottom:22px; overflow-x:auto; }
.cong-tab { display:inline-flex; align-items:center; gap:6px; padding:9px 14px; border:none; background:transparent; color:var(--text-muted); font-size:13px; font-weight:600; border-radius:10px; cursor:pointer; white-space:nowrap; transition:background .15s,color .15s; flex-shrink:0; }
.cong-tab:hover { color:var(--text); }
.cong-tab.active { background:var(--bg); color:var(--primary); box-shadow:0 1px 5px rgba(0,0,0,0.10); }
body.light-mode .cong-tab.active { background:#fff; }

.cong-info-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.cong-info-tile { background: color-mix(in srgb, var(--text) 5%, transparent); border-radius:12px; padding:12px 14px; }
.cong-info-k { font-size:11px; text-transform:uppercase; letter-spacing:0.06em; color:var(--text-muted); margin-bottom:4px; }
.cong-info-v { font-size:14px; font-weight:700; text-transform:capitalize; }

.cong-icon-btn { width:36px; height:36px; border:none; background: color-mix(in srgb, var(--text) 6%, transparent); border-radius:10px; display:flex; align-items:center; justify-content:center; color:var(--text-muted); cursor:pointer; flex-shrink:0; transition:background .15s,color .15s; }
.cong-icon-btn:hover { background: color-mix(in srgb, var(--text) 12%, transparent); color:var(--text); }

.cong-link-btn { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:11px; background: color-mix(in srgb, var(--primary) 10%, transparent); color:var(--primary); font-weight:700; font-size:13px; text-decoration:none; transition:background .15s; }
.cong-link-btn:hover { background: color-mix(in srgb, var(--primary) 18%, transparent); }

.cong-badge { font-size:10px; font-weight:700; padding:2px 7px; border-radius:99px; }

.cong-leave-btn { display:inline-flex; align-items:center; gap:8px; align-self:flex-start; background:none; border:none; color:#E5746E; cursor:pointer; font-size:14px; font-weight:600; padding:8px 0; margin-top:4px; }
.cong-leave-btn:hover { opacity:0.8; }

@media (max-width:760px){ .cong-info-grid { grid-template-columns:1fr; } }

/* Energía IA — tarjeta en el estado de chat nuevo de Studio */
.studio-energy-card {
  width: 100%; max-width: 520px;
  background: color-mix(in srgb, #E0B44B 9%, transparent);
  border-radius: 16px; padding: 16px 18px; margin: 6px 0 4px;
  text-align: left;
}
.studio-energy-top { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:10px; }
.studio-energy-label { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:800; color:#E0B44B; }
.studio-energy-total { font-size:22px; font-weight:800; color:var(--text); display:inline-flex; align-items:baseline; gap:5px; }
.studio-energy-total small { font-size:11px; font-weight:600; color:var(--text-muted); }
.studio-energy-bar { height:7px; border-radius:99px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow:hidden; }
.studio-energy-bar-fill { height:100%; border-radius:99px; background: linear-gradient(90deg,#E0B44B,#E8C76E); transition:width .4s ease; }
.studio-energy-meta { display:flex; flex-wrap:wrap; gap:4px 16px; margin-top:9px; font-size:12px; color:var(--text-muted); }
.studio-energy-meta strong { color:var(--text); font-weight:700; }

/* === Studio: badge "nuevo" en botón PDF === */
.chat-pdf-btn.has-new { position: relative; }
.pdf-new-dot { position:absolute; top:5px; right:5px; width:7px; height:7px; border-radius:50%; background:var(--primary); box-shadow:0 0 0 2px var(--bg); }

/* === Studio: planes de IA === */
.studio-plans-overlay { align-items:flex-start; padding:5vh 16px; overflow-y:auto; }
.studio-plans { background:var(--bg); border-radius:20px; width:100%; max-width:920px; padding:24px; box-shadow:0 24px 70px rgba(0,0,0,0.4); }
.studio-plans-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:20px; }
.studio-plans-head h3 { font-size:20px; font-weight:800; margin:0; }
.studio-plans-head p { font-size:13px; color:var(--text-muted); margin:4px 0 0; }
.studio-plans-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.studio-plan { position:relative; background:color-mix(in srgb,var(--text) 4%,transparent); border-radius:16px; padding:18px 16px; display:flex; flex-direction:column; gap:8px; }
.studio-plan.popular { background:color-mix(in srgb,var(--primary) 10%,transparent); box-shadow:0 0 0 1.5px var(--primary); }
.studio-plan.current { box-shadow:0 0 0 1.5px color-mix(in srgb,var(--text) 22%,transparent); }
.studio-plan-tag { position:absolute; top:-9px; left:16px; background:var(--primary); color:#fff; font-size:10px; font-weight:800; padding:2px 8px; border-radius:99px; }
.studio-plan-name { font-size:16px; font-weight:800; }
.studio-plan-energy { display:inline-flex; align-items:center; gap:5px; font-size:12.5px; font-weight:700; color:#E0B44B; }
.studio-plan-energy span { color:var(--text-muted); font-weight:500; }
.studio-plan-price { font-size:22px; font-weight:800; }
.studio-plan-price small { font-size:12px; font-weight:500; color:var(--text-muted); }
.studio-plan-desc { font-size:12.5px; color:var(--text-muted); line-height:1.45; flex:1; }
.studio-plan-btn { margin-top:6px; padding:10px; border:none; border-radius:10px; background:linear-gradient(135deg,var(--secondary),var(--primary)); color:#fff; font-weight:700; cursor:pointer; transition:opacity .15s; }
.studio-plan-btn:hover { opacity:0.9; }
.studio-plan-btn.current { background:color-mix(in srgb,var(--text) 8%,transparent); color:var(--text-muted); cursor:default; }
.studio-plans-foot { font-size:11.5px; color:var(--text-muted); text-align:center; margin:16px 0 0; }
@media (max-width:760px){ .studio-plans-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:440px){ .studio-plans-grid { grid-template-columns:1fr; } }

/* === Studio: búsqueda === */
.studio-search-overlay { position:fixed; inset:0; z-index:300; background:rgba(0,0,0,0.45); backdrop-filter:blur(3px); display:flex; justify-content:center; align-items:flex-start; padding:8vh 16px; }
.studio-search-panel { background:var(--bg); width:100%; max-width:600px; border-radius:18px; box-shadow:0 24px 70px rgba(0,0,0,0.45); overflow:hidden; display:flex; flex-direction:column; max-height:78vh; }
.studio-search-bar { display:flex; align-items:center; gap:10px; padding:13px 16px; color:var(--text-muted); border-bottom:1px solid color-mix(in srgb,var(--text) 7%,transparent); }
.studio-search-bar input { flex:1; background:transparent; border:none; outline:none; color:var(--text); font-size:16px; }
.studio-search-results { overflow-y:auto; padding:8px; }
.studio-search-hint, .studio-search-loading { padding:32px 16px; text-align:center; color:var(--text-muted); font-size:13px; }
.studio-search-group { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--text-muted); padding:12px 10px 6px; }
.studio-search-item { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; cursor:pointer; font-size:14px; }
.studio-search-item:hover { background:color-mix(in srgb,var(--text) 7%,transparent); }
.studio-search-item.col { flex-direction:column; align-items:flex-start; gap:3px; }
.studio-search-item-title { font-weight:700; font-size:13px; }
.studio-search-snippet { font-size:12.5px; color:var(--text-muted); line-height:1.4; }
.studio-search-item mark { background:color-mix(in srgb,var(--primary) 30%,transparent); color:var(--text); border-radius:3px; padding:0 1px; }

/* === Home: campana de notificaciones === */
.home-bell { position:relative; width:42px; height:42px; flex-shrink:0; border:none; border-radius:13px; background:color-mix(in srgb,var(--text) 5%,transparent); color:var(--text); display:flex; align-items:center; justify-content:center; cursor:pointer; transition:background .15s; }
.home-bell:hover { background:color-mix(in srgb,var(--text) 9%,transparent); }
.home-bell-badge { position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; padding:0 4px; border-radius:99px; background:#E5484D; color:#fff; font-size:10px; font-weight:800; display:flex; align-items:center; justify-content:center; box-shadow:0 0 0 2px var(--bg); }

/* === Home: X del banner de descarga === */
.home-app-banner-x { position:absolute; top:10px; right:10px; width:28px; height:28px; border:none; border-radius:9px; background:color-mix(in srgb,var(--text) 6%,transparent); color:var(--text-muted); display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all .15s; z-index:2; }
.home-app-banner-x:hover { background:color-mix(in srgb,var(--text) 12%,transparent); color:var(--text); }

/* === Home: anuncio (special event) === */
.home-announce { display:flex; align-items:stretch; gap:0; border-radius:18px; overflow:hidden; margin-bottom:26px; background:color-mix(in srgb,var(--primary) 8%,transparent); transition:transform .15s, box-shadow .15s; }
.home-announce:hover { transform:translateY(-2px); box-shadow:0 8px 26px rgba(0,0,0,0.14); }
.home-announce-img { width:120px; flex-shrink:0; background-size:cover; background-position:center; }
.home-announce-body { flex:1; min-width:0; padding:16px 18px; display:flex; flex-direction:column; justify-content:center; gap:4px; }
.home-announce-tag { align-self:flex-start; font-size:10px; font-weight:800; letter-spacing:0.06em; text-transform:uppercase; color:var(--primary); background:color-mix(in srgb,var(--primary) 15%,transparent); padding:2px 8px; border-radius:99px; }
.home-announce-title { font-size:15.5px; font-weight:800; color:var(--text); line-height:1.3; }
.home-announce-sub { font-size:12.5px; color:var(--text-muted); }
.home-announce-arrow { align-self:center; margin-right:14px; color:var(--text-muted); flex-shrink:0; }
@media (max-width:520px){ .home-announce-img { width:84px; } }

/* === Notificaciones: items === */
.notif-item { display:flex; gap:12px; padding:13px 12px; border-radius:12px; cursor:pointer; transition:background .15s; }
.notif-item:hover { background:color-mix(in srgb,var(--text) 6%,transparent); }
.notif-item.unread { background:color-mix(in srgb,var(--primary) 7%,transparent); }
.notif-icon { width:36px; height:36px; border-radius:10px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.notif-update { background:color-mix(in srgb,var(--primary) 14%,transparent); color:var(--primary); }
.notif-promo { background:color-mix(in srgb,#3ABF8B 16%,transparent); color:#3ABF8B; }
.notif-alert { background:color-mix(in srgb,#E5484D 16%,transparent); color:#E5746E; }
.notif-info { background:color-mix(in srgb,var(--text) 9%,transparent); color:var(--text-muted); }
.notif-item-title { font-size:14px; font-weight:700; display:flex; align-items:center; gap:7px; }
.notif-item-body { font-size:13px; color:var(--text-muted); line-height:1.45; margin-top:2px; }
.notif-item-date { font-size:11px; color:var(--text-muted); opacity:0.7; margin-top:4px; }
.notif-dot { width:7px; height:7px; border-radius:50%; background:var(--primary); flex-shrink:0; }

/* Studio planes: CTA principal a donar + ajuste de energía como precio */
.studio-plans-cta { width:100%; margin-top:16px; padding:13px; border:none; border-radius:12px; background:linear-gradient(135deg,var(--secondary),var(--primary)); color:#fff; font-weight:800; font-size:14px; cursor:pointer; transition:opacity .15s; }
.studio-plans-cta:hover { opacity:0.92; }
.studio-plan-price { display:inline-flex; align-items:center; gap:5px; }
.studio-plan-price small { margin-left:2px; }

/* Studio planes: precio claro + nota anual + link anual */
.studio-plan-annual { font-size:11.5px; color:var(--text-muted); margin-top:-2px; }
.studio-plan-energy { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:700; color:#E0B44B; margin-top:2px; }
.studio-plan-energy span { color:var(--text-muted); font-weight:500; }
.studio-plans-annual-link { display:block; text-align:center; margin-top:10px; font-size:13px; font-weight:700; color:var(--primary); text-decoration:none; }
.studio-plans-annual-link:hover { text-decoration:underline; }

/* === Congregación: programa editable === */
.cong-lbl { display:block; font-size:12px; color:var(--text-muted); margin:12px 0 5px; font-weight:600; }
.cong-input { width:100%; padding:11px 13px; border:none; border-radius:10px; background:color-mix(in srgb,var(--text) 6%,transparent); color:var(--text); font-size:14px; box-sizing:border-box; }
.cong-input:focus { outline:none; box-shadow:0 0 0 2px rgba(var(--primary-rgb),0.25); }
.cong-modal-save { width:100%; margin-top:18px; padding:12px; border:none; border-radius:11px; cursor:pointer; font-weight:800; font-size:14px; }
.cong-prog-row { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:9px; background:color-mix(in srgb,var(--text) 4%,transparent); }
.cong-prog-row-title { font-size:13.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cong-prog-row-sub { font-size:11.5px; color:var(--text-muted); margin-top:1px; }
.cong-prog-actions { display:flex; gap:3px; flex-shrink:0; }
.cong-prog-add { margin-top:10px; display:inline-flex; align-items:center; gap:6px; padding:8px 13px; border:none; border-radius:9px; background:color-mix(in srgb,var(--primary) 12%,transparent); color:var(--primary); font-size:12.5px; font-weight:700; cursor:pointer; transition:background .15s; }
.cong-prog-add:hover { background:color-mix(in srgb,var(--primary) 20%,transparent); }

/* === Home: Texto del día (minimal) === */
#home-daily-text { margin-bottom: 26px; }
#home-daily-text .daily-text-card { border:none !important; background: color-mix(in srgb, var(--text) 4%, transparent) !important; border-radius:16px; padding:18px 20px; box-shadow:none !important; }
.daily-text-meta { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.daily-text-badge { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:0.05em; color:var(--primary); background:color-mix(in srgb,var(--primary) 13%,transparent); padding:3px 9px; border-radius:99px; }
.daily-text-date { font-size:12px; color:var(--text-muted); text-transform:capitalize; }
.daily-text-verse { font-size:16px; font-weight:700; line-height:1.5; margin:0 0 8px; font-family:'Libre Baskerville', Georgia, serif; }
.daily-text-comment { font-size:13.5px; color:var(--text-muted); line-height:1.6; margin:0 0 12px; }
.daily-text-btn { border:none !important; background:color-mix(in srgb,var(--text) 7%,transparent) !important; color:var(--text) !important; border-radius:10px; }

/* ============================================================
   PULIDO GLOBAL MINIMAL — secciones Biblia/Notas/Ministerio/Herramientas/Ajustes
   ============================================================ */
.section-header {
  border-bottom: none !important;
  background: transparent !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  padding: 30px 34px 14px;
}
.section-title { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.section-subtitle { font-size: 13.5px; }
.section-body { padding: 4px 34px 80px; }
.card {
  border: none;
  box-shadow: none;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.quick-card { border: none; background: color-mix(in srgb, var(--text) 4%, transparent); backdrop-filter: none; }
.quick-card:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--text) 7%, transparent); }
@media (max-width:760px){ .section-header { padding: 22px 18px 12px; } .section-body { padding: 4px 18px 90px; } }
