/* ==========================================================================
   SISTEMA DE DISEÑO PREMIUM TECH - CEMESA ELECTRÓNICA
   Estilos Híbridos (Fondo Oscuro Tecnológico + Secciones de Contenido Limpias)
   ========================================================================== */

:root {
  /* Color Palette (Basada en CEMESA_LOGO.jpg) */
  --bg-dark-deep: #000f3c;      /* Azul marino muy oscuro original */
  --bg-dark-card: #081a4a;      /* Azul marino oscuro de tarjeta original */
  --bg-dark-hover: #0c2662;     /* Azul pizarra oscuro original */
  --bg-light-pure: #ffffff;     /* Blanco puro */
  --bg-light-sec: #f4f6fa;      /* Gris azulado muy claro */
  --bg-light-ter: #e8ecf4;      /* Gris pizarra claro */
  
  --accent-primary: #0f5a96;    /* Azul Acero original de CEMESA */
  --accent-primary-rgb: 15, 90, 150;
  --accent-secondary: #3cb4c3;  /* Cyan Digital original de CEMESA */
  --accent-secondary-rgb: 60, 180, 195;
  --accent-glow: rgba(15, 90, 150, 0.08);
  --accent-amber: #f59e0b;      /* Ámbar de aviso/destacado */
  
  --text-dark-pure: #000f3c;    /* Utiliza el azul marino muy oscuro del logo */
  --text-dark-silver: #1a2c56;  /* Tono oscuro medio */
  --text-dark-muted: #4e618d;   /* Tono oscuro apagado */
  --text-light-pure: #ffffff;   /* Blanco puro */
  --text-light-silver: #cbd5e1; /* Plata */
  --text-light-muted: #94a3b8;  /* Plata Apagado */
  
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);

  /* Borders, Shadow & Radii */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
  
  --shadow-premium: 0 15px 35px -5px rgba(15, 23, 42, 0.06), 0 5px 15px -5px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 25px 50px -12px rgba(37, 99, 235, 0.16);
  --shadow-dark: 0 20px 40px rgba(0, 0, 0, 0.3);
  
  --border-light-glass: 1px solid rgba(15, 23, 42, 0.06);
  --border-dark-glass: 1px solid rgba(255, 255, 255, 0.08);
  --border-active: 1px solid rgba(37, 99, 235, 0.25);

  /* Transitions */
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;
}

/* ==========================================================================
   RESET & LAYOUT BASE
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-dark-silver);
  background-color: var(--bg-light-pure);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-dark-pure);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 90px 0;
  position: relative;
}

/* Margen de utilidad */
.margin-top-xs { margin-top: 10px; }
.margin-top-sm { margin-top: 20px; }
.margin-top-md { margin-top: 40px; }

/* ==========================================================================
   ESTILOS DE CABECERA Y MENU DE NAVEGACIÓN
   ========================================================================== */

.topbar {
  background-color: var(--bg-light-sec);
  border-bottom: var(--border-light-glass);
  padding: 8px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark-muted);
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-right a:hover {
  color: var(--accent-primary);
}

.topbar .separator {
  color: var(--text-dark-muted);
  opacity: 0.4;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: var(--border-light-glass);
  transition: var(--transition-smooth);
}

header.scrolled {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  background-color: rgba(255, 255, 255, 0.95);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 86px;
}

.brand {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.logo-img-footer {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
}

header nav a {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark-silver);
  position: relative;
  padding: 6px 0;
}

header nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2.5px;
  background: var(--accent-primary);
  border-radius: var(--radius-pill);
  transition: var(--transition-fast);
}

header nav a:hover {
  color: var(--accent-primary);
}

header nav a:hover::after, header nav a.active::after {
  width: 100%;
}

header nav a.active {
  color: var(--accent-primary);
}

header nav a.portal-link {
  background: rgba(15, 90, 150, 0.08);
  color: var(--accent-primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 90, 150, 0.15);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

header nav a.portal-link:hover {
  background: var(--accent-primary);
  color: var(--text-light-pure) !important;
}

header nav a.portal-link::after {
  display: none;
}

header nav a.portal-link svg {
  transition: var(--transition-fast);
}

header nav a.portal-link:hover svg {
  transform: scale(1.1);
}


.mobile-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: var(--text-dark-pure);
  cursor: pointer;
  padding: 6px;
}

