:root {
  --primary: #1565C0;
  --primary-dark: #0A2E5C;
  --primary-deeper: #071E3D;
  --primary-mid: #1976D2;
  --primary-light: #E3EEFA;
  --primary-glow: rgba(21, 101, 192, 0.18);
  --accent: #2196F3;
  --white: #ffffff;
  --text: #0B1D33;
  --text-soft: #344F69;
  --line: #C5D8EC;
  --success: #1B8E5F;
  --warning: #F59F00;
  --danger: #D62828;
  --gradient-hero: linear-gradient(135deg, #071E3D 0%, #0A2E5C 40%, #1565C0 100%);
  --gradient-section: linear-gradient(180deg, #F0F6FD 0%, #FFFFFF 100%);
  --gradient-dark-section: linear-gradient(180deg, #0B1D33 0%, #0F2B4A 100%);
  --shadow-card: 0 8px 32px rgba(10, 46, 92, 0.10);
  --shadow-card-hover: 0 20px 48px rgba(10, 46, 92, 0.18);
  --shadow-btn: 0 6px 20px rgba(21, 101, 192, 0.30);
  --radius: 16px;
  --radius-sm: 10px;
  --module-accent-start: #5B7CF7;
  --module-accent-end: #22A6E6;
  --module-soft-bg: linear-gradient(180deg, #F7FBFF 0%, #F0F6FF 100%);
  --module-border-strong: #B8D0EB;
  --public-nav-bg: rgba(255, 255, 255, 0.9);
  --public-nav-border: rgba(21, 101, 192, 0.14);
  --public-nav-brand: #063970;
  --public-nav-link: rgba(10, 46, 92, 0.74);
  --public-nav-link-hover-bg: rgba(21, 101, 192, 0.09);
  --public-nav-mobile-panel-bg: rgba(251, 253, 255, 0.98);
  --public-nav-mobile-shadow: 0 20px 50px rgba(10, 46, 92, 0.12), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  --public-nav-scroll-thumb: rgba(21, 101, 192, 0.32);
  --public-hamburger-bg: rgba(21, 101, 192, 0.1);
  --public-hamburger-border: rgba(21, 101, 192, 0.18);
  --public-hamburger-icon: #1565C0;
  --public-hamburger-shadow: 0 2px 10px rgba(21, 101, 192, 0.12);
  --public-nav-link-active-bg: rgba(21, 101, 192, 0.11);
  --public-nav-active-text: #0d4f9e;
  --public-toggle-bg: rgba(21, 101, 192, 0.08);
  --public-toggle-border: rgba(21, 101, 192, 0.15);
  --public-toggle-fg: #0a2e5c;
  --public-toggle-active-bg: rgba(21, 101, 192, 0.16);
}

body[data-theme="light"] {
  --public-nav-bg: rgba(255, 255, 255, 0.92);
  --public-nav-link: rgba(10, 46, 92, 0.72);
}

body[data-theme="dark"] {
  --text: #E6F0FF;
  --text-soft: #A8BEDA;
  --line: #2B3E58;
  --white: #0F1C2E;
  --primary-light: #14263C;
  --shadow-card: 0 8px 30px rgba(2, 7, 16, 0.45);
  --shadow-card-hover: 0 16px 40px rgba(2, 7, 16, 0.58);
  --module-accent-start: #5A74D8;
  --module-accent-end: #2690CC;
  --module-soft-bg: linear-gradient(180deg, #182C45 0%, #13253B 100%);
  --module-border-strong: #486A8F;
  --public-nav-bg: rgba(14, 26, 44, 0.94);
  --public-nav-border: rgba(255, 255, 255, 0.1);
  --public-nav-brand: #f0f6ff;
  --public-nav-link: rgba(228, 238, 252, 0.9);
  --public-nav-link-hover-bg: rgba(255, 255, 255, 0.09);
  --public-nav-mobile-panel-bg: rgba(17, 30, 48, 0.98);
  --public-nav-mobile-shadow: 0 24px 56px rgba(0, 0, 0, 0.42);
  --public-nav-scroll-thumb: rgba(120, 175, 245, 0.42);
  --public-hamburger-bg: rgba(76, 144, 230, 0.2);
  --public-hamburger-border: rgba(255, 255, 255, 0.16);
  --public-hamburger-icon: #e8f2ff;
  --public-hamburger-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  --public-nav-link-active-bg: rgba(33, 150, 243, 0.22);
  --public-nav-active-text: #ffffff;
  --public-toggle-bg: rgba(22, 45, 74, 0.85);
  --public-toggle-border: rgba(255, 255, 255, 0.12);
  --public-toggle-fg: rgba(255, 255, 255, 0.92);
  --public-toggle-active-bg: rgba(255, 255, 255, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, sans-serif;
  color: var(--text);
  background: #F5F9FF;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body[data-theme="dark"] {
  background: #08111f;
  color: var(--text);
}

a, button { transition: all 0.25s cubic-bezier(.4,0,.2,1); }

img { max-width: 100%; }

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.top-nav .container {
  width: min(1360px, 96%);
}

/* ─── NAV ─── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--public-nav-bg);
  border-bottom: 1px solid var(--public-nav-border);
  backdrop-filter: blur(18px) saturate(1.45);
  -webkit-backdrop-filter: blur(18px) saturate(1.45);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  flex-wrap: nowrap;
  position: relative;
}

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--public-nav-brand);
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

body[data-theme="dark"] .brand {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.brand-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

nav {
  display: flex;
  gap: 0.05rem;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
}

nav::-webkit-scrollbar { display: none; }

nav a {
  color: var(--public-nav-link);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0.38rem;
  border-radius: 8px;
  white-space: nowrap;
}

nav a:hover {
  color: var(--public-nav-brand);
  background: var(--public-nav-link-hover-bg);
}

nav a.active {
  color: var(--public-nav-active-text);
  background: var(--public-nav-link-active-bg);
}

nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

nav a:hover::after { width: 60%; }
nav a.active::after { width: 70%; }

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: var(--public-hamburger-bg);
  border: 1px solid var(--public-hamburger-border);
  color: var(--public-hamburger-icon);
  cursor: pointer;
  padding: 0;
  border-radius: 10px;
  box-shadow: var(--public-hamburger-shadow);
}

.hamburger:hover {
  filter: brightness(1.05);
  transform: scale(1.02);
}

.hamburger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hamburger svg { width: 22px; height: 22px; }

.nav-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

#open-auth {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.58rem 0.95rem;
  font-size: 0.86rem;
}

.theme-toggle,
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: var(--public-toggle-bg);
  border: 1px solid var(--public-toggle-border);
}

.theme-option,
.lang-option {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--public-toggle-fg);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-option .flag-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(10, 46, 92, 0.18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.lang-option .flag-co {
  background: linear-gradient(
    to bottom,
    #fcd116 0%,
    #fcd116 50%,
    #003893 50%,
    #003893 75%,
    #ce1126 75%,
    #ce1126 100%
  );
}

.lang-option .flag-us {
  background:
    linear-gradient(to bottom, #3c3b6e 0 52%, transparent 52% 100%),
    repeating-linear-gradient(
      to bottom,
      #b22234 0 10%,
      #ffffff 10% 20%
    );
  background-size: 55% 55%, 100% 100%;
  background-position: left top, center;
  background-repeat: no-repeat;
}

.theme-option.active,
.lang-option.active {
  background: var(--public-toggle-active-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

body[data-theme="light"] .theme-option.active,
body[data-theme="light"] .lang-option.active {
  box-shadow: inset 0 0 0 1px rgba(21, 101, 192, 0.2);
}

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1601584115197-04ecc0da31d7?q=80&w=2000&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  mix-blend-mode: luminosity;
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(7, 30, 61, 0.95) 0%, rgba(10, 46, 92, 0.80) 50%, rgba(21, 101, 192, 0.60) 100%);
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-floating {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
  color: white;
}

.hero-floating-1 {
  width: 180px;
  height: 180px;
  right: 8%;
  top: 15%;
  animation: floatSlow 12s ease-in-out infinite;
}

.hero-floating-2 {
  width: 120px;
  height: 120px;
  left: 5%;
  bottom: 18%;
  animation: floatSlow 10s ease-in-out infinite 2s;
}

.hero-floating-3 {
  width: 90px;
  height: 90px;
  right: 25%;
  bottom: 10%;
  animation: floatSlow 14s ease-in-out infinite 4s;
}

.hero-aurora {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
  animation: pulseFloat 8s ease-in-out infinite;
}

.hero-aurora-left {
  width: 400px;
  height: 400px;
  left: -5%;
  top: 5%;
  background: radial-gradient(circle at center, #1565C0, transparent 70%);
}

.hero-aurora-right {
  width: 500px;
  height: 500px;
  right: -8%;
  bottom: -5%;
  background: radial-gradient(circle at center, #0D47A1, transparent 70%);
  animation-delay: 2s;
}

.hero-content {
  position: relative;
  color: var(--white);
  padding: 3rem 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  letter-spacing: 0.2px;
}

.hero-kicker-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  max-width: 720px;
  letter-spacing: -0.5px;
}

.hero-h1-accent {
  background: linear-gradient(135deg, #64B5F6, #42A5F5, #2196F3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero > .container p {
  max-width: 580px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.78);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-stats {
  margin-top: 2.5rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-width: 680px;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
}

.hero-stat-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 7px;
  border-radius: 10px;
  background: rgba(33, 150, 243, 0.20);
  color: #64B5F6;
}

.hero-stat-text span {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.hero-stat-text b {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

/* ─── WAVE DIVIDERS ─── */
.wave-divider {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: -2px;
}

.wave-divider-flip {
  transform: scaleY(-1);
  margin-top: -2px;
  margin-bottom: 0;
}

/* ─── SECTIONS ─── */
.section {
  padding: 4.5rem 0;
  position: relative;
}

/* Light strip behind content (About, Contact, wave-adjacent sections). Dark theme via body[data-theme="dark"] #… */
.section-soft-alt {
  background: #F5F9FF;
}

.section.light {
  background: var(--primary-light);
}

.section-dark {
  background: var(--gradient-dark-section);
  color: var(--white);
}

.section-head {
  max-width: 640px;
  margin-bottom: 2rem;
}

.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.section-dark .section-head h2 { color: var(--white); }
.section-dark .section-head p { color: rgba(255,255,255,0.70); }

.section-head p {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.6;
}

.section-icon-header {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.section-icon {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.section-dark .section-icon {
  background: rgba(255,255,255,0.12);
  color: var(--accent);
}

/* ─── GRIDS ─── */
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 1.25rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

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

/* ─── CARDS ─── */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-card);
  position: relative;
}

.glass-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
}

.lift-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.25s ease;
}

.lift-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: #90CAF9;
}

.lift-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.35), transparent 42%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.lift-card:hover::after { transform: translateX(120%); }

.card-icon-top {
  width: 48px;
  height: 48px;
  padding: 10px;
  border-radius: 14px;
  margin-bottom: 0.85rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 6px 18px var(--primary-glow);
}

.section-dark .card-icon-top {
  background: rgba(33, 150, 243, 0.15);
  color: var(--accent);
  box-shadow: none;
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.card p { line-height: 1.6; }

/* ─── FLEET CARDS ─── */
.fleet-card {
  text-align: center;
  padding: 2rem 1.4rem;
  border-top: 3px solid var(--primary);
}

.fleet-card-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  padding: 14px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
  transition: all 0.3s ease;
}

.fleet-card:hover .fleet-card-icon {
  background: var(--primary);
  color: var(--white);
  transform: scale(1.1);
}

.fleet-card h3 {
  font-size: 1.25rem;
  color: var(--primary-dark);
}

.fleet-card .fleet-specs {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.fleet-spec {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.fleet-spec-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  color: var(--primary);
}

/* ─── SERVICES CARDS ─── */
.service-card {
  padding: 1.8rem 1.4rem;
  border-left: 4px solid var(--primary);
}

.section-dark .service-card {
  background: rgba(255,255,255,0.04);
  border-color: var(--accent);
}

/* ─── COVERAGE ─── */
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
}

.coverage-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--line);
  font-weight: 500;
  transition: all 0.25s ease;
}

.coverage-item:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateX(4px);
}

.coverage-item:hover .coverage-dot { background: var(--white); }

.coverage-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: var(--primary);
  transition: background 0.25s ease;
}

.coverage-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  color: var(--primary);
}

.coverage-item:hover .coverage-icon { color: var(--white); }

/* ─── HIERARCHY ─── */
.hierarchy-section {
  background: var(--gradient-section);
}

.hierarchy-grid { align-items: stretch; }

.hierarchy-card {
  background: linear-gradient(165deg, #ffffff 0%, #f0f6fd 80%);
  border-color: #B9D9F6;
  transform-style: preserve-3d;
  will-change: transform;
  text-align: center;
  padding: 1.6rem 1.2rem;
}

.avatar-oval {
  width: 110px;
  height: 140px;
  margin: 0 auto 0.85rem;
  border-radius: 999px;
  padding: 3px;
  background: linear-gradient(165deg, var(--accent), var(--primary-dark));
  box-shadow: 0 12px 28px rgba(10, 46, 92, 0.20);
}

.avatar-oval img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid var(--white);
}

.photo-note {
  display: block;
  margin-bottom: 0.45rem;
  color: #5a7d9b;
  font-size: 0.72rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(21, 101, 192, 0.08);
  color: var(--primary-dark);
  border: 1px solid rgba(21, 101, 192, 0.15);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.hierarchy-card h3 {
  margin: 0 0 0.4rem;
  color: var(--primary-dark);
}

.hierarchy-card p {
  margin: 0;
  color: var(--text-soft);
}

/* ─── TRUSTED ─── */
.section-trusted {
  background: var(--gradient-section);
}

.logo-marquee {
  margin: 1.2rem 0 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}

.logo-track {
  width: max-content;
  display: flex;
  gap: 0.8rem;
  padding: 0.6rem;
  animation: marquee 22s linear infinite;
}

.logo-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 8.8rem;
  padding: 0.62rem 0.8rem;
  border-radius: 16px;
  background: var(--primary-light);
  border: 1px solid var(--line);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.ally-logo {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(21, 101, 192, 0.25);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.22);
}

.ally-name {
  font-weight: 700;
  line-height: 1.15;
}

.trusted-grid { margin-top: 0.5rem; }

.mini-metric {
  text-align: center;
  padding: 1.5rem 1rem;
}

.mini-metric-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 0.5rem;
  padding: 8px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
}

.mini-metric h3 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -1px;
}

.mini-metric p {
  margin: 0.3rem 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

/* ─── TESTIMONIALS ─── */
.testimonial-card {
  position: relative;
  overflow: hidden;
  padding: 1.6rem 1.4rem;
}

.testimonial-card::before {
  content: "\201C";
  position: absolute;
  right: 1rem;
  top: -0.8rem;
  font-size: 6rem;
  color: rgba(21, 101, 192, 0.08);
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 0.65rem;
}

.testimonial-star {
  width: 18px;
  height: 18px;
  color: #F59F00;
}

.quote {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.65;
  font-style: italic;
}

.testimonial-meta {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.testimonial-meta-text {
  display: grid;
  gap: 0.15rem;
}

.testimonial-meta-text strong { font-size: 0.92rem; }
.testimonial-meta-text span {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.success-cases {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.success-case-card h3 {
  margin: 0.35rem 0 0.45rem;
}

.success-case-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.success-case-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(21, 101, 192, 0.08);
  border: 1px solid rgba(21, 101, 192, 0.18);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  font-size: 0.78rem;
  color: #204d7f;
}

.success-case-metrics b {
  font-size: 0.84rem;
}

/* ─── GALLERY / MEDIA ─── */
.section-gallery { position: relative; }

.media-card {
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius);
}

.media-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.media-copy {
  padding: 1rem 1.2rem 1.2rem;
}

.media-copy h3 {
  margin: 0 0 0.35rem;
  color: var(--primary-dark);
}

.media-copy p {
  margin: 0;
  color: var(--text-soft);
}

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

.section-media {
  background: var(--gradient-section);
}

.video-card { padding: 1rem; }

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--primary-light);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─── CONTACT ─── */
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contact-info-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 8px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
}

.contact-info-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.contact-info-item strong {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-soft);
  margin-bottom: 0.15rem;
}

/* ─── BUTTONS ─── */
.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.side-link:focus-visible {
  outline: 3px solid rgba(21, 101, 192, 0.35);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-mid), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(21, 101, 192, 0.35);
}

.btn-icon {
  width: 18px;
  height: 18px;
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
  backdrop-filter: blur(8px);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255,255,255,0.55);
}

