/* Fuentes locales (DESHABILITADAS - usar Google Fonts) */
/* Comentadas para evitar errores CORS cuando se abre desde file:// */
/*
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
*/

:root {
  /* Modo claro (default) - Mejorado para accesibilidad WCAG AA */
  --bg: #f5f7fa;
  --card: #ffffff;
  --card-hover: #f8f9fa;
  --text: #1a1d22;
  --muted: #4b5563; /* Mejorado: de #6b7280 a #4b5563 para mejor contraste (4.5:1) */
  --accent: #d97706; /* Mejorado: más oscuro para mejor contraste en fondo claro */
  --accent2: #059669; /* Mejorado: más oscuro para mejor contraste */
  --accent3: #d97706; /* Naranja más oscuro para mejor contraste en modo claro - mismo que accent */
  --border: #e5e7eb;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-dark: rgba(0, 0, 0, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --success: #059669;
  --warning: #d97706;
  --error: #dc2626;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Color de enlace mejorado para mejor contraste */
  --link-color: #d97706;
  --link-hover: #059669;
}

/* PWA Install Button Styles */
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 
    inset 2px 2px 4px rgba(255, 255, 255, 0.1),
    inset -2px -2px 4px rgba(0, 0, 0, 0.2),
    0 4px 8px rgba(0, 0, 0, 0.1);
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.pwa-install-btn:hover {
  background: var(--accent2);
  transform: translateY(-1px);
  box-shadow: 
    inset 2px 2px 4px rgba(255, 255, 255, 0.15),
    inset -2px -2px 4px rgba(0, 0, 0, 0.25),
    0 6px 12px rgba(0, 0, 0, 0.15);
}

.pwa-install-btn:active {
  transform: translateY(0);
  box-shadow: 
    inset 2px 2px 4px rgba(0, 0, 0, 0.2),
    inset -2px -2px 4px rgba(255, 255, 255, 0.1);
}

.pwa-install-btn .pwa-install-icon {
  font-size: 1.2rem;
  display: inline-block;
}

.pwa-install-btn .pwa-install-text {
  font-weight: 600;
}

[data-theme="dark"] .pwa-install-btn {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 
    inset 3px 3px 6px rgba(0, 0, 0, 0.3),
    inset -3px -3px 6px rgba(255, 255, 255, 0.05),
    0 4px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .pwa-install-btn:hover {
  background: var(--accent2);
  box-shadow: 
    inset 3px 3px 6px rgba(0, 0, 0, 0.4),
    inset -3px -3px 6px rgba(255, 255, 255, 0.08),
    0 6px 12px rgba(0, 0, 0, 0.3);
}

/* PWA Messages */
.pwa-message {
  animation: slideIn 0.3s ease-out;
}

.pwa-message-success {
  border-left: 4px solid var(--success);
}

.pwa-message-info {
  border-left: 4px solid var(--accent);
}

.pwa-instructions,
.pwa-success-message {
  padding: 8px 0;
}

.pwa-instructions h3,
.pwa-success-message h3 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  color: var(--text);
}

.pwa-instructions ol,
.pwa-instructions ul {
  margin: 8px 0;
  padding-left: 24px;
  color: var(--text);
}

.pwa-instructions li {
  margin: 8px 0;
  line-height: 1.6;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* Accesibilidad: Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--accent2);
  color: var(--bg);
  border-radius: 6px;
  box-shadow: 2px 2px 8px var(--shadow-dark);
  z-index: 9999;
}

[data-theme="dark"] {
  /* Modo oscuro - Mejorado para accesibilidad WCAG AA */
  --bg: #0e0f11;
  --card: #15171b;
  --card-hover: #1a1d22;
  --text: #e6e6e6;
  --muted: #b8bcc4; /* Mejorado: de #9ca3af a #b8bcc4 para mejor contraste (4.5:1) */
  --accent: #f7b267;
  --accent2: #9cd9ac;
  --accent3: #f7b267; /* Naranja original - mismo que accent */
  --border: #1f2024;
  --shadow-light: rgba(255, 255, 255, 0.08);
  --shadow-dark: rgba(0, 0, 0, 0.6);
  --success: #4ade80;
  --warning: #fbbf24;
  --error: #f87171;
  /* Color de enlace mejorado para mejor contraste */
  --link-color: #f7b267;
  --link-hover: #9cd9ac;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { 
  color: var(--link-color, var(--accent)); 
  text-decoration: underline; /* Siempre visible para accesibilidad */
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  transition: var(--transition);
  /* Indicador visual adicional para enlaces */
  border-bottom: 1px solid transparent;
}

a:hover,
a:focus { 
  text-decoration: underline;
  text-decoration-thickness: 2px;
  color: var(--link-hover, var(--accent2));
  border-bottom-color: var(--link-hover, var(--accent2));
  outline: 2px solid var(--link-hover, var(--accent2));
  outline-offset: 2px;
}