/* Premium Language Selector Pill */
.lang-switcher-pill {
  position: relative;
  display: inline-flex;
  background: var(--bg-light-ter);
  border-radius: var(--radius-pill);
  padding: 3px;
  border: var(--border-light-glass);
  width: 90px;
  height: 36px;
}

.lang-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dark-muted);
  height: 100%;
  border-radius: var(--radius-pill);
  transition: var(--transition-smooth);
}

.lang-btn.active {
  color: var(--bg-light-pure);
}

.lang-slider-bg {
  position: absolute;
  top: 3px;
  left: 3px;
  height: 30px;
  width: 41px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  border-radius: var(--radius-pill);
  z-index: 1;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.lang-slider-bg.ca {
  transform: translateX(43px);
}

/* ==========================================================================
   BOTONES Y ESTILOS COMUNES
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: var(--bg-light-pure);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.12);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(37, 99, 235, 0.22);
}

.btn-secondary {
  background: transparent;
  color: var(--text-dark-pure);
  border: 1.5px solid var(--text-dark-muted);
}

.btn-secondary:hover {
  background: var(--bg-light-ter);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--bg-dark-card);
  color: var(--text-light-pure);
  border: var(--border-dark-glass);
}

.btn-dark:hover {
  background: var(--bg-dark-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  background: var(--accent-glow);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px auto;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--text-dark-pure);
  margin-bottom: 16px;
}

.section-head p {
  font-size: 17px;
  color: var(--text-dark-muted);
}

/* ==========================================================================
   SECCIÓN HERO (OSCURA Y TECNOLÓGICA)
   ========================================================================== */

.hero {
  background-color: var(--bg-dark-deep);
  color: var(--text-light-pure);
  padding: 140px 0;
  position: relative;
  overflow: hidden;
  min-height: 650px;
  display: flex;
  align-items: center;
}

/* Red de circuitos decorativa */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 45px 45px, 45px 45px;
  pointer-events: none;
  z-index: 3;
}

/* Full Photo Overlay */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 15, 60, 0.94) 0%, rgba(0, 15, 60, 0.65) 60%, rgba(0, 15, 60, 0.85) 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 4;
  width: 100%;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 5;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 54px);
  color: var(--text-light-pure);
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--text-light-silver);
  margin-bottom: 36px;
  max-width: 650px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Slideshow Hero Background */
.hero-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s ease-in-out;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.65) contrast(1.05);
}

.hero-slider-dots {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
  background: rgba(0, 15, 60, 0.65);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(10px);
  border: var(--border-dark-glass);
}

.slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.slider-dot.active {
  background: var(--accent-secondary);
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}


/* ==========================================================================
   METRICS BAR (BARRA DE CONFIANZA)
   ========================================================================== */

.metrics-section {
  padding: 30px 0;
  background: var(--bg-light-sec);
  border-bottom: var(--border-light-glass);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
}