.btn-outline {
  background: var(--white);
  color: var(--primary-dark);
  border-color: var(--line);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-text {
  background: transparent;
  color: var(--primary-dark);
}

/* ─── FORMS ─── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.required-with-marker {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.required-marker {
  color: #D62828;
  font-weight: 800;
  line-height: 1;
}

.field-invalid {
  border-color: #d64545 !important;
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.14) !important;
}

.field-error {
  display: block;
  margin-top: 0.35rem;
  color: #be2f2f;
  font-size: 0.76rem;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="password"] {
  text-transform: none;
  letter-spacing: normal;
}

/*
 * Contraseñas: siempre sin forzar mayúsculas en pantalla.
 * En registro, .auth-register-form aplica uppercase a los input que NO son password;
 * el botón «Mostrar» cambia el campo a type="text», por eso esa regla aplicaba
 * mayúsculas también al escribir la contraseña visible.
 */
#form-register input[name="password"],
#form-register input[name="passwordConfirm"],
#form-register .auth-password-input,
#form-login input[name="password"],
#form-admin-user-create input[name="password"] {
  text-transform: none !important;
  letter-spacing: normal !important;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.full { grid-column: 1 / -1; }
.muted { color: var(--text-soft); }
.hidden { display: none !important; }

/* Public contact form refinements */
#contact .contact-form-head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

#contact .container.grid-2 {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  align-items: start;
}

#contact .contact-form-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

#contact .contact-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

#contact .contact-trust-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #1f4e81;
  background: rgba(21, 101, 192, 0.1);
  border: 1px solid rgba(21, 101, 192, 0.22);
}

#contact .form-grid {
  gap: 0.95rem;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}

#contact .form-grid label {
  border: 1px solid rgba(21, 101, 192, 0.2);
  border-radius: 12px;
  padding: 0.72rem 0.8rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 5px 14px rgba(10, 46, 92, 0.06);
}

#contact .form-grid label:focus-within {
  border-color: rgba(21, 101, 192, 0.52);
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.14);
}

#contact .form-grid input,
#contact .form-grid select,
#contact .form-grid textarea {
  border: 1px solid rgba(21, 101, 192, 0.22);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.75rem 0.9rem;
}

#contact .form-grid textarea {
  min-height: 130px;
  resize: vertical;
}

#contact .contact-submit-wrap {
  margin-top: -0.25rem;
}

#contact .contact-submit-wrap .muted {
  display: block;
  font-size: 0.78rem;
  line-height: 1.45;
}

#contact .btn.btn-primary.full {
  justify-content: center;
  font-size: 0.95rem;
  padding-block: 0.86rem;
}

#contact .contact-submit-btn {
  border-radius: 12px;
  letter-spacing: 0.25px;
  box-shadow: 0 12px 26px rgba(13, 71, 161, 0.26);
}

#contact .contact-form-premium label span {
  font-weight: 700;
  letter-spacing: 0.1px;
}

#contact .contact-step-indicator {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

#contact .contact-step-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #2e5f95;
  background: rgba(21, 101, 192, 0.08);
  border: 1px solid rgba(21, 101, 192, 0.18);
}

#contact .contact-step-chip.active {
  color: #ffffff;
  background: linear-gradient(135deg, #1565c0, #0d47a1);
  border-color: transparent;
}

#contact .contact-step-pane {
  display: none;
}

#contact .contact-step-pane.active {
  display: block;
}

#contact .contact-step-actions {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

#contact .contact-step-actions [data-step-submit] {
  display: none;
}

#contact .contact-step-actions.is-last [data-step-next] {
  display: none;
}

#contact .contact-step-actions.is-last [data-step-submit] {
  display: inline-flex;
  justify-content: center;
}

#contact .contact-step-actions.is-first [data-step-prev] {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 1100px) {
  #contact .container.grid-2 {
    grid-template-columns: 1fr;
  }

  #contact .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

body.portal-mode .top-nav,
body.portal-mode .site-footer,
body.portal-mode .whatsapp-fab {
  display: none !important;
}

/* ─── REVEAL ANIMATION ─── */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px) scale(0.992);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ─── PORTAL ─── */
.portal-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 1.4rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: linear-gradient(180deg, #060F1F 0%, #0B1D33 50%, #0F2847 100%);
  /* Siempre texto claro sobre fondo oscuro (no usar var(--white): en tema oscuro global --white es oscuro). */
  color: #e8f2ff;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem 1rem;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  max-width: 32px;
  max-height: 32px;
  flex-shrink: 0;
  padding: 5px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
}

.sidebar-brand h2 {
  font-size: 1.05rem;
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #ffffff;
}

.sidebar-brand p {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(232, 242, 255, 0.82);
  font-weight: 500;
}

.sidebar-drawer-tagline {
  display: none;
  margin: -0.15rem 0 0.5rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(147, 197, 255, 0.85);
  background: linear-gradient(90deg, rgba(33, 150, 243, 0.2), transparent);
  border-radius: 8px;
  border-left: 3px solid rgba(100, 181, 246, 0.85);
}

/* Barra superior portal (titulo + hamburguesa en movil) */
.portal-header-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.portal-header-bar h1 {
  flex: 1;
  min-width: 0;
}

.portal-menu-btn {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(145deg, rgba(33, 150, 243, 0.35) 0%, rgba(21, 101, 192, 0.55) 100%);
  box-shadow:
    0 4px 18px rgba(21, 101, 192, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portal-menu-btn:hover {
  transform: scale(1.04);
  box-shadow:
    0 8px 26px rgba(33, 150, 243, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.portal-menu-bun {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 22px;
}

.portal-menu-line {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  transform-origin: center;
}

body.portal-drawer-open .portal-menu-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.portal-drawer-open .portal-menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

body.portal-drawer-open .portal-menu-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.portal-nav-backdrop {
  display: none;
}

@media (min-width: 921px) {
  .portal-menu-btn {
    display: none !important;
  }
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.30);
  padding: 0.8rem 0.5rem 0.3rem;
  margin: 0;
}

.side-link {
  text-align: left;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  background: transparent;
  color: rgba(255,255,255,0.60);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
}

.side-link:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.95);
}

.side-link.active {
  background: linear-gradient(135deg, var(--primary), rgba(21,101,192,0.85));
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(21,101,192,0.30);
  font-weight: 600;
}

.side-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  max-width: 20px;
  max-height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
  display: inline-block;
  vertical-align: middle;
}

.side-link svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px;
  max-height: 20px;
  flex-shrink: 0;
}

.side-link.active .side-icon { opacity: 1; }
.side-link:hover .side-icon { opacity: 1; }

.sidebar-spacer { flex: 1; }

.sidebar-logout {
  margin-top: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-theme-box {
  margin-top: 0.7rem;
  padding: 0.65rem 0.55rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-theme-title {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  font-weight: 700;
}

.portal-main {
  padding: 1.8rem 2rem;
  background: #F0F4FA;
  overflow-y: auto;
}

.portal-header {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.portal-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.2rem 0 0.2rem;
}

.portal-header h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.3px;
}

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

.kpi-grid:empty {
  display: none;
}

.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 5.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.kpi-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 10px;
  border-radius: 12px;
  color: var(--white);
}

.kpi-icon svg { width: 100%; height: 100%; }

/* Tonos suaves (mejor contraste con icono blanco) */
.kpi-icon-warning { background: linear-gradient(135deg, #e8a83a, #d97706); }
.kpi-icon-success { background: linear-gradient(135deg, #34a884, #26966f); }
.kpi-icon-primary { background: linear-gradient(135deg, #4f83d6, #3d6fb8); }
.kpi-icon-teal { background: linear-gradient(135deg, #39a3b8, #2d8a9d); }
.kpi-icon-violet { background: linear-gradient(135deg, #8b87e8, #6d62d0); }
.kpi-icon-rose { background: linear-gradient(135deg, #e891a8, #d97892); }
.kpi-icon-slate { background: linear-gradient(135deg, #8b9bb8, #6b7c99); }

.kpi-data span {
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--text) 70%, #ffffff 30%);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.kpi-data b,
.kpi-data .kpi-value {
  display: block;
  font-size: clamp(1rem, 2.4vw, 1.55rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.25;
  word-break: break-word;
}

/* Portal cards */
.p-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.p-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #F8FAFD, #F0F4FA);
}

.p-card-header-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.p-card-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 7px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
}

.p-card-icon svg { width: 100%; height: 100%; }

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

.p-card-header p {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.p-card-body {
  padding: 1.2rem 1.4rem;
}

.p-card + .p-card { margin-top: 1rem; }

/* En grillas, el margen entre .p-card rompe la alineacion de filas; el hueco lo cubre gap */
.dash-grid > .p-card,
.hiring-actions-grid > .p-card,
.hiring-data-grid > .p-card,
.payroll-actions-grid > .p-card {
  margin-top: 0;
}

.p-card-alert {
  border-left: 4px solid var(--warning);
}

.p-card-alert .p-card-icon {
  background: linear-gradient(135deg, #F59F00, #E67700);
}

/* Portal tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th {
  font-weight: 700;
  color: var(--text-soft);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.7rem 0.6rem;
  border-bottom: 2px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid #EDF2F7;
  text-align: left;
  vertical-align: middle;
  color: var(--text);
}

tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: #F5F8FC; }
tbody tr:last-child td { border-bottom: none; }

.table-wrap {
  overflow-x: auto;
  margin: 0 -1.4rem;
  padding: 0 1.4rem;
}

/* Status badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-pendiente { background: linear-gradient(135deg, #F59F00, #E67700); }
.status-viaje_asignado { background: linear-gradient(135deg, #1B8E5F, #157A50); }
.status-en_transito { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.status-espera_standby { background: linear-gradient(135deg, #8a5b00, #6d4800); }
.status-completada { background: linear-gradient(135deg, #0e7490, #0c5f74); }
.status-cerrada { background: linear-gradient(135deg, #334155, #1e293b); }
.status-cancelada, .status-rechazada { background: linear-gradient(135deg, #D62828, #B02020); }

.status-pretty {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  overflow: hidden;
}

.status-pretty .btn-icon {
  width: 14px;
  height: 14px;
  min-width: 14px;
}

.status-road::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 4px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.85) 0 7px, transparent 7px 12px);
  animation: roadMove 1.8s linear infinite;
}

@keyframes roadMove {
  from { background-position-x: 0; }
  to { background-position-x: 24px; }
}

/* Portal buttons */
.toolbar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.module-filters {
  margin-bottom: 1rem;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(21, 101, 192, 0.2);
  background: linear-gradient(135deg, rgba(227, 240, 255, 0.7), rgba(247, 251, 255, 0.95));
  box-shadow: 0 10px 26px rgba(9, 30, 66, 0.08);
  animation: moduleFadeUp 0.35s ease both;
}

.module-filters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
}

.module-filters-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #0d3f86;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.module-filters-title .btn-icon {
  width: 15px;
  height: 15px;
}

.module-filters-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1d4f91;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(21, 101, 192, 0.2);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
}

.module-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
}

.module-filter-field {
  display: grid;
  gap: 0.26rem;
}

.module-filter-field span {
  font-size: 0.72rem;
  font-weight: 700;
  color: #325176;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.module-filter-field input,
.module-filter-field select {
  border: 1px solid rgba(21, 101, 192, 0.24);
  border-radius: 10px;
  padding: 0.48rem 0.62rem;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
}

.module-filter-field input:focus,
.module-filter-field select:focus {
  outline: none;
  border-color: rgba(21, 101, 192, 0.5);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

.module-filters-actions {
  margin-top: 0.62rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.45rem;
  align-items: center;
}

.module-filter-quick-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.filter-pill {
  border: 1px solid rgba(21, 101, 192, 0.22);
  background: #fff;
  color: #1f436f;
  border-radius: 999px;
  padding: 0.24rem 0.56rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.filter-pill:hover {
  border-color: rgba(21, 101, 192, 0.6);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: linear-gradient(135deg, #1565c0, #0d47a1);
  border-color: transparent;
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-sm .btn-icon { width: 14px; height: 14px; }

.btn-approve {
  background: linear-gradient(135deg, #26a269, #1b8e5f);
  color: var(--white);
  border: none;
  box-shadow: 0 8px 16px rgba(27, 142, 95, 0.26);
}

.btn-approve:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-reject {
  background: linear-gradient(135deg, #e54848, #cc2f2f);
  color: var(--white);
  border: none;
  box-shadow: 0 8px 16px rgba(204, 47, 47, 0.24);
}

.btn-reject:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-action {
  background: linear-gradient(135deg, #5f82f6, #2f9ee0);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 18px rgba(47, 116, 198, 0.22);
}

.btn-action:hover {
  transform: translateY(-1px);
  filter: saturate(1.08) brightness(1.03);
  box-shadow: 0 14px 24px rgba(37, 103, 181, 0.28);
}

.toolbar .btn {
  border-radius: 10px;
}

/* Portal forms */
.p-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.p-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.field-label .btn-icon {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.p-form input, .p-form select, .p-form textarea {
  border: 1px solid #D5DDE8;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  background: #FAFBFD;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.p-form input:focus, .p-form select:focus, .p-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--white);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-soft);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.8rem;
  padding: 10px;
  border-radius: 14px;
  background: #EDF2F7;
  color: #94A3B8;
}

.empty-state p {
  margin: 0;
  font-size: 0.92rem;
}

/* Timer badge */
.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #FFF3CD;
  color: #8a5b00;
  font-size: 0.8rem;
  font-weight: 700;
}

.timer-badge svg { width: 14px; height: 14px; }

/* Quick stat in dashboard */
.dash-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: stretch; }

.dash-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid #EDF2F7;
}

.dash-stat-row:last-child { border-bottom: none; }

.dash-stat-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

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

.dash-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

/* Perm badge */
/* Permission badges */
.perm-badge {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: #EDF2F7;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 600;
  margin: 2px;
}

/* ─── User cards ─── */
.users-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.users-hero-item {
  background: linear-gradient(135deg, #ffffff, #f3f7fc);
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 4px 18px rgba(15, 43, 74, 0.08);
}

.users-hero-item span {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.users-hero-item strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 800;
}

.users-actions {
  margin-bottom: 0.9rem;
}

.users-action-btn {
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  border-color: #d9e5f2;
  font-weight: 600;
}

.users-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.8rem;
}

.user-card {
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  border: 1px solid #d9e3ef;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.2s ease;
}

.user-card:hover {
  border-color: #b9d0e8;
  box-shadow: 0 14px 30px rgba(10, 46, 92, 0.15);
  transform: translateY(-2px);
}

.pending-card {
  border-left: 4px solid var(--warning);
  background: linear-gradient(135deg, #FFFDF5, #FFFFFF);
}

.user-card-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.65rem;
}

.user-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.pending-avatar {
  background: linear-gradient(135deg, #F59F00, #E67700);
}

.user-card-info {
  flex: 1;
  min-width: 0;
}

.user-card-info h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-card-info p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.user-grid-pending .user-card {
  background: linear-gradient(135deg, #fffef8, #fff);
}

.role-chip {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--role-color) 12%, transparent);
  color: var(--role-color);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border: 1px solid color-mix(in srgb, var(--role-color) 25%, transparent);
}

.user-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid #F1F5F9;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.user-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.user-card-meta svg {
  width: 14px !important;
  height: 14px !important;
  opacity: 0.5;
}

.user-card-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding-top: 0.5rem;
}

.perm-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  background: #EEF2FF;
  color: #4338CA;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid #E0E7FF;
}

.perm-tag-more {
  background: #F1F5F9;
  color: #334155;
  border-color: #E2E8F0;
}

.user-card-actions {
  display: flex;
  gap: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid #F1F5F9;
  margin-top: 0.5rem;
}

/* Permission fieldset */
.perm-fieldset {
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1rem;
  margin: 0;
}

.perm-fieldset legend {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  padding: 0 0.4rem;
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.4rem;
}

.perm-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
}

.perm-check:hover {
  background: #F1F5F9;
}

.perm-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  border-radius: 4px;
}

.perm-check span {
  color: var(--text);
  font-size: 0.82rem;
  display: grid;
  gap: 0.1rem;
}

.perm-check span strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}

.perm-check span small {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.2;
}

/* Company chips */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.5rem;
}

.company-chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  background: #FAFBFD;
  transition: border-color 0.2s ease;
}

.company-chip:hover {
  border-color: var(--primary);
}

.company-chip strong {
  font-size: 0.9rem;
  color: var(--text);
}

.company-chip .muted {
  font-size: 0.78rem;
}

.datetime-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #F8FAFC;
}

.trip-preview {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: #F8FAFC;
}

.trip-preview p {
  margin: 0.2rem 0;
  font-size: 0.86rem;
}

/* ─── MODAL ─── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 30, 61, 0.55);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 60;
}

.modal-card {
  width: min(640px, 92%);
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 1.4rem;
  box-shadow: 0 32px 64px rgba(7, 30, 61, 0.25);
}

.modal-card-auth {
  width: min(760px, 94%);
  max-height: min(92vh, 880px);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.modal-card-auth .modal-head,
.modal-card-auth .tabs {
  flex-shrink: 0;
}

#auth-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.35rem;
  padding-right: 0.2rem;
}

.auth-modal-title-wrap {
  display: grid;
  gap: 0.25rem;
}

.auth-modal-subtitle {
  margin: 0;
  font-size: 0.84rem;
}

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

.modal-card-edit {
  width: min(1040px, 97%);
}

.modal-edit-form {
  margin-top: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.modal-edit-form label > span {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-edit-form label {
  min-width: 0;
}

.modal-edit-form select {
  font-size: 0.83rem;
}

.modal-edit-form option {
  font-size: 0.82rem;
}

.modal-edit-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 120;
  display: grid;
  gap: 0.6rem;
  width: min(360px, 92vw);
}

.toast {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(7, 30, 61, 0.94);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 14px 30px rgba(7, 30, 61, 0.28);
  padding: 0.8rem 0.9rem;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.toast-success { border-left: 4px solid #22c55e; }
.toast-error { border-left: 4px solid #ef4444; }
.toast-info { border-left: 4px solid #38bdf8; }

.auth-form {
  gap: 0.8rem;
}

.auth-header-premium {
  margin-bottom: 0.8rem;
}

.auth-header-premium h3 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--primary-dark);
}

.auth-header-premium .muted {
  margin: 0.28rem 0 0;
  font-size: 0.84rem;
}

.auth-pane {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.auth-register-form {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Registro cliente: altura única para inputs/select (teléfono compuesto se alinea al mismo alto) */
#form-register.auth-register-form {
  --reg-control-h: 2.75rem;
  align-items: start;
}

#form-register.auth-register-form input:not([type="checkbox"]):not([type="hidden"]):not(.phone-national-input),
#form-register.auth-register-form select:not(.phone-cc-select) {
  min-height: var(--reg-control-h);
  height: var(--reg-control-h);
  box-sizing: border-box;
}

#form-register.auth-register-form input[type="date"] {
  padding-block: 0;
}

#form-register.auth-register-form .password-field .auth-password-input {
  min-height: var(--reg-control-h);
  height: var(--reg-control-h);
}

#form-register.auth-register-form .password-field {
  align-items: stretch;
}

#form-register.auth-register-form > label,
#form-register.auth-register-form .register-doc-section > label,
#form-register.auth-register-form #register-doc-persona.register-doc-block--natural > label,
#form-register.auth-register-form #register-doc-empresa.register-doc-block--empresa > label {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-width: 0;
}

#form-register.auth-register-form input:not([type="checkbox"]):not([type="hidden"]),
#form-register.auth-register-form select,
#form-register.auth-register-form .phone-input-professional,
#form-register.auth-register-form .password-field {
  width: 100%;
}

#form-register.auth-register-form .password-field .btn {
  min-height: var(--reg-control-h);
}

