/* ==========================================================================
   SYNKRO v3.0 - MODERNO, EN ESPAÑOL, ALTO CONTRASTE & NOTAS DE PAPEL
   Palette & Typography inspired by the "Week at a Glance" Reference Card
   Notas adhesivas apiladas no uniformes con textura de papel y cinta adhesiva
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,700&display=swap');

:root {
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Fondo de Alto Contraste y Superficies - AMOLED NEGRO TOTAL */
  --bg-canvas: #000000;
  --bg-card: #080808;
  --bg-card-hover: #121212;
  --bg-card-glass: rgba(0, 0, 0, 0.94);
  --bg-input: #111111;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.14);
  --border-focus: #10b981;

  /* Tipografía de Alto Contraste */
  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;

  /* Acento Verde Esmeralda / Menta Elegante de Alto Contraste (NO florescente) */
  --accent-lime: #10b981;
  --accent-lime-hover: #059669;
  --accent-lime-glow: rgba(16, 185, 129, 0.28);

  /* Píldoras de Días (Inspiradas en la foto) */
  --badge-tue: #10b981;  /* Mar / Esmeralda */
  --badge-wed: #6366f1;  /* Mié / Índigo */
  --badge-thu: #f97316;  /* Jue / Naranja */
  --badge-fri: #ec4899;  /* Vie / Magenta */
  --badge-sat: #0ea5e9;  /* Sáb / Celeste */
  --badge-sun: #f43f5e;  /* Dom / Coral */
  --badge-mon: #14b8a6;  /* Lun / Cian */

  --primary: #10b981;
  --primary-contrast: #ffffff;
  --danger: #ef4444;
  --warning: #f59e0b;
  --purple: #8b5cf6;

  --header-height: 64px;
  --bottom-nav-height: 72px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  --shadow-card: 0 16px 40px -8px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 24px rgba(159, 232, 112, 0.25);
}

[data-theme="light"] {
  --bg-canvas: #f6f8fb;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-card-glass: rgba(255, 255, 255, 0.96);
  --bg-input: #f1f5f9;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-focus: #10b981;

  --text-main: #0f172a;       /* Gris carbón profundo para máximo contraste */
  --text-muted: #334155;      /* Pizarra para descripciones y etiquetas legibles */
  --text-subtle: #64748b;     /* Pizarra medio para fechas e info secundaria */

  --primary: #10b981;
  --primary-contrast: #ffffff;
  --accent-lime: #059669;      /* Esmeralda accesible de alto contraste para fondo blanco */
  --accent-lime-hover: #047857;
  --accent-lime-glow: rgba(16, 185, 129, 0.22);

  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 16px rgba(16, 185, 129, 0.16);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  letter-spacing: -0.018em;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-canvas);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-bottom: calc(var(--bottom-nav-height) + 16px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font-family: var(--font-body);
  letter-spacing: -0.018em;
}

@media (min-width: 992px) {
  body {
    padding-bottom: 24px;
  }
}

/* ==========================================================================
   Typography & Animaciones Generales
   ========================================================================== */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  font-weight: 800;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(159, 232, 112, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(159, 232, 112, 0); }
  100% { box-shadow: 0 0 0 0 rgba(159, 232, 112, 0); }
}

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

/* ==========================================================================
   Estructura General (App Shell & Layout con Sidebar)
   ========================================================================== */
.app-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

.app-content-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  transition: all 0.25s ease;
}

/* ==========================================================================
   Sidebar Lateral de Módulos (Desktop Fijo/Colapsable + Mobile Drawer)
   ========================================================================== */
.app-sidebar {
  width: 260px;
  min-width: 260px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-xs);
  transition: color 0.2s;
}

.sidebar-close-btn:hover {
  color: var(--accent-lime);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  padding: 0.6rem 0.75rem 0.3rem;
  text-transform: uppercase;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.68rem 0.85rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.sidebar-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  transform: translateX(2px);
}