.metric-item:last-child {
  border-right: none;
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-info strong {
  display: block;
  font-size: 22px;
  color: var(--text-dark-pure);
  line-height: 1.1;
}

.metric-info span {
  font-size: 13px;
  color: var(--text-dark-muted);
}

/* ==========================================================================
   SECCIÓN DE CATEGORÍAS DE PRODUCTO
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--bg-light-pure);
  border: var(--border-light-glass);
  border-radius: var(--radius-md);
  padding: 36px 30px;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(37, 99, 235, 0.15);
}

.service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.service-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--accent-glow);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  background: var(--bg-light-ter);
  color: var(--text-dark-muted);
  border-radius: var(--radius-pill);
}

.service-badge.featured {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
}

.service-card h3 {
  font-size: 21px;
  margin-bottom: 12px;
  color: var(--text-dark-pure);
}

.service-card p {
  font-size: 14.5px;
  color: var(--text-dark-silver);
  margin-bottom: 24px;
  flex-grow: 1;
}

.service-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.service-card-list li {
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dark-silver);
}

.service-card-list svg {
  color: var(--success);
  flex-shrink: 0;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-primary);
}

.service-card:hover .service-card-link {
  color: var(--accent-secondary);
}

/* ==========================================================================
   SECCIÓN DE MARCAS ASOCIADAS (PARTNERS)
   ========================================================================== */

.partners-section {
  background: var(--bg-light-sec);
  border-top: var(--border-light-glass);
  border-bottom: var(--border-light-glass);
  padding: 50px 0;
  overflow: hidden;
}

.partners-slider-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.partners-slider {
  display: flex;
  width: max-content;
  animation: ticker 30s linear infinite;
  gap: 80px;
  align-items: center;
  flex-wrap: nowrap;
}

/* Pause animation on hover */
.partners-slider-wrapper:hover .partners-slider {
  animation-play-state: paused;
}

.partner-brand-item {
  font-family: 'Outfit', sans-serif;
  font-size: 21px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dark-muted);
  opacity: 0.55;
  transition: var(--transition-smooth);
  user-select: none;
  white-space: nowrap;
  cursor: default;
}

.partner-brand-item:hover {
  color: var(--accent-primary);
  opacity: 0.95;
  transform: scale(1.08);
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   PORTAL DEL INSTALADOR (INTERACTIVO Y MOCK CON ESTILO DE SISTEMA/APP)
   ========================================================================== */

.portal-section {
  background-color: var(--bg-dark-deep);
  color: var(--text-light-pure);
  padding: 100px 0;
  position: relative;
}

.portal-container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.portal-info h2 {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--text-light-pure);
  margin-bottom: 20px;
}

.portal-info h2 span {
  color: var(--accent-secondary);
}

.portal-info p {
  color: var(--text-light-silver);
  font-size: 16px;
  margin-bottom: 30px;
}

.portal-info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}

.portal-info-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14.5px;
}

.portal-info-list li svg {
  color: var(--accent-secondary);
  flex-shrink: 0;
  margin-top: 3px;
}

.portal-info-list strong {
  display: block;
  color: var(--text-light-pure);
  margin-bottom: 2px;
}

.portal-info-list span {
  color: var(--text-light-muted);
}

/* Caja de la Aplicación Mock */
.portal-app-wrapper {
  background: var(--bg-dark-card);
  border-radius: var(--radius-lg);
  border: var(--border-dark-glass);
  box-shadow: var(--shadow-dark);
  overflow: hidden;
  position: relative;
}

.portal-app-header {
  background: rgba(7, 11, 22, 0.6);
  padding: 16px 24px;
  border-bottom: var(--border-dark-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-title-flex {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.app-title-text {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light-muted);
}

.app-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.app-status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--text-light-muted);
  border-radius: 50%;
}

.app-status-badge.online::before {
  background: var(--success);
}

.app-status-badge.online {
  color: var(--success);
  background: var(--success-bg);
}

/* Pantallas del Portal */
.portal-screen {
  padding: 40px;
  display: none;
}

.portal-screen.active {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Formulario de Login */
.login-screen h3 {
  color: var(--text-light-pure);
  font-size: 22px;
  margin-bottom: 8px;
}

.login-screen p {
  color: var(--text-light-muted);
  font-size: 13.5px;
  margin-bottom: 24px;
}

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

.form-group-dark label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light-silver);
  margin-bottom: 8px;
}

.input-dark {
  width: 100%;
  background: rgba(7, 11, 22, 0.5);
  border: var(--border-dark-glass);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-light-pure);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: var(--transition-fast);
}

.input-dark:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.15);
}

/* Pantalla del Dashboard (Panel de Control de stock/pedidos) */
.dashboard-screen {
  padding: 30px;
}

.dashboard-user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: var(--border-dark-glass);
}

.user-info strong {
  display: block;
  font-size: 15px;
  color: var(--text-light-pure);
}

.user-info span {
  font-size: 12px;
  color: var(--text-light-muted);
}

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