/* Registro: tipo de persona + documentos misma rejilla y mismo ancho que el resto del formulario */
.auth-register-form .register-doc-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  align-items: start;
}

.auth-register-form .register-doc-section > label {
  min-width: 0;
}

/* Persona natural: tres columnas alineadas (tipo persona | tipo doc | número) */
.auth-register-form #register-doc-persona.register-doc-block--natural {
  display: contents;
}

.auth-register-form #register-doc-persona.register-doc-block--natural > label {
  min-width: 0;
}

.auth-register-form #register-doc-persona.register-doc-block--natural[hidden] {
  display: none !important;
}

/* Persona jurídica: panel ancho completo, campos en rejilla coherente */
.auth-register-form #register-doc-empresa.register-doc-block--empresa {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  align-items: start;
}

.auth-register-form #register-doc-empresa.register-doc-block--empresa > label {
  min-width: 0;
}

.auth-register-form .register-doc-empresa-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Registro: teléfono con indicativo (+57 / +1) + número local.
   Banderas: los mismos gradientes que en el selector de idioma (.lang-option .flag-co / .flag-us);
   allí solo funcionan porque el CSS está acoplado a .lang-option; aquí repetimos el dibujo en .register-lang-flag--*. */
.phone-field-register {
  min-width: 0;
}

.phone-input-professional .phone-reg-flag-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 0.5rem 0 0.65rem;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(21, 101, 192, 0.08), rgba(21, 101, 192, 0.03));
}

