/* ==============================================================================
   LOGÍSTICA PICKTIC • DESIGN SYSTEM & STYLES (EXPANDED)
   ============================================================================== */

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

:root,
html[data-theme="dark"] {
  /* Colors - Modern Dark Mode (Default de Logística Picktic) */
  --bg-dark: #030712;
  --bg-darker: #02040a;
  --bg-card: rgba(11, 17, 33, 0.72);
  --bg-card-hover: rgba(18, 27, 51, 0.85);
  --bg-input: rgba(7, 12, 24, 0.9);
  --bg-glass: rgba(15, 23, 42, 0.65);
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-subtle-light: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(6, 182, 212, 0.35);
  --border-hover: rgba(16, 185, 129, 0.5);
  --border-b2b: rgba(99, 102, 241, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-highlight: #ffffff;

  --accent-cyan: #06b6d4;
  --accent-cyan-light: #22d3ee;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-green: #10b981;
  --accent-emerald: #059669;
  --accent-purple: #8b5cf6;
  --accent-orange: #f59e0b;
  --accent-gold: #fbbf24;
  --accent-red: #ef4444;

  --gradient-primary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-secondary: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --gradient-repartidor: linear-gradient(135deg, #10b981 0%, #0284c7 100%);
  --gradient-proveedor: linear-gradient(135deg, #4f46e5 0%, #0284c7 100%);
  --gradient-b2b: linear-gradient(135deg, #6366f1 0%, #2563eb 50%, #06b6d4 100%);
  --gradient-admin: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-card: linear-gradient(180deg, rgba(17, 24, 39, 0.75) 0%, rgba(9, 14, 28, 0.9) 100%);
  --gradient-card-b2b: linear-gradient(180deg, rgba(30, 27, 75, 0.4) 0%, rgba(10, 15, 30, 0.9) 100%);
  --gradient-text-gold: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --gradient-text-metal: linear-gradient(135deg, #ffffff 0%, #e2e8f0 40%, #94a3b8 100%);

  --shadow-glow: 0 0 35px rgba(6, 182, 212, 0.22);
  --shadow-green: 0 0 35px rgba(16, 185, 129, 0.22);
  --shadow-b2b: 0 0 35px rgba(99, 102, 241, 0.25);
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.75);
  --shadow-card-elevated: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modo Claro (Activado mediante el selector de tema) */
html[data-theme="light"] {
  --bg-dark: #f1f5f9;
  --bg-darker: #e2e8f0;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.96);
  
  --border-subtle: #e2e8f0;
  --border-subtle-light: #cbd5e1;
  --border-glow: rgba(37, 99, 235, 0.2);
  --border-hover: rgba(5, 150, 105, 0.35);
  --border-b2b: rgba(79, 70, 229, 0.25);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-highlight: #020617;

  --accent-cyan: #0284c7;
  --accent-cyan-light: #0369a1;
  --accent-blue: #1d4ed8;
  --accent-indigo: #4338ca;
  --accent-green: #047857;
  --accent-emerald: #065f46;
  --accent-purple: #6d28d9;
  --accent-orange: #b45309;
  --accent-gold: #92400e;
  --accent-red: #b91c1c;

  --gradient-primary: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
  --gradient-secondary: linear-gradient(135deg, #047857 0%, #0284c7 100%);
  --gradient-repartidor: linear-gradient(135deg, #047857 0%, #0284c7 100%);
  --gradient-proveedor: linear-gradient(135deg, #4338ca 0%, #1d4ed8 100%);
  --gradient-b2b: linear-gradient(135deg, #4338ca 0%, #1d4ed8 50%, #0284c7 100%);
  --gradient-admin: linear-gradient(135deg, #b45309 0%, #b91c1c 100%);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  --gradient-card-b2b: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  --gradient-text-gold: linear-gradient(135deg, #b45309 0%, #92400e 100%);
  --gradient-text-metal: linear-gradient(135deg, #0f172a 0%, #334155 50%, #64748b 100%);

  --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card-elevated: 0 12px 30px rgba(0, 0, 0, 0.08), 0 0 0 1px #e2e8f0;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 90% 40%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-attachment: fixed;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-title {
  font-family: var(--font-display);
}

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

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

/* Buttons - Ultra Modern Glass & High Contrast */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
  border-radius: inherit;
}

.btn:hover::after {
  opacity: 1;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12.5px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #030712;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.5);
}

.btn-repartidor {
  background: var(--gradient-repartidor);
  color: #030712;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

.btn-repartidor:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.btn-proveedor {
  background: var(--gradient-b2b);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-proveedor:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.55);
}

.btn-b2b {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  color: #fff;
  border: 1px solid rgba(129, 140, 248, 0.4);
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.35);
}

.btn-b2b:hover {
  transform: translateY(-2px);
  border-color: rgba(165, 180, 252, 0.8);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.5);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
  border: 1px solid var(--border-subtle-light);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-outline-b2b {
  background: rgba(99, 102, 241, 0.08);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.3);
  backdrop-filter: blur(10px);
}

.btn-outline-b2b:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(129, 140, 248, 0.6);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-proveedor:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(79, 172, 254, 0.45);
}

.btn-admin {
  background: var(--gradient-admin);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-admin:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.45);
}

.btn-success {
  background: rgba(0, 245, 160, 0.15);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}
.btn-success:hover {
  background: var(--accent-green);
  color: #070b14;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}
.btn-danger:hover {
  background: var(--accent-red);
  color: #fff;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-live {
  background: rgba(0, 245, 160, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(0, 245, 160, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-orange);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.badge-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* ==============================================================================
   HEADER & NAVBAR
   ============================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #070b14;
  font-size: 20px;
  box-shadow: 0 0 18px rgba(0, 242, 254, 0.4);
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  color: #fff;
  font-size: 19px;
  font-weight: 800;
}

.brand-title span {
  color: var(--accent-cyan);
}

.brand-subtitle {
  font-size: 10px;
  color: var(--accent-green);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-item a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-item a:hover {
  color: var(--accent-cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==============================================================================
   HERO SECTION
   ============================================================================== */
.hero {
  padding-top: 140px;
  padding-bottom: 70px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-title {
  font-size: 50px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-title-highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  font-weight: 400;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

/* Callout Box in Hero */
.driver-callout-box {
  margin-top: 14px;
  padding: 20px;
  background: var(--gradient-card);
  border: 1px solid rgba(0, 245, 160, 0.3);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.callout-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.callout-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.callout-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Hero Visual / Card */
.hero-visual {
  position: relative;
}

.hero-media-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-glow);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-media-card:hover .hero-img {
  transform: scale(1.02);
}

/* Floating Status Pills */
.status-pill {
  position: absolute;
  background: rgba(14, 22, 40, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
  animation: float-anim 4s ease-in-out infinite alternate;
}

.pill-top {
  top: 24px;
  right: 24px;
  border-left: 3px solid var(--accent-green);
}

.pill-bottom {
  bottom: 24px;
  left: 24px;
  border-left: 3px solid var(--accent-cyan);
  animation-delay: -2s;
}

@keyframes float-anim {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-8px); }
}

.pill-icon {
  font-size: 22px;
}

.pill-text {
  display: flex;
  flex-direction: column;
}

.pill-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.pill-subtitle {
  font-size: 11px;
  color: var(--accent-green);
  font-family: var(--font-mono);
}

/* ==============================================================================
   METRICS BANNER
   ============================================================================== */
.metrics-section {
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(14, 22, 40, 0.4);
}

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

.metric-item {
  text-align: center;
  padding: 12px;
}

.metric-number {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.metric-number span {
  color: var(--accent-cyan);
}

.metric-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==============================================================================
   PORTALS & ONBOARDING SECTION
   ============================================================================== */
.portals-section {
  padding: 70px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px auto;
}

.section-tag {
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.2;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
}

.portals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.portal-card {
  position: relative;
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
  overflow: hidden;
}

.portal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.portal-repartidor::before {
  background: var(--gradient-repartidor);
}

.portal-proveedor::before {
  background: var(--gradient-proveedor);
}

.portal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

.portal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.portal-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.portal-repartidor .portal-icon {
  background: rgba(0, 245, 160, 0.12);
  border: 1px solid rgba(0, 245, 160, 0.3);
  color: var(--accent-green);
}

.portal-proveedor .portal-icon {
  background: rgba(79, 172, 254, 0.12);
  border: 1px solid rgba(79, 172, 254, 0.3);
  color: var(--accent-blue);
}

.portal-title-group h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.portal-title-group p {
  font-size: 13px;
  color: var(--text-dim);
}

.portal-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
}

.portal-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-muted);
}

.portal-features li span.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
}

.portal-repartidor .check {
  background: rgba(0, 245, 160, 0.2);
  color: var(--accent-green);
}

.portal-proveedor .check {
  background: rgba(79, 172, 254, 0.2);
  color: var(--accent-blue);
}

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

/* ==============================================================================
   HOW IT WORKS FOR DRIVERS (Steps)
   ============================================================================== */
.steps-section {
  padding: 60px 0;
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 16, 30, 0.5);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.step-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 26px 20px;
  position: relative;
  text-align: center;
  transition: all var(--transition-fast);
}

.step-box:hover {
  border-color: var(--accent-green);
  transform: translateY(-3px);
}

.step-num {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--gradient-repartidor);
  color: #070b14;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  font-size: 32px;
  margin-bottom: 12px;
  margin-top: 6px;
}

.step-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.step-detail {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==============================================================================
   MODALS: REGISTER REPARTIDOR & LOGIN
   ============================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.modal-overlay.open,
.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
}

.modal-card {
  background: #0d1527;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 34px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), var(--shadow-glow);
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-card-lg {
  max-width: 740px;
}

.modal-overlay.open .modal-card,
.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

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

/* Tabs Switcher */
.modal-tabs {
  display: flex;
  background: rgba(10, 16, 30, 0.85);
  border-radius: var(--radius-full);
  padding: 5px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 22px;
}

.tab-btn {
  flex: 1;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn.active.tab-repartidor {
  background: var(--gradient-repartidor);
  color: #070b14;
  box-shadow: 0 4px 15px rgba(0, 245, 160, 0.3);
}

.tab-btn.active.tab-proveedor {
  background: var(--gradient-proveedor);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.tab-btn.active.tab-admin {
  background: var(--gradient-admin);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.tab-btn.active.tab-encargado {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

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

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

.form-select option {
  background: #0d1527;
  color: #fff;
}

/* Upload Boxes */
.upload-card {
  border: 1px dashed rgba(0, 242, 254, 0.4);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(0, 242, 254, 0.03);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.upload-card:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--accent-cyan);
}

.upload-card input[type="file"] {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.upload-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.upload-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.file-attached {
  font-size: 11px;
  color: var(--accent-green);
  font-weight: 600;
  margin-top: 4px;
}

/* Post-Registration Notice & WhatsApp Box */
.validation-notice-card {
  background: rgba(0, 245, 160, 0.08);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-top: 14px;
}

.validation-notice-icon {
  font-size: 42px;
  margin-bottom: 12px;
}

.validation-notice-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.validation-notice-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.whatsapp-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #25d366;
  color: #fff;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-normal);
}

.whatsapp-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(37, 211, 102, 0.6);
  background: #20ba5a;
}

/* ==============================================================================
   ADMIN PANEL (FULL MODAL / DASHBOARD)
   ============================================================================== */
.admin-modal-card {
  max-width: 1440px;
  width: 96%;
  height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #090e1c;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
}

.admin-header-bar {
  padding: 18px 28px;
  background: rgba(14, 22, 40, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header-title h2 {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
}

.admin-stats-summary {
  display: flex;
  gap: 20px;
}

.admin-stat-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-muted);
}

.admin-stat-chip strong {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* Admin Tabs */
.admin-nav-tabs {
  display: flex;
  background: #0d1527;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
}

.admin-tab {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-tab.active {
  color: #fff;
  border-bottom-color: var(--accent-orange);
}

.admin-tab:hover {
  color: #fff;
}

/* Admin Body Content */
.admin-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
}

/* Tables */
.data-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  width: 100%;
}

.data-table-container::-webkit-scrollbar {
  height: 8px;
}

.data-table-container::-webkit-scrollbar-track {
  background: rgba(10, 16, 30, 0.85);
  border-radius: 4px;
}

.data-table-container::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 254, 0.35);
  border-radius: 4px;
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.data-table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 254, 0.7);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

#payroll-table {
  min-width: 960px;
  width: 100%;
}

#drivers-table {
  min-width: 960px;
  width: 100%;
}

#mod-requests-table {
  min-width: 960px;
  width: 100%;
}

#encargado-drivers-table {
  min-width: 920px;
  width: 100%;
}

#encargado-mod-history-table {
  min-width: 900px;
  width: 100%;
}

.data-table th {
  background: rgba(10, 16, 30, 0.95);
  padding: 10px 12px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  vertical-align: middle;
  background: transparent;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

/* Sticky Action Column */
.sticky-action-col {
  position: sticky;
  right: 0;
  background: #0d1629 !important;
  box-shadow: -8px 0 16px rgba(0, 0, 0, 0.55);
  z-index: 2;
  white-space: nowrap;
  min-width: 190px;
  padding: 8px 12px !important;
}

th.sticky-action-col {
  background: rgba(14, 22, 40, 0.98) !important;
  z-index: 3;
}

/* Package Stepper Control */
.pkg-stepper-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.pkg-btn-step {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.pkg-btn-step:hover {
  background: var(--accent-cyan);
  color: #070b14;
  border-color: var(--accent-cyan);
  transform: scale(1.05);
}

.pkg-table-input {
  width: 55px;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  outline: none;
}

/* Action Button Groups */
.table-action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.btn-action {
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-action-primary {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
.btn-action-primary:hover {
  background: var(--accent-cyan);
  color: #070b14;
  transform: translateY(-1px);
}

.btn-action-success {
  background: rgba(0, 245, 160, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
}
.btn-action-success:hover {
  background: var(--accent-green);
  color: #070b14;
  transform: translateY(-1px);
}

.btn-action-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}
.btn-action-warning:hover {
  background: var(--accent-orange);
  color: #070b14;
  transform: translateY(-1px);
}

.btn-action-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--accent-red);
  color: var(--accent-red);
}
.btn-action-danger:hover {
  background: var(--accent-red);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Bodegas Manager Grid */
.bodega-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

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

.bodega-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.bodega-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.bodega-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.bodega-state-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.bodega-drivers-list {
  margin: 12px 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* Payroll Rule Banner */
.payroll-rule-banner {
  background: rgba(0, 242, 254, 0.05);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.payroll-rule-text {
  font-size: 13px;
  color: var(--text-muted);
}

.payroll-rule-text strong {
  color: var(--accent-cyan);
}

/* Weekly Payroll Navigator & Metric Cards */
.payroll-week-navigator {
  background: rgba(14, 22, 40, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 242, 254, 0.22);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.payroll-week-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: all var(--transition-fast);
}

.payroll-week-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 242, 254, 0.25);
}

.payroll-week-card-title {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #111c35;
  border: 1px solid var(--accent-green);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2500;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: #050811;
  padding: 60px 0 30px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 14px;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links li a {
  font-size: 14px;
  color: var(--text-muted);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content {
    align-items: center;
  }
  .hero-title {
    font-size: 38px;
  }
  .hero-actions {
    justify-content: center;
  }
  .portals-grid {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    grid-template-columns: 1fr 1fr;
  }
  .bodegas-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .bodegas-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================================================================
   PORTAL ENCARGADO DE BODEGA & MODIFICACIÓN DE ENTREGAS
   ============================================================================== */
.encargado-modal-card {
  max-width: 1400px;
  width: 96%;
  height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #080d1a;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(245, 158, 11, 0.15);
}

.encargado-header-bar {
  padding: 16px 28px;
  background: rgba(18, 24, 42, 0.95);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.encargado-op-banner {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.date-controls-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-procedente {
  background: rgba(0, 245, 160, 0.15);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

.badge-no-procedente {
  background: rgba(255, 75, 75, 0.15);
  color: #ff5252;
  border: 1px solid #ff5252;
}

.badge-pendiente {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid #fbbf24;
}

.diff-positive {
  color: var(--accent-green);
  font-weight: 700;
  font-family: var(--font-mono);
}

.diff-negative {
  color: #ff5252;
  font-weight: 700;
  font-family: var(--font-mono);
}

.bodega-manager-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Google reCAPTCHA Container Styles */
.recaptcha-holder {
  min-height: 78px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 12px 0 6px 0;
  width: 100%;
}

.recaptcha-error {
  color: #ef4444;
  font-size: 12px;
  text-align: center;
  margin-top: 4px;
  display: none;
  font-weight: 600;
}

@media (max-width: 380px) {
  .recaptcha-holder {
    transform: scale(0.88);
    transform-origin: center center;
  }
}

/* ==============================================================================
   PORTAL DE PROVEEDORES B2B • ENTERPRISE DESIGN STYLES
   ============================================================================== */
.modal-card-prov {
  max-width: 820px;
  background: radial-gradient(circle at 10% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 90% 100%, rgba(6, 182, 212, 0.1) 0%, transparent 40%),
              #080e1c;
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(99, 102, 241, 0.2);
}

.b2b-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.14);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.35);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.b2b-section-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #c7d2fe;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

/* Document Upload Grid for SAT & Bank Verification */
.prov-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}

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

.upload-card-prov {
  border: 1px dashed rgba(99, 102, 241, 0.45);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  background: rgba(15, 23, 42, 0.55);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 145px;
}

.upload-card-prov:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: #818cf8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.upload-card-prov.has-file {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.08);
}

.upload-card-prov input[type="file"] {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-card-prov .prov-doc-icon {
  font-size: 26px;
  margin-bottom: 6px;
}

.upload-card-prov .prov-doc-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.upload-card-prov .prov-doc-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.upload-card-prov .prov-doc-status {
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  display: inline-block;
}

.upload-card-prov.has-file .prov-doc-status {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* Success Card for Proveedores */
.prov-success-card {
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.2) 0%, rgba(10, 16, 30, 0.95) 70%);
  border: 1px solid rgba(129, 140, 248, 0.4);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  text-align: center;
}

.prov-folio-badge {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.4);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin: 12px 0 16px 0;
  letter-spacing: 0.05em;
}

.prov-docs-checklist {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 16px 0 24px 0;
  flex-wrap: wrap;
}

.prov-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

/* Sat Verification Badges in Admin Table */
.badge-sat-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-sat-wait {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Nav Portal Button Glow */
.btn-nav-prov {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(6, 182, 212, 0.2) 100%);
  color: #e0e7ff;
  border: 1px solid rgba(129, 140, 248, 0.4);
}

.btn-nav-prov:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.45) 0%, rgba(6, 182, 212, 0.35) 100%);
  color: #fff;
  border-color: rgba(165, 180, 252, 0.8);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

/* ==============================================================================
   PORTAL DE PROVEEDORES • GATEWAY PURISTA & ELEGANTE
   ============================================================================== */
.portal-gate-section {
  padding-top: 130px;
  padding-bottom: 70px;
  min-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.portal-gate-container {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.portal-gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #c7d2fe;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.portal-gate-title {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 14px;
}

.portal-gate-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 36px auto;
  line-height: 1.6;
}

.portal-gate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  text-align: left;
  margin-bottom: 30px;
}

.portal-access-card {
  background: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.18) 0%, rgba(13, 20, 36, 0.95) 100%);
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.portal-access-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.6);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(99, 102, 241, 0.25);
}