.widget-box {
  background: rgba(7, 11, 22, 0.3);
  border: var(--border-dark-glass);
  border-radius: var(--radius-md);
  padding: 20px;
}

.widget-box h4 {
  font-size: 14px;
  color: var(--text-light-silver);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-stock-box {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-stock-box .input-dark {
  flex-grow: 1;
}

/* Lista de resultados de stock */
.stock-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 190px;
  overflow-y: auto;
}

.stock-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: var(--border-dark-glass);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.stock-item-info strong {
  display: block;
  color: var(--text-light-pure);
}

.stock-item-info span {
  font-size: 11px;
  color: var(--text-light-muted);
}

.stock-status {
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.stock-status.in-stock {
  background: var(--success-bg);
  color: var(--success);
}

.stock-status.low-stock {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
}

.stock-status.out-stock {
  background: var(--danger-bg);
  color: var(--danger);
}

/* Muestra de pedidos */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.02);
  border: var(--border-dark-glass);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.order-id {
  color: var(--text-light-pure);
  font-weight: 600;
}

.order-status {
  font-size: 11px;
  font-weight: 700;
}

.order-status.delivered { color: var(--success); }
.order-status.pending { color: var(--accent-amber); }

/* ==========================================================================
   FORMULARIO DE CONTACTO / PRESUPUESTO
   ========================================================================== */

.contact-section {
  background: var(--bg-light-pure);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
}

.contact-info-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-card {
  background: var(--bg-light-sec);
  border: var(--border-light-glass);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-card-text h3 {
  font-size: 16px;
  color: var(--text-dark-pure);
  margin-bottom: 6px;
}

.contact-card-text p, .contact-card-text a {
  font-size: 14px;
  color: var(--text-dark-silver);
}

.contact-card-text a:hover {
  color: var(--accent-primary);
}

/* Formulario */
.contact-form-wrapper {
  background: var(--bg-light-pure);
  border: var(--border-light-glass);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-premium);
}

.contact-form-wrapper h3 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--text-dark-pure);
}

.contact-form-wrapper p {
  font-size: 14.5px;
  color: var(--text-dark-muted);
  margin-bottom: 30px;
}

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

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

.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark-pure);
  margin-bottom: 8px;
}

.form-control, .form-textarea {
  width: 100%;
  background: var(--bg-light-sec);
  border: var(--border-light-glass);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-dark-pure);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus, .form-textarea:focus {
  background: var(--bg-light-pure);
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.08);
}

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

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-dark-muted);
  cursor: pointer;
  margin-bottom: 24px;
}

.checkbox-label input {
  margin-top: 3px;
  accent-color: var(--accent-primary);
}

.checkbox-label a {
  text-decoration: underline;
}

/* ==========================================================================
   SECCIÓN EMPRESA (PÁGINA SECUNDARIA)
   ========================================================================== */

.page-hero {
  background: linear-gradient(135deg, var(--bg-dark-deep) 0%, #0c152a 100%);
  color: var(--text-light-pure);
  padding: 80px 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  color: var(--text-light-pure);
  margin-bottom: 12px;
}

.page-hero p {
  color: var(--text-light-silver);
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto;
}

.empresa-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.empresa-info h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--text-dark-pure);
}

.empresa-info p {
  font-size: 15.5px;
  color: var(--text-dark-silver);
  margin-bottom: 16px;
}

.empresa-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
  background: var(--bg-light-sec);
  border-radius: var(--radius-md);
  padding: 24px;
  border: var(--border-light-glass);
}

.empresa-stat-item h3 {
  font-size: 32px;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.empresa-stat-item p {
  font-size: 13.5px;
  color: var(--text-dark-muted);
  margin-bottom: 0;
}

.empresa-img-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  border: var(--border-light-glass);
}

.valores-section {
  background: var(--bg-light-sec);
  border-top: var(--border-light-glass);
}

.valores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.valor-card {
  background: var(--bg-light-pure);
  border: var(--border-light-glass);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-premium);
}