.phone-input-professional .register-lang-flag {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(10, 46, 92, 0.18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.phone-input-professional .register-lang-flag--co {
  background: linear-gradient(
    to bottom,
    #fcd116 0%,
    #fcd116 50%,
    #003893 50%,
    #003893 75%,
    #ce1126 75%,
    #ce1126 100%
  );
}

.phone-input-professional .register-lang-flag--us {
  background:
    linear-gradient(to bottom, #3c3b6e 0 52%, transparent 52% 100%),
    repeating-linear-gradient(to bottom, #b22234 0 10%, #ffffff 10% 20%);
  background-size: 55% 55%, 100% 100%;
  background-position: left top, center;
  background-repeat: no-repeat;
}

.phone-input-professional .register-lang-flag--mx {
  background: linear-gradient(90deg, #006847 0%, #006847 32%, #ffffff 32%, #ffffff 68%, #ce1126 68%, #ce1126 100%);
}

.phone-input-professional .register-lang-flag--ec {
  background: linear-gradient(to bottom, #fcd116 0%, #fcd116 33%, #003893 33%, #003893 66%, #ce1126 66%, #ce1126 100%);
}

.phone-input-professional .register-lang-flag--pe {
  background: linear-gradient(90deg, #d91023 0%, #d91023 28%, #ffffff 28%, #ffffff 72%, #d91023 72%, #d91023 100%);
}

.phone-input-professional .register-lang-flag--cl {
  background:
    linear-gradient(to bottom, #0039a6 0 45%, transparent 45% 100%),
    linear-gradient(to bottom, #ffffff 0 50%, #d52b1e 50% 100%);
  background-size: 42% 42%, 100% 100%;
  background-position: left top, center;
  background-repeat: no-repeat;
}

.phone-input-professional .register-lang-flag--ar {
  background: linear-gradient(to bottom, #74acdf 0%, #74acdf 33%, #ffffff 33%, #ffffff 66%, #74acdf 66%, #74acdf 100%);
}

.phone-input-professional .register-lang-flag--br {
  background:
    radial-gradient(circle at 50% 58%, #ffdf00 0 22%, transparent 22%),
    #009c3b;
}

.phone-input-professional .register-lang-flag--pa {
  background: conic-gradient(#ffffff 0 25%, #003893 25% 50%, #ffffff 50% 75%, #d91023 75% 100%);
}

.phone-input-professional .register-lang-flag--cr {
  background: linear-gradient(to bottom, #0038a8 0%, #0038a8 33%, #ffffff 33%, #ffffff 66%, #ce1126 66%, #ce1126 100%);
}

.phone-input-professional .register-lang-flag--es {
  background: linear-gradient(to bottom, #aa151b 0%, #aa151b 22%, #f1bf00 22%, #f1bf00 78%, #aa151b 78%, #aa151b 100%);
}

.phone-input-professional .register-lang-flag--ve {
  background: linear-gradient(to bottom, #ffcf00 0%, #ffcf00 33%, #00247d 33%, #00247d 66%, #cf142b 66%, #cf142b 100%);
}

.phone-input-professional .register-lang-flag--gt {
  background: linear-gradient(90deg, #4997d0 0%, #4997d0 33%, #ffffff 33%, #ffffff 66%, #4997d0 66%, #4997d0 100%);
}

.phone-input-professional .register-lang-flag--hn {
  background: linear-gradient(to bottom, #0073cf 0%, #0073cf 33%, #ffffff 33%, #ffffff 66%, #0073cf 66%, #0073cf 100%);
}

.phone-input-professional {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: var(--reg-control-h, 2.75rem);
  height: var(--reg-control-h, 2.75rem);
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.phone-input-professional:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.phone-cc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.7rem 0 0.55rem;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(21, 101, 192, 0.08), rgba(21, 101, 192, 0.03));
}

.phone-flag-co svg {
  display: block;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}

.phone-dial-code {
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--text-main);
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.phone-input-professional .phone-cc-select {
  flex: 0 1 auto;
  align-self: stretch;
  min-width: min(100%, 5.35rem);
  max-width: 6.75rem;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0.35rem 1.55rem 0.35rem 0.45rem;
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background-color: var(--white);
  background-image: linear-gradient(180deg, rgba(21, 101, 192, 0.08), rgba(21, 101, 192, 0.03)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 0.45rem center;
  background-size: 100% 100%, 0.65rem auto;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text-main);
  letter-spacing: normal;
  text-transform: none !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

#form-register.auth-register-form .phone-input-professional .phone-cc-select {
  height: 100%;
}

.phone-input-professional .phone-cc-select:focus {
  outline: none;
  box-shadow: none;
}

.auth-register-form .phone-national-input {
  flex: 1;
  min-width: 0;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 0.75rem !important;
  min-height: 0 !important;
  height: 100% !important;
  font: inherit;
  background: transparent;
  text-transform: none !important;
  letter-spacing: normal !important;
}

#form-register.auth-register-form .phone-national-input {
  align-self: stretch;
}

.auth-register-form .phone-national-input:focus {
  outline: none;
  box-shadow: none !important;
}

.phone-field-hint {
  display: block;
  margin-top: 0.32rem;
  font-size: 0.76rem;
  line-height: 1.35;
}

/* Mayúsculas solo en pantalla; el valor enviado se normaliza en JS. Correo en minúsculas; fecha y contraseña sin forzar. */
.auth-register-form input:not([type="password"]):not([type="email"]):not([type="date"]):not([type="checkbox"]),
.auth-register-form select {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.auth-register-form .phone-cc-select {
  text-transform: none !important;
  letter-spacing: normal !important;
}

.auth-register-form input[type="email"] {
  text-transform: lowercase;
}

/* Refuerzo: nombre + clase (válido con type=password o type=text al mostrar) */
.auth-register-form input.auth-password-input {
  text-transform: none !important;
  letter-spacing: normal !important;
}

.auth-register-form .full {
  grid-column: 1 / -1;
}

.auth-register-form input:not([type="checkbox"]):not([type="hidden"]):not(.phone-national-input),
.auth-register-form select:not(.phone-cc-select) {
  min-height: 2.75rem;
  box-sizing: border-box;
  line-height: 1.3;
}

.auth-login-shell {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.9rem;
  align-items: start;
}

.auth-login-side {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f7fbff, #eef5ff);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
}

.auth-login-side h3 {
  margin: 0 0 0.45rem;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.auth-side-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.auth-side-pills span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(21, 101, 192, 0.2);
  background: rgba(21, 101, 192, 0.08);
  color: #1f4d81;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.auth-bullets {
  margin: 0.55rem 0 0;
  padding-left: 1rem;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

.password-field .btn {
  white-space: nowrap;
}

.auth-help {
  margin-top: 0.8rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
}

.auth-inline-note .muted {
  font-size: 0.78rem;
  display: block;
}

/* Icono + control en ingreso y recuperación */
.auth-field-stack {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.auth-plain-label .field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.auth-input-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  min-height: 2.5rem;
}

.auth-input-row--grow {
  flex: 1;
  min-width: 0;
}

.auth-input-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.6rem;
  color: var(--primary);
  opacity: 0.88;
  background: rgba(21, 101, 192, 0.06);
  border-right: 1px solid var(--line);
  flex-shrink: 0;
}

.auth-input-prefix svg {
  width: 1.1rem;
  height: 1.1rem;
}

.auth-input-control {
  flex: 1;
  border: none;
  border-radius: 0;
  padding: 0.5rem 0.65rem;
  font: inherit;
  min-width: 0;
}

.auth-input-control:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(21, 101, 192, 0.2);
}

.auth-password-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.auth-password-row .auth-input-row {
  flex: 1;
  min-width: 12rem;
}

.auth-recover-hint {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(21, 101, 192, 0.05);
  font-size: 0.85rem;
}

.auth-recover-hint-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.auth-recover-hint-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

/* Panel de fortaleza de contraseña (registro, creación de usuario) — barra + píldora + checklist */
.password-strength-suite {
  margin-top: 0.55rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(21, 101, 192, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 248, 255, 0.98) 55%, rgba(236, 254, 255, 0.35) 100%);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.password-strength-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.password-strength-bar {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.12);
}

.password-strength-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  transition: width 0.45s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.35s ease, filter 0.35s ease;
  background-size: 200% 100%;
}

.password-strength-bar--active:not(.password-strength-bar--complete) .password-strength-bar-fill {
  animation: password-strength-flow 3s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .password-strength-bar--active:not(.password-strength-bar--complete) .password-strength-bar-fill {
    animation: none;
  }

  .password-strength-pill--strong {
    animation: none;
  }
}

@keyframes password-strength-flow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.password-strength-bar-fill--weak {
  background-image: linear-gradient(110deg, #ef4444 0%, #fb7185 40%, #f97316 100%);
}

.password-strength-bar-fill--fair {
  background-image: linear-gradient(110deg, #ea580c 0%, #fbbf24 45%, #f59e0b 100%);
}

.password-strength-bar-fill--good {
  background-image: linear-gradient(110deg, #2563eb 0%, #38bdf8 50%, #6366f1 100%);
}

.password-strength-bar-fill--strong {
  background-image: linear-gradient(110deg, #059669 0%, #34d399 48%, #22d3ee 100%);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.35);
}

.password-strength-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
}

.password-strength-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.password-strength-pill--weak {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

.password-strength-pill--fair {
  color: #c2410c;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.4);
}

.password-strength-pill--good {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.38);
}

.password-strength-pill--strong {
  color: #047857;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.28);
  animation: password-pill-glow 2.2s ease-in-out infinite;
}

@keyframes password-pill-glow {
  0%,
  100% {
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.22);
  }
  50% {
    box-shadow: 0 0 26px rgba(52, 211, 153, 0.45);
  }
}

.password-strength-headline {
  margin: 0;
  flex: 1;
  min-width: 8rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.password-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.45rem 0.65rem;
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
}

.password-rule-grid li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--text-soft);
  transition: color 0.22s ease;
}

.password-rule-grid li.password-rule-met {
  color: var(--text-main);
}

.password-rule-dot {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.14);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.password-rule-met .password-rule-dot {
  border-color: #22c55e;
  background: linear-gradient(145deg, #22c55e, #4ade80);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.password-rule-met .password-rule-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 0.28rem;
  height: 0.48rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.password-policy-hint {
  font-size: 0.78rem;
  margin: 0.55rem 0 0;
  line-height: 1.45;
}

.tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  background: #F0F4F8;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
}

.tab {
  border: none;
  border-radius: 8px;
  background: transparent;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.tab.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* ─── FOOTER ─── */
.site-footer {
  padding: 3rem 0 2rem;
  background: var(--gradient-dark-section);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.footer-bg-truck {
  position: absolute;
  right: -20px;
  bottom: -10px;
  width: 250px;
  height: 250px;
  opacity: 0.04;
  color: white;
  pointer-events: none;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.footer-brand-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.footer-brand h3 {
  margin: 0;
  font-size: 1.15rem;
}

.site-footer h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  margin: 0 0 0.7rem;
}

.site-footer p {
  margin: 0.3rem 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

.footer-social a:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.footer-social-icon {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

/* ─── WHATSAPP FAB ─── */
.whatsapp-fab {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  padding: 0 1.2rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  color: #ffffff;
  background: linear-gradient(135deg, #25D366, #128C7E);
  box-shadow: 0 8px 28px rgba(18, 140, 126, 0.35);
  animation: whatsappPulse 2.5s infinite;
}

.whatsapp-fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 36px rgba(18, 140, 126, 0.45);
}

.whatsapp-fab-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
}

/* ─── ANIMATIONS ─── */
@keyframes pulseFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.03); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-15px) rotate(2deg); }
  66% { transform: translateY(8px) rotate(-1deg); }
}

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

@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(18, 140, 126, 0.35); }
  50% { box-shadow: 0 8px 28px rgba(18, 140, 126, 0.35), 0 0 0 12px rgba(37, 211, 102, 0.12); }
}

@keyframes truckDrive {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(calc(100vw + 100%)); }
}

.hero-truck-anim {
  position: absolute;
  bottom: 8%;
  left: 0;
  width: 60px;
  height: 60px;
  color: rgba(255,255,255,0.06);
  animation: truckDrive 18s linear infinite;
  pointer-events: none;
}

@keyframes publicNavDrawerIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes portalNavLinkIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  nav.nav-open {
    animation: none !important;
  }

  body.portal-drawer-open #portal-sidebar .side-link {
    animation: none !important;
  }

  #portal-sidebar.sidebar {
    transition: transform 0.01s ease !important;
  }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 920px) {
  body.public-nav-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  nav {
    display: none;
  }

  nav.nav-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    max-height: min(72vh, calc(100vh - 5rem));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--public-nav-scroll-thumb) transparent;
    gap: 0.38rem;
    padding: 0.75rem 0.8rem 1.05rem;
    margin: 0;
    background:
      linear-gradient(165deg, rgba(33, 150, 243, 0.06) 0%, transparent 42%),
      var(--public-nav-mobile-panel-bg);
    border: 1px solid var(--public-nav-border);
    border-radius: 0 0 20px 20px;
    box-shadow:
      var(--public-nav-mobile-shadow),
      inset 0 1px 0 rgba(255, 255, 255, 0.55);
    z-index: 60;
    flex: none;
    min-width: 0;
    animation: publicNavDrawerIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  body[data-theme="dark"] nav.nav-open {
    background:
      linear-gradient(165deg, rgba(66, 165, 245, 0.12) 0%, transparent 45%),
      var(--public-nav-mobile-panel-bg);
    box-shadow:
      var(--public-nav-mobile-shadow),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  nav.nav-open::-webkit-scrollbar {
    width: 6px;
  }

  nav.nav-open::-webkit-scrollbar-track {
    background: transparent;
  }

  nav.nav-open::-webkit-scrollbar-thumb {
    background: var(--public-nav-scroll-thumb);
    border-radius: 999px;
  }

  nav.nav-open a {
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 0.85rem 1.05rem 0.85rem 1.15rem;
    font-size: 0.97rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--public-nav-link);
    text-decoration: none;
    transition:
      transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 0.28s ease,
      border-color 0.28s ease,
      background 0.28s ease,
      color 0.22s ease;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
  }

  body[data-theme="dark"] nav.nav-open a {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  }

  nav.nav-open a::after {
    display: none;
  }

  nav.nav-open a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 0;
    border-radius: 0 6px 6px 0;
    background: linear-gradient(180deg, var(--accent) 0%, var(--primary) 100%);
    transform: translateY(-50%);
    opacity: 0;
    transition: height 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    z-index: 0;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(33, 150, 243, 0.45);
  }

  nav.nav-open a:hover {
    transform: translateX(5px);
    color: var(--public-nav-brand);
    background: linear-gradient(
      105deg,
      rgba(21, 101, 192, 0.14) 0%,
      rgba(33, 150, 243, 0.06) 52%,
      transparent 100%
    );
    border-color: rgba(21, 101, 192, 0.22);
    box-shadow:
      0 6px 18px rgba(21, 101, 192, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.55);
    font-weight: 800;
  }

  body[data-theme="dark"] nav.nav-open a:hover {
    background: linear-gradient(
      105deg,
      rgba(66, 165, 245, 0.22) 0%,
      rgba(25, 55, 95, 0.35) 55%,
      transparent 100%
    );
    border-color: rgba(129, 187, 255, 0.28);
    box-shadow:
      0 8px 22px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  nav.nav-open a:hover::before {
    height: 62%;
    opacity: 1;
  }

  nav.nav-open a.active {
    font-weight: 800;
    color: var(--public-nav-active-text);
    background: linear-gradient(
      115deg,
      rgba(21, 101, 192, 0.22) 0%,
      rgba(33, 150, 243, 0.12) 48%,
      rgba(227, 242, 253, 0.65) 100%
    );
    border-color: rgba(21, 101, 192, 0.35);
    box-shadow:
      0 8px 22px rgba(21, 101, 192, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.85),
      inset 0 -1px 0 rgba(21, 101, 192, 0.08);
  }

  body[data-theme="dark"] nav.nav-open a.active {
    background: linear-gradient(
      115deg,
      rgba(33, 150, 243, 0.35) 0%,
      rgba(21, 101, 192, 0.18) 50%,
      rgba(14, 35, 62, 0.65) 100%
    );
    border-color: rgba(129, 187, 255, 0.38);
    box-shadow:
      0 10px 28px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  nav.nav-open a.active::before {
    height: 70%;
    opacity: 1;
  }

  nav.nav-open a:focus-visible {
    outline: none;
    box-shadow:
      0 0 0 3px rgba(33, 150, 243, 0.45),
      0 6px 18px rgba(21, 101, 192, 0.12);
  }

  body[data-theme="dark"] nav.nav-open a:focus-visible {
    box-shadow:
      0 0 0 3px rgba(100, 181, 246, 0.55),
      0 8px 22px rgba(0, 0, 0, 0.35);
  }

  @supports (height: 100dvh) {
    nav.nav-open {
      max-height: min(72dvh, calc(100dvh - 5rem));
    }
  }

  .hamburger {
    display: inline-flex;
  }

  .nav-controls {
    order: 4;
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.35rem;
  }

  .theme-option,
  .lang-option {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }

  .portal-layout { grid-template-columns: 1fr; }

  .portal-menu-btn {
    display: inline-flex;
  }

  .portal-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 190;
    background: linear-gradient(135deg, rgba(4, 12, 28, 0.72) 0%, rgba(8, 17, 31, 0.55) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.38s ease, visibility 0.38s ease;
    pointer-events: none;
  }

  body.portal-drawer-open .portal-nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.portal-drawer-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .sidebar-drawer-tagline {
    display: block;
  }

  #portal-sidebar.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    max-height: 100dvh;
    width: min(318px, 90vw);
    z-index: 200;
    transform: translateX(-108%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
    border-radius: 0 22px 22px 0;
    border-right: 1px solid rgba(120, 180, 255, 0.18);
    border-bottom: none;
    box-shadow:
      16px 0 40px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.15rem 0.95rem 1.35rem;
    background:
      radial-gradient(120% 80% at 0% 0%, rgba(56, 189, 248, 0.14) 0%, transparent 55%),
      radial-gradient(90% 60% at 100% 100%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
      linear-gradient(180deg, #070f1e 0%, #0b1d33 42%, #0c2744 100%);
    -webkit-overflow-scrolling: touch;
  }

  body.portal-drawer-open #portal-sidebar.sidebar {
    transform: translateX(0);
    box-shadow:
      24px 0 56px rgba(0, 0, 0, 0.6),
      0 0 0 1px rgba(147, 197, 255, 0.12) inset;
  }

  .sidebar-brand {
    padding: 0.35rem 0.45rem 0.85rem;
    margin-bottom: 0.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
  }

  .sidebar-section-label {
    display: block;
    padding-top: 1rem;
    color: rgba(186, 220, 255, 0.55);
  }

  .sidebar-spacer {
    display: block;
    flex: 1;
    min-height: 0.5rem;
  }

  .sidebar-logout {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .sidebar-theme-box {
    margin-top: 0.55rem;
    padding: 0.55rem 0.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  .sidebar-theme-title {
    display: block;
  }

  .side-link {
    padding: 0.72rem 0.75rem;
    font-size: 0.88rem;
    border-radius: 12px;
    margin-bottom: 2px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  }

  .side-link:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(147, 197, 255, 0.18);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  }

  .side-link.active {
    border-color: rgba(147, 213, 255, 0.45);
    box-shadow:
      0 8px 22px rgba(33, 150, 243, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }

  body.portal-drawer-open #portal-sidebar .side-link {
    animation: portalNavLinkIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  #portal-sidebar.sidebar .side-link:nth-of-type(1) { animation-delay: 0.02s; }
  #portal-sidebar.sidebar .side-link:nth-of-type(2) { animation-delay: 0.05s; }
  #portal-sidebar.sidebar .side-link:nth-of-type(3) { animation-delay: 0.08s; }
  #portal-sidebar.sidebar .side-link:nth-of-type(4) { animation-delay: 0.1s; }
  #portal-sidebar.sidebar .side-link:nth-of-type(5) { animation-delay: 0.12s; }
  #portal-sidebar.sidebar .side-link:nth-of-type(6) { animation-delay: 0.14s; }
  #portal-sidebar.sidebar .side-link:nth-of-type(7) { animation-delay: 0.16s; }
  #portal-sidebar.sidebar .side-link:nth-of-type(8) { animation-delay: 0.18s; }
  #portal-sidebar.sidebar .side-link:nth-of-type(9) { animation-delay: 0.2s; }
  #portal-sidebar.sidebar .side-link:nth-of-type(10) { animation-delay: 0.22s; }

  .side-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
  }

  .portal-main { padding: 1rem; }
  .portal-header h1 { font-size: 1.22rem; line-height: 1.25; }
  .dash-grid { grid-template-columns: 1fr; }
  .users-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .datetime-group { grid-template-columns: 1fr; }
  .wizard-step { grid-template-columns: 1fr; }
  .quality-row { grid-template-columns: 1fr; gap: 0.35rem; }

  .hero { min-height: 85vh; }

  .hero h1 { font-size: clamp(1.6rem, 6vw, 2.4rem); }

  .hero-floating-1 { width: 120px; height: 120px; }
  .hero-floating-2 { width: 80px; height: 80px; }
  .hero-floating-3 { display: none; }

  .hero-aurora-left { width: 250px; height: 250px; }
  .hero-aurora-right { width: 300px; height: 300px; }

  .section { padding: 3rem 0; }
  .section-head h2 { font-size: 1.5rem; }

  .avatar-oval { width: 95px; height: 124px; }

  .media-card img { height: 190px; }

  .whatsapp-fab {
    bottom: 0.8rem;
    right: 0.8rem;
    min-width: 3rem;
    height: 3rem;
    font-size: 0;
    padding: 0 0.8rem;
  }

  .footer-bg-truck { width: 150px; height: 150px; }
}

@media (max-width: 1320px) {
  nav a {
    font-size: 0.75rem;
    padding: 0.3rem 0.32rem;
  }

  #open-auth {
    padding: 0.52rem 0.82rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .coverage-grid { grid-template-columns: 1fr; }
}

/* ─── MAGNIFIC EXPERIENCE LAYER ─── */
body {
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(33, 150, 243, 0.15), transparent 70%),
    radial-gradient(900px 450px at -10% 20%, rgba(10, 46, 92, 0.16), transparent 72%),
    #f5f9ff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 120px;
  background: linear-gradient(180deg, transparent 0%, rgba(245, 249, 255, 0.92) 100%);
  pointer-events: none;
}

.section,
.portal-main {
  position: relative;
}

.section::before,
.portal-main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(21, 101, 192, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 101, 192, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 90%);
}

body[data-theme="dark"] .portal-layout {
  background: linear-gradient(180deg, #071120 0%, #0d1d33 100%);
}

body[data-theme="dark"] .portal-main {
  background: #112136;
}

body[data-theme="dark"] .p-card,
body[data-theme="dark"] .kpi,
body[data-theme="dark"] .table-wrap,
body[data-theme="dark"] .card {
  background: #182a41;
  border-color: #345577;
  color: var(--text);
}

body[data-theme="dark"] .p-card-header {
  background: linear-gradient(135deg, #1a304b, #203b5b);
}

body[data-theme="dark"] .portal-header h1 {
  color: #dcecff;
}

body[data-theme="dark"] tbody tr:hover {
  background: #233d5c;
}

body[data-theme="dark"] table th,
body[data-theme="dark"] table td,
body[data-theme="dark"] .p-card-header h2,
body[data-theme="dark"] .kpi-data b,
body[data-theme="dark"] .kpi-data .kpi-value,
body[data-theme="dark"] .dash-stat-value {
  color: #e6f0ff;
}

body[data-theme="dark"] .muted,
body[data-theme="dark"] .p-card-header p,
body[data-theme="dark"] .kpi-data span,
body[data-theme="dark"] .p-form label,
body[data-theme="dark"] .card p,
body[data-theme="dark"] .card li,
body[data-theme="dark"] .table-wrap tbody td {
  color: #c3d7ef;
}

body[data-theme="dark"] .module-filters {
  background: linear-gradient(135deg, rgba(15, 36, 61, 0.95), rgba(14, 30, 50, 0.98));
  border-color: rgba(68, 125, 189, 0.45);
  box-shadow: 0 12px 28px rgba(2, 8, 18, 0.42);
}

body[data-theme="dark"] .module-filters-title {
  color: #d7e8ff;
}

body[data-theme="dark"] .module-filters-count {
  color: #c9dcfb;
  background: rgba(18, 39, 65, 0.9);
  border-color: rgba(89, 141, 205, 0.45);
}

body[data-theme="dark"] .module-filter-field span {
  color: #9ec1ec;
}

body[data-theme="dark"] .module-filter-field input,
body[data-theme="dark"] .module-filter-field select,
body[data-theme="dark"] .filter-pill {
  background: rgba(14, 30, 51, 0.96);
  color: #dfecff;
  border-color: rgba(72, 124, 186, 0.5);
}

body[data-theme="dark"] .theme-option.active,
body[data-theme="dark"] .lang-option.active {
  background: rgba(59, 130, 246, 0.35);
}

body[data-theme="dark"] .section,
body[data-theme="dark"] .section-light,
body[data-theme="dark"] .section-trusted,
body[data-theme="dark"] .section-gallery,
body[data-theme="dark"] .section-process,
body[data-theme="dark"] #about,
body[data-theme="dark"] #fleet,
body[data-theme="dark"] #news,
body[data-theme="dark"] #careers,
body[data-theme="dark"] #contact {
  background: #10243b !important;
}

body[data-theme="dark"] .section h2,
body[data-theme="dark"] .section h3,
body[data-theme="dark"] .section strong,
body[data-theme="dark"] .section-head p {
  color: #eaf2ff;
}

body[data-theme="dark"] .wave-divider path {
  fill: #10243b !important;
}

body[data-theme="dark"] .section-head p,
body[data-theme="dark"] .section p,
body[data-theme="dark"] .muted {
  color: #c8dcf3 !important;
}

body[data-theme="dark"] .section-trusted .logo-marquee {
  background: #132940;
  border-color: #3a5d84;
}

body[data-theme="dark"] .section-trusted .logo-pill {
  background: #1a3552;
  border-color: #4873a3;
  color: #e8f2ff;
}

body[data-theme="dark"] .section-trusted .ally-logo {
  background: #10243a;
  border-color: rgba(129, 187, 255, 0.32);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .mini-metric h3 {
  color: #9cc9ff;
}

body[data-theme="dark"] .mini-metric-icon {
  background: #1e3b5b;
  color: #8ec1ff;
}

body[data-theme="dark"] .hierarchy-card {
  background: linear-gradient(165deg, #162a41 0%, #1c3550 85%);
  border-color: #3c5f86;
}

body[data-theme="dark"] .role-badge {
  background: rgba(115, 178, 255, 0.12);
  border-color: rgba(135, 188, 255, 0.35);
  color: #d8e9ff;
}

body[data-theme="dark"] .hierarchy-card h3 {
  color: #eaf3ff;
}

body[data-theme="dark"] .photo-note {
  color: #afc8e5;
}

body[data-theme="dark"] .process-step {
  background: rgba(127, 181, 245, 0.16);
  border-color: rgba(140, 188, 245, 0.42);
  color: #d8ebff;
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  background: #1a314c;
  color: #ecf4ff;
  border-color: #49719c;
}

body[data-theme="dark"] #contact .form-grid label {
  background: linear-gradient(180deg, rgba(18, 38, 60, 0.96), rgba(14, 31, 49, 0.96));
  border-color: #496d97;
  box-shadow: 0 6px 16px rgba(2, 9, 18, 0.3);
}

body[data-theme="dark"] #contact .contact-form-subtitle {
  color: #c7ddf6;
}

body[data-theme="dark"] #contact .contact-trust-pill {
  color: #d6e9ff;
  background: rgba(117, 176, 244, 0.16);
  border-color: rgba(133, 188, 247, 0.36);
}

body[data-theme="dark"] #contact .contact-step-chip {
  color: #d2e7ff;
  background: rgba(117, 176, 244, 0.12);
  border-color: rgba(133, 188, 247, 0.28);
}

body[data-theme="dark"] #contact .form-grid input,
body[data-theme="dark"] #contact .form-grid select,
body[data-theme="dark"] #contact .form-grid textarea {
  background: #1a314c;
  border-color: #537da8;
  color: #edf5ff;
}

body[data-theme="dark"] #contact .contact-submit-wrap .muted {
  color: #bfd6f1 !important;
}

body[data-theme="dark"] .field-error {
  color: #ffb5b5;
}

body[data-theme="dark"] .field-invalid {
  border-color: #d97878 !important;
  box-shadow: 0 0 0 3px rgba(217, 120, 120, 0.18) !important;
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #a9c0db;
}

body[data-theme="dark"] .news-tag {
  background: rgba(85, 155, 230, 0.18);
  border-color: rgba(124, 183, 245, 0.38);
  color: #ddecff;
}

body[data-theme="dark"] .news-quote {
  background: rgba(79, 141, 212, 0.12);
  border-left-color: rgba(136, 189, 249, 0.55);
  color: #e5f2ff;
}

body[data-theme="dark"] .news-video-wrap {
  background: transparent;
  border-color: #3d6188;
}

body[data-theme="dark"] .news-video-wrap video {
  background: #000;
  filter: saturate(1.12) contrast(1.08) brightness(1.06);
}

body[data-theme="dark"] .news-video-wrap video.video-highlight-white {
  filter: saturate(1.16) contrast(1.1) brightness(1.14);
}

body[data-theme="dark"] .news-relevance-card {
  border-color: rgba(116, 176, 245, 0.35);
  background: linear-gradient(145deg, rgba(28, 61, 96, 0.78), rgba(15, 35, 58, 0.74));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .news-super-kicker {
  background: linear-gradient(135deg, #1a6fc5, #12365f);
  box-shadow: 0 10px 20px rgba(8, 19, 34, 0.44);
}

body[data-theme="dark"] .news-hero-title {
  color: #eaf4ff;
}

body[data-theme="dark"] .news-proof-card {
  border-color: rgba(126, 181, 245, 0.28);
  background: rgba(14, 33, 52, 0.78);
}

body[data-theme="dark"] .news-proof-card span {
  color: #9fc9f6;
}

body[data-theme="dark"] .news-proof-card strong {
  color: #d4e9ff;
}

body[data-theme="dark"] .news-case-col {
  border-color: rgba(126, 181, 245, 0.28);
  background: rgba(14, 33, 52, 0.78);
}

body[data-theme="dark"] .news-case-col h4 {
  color: #c7e3ff;
}

body[data-theme="dark"] .news-timeline {
  color: #d3e8ff;
}

body[data-theme="dark"] .news-route-map {
  color: #d5e9ff;
}

body[data-theme="dark"] .news-route-map span:not(.route-arrow) {
  background: rgba(67, 123, 189, 0.22);
  border-color: rgba(126, 181, 245, 0.28);
}

body[data-theme="dark"] .route-arrow {
  color: #a7cff7;
}

body[data-theme="dark"] .before-after-card {
  border-color: rgba(126, 181, 245, 0.25);
  background: rgba(16, 36, 58, 0.82);
}

body[data-theme="dark"] .before-after-card h4 {
  color: #d4e9ff;
}

body[data-theme="dark"] .before-after-card p {
  color: #c6def8;
}

body[data-theme="dark"] .news-relevance-card h3 {
  color: #e4f0ff;
}

body[data-theme="dark"] .news-relevance-card p {
  color: #c7def9;
}

body[data-theme="dark"] .news-quote-panel {
  border-color: rgba(126, 181, 245, 0.3);
  background: linear-gradient(160deg, rgba(17, 36, 58, 0.92), rgba(11, 24, 40, 0.94));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .news-quote-panel h4 {
  color: #e7f2ff;
}

body[data-theme="dark"] .news-quote-panel .muted {
  color: #b7d3f0;
}

body[data-theme="dark"] .news-lead-badge {
  border-color: rgba(140, 193, 250, 0.36);
  background: rgba(33, 73, 110, 0.58);
  color: #def0ff;
}

body[data-theme="dark"] .news-quote-signature {
  border-top-color: rgba(133, 186, 246, 0.35);
  color: #cce4ff;
}

body[data-theme="dark"] .news-signature-mark {
  background: rgba(118, 174, 239, 0.2);
  border-color: rgba(141, 192, 248, 0.4);
  color: #e0f1ff;
}

body[data-theme="dark"] .news-closing-note {
  border-color: rgba(126, 181, 245, 0.32);
  background: linear-gradient(160deg, rgba(21, 45, 73, 0.86), rgba(13, 31, 49, 0.9));
  color: #d3e9ff;
}

body[data-theme="dark"] .news-plate-chip {
  border-color: rgba(150, 197, 251, 0.4);
  background: rgba(13, 30, 48, 0.72);
  color: #d9ebff;
}

body[data-theme="dark"] .news-media-highlight {
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .news-media-highlight .news-media-copy {
  background: linear-gradient(180deg, rgba(21, 42, 64, 0.9), rgba(16, 34, 53, 0.95));
}

body[data-theme="dark"] .news-evidence-gallery {
  background: linear-gradient(180deg, #17314d, #122842);
}

body[data-theme="dark"] .news-evidence-hook {
  background: linear-gradient(135deg, #143a5c 0%, #1a5082 55%, #122a42 100%);
  border-color: rgba(130, 188, 248, 0.28);
}

body[data-theme="dark"] .news-evidence-frame {
  background: linear-gradient(180deg, #132940, #0f2237);
}

body[data-theme="dark"] .news-media .news-evidence-gallery--stack .news-evidence-frame img {
  background: transparent;
  filter: saturate(1.12) contrast(1.08) brightness(1.04);
}

body[data-theme="dark"] .news-media .news-evidence-gallery:not(.news-evidence-gallery--stack) .news-evidence-frame img.news-img-truck {
  background: linear-gradient(180deg, #132940, #0f2237);
}

body[data-theme="dark"] .news-evidence-frame + .news-evidence-frame {
  border-top-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
  .news-proof-grid {
    grid-template-columns: 1fr;
  }

  .news-case-study,
  .news-before-after {
    grid-template-columns: 1fr;
  }
}

body[data-theme="dark"] .news-media img {
  background: linear-gradient(180deg, #132940, #0f2237);
  filter: saturate(1.14) contrast(1.09) brightness(1.07);
}

body[data-theme="dark"] .news-media img.news-img-truck {
  filter: saturate(1.18) contrast(1.1) brightness(1.13);
}

body[data-theme="dark"] .news-media img.news-img-brand {
  filter: saturate(1.2) contrast(1.11) brightness(1.1);
}

body[data-theme="dark"] .impact-chip,
body[data-theme="dark"] .success-case-metrics span {
  background: rgba(113, 170, 240, 0.16);
  border-color: rgba(133, 187, 247, 0.35);
  color: #dcedff;
}

body[data-theme="dark"] .btn-outline,
body[data-theme="dark"] .btn-action,
body[data-theme="dark"] .btn-text {
  background: #1b334f;
  border-color: #4a729e;
  color: #e6f1ff;
}

.p-card,
.kpi,
.media-card,
.step,
.coverage-card,
.contact-form {
  border: 1px solid rgba(21, 101, 192, 0.14) !important;
  box-shadow: 0 10px 36px rgba(7, 30, 61, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.p-card:hover,
.kpi:hover,
.media-card:hover,
.step:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(7, 30, 61, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.btn {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 28px rgba(13, 71, 161, 0.30);
}

.btn-primary:hover {
  filter: saturate(1.08) brightness(1.03);
}

.p-form {
  gap: 0.95rem;
}

.p-form label {
  border: 1px solid rgba(21, 101, 192, 0.16);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 255, 0.92));
}

.p-form label:focus-within {
  border-color: rgba(21, 101, 192, 0.48);
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.14);
}

.p-form input,
.p-form select,
.p-form textarea {
  border: 1px solid rgba(21, 101, 192, 0.18);
  background: #fff;
}

.p-form input:focus,
.p-form select:focus,
.p-form textarea:focus {
  border-color: rgba(21, 101, 192, 0.55);
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.12);
}

body[data-theme="dark"] .p-form label {
  background: linear-gradient(180deg, rgba(18, 38, 60, 0.96), rgba(15, 33, 52, 0.96));
  border-color: #466a93;
}

body[data-theme="dark"] .p-form input,
body[data-theme="dark"] .p-form select,
body[data-theme="dark"] .p-form textarea {
  background: #1a314c;
  color: #ecf4ff;
  border-color: #4f78a5;
}

.table-wrap table thead th {
  background: linear-gradient(180deg, #edf4fd 0%, #e6f0fb 100%);
}

.table-wrap table tbody tr:hover {
  background: rgba(21, 101, 192, 0.05);
}

.status {
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-weight: 700;
}

.module-appear {
  animation: moduleFadeUp 0.55s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes moduleFadeUp {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.form-wizard {
  border: 1px solid rgba(21, 101, 192, 0.2);
  border-radius: 14px;
  padding: 0.6rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(246,250,255,0.95));
}

.wizard-step {
  display: none;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wizard-step.active {
  display: grid;
}

.wizard-step-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dashed rgba(21, 101, 192, 0.25);
  margin-bottom: 0.4rem;
  padding-bottom: 0.35rem;
}

.wizard-step-head h4 {
  margin: 0;
  color: #0d3f78;
  font-size: 0.96rem;
}

.wizard-step-head span {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.wizard-step .full {
  grid-column: 1 / -1;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 0.7rem;
}

.quality-row {
  display: grid;
  grid-template-columns: 120px 1fr 52px;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.quality-row span {
  font-weight: 600;
  color: #0d3f78;
}

.quality-row b {
  text-align: right;
  color: #0d3f78;
}

.quality-bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(21, 101, 192, 0.15);
  overflow: hidden;
}

.quality-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d4ed8, #22c55e);
}

.modal-info-body {
  display: grid;
  gap: 0.55rem;
  color: var(--text);
}

.modal-info-body strong {
  color: #0d3f78;
}

/* ─── Public careers (Trabaja con nosotros) ─── */
.careers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.careers-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.careers-card h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--primary-dark);
}

.careers-card .careers-meta {
    font-size: 0.86rem;
  color: var(--text-soft);
}

.careers-card .careers-req {
  font-size: 0.88rem;
  line-height: 1.45;
  flex: 1;
}

/* ─── News ─── */
.section-news {
  background: linear-gradient(180deg, #F7FBFF 0%, #EFF6FF 100%);
}

.section-careers {
  background: linear-gradient(180deg, #F7FBFF 0%, #EFF6FF 100%);
}

/* Noticia principal: revista (columnas alineadas; evidencia rellena alto sin sticky) */
.news-magazine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 1.25rem;
  align-items: stretch;
}

.news-magazine-aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.news-magazine-aside .news-evidence-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: min-content;
  height: 100%;
}

.news-magazine-aside .news-media-highlight {
  box-shadow: 0 12px 28px rgba(11, 42, 78, 0.14);
}

.news-evidence-hook {
  flex: 0 0 auto;
  margin-bottom: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #0a3d6e 0%, #0d5194 50%, #0a2f52 100%);
  color: #f3f9ff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 16px rgba(8, 35, 68, 0.22);
}

.news-evidence-hook > strong {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.28rem;
  color: #ffffff;
}

.news-evidence-hook span {
  display: block;
  font-size: 0.8rem;
  line-height: 1.38;
  opacity: 0.96;
}

.news-magazine-continued {
  grid-column: 1 / -1;
  margin-top: 0;
}

.news-magazine-lead .news-proof-grid {
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .news-magazine {
    grid-template-columns: 1fr;
  }

  .news-magazine-aside {
    position: static;
    order: 2;
  }

  .news-magazine-lead {
    order: 1;
  }

  .news-magazine-continued {
    order: 3;
  }
}

.section-process {
  background: linear-gradient(180deg, #eef5ff 0%, #e3eefb 100%);
}

.process-card {
  position: relative;
  padding-top: 2.6rem;
}

.process-step {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #3a6ea7;
  background: rgba(21, 101, 192, 0.12);
  border: 1px solid rgba(21, 101, 192, 0.2);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
}

.news-card {
  border-top: 3px solid var(--primary);
  padding-top: 1.2rem;
}

.news-super-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.45rem;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #0a4f91, #0b2340);
  box-shadow: 0 8px 18px rgba(12, 63, 117, 0.28);
}

.news-feature {
  position: relative;
  padding: 1.25rem 1.25rem 1.35rem;
  border-radius: 16px;
  overflow: hidden;
}

.news-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 0% 0%, rgba(21, 101, 192, 0.1), transparent 55%);
}

.news-lead {
  font-size: 0.98rem;
  margin-bottom: 0.8rem;
}

.news-lead-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin: -0.1rem 0 0.8rem;
}

.news-lead-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(21, 101, 192, 0.22);
  background: rgba(21, 101, 192, 0.07);
  color: #1f4f83;
  padding: 0.24rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.news-hero-title {
  margin-top: 0.18rem;
  margin-bottom: 0.5rem;
  font-size: clamp(1.18rem, 2.2vw, 1.55rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: #0b2e50;
}

.news-video-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: transparent;
  margin-bottom: 0.7rem;
  aspect-ratio: 16 / 9;
  box-shadow: 0 10px 24px rgba(9, 28, 53, 0.2);
}

.news-video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  filter: saturate(1.14) contrast(1.1) brightness(1.09);
}

.news-video-wrap video.video-highlight-white {
  filter: saturate(1.18) contrast(1.12) brightness(1.16);
}

.news-relevance-card {
  position: relative;
  margin: 0.7rem 0 0.5rem;
  padding: 0.86rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(21, 101, 192, 0.28);
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.12), rgba(11, 29, 51, 0.05));
  box-shadow: 0 10px 22px rgba(12, 40, 72, 0.12);
}

.news-relevance-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.46);
}

.news-relevance-card h3 {
  margin: 0.35rem 0 0.3rem;
  font-size: 1.05rem;
  color: #123a66;
}

.news-relevance-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.news-plate-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 29, 51, 0.26);
  background: rgba(255, 255, 255, 0.7);
  color: #1a3658;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.news-tag-glow {
  box-shadow: 0 0 0 1px rgba(79, 151, 232, 0.2), 0 6px 14px rgba(35, 102, 177, 0.2);
}

.news-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.55rem 0 0.2rem;
}

.news-proof-card {
  border-radius: 10px;
  border: 1px solid rgba(21, 101, 192, 0.2);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.58rem 0.62rem;
  display: grid;
  gap: 0.2rem;
}

.news-proof-card span {
  font-size: 0.72rem;
  color: #426a95;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.news-proof-card strong {
  font-size: 0.82rem;
  line-height: 1.26;
  color: #173f68;
}

.news-case-study {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.news-case-col {
  border: 1px solid rgba(21, 101, 192, 0.2);
  border-radius: 11px;
  padding: 0.62rem 0.7rem;
  background: rgba(255, 255, 255, 0.68);
}

.news-case-col h4 {
  margin: 0 0 0.35rem;
  color: #18446f;
  font-size: 0.85rem;
}

.news-timeline {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.32rem;
  font-size: 0.81rem;
  line-height: 1.32;
}

.news-route-map {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1b4d80;
}

.news-route-map span:not(.route-arrow) {
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(21, 101, 192, 0.12);
  border: 1px solid rgba(21, 101, 192, 0.2);
}

.route-arrow {
  color: #29639d;
}

.news-before-after {
  margin-top: 0.52rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.before-after-card {
  border-radius: 10px;
  border: 1px solid rgba(21, 101, 192, 0.18);
  background: rgba(243, 249, 255, 0.82);
  padding: 0.58rem 0.64rem;
}

.before-after-card h4 {
  margin: 0 0 0.2rem;
  font-size: 0.82rem;
  color: #123f6a;
}

.before-after-card p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.3;
}

.news-quote {
  margin: 0.65rem 0 0.5rem;
  padding: 0.8rem 0.95rem;
  border-left: 3px solid rgba(21, 101, 192, 0.4);
  border-radius: 10px;
  background: rgba(21, 101, 192, 0.04);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
}

.news-quote-panel {
  margin-top: 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(21, 101, 192, 0.18);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(239, 247, 255, 0.94));
  padding: 0.82rem 0.9rem 0.78rem;
  box-shadow: 0 12px 24px rgba(9, 32, 58, 0.08);
}

.news-quote-panel h4 {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: #123c67;
}

.news-quote-panel .muted {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  line-height: 1.35;
}

.news-quote-signature {
  margin-top: 0.55rem;
  padding-top: 0.48rem;
  border-top: 1px dashed rgba(21, 101, 192, 0.26);
  display: grid;
  gap: 0.22rem;
  color: #335f8c;
  font-size: 0.76rem;
  line-height: 1.3;
}

.news-signature-mark {
  width: fit-content;
  padding: 0.16rem 0.44rem;
  border-radius: 6px;
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  font-weight: 800;
  border: 1px solid rgba(21, 101, 192, 0.24);
  background: rgba(21, 101, 192, 0.1);
  color: #174671;
}

.news-gallery-stack {
  display: grid;
  gap: 0.9rem;
}

.news-media {
  padding: 0;
  overflow: hidden;
}

.news-media-highlight {
  border-top-color: #145699;
  box-shadow: 0 16px 30px rgba(11, 42, 78, 0.16);
}

.news-media-highlight .news-media-copy {
  background: linear-gradient(180deg, rgba(240, 247, 255, 0.92), rgba(233, 243, 255, 0.96));
}

.news-media img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  display: block;
  background: linear-gradient(180deg, #e8f1fc, #dbe9f8);
  filter: saturate(1.2) contrast(1.1) brightness(1.08);
  padding: 0.3rem;
}

.news-media img.news-img-truck {
  filter: saturate(1.25) contrast(1.14) brightness(1.16);
}

.news-evidence-gallery {
  padding: 0;
  margin: 0;
  background: linear-gradient(180deg, #edf4fc, #e2edf9);
  border-radius: 12px;
  overflow: visible;
}

.news-evidence-gallery--stack {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: min-content;
  gap: 0.25rem;
  padding: 0.25rem;
  align-items: center;
}

.news-magazine-aside .news-evidence-gallery--stack {
  flex: 1 1 auto;
  min-height: min-content;
}

.news-media-highlight .news-evidence-gallery {
  border-bottom: none;
}

.news-evidence-frame {
  margin: 0;
  position: relative;
  overflow: visible;
  flex: 1 1 0;
  min-height: 0;
  background: linear-gradient(180deg, #edf4fc, #e2edf9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-evidence-gallery--stack .news-evidence-frame {
  flex: none;
  width: 100%;
  height: 250px;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  padding: 0;
  box-sizing: border-box;
}

.news-evidence-frame + .news-evidence-frame {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.news-media .news-evidence-gallery:not(.news-evidence-gallery--stack) .news-evidence-frame img {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  padding: 0;
  margin: 0;
  background: transparent;
  filter: saturate(1.22) contrast(1.12) brightness(1.08);
}

.news-media .news-evidence-gallery--stack .news-evidence-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #f5f5f5;
  padding: 0;
  display: block;
}

.news-media .news-evidence-gallery:not(.news-evidence-gallery--stack) .news-evidence-frame img.news-img-truck-side {
  object-fit: contain;
  object-position: center;
  padding: 0.45rem 0.55rem;
}

.news-media .news-evidence-gallery:not(.news-evidence-gallery--stack) .news-evidence-frame img.news-img-truck {
  object-fit: contain;
  object-position: center;
  background: linear-gradient(180deg, #e8f1fc, #dbe9f8);
  padding: 0.2rem 0.25rem;
}

@media (max-width: 960px) {
  .news-evidence-gallery--stack {
    flex: none;
    min-height: auto;
  }

  .news-magazine-aside .news-evidence-card {
    height: auto;
  }

  .news-evidence-gallery--stack .news-evidence-frame {
    flex: none;
    width: 100%;
    height: 250px;
  }
}

.news-media img.news-img-brand {
  filter: saturate(1.22) contrast(1.12) brightness(1.1);
}

.news-impact-strip {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.impact-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(21, 101, 192, 0.22);
  background: rgba(21, 101, 192, 0.08);
  padding: 0.26rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #1f4d81;
}

.news-closing-note {
  margin-top: 0.72rem;
  border: 1px solid rgba(21, 101, 192, 0.16);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(247, 252, 255, 0.96), rgba(235, 245, 255, 0.95));
  padding: 0.56rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #18466f;
  font-weight: 600;
}

.news-media-copy {
  padding: 0.9rem 1rem 1rem;
}

.news-magazine-aside .news-media-copy {
  flex-shrink: 0;
}

.news-media-copy h3 {
  margin: 0.3rem 0;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  background: rgba(21, 101, 192, 0.1);
  border: 1px solid rgba(21, 101, 192, 0.2);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  margin-bottom: 0.55rem;
}

/* ─── Nomina: empleado con mini foto ─── */
.emp-cell-name {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.emp-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(21, 101, 192, 0.2);
}

.emp-avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-mid), var(--primary-dark));
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ─── HR dashboard enhancements ─── */
.hr-kpi-grid {
  margin-bottom: 0.9rem;
}

.hr-kpi-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 8px 20px rgba(11, 29, 51, 0.06);
  display: grid;
  gap: 0.25rem;
  min-height: 5.35rem;
  align-content: center;
}