.portal-access-card.register-card {
  background: radial-gradient(circle at 100% 0%, rgba(6, 182, 212, 0.16) 0%, rgba(11, 19, 38, 0.95) 100%);
  border-color: rgba(6, 182, 212, 0.35);
}

.portal-access-card.register-card:hover {
  border-color: rgba(6, 182, 212, 0.65);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(6, 182, 212, 0.22);
}

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

.portal-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(129, 140, 248, 0.4);
}

.portal-access-card.register-card .portal-card-icon {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.4);
}

.portal-card-heading {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 14px 0 6px 0;
}

.portal-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.portal-reqs-banner {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
  text-align: left;
}

.portal-reqs-label {
  font-size: 12px;
  font-weight: 800;
  color: #c7d2fe;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.portal-reqs-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
}

.req-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.req-tag.sat {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.08);
}

.req-tag.bank {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.25);
  background: rgba(96, 165, 250, 0.08);
}

.portal-support-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.portal-support-link {
  color: #a5b4fc;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.portal-support-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* Footer B2B Minimal */
.footer-b2b {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #060a14;
  padding: 24px 0;
}

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

.footer-b2b-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-b2b-copy {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.footer-b2b-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
}

.footer-b2b-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-b2b-links a:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .portal-gate-title {
    font-size: 32px;
  }
  .portal-gate-grid {
    grid-template-columns: 1fr;
  }
  .footer-b2b-content {
    flex-direction: column;
    text-align: center;
  }
  .footer-b2b-left {
    flex-direction: column;
    gap: 8px;
  }
}