.valor-card h3 {
  font-size: 18px;
  color: var(--text-dark-pure);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.valor-card h3 svg {
  color: var(--accent-primary);
}

.valor-card p {
  font-size: 14px;
  color: var(--text-dark-silver);
}

/* ==========================================================================
   PIE DE PÁGINA (FOOTER)
   ========================================================================== */

footer {
  background: var(--bg-dark-deep);
  color: var(--text-light-pure);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 80px 0 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.5fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-col-brand .footer-desc {
  font-size: 13.5px;
  color: var(--text-light-muted);
  margin-top: 18px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.footer-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-badges .badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-dark-glass);
  color: var(--text-light-silver);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

footer h3 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light-pure);
  margin-bottom: 20px;
  font-weight: 700;
}

footer ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

footer ul a {
  font-size: 14px;
  color: var(--text-light-muted);
}

footer ul a:hover {
  color: var(--accent-secondary);
  padding-left: 4px;
}

footer p {
  font-size: 14px;
  color: var(--text-light-muted);
  line-height: 1.5;
}

footer p strong {
  color: var(--text-light-silver);
}

footer p a:hover {
  color: var(--accent-secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 26px 0;
  font-size: 13px;
  color: var(--text-light-muted);
}

.footer-bottom-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom-links {
  display: flex;
  gap: 12px;
}

.footer-bottom-links a {
  color: var(--text-light-muted);
}

.footer-bottom-links a:hover {
  color: var(--text-light-pure);
}

.footer-bottom-links .sep {
  opacity: 0.2;
}

/* ==========================================================================
   BANNER DE COOKIES CONSENT BANNER (FLOTANTE)
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 700px;
  background: rgba(15, 22, 42, 0.95);
  backdrop-filter: blur(15px);
  border: var(--border-dark-glass);
  box-shadow: var(--shadow-dark);
  border-radius: var(--radius-md);
  padding: 24px;
  z-index: 10000;
  transform: translateY(120px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.45s, visibility 0.45s;
}

.cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-text h4 {
  font-size: 15px;
  color: var(--text-light-pure);
  margin-bottom: 6px;
}

.cookie-text p {
  font-size: 12.5px;
  color: var(--text-light-muted);
  line-height: 1.4;
}

.cookie-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.btn-cookie-secondary {
  background: transparent;
  color: var(--text-light-silver);
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
}

.btn-cookie-secondary:hover {
  color: var(--text-light-pure);
  text-decoration: underline;
}

/* ==========================================================================
   SECCIONES LEGALES (AVISO LEGAL, POLÍTICAS)
   ========================================================================== */

.legal-section {
  padding: 80px 0;
  background: var(--bg-light-pure);
  color: var(--text-dark-silver);
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
}

.legal-container h2 {
  font-size: 22px;
  color: var(--text-dark-pure);
  margin-top: 36px;
  margin-bottom: 16px;
}

.legal-container p {
  font-size: 14.5px;
  margin-bottom: 16px;
}

.legal-container ul {
  padding-left: 20px;
  margin-bottom: 16px;
  list-style: disc;
}

.legal-container li {
  font-size: 14.5px;
  margin-bottom: 8px;
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .footer-col-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1024px) {
  section {
    padding: 70px 0;
  }

  .nav {
    height: 76px;
  }

  header nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    height: calc(100vh - 76px);
    background-color: var(--bg-light-pure);
    padding: 40px;
    z-index: 999;
    transform: translateX(100%);
    transition: var(--transition-smooth);
    border-top: var(--border-light-glass);
    overflow-y: auto;
  }

  header nav.open {
    transform: translateX(0);
  }

  header nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  header nav a {
    font-size: 18px;
  }

  .mobile-toggle {
    display: block;
    order: 3;
  }

  .lang-switcher-pill {
    order: 2;
    margin-left: auto;
    margin-right: 15px;
  }

  .btn-header-cta {
    display: none; /* Hide header CTA on mobile, keep it on menu or contact */
  }

  .hero {
    padding: 100px 0;
    min-height: 550px;
    text-align: center;
  }

  .hero-content {
    margin: 0 auto;
  }

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

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-item:nth-child(2) {
    border-right: none;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portal-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .empresa-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .valores-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .topbar {
    display: none; /* Hide topbar on mobile for cleaner header */
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric-item {
    border-right: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding-bottom: 16px;
  }

  .metric-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .valores-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    padding: 24px 20px;
  }

  .portal-screen {
    padding: 24px 16px;
  }

  section {
    padding: 50px 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 20px;
    transform: translateY(100%);
  }

  .cookie-banner.visible {
    transform: translateY(0);
  }

  .cookie-content {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .cookie-actions {
    width: 100%;
    display: flex;
    gap: 12px;
  }

  .cookie-actions .btn,
  .cookie-actions .btn-cookie-secondary {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .btn-cookie-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-pill);
    color: var(--text-light-silver);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
  }

  .btn-cookie-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light-pure);
    text-decoration: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom-flex {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ==========================================================================
   HERO MAP SECTION
   ========================================================================== */
.hero-map-section {
  position: relative;
  width: 100%;
  height: 450px;
  padding: 0;
  overflow: hidden;
  border-top: var(--border-light-glass);
}

.hero-map-section iframe {
  width: 100%;
  height: 100%;
  display: block;
}

.map-overlay-card {
  position: absolute;
  top: 40px;
  left: 50px;
  z-index: 10;
  background: rgba(0, 15, 60, 0.88);
  backdrop-filter: blur(15px);
  border: var(--border-dark-glass);
  border-radius: var(--radius-md);
  padding: 24px 30px;
  color: var(--text-light-pure);
  max-width: 320px;
  box-shadow: var(--shadow-dark);
}

.map-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(60, 180, 195, 0.1);
  color: var(--accent-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.map-overlay-card h3 {
  font-size: 18px;
  color: var(--text-light-pure);
  margin-bottom: 8px;
}

.map-overlay-card p {
  font-size: 13.5px;
  color: var(--text-light-silver);
  margin-bottom: 20px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .hero-map-section {
    height: auto;
    display: flex;
    flex-direction: column-reverse;
  }
  
  .hero-map-section iframe {
    height: 350px;
  }
  
  .map-overlay-card {
    position: relative;
    top: 0;
    left: 0;
    max-width: 100%;
    border-radius: 0;
    border: none;
    border-bottom: var(--border-light-glass);
    padding: 30px 24px;
  }
}

/* ==========================================================================
   ESTILOS DE LA ZONA DE CLIENTES (PORTAL B2B DE HOLDED)
   ========================================================================== */

/* 1. Estilos del Login Cliente */
.login-page-main {
  background-color: var(--bg-dark-deep);
  min-height: calc(100vh - 86px);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
}

.decor-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 1;
  pointer-events: none;
  opacity: 0.15;
}

.decor-glow-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-primary);
  top: -100px;
  right: -100px;
}