a:focus-visible {
  outline: 2px solid var(--link-hover, var(--accent2));
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4, h5, h6 { 
  color: var(--accent2); 
  margin-top: 0;
  font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* Neumorphic core */
.neumorphic {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  padding: 20px 24px;
  transition: var(--transition);
}

.neumorphic:hover {
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  transform: translateY(-2px);
}

.neumorphic-inset {
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: inset 2px 2px 6px var(--shadow-dark),
              inset -2px -2px 6px var(--shadow-light);
  padding: 16px 20px;
}

/* Landing Page Styles */
.landing {
  background: radial-gradient(ellipse at top, #191c21, #0e0f11);
}

.landing {
  background: radial-gradient(ellipse at top, #e5e7eb, #f5f7fa);
}

[data-theme="dark"] .landing {
  background: radial-gradient(ellipse at top, #1a1d22, #0e0f11);
}

.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: var(--card);
  box-shadow: 0 4px 10px var(--shadow-dark);
  position: sticky; 
  top: 0; 
  z-index: 50;
  backdrop-filter: blur(10px);
}

.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.landing-header nav {
  display: flex; 
  gap: 24px; 
  align-items: center;
}

.nav-link {
  font-weight: 500; 
  color: var(--text);
  position: relative;
  padding: 8px 0;
  text-decoration: none; /* Sin subrayado por defecto en nav */
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.logo-text {
  font-size: 1.8rem; 
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  transition: color 0.3s ease;
}

/* En modo claro, "Checklist" debe ser negro - El tema se controla en html[data-theme] */
html[data-theme="light"] .logo-text,
html:not([data-theme="dark"]) .logo-text,
[data-theme="light"] .logo-text,
body:not([data-theme="dark"]):not(.dark) .logo-text,
body[data-theme="light"] .logo-text,
body.light .logo-text,
.landing:not(.dark):not([data-theme="dark"]) .logo-text {
  color: #000000 !important; /* Negro para "Checklist" en modo claro */
}

.logo-text .accent {
  color: var(--accent);
  font-weight: 800;
}

/* Asegurar que el logo se vea bien en modo oscuro */
html[data-theme="dark"] .logo-text,
[data-theme="dark"] .logo-text,
.dark .logo-text,
body.dark .logo-text,
body[data-theme="dark"] .logo-text {
  color: #e6e6e6;
}

[data-theme="dark"] .logo-text .accent,
.dark .logo-text .accent,
body.dark .logo-text .accent {
  color: var(--accent);
}

/* Estilos para SVG del logo en modo oscuro */
/* Cuando el logo se carga como imagen, aplicar filtro para hacer visibles las partes oscuras */
/* Logo en modo claro - asegurar que sea negro */
img[src*="logo-org.svg"]:not([data-theme="dark"]):not(.dark):not(body.dark) {
  filter: none;
}

[data-theme="dark"] img[src*="logo-org.svg"],
.dark img[src*="logo-org.svg"],
body.dark img[src*="logo-org.svg"] {
  filter: brightness(0) saturate(0) invert(1) hue-rotate(180deg);
  opacity: 0.95;
}

/* Para SVG inline, los estilos internos del SVG ya manejan el cambio de color */
[data-theme="dark"] .logo svg .logo-bg,
.dark .logo svg .logo-bg,
body.dark .logo svg .logo-bg {
  fill: #e6e6e6 !important;
}

[data-theme="dark"] .logo svg .logo-card,
.dark .logo svg .logo-card,
body.dark .logo svg .logo-card {
  fill: #f5f7fa !important;
}

[data-theme="dark"] .logo svg .logo-check,
.dark .logo svg .logo-check,
body.dark .logo svg .logo-check {
  stroke: #e6e6e6 !important;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: linear-gradient(145deg, var(--card), var(--card-hover));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  padding: 12px;
  z-index: 1001;
  position: relative;
  box-shadow: 
    4px 4px 8px rgba(0, 0, 0, 0.15),
    -4px -4px 8px rgba(255, 255, 255, 0.7),
    inset 2px 2px 4px rgba(255, 255, 255, 0.3),
    inset -2px -2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 52px;
  min-height: 52px;
  justify-content: center;
  align-items: center;
}

/* Mostrar menú hamburguesa en móviles y tablets - REGLA GLOBAL CON ALTA PRIORIDAD */
@media screen and (max-width: 1024px) {
  .mobile-menu-toggle,
  #mobile-menu-toggle,
  button.mobile-menu-toggle,
  button#mobile-menu-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .header .mobile-menu-toggle,
  .header #mobile-menu-toggle,
  .header button.mobile-menu-toggle,
  .header button#mobile-menu-toggle,
  .header-content .mobile-menu-toggle,
  .header-content #mobile-menu-toggle,
  .header-content button.mobile-menu-toggle,
  .header-content button#mobile-menu-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    z-index: 1001;
    position: relative;
  }
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  background: linear-gradient(145deg, var(--card-hover), var(--card));
  box-shadow: 
    6px 6px 12px rgba(0, 0, 0, 0.2),
    -6px -6px 12px rgba(255, 255, 255, 0.8),
    inset 1px 1px 2px rgba(255, 255, 255, 0.4),
    inset -1px -1px 2px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px) scale(1.02);
}

.mobile-menu-toggle:active {
  box-shadow: 
    2px 2px 4px rgba(0, 0, 0, 0.2),
    -2px -2px 4px rgba(255, 255, 255, 0.6),
    inset 3px 3px 6px rgba(0, 0, 0, 0.15),
    inset -3px -3px 6px rgba(255, 255, 255, 0.2);
  transform: translateY(0) scale(0.98);
}

.mobile-menu-toggle.active {
  background: linear-gradient(145deg, var(--accent), #e67e22);
  box-shadow: 
    4px 4px 8px rgba(247, 178, 103, 0.4),
    -4px -4px 8px rgba(255, 255, 255, 0.3),
    inset 2px 2px 4px rgba(255, 255, 255, 0.2),
    inset -2px -2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle.active:hover,
.mobile-menu-toggle.active:focus {
  background: linear-gradient(145deg, #e67e22, var(--accent));
  box-shadow: 
    6px 6px 12px rgba(247, 178, 103, 0.5),
    -6px -6px 12px rgba(255, 255, 255, 0.4),
    inset 1px 1px 2px rgba(255, 255, 255, 0.3),
    inset -1px -1px 2px rgba(0, 0, 0, 0.15);
}

.mobile-menu-toggle span {
  width: 26px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle.active span {
  background: #111;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
  width: 26px;
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
  width: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
  width: 26px;
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  min-height: 85vh;
  text-align: center;
  padding: 40px 20px;
}

.hero-title-container {
  position: relative;
  width: 100%;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
  background: transparent;
  text-align: center;
}

.animated-hero-canvas {
  position: relative;
  width: 100%;
  height: 280px;
  min-height: 280px;
  max-height: 320px;
  pointer-events: none;
  display: block;
  opacity: 1;
  background: transparent;
  z-index: 1;
  margin: 0 auto;
}

.hero-title-animated {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(247, 178, 103, 0.1), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  max-width: 900px;
  padding: 60px 40px;
  position: relative;
  z-index: 2;
  will-change: opacity;
  transform: none;
}

.hero-badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--card);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 20px;
  box-shadow: inset 2px 2px 4px var(--shadow-dark),
              inset -2px -2px 4px var(--shadow-light);
  position: relative;
  z-index: 2;
}

.hero h1:not(.hero-title-fallback):not(.hero-title-animated) {
  display: none !important; /* Ocultar cualquier otro h1 que no sea el del efecto */
}

.hero-title-fallback {
  display: none !important; /* Ocultar el título fallback */
}

.hero-description {
  color: var(--muted);
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* Buttons */
button, .btn-accent, .btn-secondary {
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-size: 1rem;
  /* Mejoras de accesibilidad */
  outline: 2px solid transparent;
  outline-offset: 2px;
}

button:focus-visible,
.btn-accent:focus-visible,
.btn-secondary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.btn-accent {
  background: var(--accent);
  color: #111;
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

.btn-accent:hover,
.btn-accent:focus {
  transform: translateY(-2px);
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  box-shadow: inset 2px 2px 4px var(--shadow-dark),
              inset -2px -2px 4px var(--shadow-light);
}

.btn-secondary:hover,
.btn-secondary:focus {
  box-shadow: inset 3px 3px 6px var(--shadow-dark),
              inset -3px -3px 6px var(--shadow-light);
}

button.large { 
  font-size: 1.1rem; 
  padding: 14px 32px;
}

/* Sections */
.section {
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 20px 40px 20px;
  width: 100%;
  box-sizing: border-box;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-content {
  text-align: center;
  padding-bottom: 40px;
}

.section p { 
  color: var(--muted); 
  line-height: 1.8;
  font-size: 1.1rem;
}

.lead {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 20px;
}

/* Roles Grid */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.role-card {
  text-align: center;
  padding: 30px 20px;
  padding-bottom: 40px;
}

.role-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.role-card h3 {
  color: var(--accent2);
  margin-bottom: 12px;
}

.role-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.feature-card {
  text-align: center;
  padding: 30px 20px;
  padding-bottom: 40px;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.feature-card h3,
.feature-card .feature-title {
  color: var(--accent2);
  margin-bottom: 12px;
  font-size: 1.3rem;
  font-weight: 600;
}

.role-card h3,
.role-card .role-title {
  color: var(--accent2);
  margin-bottom: 12px;
  font-size: 1.2rem;
  font-weight: 600;
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Benefits List */
.benefits-list {
  list-style: none;
  padding: 0;
  padding-bottom: 24px;
  max-width: 800px;
  margin: 40px auto;
}

.benefit-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 24px 0;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: inset 2px 2px 6px var(--shadow-dark),
              inset -2px -2px 6px var(--shadow-light);
  transition: var(--transition);
}

.benefit-item:last-child {
  margin-bottom: 40px;
}

.benefit-item:hover {
  box-shadow: inset 3px 3px 8px var(--shadow-dark),
              inset -3px -3px 8px var(--shadow-light);
}

.benefit-icon {
  font-size: 1.5rem;
  color: var(--accent2);
  font-weight: bold;
  flex-shrink: 0;
}

.benefit-item strong {
  display: block;
  color: var(--accent2);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.benefit-item p {
  margin: 0;
  color: var(--muted);
}

/* Contact */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-email {
  font-size: 1.3rem;
  margin: 20px 0;
}

.link-accent {
  color: var(--link-color, var(--accent));
  font-weight: 600;
  font-size: 1.2rem;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.link-accent:hover,
.link-accent:focus {
  color: var(--link-hover, var(--accent2));
  text-decoration-thickness: 3px;
  outline: 2px solid var(--link-hover, var(--accent2));
  outline-offset: 2px;
  border-radius: 2px;
}

.brand {
  margin-top: 30px;
  font-size: 1.1rem;
  color: var(--accent2);
}

/* Panel Styles */
.header {
  margin-bottom: 30px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* En móvil, el header se oculta por defecto y aparece como overlay */
@media (max-width: 768px) {
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    margin-bottom: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }
  
  .header.mobile-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  /* Botón flotante para mostrar header */
  .mobile-header-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #111;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
  }
  
  .mobile-header-toggle:hover,
  .mobile-header-toggle:focus {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  }
  
  .mobile-header-toggle.active {
    background: var(--error);
    color: white;
  }
  
  /* Botón de cerrar dentro del header cuando está visible */
  .header .mobile-header-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--error);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 1002;
  }
  
  .header.mobile-visible .mobile-header-close {
    display: flex;
  }
  
  /* Ocultar botón de cerrar del header en páginas de Operaciones */
  body:has(.inventory-database-container) .header.mobile-visible .mobile-header-close,
  body:has(.ot-container) .header.mobile-visible .mobile-header-close,
  body:has(.vuelos-container) .header.mobile-visible .mobile-header-close,
  body:has(.bitacora-container) .header.mobile-visible .mobile-header-close,
  body:has(.ventas-compartidas-container) .header.mobile-visible .mobile-header-close {
    display: none !important;
  }
  
  .header .mobile-header-close:hover {
    transform: scale(1.1);
    background: #dc2626;
  }
  
  /* El contenido no necesita padding-top cuando el header está oculto */
  .inventory-database-container,
  .ot-container,
  .vuelos-container,
  .bitacora-container,
  .ventas-compartidas-container {
    padding-top: 20px;
    transition: padding-top 0.3s ease;
  }
  
  /* Cuando el header está visible, agregar padding-top para no tapar contenido */
  body.header-visible .inventory-database-container,
  body.header-visible .ot-container,
  body.header-visible .vuelos-container,
  body.header-visible .bitacora-container,
  body.header-visible .ventas-compartidas-container {
    padding-top: 100px;
  }
  
  /* Cuando el ribbon está activo también, agregar más espacio */
  body.header-visible.ribbon-active-mobile .inventory-database-container,
  body.header-visible.ribbon-active-mobile .ot-container,
  body.header-visible.ribbon-active-mobile .vuelos-container,
  body.header-visible.ribbon-active-mobile .bitacora-container,
  body.header-visible.ribbon-active-mobile .ventas-compartidas-container {
    padding-top: 120px;
  }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.logo-panel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-role-badge {
  padding: 4px 12px;
  background: var(--accent);
  color: #111;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.panel-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.panel-nav a, .panel-nav button {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-family: inherit;
  font-size: 0.95rem;
}

.panel-nav a:hover, .panel-nav button:hover {
  background: var(--card-hover);
  color: var(--accent);
}

.panel-nav a.active {
  background: var(--accent);
  color: #111;
}

/* Barra de menú estilo Windows clásico */
.ribbon-container {
  background: var(--card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 99;
  margin-bottom: 20px;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

/* En desktop, el ribbon siempre debe estar visible cuando tiene contenido */
@media (min-width: 769px) {
  .ribbon-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* En móviles, el ribbon-container necesita position relative para dropdowns */
@media (max-width: 768px) {
  .ribbon-container {
    position: relative;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease,
                margin-bottom 0.3s ease;
    opacity: 0;
    margin-bottom: 0;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .ribbon-container.active {
    max-height: 3000px;
    opacity: 1;
    overflow: visible;
    margin-bottom: 20px;
    padding: 0;
    animation: ribbonSlideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* Dropdown del menú móvil */
  .ribbon-menu-dropdown {
    position: relative;
  }
  
  /* Asegurar que el dropdown tenga espacio adecuado */
  .ribbon-menu-item.active .ribbon-menu-dropdown {
    padding-top: 12px;
    padding-bottom: 8px;
  }
  
  @keyframes ribbonSlideDown {
    from {
      max-height: 0;
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      max-height: 3000px;
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.ribbon-header {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  overflow: visible;
  min-width: 0;
  gap: 8px;
  padding: 0;
  position: relative;
  background: var(--bg);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Barra de menú clásica (File, Edit, View, etc.) */
.ribbon-menu-bar {
  display: flex;
  gap: 0;
  padding: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  background: var(--card);
  align-items: stretch;
}

.ribbon-menu-item {
  position: relative;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ribbon-menu-item:hover {
  background: var(--card-hover);
  color: var(--accent);
}

.ribbon-menu-item.selected {
  background: var(--accent);
  color: #111;
}

.ribbon-menu-item.active {
  background: var(--accent);
  color: #111;
}

/* Menú desplegable clásico */
.ribbon-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  z-index: 1000;
  display: none;
  padding: 4px 0;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* En móviles, el dropdown debe estar en el flujo del documento para empujar contenido */
@media (max-width: 768px) {
  .ribbon-menu-dropdown {
    position: static;
    display: none;
    width: 100%;
    max-height: none;
    overflow-y: visible;
    margin-top: 0;
    border-radius: var(--radius-sm);
    box-shadow: inset 2px 2px 6px var(--shadow-dark),
                inset -2px -2px 6px var(--shadow-light);
  }
  
  .ribbon-menu-item.active .ribbon-menu-dropdown {
    display: block;
    position: static;
    animation: slideDown 0.2s ease;
  }
  
  /* El ribbon-container se expande cuando hay un dropdown activo */
  .ribbon-container:has(.ribbon-menu-item.active) {
    margin-bottom: 20px;
  }
}

.ribbon-menu-item.active .ribbon-menu-dropdown {
  display: block;
  animation: fadeIn 0.15s ease;
}

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

.ribbon-menu-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.ribbon-menu-dropdown-item:hover {
  background: var(--card-hover);
  color: var(--accent);
}

.ribbon-menu-dropdown-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ribbon-menu-dropdown-separator {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Estilos de menú desplegable mejorados */
.ribbon-menu-dropdown-item span:first-child {
  font-size: 1.1rem;
  min-width: 24px;
  text-align: center;
}

/* Botón con submenú desplegable */
.ribbon-button-dropdown {
  position: relative;
}

.ribbon-button-dropdown .ribbon-button {
  position: relative;
  padding-right: 28px;
}

.ribbon-button-dropdown .ribbon-button::after {
  content: '▼';
  position: absolute;
  right: 8px;
  font-size: 0.7rem;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.ribbon-button-dropdown.active .ribbon-button::after {
  transform: rotate(180deg);
}

.ribbon-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 1px 1px 2px rgba(255, 255, 255, 0.05);
  min-width: 220px;
  z-index: 1000;
  display: none;
  padding: 6px;
  backdrop-filter: blur(10px);
}

.ribbon-button-dropdown.active .ribbon-dropdown-menu {
  display: block;
  animation: slideDown 0.2s ease;
}

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

.ribbon-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}

.ribbon-dropdown-item:hover {
  background: var(--card-hover);
  color: var(--accent);
  transform: translateX(4px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ribbon-dropdown-item-icon {
  font-size: 1.1rem;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.ribbon-dropdown-item-text {
  flex: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Mejoras móvil para dropdown items */
@media (max-width: 768px) {
  .ribbon-dropdown-item {
    padding: 14px 16px;
    font-size: 0.9rem;
    min-height: 48px;
    gap: 12px;
  }
  
  .ribbon-dropdown-item-icon {
    font-size: 1.2rem;
    min-width: 28px;
  }
  
  .ribbon-dropdown-item-text {
    font-size: 0.9rem;
    line-height: 1.3;
  }
  
  .ribbon-menu-dropdown {
    padding: 8px;
  }
}

/* Dropdown para pestaña "Más" */
.ribbon-tab-dropdown {
  position: relative;
}

.ribbon-tab-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  z-index: 1000;
  display: none;
  padding: 6px;
  backdrop-filter: blur(10px);
}

.ribbon-tab-dropdown.active .ribbon-tab-dropdown-menu {
  display: block;
  animation: slideDown 0.2s ease;
}

.ribbon-tab-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}

.ribbon-tab-dropdown-item:hover {
  background: var(--card-hover);
  color: var(--accent);
  transform: translateX(4px);
}

.ribbon-tab-dropdown-icon {
  font-size: 1.1rem;
  min-width: 20px;
  text-align: center;
}

/* Búsqueda global mejorada */
.ribbon-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 1;
  flex-grow: 0;
  padding: 0 20px;
  background: var(--card);
  height: 100%;
  overflow: visible;
  min-width: 0;
  max-width: 100%;
}

.global-search-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
}

.global-search-input {
  padding: 8px 14px;
  padding-left: 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.9rem;
  width: 280px;
  max-width: 100%;
  min-width: 0;
  flex-shrink: 1;
  transition: all 0.2s ease;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.05);
  height: 32px;
  box-sizing: border-box;
}

.global-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.1), inset 1px 1px 2px rgba(0, 0, 0, 0.05);
  width: 320px;
}

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

@media (max-width: 768px) {
  .global-search-input {
    width: 200px;
  }
  
  .global-search-input:focus {
    width: 250px;
  }
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  max-height: 500px;
  overflow-y: auto;
  z-index: 1000;
  min-width: 400px;
  max-width: 600px;
}

.search-results-list {
  padding: 8px;
}

.search-category {
  margin-bottom: 16px;
}

.search-category:last-child {
  margin-bottom: 0;
}

.search-category-title {
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.search-category-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-result-item {
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.search-result-item:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateX(4px);
}

.search-result-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.search-result-description {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.search-result-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Responsive para búsqueda global */
@media (max-width: 1024px) {
  .global-search-container {
    margin-right: 8px;
  }
  
  .global-search-input {
    width: 240px;
    font-size: 0.9rem;
    padding: 8px 14px;
    padding-left: 38px;
  }
}

@media (max-width: 768px) {
  .global-search-container {
    margin-right: 10px;
    width: auto;
  }
  
  .global-search-input {
    width: 200px;
    font-size: 0.85rem;
    padding: 6px 12px;
    padding-left: 36px;
  }
  
  .global-search-results {
    min-width: 300px;
    max-width: 90vw;
    right: auto;
    left: 0;
  }
}

@media (max-width: 480px) {
  .global-search-container {
    width: 100%;
    margin-right: 0;
    margin-bottom: 8px;
  }
  
  .global-search-input {
    width: 100%;
    font-size: 0.85rem;
    padding: 8px 12px;
    padding-left: 36px;
  }
  
  .global-search-results {
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
    border-radius: 0;
  }
}

/* Responsive para ribbon y menú Windows clásico */
@media (max-width: 1024px) {
  .ribbon-menu-bar {
    flex-wrap: wrap;
    gap: 0;
  }
  
  .ribbon-menu-item {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .ribbon-menu-dropdown {
    max-width: 90vw;
    left: auto;
    right: 0;
  }
  
  .ribbon-header-actions {
    padding: 0 12px;
    gap: 8px;
  }
  
  .global-search-input {
    width: 180px;
    font-size: 0.85rem;
    padding: 6px 10px;
    padding-left: 32px;
  }
}

@media (max-width: 768px) {
  .ribbon-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
    background: var(--card);
  }
  
  .ribbon-menu-bar {
    flex-direction: column;
    gap: 4px;
    width: 100%;
    justify-content: flex-start;
    overflow-x: visible;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .ribbon-menu-bar::-webkit-scrollbar {
    display: none;
  }
  
  .ribbon-menu-item {
    padding: 12px 16px;
    font-size: 0.95rem;
    white-space: normal;
    flex-shrink: 0;
    position: relative;
    z-index: 1001;
    width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: inset 1px 1px 2px var(--shadow-dark),
                inset -1px -1px 2px var(--shadow-light);
  }
  
  .ribbon-menu-item:hover {
    background: var(--card-hover);
    border-color: var(--accent);
  }
  
  /* Cuando un menú está activo, debe ocupar todo el ancho para que el dropdown empuje el contenido */
  .ribbon-menu-item.active {
    width: 100%;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--accent);
    color: #111;
    border-color: var(--accent);
    box-shadow: 2px 2px 4px var(--shadow-dark),
                -2px -2px 4px var(--shadow-light);
  }
  
  /* Asegurar que el ribbon-container tenga position relative para el dropdown */
  .ribbon-container {
    position: relative;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease,
                margin-bottom 0.3s ease;
    opacity: 0;
    margin-bottom: 0;
  }
  
  .ribbon-container.active {
    max-height: 3000px;
    opacity: 1;
    overflow: visible;
    margin-bottom: 20px;
  }
  
  /* En móviles, el dropdown debe estar en el flujo del documento para empujar contenido */
  .ribbon-menu-dropdown {
    position: static;
    display: none;
    width: 100%;
    max-height: none;
    overflow-y: visible;
    margin-top: 8px;
    margin-bottom: 0;
    border-radius: var(--radius-sm);
    box-shadow: inset 2px 2px 6px var(--shadow-dark),
                inset -2px -2px 6px var(--shadow-light);
    border: 1px solid var(--border);
    padding: 8px 0;
    z-index: auto;
    background: var(--card);
  }
  
  /* Mejorar visibilidad del dropdown en móviles */
  .ribbon-menu-item.active {
    flex-direction: column;
    align-items: stretch;
  }
  
  .ribbon-menu-item.active .ribbon-menu-dropdown {
    display: block;
    position: static;
    animation: slideDown 0.3s ease;
    margin-top: 12px;
    padding: 12px 0;
    padding-top: 40px; /* Espacio para el botón de cerrar */
  }
  
  /* El ribbon-menu-bar debe permitir que el dropdown empuje el contenido */
  .ribbon-menu-bar {
    flex-wrap: wrap;
  }
  
  /* Cuando un menú está activo, el dropdown aparece debajo empujando el contenido */
  .ribbon-menu-item.active {
    width: 100%;
    flex-basis: 100%;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Asegurar que el contenido principal no se tape */
  .main-content,
  #app {
    position: relative;
    z-index: 1;
  }
  
  /* El ribbon-container se expande cuando hay un dropdown activo para empujar contenido */
  .ribbon-container:has(.ribbon-menu-item.active) {
    margin-bottom: 20px;
  }
  
  /* Asegurar que el header tenga z-index superior al ribbon en móvil */
  .header {
    z-index: 101;
    position: relative;
  }
  
  /* Asegurar que el botón de volver sea visible y no se tape */
  .back-button {
    position: relative;
    z-index: 102;
  }
  
  /* Ajustar contenedores de operaciones cuando el ribbon está activo en móvil */
  /* Usamos margin-top en lugar de padding-top para evitar problemas de scroll */
  .ribbon-container.active {
    margin-bottom: 20px;
  }
  
  /* Espacio adicional para contenedores de operaciones en móvil cuando hay ribbon */
  .inventory-database-container,
  .ot-container,
  .vuelos-container,
  .bitacora-container,
  .ventas-compartidas-container {
    transition: padding-top 0.3s ease;
    /* Agregar padding-top para compensar el header sticky */
    padding-top: 80px;
  }
  
  /* Cuando el ribbon está activo en móvil, agregar espacio adicional */
  body.ribbon-active-mobile .inventory-database-container,
  body.ribbon-active-mobile .ot-container,
  body.ribbon-active-mobile .vuelos-container,
  body.ribbon-active-mobile .bitacora-container,
  body.ribbon-active-mobile .ventas-compartidas-container {
    padding-top: 100px;
  }
  
  .ribbon-menu-dropdown-item {
    padding: 14px 20px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    margin: 2px 8px;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .ribbon-menu-dropdown-item:hover {
    background: var(--card-hover);
    transform: translateX(4px);
  }
  
  .ribbon-header-actions {
    width: 100%;
    justify-content: space-between;
    padding: 0;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
  }
  
  .global-search-container {
    width: 100%;
    margin-right: 0;
    order: -1;
  }
  
  .global-search-input {
    width: 100%;
    font-size: 0.9rem;
    padding: 10px 14px;
    padding-left: 40px;
    min-height: 44px;
  }
  
  .global-search-results {
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
  }
  
  .digital-clock-container {
    width: 100%;
    justify-content: center;
    margin: 0;
    order: 1;
    overflow: visible;
    min-width: 0;
  }
  
  .digital-clock {
    width: 100%;
    max-width: 250px;
    min-width: 150px;
    overflow: visible;
  }
}

@media (max-width: 480px) {
  .ribbon-container {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    margin-bottom: 0;
  }
  
  .ribbon-container.active {
    max-height: 2000px;
    opacity: 1;
    overflow: visible;
    margin-bottom: 20px;
  }
  
  .ribbon-header {
    padding: 10px 12px;
  }
  
  .ribbon-menu-item {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  
  .ribbon-menu-dropdown-item {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  
  .ribbon-menu-dropdown-item span:first-child {
    font-size: 1rem;
    min-width: 20px;
  }
  
  .global-search-input {
    font-size: 0.85rem;
    padding: 6px 10px;
    padding-left: 32px;
  }
  
  .digital-clock {
    max-width: 140px;
    min-width: 120px;
    padding: 8px 10px;
  }
  
  /* Relojes digitales en móviles pequeños */
  .digital-clock.watchface-flip,
  .digital-clock.watchface-led,
  .digital-clock.watchface-lcd {
    max-width: 140px;
    min-width: 120px;
    padding: 8px 10px;
  }
  
  .digital-clock.watchface-flip .clock-time,
  .digital-clock.watchface-led .clock-time,
  .digital-clock.watchface-lcd .clock-time {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
  }
  
  .digital-clock.watchface-flip .clock-date,
  .digital-clock.watchface-led .clock-date,
  .digital-clock.watchface-lcd .clock-date {
    font-size: 0.6rem;
  }
  
  /* Relojes smartwatch en móviles pequeños */
  .digital-clock.watchface-smartwatch,
  .digital-clock.watchface-smartwatch_minimal,
  .digital-clock.watchface-smartwatch_dark {
    max-width: 180px;
    min-width: 140px;
    width: auto !important;
    height: auto !important;
    padding: 8px 10px;
    font-size: 0.55rem;
  }
  
  .digital-clock.watchface-smartwatch .smartwatch-time,
  .digital-clock.watchface-smartwatch_minimal .smartwatch-time,
  .digital-clock.watchface-smartwatch_dark .smartwatch-time {
    font-size: 1.2rem !important;
  }
  
  .digital-clock.watchface-smartwatch .smartwatch-date,
  .digital-clock.watchface-smartwatch_minimal .smartwatch-date,
  .digital-clock.watchface-smartwatch_dark .smartwatch-date {
    font-size: 0.6rem;
  }
  
  .digital-clock.watchface-smartwatch .smartwatch-metrics-compact,
  .digital-clock.watchface-smartwatch_minimal .smartwatch-metrics-compact,
  .digital-clock.watchface-smartwatch_dark .smartwatch-metrics-compact {
    font-size: 0.5rem;
    gap: 4px;
  }
  
  /* Relojes analógicos en móviles pequeños */
  .digital-clock.watchface-analog_classic,
  .digital-clock.watchface-analog_minimal,
  .digital-clock.watchface-analog_modern {
    width: 100px !important;
    height: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    min-height: 100px !important;
    max-height: 100px !important;
    padding: 8px;
  }
  
  /* Números analógicos más pequeños en móviles */
  .digital-clock.watchface-analog_classic .analog-number,
  .digital-clock.watchface-analog_modern .analog-number,
  .digital-clock.watchface-analog_minimal .analog-number {
    font-size: 0.35rem;
  }
  
  /* Manecillas más pequeñas en móviles */
  .digital-clock.watchface-analog_classic .analog-hour-hand,
  .digital-clock.watchface-analog_minimal .analog-hour-hand,
  .digital-clock.watchface-analog_modern .analog-hour-hand {
    width: 1.5px;
    height: 12px;
  }
  
  .digital-clock.watchface-analog_classic .analog-minute-hand,
  .digital-clock.watchface-analog_minimal .analog-minute-hand,
  .digital-clock.watchface-analog_modern .analog-minute-hand {
    width: 1px;
    height: 18px;
  }
  
  .digital-clock.watchface-analog_classic .analog-second-hand,
  .digital-clock.watchface-analog_modern .analog-second-hand {
    width: 0.8px;
    height: 18px;
  }
  
  .clock-time {
    font-size: 1.2rem;
  }
  
  .clock-date {
    font-size: 0.65rem;
  }
}

.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 40px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: visible;
  position: relative;
  min-width: 0;
}

/* Reloj digital neumórfico - Acoplado al ribbon */
.digital-clock-container {
  position: relative;
  z-index: 100;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: visible;
  opacity: 1;
  flex-shrink: 1;
  flex-grow: 0;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  margin: 0;
  padding: 0;
}

.digital-clock {
  background: var(--card);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 
    4px 4px 8px rgba(0, 0, 0, 0.2),
    -4px -4px 8px rgba(255, 255, 255, 0.03),
    inset 1px 1px 2px rgba(255, 255, 255, 0.08),
    inset -1px -1px 2px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  min-width: 150px;
  max-width: 220px;
  width: fit-content;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  margin: 0;
  overflow: visible;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 1;
}

.digital-clock:hover {
  transform: translateY(-2px);
  box-shadow: 
    10px 10px 20px rgba(0, 0, 0, 0.35),
    -10px -10px 20px rgba(255, 255, 255, 0.08),
    inset 2px 2px 4px rgba(255, 255, 255, 0.12),
    inset -2px -2px 4px rgba(0, 0, 0, 0.25);
}

.clock-time {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Courier New', 'Monaco', monospace;
  letter-spacing: 1px;
  margin-bottom: 4px;
  text-shadow: 
    0 0 8px rgba(247, 178, 103, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}

.clock-date {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

/* Responsive para reloj - Tablets */
@media (min-width: 481px) and (max-width: 768px) {
  .ribbon-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 0 16px;
  }
  
  .digital-clock-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-left: 0;
  }
  
  .digital-clock {
    min-width: 160px;
    max-width: 200px;
    padding: 10px 14px;
  }
  
  /* Relojes digitales en tablets */
  .digital-clock.watchface-flip,
  .digital-clock.watchface-led,
  .digital-clock.watchface-lcd {
    min-width: 160px;
    max-width: 200px;
    padding: 10px 14px;
  }
  
  .digital-clock.watchface-flip .clock-time,
  .digital-clock.watchface-led .clock-time,
  .digital-clock.watchface-lcd .clock-time {
    font-size: 1.4rem;
    letter-spacing: 1px;
  }
  
  .digital-clock.watchface-flip .clock-date,
  .digital-clock.watchface-led .clock-date,
  .digital-clock.watchface-lcd .clock-date {
    font-size: 0.7rem;
  }
  
  /* Relojes analógicos en tablets */
  .digital-clock.watchface-analog_classic,
  .digital-clock.watchface-analog_minimal,
  .digital-clock.watchface-analog_modern {
    width: 130px !important;
    height: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    min-height: 130px !important;
    max-height: 130px !important;
    padding: 12px;
  }
  
  /* Relojes smartwatch en tablets */
  .digital-clock.watchface-smartwatch,
  .digital-clock.watchface-smartwatch_minimal,
  .digital-clock.watchface-smartwatch_dark {
    min-width: 180px;
    max-width: 220px;
    padding: 10px 14px;
  }
  
  .digital-clock.watchface-smartwatch .smartwatch-time,
  .digital-clock.watchface-smartwatch_minimal .smartwatch-time,
  .digital-clock.watchface-smartwatch_dark .smartwatch-time {
    font-size: 1.5rem !important;
  }
  
  .digital-clock.watchface-smartwatch .smartwatch-date,
  .digital-clock.watchface-smartwatch_minimal .smartwatch-date,
  .digital-clock.watchface-smartwatch_dark .smartwatch-date {
    font-size: 0.7rem;
  }
  
  .clock-time {
    font-size: 1.3rem;
    letter-spacing: 0.5px;
  }
  
  .clock-date {
    font-size: 0.65rem;
  }
}

/* Responsive para reloj - Tablets grandes */
@media (min-width: 769px) and (max-width: 1024px) {
  .digital-clock-container {
    top: 16px;
    right: 16px;
  }
  
  .digital-clock {
    min-width: 180px;
    max-width: 220px;
    padding: 16px 20px;
  }
  
  /* Relojes digitales en tablets grandes */
  .digital-clock.watchface-flip,
  .digital-clock.watchface-led,
  .digital-clock.watchface-lcd {
    min-width: 180px;
    max-width: 220px;
    padding: 16px 20px;
  }
  
  .digital-clock.watchface-flip .clock-time,
  .digital-clock.watchface-led .clock-time,
  .digital-clock.watchface-lcd .clock-time {
    font-size: 1.8rem;
    letter-spacing: 1.5px;
  }
  
  /* Relojes analógicos en tablets grandes */
  .digital-clock.watchface-analog_classic,
  .digital-clock.watchface-analog_minimal,
  .digital-clock.watchface-analog_modern {
    width: 140px !important;
    height: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    min-height: 140px !important;
    max-height: 140px !important;
    padding: 14px;
  }
  
  /* Relojes smartwatch en tablets grandes */
  .digital-clock.watchface-smartwatch,
  .digital-clock.watchface-smartwatch_minimal,
  .digital-clock.watchface-smartwatch_dark {
    min-width: 200px;
    max-width: 240px;
    padding: 14px 18px;
  }
  
  .clock-time {
    font-size: 2rem;
  }
}

/* ============================================
   SISTEMA DE CARÁTULAS DE RELOJ - WIDGETS
   ============================================ */

/* ===== FLIP CLOCK (Digital con efecto de tarjetas) ===== */
.digital-clock.watchface-flip {
  background: #1a1a1a;
  border: 2px solid #333;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.5),
    0 4px 8px rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  min-width: 180px;
}

.digital-clock.watchface-flip .clock-time {
  color: #fff;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 2px;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.5);
  background: linear-gradient(180deg, #fff 0%, #aaa 50%, #888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
  animation: flipGlow 2s ease-in-out infinite;
}

@keyframes flipGlow {
  0%, 100% { 
    filter: brightness(1);
    transform: perspective(100px) rotateX(0deg);
  }
  50% { 
    filter: brightness(1.2);
    transform: perspective(100px) rotateX(2deg);
  }
}

.digital-clock.watchface-flip .clock-date {
  color: #888;
  font-size: 0.7rem;
  margin-top: 4px;
}

/* ===== LED MATRIX (Digital estilo LED) ===== */
.digital-clock.watchface-led {
  background: #000;
  border: 3px solid #0a0;
  box-shadow: 
    0 0 20px rgba(0, 255, 0, 0.5),
    inset 0 0 10px rgba(0, 255, 0, 0.2);
  padding: 10px 14px;
  min-width: 190px;
}

.digital-clock.watchface-led .clock-time {
  color: #0f0;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 3px;
  text-shadow: 
    0 0 10px #0f0,
    0 0 20px #0f0,
    0 0 30px #0f0;
  filter: drop-shadow(0 0 5px #0f0);
  animation: ledPulse 1.5s ease-in-out infinite;
}

@keyframes ledPulse {
  0%, 100% { 
    opacity: 1;
    filter: drop-shadow(0 0 5px #0f0) brightness(1);
  }
  50% { 
    opacity: 0.85;
    filter: drop-shadow(0 0 8px #0f0) brightness(1.2);
  }
}

.digital-clock.watchface-led .clock-date {
  color: #0a0;
  font-size: 0.65rem;
  text-shadow: 0 0 5px #0a0;
}

/* ===== LCD CALCULATOR (Digital estilo calculadora) ===== */
.digital-clock.watchface-lcd {
  background: #c8d4c8;
  border: 2px solid #8a9a8a;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 10px 12px;
  min-width: 170px;
}

.digital-clock.watchface-lcd .clock-time {
  color: #1a4a1a;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 1px;
  text-shadow: 
    1px 1px 2px rgba(0, 0, 0, 0.1),
    0 0 2px rgba(26, 74, 26, 0.3);
  position: relative;
}

.digital-clock.watchface-lcd .clock-time::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, rgba(200, 212, 200, 0.3) 0%, rgba(200, 212, 200, 0.1) 100%);
  border-radius: 2px;
  z-index: -1;
  animation: lcdGlow 3s ease-in-out infinite;
}

@keyframes lcdGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.5; }
}

.digital-clock.watchface-lcd .clock-date {
  color: #2a5a2a;
  font-size: 0.7rem;
}

/* ===== ANALÓGICO CLÁSICO (Con números romanos) ===== */
.digital-clock.watchface-analog_classic {
  background: #1a1a1a;
  border: 3px solid #444;
  border-radius: 50%;
  width: 150px !important;
  max-width: 180px !important;
  height: 150px !important;
  max-height: 180px !important;
  padding: 8px;
  min-width: 160px;
  min-height: 160px;
  padding: 0;
  position: relative;
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.5),
    0 4px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.digital-clock.watchface-analog_classic .analog-clock-face {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle, #2a2a2a 0%, #1a1a1a 100%);
}

/* Números romanos para el reloj clásico */
.digital-clock.watchface-analog_classic .analog-number.roman {
  font-family: 'Times New Roman', 'Georgia', serif;
  font-size: 0.6rem !important;
  font-weight: 600;
  color: #fff;
  text-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.8),
    0 0 2px rgba(0, 0, 0, 0.5);
  z-index: 5;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

@media (max-width: 480px) {
  .digital-clock.watchface-analog_classic .analog-number.roman {
    font-size: 0.5rem !important;
  }
}

/* Marcadores de horas (puntos pequeños) */
.digital-clock.watchface-analog_classic .analog-clock-face {
  background-image: 
    radial-gradient(circle at 50% 8%, #fff 2px, transparent 2px),
    radial-gradient(circle at 92% 50%, #fff 2px, transparent 2px),
    radial-gradient(circle at 50% 92%, #fff 2px, transparent 2px),
    radial-gradient(circle at 8% 50%, #fff 2px, transparent 2px),
    radial-gradient(circle, #2a2a2a 0%, #1a1a1a 100%);
}

/* Manecillas */
.digital-clock.watchface-analog_classic .analog-hour-hand,
.digital-clock.watchface-analog_classic .analog-minute-hand {
  position: absolute;
  background: #fff;
  border-radius: 2px;
  transform-origin: center bottom;
  left: 50%;
  bottom: 50%;
  transform: translateX(-50%);
}

.digital-clock.watchface-analog_classic .analog-hour-hand {
  width: 4px;
  height: 40px;
  margin-left: -2px;
}

.digital-clock.watchface-analog_classic .analog-minute-hand {
  width: 3px;
  height: 55px;
  margin-left: -1.5px;
}

.digital-clock.watchface-analog_classic .analog-second-hand {
  position: absolute;
  background: #f00;
  width: 2px;
  height: 60px;
  transform-origin: center bottom;
  left: 50%;
  bottom: 50%;
  transform: translateX(-50%);
  border-radius: 1px;
}

/* Centro del reloj */
.digital-clock.watchface-analog_classic .analog-clock-face {
  position: relative;
}

.digital-clock.watchface-analog_classic .analog-clock-face::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

/* ===== ANALÓGICO MINIMALISTA (Sin marcadores) ===== */
.digital-clock.watchface-analog_minimal {
  background: #f5f5f5;
  border: 2px solid #ddd;
  border-radius: 50%;
  width: 140px !important;
  max-width: 170px !important;
  height: 140px !important;
  max-height: 170px !important;
  padding: 8px;
  min-width: 150px;
  min-height: 150px;
  padding: 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.digital-clock.watchface-analog_minimal .analog-clock-face {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 50%;
  background: #fff;
}

/* Minimalista: sin números ni marcadores (diseño limpio) */
.digital-clock.watchface-analog_minimal .analog-number.minimal {
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: 0.7rem !important;
  font-weight: 700;
  color: #666;
  text-shadow: 
    0 1px 2px rgba(255, 255, 255, 0.8),
    0 -1px 1px rgba(0, 0, 0, 0.1);
  z-index: 5;
  pointer-events: none;
  user-select: none;
}

.digital-clock.watchface-analog_minimal .analog-hour-hand,
.digital-clock.watchface-analog_minimal .analog-minute-hand {
  position: absolute;
  background: #333;
  border-radius: 2px;
  transform-origin: center bottom;
  left: 50%;
  bottom: 50%;
  transform: translateX(-50%);
}

.digital-clock.watchface-analog_minimal .analog-hour-hand {
  width: 3px;
  height: 35px;
  margin-left: -1.5px;
}

.digital-clock.watchface-analog_minimal .analog-minute-hand {
  width: 2px;
  height: 50px;
  margin-left: -1px;
}

.digital-clock.watchface-analog_minimal .analog-second-hand {
  display: none;
}

/* ===== ANALÓGICO MODERNO (Con textura) ===== */
.digital-clock.watchface-analog_modern {
  background: linear-gradient(135deg, #e8dcc6 0%, #d4c4a8 100%);
  border: 2px solid #b8a082;
  border-radius: 50%;
  width: 150px !important;
  max-width: 180px !important;
  height: 150px !important;
  max-height: 180px !important;
  padding: 8px;
  min-width: 160px;
  min-height: 160px;
  padding: 0;
  position: relative;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 0 20px rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.digital-clock.watchface-analog_modern .analog-clock-face {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 50%;
  background: 
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px),
    radial-gradient(circle, #f0e6d2 0%, #e8dcc6 100%);
}

/* Números modernos para el reloj contemporáneo */
.digital-clock.watchface-analog_modern .analog-number.modern {
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: 0.65rem !important;
  font-weight: 700;
  color: #8a7a5a;
  text-shadow: 
    0 1px 2px rgba(255, 255, 255, 0.9),
    0 -1px 1px rgba(0, 0, 0, 0.1);
  z-index: 5;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

@media (max-width: 480px) {
  .digital-clock.watchface-analog_modern .analog-number.modern {
    font-size: 0.55rem !important;
  }
}

/* Marcadores mínimos (solo en 12 y 6) */
.digital-clock.watchface-analog_modern .analog-clock-face::before,
.digital-clock.watchface-analog_modern .analog-clock-face::after {
  content: '';
  position: absolute;
  background: #8a7a5a;
  border-radius: 1px;
  z-index: 1;
}

.digital-clock.watchface-analog_modern .analog-clock-face::before {
  width: 2px;
  height: 8px;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.digital-clock.watchface-analog_modern .analog-clock-face::after {
  width: 2px;
  height: 8px;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.digital-clock.watchface-analog_modern .analog-hour-hand,
.digital-clock.watchface-analog_modern .analog-minute-hand {
  position: absolute;
  background: #d4a574;
  border-radius: 2px;
  transform-origin: center bottom;
  left: 50%;
  bottom: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.digital-clock.watchface-analog_modern .analog-hour-hand {
  width: 4px;
  height: 40px;
  margin-left: -2px;
}

.digital-clock.watchface-analog_modern .analog-minute-hand {
  width: 3px;
  height: 55px;
  margin-left: -1.5px;
}

.digital-clock.watchface-analog_modern .analog-second-hand {
  position: absolute;
  background: #c00;
  width: 1.5px;
  height: 60px;
  transform-origin: center bottom;
  left: 50%;
  bottom: 50%;
  transform: translateX(-50%);
  border-radius: 1px;
}

/* ===== SMARTWATCH FITNESS (Completo con métricas) - Tamaño compacto como digitales ===== */
.digital-clock.watchface-smartwatch {
  background: #000;
  border: 2px solid #333;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 150px;
  max-width: 220px;
  min-height: auto;
  max-height: none;
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 0.65rem;
  align-items: center;
  justify-content: center;
}

.digital-clock.watchface-smartwatch .smartwatch-content {
  font-size: 0.65rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.digital-clock.watchface-smartwatch .smartwatch-time-main {
  width: 100%;
  text-align: center;
}

.digital-clock.watchface-smartwatch .smartwatch-time {
  font-size: 1.5rem !important;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  line-height: 1.2;
  margin: 0;
}

.digital-clock.watchface-smartwatch .smartwatch-ampm {
  font-size: 0.7rem !important;
  position: static;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  padding: 0;
  margin-left: 4px;
  display: inline;
  font-weight: 500;
}

.digital-clock.watchface-smartwatch .smartwatch-date {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: capitalize;
  margin-bottom: 2px;
}

.digital-clock.watchface-smartwatch .smartwatch-metrics-compact {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.6rem;
  margin-top: 2px;
}

.digital-clock.watchface-smartwatch .metric-compact {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  white-space: nowrap;
}

.smartwatch-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: #fff;
  font-size: 0.75rem;
}

.smartwatch-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.6rem;
  gap: 4px;
}

.smartwatch-metric {
  font-size: 0.6rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smartwatch-calories {
  color: #ff6b35;
  font-weight: 600;
}

.smartwatch-battery {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 255, 0, 0.2);
  padding: 2px 6px;
  border-radius: 12px;
  border: 1px solid #0f0;
}

.battery-icon {
  font-size: 0.7rem;
}

.battery-percent {
  font-size: 0.65rem;
  color: #0f0;
  font-weight: 600;
}

.smartwatch-distance {
  color: #0f0;
  font-weight: 600;
}

.smartwatch-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

.smartwatch-time-main {
  text-align: center;
  position: relative;
}

.smartwatch-ampm {
  position: absolute;
  top: -8px;
  left: 0;
  background: #fff;
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 600;
}

.smartwatch-time {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  line-height: 1;
}

.digital-clock.watchface-smartwatch .smartwatch-time {
  font-size: 1.1rem !important;
}

.smartwatch-tasks {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
}

.tasks-icon {
  font-size: 0.8rem;
  flex-shrink: 0;
}

.tasks-progress {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  min-width: 40px;
}

.tasks-bar {
  height: 100%;
  background: linear-gradient(90deg, #f00 0%, #ff6b00 25%, #ffd700 50%, #0f0 75%, #00bfff 100%);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.tasks-goal {
  color: #fff;
  font-weight: 600;
  font-size: 0.55rem;
  flex-shrink: 0;
}

.smartwatch-efficiency {
  display: flex;
  justify-content: center;
  align-items: center;
}

.efficiency-gauge {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.efficiency-ring {
  position: absolute;
  width: 50px;
  height: 50px;
  top: 0;
  left: 0;
}

.efficiency-ring circle {
  transition: stroke-dashoffset 0.5s ease;
}

.efficiency-icon {
  font-size: 1rem;
  z-index: 1;
}

.efficiency-value {
  position: absolute;
  bottom: -14px;
  font-size: 0.6rem;
  font-weight: 600;
  color: #fff;
}

.smartwatch-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.65rem;
}

.smartwatch-days {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.smartwatch-days .day {
  flex: 1;
  text-align: center;
  padding: 2px 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.6rem;
}

.smartwatch-days .day.active {
  background: rgba(0, 255, 0, 0.3);
  color: #0f0;
  border-radius: 4px;
  font-weight: 600;
}

.smartwatch-pending {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
}

.pending-icon {
  font-size: 0.75rem;
  flex-shrink: 0;
}

.pending-progress {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  min-width: 30px;
}

.pending-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff6b00 0%, #ffd700 100%);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.pending-count {
  color: #fff;
  font-weight: 600;
  font-size: 0.55rem;
  flex-shrink: 0;
}
  overflow: hidden;
}

.activity-bar {
  height: 100%;
  background: #0f0;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.activity-count {
  color: #fff;
  font-weight: 600;
  font-size: 0.65rem;
}

.smartwatch-weather {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.weather-icon {
  font-size: 0.8rem;
}

.weather-temp {
  color: #0f0;
  font-weight: 600;
}

.smartwatch-date {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.65rem;
  margin-top: 4px;
}

/* ===== SMARTWATCH MINIMAL ===== */
.digital-clock.watchface-smartwatch_minimal {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid #0f3460;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 150px;
  max-width: 220px;
  min-height: auto;
  max-height: none;
  width: auto;
  height: auto;
  overflow: hidden;
  font-size: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.digital-clock.watchface-smartwatch_minimal .smartwatch-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.digital-clock.watchface-smartwatch_minimal .smartwatch-time-main {
  width: 100%;
  text-align: center;
}

.digital-clock.watchface-smartwatch_minimal .smartwatch-time {
  font-size: 1.5rem !important;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #fff;
  margin-bottom: 2px;
}

.digital-clock.watchface-smartwatch_minimal .smartwatch-ampm {
  font-size: 0.7rem !important;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 4px;
  display: inline;
  font-weight: 500;
}

.digital-clock.watchface-smartwatch_minimal .smartwatch-date {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: capitalize;
  margin-bottom: 2px;
}

.digital-clock.watchface-smartwatch_minimal .smartwatch-metrics-compact {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.6rem;
  margin-top: 2px;
}

.digital-clock.watchface-smartwatch_minimal .metric-compact {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  white-space: nowrap;
}

.smartwatch-content.minimal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.smartwatch-metrics-minimal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 16px 0;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.metric-icon {
  font-size: 1.2rem;
}

.metric-value {
  flex: 1;
  text-align: right;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
}

.smartwatch-date-minimal {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: capitalize;
}

/* ===== SMARTWATCH DARK ===== */
.digital-clock.watchface-smartwatch_dark {
  background: #0a0a0a;
  border: 2px solid #1a1a1a;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 150px;
  max-width: 220px;
  min-height: auto;
  max-height: none;
  width: auto;
  height: auto;
  overflow: hidden;
  font-size: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.digital-clock.watchface-smartwatch_dark .smartwatch-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.digital-clock.watchface-smartwatch_dark .smartwatch-time-main {
  width: 100%;
  text-align: center;
}

.digital-clock.watchface-smartwatch_dark .smartwatch-time {
  font-size: 1.5rem !important;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #fff;
  margin-bottom: 2px;
}

.digital-clock.watchface-smartwatch_dark .smartwatch-ampm {
  font-size: 0.7rem !important;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 4px;
  display: inline;
  font-weight: 500;
}

.digital-clock.watchface-smartwatch_dark .smartwatch-date {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: capitalize;
  margin-bottom: 2px;
}

.digital-clock.watchface-smartwatch_dark .smartwatch-metrics-compact {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.6rem;
  margin-top: 2px;
}

.digital-clock.watchface-smartwatch_dark .metric-compact {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  white-space: nowrap;
}

.smartwatch-content.dark {
  display: flex;
  flex-direction: column;
  color: #fff;
}

.smartwatch-header-dark {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.7rem;
}

.smartwatch-battery-dark {
  color: #0f0;
  font-weight: 600;
}

.smartwatch-date-dark {
  color: rgba(255, 255, 255, 0.6);
}

.smartwatch-metrics-dark {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.metric-dark {
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border-left: 2px solid #0f0;
}

.metric-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

.metric-value-dark {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.metric-progress-dark {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.metric-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #f00 0%, #ff6b00 50%, #0f0 100%);
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* Selector de Carátulas */
/* Modal mejorado para selector de carátulas - Pantalla completa */
.watchface-selector-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 0;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
  animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(12px) saturate(180%);
  }
}

.watchface-selector-modal {
  max-width: 100%;
  width: 100%;
  max-height: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  position: relative;
  margin: 0;
  background: var(--bg);
  box-sizing: border-box;
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

.watchface-modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.05) 0%, 
    rgba(247, 178, 103, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 100%);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  flex-shrink: 0;
  z-index: 10;
  box-sizing: border-box;
  min-height: 70px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.watchface-header-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.watchface-header-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(247, 178, 103, 0.3));
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.watchface-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.watchface-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.3rem;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.watchface-close-btn:hover {
  background: var(--accent);
  color: #111;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(247, 178, 103, 0.4);
  border-color: var(--accent);
}

.watchface-close-btn:active {
  transform: rotate(90deg) scale(0.95);
}

.watchface-categories {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.watchface-categories::-webkit-scrollbar {
  display: none;
}

.watchface-category-btn {
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.watchface-category-btn:hover {
  background: rgba(247, 178, 103, 0.1);
  border-color: rgba(247, 178, 103, 0.3);
  transform: translateY(-2px);
}

.watchface-category-btn.active {
  background: linear-gradient(135deg, var(--accent) 0%, #f5a742 100%);
  color: #111;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(247, 178, 103, 0.3);
}

.watchface-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: var(--bg);
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.watchface-modal-body::-webkit-scrollbar {
  width: 8px;
}

.watchface-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.watchface-modal-body::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.watchface-modal-body::-webkit-scrollbar-thumb:hover {
  background: #f5a742;
}

.watchface-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(240px, auto);
  gap: 16px;
  padding: 8px 16px 24px 16px;
  width: 100%;
  max-width: 1400px;
  box-sizing: border-box;
  align-items: stretch;
  justify-items: stretch;
  margin: 0 auto;
}

/* Asegurar que todas las carátulas se vean sin scroll */
.watchface-grid::after {
  display: none;
}

.watchface-card {
  position: relative;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 240px;
  max-height: 280px;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  animation: cardFadeIn 0.4s ease forwards;
  opacity: 0;
}

.watchface-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, 
    rgba(247, 178, 103, 0) 0%,
    rgba(247, 178, 103, 0.3) 50%,
    rgba(247, 178, 103, 0) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.watchface-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
  background: var(--card-hover);
}

.watchface-card:hover::before {
  opacity: 0;
}

.watchface-card.active {
  border-color: var(--accent);
  border-width: 3px;
  box-shadow: 
    0 0 0 2px rgba(247, 178, 103, 0.2),
    0 8px 24px rgba(247, 178, 103, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.1);
  background: var(--card);
  transform: translateY(-2px);
}

.watchface-card.active::before {
  opacity: 0;
}

.watchface-preview {
  background: var(--bg);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  width: 100%;
  height: 120px;
  min-height: 120px;
  max-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--border);
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.watchface-card:hover .watchface-preview {
  transform: scale(1.03);
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--accent);
}

.watchface-preview .preview-time {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  font-family: 'Courier New', 'Monaco', monospace;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
}

.watchface-preview .preview-date {
  font-size: 0.7rem;
  opacity: 0.95;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Aplicar estilos de carátulas a los previews */
.watchface-preview.watchface-flip {
  background: #1a1a1a;
  border: 2px solid #333;
}

.watchface-preview.watchface-flip .preview-time {
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.watchface-preview.watchface-led {
  background: #000;
  border: 2px solid #0a0;
}

.watchface-preview.watchface-led .preview-time {
  color: #0f0;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  letter-spacing: 1.5px;
  text-shadow: 0 0 8px #0f0, 0 0 15px #0f0;
}

.watchface-preview.watchface-lcd {
  background: #c8d4c8;
  border: 2px solid #8a9a8a;
}

.watchface-preview.watchface-lcd .preview-time {
  color: #1a4a1a;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Previews de relojes analógicos - Tamaño uniforme mejorado */
.watchface-preview.watchface-analog_classic,
.watchface-preview.watchface-analog_minimal,
.watchface-preview.watchface-analog_modern {
  width: 100px;
  height: 100px;
  min-height: 100px;
  max-height: 100px;
  border-radius: 50%;
  padding: 0;
  position: relative;
  margin: 0 auto;
  flex-shrink: 0;
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.1);
}

.watchface-preview.watchface-analog_classic {
  background: #1a1a1a;
  border: 2px solid #444;
}

.watchface-preview.watchface-analog_minimal {
  background: #f5f5f5;
  border: 2px solid #ddd;
}

.watchface-preview.watchface-analog_modern {
  background: linear-gradient(135deg, #e8dcc6 0%, #d4c4a8 100%);
  border: 2px solid #b8a082;
}

.watchface-preview .analog-clock-face {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 50%;
}

.watchface-preview .analog-hour-hand,
.watchface-preview .analog-minute-hand,
.watchface-preview .analog-second-hand {
  position: absolute;
  transform-origin: center bottom;
  left: 50%;
  bottom: 50%;
}

.watchface-preview .analog-hour-hand {
  width: 2px;
  height: 16px;
  background: #fff;
  margin-left: -1px;
  transform: rotate(135deg);
  z-index: 10;
}

.watchface-preview .analog-minute-hand {
  width: 1.5px;
  height: 24px;
  background: #fff;
  margin-left: -0.75px;
  transform: rotate(90deg);
  z-index: 9;
}

.watchface-preview .analog-second-hand {
  width: 1px;
  height: 24px;
  background: #f00;
  margin-left: -0.5px;
  transform: rotate(45deg);
  z-index: 8;
}

.watchface-preview .analog-number {
  font-size: 0.4rem !important;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 5;
  pointer-events: none;
  user-select: none;
  position: absolute;
}

.watchface-preview .analog-number.roman {
  font-family: 'Times New Roman', 'Georgia', serif;
  color: #fff;
}

.watchface-preview .analog-number.modern {
  font-family: 'Arial', 'Helvetica', sans-serif;
  color: #8a7a5a;
  text-shadow: 
    0 1px 2px rgba(255, 255, 255, 0.9),
    0 -1px 1px rgba(0, 0, 0, 0.1);
}

.watchface-preview .analog-number.minimal {
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: 0.45rem !important;
  font-weight: 700;
  color: #666;
  text-shadow: 
    0 1px 2px rgba(255, 255, 255, 0.8),
    0 -1px 1px rgba(0, 0, 0, 0.1);
}

/* Previews de smartwatch - Tamaño uniforme mejorado */
.watchface-preview.watchface-smartwatch,
.watchface-preview.watchface-smartwatch_minimal,
.watchface-preview.watchface-smartwatch_dark {
  width: 100%;
  height: 100%;
  min-height: 120px;
  max-height: 120px;
  padding: 12px;
  position: relative;
  margin: 0 auto;
  border-radius: 16px;
  flex-shrink: 0;
}

.watchface-preview.watchface-smartwatch {
  background: #000;
  border: 2px solid #333;
  border-radius: 12px;
}

.watchface-preview.watchface-smartwatch_minimal {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid #0f3460;
  border-radius: 10px;
}

.watchface-preview.watchface-smartwatch_dark {
  background: #0a0a0a;
  border: 2px solid #1a1a1a;
  border-radius: 10px;
}

.smartwatch-preview {
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px;
  box-sizing: border-box;
}

.smartwatch-preview.minimal {
  align-items: center;
  text-align: center;
  justify-content: center;
}

.smartwatch-preview.dark {
  font-size: 0.7rem;
  justify-content: center;
}

.watchface-info {
  text-align: center;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 0;
  padding-top: 12px;
  gap: 8px;
}

.watchface-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
  opacity: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.watchface-card:hover .watchface-icon {
  transform: scale(1.15) rotate(8deg);
}

.watchface-name {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  font-size: 0.9rem;
  line-height: 1.3;
  flex-shrink: 0;
  letter-spacing: -0.2px;
}

.watchface-card.active .watchface-name {
  color: var(--accent);
  font-weight: 800;
}

.watchface-description {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.4;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex-shrink: 0;
  opacity: 0.9;
  margin-top: 4px;
}

.watchface-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #f5a742 100%);
  color: #111;
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 
    0 4px 16px rgba(247, 178, 103, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 10;
  animation: badgePulse 2s ease-in-out infinite;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow: 
      0 4px 12px rgba(247, 178, 103, 0.5),
      0 0 0 2px rgba(255, 255, 255, 0.2) inset;
  }
  50% {
    box-shadow: 
      0 6px 16px rgba(247, 178, 103, 0.7),
      0 0 0 2px rgba(255, 255, 255, 0.3) inset;
  }
}
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
}

/* Responsive para selector */
@media (max-width: 768px) {
  .watchface-selector-modal {
    width: 98%;
    max-height: 92vh;
  }
  
  .watchface-modal-header {
    padding: 16px 20px;
    flex-shrink: 0;
  }
  
  .watchface-modal-header h2 {
    font-size: 1.1rem;
  }
  
  .watchface-selector-overlay {
    padding: 0;
  }
  
  .watchface-selector-modal {
    max-width: 100%;
    width: 100%;
    max-height: 100%;
    height: 100%;
  }
  
  .watchface-modal-header {
    padding: 12px 16px;
    min-height: 50px;
  }
  
  .watchface-modal-header h2 {
    font-size: 1rem;
  }
  
  .watchface-modal-body {
    padding: 12px;
    overflow: hidden;
  }
  
  .watchface-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 10px;
    padding: 0;
    height: 100%;
  }

  .watchface-card {
    padding: 10px;
    min-height: 0;
    height: 100%;
  }

  .watchface-preview {
    height: 100px;
    min-height: 100px;
    max-height: 100px;
    padding: 8px;
    margin-bottom: 8px;
  }
  
  .watchface-preview.watchface-analog_classic,
  .watchface-preview.watchface-analog_minimal,
  .watchface-preview.watchface-analog_modern {
    width: 90px;
    height: 90px;
    min-height: 90px;
    max-height: 90px;
  }
  
  .watchface-preview.watchface-smartwatch,
  .watchface-preview.watchface-smartwatch_minimal,
  .watchface-preview.watchface-smartwatch_dark {
    width: 100%;
    height: 100%;
    min-height: 100px;
    max-height: 100px;
  }

  .watchface-preview .preview-time {
    font-size: 1rem;
  }

  .watchface-preview .preview-date {
    font-size: 0.65rem;
  }
  
  .watchface-icon {
    font-size: 1.2rem;
  }
  
  .watchface-name {
    font-size: 0.75rem;
  }
  
  .watchface-description {
    font-size: 0.65rem;
  }
  
  .watchface-name {
    font-size: 0.8rem;
  }
  
  .watchface-description {
    font-size: 0.65rem;
  }
  
  .watchface-icon {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .watchface-selector-modal {
    width: 98%;
    max-height: 90vh;
  }
  
  .watchface-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-bottom: 8px;
  }
  
  .watchface-card {
    min-height: 200px;
    max-height: 200px;
    padding: 14px;
  }
  
  .watchface-preview {
    height: 110px;
    min-height: 110px;
    max-height: 110px;
  }
}

#app {
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: visible;
  min-width: 0;
  position: relative;
}

/* Dashboard Cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.dashboard-card {
  padding: 24px;
}

.dashboard-card h3 {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dashboard-card .value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.dashboard-card .label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* Charts Container */
.charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.chart-card {
  padding: 24px;
  min-height: 400px;
}

.chart-card h3 {
  margin-bottom: 20px;
  text-align: center;
}

.chart-container {
  position: relative;
  height: 350px;
  width: 100%;
}

/* Forms */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent2);
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  box-shadow: inset 2px 2px 4px var(--shadow-dark),
              inset -2px -2px 4px var(--shadow-light);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: inset 3px 3px 6px var(--shadow-dark),
              inset -3px -3px 6px var(--shadow-light),
              0 0 0 2px var(--accent);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-feedback {
  display: none;
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.form-feedback.visible {
  display: block;
}

.form-feedback.is-error {
  color: #f87171;
}

.form-feedback.is-success {
  color: #34d399;
}

.form-feedback.is-info {
  color: var(--accent3);
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin: 24px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}

table th {
  background: var(--card-hover);
  padding: 16px;
  text-align: left;
  color: var(--accent2);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

table td {
  padding: 16px;
  border-top: 1px solid var(--border);
}

table tr:hover {
  background: var(--card-hover);
}

/* Task List */
.task-list {
  list-style: none;
  padding: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: inset 2px 2px 4px var(--shadow-dark),
              inset -2px -2px 4px var(--shadow-light);
  transition: var(--transition);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Vista de inventario - contenedor principal */
.inventory-task-view {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.task-item:hover {
  box-shadow: inset 3px 3px 6px var(--shadow-dark),
              inset -3px -3px 6px var(--shadow-light);
}

.task-checkbox {
  width: 24px;
  height: 24px;
  cursor: pointer;
  accent-color: var(--accent);
}

.task-content {
  flex: 1;
}

.task-title {
  font-weight: 500;
  margin-bottom: 4px;
}

.task-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.task-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.task-status.completed {
  background: var(--success);
  color: #111;
}

.task-status.pending {
  background: var(--warning);
  color: #111;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}

.spinner {
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Theme Toggle */
.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  background: var(--card);
  border-radius: 30px;
  border: none;
  cursor: pointer;
  padding: 0;
  box-shadow: inset 2px 2px 4px var(--shadow-dark),
              inset -2px -2px 4px var(--shadow-light);
  transition: var(--transition);
  overflow: hidden;
}

.theme-toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 4px var(--shadow-dark);
  z-index: 2;
  /* Modo claro por defecto: slider a la derecha */
  transform: translateX(30px);
}

[data-theme="dark"] .theme-toggle-slider {
  transform: translateX(3px);
}

.theme-toggle-icon {
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.theme-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.theme-toggle-label span {
  user-select: none;
  white-space: nowrap;
  transition: opacity 0.3s ease, font-weight 0.3s ease;
}

.theme-label-left,
.theme-label-right {
  font-size: 0.9rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  background: var(--card);
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  position: relative;
  z-index: 10;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(var(--accent-rgb, 247, 178, 103), 0.2);
}

.footer-links a:hover {
  color: var(--accent);
}

/* Asegurar que los enlaces del footer funcionen en móvil */
@media (max-width: 768px) {
  .footer-links a {
    z-index: 100;
    padding: 8px 12px;
    display: inline-block;
    min-height: 44px;
    line-height: 28px;
    cursor: pointer;
  }
  
  .footer {
    position: relative;
    z-index: 10;
  }
  
  .footer-content {
    position: relative;
    z-index: 10;
  }
}

/* Ocultar botones de "Cerrar Sesión" en los menús del ribbon en escritorio */
.ribbon-menu-dropdown-item[onclick*="handleLogout"],
.ribbon-menu-dropdown-item[onclick*="localStorage.removeItem('clp_token')"] {
  display: none !important;
}

/* Mostrar botones de "Cerrar Sesión" solo en móvil */
@media (max-width: 768px) {
  .ribbon-menu-dropdown-item[onclick*="handleLogout"],
  .ribbon-menu-dropdown-item[onclick*="localStorage.removeItem('clp_token')"] {
    display: flex !important;
  }
}

/* Modales */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 8px 8px 16px var(--shadow-dark),
              -8px -8px 16px var(--shadow-light);
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--card-hover);
  color: var(--text);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  box-shadow: inset 2px 2px 4px var(--shadow-dark),
              inset -2px -2px 4px var(--shadow-light);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 2px 2px 4px var(--shadow-dark),
              inset -2px -2px 4px var(--shadow-light),
              0 0 0 3px rgba(247, 178, 103, 0.1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group select {
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.form-actions button {
  min-width: 100px;
}

/* ============================================
   FORMULARIO DE TAREAS MEJORADO
   ============================================ */

.task-form-modal {
  max-width: 700px !important;
}

.task-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-section {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.form-section:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.section-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.form-section-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.form-group label .required {
  color: var(--error);
  margin-left: 2px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 247, 178, 103), 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.form-hint.form-warning {
  color: var(--accent);
  font-weight: 500;
}

.template-selector {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.template-selector .form-select {
  flex: 1;
}

.btn-icon {
  padding: 12px 16px;
  min-width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-full {
  width: 100%;
}

.btn-submit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.inventory-items-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 768px) {
  .task-form-modal {
    max-width: 100% !important;
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
  }
  
  .form-section {
    padding: 16px;
  }
  
  .form-actions {
    flex-direction: column-reverse;
  }
  
  .form-actions button {
    width: 100%;
  }
}

/* ============================================
   HEADERS DE VISTA MEJORADOS
   ============================================ */

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
  gap: 16px;
}

.view-header-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.view-header-icon {
  font-size: 2.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 2px 2px 4px var(--shadow-dark),
              -2px -2px 4px var(--shadow-light);
}

.view-header h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.view-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
}

/* Cards de Dashboard Mejorados */
.dashboard-card {
  position: relative;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 8px var(--shadow-dark),
              -4px -4px 8px var(--shadow-light);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.dashboard-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.dashboard-card .value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 12px 0;
  line-height: 1;
}

.dashboard-card .label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 8px;
}

/* Chart Headers */
.chart-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.chart-icon {
  font-size: 1.3rem;
}

.chart-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 768px) {
  .view-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .view-header-content {
    width: 100%;
  }
  
  .view-header-icon {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }
  
  .view-header h2 {
    font-size: 1.5rem;
  }
}

/* ============================================
   DASHBOARD PERSONALIZABLE NEUMÓRFICO MEJORADO
   ============================================ */

.neumorphic-dashboard-container {
  padding: 24px;
  min-height: calc(100vh - 120px);
  background: var(--bg);
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.neumorphic-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.neumorphic-header-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.neumorphic-widgets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
}

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

@media (max-width: 768px) {
  .neumorphic-widgets-grid {
    grid-template-columns: 1fr;
  }
}

.neumorphic-widgets-grid.edit-mode .neumorphic-widget-wrapper {
  cursor: move;
}

.neumorphic-widget-wrapper {
  transition: transform 0.2s ease;
  height: 100%;
}

.neumorphic-widget-wrapper.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

.neumorphic-widget-wrapper.drag-over {
  transform: translateY(-4px);
  border: 2px dashed var(--accent);
}

.neumorphic-widget {
  background: var(--card);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.neumorphic-widget:hover {
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.12),
    0 2px 4px rgba(0, 0, 0, 0.16);
  transform: translateY(-2px);
}

.neumorphic-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.neumorphic-widget-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.neumorphic-widget-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.neumorphic-widget-grip {
  color: var(--muted);
  font-size: 1rem;
  cursor: move;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 4px 8px;
  border-radius: 6px;
}

.neumorphic-widget-wrapper:hover .neumorphic-widget-grip,
.neumorphic-widgets-grid.edit-mode .neumorphic-widget-grip {
  opacity: 1;
  background: var(--bg);
}

.neumorphic-widget-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.neumorphic-widget-settings {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.neumorphic-widget-settings:hover {
  color: var(--accent);
  background: var(--bg);
}

.neumorphic-widget-body {
  min-height: 200px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Estadísticas */
.neumorphic-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.neumorphic-stat-card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.neumorphic-stat-card:hover {
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.neumorphic-stat-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  height: 100%;
}

.neumorphic-stat-info {
  flex: 1;
  min-width: 0;
}

.neumorphic-stat-label {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: none;
  letter-spacing: normal;
}

.neumorphic-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1;
}

.neumorphic-stat-badge {
  display: inline-block;
  background: var(--bg);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.neumorphic-stat-icon {
  font-size: 2.5rem;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Tareas */
.neumorphic-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.neumorphic-task-card {
  background: var(--bg);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.neumorphic-task-card:hover {
  background: var(--card-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.neumorphic-task-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.neumorphic-task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--card);
  border: 2px solid var(--border);
  margin-top: 2px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.neumorphic-task-checkbox:hover {
  border-color: var(--accent);
  background: var(--card-hover);
}

.neumorphic-task-info {
  flex: 1;
}

.neumorphic-task-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
}

.neumorphic-task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.neumorphic-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
  display: inline-block;
}

.neumorphic-badge-high {
  background: rgba(220, 38, 38, 0.1);
  color: var(--error);
  border-color: rgba(220, 38, 38, 0.2);
}

.neumorphic-badge-medium {
  background: rgba(217, 119, 6, 0.1);
  color: var(--warning);
  border-color: rgba(217, 119, 6, 0.2);
}

.neumorphic-badge-low {
  background: rgba(5, 150, 105, 0.1);
  color: var(--success);
  border-color: rgba(5, 150, 105, 0.2);
}

.neumorphic-task-date {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Equipo */
.neumorphic-team-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.neumorphic-team-card {
  background: var(--bg);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.neumorphic-team-card:hover {
  background: var(--card-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.neumorphic-team-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.neumorphic-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.neumorphic-team-info {
  flex: 1;
}

.neumorphic-team-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px 0;
}

.neumorphic-team-tasks {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.neumorphic-team-progress-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.neumorphic-progress-bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.neumorphic-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Actividad */
.neumorphic-activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.neumorphic-activity-card {
  background: var(--bg);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.neumorphic-activity-card:hover {
  background: var(--card-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.neumorphic-activity-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.neumorphic-activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.neumorphic-activity-info {
  flex: 1;
}

.neumorphic-activity-text {
  font-size: 0.875rem;
  color: var(--text);
  margin: 0 0 4px 0;
}

.neumorphic-activity-user {
  font-weight: 600;
}

.neumorphic-activity-time {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.neumorphic-empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-size: 0.9375rem;
  margin: 0;
}

.dashboard-edit-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.dashboard-edit-controls button {
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  font-weight: 600;
}

.dashboard-edit-controls button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.2),
    0 3px 6px rgba(0, 0, 0, 0.15);
}

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

@media (max-width: 768px) {
  .neumorphic-dashboard-container {
    padding: 12px;
    min-height: calc(100vh - 100px);
  }
  
  .neumorphic-widgets-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .neumorphic-widget {
    padding: 16px;
    border-radius: 16px;
  }
  
  .neumorphic-widget-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    flex-wrap: wrap;
  }
  
  .neumorphic-widget-title {
    font-size: 1.1rem;
  }
  
  .neumorphic-widget-title-area {
    flex: 1;
    min-width: 0;
  }
  
  .neumorphic-widget-actions {
    flex-shrink: 0;
  }
  
  .neumorphic-widget-grip {
    font-size: 0.9rem;
    padding: 4px 6px;
  }
  
  .neumorphic-widget-settings {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }
  
  .neumorphic-widget-body {
    min-height: 150px;
  }
  
  .neumorphic-widget-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .neumorphic-stat-card {
    padding: 16px;
  }
  
  .neumorphic-stat-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .neumorphic-stat-info {
    width: 100%;
  }
  
  .neumorphic-stat-label {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }
  
  .neumorphic-stat-value {
    font-size: 2rem;
    margin-bottom: 6px;
  }
  
  .neumorphic-stat-icon {
    width: 56px;
    height: 56px;
    font-size: 2rem;
    align-self: flex-end;
  }
  
  .neumorphic-stat-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  
  .neumorphic-tasks-list {
    gap: 10px;
  }
  
  .neumorphic-task-card {
    padding: 12px;
  }
  
  .neumorphic-task-content {
    gap: 10px;
  }
  
  .neumorphic-task-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 3px;
  }
  
  .neumorphic-task-title {
    font-size: 0.95rem;
    margin-bottom: 6px;
  }
  
  .neumorphic-task-meta {
    gap: 6px;
    font-size: 0.7rem;
  }
  
  .neumorphic-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  
  .neumorphic-task-date {
    font-size: 0.7rem;
  }
  
  .neumorphic-team-list {
    gap: 12px;
  }
  
  .neumorphic-team-card {
    padding: 12px;
  }
  
  .neumorphic-team-header {
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .neumorphic-avatar {
    width: 40px;
    height: 40px;
    font-size: 0.75rem;
  }
  
  .neumorphic-team-name {
    font-size: 0.875rem;
  }
  
  .neumorphic-team-tasks {
    font-size: 0.7rem;
  }
  
  .neumorphic-team-progress-value {
    font-size: 0.8rem;
  }
  
  .neumorphic-progress-bar {
    height: 5px;
  }
  
  .neumorphic-activity-list {
    gap: 10px;
  }
  
  .neumorphic-activity-card {
    padding: 12px;
  }
  
  .neumorphic-activity-content {
    gap: 10px;
  }
  
  .neumorphic-activity-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .neumorphic-activity-text {
    font-size: 0.8rem;
  }
  
  .neumorphic-activity-time {
    font-size: 0.7rem;
  }
  
  .neumorphic-empty-state {
    padding: 30px 16px;
    font-size: 0.875rem;
  }
  
  .dashboard-edit-controls {
    bottom: 16px;
    right: 16px;
    left: 16px;
    position: fixed;
  }
  
  .dashboard-edit-controls button {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
    border-radius: 12px;
  }
}

/* ============================================
   RESPONSIVE DESIGN - MÓVILES, TABLETAS, TV
   ============================================ */

/* Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {
  /* Mejoras de viewport y base */
  html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
  
  body {
    padding: 0;
    margin: 0;
    overflow-x: hidden;
  }
  
  .landing-header {
    padding: 12px 16px;
  }

  .logo-text {
    font-size: 1.4rem;
  }

  .landing-header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 10px var(--shadow-dark);
  }

  .landing-header nav.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex !important;
    z-index: 1001;
    min-width: 44px;
    min-height: 44px;
  }
  
  /* Asegurar visibilidad del botón hamburguesa en el header del panel */
  .header .mobile-menu-toggle {
    display: flex !important;
    order: 1;
    margin-left: auto;
    min-width: 44px;
    min-height: 44px;
  }
  
  .header-content {
    position: relative;
    padding: 12px 16px;
  }
  
  .header-actions {
    order: 2;
    width: 100%;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  /* Asegurar que el ribbon-container esté oculto por defecto en móvil */
  .ribbon-container {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    margin-bottom: 0;
  }
  
  .ribbon-container.active {
    max-height: 2000px;
    opacity: 1;
    overflow: visible;
    margin-bottom: 20px;
  }
  
  /* Asegurar que el botón de volver sea visible */
  .back-button {
    position: relative;
    z-index: 1;
    min-width: 44px;
    min-height: 44px;
    padding: 10px 16px;
  }

  .header .panel-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 16px;
    box-shadow: 0 4px 10px var(--shadow-dark);
    z-index: 1000;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .header .panel-nav.active { 
    display: flex; 
  }

  .header .header-actions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 16px;
    box-shadow: 0 4px 10px var(--shadow-dark);
    z-index: 999;
    border-radius: 0 0 var(--radius) var(--radius);
    margin-top: 0;
    gap: 12px;
  }
  .header .header-actions.active { 
    display: flex; 
  }
  
  /* Botón de logout en móvil - más visible y accesible */
  .header-actions #logout-btn,
  .header #logout-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--error) !important;
    color: white !important;
    border: 2px solid var(--error) !important;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    min-height: 44px; /* Tamaño mínimo táctil recomendado */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  
  .header-actions #logout-btn:hover,
  .header-actions #logout-btn:focus,
  .header #logout-btn:hover,
  .header #logout-btn:focus {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
  }
  
  /* Asegurar que el botón de logout sea visible cuando el header está visible en móvil */
  .header.mobile-visible #logout-btn {
    display: flex !important;
  }
  
  /* En móvil, los botones del header deben ser más grandes y accesibles */
  .header-actions .back-button,
  .header-actions #logout-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    min-height: 48px;
    text-align: center;
    justify-content: center;
  }
  
  /* Asegurar que el botón de logout tenga suficiente contraste */
  #logout-btn {
    background: var(--error) !important;
    color: white !important;
    border-color: var(--error) !important;
  }
  
  #logout-btn:hover,
  #logout-btn:active {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
  }

  .theme-toggle-label {
    font-size: 0.75rem;
    gap: 6px;
  }

  .theme-toggle {
    width: 50px;
    height: 26px;
  }

  .theme-toggle-slider {
    width: 20px;
    height: 20px;
    top: 3px;
    left: 3px;
  }

  .theme-toggle-slider {
    transform: translateX(24px);
  }

  [data-theme="dark"] .theme-toggle-slider {
    transform: translateX(3px);
  }

  .theme-label-left,
  .theme-label-right {
    display: none;
  }

  .hero {
    min-height: 70vh;
    padding: 20px 16px;
  }

  .hero-content {
    padding: 30px 20px;
  }

  .hero h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }

  .hero-description {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions button {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .hero-stats {
    gap: 20px;
    margin-top: 30px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .section {
    margin: 40px auto;
    padding: 0 16px;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .section p {
    font-size: 0.95rem;
  }

  .roles-grid,
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .role-card,
  .feature-card {
    padding: 20px 16px;
  }

  .role-icon,
  .feature-icon {
    font-size: 2.5rem;
  }

  .benefit-item {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  /* Panel responsive */
  .header {
    padding: 12px 16px;
  }

  .header-content {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  .header .logo-panel {
    flex: 1;
    min-width: 0;
  }
  
  .header .mobile-menu-toggle {
    display: flex !important;
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
  }
  
  /* Mejorar visibilidad del botón hamburguesa */
  .header .mobile-menu-toggle {
    position: relative;
  }
  
  .header .mobile-menu-toggle span {
    opacity: 0.9;
    background: var(--text);
  }
  
  .header .mobile-menu-toggle:hover span,
  .header .mobile-menu-toggle:focus span {
    opacity: 1;
    background: var(--accent);
  }
  
  .header .mobile-menu-toggle.active span {
    background: #111;
  }

  .panel-nav {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .panel-nav a,
  .panel-nav button {
    width: 100%;
    padding: 10px 16px;
    text-align: left;
  }

  .main-content {
    padding: 0 16px 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  #app {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dashboard-card {
    padding: 20px;
  }

  .dashboard-card .value {
    font-size: 2rem;
  }

  .charts-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .chart-card {
    padding: 20px;
    min-height: 300px;
  }

  .chart-container {
    height: 250px;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px -16px;
    padding: 0 16px;
  }

  table {
    font-size: 0.85rem;
    min-width: 600px;
  }

  table th,
  table td {
    padding: 12px 8px;
    white-space: nowrap;
  }
  
  /* Tablas responsivas - convertir a cards en móviles */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px -16px;
    padding: 0 16px;
  }
  
  /* Alternativa: ocultar tabla y mostrar cards en móviles muy pequeños */
  @media (max-width: 480px) {
    .table-container table {
      display: none;
    }
    
    .table-container::before {
      content: "Desliza horizontalmente para ver más columnas";
      display: block;
      text-align: center;
      padding: 12px;
      color: var(--muted);
      font-size: 0.85rem;
      margin-bottom: 8px;
    }
  }

  /* Imágenes responsivas en feedback y avances */
  img[onclick*="showImageModal"] {
    max-width: 80px;
    max-height: 80px;
  }

  .task-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .task-content {
    width: 100% !important;
    max-width: 100% !important;
  }

  .task-title {
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
    margin-bottom: 8px !important;
  }

  .task-meta {
    width: 100% !important;
    font-size: 0.9rem !important;
  }

  .task-meta p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
  }

  .task-meta small {
    font-size: 0.8rem !important;
    display: block !important;
    margin-top: 8px !important;
  }

  /* Botones en tarjetas de usuario */
  .task-item button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Contenedor de acciones de tarea */
  .task-item > div:last-child {
    width: 100% !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .task-status {
    width: 100% !important;
    text-align: center !important;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
  }

  /* Imágenes en tarjetas de usuario */
  .task-item img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
  }

  .task-item div[style*="display: flex"][style*="gap: 10px"][style*="flex-wrap: wrap"] {
    gap: 8px !important;
  }

  .task-item div[style*="display: flex"][style*="gap: 10px"][style*="flex-wrap: wrap"] img {
    width: 80px !important;
    height: 80px !important;
    max-width: calc(50% - 4px) !important;
    object-fit: cover !important;
  }

  /* Comentarios y feedback en tarjetas */
  .task-item div[style*="padding: 12px"][style*="background: var(--card-hover)"] {
    padding: 12px !important;
    font-size: 0.85rem !important;
  }

  .task-item div[style*="padding: 15px"][style*="background: var(--card-hover)"] {
    padding: 12px !important;
    font-size: 0.85rem !important;
  }

  .task-item div[style*="margin-bottom: 12px"][style*="padding: 10px"] {
    padding: 10px !important;
    font-size: 0.85rem !important;
  }

  .task-item div[style*="margin-bottom: 15px"][style*="padding: 15px"] {
    padding: 12px !important;
    margin-bottom: 12px !important;
    font-size: 0.85rem !important;
  }

  /* Checkbox de tarea */
  .task-checkbox {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    flex-shrink: 0 !important;
  }

  .form-container {
    padding: 20px 16px;
  }

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

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  .modal {
    padding: 20px 16px;
    max-width: calc(100% - 20px);
    margin: 10px;
    max-height: calc(100vh - 20px);
  }

  .modal-header h3 {
    font-size: 1.25rem;
  }

  /* Ajustes para inputs y textareas en móviles */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="file"],
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  textarea,
  select {
    font-size: 16px !important; /* Previene zoom en iOS */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }

  /* Mejorar touch targets */
  button,
  .btn-accent,
  .btn-secondary,
  a.button,
  .ribbon-menu-item,
  .ribbon-menu-dropdown-item {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    user-select: none;
  }
  
  /* Mejorar accesibilidad táctil */
  a:not(.button) {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
  }
  
  /* Scroll suave en móviles */
  * {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Mejorar contraste y legibilidad */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  h1 { 
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 16px;
  }
  
  h2 { 
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 14px;
  }
  
  h3 { 
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 12px;
  }
  
  /* Mejorar espaciado en móviles */
  .main-content {
    padding: 16px !important;
  }
  
  .section {
    padding: 20px 16px !important;
    margin-bottom: 24px;
  }
  
  /* Cards con mejor espaciado */
  .card,
  .dashboard-card,
  .chart-card {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  /* Mejorar dropdowns en móviles */
  .ribbon-menu-dropdown {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0;
    margin-top: 8px;
  }
  
  /* Mejorar modales en móviles */
  .modal-overlay {
    padding: 0;
    align-items: flex-start;
    padding-top: 20px;
  }
  
  .modal {
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
    margin: 0 16px 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: var(--radius);
  }
  
  /* Mejorar botón flotante del header */
  .mobile-header-toggle {
    width: 52px !important;
    height: 52px !important;
    font-size: 1.6rem !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
  }
  
  /* Mejorar botón de cerrar del header */
  .header .mobile-header-close {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.3rem !important;
  }
}

/* Móviles medianos (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .landing-header {
    padding: 16px 24px;
  }

  .landing-header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 10px var(--shadow-dark);
  }

  .landing-header nav.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex;
    min-width: 44px;
    min-height: 44px;
  }

  .theme-toggle-label {
    font-size: 0.85rem;
    gap: 8px;
  }

  .theme-label-left,
  .theme-label-right {
    display: none;
  }

  .hero {
    padding: 30px 20px;
  }

  .hero-content {
    padding: 40px 30px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-description {
    font-size: 1.1rem;
  }

  .hero-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-actions button {
    flex: 1 1 auto;
    min-width: 200px;
    min-height: 44px;
  }

  .hero-stats {
    gap: 30px;
  }

  .section {
    padding: 0 20px;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .roles-grid,
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  /* Panel responsive */
  .header-content {
    flex-wrap: wrap;
    position: relative;
    padding: 12px 20px;
  }
  
  /* Asegurar que el botón hamburguesa sea visible y prominente */
  .header .mobile-menu-toggle {
    display: flex !important;
    order: 1;
    margin-left: auto;
    margin-right: 0;
    min-width: 44px;
    min-height: 44px;
  }
  
  .logo-panel {
    order: 0;
    flex: 1;
  }

  .panel-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 10px var(--shadow-dark);
    z-index: 1000;
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .panel-nav.active {
    display: flex;
  }

  .header-actions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 10px var(--shadow-dark);
    z-index: 999;
    border-radius: 0 0 var(--radius) var(--radius);
    margin-top: 0;
  }

  .header-actions.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex !important;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .charts-container {
    grid-template-columns: 1fr;
  }

  .task-item {
    flex-wrap: wrap;
  }

  .modal {
    max-width: 90%;
    padding: 24px;
    max-height: calc(100vh - 40px);
  }

  /* Mejorar scroll en móviles */
  .modal-overlay {
    padding: 10px;
  }
  
  /* Mejoras adicionales para móviles medianos */
  .main-content {
    padding: 20px !important;
  }
  
  .table-container {
    margin: 20px -20px;
    padding: 0 20px;
  }
  
  table {
    min-width: 650px;
    font-size: 0.9rem;
  }
  
  .form-container {
    padding: 24px 20px;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
  }
  
  .charts-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .filters-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  /* Ribbon menu mejorado para móviles medianos */
  .ribbon-menu-item {
    padding: 12px 16px;
    font-size: 0.95rem;
  }
  
  .ribbon-menu-dropdown-item {
    padding: 12px 16px;
    font-size: 0.95rem;
  }
  
  /* Búsqueda global */
  .global-search-input {
    width: 100%;
    max-width: 100%;
    font-size: 16px !important;
    padding: 10px 14px;
    padding-left: 38px;
  }
}

/* Tabletas (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  html {
    font-size: 15px;
  }
  
  .landing-header {
    padding: 20px 32px;
  }

  .landing-header nav {
    gap: 20px;
  }

  .hero-content {
    padding: 50px 40px;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .hero-description {
    font-size: 1.15rem;
  }

  .section {
    max-width: 1000px;
    padding: 0 32px;
  }

  .roles-grid,
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  /* Panel responsive */
  .main-content {
    max-width: 1200px;
    padding: 0 32px 40px;
  }
  
  .ribbon-header {
    padding: 0 24px;
  }
  
  .ribbon-menu-bar {
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .ribbon-menu-item {
    padding: 10px 14px;
    font-size: 0.9rem;
    min-height: 40px;
  }
  
  .ribbon-header-actions {
    padding: 0 16px;
    gap: 12px;
  }
  
  .global-search-input {
    width: 220px;
    font-size: 0.9rem;
    padding: 8px 14px;
    padding-left: 36px;
  }
  
  .digital-clock {
    min-width: 170px;
    padding: 14px 18px;
  }
  
  .clock-time {
    font-size: 1.4rem;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
  }

  .charts-container {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
  }
  
  table {
    min-width: 700px;
    font-size: 0.9rem;
  }
  
  table th,
  table td {
    padding: 12px 10px;
  }

  /* Imágenes en tabletas */
  img[onclick*="showImageModal"] {
    max-width: 120px;
    max-height: 120px;
  }
  
  /* Contenedores de módulos */
  .ot-container,
  .bitacora-container,
  .vuelos-container,
  .inventory-database-container,
  .ventas-compartidas-container {
    padding: 20px 24px;
  }
  
  .ot-header,
  .bitacora-header,
  .vuelos-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  /* Formularios en tabletas */
  .form-container {
    max-width: 600px;
    padding: 30px 24px;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 0.95rem;
    padding: 12px 16px;
  }
  
  /* Botones en tabletas */
  button,
  .btn-accent,
  .btn-secondary {
    min-height: 42px;
    padding: 10px 18px;
    font-size: 0.95rem;
  }
  
  /* Modales en tabletas */
  .modal {
    max-width: 90%;
    padding: 24px;
  }
  
  /* Stats grid en tabletas */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  /* Filtros en tabletas */
  .filters-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* Pantallas grandes (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  .section {
    max-width: 1200px;
  }

  .main-content {
    max-width: 1400px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .charts-container {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  }
}

/* Pantallas muy grandes / TV (1441px - 1920px) */
@media (min-width: 1441px) {
  .section {
    max-width: 1600px;
    margin: 100px auto;
    padding: 0 40px 50px;
  }

  .main-content {
    max-width: 1800px;
    padding: 0 40px 50px;
  }
  
  .ribbon-header {
    padding: 0 40px;
  }
  
  .ribbon-menu-item {
    padding: 12px 20px;
    font-size: 1rem;
  }
  
  .ribbon-menu-dropdown {
    min-width: 220px;
  }
  
  .ribbon-menu-dropdown-item {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
  
  .ribbon-header-actions {
    padding: 0 24px;
  }
  
  .global-search-input {
    width: 350px;
    font-size: 0.95rem;
    padding: 10px 16px;
    padding-left: 40px;
  }
  
  .digital-clock {
    min-width: 200px;
    padding: 16px 20px;
  }
  
  .clock-time {
    font-size: 1.8rem;
  }
  
  .clock-date {
    font-size: 0.8rem;
  }

  .hero-content {
    max-width: 1200px;
    padding: 80px 60px;
  }

  .hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
  }

  .hero-description {
    font-size: 1.4rem;
    line-height: 1.8;
  }

  .section-header h2 {
    font-size: 3rem;
    margin-bottom: 20px;
  }

  .roles-grid,
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
  }

  .role-card,
  .feature-card {
    padding: 40px 30px;
  }

  .role-icon,
  .feature-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
  }

  .dashboard-card {
    padding: 32px;
  }

  .dashboard-card .value {
    font-size: 3rem;
  }

  .charts-container {
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 32px;
  }

  .chart-card {
    padding: 32px;
    min-height: 450px;
  }

  .chart-container {
    height: 400px;
  }

  .table-container {
    font-size: 1.1rem;
  }

  table th,
  table td {
    padding: 20px;
  }

  .modal {
    max-width: 700px;
    padding: 40px;
  }

  .form-container {
    max-width: 700px;
    padding: 40px;
  }
  
  /* Contenedores de módulos */
  .ot-container,
  .bitacora-container,
  .vuelos-container {
    max-width: 1800px;
    padding: 40px 50px;
  }
  
  .ot-header,
  .bitacora-header,
  .vuelos-header {
    margin-bottom: 40px;
  }
  
  .ot-title,
  .bitacora-title,
  .vuelos-title {
    font-size: 2.5rem;
  }

  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2rem; }
  p { font-size: 1.1rem; line-height: 1.8; }

  /* Optimizaciones para TV */
  .landing-header {
    padding: 24px 60px;
  }

  .landing-header nav {
    gap: 32px;
  }

  .nav-link {
    font-size: 1.1rem;
  }

  .btn-accent,
  .btn-secondary {
    font-size: 1.1rem;
    padding: 16px 32px;
  }

  .hero-actions button {
    font-size: 1.15rem;
    padding: 16px 40px;
  }

  .hero-stats {
    gap: 50px;
  }

  .stat-number {
    font-size: 3.5rem;
  }

  .stat-label {
    font-size: 1.1rem;
  }

  .benefits-list {
    max-width: 900px;
  }

  .benefit-item {
    padding: 28px;
  }

  .benefit-item strong {
    font-size: 1.3rem;
  }

  .benefit-item p {
    font-size: 1.1rem;
}

  /* Optimizaciones adicionales para TV */
  body {
    font-size: 1.1rem;
  }

  /* Botones más grandes para control remoto */
  button,
  .btn-accent,
  .btn-secondary,
  a[role="button"] {
    min-height: 48px;
    min-width: 48px;
  }

  /* Mejorar contraste y espaciado */
  .neumorphic {
    padding: 28px 32px;
  }

  .neumorphic-inset {
    padding: 20px 24px;
  }

  /* Asegurar que los modales sean visibles en TV */
  .modal {
    border-radius: var(--radius);
  }

  .modal-header {
    padding: 24px 32px;
  }

  .modal-body {
    padding: 32px;
    font-size: 1.1rem;
  }

  /* Mejorar formularios en TV */
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    outline-width: 3px;
  }

  /* Mejorar tablas en TV */
  table {
    font-size: 1.1rem;
  }

  /* Mejorar listas de tareas en TV */
  .task-list {
    gap: 24px;
  }

  .task-item {
    padding: 24px;
  }

  /* Mejorar gráficos en TV */
  .chart-card h3 {
    font-size: 1.4rem;
  }
}

/* Pantallas Ultra Wide / TV grandes (1921px - 2559px) */
@media (min-width: 1921px) {
  .section {
    max-width: 1800px;
    margin: 120px auto;
    padding: 0 60px 60px;
  }

  .main-content {
    max-width: 2000px;
    padding: 0 60px 60px;
  }

  .hero-content {
    max-width: 1400px;
    padding: 100px 80px;
  }

  .hero h1 {
    font-size: 5rem;
    margin-bottom: 2rem;
  }

  .hero-description {
    font-size: 1.6rem;
    line-height: 1.8;
  }

  .section-header h2 {
    font-size: 3.5rem;
    margin-bottom: 24px;
  }

  .roles-grid,
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
  }

  .role-card,
  .feature-card {
    padding: 50px 40px;
  }

  .role-icon,
  .feature-icon {
    font-size: 4rem;
    margin-bottom: 24px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 40px;
  }

  .dashboard-card {
    padding: 40px;
  }

  .dashboard-card .value {
    font-size: 3.5rem;
  }

  .dashboard-card .label {
    font-size: 1.1rem;
  }

  .charts-container {
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    gap: 40px;
  }

  .chart-card {
    padding: 40px;
    min-height: 500px;
  }

  .chart-container {
    height: 450px;
  }

  .table-container {
    font-size: 1.2rem;
  }

  table th,
  table td {
    padding: 24px;
    font-size: 1.1rem;
  }

  .modal {
    max-width: 800px;
    padding: 50px;
  }

  .form-container {
    max-width: 800px;
    padding: 50px;
  }

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

  .form-group label {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 16px 20px;
    font-size: 1.1rem;
  }

  .btn-accent,
  .btn-secondary {
    font-size: 1.2rem;
    padding: 18px 40px;
  }

  .landing-header {
    padding: 28px 80px;
  }

  .landing-header nav {
    gap: 40px;
  }

  .nav-link {
    font-size: 1.2rem;
    padding: 12px 0;
  }

  .hero-actions button {
    font-size: 1.25rem;
    padding: 18px 50px;
  }

  .hero-stats {
    gap: 60px;
    margin-top: 60px;
  }

  .stat-number {
    font-size: 4rem;
  }

  .stat-label {
    font-size: 1.2rem;
  }

  .benefits-list {
    max-width: 1000px;
  }

  .benefit-item {
    padding: 32px;
    margin-bottom: 32px;
  }

  .benefit-item strong {
    font-size: 1.4rem;
  }

  .benefit-item p {
    font-size: 1.15rem;
    line-height: 1.8;
  }

  h1 { font-size: 3.5rem; }
  h2 { font-size: 3rem; }
  h3 { font-size: 2.5rem; }
  p { font-size: 1.15rem; line-height: 1.8; }
}

/* Pantallas 4K / TV 4K (2560px - 3839px) */
@media (min-width: 2560px) {
  .section {
    max-width: 2200px;
    margin: 140px auto;
    padding: 0 80px 80px;
  }

  .main-content {
    max-width: 2400px;
    padding: 0 80px 80px;
  }
  
  .ribbon-header {
    padding: 0 80px;
  }
  
  .ribbon-menu-item {
    padding: 16px 28px;
    font-size: 1.1rem;
  }
  
  .ribbon-menu-dropdown {
    min-width: 260px;
  }
  
  .ribbon-menu-dropdown-item {
    padding: 14px 28px;
    font-size: 1.05rem;
  }
  
  .ribbon-header-actions {
    padding: 0 40px;
  }
  
  .global-search-input {
    width: 450px;
    font-size: 1.05rem;
    padding: 14px 20px;
    padding-left: 48px;
  }
  
  .digital-clock {
    min-width: 240px;
    padding: 20px 28px;
  }
  
  .clock-time {
    font-size: 2.2rem;
  }
  
  .clock-date {
    font-size: 0.9rem;
  }
  
  /* Contenedores de módulos */
  .ot-container,
  .bitacora-container,
  .vuelos-container {
    max-width: 2400px;
    padding: 60px 80px;
  }
  
  .ot-title,
  .bitacora-title,
  .vuelos-title {
    font-size: 3.5rem;
  }

  .hero-content {
    max-width: 1600px;
    padding: 120px 100px;
  }

  .hero h1 {
    font-size: 6rem;
    margin-bottom: 2.5rem;
  }

  .hero-description {
    font-size: 1.8rem;
    line-height: 1.9;
    max-width: 900px;
  }

  .section-header h2 {
    font-size: 4rem;
    margin-bottom: 32px;
  }

  .roles-grid,
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 48px;
  }

  .role-card,
  .feature-card {
    padding: 60px 50px;
  }

  .role-icon,
  .feature-icon {
    font-size: 5rem;
    margin-bottom: 32px;
  }

  .role-card h3,
  .feature-card h3 {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  .role-card p,
  .feature-card p {
    font-size: 1.2rem;
    line-height: 1.8;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 48px;
  }

  .dashboard-card {
    padding: 50px;
  }

  .dashboard-card h3 {
    font-size: 1.2rem;
    margin-bottom: 24px;
  }

  .dashboard-card .value {
    font-size: 4rem;
  }

  .dashboard-card .label {
    font-size: 1.2rem;
    margin-top: 12px;
  }

  .charts-container {
    grid-template-columns: repeat(auto-fit, minmax(700px, 1fr));
    gap: 48px;
  }

  .chart-card {
    padding: 50px;
    min-height: 600px;
  }

  .chart-card h3 {
    font-size: 1.8rem;
    margin-bottom: 32px;
  }

  .chart-container {
    height: 550px;
  }

  .table-container {
    font-size: 1.3rem;
  }

  table th,
  table td {
    padding: 28px;
    font-size: 1.2rem;
  }

  .modal {
    max-width: 900px;
    padding: 60px;
  }

  .modal-header h3 {
    font-size: 2rem;
  }

  .form-container {
    max-width: 900px;
    padding: 60px;
  }

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

  .form-group label {
    font-size: 1.2rem;
    margin-bottom: 16px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 20px 24px;
    font-size: 1.2rem;
  }

  .btn-accent,
  .btn-secondary {
    font-size: 1.3rem;
    padding: 20px 48px;
  }

  .landing-header {
    padding: 32px 100px;
  }

  .landing-header nav {
    gap: 48px;
  }

  .nav-link {
    font-size: 1.3rem;
    padding: 14px 0;
  }

  .hero-actions button {
    font-size: 1.35rem;
    padding: 20px 60px;
  }

  .hero-stats {
    gap: 80px;
    margin-top: 80px;
  }

  .stat-number {
    font-size: 5rem;
  }

  .stat-label {
    font-size: 1.3rem;
  }

  .benefits-list {
    max-width: 1200px;
  }

  .benefit-item {
    padding: 40px;
    margin-bottom: 40px;
  }

  .benefit-icon {
    font-size: 2.5rem;
  }

  .benefit-item strong {
    font-size: 1.6rem;
    margin-bottom: 16px;
  }

  .benefit-item p {
    font-size: 1.25rem;
    line-height: 1.9;
  }

  h1 { font-size: 4rem; }
  h2 { font-size: 3.5rem; }
  h3 { font-size: 3rem; }
  p { font-size: 1.25rem; line-height: 1.9; }
  .lead { font-size: 1.5rem; }
}

/* Pantallas 8K / TV 8K (3840px en adelante) */
@media (min-width: 3840px) {
  .section {
    max-width: 3000px;
    margin: 160px auto;
    padding: 0 120px 120px;
  }

  .main-content {
    max-width: 3200px;
    padding: 0 120px 120px;
  }
  
  .ribbon-header {
    padding: 0 120px;
  }
  
  .ribbon-menu-item {
    padding: 20px 36px;
    font-size: 1.2rem;
  }
  
  .ribbon-menu-dropdown {
    min-width: 300px;
  }
  
  .ribbon-menu-dropdown-item {
    padding: 16px 36px;
    font-size: 1.1rem;
  }
  
  .ribbon-header-actions {
    padding: 0 60px;
  }
  
  .global-search-input {
    width: 550px;
    font-size: 1.15rem;
    padding: 18px 24px;
    padding-left: 56px;
  }
  
  .digital-clock {
    min-width: 280px;
    padding: 24px 36px;
  }
  
  .clock-time {
    font-size: 2.5rem;
  }
  
  .clock-date {
    font-size: 1rem;
  }
  
  /* Contenedores de módulos */
  .ot-container,
  .bitacora-container,
  .vuelos-container {
    max-width: 3200px;
    padding: 80px 120px;
  }
  
  .ot-title,
  .bitacora-title,
  .vuelos-title {
    font-size: 4rem;
  }

  .hero-content {
    max-width: 2200px;
    padding: 160px 140px;
  }

  .hero h1 {
    font-size: 8rem;
    margin-bottom: 3rem;
  }

  .hero-description {
    font-size: 2.4rem;
    line-height: 2;
    max-width: 1200px;
  }

  .section-header h2 {
    font-size: 5.5rem;
    margin-bottom: 40px;
  }

  .roles-grid,
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    gap: 64px;
  }

  .role-card,
  .feature-card {
    padding: 80px 70px;
  }

  .role-icon,
  .feature-icon {
    font-size: 7rem;
    margin-bottom: 40px;
  }

  .role-card h3,
  .feature-card h3 {
    font-size: 2.8rem;
    margin-bottom: 28px;
  }

  .role-card p,
  .feature-card p {
    font-size: 1.6rem;
    line-height: 1.9;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(550px, 1fr));
    gap: 64px;
  }

  .dashboard-card {
    padding: 70px;
  }

  .dashboard-card h3 {
    font-size: 1.6rem;
    margin-bottom: 32px;
  }

  .dashboard-card .value {
    font-size: 5.5rem;
  }

  .dashboard-card .label {
    font-size: 1.6rem;
    margin-top: 16px;
  }

  .charts-container {
    grid-template-columns: repeat(auto-fit, minmax(900px, 1fr));
    gap: 64px;
  }

  .chart-card {
    padding: 70px;
    min-height: 800px;
  }

  .chart-card h3 {
    font-size: 2.4rem;
    margin-bottom: 40px;
  }

  .chart-container {
    height: 750px;
  }

  .table-container {
    font-size: 1.8rem;
  }

  table th,
  table td {
    padding: 36px;
    font-size: 1.6rem;
  }

  .modal {
    max-width: 1200px;
    padding: 80px;
  }

  .modal-header h3 {
    font-size: 2.8rem;
  }

  .form-container {
    max-width: 1200px;
    padding: 80px;
  }

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

  .form-group label {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 28px 32px;
    font-size: 1.6rem;
  }

  .btn-accent,
  .btn-secondary {
    font-size: 1.8rem;
    padding: 28px 64px;
  }

  .landing-header {
    padding: 40px 140px;
  }

  .landing-header nav {
    gap: 64px;
  }

  .nav-link {
    font-size: 1.8rem;
    padding: 18px 0;
  }

  .hero-actions button {
    font-size: 1.9rem;
    padding: 28px 80px;
  }

  .hero-stats {
    gap: 120px;
    margin-top: 100px;
  }

  .stat-number {
    font-size: 7rem;
  }

  .stat-label {
    font-size: 1.8rem;
  }

  .benefits-list {
    max-width: 1600px;
  }

  .benefit-item {
    padding: 60px;
    margin-bottom: 60px;
  }

  .benefit-icon {
    font-size: 3.5rem;
  }

  .benefit-item strong {
    font-size: 2.2rem;
    margin-bottom: 24px;
  }

  .benefit-item p {
    font-size: 1.7rem;
    line-height: 2;
  }

  h1 { font-size: 5.5rem; }
  h2 { font-size: 4.5rem; }
  h3 { font-size: 4rem; }
  p { font-size: 1.7rem; line-height: 2; }
  .lead { font-size: 2rem; }

  /* Optimizaciones adicionales para TV 8K */
  .logo-text {
    font-size: 2.5rem;
  }

  .task-item {
    padding: 40px;
    font-size: 1.5rem;
  }

  .task-item h4 {
    font-size: 2rem;
  }

  .task-actions button {
    font-size: 1.4rem;
    padding: 16px 32px;
    min-height: 60px;
  }

  .panel-nav a,
  .panel-nav button {
    font-size: 1.3rem;
    padding: 14px 24px;
    min-height: 56px;
  }

  .header-content {
    padding: 20px 60px;
  }

  img[onclick*="showImageModal"] {
    max-width: 200px;
    max-height: 200px;
  }
}


/* Orientación horizontal en móviles */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 30px 20px;
  }

  .hero-content {
    padding: 30px 20px;
  }

  .hero h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  .hero-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-stats {
    margin-top: 20px;
    gap: 20px;
  }
  
  .ribbon-header {
    padding: 8px 12px;
  }
  
  .ribbon-menu-bar {
    max-height: 50px;
    overflow-y: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .ribbon-menu-item {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-height: 36px;
  }
  
  .digital-clock {
    padding: 8px 12px;
    min-width: 140px;
  }
  
  .clock-time {
    font-size: 1.2rem;
  }
  
  .clock-date {
    font-size: 0.65rem;
  }
  
  .main-content {
    padding: 0 16px 20px;
  }
  
  .modal {
    max-height: 90vh;
    padding: 20px 16px;
    max-width: calc(100% - 32px);
  }
  
  /* Header en landscape */
  .header {
    padding: 8px 16px;
  }
  
  .header-content {
    padding: 8px 16px;
  }
  
  /* Mejorar espacio vertical en landscape */
  .section {
    padding: 16px 20px !important;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .charts-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* Tablas más compactas en landscape */
  table {
    font-size: 0.85rem;
  }
  
  table th,
  table td {
    padding: 8px 6px;
  }
}

/* Ajustes para impresión */
@media print {
  .landing-header,
  .header,
  .theme-toggle-label,
  .mobile-menu-toggle,
  .hero-actions,
  .form-actions,
  .modal-overlay {
    display: none !important;
  }

  html, body {
    background: white;
    color: black;
  }

  .section {
    page-break-inside: avoid;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Footer social links */
.footer .social-link {
  color: var(--muted);
  transition: color .2s ease;
}
.footer .social-link:hover,
.footer .social-link:focus {
  color: var(--accent);
  text-decoration: none;
}
.footer .social-link svg {
  display: block;
}

/* Estilos para tabla de inventario */
.inventory-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-dark);
  table-layout: fixed;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Tabla del constructor de inventario (formulario de creación) */
.inventory-builder-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
}

.inventory-builder-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.inventory-builder-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 11;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.inventory-table thead {
  background: var(--bg);
}

.inventory-table th {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.inventory-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.inventory-table tbody tr {
  transition: background-color 0.2s ease;
}

.inventory-table tbody tr:hover {
  background: var(--card-hover) !important;
}

/* Filas con estado OK - estilo normal */
.inventory-row-ok {
  background: transparent;
}

/* Filas con estado BAJO - fondo amarillo suave */
.inventory-row-bajo {
  background: rgba(251, 191, 36, 0.1);
}

.inventory-row-bajo:hover {
  background: rgba(251, 191, 36, 0.15) !important;
}

/* Filas con estado SIN_STOCK - fondo rojo/rosado suave */
.inventory-row-sin_stock {
  background: rgba(239, 68, 68, 0.1);
}

.inventory-row-sin_stock:hover {
  background: rgba(239, 68, 68, 0.15) !important;
}

/* Inputs en tabla de inventario */
.inventory-table input[type="number"],
.inventory-table input[type="text"] {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.inventory-table input[type="number"]:focus,
.inventory-table input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(247, 178, 103, 0.2);
}

/* Tarjetas de items de inventario (formulario de creación) */
.inventory-item-card {
  background: var(--card-hover);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

.inventory-item-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px var(--shadow-dark);
}

/* Responsive para tabla de inventario */
@media (max-width: 1200px) {
  .inventory-item-card > div {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .inventory-table {
    font-size: 0.8rem;
    table-layout: fixed;
  }
  
  .inventory-table th,
  .inventory-table td {
    padding: 8px 4px;
    font-size: 0.75rem;
  }
  
  .inventory-table input[type="number"],
  .inventory-table input[type="text"] {
    font-size: 0.8rem;
    padding: 6px 8px;
    max-width: 100%;
  }
  
  .inventory-table-wrapper {
    padding: 12px !important;
  }
  
  .inventory-item-card > div {
    grid-template-columns: 1fr !important;
  }
  
  .inventory-item-card > div > div {
    grid-template-columns: 1fr !important;
  }
  
  /* Vista de tarea de inventario responsiva */
  .inventory-task-view {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden !important;
  }

  .inventory-layout {
    flex-direction: column !important;
    width: 100% !important;
  }

  .inventory-info-panel {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-right: none !important;
    border-bottom: 2px solid var(--border) !important;
    padding: 20px !important;
    min-width: 0 !important;
  }

  .inventory-content-panel {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    min-width: 0 !important;
  }

  .inventory-stats {
    padding: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .inventory-items-container {
    padding: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .inventory-table-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    padding: 12px !important;
  }

  .inventory-table {
    width: 100% !important;
    table-layout: fixed !important;
  }

  .inventory-save-section {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .inventory-save-btn {
    width: 100% !important;
    justify-content: center !important;
    white-space: normal !important;
    padding: 12px 20px !important;
  }

  /* Asegurar que no haya desbordes */
  .inventory-task-view * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .inventory-layout {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .inventory-info-panel *,
  .inventory-content-panel * {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
  
  .task-item[style*="padding: 0"] h3 {
    font-size: 1.25rem !important;
  }
  
  .task-item[style*="padding: 0"] div[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  
  .task-item[style*="padding: 0"] div[style*="grid-template-columns"] > div {
    padding: 16px !important;
  }
  
  .task-item[style*="padding: 0"] div[style*="grid-template-columns"] > div > div:first-child {
    font-size: 2rem !important;
  }
  
  .task-item[style*="padding: 0"] button.btn-accent {
    width: 100%;
    justify-content: center;
    padding: 12px 20px !important;
    font-size: 0.9rem !important;
  }
  
  .task-item[style*="padding: 0"] div[style*="flex: 1"][style*="overflow-y: auto"] {
    padding: 16px !important;
  }

  /* Sección específica de tareas de usuario */
  .user-tasks-section {
    padding: 16px !important;
    margin: 0 !important;
  }

  .user-task-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
  }
}

/* Responsive adicional para tarjetas de usuario en móviles pequeños */
@media (max-width: 480px) {
  /* Ajustes adicionales para pantallas muy pequeñas */
  .user-tasks-section {
    padding: 12px !important;
  }

  .user-task-list {
    gap: 12px !important;
  }

  .task-item {
    padding: 12px !important;
    gap: 12px !important;
  }

  .task-title {
    font-size: 1rem !important;
  }

  .task-meta {
    font-size: 0.85rem !important;
  }

  .task-meta p {
    font-size: 0.85rem !important;
  }

  .task-item button {
    padding: 10px 12px !important;
    font-size: 0.85rem !important;
  }

  /* Imágenes más pequeñas en móviles muy pequeños */
  .task-item div[style*="display: flex"][style*="gap: 10px"][style*="flex-wrap: wrap"] img,
  .task-item div[style*="display: flex"][style*="gap: 8px"][style*="flex-wrap: wrap"] img {
    width: calc(50% - 4px) !important;
    max-width: calc(50% - 4px) !important;
    min-height: 70px !important;
    max-height: 100px !important;
  }

  /* Comentarios más compactos */
  .task-item div[style*="padding: 12px"][style*="background: var(--card-hover)"] {
    padding: 10px !important;
    font-size: 0.8rem !important;
  }

  .task-item div[style*="margin-bottom: 12px"][style*="padding: 10px"] {
    padding: 8px !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 480px) {
  .inventory-table {
    font-size: 0.75rem;
    min-width: 600px;
  }
  
  .task-item[style*="padding: 0"] div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  .task-item[style*="padding: 0"] div[style*="overflow-x: auto"] {
    margin: 0 -12px;
    padding: 0 12px;
  }

  /* Vista de inventario en móviles pequeños */
  .inventory-task-view {
    margin: 0 !important;
    border-radius: 12px !important;
  }

  .inventory-info-panel {
    padding: 16px !important;
  }

  .inventory-info-panel h3 {
    font-size: 1.1rem !important;
  }

  .inventory-stats {
    padding: 16px !important;
  }

  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .inventory-items-container {
    padding: 16px !important;
  }

  .inventory-table-wrapper {
    padding: 12px !important;
    margin: 0 -12px !important;
    border-radius: 8px !important;
  }

  .inventory-table {
    min-width: 700px !important;
    font-size: 0.8rem !important;
  }

  .inventory-table th,
  .inventory-table td {
    padding: 8px 6px !important;
    font-size: 0.8rem !important;
  }

  .inventory-table input[type="number"],
  .inventory-table input[type="text"] {
    font-size: 0.85rem !important;
    padding: 8px !important;
    max-width: 100px !important;
  }

  .inventory-save-section {
    padding: 16px !important;
    flex-direction: column !important;
  }

  .inventory-save-section > div {
    font-size: 0.8rem !important;
    margin-bottom: 8px !important;
  }

  .inventory-save-btn {
    width: 100% !important;
    font-size: 0.9rem !important;
    padding: 12px 16px !important;
  }

  /* Clase específica para tarjetas de usuario */
  .user-task-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .user-task-card .task-content {
    width: 100% !important;
    max-width: 100% !important;
  }

  .user-task-card .task-meta {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Mejoras generales de responsividad para móviles pequeños */
  .main-content {
    padding: 16px !important;
  }
  
  .section {
    padding: 20px 16px !important;
  }
  
  /* Tablas optimizadas para móviles */
  .table-container {
    margin: 16px -16px;
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    overflow-y: visible;
  }
  
  table {
    min-width: 600px;
    font-size: 0.85rem;
  }
  
  table th,
  table td {
    padding: 10px 8px;
    white-space: nowrap;
  }
  
  /* Formularios optimizados */
  .form-container {
    padding: 20px 16px;
    max-width: 100%;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px !important; /* Previene zoom en iOS */
    padding: 12px 14px;
    min-height: 44px;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .form-actions button {
    width: 100%;
    min-height: 44px;
  }
  
  /* Botones y elementos interactivos */
  button,
  .btn-accent,
  .btn-secondary,
  a.button {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 20px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }
  
  /* Modales optimizados */
  .modal {
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
    margin: 20px 16px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .modal-overlay {
    padding: 0;
  }
  
  /* Cards y contenedores */
  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  
  .charts-container {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  
  .chart-card {
    padding: 16px;
    min-height: 300px;
  }
  
  .chart-container {
    height: 250px;
  }
  
  /* Tipografía mejorada */
  h1 { 
    font-size: 1.75rem !important;
    line-height: 1.3;
  }
  
  h2 { 
    font-size: 1.5rem !important;
    line-height: 1.3;
  }
  
  h3 { 
    font-size: 1.25rem !important;
    line-height: 1.4;
  }
  
  p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  /* Ribbon menu mejorado */
  .ribbon-menu-item {
    padding: 14px 16px !important;
    font-size: 0.95rem !important;
    min-height: 48px;
  }
  
  .ribbon-menu-dropdown {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0;
  }
  
  .ribbon-menu-dropdown-item {
    padding: 14px 16px !important;
    min-height: 48px;
    font-size: 0.95rem;
  }
  
  /* Búsqueda global */
  .global-search-container {
    width: 100%;
    margin-bottom: 12px;
  }
  
  .global-search-input {
    width: 100%;
    font-size: 16px !important; /* Previene zoom en iOS */
    padding: 12px 16px;
    padding-left: 40px;
    min-height: 44px;
  }
  
  .global-search-results {
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
    border-radius: 0;
  }
  
  /* Reloj digital */
  .digital-clock {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
  }
  
  .clock-time {
    font-size: 1.4rem;
  }
  
  .clock-date {
    font-size: 0.7rem;
  }
  
  /* Stats grid */
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  /* Filtros */
  .filters-container {
    padding: 16px;
  }
  
  .filters-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-group label {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }
  
  .filter-group input,
  .filter-group select {
    width: 100%;
    font-size: 16px !important;
    padding: 12px 14px;
    min-height: 44px;
  }
  
  /* Filtros de tareas - Responsive para móvil */
  .tasks-filters-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .tasks-filters-grid > div {
    width: 100%;
  }
  
  .tasks-filters-grid label {
    font-size: 0.95rem !important;
    margin-bottom: 8px !important;
  }
  
  .tasks-filters-grid input,
  .tasks-filters-grid select,
  .tasks-filters-grid button {
    width: 100% !important;
    font-size: 16px !important;
    padding: 12px 16px !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
  }
  
  /* Botón aplicar en móvil - más visible */
  .tasks-filters-grid .btn-accent {
    margin-top: 8px;
    font-weight: 600;
  }

  .user-task-card .task-actions {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ============================================================================
   NAVEGACIÓN MÓVIL - Oculta (usando ribbon original)
   ============================================================================ */

.mobile-bottom-nav {
  display: none !important;
}

/* ============================================================================
   MEJORAS UX MÓVIL - Tarjetas de tareas
   ============================================================================ */

@media (max-width: 768px) {
  /* Tarjetas de tareas más táctiles */
  .task-card,
  .neumorphic {
    padding: 16px !important;
    margin-bottom: 12px;
    border-radius: 16px !important;
  }
  
  /* Botones más grandes y táctiles */
  .btn-primary,
  .btn-secondary,
  .btn-accent {
    min-height: 48px !important;
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
  }
  
  /* Acciones de tarea en grid */
  .task-actions {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-top: 12px !important;
  }
  
  .task-actions button {
    width: 100% !important;
    justify-content: center !important;
  }
  
  /* Headers de sección más compactos */
  .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  
  .section-header h2 {
    font-size: 1.3rem !important;
  }
  
  /* Stats en móvil - más visual */
  .stat-card {
    padding: 16px !important;
    text-align: center;
  }
  
  .stat-value {
    font-size: 2rem !important;
    font-weight: 700 !important;
  }
  
  .stat-label {
    font-size: 0.8rem !important;
  }
  
  /* Formularios más usables */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important; /* Previene zoom en iOS */
    min-height: 48px !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
  }
  
  /* Labels más visibles */
  label {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    display: block !important;
  }
  
  /* Scroll suave */
  .section,
  #app {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Animación de entrada para cards */
  .task-card,
  .stat-card,
  .neumorphic {
    animation: slideUp 0.3s ease-out;
  }
  
  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Loading spinner mejorado */
  .loading {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
  }
  
  .spinner {
    width: 40px !important;
    height: 40px !important;
  }
  
  /* Paginación más táctil */
  .pagination-btn,
  [onclick*="goToPage"] {
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 10px 16px !important;
  }
  
  /* FAB (Floating Action Button) para crear tarea */
  .fab-create-task {
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
    color: white !important;
    font-size: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.4) !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 999 !important;
    transition: all 0.3s ease !important;
  }
  
  .fab-create-task:active {
    transform: scale(0.95) !important;
  }
  
  /* Ocultar botón crear en header cuando hay FAB */
  .section-header [onclick*="showTaskForm"],
  .section-header [onclick*="createTask"] {
    display: none !important;
  }
}

/* ============================================================================
   MEJORAS PARA TABLETS
   ============================================================================ */

@media (min-width: 769px) and (max-width: 1024px) {
  .mobile-bottom-nav {
    display: none;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .task-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ============================================================================
   DARK MODE AJUSTES MÓVIL
   ============================================================================ */

@media (max-width: 768px) {
  [data-theme="dark"] .mobile-bottom-nav {
    background: var(--card);
    border-top-color: var(--border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  }
  
  [data-theme="dark"] .mobile-nav-icon {
    background: rgba(255, 255, 255, 0.05);
  }
  
  [data-theme="dark"] .mobile-more-menu {
    background: var(--card);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
  }
  
  [data-theme="dark"] .mobile-more-item:hover {
    background: rgba(255, 255, 255, 0.05);
  }
}

/* ============================================================================
   MEJORAS UX/UI PARA CADA VISTA EN MÓVIL
   ============================================================================ */

@media (max-width: 768px) {
  /* ==================== VISTA TAREAS ==================== */
  .task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .task-item {
    display: flex;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 16px !important;
    background: var(--card);
    border-radius: 16px !important;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    gap: 12px;
    transition: all 0.2s ease;
  }
  
  .task-item:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }
  
  .task-checkbox {
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    accent-color: var(--accent);
  }
  
  .task-content {
    width: 100% !important;
  }
  
  .task-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
  }
  
  .task-meta {
    font-size: 0.85rem !important;
    color: var(--muted);
    line-height: 1.5;
  }
  
  .task-meta small {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  
  /* Badges de prioridad y tipo */
  .task-item [style*="border-radius: 12px"] {
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
    margin-bottom: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  
  /* ==================== VISTA DASHBOARD ==================== */
  .stats-grid,
  .neumorphic-widgets-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  
  .stat-card,
  .neumorphic-widget {
    padding: 16px !important;
    border-radius: 16px !important;
    text-align: center;
  }
  
  .stat-card .stat-icon,
  .neumorphic-widget-icon {
    font-size: 2rem !important;
    margin-bottom: 8px !important;
  }
  
  .stat-value {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .stat-label {
    font-size: 0.75rem !important;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  /* Widget de bienvenida full width */
  .welcome-widget,
  .neumorphic-widget.welcome {
    grid-column: 1 / -1 !important;
  }
  
  /* ==================== VISTA KANBAN ==================== */
  .kanban-board {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding-bottom: 20px;
  }
  
  .kanban-column {
    min-width: 100% !important;
    width: 100% !important;
    border-radius: 16px !important;
    padding: 12px !important;
  }
  
  .kanban-column-header {
    padding: 12px !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    font-weight: 600 !important;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .kanban-card {
    padding: 14px !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  }
  
  .kanban-card:active {
    transform: scale(0.98);
  }
  
  /* ==================== VISTA CALENDARIO ==================== */
  .calendar-container {
    padding: 12px !important;
  }
  
  .calendar-header {
    flex-direction: column !important;
    gap: 12px !important;
    text-align: center;
  }
  
  .calendar-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }
  
  .calendar-nav button {
    flex: 1;
    min-height: 44px !important;
  }
  
  .calendar-grid {
    font-size: 0.85rem !important;
  }
  
  .calendar-day {
    min-height: 60px !important;
    padding: 4px !important;
    border-radius: 8px !important;
  }
  
  .calendar-day-number {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
  }
  
  .calendar-event {
    font-size: 0.65rem !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* ==================== VISTA USUARIOS ==================== */
  .users-list,
  .user-cards {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  .user-card {
    padding: 16px !important;
    border-radius: 16px !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .user-avatar {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.2rem !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
  }
  
  .user-info {
    flex: 1;
  }
  
  .user-name {
    font-size: 1rem !important;
    font-weight: 600 !important;
  }
  
  .user-email {
    font-size: 0.85rem !important;
    color: var(--muted);
  }
  
  .user-actions {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100%;
  }
  
  .user-actions button {
    width: 100% !important;
    justify-content: center !important;
  }
  
  /* ==================== VISTA REPORTES ==================== */
  .reports-container {
    padding: 12px !important;
  }
  
  .report-card {
    padding: 16px !important;
    border-radius: 16px !important;
    margin-bottom: 12px;
  }
  
  .report-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .report-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
  }
  
  .report-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  
  /* Charts responsivos */
  .chart-container {
    height: 250px !important;
    margin: 16px 0;
  }
  
  canvas {
    max-height: 250px !important;
  }
  
  /* ==================== VISTA CONFIGURACIÓN ==================== */
  .settings-section {
    padding: 16px !important;
    border-radius: 16px !important;
    margin-bottom: 16px;
  }
  
  .settings-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  
  .settings-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  
  .settings-item:last-child {
    border-bottom: none;
  }
  
  .settings-label {
    font-weight: 500;
    font-size: 0.95rem;
  }
  
  .settings-description {
    font-size: 0.8rem;
    color: var(--muted);
  }
  
  /* Toggle switches más táctiles */
  .toggle-switch {
    width: 52px !important;
    height: 28px !important;
  }
  
  .toggle-slider {
    width: 24px !important;
    height: 24px !important;
  }
  
  /* ==================== VISTA AVANCES/PROGRESS ==================== */
  .progress-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .progress-item {
    padding: 16px !important;
    border-radius: 16px !important;
    background: var(--card);
    border: 1px solid var(--border);
  }
  
  .progress-images {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin-top: 12px;
  }
  
  .progress-images img {
    width: 100% !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
  }
  
  /* ==================== CENTRO V2.6 ==================== */
  .v26-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .v26-card {
    padding: 16px !important;
    border-radius: 16px !important;
  }
  
  .v26-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  
  .v26-card-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 12px;
  }
  
  .v26-card-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
  }
  
  .v26-card-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin-top: 12px;
  }
  
  /* ==================== MODALES EN MÓVIL - DRAWER STYLE ==================== */
  .modal-content,
  .modal-overlay > div[class*="neumorphic"],
  #tags-manager-modal > div,
  #saved-filters-modal > div,
  #reminders-settings-modal > div,
  #export-modal > div {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 85vh !important;
    margin: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    transform: translateY(0) !important;
    animation: slideUpDrawer 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    padding: 0 !important;
    overflow: hidden;
  }
  
  @keyframes slideUpDrawer {
    from {
      transform: translateY(100%);
      opacity: 0.8;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  /* Drawer handle indicator */
  .modal-content::before,
  .modal-overlay > div[class*="neumorphic"]::before,
  #tags-manager-modal > div::before,
  #saved-filters-modal > div::before,
  #reminders-settings-modal > div::before,
  #export-modal > div::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    z-index: 100;
  }
  
  .modal-header {
    padding: 24px 20px 16px !important;
    border-radius: 24px 24px 0 0 !important;
    position: sticky;
    top: 0;
    background: var(--card);
    z-index: 10;
    border-bottom: 1px solid var(--border);
  }
  
  .modal-header h2,
  .modal-header h3 {
    font-size: 1.1rem !important;
    text-align: center;
  }
  
  .modal-body {
    padding: 16px 20px !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(85vh - 140px);
  }
  
  .modal-footer {
    padding: 16px 20px !important;
    padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    position: sticky;
    bottom: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
  }
  
  /* ==================== TAGS MANAGER MOBILE ==================== */
  #tags-manager-modal .modal-body,
  #tags-manager-modal > div > div:not(:first-child):not(:last-child) {
    padding: 16px !important;
  }
  
  #tags-manager-modal input[type="text"],
  #tags-manager-modal input[type="color"] {
    height: 48px !important;
    font-size: 16px !important;
    border-radius: 12px !important;
  }
  
  #tags-manager-modal .tag-item,
  .tag-list-item {
    padding: 14px 16px !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg);
    border: 1px solid var(--border);
  }
  
  #tags-manager-modal button,
  .tag-action-btn {
    min-height: 44px !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
  }
  
  /* ==================== SAVED FILTERS MOBILE ==================== */
  #saved-filters-modal .filter-item,
  .saved-filter-card {
    padding: 16px !important;
    border-radius: 14px !important;
    margin-bottom: 10px !important;
    background: var(--bg);
    border: 1px solid var(--border);
  }
  
  #saved-filters-modal input[type="text"] {
    height: 48px !important;
    font-size: 16px !important;
    border-radius: 12px !important;
  }
  
  .saved-filter-card .filter-name {
    font-size: 1rem !important;
    font-weight: 600;
    margin-bottom: 6px;
  }
  
  .saved-filter-card .filter-criteria {
    font-size: 0.85rem;
    color: var(--muted);
  }
  
  /* ==================== REMINDERS SETTINGS MOBILE ==================== */
  #reminders-settings-modal .reminder-option,
  .reminder-setting-item {
    padding: 16px !important;
    border-radius: 14px !important;
    margin-bottom: 10px !important;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  #reminders-settings-modal label {
    font-size: 0.95rem !important;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
  }
  
  #reminders-settings-modal input[type="checkbox"],
  #reminders-settings-modal input[type="radio"] {
    width: 22px !important;
    height: 22px !important;
    accent-color: var(--accent);
  }
  
  #reminders-settings-modal select,
  #reminders-settings-modal input[type="time"],
  #reminders-settings-modal input[type="number"] {
    height: 48px !important;
    font-size: 16px !important;
    border-radius: 12px !important;
    padding: 0 16px !important;
  }
  
  /* ==================== EXPORT MODAL MOBILE ==================== */
  #export-modal button {
    min-height: 56px !important;
    border-radius: 14px !important;
    font-size: 1rem !important;
  }
  
  #export-modal details {
    background: var(--bg);
    border-radius: 12px;
    padding: 12px;
    margin-top: 16px;
  }
  
  #export-modal details summary {
    padding: 8px;
    font-weight: 600;
  }
  
  /* ==================== COMMON MOBILE MODAL IMPROVEMENTS ==================== */
  .modal-overlay {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  
  /* Close button positioning */
  .modal-close-btn,
  .modal-header button[onclick*="remove"],
  .modal-header button[onclick*="close"] {
    position: absolute !important;
    right: 16px !important;
    top: 20px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: var(--bg) !important;
    border: 1px solid var(--border) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem !important;
  }
  
  /* Form inputs in modals */
  .modal-content input[type="text"],
  .modal-content input[type="email"],
  .modal-content input[type="number"],
  .modal-content select,
  .modal-content textarea {
    height: 48px !important;
    font-size: 16px !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    background: var(--bg) !important;
    border: 2px solid var(--border) !important;
    transition: border-color 0.2s ease;
  }
  
  .modal-content input:focus,
  .modal-content select:focus,
  .modal-content textarea:focus {
    border-color: var(--accent) !important;
    outline: none !important;
  }
  
  .modal-content textarea {
    height: auto !important;
    min-height: 100px !important;
  }
  
  /* Action buttons in modals */
  .modal-content .btn-primary,
  .modal-content .btn-accent {
    min-height: 50px !important;
    border-radius: 14px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
  }
  
  .modal-content .btn-secondary,
  .modal-content .btn-muted {
    min-height: 46px !important;
    border-radius: 12px !important;
  }
  
  /* ==================== FILTROS COLAPSABLES ==================== */
  .filters-container {
    background: var(--card);
    border-radius: 16px !important;
    margin-bottom: 16px;
    overflow: hidden;
  }
  
  .filters-toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg);
    border: none;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
  }
  
  .filters-toggle::after {
    content: '▼';
    font-size: 0.75rem;
    transition: transform 0.3s ease;
  }
  
  .filters-toggle.active::after {
    transform: rotate(180deg);
  }
  
  .filters-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 16px;
  }
  
  .filters-content.active {
    max-height: 500px;
    padding: 16px;
  }
  
  /* ==================== EMPTY STATES ==================== */
  .empty-state {
    text-align: center;
    padding: 40px 20px !important;
  }
  
  .empty-state-icon {
    font-size: 3rem !important;
    margin-bottom: 16px;
    opacity: 0.5;
  }
  
  .empty-state-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-bottom: 8px;
  }
  
  .empty-state-description {
    font-size: 0.9rem !important;
    color: var(--muted);
    margin-bottom: 20px;
  }
  
  /* ==================== PULL TO REFRESH INDICATOR ==================== */
  .pull-indicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    padding: 12px 20px;
    background: var(--accent);
    color: white;
    border-radius: 0 0 12px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 1001;
    transition: transform 0.3s ease;
  }
  
  .pull-indicator.visible {
    transform: translateX(-50%) translateY(0);
  }
  
  /* ==================== SKELETON LOADING ==================== */
  .skeleton {
    background: linear-gradient(90deg, var(--bg) 25%, var(--border) 50%, var(--bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
  }
  
  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  
  .skeleton-card {
    height: 120px;
    margin-bottom: 12px;
    border-radius: 16px;
  }
  
  .skeleton-stat {
    height: 80px;
    border-radius: 16px;
  }
  
  .skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    width: 80%;
  }
  
  .skeleton-text.short {
    width: 50%;
  }
}

/* ==================== CALENDAR VIEW - MOBILE OPTIMIZED ==================== */
.calendar-view-mobile {
  padding: 12px;
}

.calendar-view-mobile .calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--card) 0%, rgba(255,255,255,0.95) 100%);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

[data-theme="dark"] .calendar-view-mobile .calendar-header {
  background: linear-gradient(135deg, var(--card) 0%, rgba(30,30,35,0.95) 100%);
}

.calendar-view-mobile .calendar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.calendar-view-mobile .calendar-nav {
  display: flex;
  gap: 8px;
}

.calendar-view-mobile .calendar-nav-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-view-mobile .calendar-nav-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.calendar-view-mobile .calendar-grid {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.calendar-view-mobile .calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: linear-gradient(135deg, var(--accent) 0%, #e85d04 100%);
  padding: 12px 0;
}

.calendar-view-mobile .calendar-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-view-mobile .calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 8px;
  background: var(--border);
}

.calendar-view-mobile .calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 2px;
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 50px;
}

.calendar-view-mobile .calendar-day:hover {
  background: rgba(232, 93, 4, 0.1);
}

.calendar-view-mobile .calendar-day.today {
  background: linear-gradient(135deg, var(--accent) 0%, #e85d04 100%);
}

.calendar-view-mobile .calendar-day.today .day-number {
  color: white;
}

.calendar-view-mobile .calendar-day.other-month {
  opacity: 0.4;
}

.calendar-view-mobile .calendar-day.selected {
  box-shadow: 0 0 0 2px var(--accent);
}

.calendar-view-mobile .day-number {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.calendar-view-mobile .day-events {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
}

.calendar-view-mobile .day-event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.calendar-view-mobile .day-event-dot.completed {
  background: #28a745;
}

.calendar-view-mobile .day-event-dot.high {
  background: #dc3545;
}

/* Legend for calendar */
.calendar-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.calendar-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}

.calendar-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.calendar-legend-dot.pending { background: var(--accent); }
.calendar-legend-dot.completed { background: #28a745; }
.calendar-legend-dot.high { background: #dc3545; }

/* Selected day events panel */
.calendar-events-panel {
  margin-top: 16px;
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.calendar-events-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-event-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 10px;
  margin-bottom: 8px;
  border-left: 4px solid var(--accent);
  transition: all 0.2s ease;
}

.calendar-event-card:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.calendar-event-card.completed {
  border-left-color: #28a745;
  opacity: 0.7;
}

.calendar-event-card.high {
  border-left-color: #dc3545;
}

.calendar-event-info {
  flex: 1;
}

.calendar-event-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.calendar-event-time {
  font-size: 0.75rem;
  color: var(--muted);
}

.calendar-event-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.calendar-event-status.pending {
  background: rgba(232, 93, 4, 0.15);
  color: var(--accent);
}

.calendar-event-status.completed {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
}

.calendar-no-events {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.calendar-no-events-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* ==================== TASK FILTERS SECTION - MODERN UI ==================== */
.task-filters-card {
  background: linear-gradient(135deg, var(--card) 0%, rgba(255,255,255,0.95) 100%);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

[data-theme="dark"] .task-filters-card {
  background: linear-gradient(135deg, var(--card) 0%, rgba(30,30,35,0.95) 100%);
}

.task-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.task-filters-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-filters-title-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent) 0%, #e85d04 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Search bar */
.task-search-container {
  position: relative;
  margin-bottom: 20px;
}

.task-search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.task-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(232, 93, 4, 0.15);
}

.task-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.1rem;
}

/* Filter chips row */
.task-filters-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.task-filter-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  color: var(--text);
  min-width: 120px;
}

.task-filter-chip:hover {
  border-color: var(--accent);
  background: rgba(232, 93, 4, 0.05);
}

.task-filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.task-filter-chip select {
  background: transparent;
  border: none;
  color: inherit;
  font-size: inherit;
  cursor: pointer;
  padding-right: 8px;
  flex: 1;
  min-width: 0;
}

.task-filter-chip select:focus {
  outline: none;
}

.task-filter-chip-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Active filters tags */
.task-active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px dashed var(--border);
  margin-top: 8px;
}

.task-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--accent) 0%, #e85d04 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.task-filter-tag-close {
  background: rgba(255,255,255,0.3);
  border: none;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.2s ease;
}

.task-filter-tag-close:hover {
  background: rgba(255,255,255,0.5);
}

/* Action buttons toolbar */
.task-actions-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.task-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.task-action-btn:hover {
  background: var(--card);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.task-action-btn-icon {
  font-size: 1rem;
}

/* Apply button */
.task-apply-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent) 0%, #e85d04 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(232, 93, 4, 0.3);
}

.task-apply-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 93, 4, 0.4);
}

/* Clear all button */
.task-clear-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.task-clear-btn:hover {
  border-color: #dc3545;
  color: #dc3545;
  background: rgba(220, 53, 69, 0.05);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .task-filters-card {
    padding: 16px;
    border-radius: 12px;
  }
  
  .task-filters-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .task-filters-row {
    flex-direction: column;
  }
  
  .task-filter-chip {
    width: 100%;
    justify-content: space-between;
  }
  
  .task-actions-toolbar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .task-action-btn {
    justify-content: center;
    padding: 12px;
  }
}