/* ==============================================================================
   LOGIN UNIFICADO INTELIGENTE (ADMIN & PROVEEDORES)
   ============================================================================== */
.unified-login-card {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.22) 0%, rgba(13, 20, 36, 0.96) 100%);
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 22px;
  padding: 40px 36px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(99, 102, 241, 0.2);
  text-align: left;
  backdrop-filter: blur(16px);
}

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

.unified-login-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(129, 140, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 14px auto;
}

.unified-login-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.unified-login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 520px) {
  .unified-login-card {
    padding: 28px 20px;
    margin: 0 10px;
  }
}

/* ==============================================================================
   PORTAL DE PROVEEDORES A PANTALLA COMPLETA (SITIO WEB INDEPENDIENTE)
   ============================================================================== */
.prov-fullpage-wrapper {
  min-height: 100vh;
  width: 100%;
  background: #060b17;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

.prov-site-topbar {
  background: rgba(10, 16, 31, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}

.prov-container {
  max-width: 1320px;
  width: 94%;
  margin: 0 auto;
}

.prov-hero-banner {
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.18) 0%, rgba(11, 18, 38, 0.8) 100%);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 20px;
  padding: 32px 36px;
  margin: 32px auto 28px auto;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.prov-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.prov-kpi-card {
  background: rgba(7, 12, 24, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.prov-kpi-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.prov-nav-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 14px;
  margin-bottom: 30px;
  overflow-x: auto;
}

.prov-tab-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.prov-tab-button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.prov-tab-button.active {
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  color: #fff;
  border-color: #6366f1;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
}

.prov-card-section {
  background: rgba(13, 20, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 32px 34px;
  margin-bottom: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .prov-hero-banner {
    padding: 24px 20px;
    margin: 20px auto;
  }
  .prov-card-section {
    padding: 22px 18px;
  }
}

/* ==============================================================================
   TEMA CLARO EJECUTIVO (SUAVE A LA VISTA, ALTO CONTRASTE Y SIN DESLUMBRAMIENTOS)
   ============================================================================== */
html:not([data-theme="dark"]),
html[data-theme="light"] {
  color-scheme: light;
}

html:not([data-theme="dark"]) body,
html[data-theme="light"] body {
  background-color: #f1f5f9 !important;
  background-image: none !important;
  color: #1e293b !important;
}

/* Encabezados y títulos siempre nítidos y legibles en tema claro */
html:not([data-theme="dark"]) h1,
html[data-theme="light"] h1,
html:not([data-theme="dark"]) h2,
html[data-theme="light"] h2,
html:not([data-theme="dark"]) h3,
html[data-theme="light"] h3,
html:not([data-theme="dark"]) h4,
html[data-theme="light"] h4 {
  color: #0f172a !important;
}

html:not([data-theme="dark"]) p,
html[data-theme="light"] p {
  color: #334155;
}

/* Corrige texto blanco inline que en tema claro se volvía invisible */
html:not([data-theme="dark"]) [style*="color: #fff"],
html[data-theme="light"] [style*="color: #fff"],
html:not([data-theme="dark"]) [style*="color: #ffffff"],
html[data-theme="light"] [style*="color: #ffffff"],
html:not([data-theme="dark"]) [style*="color:#fff"],
html[data-theme="light"] [style*="color:#fff"] {
  color: #0f172a !important;
}

/* Ajusta colores pastel que lastimaban la vista sobre fondo blanco */
html:not([data-theme="dark"]) [style*="color: #a5b4fc"],
html[data-theme="light"] [style*="color: #a5b4fc"] {
  color: #4338ca !important;
}

html:not([data-theme="dark"]) [style*="color: #34d399"],
html[data-theme="light"] [style*="color: #34d399"],
html:not([data-theme="dark"]) [style*="color: #6ee7b7"],
html[data-theme="light"] [style*="color: #6ee7b7"] {
  color: #047857 !important;
}

html:not([data-theme="dark"]) [style*="color: #60a5fa"],
html[data-theme="light"] [style*="color: #60a5fa"] {
  color: #1d4ed8 !important;
}

html:not([data-theme="dark"]) [style*="color: #fbbf24"],
html[data-theme="light"] [style*="color: #fbbf24"] {
  color: #b45309 !important;
}

html:not([data-theme="dark"]) [style*="color: #c7d2fe"],
html[data-theme="light"] [style*="color: #c7d2fe"] {
  color: #3730a3 !important;
}

html:not([data-theme="dark"]) [style*="color: #a7f3d0"],
html[data-theme="light"] [style*="color: #a7f3d0"] {
  color: #065f46 !important;
}

html:not([data-theme="dark"]) [style*="color: #fed7aa"],
html[data-theme="light"] [style*="color: #fed7aa"] {
  color: #9a3412 !important;
}

/* Cajas y recuadros que tenían fondos oscuros artificiales */
html:not([data-theme="dark"]) [style*="background: rgba(7, 12, 24"],
html[data-theme="light"] [style*="background: rgba(7, 12, 24"],
html:not([data-theme="dark"]) [style*="background: rgba(15, 23, 42"],
html[data-theme="light"] [style*="background: rgba(15, 23, 42"],
html:not([data-theme="dark"]) [style*="background: rgba(13, 20, 36"],
html[data-theme="light"] [style*="background: rgba(13, 20, 36"],
html:not([data-theme="dark"]) [style*="background: rgba(14, 22, 40"],
html[data-theme="light"] [style*="background: rgba(14, 22, 40"],
html:not([data-theme="dark"]) [style*="background: rgba(10, 16, 30"],
html[data-theme="light"] [style*="background: rgba(10, 16, 30"] {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

/* Recuadro de depósito de garantía con tono ámbar suave no agresivo */
html:not([data-theme="dark"]) [style*="background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11"],
html[data-theme="light"] [style*="background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11"] {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.08) !important;
  color: #1e293b !important;
}

/* Barra de navegación */
html:not([data-theme="dark"]) .navbar,
html[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

html:not([data-theme="dark"]) .brand-title,
html[data-theme="light"] .brand-title {
  color: #0f172a !important;
}

/* Tarjeta de login unificado */
html:not([data-theme="dark"]) .unified-login-card,
html[data-theme="light"] .unified-login-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
}

html:not([data-theme="dark"]) .unified-login-title,
html[data-theme="light"] .unified-login-title {
  color: #0f172a !important;
}

/* Modales */
html:not([data-theme="dark"]) .modal-card,
html[data-theme="light"] .modal-card,
html:not([data-theme="dark"]) .modal-card-prov,
html[data-theme="light"] .modal-card-prov {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .modal-close-btn,
html[data-theme="light"] .modal-close-btn {
  color: #64748b !important;
}

html:not([data-theme="dark"]) .modal-close-btn:hover,
html[data-theme="light"] .modal-close-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

/* Formularios, inputs y desplegables legibles */
html:not([data-theme="dark"]) .form-label,
html[data-theme="light"] .form-label {
  color: #334155 !important;
}

html:not([data-theme="dark"]) .form-input,
html[data-theme="light"] .form-input,
html:not([data-theme="dark"]) .form-select,
html[data-theme="light"] .form-select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .form-select option,
html[data-theme="light"] .form-select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .form-input::placeholder,
html[data-theme="light"] .form-input::placeholder {
  color: #94a3b8 !important;
}

/* Panel de Administración */
html:not([data-theme="dark"]) .admin-modal-card,
html[data-theme="light"] .admin-modal-card {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .admin-header-bar,
html[data-theme="light"] .admin-header-bar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html:not([data-theme="dark"]) .admin-header-title h2,
html[data-theme="light"] .admin-header-title h2 {
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .admin-nav-tabs,
html[data-theme="light"] .admin-nav-tabs {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html:not([data-theme="dark"]) .admin-tab,
html[data-theme="light"] .admin-tab {
  color: #64748b !important;
}

html:not([data-theme="dark"]) .admin-tab:hover,
html[data-theme="light"] .admin-tab:hover {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

html:not([data-theme="dark"]) .admin-tab.active,
html[data-theme="light"] .admin-tab.active {
  color: #1d4ed8 !important;
  border-bottom-color: #2563eb !important;
  background: #eff6ff !important;
}

html:not([data-theme="dark"]) .admin-stat-chip,
html[data-theme="light"] .admin-stat-chip {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

html:not([data-theme="dark"]) .admin-stat-chip strong,
html[data-theme="light"] .admin-stat-chip strong {
  color: #0284c7 !important;
}

/* Tablas con contraste descansado */
html:not([data-theme="dark"]) .data-table-container,
html[data-theme="light"] .data-table-container {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

html:not([data-theme="dark"]) .data-table,
html[data-theme="light"] .data-table {
  background: #ffffff !important;
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .data-table th,
html[data-theme="light"] .data-table th {
  background: #f1f5f9 !important;
  color: #334155 !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

html:not([data-theme="dark"]) .data-table td,
html[data-theme="light"] .data-table td {
  background: #ffffff !important;
  color: #1e293b !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

html:not([data-theme="dark"]) .data-table tr:hover td,
html[data-theme="light"] .data-table tr:hover td {
  background: #f8fafc !important;
}

html:not([data-theme="dark"]) .data-table strong,
html[data-theme="light"] .data-table strong {
  color: #0f172a !important;
}

/* Columna de acciones pegajosa en tabla: color limpio y claro */
html:not([data-theme="dark"]) .sticky-action-col,
html[data-theme="light"] .sticky-action-col {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: -6px 0 14px rgba(0, 0, 0, 0.06) !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

html:not([data-theme="dark"]) th.sticky-action-col,
html[data-theme="light"] th.sticky-action-col {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

/* Control de conteo de paquetes en nómina */
html:not([data-theme="dark"]) .pkg-stepper-wrap,
html[data-theme="light"] .pkg-stepper-wrap {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

html:not([data-theme="dark"]) .pkg-btn-step,
html[data-theme="light"] .pkg-btn-step {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html:not([data-theme="dark"]) .pkg-btn-step:hover,
html[data-theme="light"] .pkg-btn-step:hover {
  background: #cbd5e1 !important;
}

/* Portal de Proveedores */
html:not([data-theme="dark"]) .prov-fullpage-wrapper,
html[data-theme="light"] .prov-fullpage-wrapper {
  background: #f1f5f9 !important;
  background-image: none !important;
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .prov-site-topbar,
html[data-theme="light"] .prov-site-topbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

html:not([data-theme="dark"]) .prov-card-section,
html[data-theme="light"] .prov-card-section {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .prov-kpi-card,
html[data-theme="light"] .prov-kpi-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html:not([data-theme="dark"]) .prov-step-card,
html[data-theme="light"] .prov-step-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html:not([data-theme="dark"]) .upload-card-prov,
html[data-theme="light"] .upload-card-prov {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

html:not([data-theme="dark"]) .upload-card-prov:hover,
html[data-theme="light"] .upload-card-prov:hover {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
}

html:not([data-theme="dark"]) .upload-card-prov .prov-doc-title,
html[data-theme="light"] .upload-card-prov .prov-doc-title {
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .upload-card-prov .prov-doc-desc,
html[data-theme="light"] .upload-card-prov .prov-doc-desc {
  color: #64748b !important;
}

html:not([data-theme="dark"]) .upload-card-prov .prov-doc-status,
html[data-theme="light"] .upload-card-prov .prov-doc-status {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

/* Badges con excelente contraste en tema claro */
html:not([data-theme="dark"]) .b2b-header-badge,
html[data-theme="light"] .b2b-header-badge {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

html:not([data-theme="dark"]) .b2b-section-title,
html[data-theme="light"] .b2b-section-title {
  color: #1e293b !important;
  border-bottom-color: #e2e8f0 !important;
}

/* Tarjetas y KPIs de Pago a Proveedores */
html:not([data-theme="dark"]) .admin-corte-chip,
html[data-theme="light"] .admin-corte-chip {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
}

html:not([data-theme="dark"]) .admin-corte-chip-title,
html[data-theme="light"] .admin-corte-chip-title {
  color: #64748b !important;
}

html:not([data-theme="dark"]) .admin-corte-chip-value,
html[data-theme="light"] .admin-corte-chip-value {
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .admin-cortes-toolbar,
html[data-theme="light"] .admin-cortes-toolbar {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

html:not([data-theme="dark"]) .select-filter-custom,
html[data-theme="light"] .select-filter-custom {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

/* ==============================================================================
   ADMIN: PAGO A PROVEEDORES (CORTES SEMANALES)
   ============================================================================== */
.admin-cortes-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.admin-corte-chip {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-corte-chip-title {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.admin-corte-chip-value {
  font-size: 20px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.admin-cortes-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.admin-cortes-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-filter-custom {
  padding: 7px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle-light);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

/* ==============================================================================
   CARD DE DATOS FISCALES PICKTIC (CFDI 4.0 & CONSTANCIA SAT)
   ============================================================================== */
.fiscal-info-card {
  background: var(--bg-card);
  border: 1.5px solid var(--primary-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.fiscal-info-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.fiscal-info-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 14px;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.fiscal-csf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fiscal-csf-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.fiscal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  font-size: 12.5px;
}

.fiscal-item {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fiscal-item-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fiscal-item-value {
  font-weight: 700;
  color: var(--text-main);
  font-size: 12.5px;
  word-break: break-word;
}

.fiscal-item-value.mono {
  font-family: var(--font-mono);
  color: #3b82f6;
  font-size: 13.5px;
}

.fiscal-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.fiscal-action-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle-light);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.fiscal-action-btn:hover {
  background: var(--bg-card);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ==============================================================================
   TARJETAS Y MÓDULO DE PAGOS Y FACTURACIÓN A PROVEEDORES (ALTO CONTRASTE)
   ============================================================================== */
.prov-payment-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  position: relative;
  overflow: hidden;
}

.prov-payment-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
}

.prov-payment-card.active-alert {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.18);
}

.prov-payment-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
}

.prov-payment-card-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.prov-payment-card-periodo {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 3px;
}

.prov-payment-amount-box {
  background: rgba(16, 185, 129, 0.12);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.prov-payment-amount-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: #94a3b8;
}

.prov-payment-amount-value {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #34d399;
}

.prov-payment-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
}

.prov-payment-meta-item span:first-child {
  display: block;
  font-size: 10.5px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 3px;
}

.prov-payment-meta-item span:last-child {
  font-weight: 700;
  color: #fff;
}

.prov-payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 4px;
}

/* Light Mode Overrides para el Módulo de Pagos */
html:not([data-theme="dark"]) .prov-payment-card,
html[data-theme="light"] .prov-payment-card {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

html:not([data-theme="dark"]) .prov-payment-card:hover,
html[data-theme="light"] .prov-payment-card:hover {
  border-color: #6366f1 !important;
}

html:not([data-theme="dark"]) .prov-payment-card.active-alert,
html[data-theme="light"] .prov-payment-card.active-alert {
  border-color: #10b981 !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15) !important;
}

html:not([data-theme="dark"]) .prov-payment-card-header,
html[data-theme="light"] .prov-payment-card-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

html:not([data-theme="dark"]) .prov-payment-card-title,
html[data-theme="light"] .prov-payment-card-title {
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .prov-payment-card-periodo,
html[data-theme="light"] .prov-payment-card-periodo {
  color: #64748b !important;
}

html:not([data-theme="dark"]) .prov-payment-amount-box,
html[data-theme="light"] .prov-payment-amount-box {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}

html:not([data-theme="dark"]) .prov-payment-amount-label,
html[data-theme="light"] .prov-payment-amount-label {
  color: #065f46 !important;
}

html:not([data-theme="dark"]) .prov-payment-amount-value,
html[data-theme="light"] .prov-payment-amount-value {
  color: #047857 !important;
}

html:not([data-theme="dark"]) .prov-payment-meta-grid,
html[data-theme="light"] .prov-payment-meta-grid {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html:not([data-theme="dark"]) .prov-payment-meta-item span:first-child,
html[data-theme="light"] .prov-payment-meta-item span:first-child {
  color: #64748b !important;
}

html:not([data-theme="dark"]) .prov-payment-meta-item span:last-child,
html[data-theme="light"] .prov-payment-meta-item span:last-child {
  color: #0f172a !important;
}





/* Batch Weekly Payroll Email Modal & Progress Elements */
.batch-modal-card {
  max-width: 860px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
}

.batch-driver-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.batch-progress-bar-wrap {
  height: 10px;
  background: #060b17;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
}

.batch-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f2fe 0%, #00f5a0 100%);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.batch-log-terminal {
  background: #050811;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px;
  max-height: 130px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.6;
}

/* ==============================================================================
   PORTAL DEL REPARTIDOR (DRIVER DASHBOARD)
   ============================================================================== */
.repartidor-modal-card {
  max-width: 1150px;
  width: 96%;
  height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #080d1a;
  border: 1px solid rgba(0, 242, 254, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 242, 254, 0.15);
}

.repartidor-header-bar {
  padding: 16px 28px;
  background: rgba(18, 24, 42, 0.95);
  border-bottom: 1px solid rgba(0, 242, 254, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* Repartidor Bodega Hero */
.rep-bodega-hero {
  background: linear-gradient(135deg, rgba(13, 21, 39, 0.95), rgba(18, 30, 56, 0.92));
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.rep-bodega-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #00f2fe, #00c6ff);
}

.rep-bodega-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: center;
}

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

.rep-supervisor-badge {
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.rep-week-toolbar {
  background: rgba(14, 23, 42, 0.9);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.rep-payment-banner {
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  transition: all 0.3s ease;
}

.rep-payment-banner.pending {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(217, 119, 6, 0.04));
  border: 1px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.08);
}

.rep-payment-banner.paid {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.14), rgba(5, 150, 105, 0.04));
  border: 1px solid rgba(0, 245, 160, 0.45);
  box-shadow: 0 4px 20px rgba(0, 245, 160, 0.1);
}

/* ==============================================================================
   PORTAL ENCARGADO DE BODEGA & CONSULTA POR RANGO
   ============================================================================== */
.role-tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.role-tab-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.role-tab-btn.active-prov {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.enc-day-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.2s ease;
}
.enc-day-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(251, 191, 36, 0.5);
  transform: translateY(-2px);
}
.enc-day-pill.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.enc-subtab-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.enc-subtab-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.enc-subtab-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.enc-stepper-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.enc-stepper-btn:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #fbbf24;
}

/* Adaptación del Portal de Encargados a Tema Claro y Tema Oscuro */
html[data-theme="light"] .enc-day-pill,
html:not([data-theme="dark"]) .enc-day-pill {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}
html[data-theme="light"] .enc-day-pill:hover,
html:not([data-theme="dark"]) .enc-day-pill:hover {
  background: #f8fafc !important;
  border-color: #f59e0b !important;
}
html[data-theme="light"] .enc-day-pill.active,
html:not([data-theme="dark"]) .enc-day-pill.active {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #d97706 !important;
  color: #b45309 !important;
}

html[data-theme="light"] .enc-subtab-btn,
html:not([data-theme="dark"]) .enc-subtab-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}
html[data-theme="light"] .enc-subtab-btn:hover,
html:not([data-theme="dark"]) .enc-subtab-btn:hover {
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}
html[data-theme="light"] .enc-subtab-btn.active,
html:not([data-theme="dark"]) .enc-subtab-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  border-color: #f59e0b !important;
}

html[data-theme="light"] .enc-stepper-btn,
html:not([data-theme="dark"]) .enc-stepper-btn {
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
html[data-theme="light"] .enc-stepper-btn:hover,
html:not([data-theme="dark"]) .enc-stepper-btn:hover {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #b45309 !important;
}

@media print {
  body * {
    visibility: hidden;
  }
  #enc-range-report-print-area, #enc-range-report-print-area * {
    visibility: visible;
  }
  #enc-range-report-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    color: #000 !important;
    background: #fff !important;
  }
}