.decor-glow-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-secondary);
  bottom: -200px;
  left: -200px;
}

.login-section {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 0;
}

.login-wrapper {
  background: rgba(8, 26, 74, 0.55);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: var(--border-dark-glass);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-dark), 0 0 40px rgba(15, 90, 150, 0.1);
  transition: var(--transition-smooth);
}

.login-wrapper:hover {
  border-color: rgba(60, 180, 195, 0.25);
  box-shadow: var(--shadow-dark), 0 0 50px rgba(60, 180, 195, 0.15);
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: var(--text-light-pure);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.login-header h1 {
  font-size: 28px;
  color: var(--text-light-pure);
  margin-bottom: 8px;
}

.login-header p.subtitle {
  font-size: 14.5px;
  color: var(--text-light-silver);
  line-height: 1.5;
}

.login-error-alert {
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.login-error-alert svg {
  color: var(--danger);
  flex-shrink: 0;
  margin-top: 2px;
}

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

.login-form label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-light-silver);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.login-form .input-wrapper {
  position: relative;
}

.login-form .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light-muted);
  pointer-events: none;
  transition: var(--transition-fast);
}

.login-form input {
  width: 100%;
  background: rgba(0, 15, 60, 0.5);
  border: var(--border-dark-glass);
  border-radius: var(--radius-md);
  padding: 14px 16px 14px 48px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-light-pure);
  transition: var(--transition-smooth);
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent-secondary);
  background: rgba(0, 15, 60, 0.7);
  box-shadow: 0 0 15px rgba(60, 180, 195, 0.15);
}