.hr-kpi-card span {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.hr-kpi-card strong {
  color: var(--primary-dark);
  font-size: 1.4rem;
  line-height: 1;
}

.hr-alert-list {
  display: grid;
  gap: 0.55rem;
}

.hr-alert-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: #f8fbff;
  font-size: 0.9rem;
  color: var(--text);
}

.ops-module-head {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: flex-start;
  border: 1px solid rgba(21, 101, 192, 0.25);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, rgba(236, 245, 255, 0.92), rgba(247, 251, 255, 0.98));
}

.ops-module-head-hiring {
  border-color: rgba(93, 106, 244, 0.24);
  background: linear-gradient(135deg, rgba(241, 241, 255, 0.92), rgba(248, 249, 255, 0.98));
}

.ops-module-kicker {
  display: inline-block;
  margin: 0 0 0.32rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: #2e5f94;
}

.ops-module-title h2 {
  margin: 0;
  color: #0f3f75;
  font-size: 1.15rem;
}

.ops-module-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.ops-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(21, 101, 192, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: #28517f;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.28rem 0.62rem;
}

.ops-chip strong {
  font-size: 0.82rem;
  color: #0f3f75;
}

.ops-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-radius: 12px;
  padding: 0.58rem 0.68rem;
}

.ops-command-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ops-command-group .btn {
  font-weight: 700;
}