.sidebar-item.active {
  background: rgba(159, 232, 112, 0.12);
  border-color: rgba(159, 232, 112, 0.35);
  color: var(--accent-lime);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .sidebar-item.active {
  background: #ecfdf5;
  border-color: #059669;
  color: #047857;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.15);
}

.sidebar-icon {
  font-size: 1.15rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  flex-shrink: 0;
}

.sidebar-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--bg-card);
}

.sidebar-quick-btn {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--accent-lime);
  color: #0c0e12;
  font-weight: 800;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.sidebar-quick-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px var(--accent-lime-glow);
}

[data-theme="light"] .sidebar-quick-btn {
  background: #059669;
  color: #ffffff;
}

[data-theme="light"] .sidebar-quick-btn:hover {
  background: #047857;
}

.sidebar-user-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-user-pill:hover {
  border-color: var(--accent-lime);
}

.sidebar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(159, 232, 112, 0.2);
  color: var(--accent-lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-plan {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Modo colapsado en desktop */
.app-sidebar.collapsed {
  width: 76px;
  min-width: 76px;
}

.app-sidebar.collapsed .sidebar-label,
.app-sidebar.collapsed .sidebar-badge,
.app-sidebar.collapsed .sidebar-section-title,
.app-sidebar.collapsed .sidebar-brand .brand-title,
.app-sidebar.collapsed .sidebar-quick-btn span:not(:first-child),
.app-sidebar.collapsed .sidebar-user-info {
  display: none;
}

.app-sidebar.collapsed .sidebar-item {
  justify-content: center;
  padding: 0.65rem;
}

.app-sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0 0.5rem;
}

/* Modo Mobile Drawer (< 992px) */
@media (max-width: 991px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 84vw;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 120;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: block;
  }
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 115;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Encabezado Superior con Logo Centrado (App Header)
   ========================================================================== */
.app-header {
  height: var(--header-height);
  background: var(--bg-card-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 1.25rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-self: start;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: end;
}

.brand-wrapper.brand-center {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-wrapper.brand-center:hover {
  transform: scale(1.04);
}

.brand-square {
  width: 14px;
  height: 14px;
  background-color: var(--accent-lime);
  border-radius: 3px;
  animation: pulseGlow 3s infinite;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.header-sidebar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.2s ease;
}

.header-sidebar-btn:hover {
  border-color: var(--accent-lime);
  color: var(--accent-lime);
  box-shadow: 0 0 10px var(--accent-lime-glow);
}

.header-quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.header-quick-action-btn:hover {
  color: var(--accent-lime);
  border-color: var(--accent-lime);
}

@media (max-width: 540px) {
  .header-quick-action-btn .quick-action-label {
    display: none;
  }
  .app-header {
    padding: 0 0.85rem;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-badge-pill {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(159, 232, 112, 0.15);
  color: var(--accent-lime);
  border: 1px solid var(--accent-lime);
}

[data-theme="light"] .user-badge-pill {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
  border: 1px solid #059669;
}

/* ==========================================================================
   Barra de Agendas (Unificadas vs Separadas + Compartir QR)
   ========================================================================== */
.agenda-control-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.agenda-control-bar::-webkit-scrollbar,
.agenda-chips-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.agenda-chips-scroll {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.agenda-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.agenda-chip:hover {
  border-color: var(--accent-lime);
  color: var(--text-main);
  transform: translateY(-1px);
}

.agenda-chip.active {
  background: rgba(159, 232, 112, 0.15);
  border-color: var(--accent-lime);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(159, 232, 112, 0.2);
}

[data-theme="light"] .agenda-chip {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .agenda-chip:hover {
  border-color: #059669;
  color: #0f172a;
  background: #f8fafc;
}

[data-theme="light"] .agenda-chip.active {
  background: #ecfdf5;
  border-color: #059669;
  color: #047857;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
}

.agenda-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.agenda-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(159, 232, 112, 0.2), rgba(16, 185, 129, 0.15));
  border: 1px solid var(--accent-lime);
  color: var(--accent-lime);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.agenda-share-btn:hover {
  background: var(--accent-lime);
  color: #0c0e12;
  box-shadow: 0 0 16px var(--accent-lime-glow);
  transform: translateY(-1px);
}

[data-theme="light"] .agenda-share-btn {
  background: #ecfdf5;
  border-color: #059669;
  color: #047857;
}

[data-theme="light"] .agenda-share-btn:hover {
  background: #059669;
  color: #ffffff;
}

/* ==========================================================================
   Navegación de Escritorio
   ========================================================================== */
.desktop-nav-tabs {
  display: none;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 992px) {
  .desktop-nav-tabs {
    display: flex;
  }
}

.nav-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-tab-item:hover {
  background: var(--bg-card);
  color: var(--text-main);
}

.nav-tab-item.active {
  background: var(--bg-card);
  color: var(--accent-lime);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .nav-tab-item {
  color: #475569;
}

[data-theme="light"] .nav-tab-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme="light"] .nav-tab-item.active {
  background: #ffffff;
  color: #047857;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  font-weight: 700;
}

/* ==========================================================================
   Layout Principal Fluido
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 1.25rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: viewFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* ==========================================================================
   TABLERO KANBAN MODERNO (RESPONSIVE & MOBILE FRIENDLY)
   ========================================================================== */
.kanban-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: flex-start;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .kanban-board {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .kanban-board {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kanban-column {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.15rem;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  transition: all 0.22s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.kanban-column:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.kanban-column.drag-over {
  border-color: var(--accent-lime);
  background: rgba(159, 232, 112, 0.05);
  box-shadow: 0 0 20px rgba(159, 232, 112, 0.15);
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

[data-theme="light"] .kanban-column {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .kanban-badge {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #047857;
}

.kanban-cards-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
  min-height: 150px;
}

.task-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: grab;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  user-select: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  position: relative;
}

[data-theme="light"] .task-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-card:hover {
  border-color: var(--accent-lime);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 16px rgba(159, 232, 112, 0.12);
}

[data-theme="light"] .task-card:hover {
  border-color: #10b981;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.task-card:active {
  cursor: grabbing;
}

.task-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.priority-tag {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.priority-low, .priority-baja {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.priority-medium, .priority-media {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.priority-high, .priority-alta {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.35);
}

.priority-urgent, .priority-urgente {
  background: rgba(239, 68, 68, 0.22);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.task-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--border-color);
}

.checklist-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 3px;
}

.checklist-progress-fill {
  height: 100%;
  background: var(--accent-lime);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* ==========================================================================
   KPIS DE ALTO NIVEL Y WIDGETS PERSONALIZABLES (DRAG & DROP + CONFIGURACIÓN)
   ========================================================================== */
.kpi-widgets-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.kpi-container-grid, .kpi-widgets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
}

@media (min-width: 768px) {
  .kpi-container-grid, .kpi-widgets-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

.modern-kpi-card, .kpi-widget-card {
  background: #090909;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.modern-kpi-card:hover, .kpi-widget-card:hover {
  border-color: rgba(159, 232, 112, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(159, 232, 112, 0.1);
}

/* Estados de Drag & Drop para Widgets Personalizables */
.kpi-widget-card.is-dragging {
  opacity: 0.4;
  transform: scale(0.96);
  border: 2px dashed var(--accent-lime);
}

.kpi-widget-card.drag-over {
  border: 2px solid var(--accent-lime) !important;
  box-shadow: 0 0 24px var(--accent-lime-glow) !important;
  transform: translateY(-5px);
}

.kpi-widget-card.widget-hidden {
  display: none !important;
}

.kpi-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-widget-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.widget-drag-handle {
  cursor: grab;
  padding: 0.2rem 0.35rem;
  border-radius: var(--radius-xs);
  color: var(--text-subtle);
  font-size: 0.85rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.widget-drag-handle:hover {
  color: var(--accent-lime);
  background: rgba(255, 255, 255, 0.08);
}

.widget-drag-handle:active {
  cursor: grabbing;
}

.widget-move-btn {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  font-size: 0.72rem;
  padding: 0.2rem 0.3rem;
  border-radius: var(--radius-xs);
  line-height: 1;
  transition: all 0.2s;
}

.widget-move-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-lime);
}

.btn-customize-kpi {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-customize-kpi:hover {
  border-color: var(--accent-lime);
  color: var(--accent-lime);
  box-shadow: 0 0 14px var(--accent-lime-glow);
  transform: translateY(-1px);
}

/* Modal de Configuración y Personalización de Widgets */
.kpi-customizer-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1.25rem 0;
  max-height: 55vh;
  overflow-y: auto;
}

.kpi-customizer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: background 0.2s, border-color 0.2s;
}

.kpi-customizer-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-subtle);
}

.kpi-customizer-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kpi-customizer-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.kpi-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

.kpi-trend-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.kpi-trend-up { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid #10b981; }
.kpi-trend-live { background: rgba(159, 232, 112, 0.15); color: var(--accent-lime); border: 1px solid var(--accent-lime); }

.kpi-value-text {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

[data-theme="light"] .modern-kpi-card, [data-theme="light"] .kpi-widget-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .kpi-icon-box {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .kpi-progress-track {
  background: #e2e8f0;
}

.kpi-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.kpi-progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

/* ==========================================================================
   SEMANA DE UN VISTAZO (WEEK AT A GLANCE)
   ========================================================================== */
.week-glance-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.25rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .week-glance-card {
    padding: 2.25rem 2rem;
  }
}

.week-glance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.week-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.week-title-square {
  width: 16px;
  height: 16px;
  background-color: var(--accent-lime);
  border-radius: 3px;
  box-shadow: 0 0 12px var(--accent-lime-glow);
}

.week-title-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

@media (min-width: 768px) {
  .week-title-text {
    font-size: 1.85rem;
  }
}

.day-glance-row {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: flex-start;
  transition: background 0.15s ease;
}

@media (min-width: 600px) {
  .day-glance-row {
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
  }
}

.day-glance-row:last-child {
  border-bottom: none;
  padding-bottom: 0.5rem;
}

.day-date-col {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.day-badge-and-num {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.day-badge-pill {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.day-giant-number {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
  letter-spacing: -0.04em;
}

@media (min-width: 600px) {
  .day-giant-number {
    font-size: 2.85rem;
  }
}

.day-month-year {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.day-events-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border-color);
  min-height: 55px;
  justify-content: center;
}

.event-glance-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.event-glance-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(4px);
}

[data-theme="light"] .event-glance-item:hover {
  background: #f1f5f9;
}

.event-glance-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.event-glance-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.event-glance-detail span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.event-glance-detail .venue-dot {
  color: var(--accent-lime);
}

/* ==========================================================================
   MÓDULO DE NOTAS DE PAPEL APILADAS (NON-UNIFORM STACKED PAPER NOTES)
   ========================================================================== */
.paper-notes-board {
  margin-top: 1rem;
}

.paper-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 2.25rem 1.75rem;
  padding: 1.5rem 0.5rem;
}

.paper-note {
  position: relative;
  padding: 1.6rem 1.25rem 1.15rem 1.25rem;
  border-radius: 3px;
  box-shadow: 3px 8px 22px rgba(0, 0, 0, 0.55), 0 2px 5px rgba(0, 0, 0, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  font-family: var(--font-display);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
  background-image: repeating-linear-gradient(transparent, transparent 27px, rgba(0, 0, 0, 0.04) 28px);
}

/* Efecto de Esquina Doblada en Papel */
.paper-note::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.12) 50%);
  pointer-events: none;
}

/* Hover con Elevación y Alineación */
.paper-note:hover {
  transform: scale(1.05) rotate(0deg) translateY(-8px) !important;
  z-index: 30;
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.75), 0 0 20px rgba(159, 232, 112, 0.3);
}

/* Cinta Adhesiva (Washi Tape) */
.paper-washi-tape {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 72px;
  height: 18px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  border-left: 2px dashed rgba(0, 0, 0, 0.15);
  border-right: 2px dashed rgba(0, 0, 0, 0.15);
  z-index: 5;
}

/* Chincheta para Notas Fijadas */
.paper-pin-icon {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  z-index: 5;
}

/* Paletas de Colores de Papel (Tinta Oscura de Alto Contraste) */
.paper-color-yellow {
  background-color: #fef08a;
  color: #1c1917;
  border: 1px solid #fde047;
}

.paper-color-mint {
  background-color: #bbf7d0;
  color: #052e16;
  border: 1px solid #86efac;
}

.paper-color-coral {
  background-color: #fed7aa;
  color: #431407;
  border: 1px solid #fdba74;
}

.paper-color-lavender {
  background-color: #e9d5ff;
  color: #3b0764;
  border: 1px solid #d8b4fe;
}

.paper-color-blue {
  background-color: #bae6fd;
  color: #082f49;
  border: 1px solid #7dd3fc;
}

.paper-color-rose {
  background-color: #fbcfe8;
  color: #500724;
  border: 1px solid #f472b6;
}

.paper-color-kraft {
  background-color: #f5ebe0;
  color: #27272a;
  border: 1px solid #d5bdaf;
}

.paper-note-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.paper-note-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  color: inherit;
}

.paper-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  opacity: 0.7;
  padding: 2px 4px;
  border-radius: 4px;
  transition: opacity 0.15s;
}

.paper-action-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.08);
}

.paper-note-content {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.55;
  flex: 1;
  margin-bottom: 0.75rem;
  color: inherit;
  word-break: break-word;
}

.paper-note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.8;
  border-top: 1px dashed rgba(0, 0, 0, 0.18);
  padding-top: 0.45rem;
  color: inherit;
}

/* Selector de Color de Papel */
.paper-color-picker {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.paper-color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.paper-color-option.active {
  border-color: #ffffff;
  transform: scale(1.18);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Barra de Filtros de Notas de Papel */
.notes-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.notes-filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.notes-filter-chip {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.notes-filter-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.notes-filter-chip.active {
  background: rgba(159, 232, 112, 0.15);
  border-color: var(--accent-lime);
  color: var(--accent-lime);
  box-shadow: 0 0 10px var(--accent-lime-glow);
}

[data-theme="light"] .notes-filter-chip.active {
  background: #ecfdf5;
  border-color: #059669;
  color: #047857;
}

.color-dot-filter {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s;
  display: inline-block;
}

.color-dot-filter:hover {
  transform: scale(1.25);
}

.color-dot-filter.active {
  border-color: #ffffff;
  transform: scale(1.25);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .color-dot-filter.active {
  border-color: #0f172a;
}

/* ==========================================================================
   Panel Lateral de Resumen (Desktop Widget)
   ========================================================================== */
.side-widget-panel {
  display: none;
}

@media (min-width: 1100px) {
  .side-widget-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
}

.widget-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.widget-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Modal de Compartir Agenda & Código QR
   ========================================================================== */
.qr-display-container {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem auto;
  max-width: 250px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.share-link-input-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
}

/* ==========================================================================
   Bandeja de Notificaciones (Drawer)
   ========================================================================== */
.notif-tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  margin-bottom: 1rem;
}

.notif-tab-btn {
  background: transparent;
  border: none;
  padding: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s;
}

.notif-tab-btn.active {
  background: var(--bg-card);
  color: var(--accent-lime);
}

/* ==========================================================================
   Botones & Formularios Modernos
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent-lime);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--accent-lime-glow);
}

.btn-primary:hover {
  background: var(--accent-lime-hover);
  color: #ffffff;
  box-shadow: 0 6px 20px var(--accent-lime-glow);
}

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #020617;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  border-color: var(--accent-lime);
}

[data-theme="light"] .btn-icon {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .btn-icon:hover {
  background: #f8fafc;
  border-color: #059669;
}

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.68rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

[data-theme="light"] .form-control {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .form-control:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-lime);
  box-shadow: 0 0 0 2px var(--accent-lime-glow);
}

/* ==========================================================================
   Barra de Navegación Móvil (Bottom Navigation Bar)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(19, 22, 31, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
  z-index: 90;
}

[data-theme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.05);
}

@media (min-width: 992px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

[data-theme="light"] .bottom-nav-btn {
  color: #64748b;
}

.bottom-nav-btn .nav-icon {
  font-size: 1.25rem;
}

.bottom-nav-btn.active {
  color: var(--accent-lime);
}

[data-theme="light"] .bottom-nav-btn.active {
  color: #047857;
}

.bottom-nav-btn.active .nav-icon {
  transform: translateY(-2px);
}

.fab-quick-btn {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 12px);
  right: 1.25rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-lime);
  color: #ffffff;
  border: none;
  box-shadow: 0 8px 24px var(--accent-lime-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 85;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fab-quick-btn:hover {
  transform: scale(1.08) translateY(-2px);
}

.fab-quick-btn:active {
  transform: scale(0.92);
}

@keyframes fabPopAnim {
  0% { transform: scale(0.8); opacity: 0.8; }
  50% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.fab-pop-anim {
  animation: fabPopAnim 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Action Sheet para menú FAB en Finanzas */
.modal-action-sheet {
  border: 1px solid rgba(159, 232, 112, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(159, 232, 112, 0.15);
}

.fab-finances-action-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.fab-action-choice-btn {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.fab-action-choice-btn:hover,
.fab-action-choice-btn:active {
  background: rgba(159, 232, 112, 0.1);
  border-color: var(--accent-lime);
  transform: translateX(4px);
}

.action-choice-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.action-choice-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.action-choice-info strong {
  font-size: 0.92rem;
  font-weight: 700;
}

.action-choice-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.action-choice-arrow {
  color: var(--text-subtle);
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 0.2s;
}

.fab-action-choice-btn:hover .action-choice-arrow {
  color: var(--accent-lime);
  transform: translateX(3px);
}

@media (min-width: 992px) {
  .fab-quick-btn {
    bottom: 2rem;
    right: 2rem;
  }
}

/* ==========================================================================
   Modales & Overlays
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

[data-theme="light"] .modal-overlay {
  background: rgba(15, 23, 42, 0.65);
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  animation: modalIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .modal-box {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 20px 45px -5px rgba(15, 23, 42, 0.16);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Toast */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-lime);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 380px;
  font-size: 0.85rem;
  color: var(--text-main);
  animation: slideToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .toast {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

@keyframes slideToast {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   MÓDULO DE FINANZAS INTEGRAL (PERSONAL & NEGOCIO)
   ========================================================================== */
.finance-scope-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 0.25rem;
}

.finance-scope-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.finance-scope-btn:hover {
  border-color: var(--accent-lime);
  color: var(--text-main);
}

.finance-scope-btn.active {
  background: rgba(159, 232, 112, 0.18);
  border-color: var(--accent-lime);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(159, 232, 112, 0.22);
}

[data-theme="light"] .finance-scope-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .finance-scope-btn:hover {
  border-color: #059669;
  color: #0f172a;
}

[data-theme="light"] .finance-scope-btn.active {
  background: #ecfdf5;
  border-color: #059669;
  color: #047857;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.18);
}

.finance-subtabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  white-space: nowrap;
}

.finance-subtab-btn {
  background: transparent;
  border: none;
  padding: 0.55rem 1rem;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.finance-subtab-btn:hover {
  background: var(--bg-card);
  color: var(--text-main);
}

.finance-subtab-btn.active {
  background: var(--bg-card);
  color: var(--accent-lime);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .finance-subtab-btn {
  color: #475569;
}

[data-theme="light"] .finance-subtab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme="light"] .finance-subtab-btn.active {
  background: #ffffff;
  color: #047857;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.finance-account-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.finance-account-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .finance-account-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
}

.finance-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

@media (min-width: 680px) {
  .finance-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .finance-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.finance-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.finance-item-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.finance-item-card.card-paid {
  opacity: 0.75;
  border-left: 4px solid var(--accent-lime);
}

[data-theme="light"] .finance-item-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .finance-item-card:hover {
  border-color: #cbd5e1;
}

.finance-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s ease;
}

.finance-list-item:last-child {
  border-bottom: none;
}

.finance-list-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .finance-list-item:hover {
  background: #f8fafc;
}

/* Badges y Pills Financieros */
.badge-scope {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

[data-theme="light"] .badge-scope {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.badge-type {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  display: inline-block;
}

[data-theme="light"] .badge-type {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}

.badge-cal-link {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .badge-cal-link {
  background: #ecfdf5;
  color: #047857;
  border-color: #10b981;
}

.pill-deadline {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

.pill-normal {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

[data-theme="light"] .pill-normal {
  background: #f1f5f9;
  color: #475569;
}

.pill-urgent {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.pill-overdue {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   Estilos Multimoneda (USD / BOB)
   ========================================================================== */
.finance-currency-tabs {
  display: inline-flex;
  background: var(--bg-card);
  padding: 0.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 0.2rem;
}

[data-theme="light"] .finance-currency-tabs {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.finance-currency-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.finance-currency-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.finance-currency-btn.active {
  background: var(--accent-lime);
  color: #000000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .finance-currency-btn {
  color: #475569;
}

[data-theme="light"] .finance-currency-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

[data-theme="light"] .finance-currency-btn.active {
  background: #059669;
  color: #ffffff;
}

.badge-currency {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.badge-currency-bob {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

[data-theme="light"] .badge-currency-bob {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.badge-currency-usd {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .badge-currency-usd {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.exchange-rate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.exchange-rate-btn:hover {
  border-color: var(--accent-lime);
  color: var(--accent-lime);
}

[data-theme="light"] .exchange-rate-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .exchange-rate-btn:hover {
  border-color: #059669;
  color: #059669;
}

.dual-currency-display {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dual-currency-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
}

/* ==========================================================================
   OPTIMIZACIONES EXCLUSIVAS PARA VISTA MÓVIL (MOBILE-FIRST POLISH)
   ========================================================================== */
@media (max-width: 768px) {
  /* Ocultar botón duplicado "+ Crear" en el encabezado móvil para liberar espacio al logo centrado */
  .header-quick-action-btn {
    display: none !important;
  }

  .app-header {
    padding: 0 0.85rem;
  }

  .header-actions {
    gap: 0.35rem;
  }

  #btnOpenProfile {
    padding: 0.3rem 0.5rem;
  }

  #headerUserName {
    display: none;
  }

  /* Barras horizontales con scroll táctil suave y sin barras grises nativas */
  .finance-scope-tabs,
  .finance-currency-tabs,
  .notes-filter-bar,
  .finance-cards-grid,
  .finance-accounts-grid,
  .agenda-chips-scroll,
  .agenda-control-bar {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .finance-scope-tabs::-webkit-scrollbar,
  .finance-currency-tabs::-webkit-scrollbar,
  .notes-filter-bar::-webkit-scrollbar,
  .finance-cards-grid::-webkit-scrollbar,
  .finance-accounts-grid::-webkit-scrollbar,
  .agenda-chips-scroll::-webkit-scrollbar,
  .agenda-control-bar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
}

@media (max-width: 600px) {
  /* Contenedor principal con margen inferior suficiente para no taparse con el Bottom Nav y el FAB */
  .main-content {
    padding: 0.85rem 0.75rem 6.5rem 0.75rem !important;
  }

  /* Widgets de KPIs en 1 sola columna fluida, nítida y legible */
  .kpi-container-grid, .kpi-widgets-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .kpi-widget-card {
    padding: 1rem 1.15rem !important;
  }

  .kpi-value-text {
    font-size: 1.45rem !important;
    word-break: break-word;
  }

  /* Modales en móvil: estilo Bottom Sheet con arrastre ergonómico */
  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: var(--radius-xl) !important;
    border-top-right-radius: var(--radius-xl) !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    padding: 1.35rem 1.15rem 2rem 1.15rem !important;
    animation: slideUpModal 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  /* FAB en móvil con posición óptima y sombra viva */
  .fab-quick-btn {
    bottom: calc(var(--bottom-nav-height) + 14px);
    right: 1.15rem;
    width: 56px;
    height: 56px;
    box-shadow: 0 10px 28px var(--accent-lime-glow);
  }
}

@keyframes slideUpModal {
  from {
    transform: translateY(100%);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================================================
   ESTILOS DEL MÓDULO DE CONFIGURACIÓN & PERFIL INTEGRAL
   ========================================================================== */
.settings-subnav-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-color);
}

.settings-subnav-bar::-webkit-scrollbar {
  display: none;
}

.settings-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.settings-subnav-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-lime);
  transform: translateY(-1px);
}

.settings-subnav-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-lime);
  color: #ffffff;
  box-shadow: 0 0 14px var(--accent-lime-glow);
}

[data-theme="light"] .settings-subnav-btn.active {
  background: rgba(5, 150, 105, 0.12);
  border-color: #059669;
  color: #059669;
}

.settings-grid-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

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

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .settings-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.settings-avatar-wrapper {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
  overflow: hidden;
  margin: 0 auto;
}

.avatar-preset-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.avatar-preset-btn:hover {
  transform: scale(1.18);
  border-color: var(--accent-lime);
}

.currency-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.currency-choice-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.currency-choice-card input {
  margin-top: 0.25rem;
  accent-color: var(--accent-lime);
}

.currency-choice-card:has(input:checked) {
  border-color: var(--accent-lime);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 14px var(--accent-lime-glow);
}

.choice-content strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.choice-content p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.theme-choice-card {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.15rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.theme-choice-card:has(input:checked) {
  border-color: var(--accent-lime);
  background: rgba(16, 185, 129, 0.1);
}

.settings-calendars-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-calendar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  gap: 1rem;
  flex-wrap: wrap;
  transition: border-color 0.2s;
}

.settings-calendar-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

.report-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.report-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.report-stat-card .stat-icon {
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.report-stat-card .stat-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.report-stat-card .stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PWA INSTALL & ACCESO DIRECTO (ANDROID & IOS)
   ========================================================================== */
.pwa-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  cursor: pointer;
}

.pwa-header-btn:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--accent-lime);
  color: var(--accent-lime);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .pwa-header-btn .pwa-btn-label {
    display: none;
  }
  .pwa-header-btn {
    padding: 0.4rem 0.55rem;
  }
}

.modal-pwa-box {
  background: #090909 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9) !important;
}

.pwa-intro-card {
  background: #111111;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  margin-bottom: 1.15rem;
}

.pwa-app-badge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.pwa-badge-img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1.5px solid var(--accent-lime);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.pwa-platform-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: #141414;
  padding: 0.3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.pwa-platform-tab {
  background: transparent;
  border: none;
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.pwa-platform-tab.active {
  background: #202020;
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.pwa-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: #111111;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.pwa-step-item strong {
  color: var(--text-main);
}

.pwa-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-lime);
  color: #000000;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-ios-guide-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pwa-ios-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: #111111;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.pwa-ios-step-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-lime);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-ios-step-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.pwa-ios-step-text strong {
  color: var(--text-main);
  font-size: 0.88rem;
}