.login-form input:focus + .input-icon {
  color: var(--accent-secondary);
}

.btn-block {
  width: 100%;
}

.btn-login {
  padding: 14px;
  margin-top: 8px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.login-footer {
  text-align: center;
  margin-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
}

.login-footer p {
  font-size: 14px;
  color: var(--text-light-muted);
  margin-bottom: 16px;
}

.login-footer a {
  color: var(--accent-secondary);
  font-weight: 600;
}

.login-footer a:hover {
  text-decoration: underline;
}

.login-info-box {
  background: rgba(15, 90, 150, 0.1);
  border: 1px solid rgba(15, 90, 150, 0.18);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  font-size: 12.5px;
  color: var(--text-light-silver);
  line-height: 1.4;
}

.login-info-box svg {
  color: var(--accent-secondary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* 2. Estilos del Dashboard Zona Privada */
.dashboard-page-main {
  background-color: var(--bg-dark-deep);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding: 60px 0 100px 0;
  color: var(--text-light-pure);
}

.dashboard-section {
  position: relative;
  z-index: 5;
  padding: 0;
}

.dashboard-header {
  background: rgba(8, 26, 74, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--border-dark-glass);
  border-radius: var(--radius-lg);
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  box-shadow: var(--shadow-dark);
}

.header-welcome span {
  font-size: 13.5px;
  color: var(--accent-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-welcome h2 {
  font-size: clamp(22px, 3vw, 30px);
  color: var(--text-light-pure);
  margin: 6px 0;
}

.cif-text {
  font-size: 14px;
  color: var(--text-light-muted);
}

.dashboard-tabs-wrapper {
  background: rgba(8, 26, 74, 0.35);
  border: var(--border-dark-glass);
  padding: 6px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  box-shadow: var(--shadow-dark);
}

.dashboard-tabs {
  display: flex;
  gap: 6px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 14px 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light-silver);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-light-pure);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: var(--text-light-pure);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.tab-btn svg {
  opacity: 0.8;
  transition: var(--transition-fast);
}

.tab-btn.active svg {
  opacity: 1;
}

.dashboard-content {
  position: relative;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

/* 3. Sub-tabs de Documentos y Tablas */
.documents-tabs-sub {
  background: rgba(8, 26, 74, 0.45);
  border: var(--border-dark-glass);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-dark);
}

.sub-tab-btns {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.sub-tab-btn {
  background: transparent;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-light-muted);
  padding: 8px 16px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.sub-tab-btn:hover {
  color: var(--text-light-pure);
}

.sub-tab-btn.active {
  color: var(--accent-secondary);
}

.sub-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -17px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-secondary);
  border-radius: var(--radius-pill);
}

.sub-tab-content {
  display: none;
}

.sub-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-documents {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14.5px;
}

.table-documents th {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-light-muted);
  padding: 14px 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.06);
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table-documents td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-light-silver);
  vertical-align: middle;
}

.table-documents tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-light-pure);
}

.text-right {
  text-align: right;
}

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

.font-semibold {
  font-weight: 600;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(60, 180, 195, 0.1);
  color: var(--accent-secondary);
  border: 1px solid rgba(60, 180, 195, 0.2);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-download:hover {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: var(--text-light-pure);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(60, 180, 195, 0.25);
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
  background: rgba(6, 182, 212, 0.12);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light-silver);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
}

.empty-state p {
  color: var(--text-light-muted);
  font-size: 15px;
}

/* 4. Buscador y Filtros del Catálogo */
.catalog-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-input-wrapper svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light-muted);
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  background: rgba(8, 26, 74, 0.55);
  border: var(--border-dark-glass);
  border-radius: var(--radius-md);
  padding: 14px 16px 14px 48px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-light-pure);
  transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--accent-secondary);
  background: rgba(8, 26, 74, 0.75);
  box-shadow: 0 0 15px rgba(60, 180, 195, 0.15);
}