.payroll-shell {
  display: grid;
  gap: 0.85rem;
}

.payroll-executive-strip {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 0.95rem 1.05rem;
  background: linear-gradient(135deg, rgba(236, 252, 255, 0.95), rgba(240, 249, 255, 0.98));
}

.payroll-strip-kicker {
  margin: 0 0 0.28rem;
  color: #0e7490;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 800;
}

.payroll-executive-strip h2 {
  margin: 0;
  color: #0c4a6e;
  font-size: 1.14rem;
}

.payroll-strip-metrics {
  min-width: 240px;
  display: grid;
  gap: 0.38rem;
}

.payroll-strip-metrics span {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 9px;
  padding: 0.38rem 0.56rem;
  color: #0f5f7f;
  font-size: 0.8rem;
}

.payroll-shell .p-form,
.hiring-shell .p-form {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.95rem;
}

.payroll-shell .p-form label,
.hiring-shell .p-form label {
  padding: 0.62rem 0.78rem;
}

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

.payroll-kpi-grid {
  margin-bottom: 0.95rem;
}

.payroll-kpi-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  box-shadow: 0 8px 18px rgba(11, 29, 51, 0.06);
  padding: 0.8rem 0.9rem;
  display: grid;
  gap: 0.2rem;
  min-height: 5.35rem;
  align-content: center;
}

.payroll-kpi-card span {
  color: var(--text-soft);
  font-size: 0.8rem;
}

.payroll-kpi-card strong {
  color: var(--primary-dark);
  font-size: 1.15rem;
}

/* ─── Universal module shell ─── */
.module-shell {
  display: grid;
  gap: 0.9rem;
}

.module-shell-head {
  border: 1px solid rgba(21, 101, 192, 0.22);
  border-radius: 14px;
  padding: 0.95rem 1.05rem;
  background: linear-gradient(135deg, rgba(236, 245, 255, 0.95), rgba(246, 250, 255, 0.98));
  display: grid;
  gap: 0.7rem;
}

.module-shell-kicker {
  margin: 0 0 0.32rem;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 800;
  color: #2f5f95;
}

.module-shell-head h2 {
  margin: 0;
  font-size: 1.14rem;
  color: #0d3f79;
}

.module-shell-focus {
  margin: 0.2rem 0 0;
  color: #42658f;
  font-size: 0.9rem;
}

.module-checkpoints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.module-checkpoint {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(21, 101, 192, 0.2);
  background: rgba(255, 255, 255, 0.8);
  color: #1f4f81;
  font-size: 0.75rem;
  font-weight: 700;
}

.module-recommendation {
  margin: 0;
  border: 1px dashed rgba(21, 101, 192, 0.34);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: rgba(21, 101, 192, 0.07);
  color: #214f80;
  font-size: 0.84rem;
}

.module-shell-body {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.legal-form-note {
  margin: 0.2rem 0 0;
  padding: 0.58rem 0.72rem;
  border-radius: 10px;
  border: 1px dashed rgba(21, 101, 192, 0.3);
  background: rgba(21, 101, 192, 0.06);
  font-size: 0.78rem;
}

.p-card-profile .p-card-body {
  padding: 1rem 1.1rem 1.15rem;
}

.profile-shell {
  display: grid;
  gap: 0.9rem;
}

.profile-shell-centered {
  max-width: 980px;
  margin: 0 auto;
}

.profile-hero-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid rgba(21, 101, 192, 0.2);
  border-radius: 13px;
  padding: 0.75rem 0.9rem;
  background: linear-gradient(135deg, rgba(241, 248, 255, 0.95), rgba(250, 253, 255, 0.98));
}