.search-input-wrapper input:focus + svg {
  color: var(--accent-secondary);
}

.filter-actions select {
  background: rgba(8, 26, 74, 0.55);
  border: var(--border-dark-glass);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-light-pure);
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
}

.filter-actions select:focus {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 15px rgba(60, 180, 195, 0.15);
}

.filter-actions select option {
  background: var(--bg-dark-card);
  color: var(--text-light-pure);
}

/* Spinner de carga */
.catalog-loading-wrapper {
  text-align: center;
  padding: 80px 20px;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-left-color: var(--accent-secondary);
  border-radius: 50%;
  margin: 0 auto 20px auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Grid de Productos */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.product-card {
  background: rgba(8, 26, 74, 0.45);
  border: var(--border-dark-glass);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-dark);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(60, 180, 195, 0.2);
  box-shadow: var(--shadow-dark), 0 5px 20px rgba(60, 180, 195, 0.08);
}

.prod-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
}

.prod-sku {
  font-size: 12px;
  color: var(--text-light-muted);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
}

.prod-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prod-title {
  font-size: 16.5px;
  color: var(--text-light-pure);
  margin-bottom: 10px;
  line-height: 1.4;
  font-weight: 600;
}

.prod-desc {
  font-size: 13px;
  color: var(--text-light-silver);
  margin-bottom: 20px;
  line-height: 1.5;
  flex-grow: 1;
}

.prod-price-box {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-net {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-light-pure);
  font-family: 'Outfit', sans-serif;
}

.price-net small {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-left: 2px;
}

.price-total {
  font-size: 13.5px;
  color: var(--text-light-muted);
}

.price-total small {
  font-size: 10px;
  text-transform: uppercase;
}

/* Paginación del Catálogo */
.catalog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
}

.page-indicator {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-light-silver);
  font-size: 15px;
  min-width: 60px;
  text-align: center;
}

.catalog-pagination .btn {
  padding: 10px 20px;
  font-size: 14px;
}

.catalog-pagination .btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* 5. Vista de Datos y Perfil */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.profile-card {
  background: rgba(8, 26, 74, 0.45);
  border: var(--border-dark-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dark);
  overflow: hidden;
}

.profile-card-header {
  background: rgba(255, 255, 255, 0.02);
  padding: 20px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-card-header h3 {
  font-size: 18px;
  color: var(--text-light-pure);
}

.profile-card-body {
  padding: 30px;
}

.profile-details-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 12.5px;
  color: var(--text-light-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.detail-value {
  font-size: 15.5px;
  color: var(--text-light-pure);
  font-weight: 500;
}

.detail-value a {
  color: var(--accent-secondary);
}

.detail-value a:hover {
  text-decoration: underline;
}

.iban-masked {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 15, 60, 0.4);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: monospace;
  font-size: 14.5px;
}

/* ==========================================================================
   RESPONSIVE PARA LA ZONA DE CLIENTES
   ========================================================================== */
@media (max-width: 992px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .login-wrapper {
    padding: 36px 24px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 30px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn {
    width: 100%;
  }

  .dashboard-tabs {
    flex-direction: column;
    gap: 4px;
  }

  .tab-btn {
    justify-content: flex-start;
    padding: 12px 16px;
  }

  .sub-tab-btns {
    flex-wrap: wrap;
    gap: 6px;
  }

  .sub-tab-btn {
    font-size: 13.5px;
    padding: 6px 10px;
  }

  .sub-tab-btn.active::after {
    bottom: -17px;
  }

  /* Transformar tabla a tarjetas móviles */
  .table-documents, 
  .table-documents thead, 
  .table-documents tbody, 
  .table-documents th, 
  .table-documents td, 
  .table-documents tr {
    display: block;
  }

  .table-documents thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .table-documents tr {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.01);
    padding: 8px;
  }

  .table-documents td {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    padding-left: 50% !important;
    text-align: right !important;
    min-height: 44px;
  }

  .table-documents td:last-child {
    border-bottom: 0;
  }

  .table-documents td::before {
    content: attr(data-label);
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-light-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .btn-download {
    width: 100%;
    margin-top: 4px;
  }
}