.profile-hero-card-centered {
  justify-content: center;
  text-align: center;
  padding: 1.05rem 1.1rem;
  border-radius: 18px;
  background: linear-gradient(120deg, #6d67e4 0%, #4a7df0 45%, #30a8dd 100%);
}

.profile-avatar {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #1565c0, #0d47a1);
  background-size: cover;
  background-position: center;
}

.profile-avatar.has-image {
  color: transparent;
}

.profile-avatar-lg {
  width: 74px;
  height: 74px;
  min-width: 74px;
  border-radius: 50%;
  box-shadow: 0 12px 24px rgba(9, 30, 66, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.profile-avatar-upload {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.profile-avatar-upload:hover,
.profile-avatar-upload:focus-within {
  transform: scale(1.03);
  box-shadow: 0 14px 28px rgba(9, 30, 66, 0.28);
}

.profile-avatar-upload .profile-avatar-initial {
  position: relative;
  z-index: 0;
}

.profile-avatar-upload.has-image .profile-avatar-initial {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 1;
}

.profile-avatar-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-avatar-overlay-inner .btn-icon,
.profile-avatar-overlay-inner svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.profile-avatar-upload:hover .profile-avatar-overlay,
.profile-avatar-upload:focus-within .profile-avatar-overlay {
  opacity: 1;
}

.profile-avatar-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.profile-hero-card-centered .profile-avatar-upload:focus-within {
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: 3px;
}

@media (hover: none) {
  .profile-avatar-upload .profile-avatar-overlay {
    opacity: 0.72;
  }
}

.profile-hero-kicker {
  margin: 0 0 0.18rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(237, 247, 255, 0.88);
  font-weight: 700;
}

.profile-hero-info h3 {
  margin: 0;
  color: #0d3f79;
}

.profile-hero-info-centered h3 {
  color: #ffffff;
  font-size: 1.65rem;
}

.profile-hero-info p {
  margin: 0.1rem 0 0.38rem;
  color: #5a7596;
  font-size: 0.86rem;
}

.profile-hero-info-centered p {
  color: rgba(238, 247, 255, 0.92);
}

.profile-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}

.profile-hero-chips span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(21, 101, 192, 0.2);
  background: rgba(255, 255, 255, 0.84);
  color: #2a567f;
  padding: 0.18rem 0.48rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.profile-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.profile-stat-card {
  border: 1px solid rgba(21, 101, 192, 0.16);
  border-radius: 12px;
  padding: 0.72rem 0.82rem;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.profile-stat-card p {
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  font-size: 0.68rem;
  color: #7a8fa9;
  font-weight: 700;
}

.profile-stat-card strong {
  color: #1f3f63;
  font-size: 1rem;
}

.profile-key-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.profile-key-item {
  border: 1px solid rgba(21, 101, 192, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  padding: 0.68rem 0.8rem;
}

.profile-key-item p {
  margin: 0 0 0.22rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: #7f95b0;
}

.profile-key-item strong {
  color: #1f3f63;
  font-size: 0.95rem;
}

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

.profile-form-centered {
  background: linear-gradient(180deg, rgba(238, 247, 255, 0.95), rgba(248, 252, 255, 0.98));
  border: 1px solid rgba(21, 101, 192, 0.15);
  border-radius: 16px;
  padding: 0.85rem;
}

@media (max-width: 920px) {
  .profile-stats-strip {
    grid-template-columns: 1fr;
  }

  .profile-key-data {
    grid-template-columns: 1fr;
  }

  .profile-hero-card-centered {
    flex-direction: column;
  }
}

/* ─── Hiring executive layout ─── */
.hiring-shell {
  display: grid;
  gap: 0.85rem;
}

.hiring-executive-strip {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid rgba(21, 101, 192, 0.22);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, rgba(236, 245, 255, 0.95), rgba(245, 250, 255, 0.98));
}

.hiring-executive-strip h2 {
  margin: 0;
  font-size: 1.18rem;
  color: #0d3f78;
  letter-spacing: 0.1px;
}

.hiring-strip-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #2e5c92;
  font-weight: 800;
}

.hiring-executive-strip p {
  margin: 0;
}

.hiring-strip-metrics {
  display: grid;
  gap: 0.4rem;
  min-width: 260px;
}

.hiring-strip-metrics span {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(21, 101, 192, 0.2);
  background: rgba(255, 255, 255, 0.8);
  color: #1e4a7a;
  font-size: 0.82rem;
}

.hiring-strip-metrics strong {
  color: #0c3f7a;
}

.hiring-actions-grid .p-card,
.hiring-data-grid .p-card {
  height: 100%;
}

.hiring-actions-grid .p-card-header h2 {
  font-size: 1.02rem;
}

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

/* ─── Compact Pro Layout: Nomina + Contratacion ─── */
.payroll-shell,
.hiring-shell {
  gap: 0.7rem;
}

.payroll-shell .p-card,
.hiring-shell .p-card {
  border-radius: 12px;
}

.payroll-shell .p-card-header,
.hiring-shell .p-card-header {
  padding: 0.62rem 0.78rem;
}

.payroll-shell .p-card-header h2,
.hiring-shell .p-card-header h2 {
  font-size: 0.98rem;
}

.payroll-shell .p-card-header p,
.hiring-shell .p-card-header p {
  font-size: 0.78rem;
}

.payroll-shell .p-card-body,
.hiring-shell .p-card-body {
  padding: 0.72rem 0.82rem 0.82rem;
}

.payroll-shell .table-wrap,
.hiring-shell .table-wrap {
  border-radius: 10px;
  max-height: 24rem;
  overflow: auto;
}

.payroll-shell .table-wrap table thead th,
.hiring-shell .table-wrap table thead th {
  font-size: 0.73rem;
  padding: 0.46rem 0.56rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

.payroll-shell .table-wrap table tbody td,
.hiring-shell .table-wrap table tbody td {
  font-size: 0.79rem;
  padding: 0.48rem 0.56rem;
  line-height: 1.3;
}

.payroll-shell .status,
.hiring-shell .status {
  font-size: 0.68rem;
  padding: 0.16rem 0.42rem;
}

.payroll-shell .btn.btn-sm,
.hiring-shell .btn.btn-sm {
  padding: 0.34rem 0.54rem;
  font-size: 0.75rem;
}

.ops-module-head {
  padding: 0.72rem 0.82rem;
  border-radius: 12px;
}

.ops-module-title h2 {
  font-size: 1.03rem;
}

.ops-module-kicker {
  margin-bottom: 0.2rem;
}

.ops-chip {
  padding: 0.22rem 0.52rem;
  font-size: 0.72rem;
}

.ops-chip strong {
  font-size: 0.78rem;
}

.ops-command-bar {
  padding: 0.5rem 0.58rem;
  border-radius: 10px;
}

.ops-command-group {
  gap: 0.36rem;
}

.ops-command-group .btn.is-active {
  background: linear-gradient(135deg, #0f4c8a, #1b6ab7);
  color: #fff;
  border-color: #1a5d9e;
}

.ops-block {
  display: grid;
  gap: 0.45rem;
}

.ops-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.18rem 0.1rem;
}

.ops-block-head h3 {
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #496d95;
}

.payroll-executive-strip,
.hiring-executive-strip {
  border-radius: 12px;
  padding: 0.72rem 0.8rem;
}

.payroll-strip-metrics span,
.hiring-strip-metrics span {
  padding: 0.33rem 0.5rem;
  font-size: 0.76rem;
}

.payroll-kpi-grid,
.hiring-kpi-grid {
  margin-bottom: 0.6rem;
}

.payroll-kpi-card,
.hr-kpi-card {
  min-height: 4.55rem;
  padding: 0.62rem 0.72rem;
  border-radius: 10px;
}

.payroll-kpi-card span,
.hr-kpi-card span {
  font-size: 0.74rem;
}

.payroll-kpi-card strong,
.hr-kpi-card strong {
  font-size: 1.08rem;
}

.payroll-data-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.hiring-data-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.payroll-shell .p-form,
.hiring-shell .p-form {
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.payroll-shell .p-form label,
.hiring-shell .p-form label {
  padding: 0.5rem 0.62rem;
}

.payroll-shell .form-section,
.hiring-shell .form-section {
  padding: 0.56rem 0.62rem 0.62rem;
  border-radius: 10px;
}

.payroll-shell .form-section legend,
.hiring-shell .form-section legend {
  font-size: 0.78rem;
}

.payroll-shell .form-section-grid,
.hiring-shell .form-section-grid {
  gap: 0.58rem;
}

.hr-flow-block h3 {
  font-size: 0.88rem;
}

.hr-flow-block {
  display: grid;
  gap: 0.55rem;
  padding: 0.56rem 0.62rem;
  border-radius: 10px;
  border: 1px solid #d8e8f8;
  background: linear-gradient(180deg, #f8fcff 0%, #eef5fc 100%);
}

.hr-flow-block h3 {
  margin: 0;
  font-size: 0.95rem;
  color: #1d4f91;
}

/* ─── Dark Theme Hardening (public + portal) ─── */
body[data-theme="dark"] .site-footer {
  background: linear-gradient(180deg, #061223 0%, #08192c 55%, #0a1f36 100%);
  border-top: 1px solid rgba(117, 164, 219, 0.18);
}

body[data-theme="dark"] .site-footer h4 {
  color: rgba(212, 230, 253, 0.72);
}

body[data-theme="dark"] .site-footer p {
  color: rgba(223, 238, 255, 0.82);
}

body[data-theme="dark"] .footer-social a {
  background: rgba(17, 41, 67, 0.92);
  border-color: rgba(112, 157, 212, 0.35);
  color: rgba(221, 237, 255, 0.85);
}

body[data-theme="dark"] .footer-social a:hover {
  background: #2b69b3;
  border-color: #5d99df;
  color: #ffffff;
}

body[data-theme="dark"] .footer-bottom {
  border-top-color: rgba(121, 165, 218, 0.2);
  color: rgba(205, 225, 249, 0.72);
}

body[data-theme="dark"] .users-hero-item,
body[data-theme="dark"] .users-action-btn,
body[data-theme="dark"] .user-card,
body[data-theme="dark"] .pending-card,
body[data-theme="dark"] .user-grid-pending .user-card,
body[data-theme="dark"] .module-filters,
body[data-theme="dark"] .company-chip,
body[data-theme="dark"] .datetime-group,
body[data-theme="dark"] .trip-preview,
body[data-theme="dark"] .perm-fieldset,
body[data-theme="dark"] .auth-login-side,
body[data-theme="dark"] .auth-help,
body[data-theme="dark"] .tabs,
body[data-theme="dark"] .modal-card {
  background: #162b44;
  border-color: #466b94;
}

body[data-theme="dark"] .auth-pane,
body[data-theme="dark"] .modal-card-auth {
  background: #15283f;
  border-color: #476b93;
}

body[data-theme="dark"] .auth-input-row {
  background: #1b3552;
  border-color: #476b93;
}

body[data-theme="dark"] .auth-input-control {
  background: transparent;
  color: #e8f3ff;
}

body[data-theme="dark"] .auth-input-prefix {
  background: rgba(117, 176, 244, 0.12);
  border-color: #476b93;
  color: #a9d4ff;
}

body[data-theme="dark"] .auth-recover-hint {
  background: rgba(117, 176, 244, 0.08);
  border-color: #476b93;
}

body[data-theme="dark"] .password-strength-suite {
  border-color: rgba(133, 188, 247, 0.28);
  background: linear-gradient(145deg, #15283f 0%, #1a304c 50%, #162a42 100%);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .password-strength-bar {
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .password-rule-dot {
  border-color: rgba(230, 242, 255, 0.2);
}

body[data-theme="dark"] .password-rule-grid li {
  color: #9bb8d9;
}

body[data-theme="dark"] .password-rule-grid li.password-rule-met {
  color: #e8f3ff;
}

body[data-theme="dark"] .phone-input-professional {
  background: #1b3552;
  border-color: #476b93;
}

body[data-theme="dark"] .phone-input-professional:focus-within {
  border-color: #78abe8;
  box-shadow: 0 0 0 3px rgba(117, 176, 244, 0.22);
}

body[data-theme="dark"] .phone-input-professional .phone-reg-flag-slot {
  border-right-color: #476b93;
  background: linear-gradient(180deg, rgba(117, 176, 244, 0.12), rgba(25, 45, 70, 0.45));
}

body[data-theme="dark"] .phone-input-professional .register-lang-flag {
  border-color: rgba(230, 242, 255, 0.22);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .phone-cc-badge {
  border-right-color: #476b93;
  background: linear-gradient(180deg, rgba(117, 176, 244, 0.12), rgba(25, 45, 70, 0.5));
}

body[data-theme="dark"] .phone-dial-code {
  color: #e8f3ff;
}

body[data-theme="dark"] .phone-input-professional .phone-cc-select {
  border-right-color: #476b93;
  background-color: #1b3552;
  background-image: linear-gradient(180deg, rgba(117, 176, 244, 0.12), rgba(25, 45, 70, 0.5)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239bb8d9' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 0.45rem center;
  background-size: 100% 100%, 0.65rem auto;
  color: #e8f3ff;
}

body[data-theme="dark"] .auth-register-form .phone-national-input {
  color: #e8f3ff;
}

body[data-theme="dark"] .auth-header-premium h3 {
  color: #e4f0ff;
}

body[data-theme="dark"] .auth-side-pills span {
  background: rgba(117, 176, 244, 0.16);
  border-color: rgba(133, 188, 247, 0.35);
  color: #d8ebff;
}

body[data-theme="dark"] .users-hero-item strong,
body[data-theme="dark"] .user-card-info h4,
body[data-theme="dark"] .company-chip strong,
body[data-theme="dark"] .perm-fieldset legend,
body[data-theme="dark"] .auth-login-side h3,
body[data-theme="dark"] .modal-info-body strong {
  color: #e8f3ff;
}

body[data-theme="dark"] .users-hero-item span,
body[data-theme="dark"] .user-card-info p,
body[data-theme="dark"] .user-card-meta,
body[data-theme="dark"] .perm-check span,
body[data-theme="dark"] .perm-check span small,
body[data-theme="dark"] .company-chip .muted,
body[data-theme="dark"] .trip-preview p,
body[data-theme="dark"] .modal-info-body {
  color: #c5dbf4;
}

body[data-theme="dark"] .user-card-meta,
body[data-theme="dark"] .user-card-actions {
  border-top-color: #3f5f84;
}

body[data-theme="dark"] .perm-tag {
  background: #2a3e63;
  border-color: #4f74a3;
  color: #dcebff;
}

body[data-theme="dark"] .perm-tag-more {
  background: #243851;
  border-color: #486b95;
  color: #cfe3fb;
}

body[data-theme="dark"] .perm-check:hover {
  background: #21364f;
}

body[data-theme="dark"] .perm-check span strong {
  color: #e6f1ff;
}

body[data-theme="dark"] .table-wrap table thead th {
  background: linear-gradient(180deg, #1a304a 0%, #223c5d 100%);
  color: #d9eaff;
  border-bottom-color: #4a6f99;
}

body[data-theme="dark"] .table-wrap table tbody tr:hover {
  background: #24415f;
}

body[data-theme="dark"] .tabs {
  background: #203852;
}

body[data-theme="dark"] .tab {
  color: #c0d8f4;
}

body[data-theme="dark"] .tab.active {
  background: #2f71bc;
  color: #ffffff;
}

body[data-theme="dark"] .p-card-header,
body[data-theme="dark"] .module-filters,
body[data-theme="dark"] .users-hero-item,
body[data-theme="dark"] .user-card,
body[data-theme="dark"] .company-chip,
body[data-theme="dark"] .modal-card {
  box-shadow: 0 12px 30px rgba(2, 10, 20, 0.38);
}

body[data-theme="dark"] .hiring-executive-strip {
  background: linear-gradient(135deg, rgba(21, 46, 74, 0.95), rgba(18, 37, 60, 0.98));
  border-color: #4d739c;
}

body[data-theme="dark"] .ops-module-head {
  background: linear-gradient(135deg, rgba(21, 46, 74, 0.95), rgba(18, 37, 60, 0.98));
  border-color: #4d739c;
}

body[data-theme="dark"] .ops-module-head-hiring {
  background: linear-gradient(135deg, rgba(36, 40, 83, 0.95), rgba(27, 32, 70, 0.98));
  border-color: #666eb5;
}

body[data-theme="dark"] .ops-module-kicker {
  color: #adcff7;
}

body[data-theme="dark"] .ops-module-title h2 {
  color: #ebf5ff;
}

body[data-theme="dark"] .ops-chip {
  background: rgba(20, 42, 69, 0.92);
  border-color: rgba(102, 151, 209, 0.42);
  color: #d2e7ff;
}

body[data-theme="dark"] .ops-chip strong {
  color: #f1f7ff;
}

body[data-theme="dark"] .ops-command-bar {
  background: linear-gradient(180deg, #1b324c, #192d43);
  border-color: #486c95;
}

body[data-theme="dark"] .ops-command-group .btn.is-active {
  background: linear-gradient(135deg, #1f70c1, #2a87dd);
  border-color: #3b8fdd;
}

body[data-theme="dark"] .ops-block-head h3 {
  color: #9ac5f2;
}

body[data-theme="dark"] .hr-flow-block {
  background: linear-gradient(180deg, #182f48 0%, #162a40 100%);
  border-color: #43688f;
}

body[data-theme="dark"] .payroll-shell .table-wrap table tbody td,
body[data-theme="dark"] .hiring-shell .table-wrap table tbody td {
  color: #d2e7ff;
}

body[data-theme="dark"] .payroll-shell .p-card-header p,
body[data-theme="dark"] .hiring-shell .p-card-header p {
  color: #bdd6f2;
}

body[data-theme="dark"] .payroll-executive-strip {
  background: linear-gradient(135deg, rgba(15, 49, 66, 0.95), rgba(14, 38, 53, 0.98));
  border-color: rgba(93, 182, 216, 0.46);
}

body[data-theme="dark"] .payroll-strip-kicker {
  color: #8ee4ff;
}

body[data-theme="dark"] .payroll-executive-strip h2 {
  color: #e8f8ff;
}

body[data-theme="dark"] .payroll-strip-metrics span {
  background: rgba(18, 52, 70, 0.92);
  border-color: rgba(95, 173, 201, 0.48);
  color: #d5f3ff;
}

body[data-theme="dark"] .hr-flow-block h3 {
  color: #beddff;
}

body[data-theme="dark"] .hiring-strip-kicker {
  color: #a9cefa;
}

body[data-theme="dark"] .hiring-executive-strip h2 {
  color: #ebf5ff;
}

body[data-theme="dark"] .hiring-strip-metrics span {
  background: rgba(20, 42, 69, 0.92);
  border-color: rgba(102, 151, 209, 0.42);
  color: #d2e7ff;
}

body[data-theme="dark"] .hiring-strip-metrics strong {
  color: #f1f7ff;
}

body[data-theme="dark"] .module-shell-head {
  background: linear-gradient(135deg, rgba(20, 44, 71, 0.95), rgba(15, 34, 56, 0.98));
  border-color: #4f749d;
}

body[data-theme="dark"] .module-shell-kicker {
  color: #a9cdf7;
}

body[data-theme="dark"] .module-shell-head h2 {
  color: #ecf5ff;
}

body[data-theme="dark"] .module-shell-focus {
  color: #bcd6f2;
}

body[data-theme="dark"] .module-checkpoint {
  background: rgba(19, 42, 67, 0.92);
  border-color: rgba(102, 152, 211, 0.43);
  color: #d8ebff;
}

body[data-theme="dark"] .module-recommendation {
  background: rgba(38, 71, 106, 0.3);
  border-color: rgba(125, 174, 233, 0.45);
  color: #d0e5ff;
}

body[data-theme="dark"] .legal-form-note {
  background: rgba(40, 73, 109, 0.3);
  border-color: rgba(118, 170, 232, 0.45);
  color: #cfe4ff;
}

body[data-theme="dark"] .profile-hero-card {
  background: linear-gradient(135deg, rgba(23, 48, 76, 0.95), rgba(16, 34, 55, 0.98));
  border-color: #4d739d;
}

body[data-theme="dark"] .profile-hero-card-centered {
  background: linear-gradient(120deg, #3d3a8f 0%, #315b9e 45%, #2478a1 100%);
}

body[data-theme="dark"] .profile-hero-info h3 {
  color: #edf6ff;
}

body[data-theme="dark"] .profile-hero-info p {
  color: #c0d9f6;
}

body[data-theme="dark"] .profile-hero-chips span {
  background: rgba(20, 44, 70, 0.92);
  border-color: rgba(98, 149, 209, 0.44);
  color: #d9ebff;
}

body[data-theme="dark"] .profile-stat-card {
  background: linear-gradient(180deg, #182f49, #162a41);
  border-color: #456b94;
}

body[data-theme="dark"] .profile-stat-card p {
  color: #a9c8ea;
}

body[data-theme="dark"] .profile-stat-card strong {
  color: #ecf5ff;
}

body[data-theme="dark"] .profile-key-item {
  background: linear-gradient(180deg, #182f49, #162a41);
  border-color: #456b94;
}

body[data-theme="dark"] .profile-key-item p {
  color: #a9c8ea;
}

body[data-theme="dark"] .profile-key-item strong {
  color: #ecf5ff;
}

body[data-theme="dark"] .profile-form-centered {
  background: linear-gradient(180deg, rgba(24, 46, 72, 0.96), rgba(19, 39, 60, 0.98));
  border-color: #446892;
}

/* Unified module accent system (light/dark) */
.module-shell[data-module-view="dashboard"] {
  --module-accent-start: #4f7ff2;
  --module-accent-end: #26a7df;
}

.module-shell[data-module-view^="transport-"],
.module-shell[data-module-view="history"],
.module-shell[data-module-view="reports"] {
  --module-accent-start: #1f95b8;
  --module-accent-end: #34b3c9;
}

.module-shell[data-module-view="payroll"],
.module-shell[data-module-view="hiring"],
.module-shell[data-module-view="labor-compliance"] {
  --module-accent-start: #6a6de8;
  --module-accent-end: #4a8ee8;
}

.module-shell[data-module-view="admin-users"],
.module-shell[data-module-view="authorizations"] {
  --module-accent-start: #5a73d4;
  --module-accent-end: #4a8cc9;
}

.module-shell[data-module-view="notifications"] {
  --module-accent-start: #5e82f0;
  --module-accent-end: #3fa7dd;
}

.portal-main .module-shell-head,
.portal-main .hiring-executive-strip,
.portal-main .payroll-executive-strip {
  border-color: var(--module-border-strong);
  background: linear-gradient(120deg, color-mix(in srgb, var(--module-accent-start) 12%, #ffffff 88%), color-mix(in srgb, var(--module-accent-end) 10%, #ffffff 90%));
}

.portal-main .p-card,
.portal-main .table-wrap,
.portal-main .users-hero-item,
.portal-main .user-card {
  border-color: color-mix(in srgb, var(--module-border-strong) 78%, #ffffff 22%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--module-accent-start) 16%, transparent);
}

.portal-main .p-card-header {
  background: linear-gradient(135deg, color-mix(in srgb, var(--module-accent-start) 8%, #ffffff 92%), color-mix(in srgb, var(--module-accent-end) 10%, #ffffff 90%));
}

.portal-main .p-card-body {
  background: var(--module-soft-bg);
}

.portal-main .kpi,
.portal-main .hr-kpi-card,
.portal-main .payroll-kpi-card,
.portal-main .profile-stat-card,
.portal-main .profile-key-item {
  border-color: color-mix(in srgb, var(--module-border-strong) 82%, #ffffff 18%);
}

.portal-main .table-wrap table thead th {
  background: color-mix(in srgb, var(--module-accent-start) 8%, transparent);
}

.portal-main .module-checkpoint {
  background: color-mix(in srgb, var(--module-accent-start) 12%, #ffffff 88%);
  border-color: color-mix(in srgb, var(--module-accent-end) 22%, #ffffff 78%);
}

.portal-main .btn-action {
  background: linear-gradient(135deg, var(--module-accent-start), var(--module-accent-end));
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

body[data-theme="dark"] .portal-main .module-shell-head,
body[data-theme="dark"] .portal-main .hiring-executive-strip,
body[data-theme="dark"] .portal-main .payroll-executive-strip {
  background: linear-gradient(120deg, color-mix(in srgb, var(--module-accent-start) 24%, #0f1f34 76%), color-mix(in srgb, var(--module-accent-end) 22%, #0f1f34 78%));
}

body[data-theme="dark"] .portal-main .p-card,
body[data-theme="dark"] .portal-main .table-wrap,
body[data-theme="dark"] .portal-main .users-hero-item,
body[data-theme="dark"] .portal-main .user-card {
  border-color: color-mix(in srgb, var(--module-border-strong) 88%, #0d1b2d 12%);
  box-shadow: 0 12px 30px rgba(2, 10, 20, 0.36);
}

body[data-theme="dark"] .portal-main .p-card-header {
  background: linear-gradient(135deg, color-mix(in srgb, var(--module-accent-start) 20%, #13253b 80%), color-mix(in srgb, var(--module-accent-end) 20%, #12253a 80%));
}

body[data-theme="dark"] .portal-main .p-card-body {
  background: var(--module-soft-bg);
}

body[data-theme="dark"] .portal-main .btn-action {
  background: linear-gradient(135deg, color-mix(in srgb, var(--module-accent-start) 78%, #1b2f4d 22%), color-mix(in srgb, var(--module-accent-end) 78%, #1b2f4d 22%));
  border-color: rgba(149, 196, 255, 0.45);
  color: #f3f9ff;
}

/* Portal clarity pass: dark typography + layout consistency */
.portal-main .dash-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

/* Historial: dos columnas iguales (combustible / novedades) y tres insights alineados */
.portal-main .history-ops-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

@media (min-width: 900px) {
  .portal-main .history-ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.portal-main .history-insights-grid {
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

@media (min-width: 960px) {
  .portal-main .history-insights-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .portal-main .dash-grid.trips-actions-row--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Contratacion: filas de acciones alineadas (3 + 2 tarjetas) y panel de seguimiento */
@media (min-width: 900px) {
  .hiring-actions-grid.hiring-actions-row--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hiring-actions-grid.hiring-actions-row--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .hiring-data-grid.hiring-results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.portal-main .dash-grid > .p-card,
.portal-main .hiring-actions-grid > .p-card,
.portal-main .hiring-data-grid > .p-card,
.portal-main .payroll-data-grid > .p-card,
.portal-main .user-grid > .user-card,
.portal-main .user-grid-pending > .user-card,
.portal-main .kpi-grid > .kpi,
.portal-main .users-stats-grid > .users-stat-card,
.portal-main .hr-kpi-grid > .hr-kpi-card,
.portal-main .payroll-kpi-grid > .payroll-kpi-card {
  height: 100%;
}

.portal-main .dash-grid > .p-card,
.portal-main .hiring-actions-grid > .p-card,
.portal-main .hiring-data-grid > .p-card,
.portal-main .payroll-data-grid > .p-card,
.portal-main .user-grid > .user-card,
.portal-main .user-grid-pending > .user-card {
  display: flex;
  flex-direction: column;
}

.portal-main .dash-grid > .p-card .p-card-body,
.portal-main .hiring-actions-grid > .p-card .p-card-body,
.portal-main .hiring-data-grid > .p-card .p-card-body,
.portal-main .payroll-data-grid > .p-card .p-card-body {
  flex: 1;
}

.portal-main .p-form {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-items: start;
}

body[data-theme="dark"] .portal-main,
body[data-theme="dark"] .portal-main p,
body[data-theme="dark"] .portal-main li,
body[data-theme="dark"] .portal-main label,
body[data-theme="dark"] .portal-main .dash-stat-label,
body[data-theme="dark"] .portal-main .empty-state p {
  color: #d2e6ff;
}

body[data-theme="dark"] .portal-main strong,
body[data-theme="dark"] .portal-main h2,
body[data-theme="dark"] .portal-main h3,
body[data-theme="dark"] .portal-main h4,
body[data-theme="dark"] .portal-main .module-filters-title,
body[data-theme="dark"] .portal-main .hr-kpi-card strong,
body[data-theme="dark"] .portal-main .payroll-kpi-card strong {
  color: #ecf5ff;
}

body[data-theme="dark"] .dash-stat-row,
body[data-theme="dark"] .user-card-meta,
body[data-theme="dark"] .user-card-actions {
  border-color: #3f6085;
}

body[data-theme="dark"] .empty-state {
  color: #bad2ef;
}

body[data-theme="dark"] .empty-state-icon {
  background: #213b59;
  color: #b8d9ff;
}

body[data-theme="dark"] .perm-badge,
body[data-theme="dark"] .role-chip {
  background: rgba(112, 171, 239, 0.14);
  border-color: rgba(135, 190, 247, 0.35);
  color: #d6e9ff;
}

body[data-theme="dark"] .hr-alert-item,
body[data-theme="dark"] .hr-kpi-card,
body[data-theme="dark"] .payroll-kpi-card {
  background: #182f49;
  border-color: #4a7099;
  color: #d9eaff;
}

body[data-theme="dark"] .hr-kpi-card span,
body[data-theme="dark"] .payroll-kpi-card span {
  color: #b8d3f1;
}

body[data-theme="dark"] .timer-badge {
  background: rgba(245, 159, 0, 0.2);
  color: #ffe5a8;
  border: 1px solid rgba(245, 159, 0, 0.4);
}

body[data-theme="dark"] .portal-main .btn-action:hover {
  border-color: #8fc2ff;
  color: #ffffff;
  background: linear-gradient(135deg, #4b68ca, #2f7db8);
}

@media (max-width: 1320px) {
  .portal-main .dash-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .hiring-strip-metrics {
    min-width: 220px;
  }
}

@media (max-width: 980px) {
  .ops-module-head {
    flex-direction: column;
  }

  .ops-module-chips {
    justify-content: flex-start;
  }

  .ops-command-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-command-group {
    width: 100%;
  }

  .ops-block-head {
    padding: 0.1rem 0;
  }

  .payroll-data-grid,
  .hiring-data-grid {
    grid-template-columns: 1fr;
  }

  .payroll-shell .p-form,
  .hiring-shell .p-form {
    grid-template-columns: 1fr;
  }

  .module-shell-head {
    padding: 0.85rem 0.88rem;
  }

  .payroll-executive-strip {
    flex-direction: column;
  }

  .payroll-strip-metrics {
    min-width: 0;
    width: 100%;
  }

  .hiring-executive-strip {
    flex-direction: column;
  }

  .hiring-strip-metrics {
    min-width: 0;
    width: 100%;
  }

  .hiring-data-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .auth-login-shell {
    grid-template-columns: 1fr;
  }
}

/* ─── Sidebar badge ─── */
.side-link {
  position: relative;
}
.side-link-badge {
  margin-left: auto;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  min-width: 1.3rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
}

/* ─── FLOTA / CAMIONES ─── */
.fleet-hero-strip,
.drivers-hero-strip,
.users-hero-strip,
.notif-hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #06b6d4 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(30, 58, 138, 0.22);
  margin-bottom: 1rem;
}
.fleet-hero-strip h2,
.drivers-hero-strip h2,
.users-hero-strip h2,
.notif-hero-strip h2 {
  margin: 0.15rem 0 0.25rem;
  color: #fff;
  font-size: 1.2rem;
}
.fleet-hero-strip p,
.drivers-hero-strip p,
.users-hero-strip p,
.notif-hero-strip p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}
.fleet-hero-kicker,
.drivers-hero-kicker,
.users-hero-kicker,
.notif-hero-kicker {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}
.fleet-hero-metrics,
.drivers-hero-metrics,
.notif-hero-metrics {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.fleet-hero-metric,
.drivers-hero-metric,
.notif-hero-metric {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  min-width: 110px;
  display: grid;
  gap: 0.1rem;
  backdrop-filter: blur(6px);
}
.fleet-hero-metric span,
.drivers-hero-metric span,
.notif-hero-metric span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.85);
}
.fleet-hero-metric strong,
.drivers-hero-metric strong,
.notif-hero-metric strong {
  font-size: 1.4rem;
  color: #fff;
  font-weight: 800;
}
.fleet-hero-metric-alert,
.drivers-hero-metric-alert,
.notif-hero-metric-alert {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.4), rgba(248, 113, 113, 0.25));
  border-color: rgba(254, 202, 202, 0.6);
}
.drivers-hero-metric-warn {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.4), rgba(251, 191, 36, 0.25));
  border-color: rgba(254, 215, 170, 0.6);
}
.fleet-hero-metric-warn {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.4), rgba(251, 191, 36, 0.25));
  border-color: rgba(254, 215, 170, 0.6);
}
.users-hero-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fleet-hero-strip--solo,
.drivers-hero-strip--solo,
.notif-hero-strip--solo {
  justify-content: center;
}

.fleet-hero-strip--solo .fleet-hero-metrics,
.drivers-hero-strip--solo .drivers-hero-metrics,
.notif-hero-strip--solo .notif-hero-metrics {
  width: 100%;
  justify-content: center;
}

.users-hero-strip--solo {
  justify-content: flex-end;
}

.payroll-executive-strip--solo,
.hiring-executive-strip--solo {
  flex-wrap: wrap;
  align-items: stretch;
}

.payroll-executive-strip--solo .payroll-strip-metrics,
.hiring-executive-strip--solo .hiring-strip-metrics {
  min-width: 0;
  flex: 1 1 100%;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.45rem;
}

.payroll-executive-strip--solo .payroll-strip-metrics span,
.hiring-executive-strip--solo .hiring-strip-metrics span {
  justify-content: center;
  text-align: center;
}

.vehicle-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.vehicle-plate {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--primary-dark);
  background: rgba(21, 101, 192, 0.08);
  padding: 0.18rem 0.5rem;
  border-radius: 8px;
  display: inline-block;
  letter-spacing: 0.6px;
  width: fit-content;
}

/* ─── CONDUCTORES Cards ─── */
.drivers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}
.driver-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(15, 28, 46, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.driver-card-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(14, 165, 233, 0.08));
  border-bottom: 1px solid var(--line);
}
.driver-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.8px;
}
.driver-card-title h4 {
  margin: 0;
  font-size: 0.96rem;
}
.driver-card-title p {
  margin: 0;
  font-size: 0.78rem;
}
.driver-card-status {
  margin-left: auto;
}
.driver-card-body {
  padding: 0.7rem 0.85rem;
  display: grid;
  gap: 0.35rem;
}
.driver-info-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text);
}
.driver-info-row span:first-child svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}
.driver-card-actions {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 0.85rem 0.8rem;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.02);
  flex-wrap: wrap;
}

/* ─── CALENDARIO ─── */
.calendar-shell {
  display: grid;
  gap: 1rem;
}
.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f766e 0%, #2563eb 60%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.25);
}
.calendar-toolbar h2 {
  margin: 0.1rem 0 0.2rem;
  color: #fff;
  font-size: 1.5rem;
  text-transform: capitalize;
}

.calendar-title-block h2 {
  margin: 0;
}
.calendar-toolbar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}
.calendar-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
}
.calendar-controls {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.calendar-controls .btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}
.calendar-controls .btn:hover {
  background: rgba(255, 255, 255, 0.28);
}
.calendar-legend {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0 0.4rem;
}
.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}
.cal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.dot-teal { background: linear-gradient(135deg, #14b8a6, #0ea5e9); }
.dot-violet { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.dot-orange { background: linear-gradient(135deg, #f97316, #ea580c); }

.calendar-grid {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
  border-bottom: 1px solid var(--line);
}
.cal-weekday {
  padding: 0.55rem 0.6rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
  color: var(--text-soft);
  text-align: center;
}
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 110px;
  padding: 0.45rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: #fff;
  transition: background 0.15s ease;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell-other {
  background: #fafafa;
  color: var(--text-soft);
}
.cal-cell-today {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.02));
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35);
}
.cal-cell-has-events {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.04), #fff);
}
.cal-day {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cal-cell-other .cal-day { color: var(--text-soft); }
.cal-today-pill {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
}
.cal-events {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.cal-event {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border: none;
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid #6366f1;
  border-radius: 6px;
  padding: 0.25rem 0.4rem;
  font-size: 0.74rem;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.cal-event:hover {
  transform: translateX(2px);
  background: rgba(99, 102, 241, 0.18);
}
.cal-event.dot-blue { background: rgba(59, 130, 246, 0.1); border-left-color: #2563eb; }
.cal-event.dot-teal { background: rgba(20, 184, 166, 0.1); border-left-color: #0d9488; }
.cal-event.dot-violet { background: rgba(139, 92, 246, 0.1); border-left-color: #7c3aed; }
.cal-event.dot-orange { background: rgba(249, 115, 22, 0.1); border-left-color: #ea580c; }
.cal-event-time {
  font-weight: 700;
  color: var(--primary-dark);
}
.cal-event-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-more {
  font-size: 0.7rem;
  color: var(--text-soft);
  font-style: italic;
}
.calendar-side-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}
.cal-day-list, .cal-upcoming-list {
  display: grid;
  gap: 0.5rem;
}
.cal-day-event,
.cal-upcoming-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.cal-day-event-time,
.cal-upcoming-date {
  font-weight: 800;
  color: var(--primary-dark);
  display: grid;
  text-align: center;
}
.cal-upcoming-date strong {
  font-size: 0.85rem;
}
.cal-day-event-info,
.cal-upcoming-info {
  display: grid;
  gap: 0.1rem;
  font-size: 0.84rem;
}

/* ─── PAYROLL filters ─── */
.payroll-filters-bar {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
  align-items: end;
}
.payroll-data-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* hiring grids alignment */
.hiring-actions-grid,
.hiring-data-grid,
.hiring-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.hiring-data-grid > .p-card,
.hiring-actions-grid > .p-card,
.hr-flow-block .hiring-actions-grid > * {
  display: flex;
  flex-direction: column;
}
.hr-flow-block {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.04), transparent);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 14px;
  padding: 0.85rem;
  margin: 0.5rem 0;
}
.hr-flow-block h3 {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─── USUARIOS rediseño ─── */
.users-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
  align-items: stretch;
}
.users-stat-card {
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.25rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 5rem;
  align-content: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.users-stat-card span {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  opacity: 0.92;
  font-weight: 700;
}
.users-stat-card strong {
  font-size: 1.6rem;
  font-weight: 800;
}
.users-stat-blue { background: linear-gradient(135deg, #4d6fa8, #6b9bd9); }
.users-stat-violet { background: linear-gradient(135deg, #7c6bd6, #9b8ae8); }
.users-stat-cyan { background: linear-gradient(135deg, #3d8faa, #5bbfd4); }
.users-stat-emerald { background: linear-gradient(135deg, #3d9b78, #5ec09a); }
.users-stat-orange { background: linear-gradient(135deg, #d4804a, #e8a066); }
.users-stat-green { background: linear-gradient(135deg, #4a9b62, #6bc585); }

/* ─── NOTIFICACIONES ─── */
.notif-toolbar {
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: flex-end;
}
.notif-list {
  display: grid;
  gap: 0.55rem;
}
.notif-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.notif-card:hover {
  transform: translateX(2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}
.notif-card-unread {
  border-color: rgba(59, 130, 246, 0.45);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.04), #fff);
}
.notif-leading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.notif-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}
.notif-icon svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}
.notif-content h4 {
  margin: 0.2rem 0 0.1rem;
  font-size: 0.96rem;
}
.notif-content p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}
.notif-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.notif-time { font-size: 0.74rem; }
.notif-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  color: #fff;
}
.notif-tag-blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.notif-tag-violet { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.notif-tag-slate { background: linear-gradient(135deg, #475569, #334155); }
.notif-actions { white-space: nowrap; }

/* ─── DARK theme tunings nuevos ─── */
body[data-theme="dark"] .driver-card,
body[data-theme="dark"] .notif-card,
body[data-theme="dark"] .calendar-grid,
body[data-theme="dark"] .cal-cell,
body[data-theme="dark"] .cal-day-event,
body[data-theme="dark"] .cal-upcoming-item {
  background: #122036;
  border-color: #2b3e58;
  color: #e2eaf6;
}
body[data-theme="dark"] .cal-cell-other { background: #0e1a2e; }
body[data-theme="dark"] .cal-cell-today {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.05));
  box-shadow: inset 0 0 0 2px rgba(96, 165, 250, 0.5);
}
body[data-theme="dark"] .cal-weekdays {
  background: linear-gradient(180deg, #122036, #0b1424);
  border-bottom-color: #2b3e58;
}
body[data-theme="dark"] .vehicle-plate {
  background: rgba(99, 167, 247, 0.12);
  color: #c8dcff;
}
body[data-theme="dark"] .hr-flow-block {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.12), transparent);
  border-color: rgba(99, 102, 241, 0.3);
}
body[data-theme="dark"] .notif-card-unread {
  border-color: rgba(96, 165, 250, 0.55);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1), #122036);
}

@media (max-width: 760px) {
  .calendar-toolbar { flex-direction: column; align-items: stretch; }
  .calendar-controls { justify-content: flex-end; }
  .cal-cell { min-height: 84px; }
  .cal-event-title { display: none; }
}

/* ─── Calendar filters bar ─── */
.calendar-filters-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
  align-items: end;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(14, 165, 233, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 14px;
}

/* ─── Form Sections con color (estilo enterprise) ─── */
.p-form-colored {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.85rem !important;
}
.p-form-colored > .full,
.p-form-colored > label.full,
.p-form-colored > p,
.p-form-colored > button {
  grid-column: 1 / -1;
}
.form-section {
  border-radius: 16px;
  padding: 1rem 1.1rem 0.9rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(248, 250, 252, 0.95));
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  margin: 0;
}
.form-section legend {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.4px;
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  margin-bottom: 0.35rem;
}
.form-section legend svg {
  width: 14px;
  height: 14px;
}
.form-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
}
.form-section-grid > label.full,
.form-section-grid > .full {
  grid-column: 1 / -1;
}
.form-section-grid label {
  display: grid;
  gap: 0.3rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  font-size: 0.84rem;
  transition: all 0.15s ease;
}
.form-section-grid label:focus-within {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Variantes de color por sección */
.form-section-blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(37, 99, 235, 0.04));
  border-color: rgba(59, 130, 246, 0.25);
}
.form-section-blue legend { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.form-section-violet {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(124, 58, 237, 0.04));
  border-color: rgba(139, 92, 246, 0.25);
}
.form-section-violet legend { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.form-section-cyan {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06), rgba(14, 165, 233, 0.04));
  border-color: rgba(6, 182, 212, 0.25);
}
.form-section-cyan legend { background: linear-gradient(135deg, #0e7490, #06b6d4); }
.form-section-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(5, 150, 105, 0.04));
  border-color: rgba(16, 185, 129, 0.25);
}
.form-section-emerald legend { background: linear-gradient(135deg, #047857, #10b981); }
.form-section-amber {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.04));
  border-color: rgba(251, 191, 36, 0.30);
}
.form-section-amber legend { background: linear-gradient(135deg, #b45309, #f59e0b); }
.form-section-rose {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.06), rgba(236, 72, 153, 0.04));
  border-color: rgba(244, 63, 94, 0.25);
}
.form-section-rose legend { background: linear-gradient(135deg, #be123c, #f43f5e); }

/* ─── Field label con icono colorizado ─── */
.field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.3px;
  color: var(--text-soft);
  text-transform: uppercase;
}
.field-label svg {
  width: 14px;
  height: 14px;
  padding: 2px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(99, 102, 241, 0.15));
  color: var(--primary);
}

/* ─── Dark theme tunings de form sections ─── */
body[data-theme="dark"] .form-section {
  background: linear-gradient(180deg, #122036, #0e1a2c);
  border-color: #2b3e58;
}
body[data-theme="dark"] .form-section-grid label {
  background: #0f1c30;
  border-color: #2b3e58;
  color: #e2eaf6;
}
body[data-theme="dark"] .form-section-blue { background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(30, 64, 175, 0.1)); }
body[data-theme="dark"] .form-section-violet { background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(109, 40, 217, 0.1)); }
body[data-theme="dark"] .form-section-cyan { background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(14, 116, 144, 0.1)); }
body[data-theme="dark"] .form-section-emerald { background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(4, 120, 87, 0.1)); }
body[data-theme="dark"] .form-section-amber { background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(180, 83, 9, 0.08)); }
body[data-theme="dark"] .form-section-rose { background: linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(190, 18, 60, 0.1)); }
body[data-theme="dark"] .field-label {
  color: #a8bcd6;
}
body[data-theme="dark"] .field-label svg {
  background: rgba(99, 167, 247, 0.18);
  color: #93c5fd;
}

/* Pulir botón primario con más vida */
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #6366f1, #8b5cf6) !important;
  background-size: 200% 200% !important;
  border: none;
  color: #fff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background-position: 100% 50%;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.45);
}

/* KPI cards en color para dashboard */
.kpi {
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(139, 92, 246, 0.05));
  pointer-events: none;
}

/* Secciones colapsables más vivas */
.create-card-toggle {
  background: linear-gradient(135deg, #1e40af, #6366f1) !important;
  color: #fff !important;
}
.create-card-toggle:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
}
