:root {
  /* Transportes Antares — paleta corporativa */
  --brand-blue-deep: #377cc0;
  --brand-blue-mid: #83bee9;
  --brand-blue-soft: #cce5f8;
  --primary-rgb: 55, 124, 192;
  --primary-mid-rgb: 131, 190, 233;
  --brand-blue-soft-rgb: 204, 229, 248;

  --primary: var(--brand-blue-deep);
  --primary-dark: #2a6399;
  --primary-deeper: #1e4a73;
  --primary-mid: var(--brand-blue-mid);
  --primary-light: var(--brand-blue-soft);
  --primary-glow: rgba(var(--primary-rgb), 0.2);
  --accent: var(--brand-blue-mid);
  --white: #ffffff;
  --text: #0b2138;
  --text-soft: #3a5a78;
  --line: #b8d4eb;
  --success: #1b8e5f;
  --warning: #f59f00;
  --danger: #d62828;
  --gradient-hero: linear-gradient(135deg, #1e4a73 0%, #2d6aa8 38%, #377cc0 72%, #83bee9 100%);
  --gradient-section: linear-gradient(180deg, var(--brand-blue-soft) 0%, #ffffff 100%);
  --gradient-dark-section: linear-gradient(180deg, #0b2138 0%, #142a42 100%);
  --shadow-card: 0 8px 32px rgba(var(--primary-rgb), 0.12);
  --shadow-card-hover: 0 20px 48px rgba(var(--primary-rgb), 0.18);
  --shadow-btn: 0 6px 20px rgba(var(--primary-rgb), 0.28);
  --radius: 16px;
  --radius-sm: 10px;
  --module-accent-start: var(--brand-blue-deep);
  --module-accent-end: var(--brand-blue-mid);
  --module-soft-bg: linear-gradient(180deg, #f5fbff 0%, var(--brand-blue-soft) 100%);
  --module-border-strong: #9ec8e8;
  --public-nav-bg: rgba(255, 255, 255, 0.9);
  --public-nav-border: rgba(var(--primary-rgb), 0.14);
  --public-nav-brand: #1a4a73;
  --public-nav-link: rgba(26, 74, 115, 0.74);
  --public-nav-link-hover-bg: rgba(var(--primary-rgb), 0.09);
  --public-nav-mobile-panel-bg: rgba(251, 253, 255, 0.98);
  --public-nav-mobile-shadow: 0 20px 50px rgba(26, 74, 115, 0.12), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  --public-nav-scroll-thumb: rgba(var(--primary-rgb), 0.32);
  --portal-sidebar-scroll-thumb: rgba(var(--primary-rgb), 0.22);
  --portal-sidebar-scroll-thumb-hover: rgba(var(--primary-rgb), 0.38);
  --portal-sidebar-bg: #ffffff;
  --portal-sidebar-border: #e4ebf2;
  --portal-sidebar-link: #8b9cb0;
  --portal-sidebar-link-hover: #3a5a78;
  --portal-sidebar-active-bg: rgba(var(--primary-rgb), 0.1);
  --portal-sidebar-active-text: var(--primary);
  --portal-sidebar-rail-width-collapsed: 132px;
  --portal-sidebar-rail-width-expanded: 272px;
  --portal-sidebar-rail-width: var(--portal-sidebar-rail-width-expanded);
  --portal-main-scroll-thumb: rgba(var(--primary-rgb), 0.28);
  --portal-main-scroll-thumb-hover: rgba(var(--primary-rgb), 0.46);
  --public-hamburger-bg: rgba(var(--primary-rgb), 0.1);
  --public-hamburger-border: rgba(var(--primary-rgb), 0.18);
  --public-hamburger-icon: var(--primary);
  --public-hamburger-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.12);
  --public-nav-link-active-bg: rgba(var(--primary-rgb), 0.11);
  --public-nav-active-text: #265985;
  --public-toggle-bg: rgba(var(--primary-rgb), 0.08);
  --public-toggle-border: rgba(var(--primary-rgb), 0.15);
  --public-toggle-fg: #234e73;
  --public-toggle-active-bg: rgba(var(--primary-rgb), 0.16);

  /* Tipografía corporativa: Principal Montserrat · Secundaria Poppins · Terciaria Roboto/Lato */
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-secondary: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-tertiary: "Roboto", "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

body[data-theme="dark"] {
  --portal-sidebar-bg: #152238;
  --portal-sidebar-border: #2a4060;
  --portal-sidebar-link: #8fa8c4;
  --portal-sidebar-link-hover: #d7e8ff;
  --portal-sidebar-active-bg: rgba(var(--primary-mid-rgb), 0.16);
  --portal-sidebar-active-text: #b8d9f5;
  --portal-sidebar-scroll-thumb: rgba(var(--primary-mid-rgb), 0.32);
  --portal-sidebar-scroll-thumb-hover: rgba(var(--primary-mid-rgb), 0.5);
  --text: #e8f4fc;
  --text-main: #e8f4fc;
  --text-soft: #9ec7e8;
  --line: #355a78;
  --white: #0f1c2e;
  --primary-light: #1e3550;
  --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: var(--brand-blue-mid);
  --module-accent-end: var(--brand-blue-deep);
  --module-soft-bg: linear-gradient(180deg, #1a2f47 0%, #152a40 100%);
  --module-border-strong: #4a7394;
  --public-nav-bg: rgba(14, 26, 44, 0.94);
  --public-nav-border: rgba(255, 255, 255, 0.1);
  --public-nav-brand: #f0f8ff;
  --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(var(--primary-mid-rgb), 0.42);
  --public-hamburger-bg: rgba(var(--primary-rgb), 0.22);
  --public-hamburger-border: rgba(255, 255, 255, 0.16);
  --public-hamburger-icon: #cce5f8;
  --public-hamburger-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  --public-nav-link-active-bg: rgba(var(--primary-mid-rgb), 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: var(--font-body);
  color: var(--text);
  background: #eef6fc;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
}

button,
.btn {
  font-family: var(--font-secondary);
  font-weight: 700;
}

input,
select,
textarea,
table,
.muted {
  font-family: var(--font-tertiary);
}

body[data-theme="dark"] {
  background: #071824;
  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: clamp(0.65rem, 2vw, 1.15rem);
  padding: 0.72rem 0;
  flex-wrap: nowrap;
  position: relative;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  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);
}

/* ─── BRAND LOGO (top nav) — compacto: la marca protagonista está en el hero ─── */
.brand {
  padding: 2px 0;
}
.brand-logo {
  display: block;
  height: 58px;
  width: auto;
  max-width: 244px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter:
    saturate(1.22)
    contrast(1.09)
    drop-shadow(0 2px 10px rgba(var(--primary-rgb), 0.32))
    drop-shadow(0 0 20px rgba(var(--primary-mid-rgb), 0.38));
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), filter 0.28s ease;
}
.brand:hover .brand-logo,
.brand:focus-visible .brand-logo {
  transform: scale(1.03);
  filter:
    saturate(1.28)
    contrast(1.1)
    drop-shadow(0 4px 16px rgba(var(--primary-rgb), 0.42))
    drop-shadow(0 0 28px rgba(var(--primary-mid-rgb), 0.5));
}
body[data-theme="dark"] .brand-logo {
  filter:
    saturate(1.26)
    contrast(1.1)
    drop-shadow(0 2px 14px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 22px rgba(var(--primary-mid-rgb), 0.42));
}

@media (max-width: 720px) {
  .brand-logo {
    height: 50px;
    max-width: 206px;
  }
}
@media (max-width: 480px) {
  .brand-logo {
    height: 44px;
    max-width: 174px;
  }
}

.brand-text-fallback,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

nav {
  display: flex;
  gap: 0.1rem;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: inline proximity;
}

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

nav a {
  color: var(--public-nav-link);
  text-decoration: none;
  font-size: clamp(0.8125rem, 0.95vw, 0.9025rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  position: relative;
  padding: 0.42rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  scroll-snap-align: start;
  flex-shrink: 0;
}

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: 5px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-mid), var(--accent));
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

nav a:hover::after { width: 52%; }
nav a.active::after { width: 58%; }

nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hamburger {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  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: 14px;
  box-shadow: var(--public-hamburger-shadow);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.34s ease,
    border-color 0.34s ease,
    box-shadow 0.34s ease,
    color 0.28s ease;
}

/* Brillo que recorre el botón al pasar el cursor */
.hamburger::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 48%,
    transparent 72%
  );
  transform: translateX(-130%);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  pointer-events: none;
}

body[data-theme="dark"] .hamburger::before {
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(160, 210, 255, 0.32) 48%,
    transparent 72%
  );
}

.hamburger:hover {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(var(--primary-rgb), 0.42);
  box-shadow:
    0 10px 24px rgba(var(--primary-rgb), 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hamburger:hover::before {
  opacity: 1;
  transform: translateX(130%);
}

.hamburger:active {
  transform: scale(0.95);
}

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

.hamburger svg {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
}

.hamburger svg line {
  transition:
    transform 0.4s cubic-bezier(0.62, 0.01, 0.27, 1.3),
    opacity 0.2s ease;
  transform-origin: center;
  transform-box: fill-box;
}

/* Estado abierto: el botón se convierte en una "X" sobre un fondo de acento */
.hamburger[aria-expanded="true"] {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-mid) 100%
  );
  border-color: transparent;
  color: #fff;
  box-shadow:
    0 8px 22px rgba(var(--primary-rgb), 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hamburger[aria-expanded="true"] svg line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger[aria-expanded="true"] svg line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger[aria-expanded="true"] svg line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Sitio público: hamburguesa y drawer lateral premium ≤1024px; en escritorio (≥1025px) links en línea */
@media (max-width: 1024px) {
  body:not(.portal-mode) #main-nav:not(.nav-open) {
    display: none !important;
  }

  body:not(.portal-mode).public-nav-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  /* Backdrop con desenfoque y degradado detrás del drawer (el click cierra vía handler global) */
  body:not(.portal-mode).public-nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 45;
    background:
      radial-gradient(120% 90% at 100% 0%, rgba(var(--primary-rgb), 0.34) 0%, transparent 55%),
      rgba(6, 17, 32, 0.52);
    -webkit-backdrop-filter: blur(7px) saturate(1.15);
    backdrop-filter: blur(7px) saturate(1.15);
    animation: publicNavBackdropIn 0.45s ease both;
  }

  /* El botón hamburguesa queda por encima del drawer y actúa como botón de cierre (X) */
  body:not(.portal-mode) .top-nav .hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 80;
  }

body:not(.portal-mode) #main-nav.nav-open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  width: min(87vw, 372px);
  height: 100vh;
  max-height: 100vh;
  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.32rem;
  padding:
    calc(env(safe-area-inset-top, 0px) + 5.6rem)
    1.15rem
    calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
  margin: 0;
  background:
    radial-gradient(135% 60% at 100% 0%, rgba(var(--primary-mid-rgb), 0.16) 0%, transparent 50%),
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.05) 0%, transparent 30%),
    var(--public-nav-mobile-panel-bg);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  border: none;
  border-left: 1px solid var(--public-nav-border);
  border-radius: 28px 0 0 28px;
  box-shadow:
    -34px 0 70px rgba(8, 22, 42, 0.32),
    inset 1px 0 0 rgba(255, 255, 255, 0.5);
  z-index: 60;
  flex: none;
  min-width: 0;
  animation: publicNavSideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Encabezado decorativo del drawer (línea de marca brillante) */
body:not(.portal-mode) #main-nav.nav-open::before {
  content: "";
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 4.55rem);
  left: 1.25rem;
  right: 1.25rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(var(--primary-rgb), 0.45) 28%,
    var(--accent) 55%,
    rgba(var(--primary-rgb), 0.45) 78%,
    transparent 100%
  );
  opacity: 0.85;
  box-shadow: 0 0 12px rgba(var(--primary-mid-rgb), 0.45);
  pointer-events: none;
}

body:not(.portal-mode)[data-theme="dark"] #main-nav.nav-open {
  background:
    radial-gradient(135% 60% at 100% 0%, rgba(66, 165, 245, 0.2) 0%, transparent 52%),
    linear-gradient(180deg, rgba(66, 165, 245, 0.08) 0%, transparent 32%),
    var(--public-nav-mobile-panel-bg);
  box-shadow:
    -34px 0 70px rgba(0, 0, 0, 0.55),
    inset 1px 0 0 rgba(255, 255, 255, 0.07);
}

body:not(.portal-mode) #main-nav.nav-open::-webkit-scrollbar {
  width: 6px;
}

body:not(.portal-mode) #main-nav.nav-open::-webkit-scrollbar-track {
  background: transparent;
}

body:not(.portal-mode) #main-nav.nav-open::-webkit-scrollbar-thumb {
  background: var(--public-nav-scroll-thumb);
  border-radius: 999px;
}

body:not(.portal-mode) #main-nav.nav-open a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 0.92rem 1.1rem 0.92rem 1.25rem;
  font-size: 0.99rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--public-nav-link);
  text-decoration: none;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease,
    color 0.22s ease;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: publicNavLinkIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* Entrada escalonada de cada enlace */
body:not(.portal-mode) #main-nav.nav-open a:nth-child(1) { animation-delay: 0.08s; }
body:not(.portal-mode) #main-nav.nav-open a:nth-child(2) { animation-delay: 0.12s; }
body:not(.portal-mode) #main-nav.nav-open a:nth-child(3) { animation-delay: 0.16s; }
body:not(.portal-mode) #main-nav.nav-open a:nth-child(4) { animation-delay: 0.2s; }
body:not(.portal-mode) #main-nav.nav-open a:nth-child(5) { animation-delay: 0.24s; }
body:not(.portal-mode) #main-nav.nav-open a:nth-child(6) { animation-delay: 0.28s; }
body:not(.portal-mode) #main-nav.nav-open a:nth-child(7) { animation-delay: 0.32s; }
body:not(.portal-mode) #main-nav.nav-open a:nth-child(8) { animation-delay: 0.36s; }
body:not(.portal-mode) #main-nav.nav-open a:nth-child(9) { animation-delay: 0.4s; }
body:not(.portal-mode) #main-nav.nav-open a:nth-child(10) { animation-delay: 0.44s; }
body:not(.portal-mode) #main-nav.nav-open a:nth-child(11) { animation-delay: 0.48s; }

/* Chevron que aparece a la derecha al pasar el cursor / enlace activo */
body:not(.portal-mode) #main-nav.nav-open a::after {
  content: "";
  display: block;
  position: absolute;
  right: 1.05rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: translateY(-50%) translateX(-6px) rotate(45deg);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  bottom: auto;
  left: auto;
  background: none;
  border-radius: 0;
}

body:not(.portal-mode) #main-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(var(--primary-mid-rgb), 0.45);
}

body:not(.portal-mode) #main-nav.nav-open a:hover {
  transform: translateX(6px);
  color: var(--public-nav-brand);
  background: linear-gradient(
    105deg,
    rgba(var(--primary-rgb), 0.16) 0%,
    rgba(var(--primary-mid-rgb), 0.07) 52%,
    transparent 100%
  );
  border-color: rgba(var(--primary-rgb), 0.24);
  box-shadow:
    0 8px 20px rgba(var(--primary-rgb), 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font-weight: 800;
}

body:not(.portal-mode)[data-theme="dark"] #main-nav.nav-open a:hover {
  background: linear-gradient(
    105deg,
    rgba(66, 165, 245, 0.24) 0%,
    rgba(25, 55, 95, 0.38) 55%,
    transparent 100%
  );
  border-color: rgba(129, 187, 255, 0.3);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body:not(.portal-mode) #main-nav.nav-open a:hover::before {
  height: 62%;
  opacity: 1;
}

body:not(.portal-mode) #main-nav.nav-open a:hover::after {
  opacity: 0.75;
  transform: translateY(-50%) translateX(0) rotate(45deg);
}

body:not(.portal-mode) #main-nav.nav-open a.active {
  font-weight: 800;
  color: var(--public-nav-active-text);
  background: linear-gradient(
    115deg,
    rgba(var(--primary-rgb), 0.24) 0%,
    rgba(var(--primary-mid-rgb), 0.13) 48%,
    rgba(227, 242, 253, 0.6) 100%
  );
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow:
    0 8px 22px rgba(var(--primary-rgb), 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(var(--primary-rgb), 0.08);
}

body:not(.portal-mode)[data-theme="dark"] #main-nav.nav-open a.active {
  background: linear-gradient(
    115deg,
    rgba(var(--primary-mid-rgb), 0.35) 0%,
    rgba(var(--primary-rgb), 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);
}

body:not(.portal-mode) #main-nav.nav-open a.active::before {
  height: 70%;
  opacity: 1;
}

body:not(.portal-mode) #main-nav.nav-open a.active::after {
  opacity: 0.85;
  transform: translateY(-50%) translateX(0) rotate(45deg);
}

body:not(.portal-mode) #main-nav.nav-open a:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(var(--primary-mid-rgb), 0.45),
    0 6px 18px rgba(var(--primary-rgb), 0.12);
}

body:not(.portal-mode)[data-theme="dark"] #main-nav.nav-open a:focus-visible {
  box-shadow:
    0 0 0 3px rgba(var(--primary-mid-rgb), 0.55),
    0 8px 22px rgba(0, 0, 0, 0.35);
}

  @supports (height: 100dvh) {
    body:not(.portal-mode) #main-nav.nav-open {
      height: 100dvh;
      max-height: 100dvh;
    }
  }
}

@media (min-width: 1025px) {
  body:not(.portal-mode).public-nav-open {
    overflow: visible;
    overscroll-behavior: auto;
  }

  /* Fade en el borde derecho para indicar que la barra de navegación puede desplazarse
     cuando los enlaces no caben (escritorio compacto). Solo afecta a la nav pública. */
  body:not(.portal-mode) #main-nav {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent 100%);
  }
}

.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;
}

/* Móviles pequeños: evitamos que la fila del header (hamburguesa + controles + Portal)
   quede comprimida. Los toggles de tema/idioma pasan a una segunda fila alineada a la
   derecha, dejando hamburguesa y Portal en la primera. */
@media (max-width: 560px) {
  .nav-wrap {
    flex-wrap: wrap;
    row-gap: 0.4rem;
  }

  .nav-controls {
    order: 5;
    flex-basis: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  body:not(.portal-mode) .top-nav .hamburger {
    width: 44px;
    height: 44px;
  }
}

.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(var(--primary-rgb), 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("./imagenes empresa/hero-fondo.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  mix-blend-mode: luminosity;
}

.hero-fleet-background {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 78% 48%, rgba(131, 190, 233, 0.2), transparent 42%),
    linear-gradient(90deg, rgba(6, 22, 42, 0.74) 0%, rgba(6, 22, 42, 0.42) 44%, rgba(6, 22, 42, 0.12) 100%),
    url("./assets/antares-hero-truck.png");
  background-repeat: no-repeat;
  background-size: auto, auto, min(76vw, 980px) auto;
  background-position: center, center, right 3vw bottom 5vh;
  opacity: 0.72;
  filter: saturate(1.08) contrast(1.06);
  pointer-events: none;
}

.hero-fleet-background::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, transparent 0%, rgba(238, 246, 252, 0.92) 100%);
  pointer-events: none;
}

body[data-theme="dark"] .hero-fleet-background::after {
  background: linear-gradient(180deg, transparent 0%, rgba(7, 24, 36, 0.94) 100%);
}

.overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 84% 42%, rgba(55, 124, 192, 0.08), transparent 42%),
    linear-gradient(
      128deg,
      rgba(8, 28, 52, 0.96) 0%,
      rgba(13, 42, 72, 0.9) 38%,
      rgba(22, 61, 98, 0.7) 67%,
      rgba(42, 99, 153, 0.52) 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.16;
  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, var(--primary), transparent 70%);
}

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

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

/* ─── Hero: marca + copy (logo dentro de .hero-content) ─── */
.hero-content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 2.5rem;
  align-items: center;
}

.hero-brand-slot {
  margin: 0 auto;
  width: 100%;
  max-width: 420px;
}

/* Panel de cristal oscuro (preferido por el cliente sobre la placa blanca):
   el logo recortado conserva el tamaño ganado; pantalla (screen) + filtros
   integran los azules de marca sobre el vidrio. */
.hero-brand-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(170px, 36vw, 225px);
  padding: 1.35rem 1.5rem 1.5rem;
  border-radius: 22px;
  background:
    linear-gradient(
      145deg,
      rgba(6, 22, 42, 0.78) 0%,
      rgba(14, 42, 72, 0.68) 48%,
      rgba(22, 58, 92, 0.58) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  overflow: hidden;
}

body[data-theme="light"] .hero-brand-panel {
  background:
    linear-gradient(
      145deg,
      rgba(6, 22, 42, 0.72) 0%,
      rgba(14, 42, 72, 0.64) 48%,
      rgba(22, 58, 92, 0.54) 100%
    );
}

.hero-brand-panel::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle at 30% 30%, rgba(var(--primary-mid-rgb), 0.35), transparent 65%);
  pointer-events: none;
  opacity: 0.85;
}

.hero-brand-panel::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -20%;
  width: 55%;
  height: 55%;
  background: radial-gradient(circle at 70% 70%, rgba(var(--primary-rgb), 0.4), transparent 62%);
  pointer-events: none;
  opacity: 0.7;
}

.hero-brand-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: min(28vw, 168px);
  min-height: 100px;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  mix-blend-mode: screen;
  filter:
    contrast(1.28)
    saturate(1.18)
    brightness(1.1)
    drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 36px rgba(184, 228, 255, 0.35));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

.hero-brand-panel:hover .hero-brand-logo {
  transform: scale(1.02);
  filter:
    contrast(1.32)
    saturate(1.22)
    brightness(1.14)
    drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 48px rgba(210, 238, 255, 0.42));
}

/* Tras reveal (scroll): panel elevado con fondo oscuro para mantener contraste del logo */
.hero-brand-panel[data-reveal].is-visible {
  border-color: rgba(255, 255, 255, 0.42);
  background:
    linear-gradient(
      155deg,
      rgba(8, 30, 56, 0.84) 0%,
      rgba(16, 48, 82, 0.74) 45%,
      rgba(24, 62, 98, 0.66) 100%
    );
  box-shadow:
    0 30px 72px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 0 0 2px rgba(184, 228, 255, 0.18),
    0 0 48px rgba(55, 124, 192, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.28) inset;
}

.hero-brand-panel[data-reveal].is-visible::before {
  opacity: 1;
}

.hero-brand-panel[data-reveal].is-visible::after {
  opacity: 0.88;
}

.hero-brand-panel[data-reveal].is-visible .hero-brand-logo {
  filter:
    contrast(1.34)
    saturate(1.24)
    brightness(1.14)
    drop-shadow(0 10px 30px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 40px rgba(220, 242, 255, 0.48))
    drop-shadow(0 0 64px rgba(131, 190, 233, 0.38));
  transform: scale(1.05);
  transition:
    filter 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
}

.hero-brand-panel[data-reveal].is-visible:hover .hero-brand-logo {
  transform: scale(1.07);
  filter:
    contrast(1.36)
    saturate(1.28)
    brightness(1.16)
    drop-shadow(0 12px 34px rgba(0, 0, 0, 0.46))
    drop-shadow(0 0 52px rgba(232, 246, 255, 0.55))
    drop-shadow(0 0 76px rgba(131, 190, 233, 0.44));
}

.hero-copy {
  min-width: 0;
}

@media (min-width: 992px) {
  .hero-content-layout {
    grid-template-columns: minmax(320px, 0.5fr) minmax(0, 1fr);
    gap: 2.5rem 3.25rem;
    align-items: center;
  }

  .hero-brand-slot {
    margin: 0;
    max-width: none;
  }

  .hero-brand-panel {
    min-height: 250px;
    padding: 1.6rem 1.75rem 1.85rem;
  }

  .hero-brand-logo {
    max-height: 184px;
    min-height: 132px;
  }

  .hero-brand-panel[data-reveal].is-visible .hero-brand-logo {
    max-height: 202px;
    min-height: 140px;
  }
}

@media (min-width: 1200px) {
  .hero-brand-panel {
    min-height: 275px;
  }

  .hero-brand-logo {
    max-height: 208px;
  }

  .hero-brand-panel[data-reveal].is-visible .hero-brand-logo {
    max-height: 232px;
  }
}

@media (max-width: 991px) {
  .hero-fleet-background {
    background-size: auto, auto, min(118vw, 780px) auto;
    background-position: center, center, center bottom 9vh;
    opacity: 0.46;
  }

  .overlay {
    background:
      linear-gradient(180deg, rgba(8, 28, 52, 0.94) 0%, rgba(13, 42, 72, 0.88) 54%, rgba(30, 74, 115, 0.7) 100%),
      linear-gradient(128deg, rgba(8, 28, 52, 0.95) 0%, rgba(20, 58, 95, 0.86) 100%);
  }
}

@media (max-width: 640px) {
  .hero-fleet-background {
    background-size: auto, auto, 760px auto;
    background-position: center, center, 48% bottom 7vh;
    opacity: 0.36;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-brand-logo {
    transition: none;
  }
  .hero-brand-panel:hover .hero-brand-logo {
    transform: none;
    filter:
      contrast(1.28)
      saturate(1.18)
      brightness(1.1)
      drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45))
      drop-shadow(0 0 36px rgba(184, 228, 255, 0.35));
  }
  .hero-brand-panel[data-reveal].is-visible .hero-brand-logo,
  .hero-brand-panel[data-reveal].is-visible:hover .hero-brand-logo {
    transform: none;
    transition: none;
    filter:
      contrast(1.32)
      saturate(1.22)
      brightness(1.12)
      drop-shadow(0 8px 26px rgba(0, 0, 0, 0.42))
      drop-shadow(0 0 44px rgba(210, 238, 255, 0.42));
  }
}

.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.34);
  background: rgba(6, 22, 42, 0.58);
  color: rgba(255, 255, 255, 0.96);
  font-family: var(--font-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
  letter-spacing: 0.2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.hero-kicker-icon {
  width: 18px;
  height: 18px;
  color: #ffffff;
  filter: drop-shadow(0 0 8px rgba(184, 228, 255, 0.55));
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.12;
  max-width: 720px;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.hero-h1-accent {
  background: linear-gradient(135deg, #ffffff 0%, #e8f6ff 42%, #b8e4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
}

.hero > .container p {
  max-width: 580px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
}

.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 .hero-stat.glass-card {
  background: rgba(6, 22, 42, 0.58);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-stat-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.hero-stat-text span {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
  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;
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

/* ─── 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(var(--primary-mid-rgb), 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.65rem;
  width: 100%;
  max-width: 21rem;
  margin: 0.8rem auto 0;
  text-align: left;
}

.fleet-spec {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-soft);
  text-align: left;
}

.fleet-spec-text {
  flex: 1;
  min-width: 0;
  text-wrap: pretty;
}

.fleet-spec-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex-shrink: 0;
  margin-top: 0.15em;
  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);
}

#services .service-card::after {
  content: none;
  display: none;
}

/* ─── 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-item-label {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.coverage-corridor-line {
  white-space: normal;
  word-break: break-word;
}

.coverage-count {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(55, 124, 192, 0.12);
  color: var(--primary);
}

.coverage-item:hover .coverage-count {
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
}

.coverage-card-caption {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.coverage-stats-footnote {
  margin-top: 1.1rem;
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.coverage-item-loading {
  grid-column: 1 / -1;
}

.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(var(--primary-rgb), 0.08);
  color: var(--primary-dark);
  border: 1px solid rgba(var(--primary-rgb), 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: visible;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  padding: 0.35rem 0.45rem;
}

/**
 * Carrusel infinito de logos de clientes. Estructura:
 *   .clients-strip > .clients-strip-track > .clients-strip-set × 2
 *
 * Cada `.clients-strip-set` contiene los mismos 5 logos. El track traslada
 * -50% (= un set completo) en bucle, así el segundo set siempre rellena el
 * espacio del primero cuando este sale. Cada logo tiene altura fija (mismo
 * tamaño visual) y se separa de los demás con un `gap` consistente — sin
 * vacíos visibles entre los sets, ya que el gap aplica también al cambio
 * de set (es un solo `flex` track).
 */
.clients-strip {
  margin: 1.4rem 0 1.6rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #fbfdff 100%);
  padding: 1.2rem 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 32px rgba(13, 63, 121, 0.05), 0 1px 2px rgba(13, 63, 121, 0.04);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.clients-strip-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 0;
  animation: marquee 30s linear infinite;
  will-change: transform;
}

.clients-strip:hover .clients-strip-track {
  animation-play-state: paused;
}

.clients-strip-set {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  /* Margin-right igual al gap mantiene la separación entre logos también
     en el "punto de pegado" entre sets, eliminando cualquier hueco visible. */
  padding-right: 3.5rem;
  flex-shrink: 0;
}

.clients-strip-logo {
  height: 78px;
  width: auto;
  max-width: 180px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  filter: saturate(1.05);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.clients-strip-logo:hover {
  transform: scale(1.06);
}

@media (max-width: 1024px) {
  .clients-strip-logo {
    height: 62px;
    max-width: 150px;
  }
  .clients-strip-set {
    gap: 2.5rem;
    padding-right: 2.5rem;
  }
}

@media (max-width: 640px) {
  .clients-strip-logo {
    height: 48px;
    max-width: 120px;
  }
  .clients-strip-set {
    gap: 2rem;
    padding-right: 2rem;
  }
  .clients-strip-track {
    animation-duration: 22s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clients-strip-track {
    animation: none;
    justify-content: center;
    width: 100%;
  }
  .clients-strip-track > .clients-strip-set:nth-child(n+2) {
    display: none;
  }
}

body[data-theme="dark"] .clients-strip {
  background: linear-gradient(135deg, #0f1c2f 0%, #142640 100%);
  border-color: color-mix(in srgb, var(--primary) 30%, #2a3f56);
}

body[data-theme="dark"] .clients-strip-logo {
  background: #ffffff;
  border-radius: 12px;
  padding: 0.4rem 0.7rem;
}

.logo-track {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 0.15rem;
  padding: 0.2rem 0.1rem;
  animation: none;
}

.logo-pill {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 11.5rem;
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.logo-pill:not(:last-child)::after {
  content: "";
  width: 1px;
  height: 38px;
  margin-left: 0.55rem;
  background: rgba(15, 23, 42, 0.2);
}

.ally-logo {
  width: 3.25rem;
  height: 3.25rem;
  display: inline-flex;
  border-radius: 999px;
  object-fit: contain;
  border: 2px solid rgba(var(--primary-rgb), 0.18);
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(var(--primary-rgb), 0.22);
  padding: 0.18rem;
}

.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(var(--primary-rgb), 0.08);
  line-height: 1.2;
  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(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 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-family: var(--font-secondary);
  font-weight: 700;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.16s ease,
    filter 0.18s ease;
}

.btn:disabled,
.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.66;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

.btn[aria-busy="true"],
.btn.is-busy {
  cursor: wait;
  pointer-events: none;
}

.btn[aria-busy="true"].btn-primary:not(:disabled),
.btn.is-busy.btn-primary:not(:disabled) {
  opacity: 0.92;
}

/* ─── Estado de carga profesional: spinner universal para cualquier .btn ocupado ───
   Cubre todos los módulos porque ya usan aria-busy / .is-busy al ejecutar acciones. */
.btn[aria-busy="true"],
.btn.is-busy {
  position: relative;
  color: transparent !important;
  text-shadow: none !important;
}

.btn[aria-busy="true"] > *,
.btn.is-busy > * {
  opacity: 0 !important;
  visibility: hidden;
}

.btn[aria-busy="true"]::after,
.btn.is-busy::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.05em;
  height: 1.05em;
  margin: -0.525em 0 0 -0.525em;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  animation: antares-btn-spin 0.62s linear infinite;
  pointer-events: none;
}

/* Variantes claras: spinner en tono primario para contraste. */
.btn-outline[aria-busy="true"]::after,
.btn-outline.is-busy::after,
.btn-text[aria-busy="true"]::after,
.btn-text.is-busy::after,
.btn-secondary[aria-busy="true"]::after,
.btn-secondary.is-busy::after,
.btn-light[aria-busy="true"]::after,
.btn-light.is-busy::after {
  border-color: rgba(var(--primary-rgb), 0.28);
  border-top-color: var(--primary);
}

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

@media (prefers-reduced-motion: reduce) {
  .btn[aria-busy="true"]::after,
  .btn.is-busy::after {
    animation-duration: 1.4s;
  }
}

/* Pulido profesional: respuesta táctil consistente al presionar. */
.btn:active:not(:disabled):not([disabled]):not([aria-disabled="true"]):not([aria-busy="true"]):not(.is-busy) {
  transform: translateY(0);
  filter: brightness(0.97);
}

form.is-submitting .module-panel-actions,
.hr-form-wizard-footer.is-submitting {
  user-select: none;
}

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

.btn-primary {
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 45%, var(--primary-dark) 100%);
  border-color: color-mix(in srgb, var(--primary-deeper) 26%, transparent);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.24);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #5b9fe0 0%, #3f85cf 46%, #2a6399 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.28);
}

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

.btn-ghost-light {
  background: rgba(6, 22, 42, 0.42);
  border-color: rgba(255, 255, 255, 0.48);
  color: #ffffff;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.72);
  color: #ffffff;
}

.btn-outline {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--primary-dark);
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
}

.btn-outline:hover {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  color: var(--primary);
  transform: translateY(-1px);
}

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

.btn-text:hover {
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary-deeper);
}

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

label {
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-body);
  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;
}

/* Formularios de alta: vista en mayúsculas; el valor se normaliza al blur/enviar (AntaresValidation). */
input[data-antares-field="person-name"],
input[data-antares-field="db-upper"],
textarea[data-antares-field="db-upper-multiline"] {
  text-transform: uppercase;
}

.field-error {
  display: block;
  margin-top: 0.35rem;
  color: #be2f2f;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.field-invalid-attention {
  animation: field-invalid-pulse 0.55s ease;
}

@keyframes field-invalid-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(214, 69, 69, 0.35);
  }
  45% {
    box-shadow: 0 0 0 6px rgba(214, 69, 69, 0.12);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.14);
  }
}

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;
}

#form-register input[name="password"],
#form-register input[name="passwordConfirm"],
#form-register .auth-password-input,
#form-login input[name="password"],
#form-recover-complete input[name="password"],
#form-recover-complete input[name="passwordConfirm"],
#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(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.22);
}

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

#contact .form-grid label {
  border: 1px solid rgba(var(--primary-rgb), 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(var(--primary-rgb), 0.52);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.14);
}

#contact .form-grid input,
#contact .form-grid select,
#contact .form-grid textarea {
  border: 1px solid rgba(var(--primary-rgb), 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-submit-btn[aria-busy="true"] {
  cursor: wait;
  opacity: 0.9;
}

#contact .b2b-form-feedback {
  grid-column: 1 / -1;
  margin: 0 0 0.35rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

#contact .b2b-form-feedback--hidden {
  display: none;
}

#contact .b2b-form-feedback--success {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #166534;
}

#contact .b2b-form-feedback--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.38);
  color: #991b1b;
}

#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(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 0.18);
}

#contact .contact-step-chip.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-deeper));
  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);
}

/* Logo del hero: debe verse al pintar; sin esto queda opacity:0 hasta que app.js + IntersectionObserver añaden .is-visible */
.hero-brand-panel[data-reveal] {
  opacity: 1;
  transform: none;
}

.portal-layout {
  position: relative;
  display: grid;
  grid-template-columns: var(--portal-sidebar-rail-width) minmax(0, 1fr);
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  transition: grid-template-columns 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Controlador de redimensionado del menú lateral (arrastre del borde) ── */
.sidebar-resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--portal-sidebar-rail-width);
  width: 12px;
  transform: translateX(-6px);
  z-index: 60;
  cursor: ew-resize;
  touch-action: none;
  background: transparent;
  transition: left 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-resize-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-resize-handle:hover::before,
.sidebar-resize-handle:focus-visible::before,
body.portal-sidebar-resizing .sidebar-resize-handle::before {
  background: rgba(var(--primary-rgb), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.18);
}

.sidebar-resize-handle:focus-visible {
  outline: none;
}

/* Pomo central que aparece al pasar el cursor para indicar que se puede arrastrar */
.sidebar-resize-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 3px;
  background: rgba(var(--primary-rgb), 0.7);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sidebar-resize-handle:hover::after,
.sidebar-resize-handle:focus-visible::after,
body.portal-sidebar-resizing .sidebar-resize-handle::after {
  opacity: 1;
}

/* Durante el arrastre: sin transiciones (seguimiento 1:1) y sin selección de texto */
body.portal-sidebar-resizing {
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}

body.portal-sidebar-resizing .portal-layout,
body.portal-sidebar-resizing .sidebar-resize-handle {
  transition: none !important;
}

/* El menú colapsado (rail) y el móvil usan otros mecanismos: no redimensionar */
body.portal-sidebar-collapsed .sidebar-resize-handle {
  display: none;
}

@media (max-width: 920px) {
  .sidebar-resize-handle {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-resize-handle {
    transition: none;
  }
}

body.portal-sidebar-collapsed {
  --portal-sidebar-rail-width: var(--portal-sidebar-rail-width-collapsed);
}

@media (prefers-reduced-motion: reduce) {
  .portal-layout {
    transition: none !important;
  }
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--portal-sidebar-scroll-thumb) transparent;
  border-right: 1px solid var(--portal-sidebar-border);
  border-radius: 0 20px 0 0;
  padding: 0.85rem 0.45rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--portal-sidebar-bg);
  color: var(--portal-sidebar-link);
  box-shadow: 1px 0 0 rgba(var(--primary-rgb), 0.04);
}

.sidebar-rail-head {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.2rem 0.65rem;
  margin-bottom: 0.15rem;
  position: relative;
}

.sidebar-expand-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  border-radius: 9px;
  background: rgba(var(--primary-rgb), 0.06);
  color: var(--portal-sidebar-link-hover);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sidebar-expand-toggle:hover {
  background: rgba(var(--primary-rgb), 0.12);
  border-color: rgba(var(--primary-rgb), 0.24);
  color: var(--primary);
}

.sidebar-expand-toggle svg {
  width: 16px;
  height: 16px;
}

body.portal-sidebar-collapsed .sidebar-expand-toggle-icon--collapse {
  display: none;
}

body.portal-sidebar-collapsed .sidebar-expand-toggle-icon--expand {
  display: block;
}

body:not(.portal-sidebar-collapsed) .sidebar-expand-toggle-icon--expand {
  display: none;
}

@media (min-width: 921px) {
  .sidebar-expand-toggle {
    display: inline-flex;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-rail-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.2rem 0.15rem 0.85rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--portal-sidebar-border);
  }

  body:not(.portal-sidebar-collapsed) .sidebar {
    padding: 1rem 0.85rem 0.85rem;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-section-label {
    display: block;
  }

  body:not(.portal-sidebar-collapsed) .side-link {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 0.62rem 0.75rem;
    font-size: 0.86rem;
    gap: 0.65rem;
  }

  body:not(.portal-sidebar-collapsed) .side-icon,
  body:not(.portal-sidebar-collapsed) .side-link svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    max-width: 20px;
    max-height: 20px;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-user-panel {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-user-text strong,
  body:not(.portal-sidebar-collapsed) .sidebar-user-text #sidebar-session-display-name {
    font-size: 0.9rem;
    white-space: normal;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-user-text span,
  body:not(.portal-sidebar-collapsed) .sidebar-user-text #session-meta {
    font-size: 0.76rem;
    white-space: normal;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-session-avatar-wrap {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-session-avatar-initial {
    font-size: 1.05rem;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-logout {
    align-items: stretch;
  }

  body:not(.portal-sidebar-collapsed) .side-link.sidebar-logout-btn {
    flex-direction: row;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-theme-box {
    padding: 0.55rem 0.5rem;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    justify-content: flex-start;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-theme-title {
    display: block;
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--portal-sidebar-link);
    font-weight: 700;
  }

  body:not(.portal-sidebar-collapsed) .theme-toggle--compact {
    transform: none;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-notif-hub {
    flex-direction: row;
    align-items: stretch;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-notif-hub .sidebar-notif-bell-toggle {
    width: 2.65rem !important;
    min-width: 2.65rem !important;
    margin: 0;
    padding: 0;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-notif-hub .side-link--notif-inbox {
    padding-left: 0.65rem;
    padding-right: 0.45rem;
    padding-top: 0.62rem;
  }

  body:not(.portal-sidebar-collapsed) .sidebar-notif-hub:has(.side-link--notif-inbox.active)::after {
    display: none;
  }

  body:not(.portal-sidebar-collapsed) .side-link--notif-inbox.active {
    background: var(--portal-sidebar-active-bg);
  }
}

.sidebar-rail-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.05rem;
  scrollbar-width: thin;
  scrollbar-color: var(--portal-sidebar-scroll-thumb) transparent;
}

.sidebar-rail-scroll::-webkit-scrollbar {
  width: 4px;
}

.sidebar-rail-scroll::-webkit-scrollbar-thumb {
  background: var(--portal-sidebar-scroll-thumb);
  border-radius: 999px;
}

.sidebar-rail-foot {
  flex-shrink: 0;
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--portal-sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-user-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.45rem 0.25rem 0.35rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease;
}

.sidebar-user-panel:hover {
  background: rgba(var(--primary-rgb), 0.06);
}

.sidebar-user-panel.active {
  background: var(--portal-sidebar-active-bg);
}

.sidebar-user-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  width: 100%;
}

.sidebar-user-text strong,
.sidebar-user-text #sidebar-session-display-name {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-text span,
.sidebar-user-text #session-meta {
  font-size: 0.58rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--portal-sidebar-link);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--portal-sidebar-scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--portal-sidebar-scroll-thumb-hover);
  background-clip: padding-box;
}

.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-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  min-width: 52px;
  flex-shrink: 0;
  padding: 6px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow:
    0 4px 14px rgba(var(--primary-rgb), 0.14),
    0 0 0 1px rgba(var(--primary-rgb), 0.08);
}

.sidebar-brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter:
    saturate(1.24)
    contrast(1.1)
    drop-shadow(0 1px 4px rgba(var(--primary-rgb), 0.28));
}

.sidebar-session-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, var(--primary-mid), var(--primary));
  box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.22);
}

.sidebar-session-avatar-initial {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1;
  user-select: none;
}

.sidebar-session-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-session-avatar-wrap.has-photo .sidebar-session-avatar-initial {
  display: none;
}

.sidebar-brand h2 {
  font-size: 1.05rem;
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #ffffff;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.sidebar-brand p,
#session-meta {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(232, 242, 255, 0.92);
  font-weight: 600;
  line-height: 1.35;
}

.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(var(--primary-mid-rgb), 0.2), transparent);
  border-radius: 8px;
  border-left: 3px solid rgba(var(--primary-mid-rgb), 0.85);
}

.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(var(--primary-mid-rgb), 0.35) 0%, rgba(var(--primary-rgb), 0.55) 100%);
  box-shadow:
    0 4px 18px rgba(var(--primary-rgb), 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

body.portal-drawer-open .portal-menu-btn {
  background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.78), rgba(var(--primary-mid-rgb), 0.92));
  box-shadow:
    0 10px 30px rgba(var(--primary-rgb), 0.48),
    0 0 0 3px rgba(var(--primary-mid-rgb), 0.14),
    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 {
  display: none;
  font-family: var(--font-secondary);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(var(--primary-rgb), 0.45);
  padding: 0.8rem 0.5rem 0.3rem;
  margin: 0;
}

.side-link {
  text-align: center;
  border: none;
  border-radius: 12px;
  padding: 0.62rem 0.35rem;
  background: transparent;
  color: var(--portal-sidebar-link);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.side-link:hover {
  background: rgba(var(--primary-rgb), 0.06);
  color: var(--portal-sidebar-link-hover);
}

.side-link.active {
  background: var(--portal-sidebar-active-bg);
  color: var(--portal-sidebar-active-text);
  box-shadow: none;
  font-weight: 600;
}

.side-link.active::after {
  content: "";
  position: absolute;
  right: -0.45rem;
  top: 18%;
  width: 3px;
  height: 64%;
  border-radius: 4px 0 0 4px;
  background: var(--primary);
}

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

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

.side-link.active .side-icon { color: var(--primary); }
.side-link:hover .side-icon { color: var(--portal-sidebar-link-hover); }

.side-link.sidebar-logout-btn {
  color: var(--portal-sidebar-link);
}

.side-link.sidebar-logout-btn:hover {
  background: rgba(214, 40, 40, 0.08);
  color: var(--danger);
}

.side-link.sidebar-logout-btn:hover .side-icon {
  color: var(--danger);
}

.sidebar-spacer { flex: 1; }

.sidebar-logout {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.sidebar-theme-box {
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  width: 100%;
  display: flex;
  justify-content: center;
}

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

.theme-toggle--compact {
  transform: scale(0.88);
}

.portal-main {
  padding: 1.8rem 2rem;
  background: #F0F4FA;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--portal-main-scroll-thumb) transparent;
}

.portal-main::-webkit-scrollbar {
  width: 8px;
}

.portal-main::-webkit-scrollbar-track {
  background: transparent;
}

.portal-main::-webkit-scrollbar-thumb {
  background: var(--portal-main-scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.portal-main::-webkit-scrollbar-thumb:hover {
  background: var(--portal-main-scroll-thumb-hover);
  background-clip: padding-box;
}

.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-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.3px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 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%; }

.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, var(--brand-blue-mid), var(--brand-blue-deep)); }
.kpi-icon-teal { background: linear-gradient(135deg, var(--brand-blue-soft), var(--brand-blue-mid)); }
.kpi-icon-violet { background: linear-gradient(135deg, var(--brand-blue-deep), var(--primary-deeper)); }
.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;
}

.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-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  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; }

.dash-grid > .p-card,
.hiring-actions-grid > .p-card,
.hiring-data-grid > .p-card,
.payroll-actions-grid > .p-card,
.payroll-actions-grid > .hr-action-card,
.hiring-actions-grid > .hr-action-card,
.calendar-side-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);
}

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 {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.34rem 0.86rem;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
  white-space: nowrap;
  text-align: center;
  max-width: 100%;
}

.status-pretty {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-deeper) 0%, var(--primary-dark) 45%, var(--primary) 100%);
  box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.28);
  white-space: nowrap;
  max-width: 100%;
  line-height: 1.15;
}

/**
 * Aislamos el contenedor de tablas para que las reglas globales del portal
 * (overflow-wrap: anywhere) NO destruyan pills, botones y selects que
 * se renderizan dentro de las celdas. Estas siempre deben quedar en una sola
 * línea con elipsis cuando no queda espacio.
 */
.portal-main table .status,
.portal-main table .status-pretty,
.portal-main table .status-pretty > span,
.portal-main table .btn,
.portal-main table .trip-status-select,
.portal-main table .route-rate-scope-badge,
.portal-main table .route-rate-client-chip {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

.portal-main table .btn {
  text-overflow: ellipsis;
  overflow: hidden;
  min-width: 0;
}

.portal-main table .trip-status-select {
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.status-pendiente {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--warning) 90%, #ffffff 10%),
    color-mix(in srgb, #e67700 78%, var(--primary-dark) 22%)
  );
  box-shadow: 0 2px 10px rgba(229, 132, 0, 0.2);
}
.status-aprobada_pendiente_asignacion {
  background: linear-gradient(135deg, var(--primary-deeper) 0%, var(--primary-dark) 42%, var(--primary) 100%);
  box-shadow: 0 2px 12px rgba(var(--primary-rgb), 0.35);
}
.status-viaje_asignado {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--success) 92%, var(--primary) 8%),
    color-mix(in srgb, #157a50 90%, var(--primary-dark) 10%)
  );
  box-shadow: 0 2px 12px rgba(27, 142, 95, 0.22);
}
.status-en_transito {
  background: linear-gradient(135deg, var(--primary-mid) 0%, var(--primary) 42%, var(--primary-dark) 100%);
  box-shadow: 0 2px 14px rgba(var(--primary-rgb), 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.status-espera_standby {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary-deeper) 50%, #4f46b5 50%),
    color-mix(in srgb, var(--primary-dark) 45%, #4338ca 55%)
  );
  box-shadow: 0 2px 12px rgba(67, 56, 202, 0.16);
}
.status-completada {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #0e7490 72%, var(--primary-dark) 28%),
    color-mix(in srgb, #0c5f74 68%, var(--primary-deeper) 32%)
  );
  box-shadow: 0 2px 10px rgba(14, 116, 144, 0.2);
}
.status-cerrada { background: linear-gradient(135deg, #334155, #1e293b); }
.status-cancelada,
.status-rechazada { background: linear-gradient(135deg, #D62828, #B02020); }
.status-vencida {
  background: linear-gradient(135deg, #9a3412, #7c2d12);
  box-shadow: 0 2px 10px rgba(124, 45, 18, 0.38);
}

/**
 * Flota (camión / conductor): estados de disponibilidad alineados a la marca,
 * sin reutilizar colores de flujo de viaje (en tránsito, standby, etc.).
 */
.status-fleet-disponible {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--success) 90%, var(--primary) 10%),
    color-mix(in srgb, #157a50 88%, var(--primary-dark) 12%)
  );
  box-shadow: 0 2px 12px rgba(27, 142, 95, 0.22);
  text-shadow: 0 1px 1px rgba(0, 50, 40, 0.2);
}
.status-fleet-ocupado {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary-dark) 58%, #c45d34 42%),
    color-mix(in srgb, var(--primary-deeper) 52%, #a84a2e 48%)
  );
  box-shadow: 0 2px 14px rgba(var(--primary-rgb), 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-shadow: 0 1px 2px rgba(24, 40, 70, 0.32);
}
.status-fleet-programado {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary) 68%, #5c6bc0 32%),
    color-mix(in srgb, var(--primary-deeper) 58%, #3949ab 42%)
  );
  box-shadow: 0 2px 14px rgba(var(--primary-rgb), 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(20, 35, 80, 0.32);
}
.status-fleet-offline {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #64748b 35%, var(--warning) 65%),
    color-mix(in srgb, var(--primary-deeper) 40%, #d97706 60%)
  );
  box-shadow: 0 2px 10px rgba(100, 116, 139, 0.14);
  text-shadow: 0 1px 1px rgba(40, 30, 10, 0.22);
}
.status-fleet-equipo-tk {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--success) 72%, var(--primary) 28%),
    color-mix(in srgb, #157a50 68%, var(--primary-dark) 32%)
  );
  box-shadow: 0 1px 8px rgba(27, 142, 95, 0.16);
  font-size: 0.72rem;
  padding: 0.26rem 0.62rem;
  text-shadow: 0 1px 1px rgba(0, 45, 30, 0.18);
}
.status-fleet-equipo-seco {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--brand-blue-soft) 88%, #ffffff 12%),
    color-mix(in srgb, var(--primary-mid) 22%, #e2e8f0 78%)
  );
  color: var(--primary-deeper);
  font-weight: 800;
  text-shadow: none;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
  box-shadow: 0 1px 6px rgba(var(--primary-rgb), 0.08);
}

.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; }
}

@media (prefers-reduced-motion: reduce) {
  .status-road::after {
    animation: none;
  }
}

.toolbar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.module-filters {
  margin-bottom: 1rem;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--primary-rgb), 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(var(--primary-rgb), 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(var(--primary-rgb), 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(var(--primary-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 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(var(--primary-rgb), 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(var(--primary-rgb), 0.6);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-deeper));
  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(180deg, #32ad78 0%, #239563 100%);
  color: var(--white);
  border-color: rgba(20, 107, 72, 0.34);
  box-shadow: 0 10px 22px rgba(27, 142, 95, 0.2);
}

.btn-approve:hover {
  background: linear-gradient(180deg, #3ab983 0%, #249868 100%);
  box-shadow: 0 14px 26px rgba(27, 142, 95, 0.24);
  filter: saturate(1.02);
  transform: translateY(-1px);
}

.btn-reject {
  background: linear-gradient(180deg, #d95c5c 0%, #c84040 100%);
  color: var(--white);
  border-color: rgba(146, 33, 33, 0.28);
  box-shadow: 0 10px 22px rgba(204, 47, 47, 0.18);
}

.btn-reject:hover {
  background: linear-gradient(180deg, #df6868 0%, #cb4747 100%);
  box-shadow: 0 14px 26px rgba(204, 47, 47, 0.22);
  filter: saturate(1.01);
  transform: translateY(-1px);
}

.btn-action {
  background: linear-gradient(180deg, #5794d8 0%, #377cc0 54%, #2a6399 100%);
  color: #ffffff;
  border: 1px solid rgba(29, 83, 132, 0.18);
  box-shadow: 0 10px 22px rgba(47, 116, 198, 0.2);
}

.btn-action:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #67a3e4 0%, #4185cc 52%, #2a6399 100%);
  filter: saturate(1.03) brightness(1.01);
  box-shadow: 0 14px 28px rgba(37, 103, 181, 0.24);
}

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

.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);
}

.field-label .field-required-mark {
  color: #dc2626;
  font-weight: 800;
  margin-left: 0.15em;
  line-height: 1;
}

.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);
}

.p-form input.portal-date-dmy {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.p-form input.portal-date-dmy::placeholder {
  color: var(--muted, #64748b);
  opacity: 0.85;
}

.portal-datetime-dmy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7.25rem, 9.5rem);
  gap: 0.5rem;
  width: 100%;
  align-items: center;
}

.portal-datetime-dmy-row .portal-datetime-dmy__time {
  min-height: 2.45rem;
}

label:has(.portal-datetime-dmy-row) {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.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 {
  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; }

.dash-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: stretch; }
.module-shell-body > *,
.dash-grid > *,
.user-grid > *,
.history-ops-grid > *,
.history-insights-grid > * {
  min-width: 0;
}

.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);
}

/* —— Dashboard operativo (torre de control) —— */
.ops-dash {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.ops-dash-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.32rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background: linear-gradient(180deg, #f5f9fd, #edf4fb);
  box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.06);
}

.ops-dash-tab {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: normal;
  color: var(--primary-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.16s ease;
}

.ops-dash-tab:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
  border-color: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary);
  transform: translateY(-1px);
}

.ops-dash-tab svg {
  width: 1rem;
  height: 1rem;
}

.ops-dash-tab.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

.ops-dash-kpis {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 0.75fr)) minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 0.85rem;
  align-items: stretch;
}

.ops-dash-kpi {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 6px 22px rgba(15, 43, 74, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
}

.ops-dash-kpi--primary {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 28px rgba(74, 144, 226, 0.35);
}

.ops-dash-kpi--primary .ops-dash-kpi-label,
.ops-dash-kpi--primary .ops-dash-kpi-date {
  color: rgba(255, 255, 255, 0.92);
}

.ops-dash-kpi-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.05;
  color: inherit;
}

.ops-dash-kpi--primary .ops-dash-kpi-value {
  font-size: 2.35rem;
}

.ops-dash-kpi-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.ops-dash-kpi-date {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.15rem;
}

.ops-dash-kpi--ring {
  align-items: center;
  text-align: center;
}

.ops-dash-ring {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 0.15rem;
}

.ops-dash-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ops-dash-ring-bg {
  fill: none;
  stroke: #e8eef5;
  stroke-width: 3;
}

.ops-dash-ring-fg {
  fill: none;
  stroke: var(--primary, #4a90e2);
  stroke-width: 3;
  stroke-linecap: round;
}

.ops-dash-ring strong {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.ops-dash-progress {
  height: 8px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
  margin: 0.35rem 0 0.5rem;
}

.ops-dash-progress > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.35s ease;
}

.ops-dash-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.74rem;
  font-weight: 600;
}

.ops-dash-legend-item::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.ops-dash-legend-item--ok::before {
  background: #22c55e;
}

.ops-dash-legend-item--warn::before {
  background: #f59e0b;
}

.ops-dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.ops-dash-search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  background: #fff;
}

.ops-dash-search svg {
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.ops-dash-search input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.9rem;
  background: transparent;
}

.ops-dash-filter {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.ops-dash-filter select {
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  background: #fff;
}

.ops-dash-fleet-count {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
}

.ops-dash-fleet-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ops-dash-vehicle-card {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(15, 43, 74, 0.07);
  overflow: hidden;
}

.ops-dash-vehicle-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #edf2f7;
}

.ops-dash-vehicle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
}

.ops-dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: #334155;
}

.ops-dash-chip svg {
  width: 1rem;
  height: 1rem;
  color: var(--primary, #4a90e2);
}

.ops-dash-vehicle-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.ops-dash-vehicle-status--en-ruta {
  background: #dcfce7;
  color: #15803d;
}

.ops-dash-vehicle-status--programado {
  background: #e0f2fe;
  color: #0369a1;
}

.ops-dash-vehicle-status--cerrado {
  background: #f1f5f9;
  color: #475569;
}

.ops-dash-vehicle-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.15rem;
  background: #f8fafc;
}

.ops-dash-vehicle-summary > div:first-child {
  display: flex;
  gap: 1.25rem;
}

.ops-dash-vehicle-summary strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.1;
}

.ops-dash-vehicle-summary span {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
}

.ops-dash-mini-bars {
  display: flex;
  gap: 0.35rem;
  min-width: 160px;
  flex: 1 1 200px;
  max-width: 360px;
}

.ops-dash-mini-bar {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
}

.ops-dash-mini-bar--ok {
  background: #bbf7d0;
  color: #166534;
}

.ops-dash-mini-bar--warn {
  background: #fde68a;
  color: #92400e;
}

.ops-dash-mini-bar--fail {
  background: #fecaca;
  color: #991b1b;
}

.ops-dash-mini-bar--live {
  background: #bae6fd;
  color: #075985;
}

.ops-dash-timeline {
  padding: 0.85rem 1.15rem 0.35rem;
}

.ops-dash-tl-track {
  position: relative;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f1f5f9, #e8eef5);
  margin-bottom: 0.35rem;
}

.ops-dash-tl-progress {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  width: 55%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  opacity: 0.45;
  pointer-events: none;
}

.ops-dash-tl-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 43, 74, 0.15);
  z-index: 1;
}

.ops-dash-tl-marker svg {
  width: 0.72rem;
  height: 0.72rem;
}

.ops-dash-tl-marker--start {
  background: #22c55e;
  color: #fff;
}

.ops-dash-tl-marker--ok {
  background: #22c55e;
  color: #fff;
}

.ops-dash-tl-marker--live {
  background: #0ea5e9;
  color: #fff;
}

.ops-dash-tl-marker--warn {
  background: #f59e0b;
  color: #fff;
}

.ops-dash-tl-marker--fail {
  background: #ef4444;
  color: #fff;
}

.ops-dash-tl-marker--now {
  background: #fff;
  color: #22c55e;
  border: 2px solid #22c55e;
}

.ops-dash-tl-hours {
  position: relative;
  height: 1.1rem;
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 600;
}

.ops-dash-tl-hours span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.ops-dash-table-wrap {
  margin: 0 1.15rem;
}

.ops-dash-vehicle-foot {
  padding: 0.75rem 1.15rem 1rem;
  border-top: 1px solid #edf2f7;
}

.ops-dash-insights {
  margin-top: 0.25rem;
}

@media (max-width: 1100px) {
  .ops-dash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ops-dash-kpi--primary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .ops-dash-kpis {
    grid-template-columns: 1fr;
  }
  .ops-dash-fleet-count {
    margin-left: 0;
    width: 100%;
  }
}

body[data-theme="dark"] .ops-dash-tabs {
  background: linear-gradient(180deg, #223a56, #1a3049);
  border-color: rgba(148, 196, 255, 0.18);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .ops-dash-tab {
  background: linear-gradient(180deg, #17314c 0%, #12263d 100%);
  border-color: #4a729e;
  color: #dbeafe;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .ops-dash-tab:hover {
  background: linear-gradient(180deg, #1c3d5e 0%, #16314d 100%);
  border-color: #6797c7;
  color: #ffffff;
}

body[data-theme="dark"] .ops-dash-tab.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  border-color: rgba(173, 214, 255, 0.28);
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

body[data-theme="dark"] .ops-dash-kpi,
body[data-theme="dark"] .ops-dash-vehicle-card,
body[data-theme="dark"] .ops-dash-search {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(24, 40, 62, 0.96));
  border-color: rgba(100, 140, 190, 0.28);
}

body[data-theme="dark"] .ops-dash-kpi-label,
body[data-theme="dark"] .ops-dash-fleet-count {
  color: #9fc3e6;
}

body[data-theme="dark"] .ops-dash-ring strong {
  color: #e2eef9;
}

body[data-theme="dark"] .ops-dash-vehicle-summary {
  background: rgba(15, 23, 42, 0.55);
}

body[data-theme="dark"] .ops-dash-chip {
  color: #dbeafe;
}

body[data-theme="dark"] .ops-dash-tl-track {
  background: linear-gradient(180deg, rgba(30, 45, 68, 0.9), rgba(20, 32, 50, 0.95));
}

.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;
}

.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: var(--ops-tile-grid, repeat(auto-fill, minmax(min(100%, 17.25rem), 19.5rem)));
  justify-content: start;
  gap: var(--ops-cards-gap, 0.75rem);
}

.user-grid > .user-card {
  min-width: 0;
}

.user-grid-pending > .user-card {
  min-width: 0;
}

.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;
}

.user-avatar.user-avatar--with-photo {
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid rgba(var(--primary-rgb), 0.22);
  background: #f1f5f9;
}

.user-avatar.user-avatar--with-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body[data-theme="dark"] .user-avatar.user-avatar--with-photo {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.35);
}

.user-avatar.pending-avatar.user-avatar--with-photo {
  background: #f1f5f9;
  border-color: #fcd34d;
  box-shadow: 0 2px 12px rgba(217, 119, 6, 0.15);
}

.user-card.user-card--pending .user-avatar.user-avatar--with-photo {
  border-color: #fbbf24;
}

.user-modal-photo-hero {
  display: flex;
  justify-content: center;
  padding: 0.2rem 0 0.85rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.user-avatar.user-avatar--modal-hero {
  width: 72px;
  height: 72px;
  min-width: 72px;
}

body[data-theme="dark"] .user-modal-photo-hero {
  border-bottom-color: rgba(148, 196, 255, 0.2);
}

.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);
}

.user-card.user-card--pending {
  background: linear-gradient(135deg, #fffaf0, #fff);
  border-color: #fcd34d;
  box-shadow: 0 6px 18px -12px rgba(217, 119, 6, 0.45);
}

.user-card-pending-note {
  margin: 0.4rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.78rem;
  line-height: 1.35;
  border: 1px solid #fde68a;
}

.user-card-pending-note strong {
  color: #78350f;
}

.user-grid-pending-help {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

body[data-theme="dark"] .user-card.user-card--pending {
  background: linear-gradient(135deg, #1f2937, #111827);
  border-color: #b45309;
}

body[data-theme="dark"] .user-card-pending-note {
  background: rgba(180, 83, 9, 0.18);
  color: #fde68a;
  border-color: rgba(253, 230, 138, 0.3);
}

body[data-theme="dark"] .user-card-pending-note strong {
  color: #fcd34d;
}

.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;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid #F1F5F9;
  margin-top: 0.5rem;
}

.user-card-actions > .btn {
  flex: 1 1 10.5rem;
  min-width: 0;
  justify-content: center;
}

.user-card--company .user-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.user-card--company .user-card-actions > .btn {
  flex: 1 1 9.5rem;
  min-width: 0;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.2;
}

.user-card-top .user-card-badges {
  flex-shrink: 0;
}

.company-kind-chip {
  font-size: 0.72rem !important;
  white-space: nowrap;
}

.user-grid-companies {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 0.9rem;
}

.user-card--company .user-avatar--company {
  background: linear-gradient(145deg, #377cc0 0%, #2563a8 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

.user-card--company .user-avatar--company.user-avatar--company-logo {
  background: #ffffff;
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 999px;
  padding: 0.24rem;
  border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.user-avatar--company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 999px;
  display: block;
}

.user-card--company-inactive {
  opacity: 0.9;
  border-style: dashed;
}

.user-card--company-inactive .user-avatar--company {
  background: linear-gradient(145deg, #64748b 0%, #475569 100%);
}

body[data-theme="dark"] .user-card--company-inactive {
  border-color: rgba(148, 163, 184, 0.35);
}

.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(min(100%, 220px), 1fr));
  gap: 0.55rem;
}

.perm-group {
  grid-column: 1 / -1;
  margin-bottom: 0.35rem;
}

.perm-group-title {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.perm-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 0.55rem;
}

.perm-check {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  padding: 0.58rem 0.68rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.98));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  min-height: 4.6rem;
}

.perm-check:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(237, 245, 255, 1));
  border-color: rgba(var(--primary-rgb), 0.18);
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.08);
}

.perm-check:has(input[type="checkbox"]:checked) {
  border-color: rgba(var(--primary-rgb), 0.3);
  background: linear-gradient(180deg, rgba(238, 247, 255, 0.98), rgba(248, 252, 255, 1));
  box-shadow: 0 16px 28px rgba(var(--primary-rgb), 0.12);
}

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

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

.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.32;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.modal-edit-section-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  margin: 0.6rem 0 0.4rem;
}

.modal-edit-custom-slot {
  margin-top: 0.4rem;
}

.approve-perms-shell {
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  border-radius: 12px;
  padding: 0.85rem 0.95rem 0.95rem;
  display: grid;
  gap: 0.6rem;
}

.approve-perms-head {
  display: grid;
  gap: 0.45rem;
}

.approve-perms-help {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.approve-perms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.approve-perms-actions .btn {
  font-size: 0.74rem;
  padding: 0.32rem 0.6rem;
}

.approve-perms-grid {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 0.5rem;
  max-height: 260px;
  overflow-y: auto;
}

.perm-check.perm-check--compact {
  min-height: auto;
  padding: 0.42rem 0.55rem;
  border-radius: 12px;
  font-size: 0.78rem !important;
}

.perm-check.perm-check--compact span strong {
  font-size: 0.78rem;
}

.perm-check.perm-check--compact span small {
  font-size: 0.68rem;
}

.approve-perms-counter {
  margin: 0;
  font-size: 0.74rem;
  color: #475569;
  text-align: right;
}

body[data-theme="dark"] .approve-perms-shell {
  background: #0f172a;
  border-color: #1e293b;
}

body[data-theme="dark"] .approve-perms-grid {
  background: #111c2e;
  border-color: #1e293b;
}

body[data-theme="dark"] .approve-perms-help,
body[data-theme="dark"] .approve-perms-counter,
body[data-theme="dark"] .modal-edit-section-title {
  color: #cbd5e1;
}

.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;
}

/* Asignar viaje (módulo viajes) */
.transport-trips-tab-panels {
  display: grid;
  gap: 0.9rem;
}

.transport-ops-toolbar {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
  margin-bottom: 0.65rem;
}

.transport-ops-search,
.transport-ops-sort {
  display: grid;
  gap: 0.3rem;
}

.transport-ops-search input,
.transport-ops-sort select {
  min-height: 2.45rem;
}

.transport-ops-layout {
  display: inline-flex;
  align-items: end;
  gap: 0.35rem;
}

.trip-ops-cards--compact {
  gap: 0.62rem;
}

.trip-ops-card--compact .trip-ops-card-route,
.trip-ops-card--compact .trip-ops-card-standby,
.trip-ops-card--compact .trip-ops-card-status-control {
  display: none;
}

.trip-ops-card--compact .trip-ops-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .transport-ops-toolbar {
    grid-template-columns: 1fr;
  }

  .transport-ops-layout {
    justify-content: flex-start;
  }
}

.transport-workspace-panel > .transport-workspace-stack {
  gap: 1rem;
}

.transport-form-card {
  width: 100%;
}

.transport-form-card .hr-data-card__head {
  padding: 1.1rem 1.2rem 1rem;
}

.transport-form-card--trip .hr-data-card__head {
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.96), rgba(255, 255, 255, 0.94));
}

.transport-form-card--route .hr-data-card__head {
  background: linear-gradient(180deg, rgba(237, 233, 254, 0.96), rgba(255, 255, 255, 0.94));
}

.transport-form-card--trip .hr-card-icon {
  background: linear-gradient(145deg, #1d4ed8, #1e3a8a);
}

.transport-form-card--route .hr-card-icon {
  background: linear-gradient(145deg, #7c3aed, #4c1d95);
}

.transport-trip-create-form > .assign-trip-top,
.transport-trip-create-form > .create-trip-hero,
.transport-trip-create-form > .create-trip-stepper,
.transport-trip-create-form > .transport-trip-create-form__request,
.transport-trip-create-form > .create-trip-submit-wrap,
.transport-trip-create-form > .assign-trip-footer,
.transport-trip-create-form > .hr-form-wizard,
.transport-trip-create-form > .transport-wizard,
.transport-trip-create-form > .transport-form--single {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.transport-trip-create-form > .transport-trip-create-form__resources,
.transport-trip-create-form > .transport-trip-create-form__pricing {
  grid-column: 1 / -1;
  min-width: 0;
}

.transport-trip-create-form .form-section,
.transport-trip-create-form .create-trip-fleet-shell,
.transport-trip-create-form .create-trip-resource-card,
.transport-trip-create-form .create-trip-fleet-field,
.transport-trip-create-form .create-trip-rate-surface,
.transport-trip-create-form .create-trip-rate-inner {
  overflow: visible;
}

.transport-route-form > .hr-form-hero,
.transport-route-form > .transport-route-form-actions {
  grid-column: 1 / -1;
}

.transport-route-form .hr-form-hero {
  padding: 1.1rem 1.15rem;
  border-radius: 20px;
  border-color: rgba(124, 58, 237, 0.16);
  background: linear-gradient(135deg, rgba(245, 243, 255, 0.98), rgba(239, 246, 255, 0.98));
}

.transport-route-form .hr-form-hero__title {
  color: #312e81;
}

.transport-route-form .hr-form-hero__text {
  max-width: 52rem;
  color: #5b5f8a;
}

.transport-route-form .hr-form-hero__badges {
  justify-content: flex-start;
}

.transport-route-form .hr-form-hero-badge {
  min-width: 8.75rem;
  border-color: rgba(124, 58, 237, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.transport-route-form .form-section {
  height: 100%;
  border-radius: 18px;
  border-color: rgba(var(--primary-rgb), 0.12);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.transport-route-form .form-section legend {
  font-size: 0.96rem;
}

.transport-route-form .form-section-hint {
  margin: 0.1rem 0 0.8rem;
  font-size: 0.83rem;
  line-height: 1.5;
}

.transport-route-form .form-section-grid {
  gap: 0.85rem 1rem;
}

.transport-route-form .form-section-grid label:not(.route-rate-company-item):not(.route-rate-company-item-text) {
  padding: 0.78rem 0.88rem;
  border-radius: 15px;
  border-color: rgba(var(--primary-rgb), 0.1);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.transport-route-form-fieldset--origin {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.transport-route-form-fieldset--destination {
  background: linear-gradient(180deg, rgba(245, 243, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.transport-route-form-fieldset--price {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(255, 255, 255, 0.98));
}

.transport-route-form-fieldset--scope {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 255, 255, 0.98));
}

.transport-route-form-fieldset--price .form-section-grid {
  grid-template-columns: 1fr;
}

.transport-route-form-fieldset--price input[name="tripRateCop"] {
  min-height: 3.2rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.transport-route-form .route-rate-scope-mount {
  gap: 1rem;
}

.transport-route-form .route-rate-scope-cards {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.transport-route-form .route-rate-scope-card {
  border-radius: 16px;
  border-width: 1px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
}

.transport-route-form .route-rate-scope-card-body {
  gap: 0.3rem;
  padding: 0.9rem 1rem;
}

.transport-route-form .route-rate-scope-card-title {
  font-size: 0.96rem;
  font-weight: 800;
}

.transport-route-form .route-rate-clients-block {
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: 16px;
}

.transport-route-form .route-rate-clients-toolbar {
  gap: 0.65rem;
}

.transport-route-form .route-rate-clients-list {
  max-height: 18rem;
  padding-right: 0.15rem;
}

.transport-route-form .route-rate-company-item {
  border-radius: 14px;
}

.transport-route-form-actions {
  align-items: center;
  position: sticky;
  bottom: 0;
  padding: 0.9rem 0 0.2rem;
  margin-top: 0.15rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96) 28%);
  z-index: 2;
}

.transport-route-form-actions .btn {
  min-height: 2.75rem;
  border-radius: 12px;
}

@media (max-width: 900px) {
  .transport-route-form .hr-form-hero {
    padding: 1rem;
  }

  .transport-route-form .route-rate-scope-cards {
    grid-template-columns: 1fr;
  }

  .transport-route-form-actions {
    position: static;
    background: transparent;
    padding-top: 0.2rem;
  }
}

/* Trayectos · formulario revamp (Registrar) */
.transport-route-form--revamp {
  gap: 1rem !important;
}

.p-form-colored.transport-route-form--revamp {
  grid-template-columns: 1fr !important;
}

.p-form-colored.transport-route-form--revamp > .assign-trip-top,
.p-form-colored.transport-route-form--revamp > .route-rate-block,
.p-form-colored.transport-route-form--revamp > .transport-route-form-actions,
.p-form-colored.transport-route-form--revamp > .route-rate-form-actions {
  grid-column: 1 / -1;
}

.route-rate-form-top {
  align-items: stretch;
}

.route-rate-form-top .route-rate-stepper {
  flex: 1 1 16rem;
  margin: 0;
}

.route-rate-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  flex: 1 1 18rem;
  min-width: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 5%, var(--white)), var(--white));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.route-rate-preview.is-ready {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--white)), color-mix(in srgb, #7c3aed 6%, var(--white)));
}

.route-rate-preview__leg {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1 1 7rem;
}

.route-rate-preview__eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.route-rate-preview__value {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main, #0f172a);
  word-break: break-word;
}

.route-rate-preview__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  flex: 0 0 auto;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--white));
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
}

.route-rate-block-lead {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 42rem;
}

.route-rate-block .assign-trip-block-head {
  align-items: flex-start;
}

.route-rate-route-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.75rem 0.85rem;
  align-items: stretch;
}

.route-rate-route-col {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-width: 0;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  background: color-mix(in srgb, var(--white) 92%, var(--primary) 8%);
}

.route-rate-route-col--origin {
  background: linear-gradient(180deg, color-mix(in srgb, #3b82f6 8%, var(--white)), var(--white));
}

.route-rate-route-col--dest {
  background: linear-gradient(180deg, color-mix(in srgb, #7c3aed 8%, var(--white)), var(--white));
}

.route-rate-route-col-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.route-rate-route-col-badge--dest {
  background: linear-gradient(145deg, #7c3aed, #5b21b6);
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.22);
}

.route-rate-route-col-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 auto;
}

.route-rate-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  min-width: 0;
}

.route-rate-field select {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 0.9rem;
}

.route-rate-route-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0;
  min-width: 2.5rem;
}

.route-rate-route-bridge-line {
  display: block;
  width: 2px;
  flex: 1 1 auto;
  min-height: 1.5rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #2563eb, #7c3aed);
  opacity: 0.35;
}

.route-rate-route-bridge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  color: var(--primary);
  background: var(--white);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.route-rate-price-surface {
  padding: 0.15rem 0 0;
}

.route-rate-price-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
}

.route-rate-price-input-wrap {
  display: flex;
  align-items: stretch;
  min-height: 3.35rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #10b981 28%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, #10b981 8%, var(--white)), var(--white));
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.08);
}

.route-rate-price-prefix,
.route-rate-price-suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.85rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: color-mix(in srgb, #047857 70%, var(--text-main));
  background: color-mix(in srgb, #10b981 10%, var(--white));
}

.route-rate-price-input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.65rem 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.route-rate-price-input-wrap input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, #10b981 35%, transparent);
}

.route-rate-price-hint {
  font-size: 0.8rem;
  line-height: 1.45;
}

.route-rate-editing-hint {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--line));
  background: color-mix(in srgb, var(--warning) 10%, var(--white));
}

.transport-route-form--revamp .route-rate-scope-mount {
  gap: 0.85rem;
}

.transport-route-form--revamp .route-rate-scope-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.transport-route-form--revamp .route-rate-scope-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
  background: var(--white);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  text-align: left;
}

.transport-route-form--revamp .route-rate-scope-card.is-selected,
.transport-route-form--revamp .route-rate-scope-card[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--primary) 48%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 10%, var(--white)), var(--white));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 14%, transparent);
}

.route-rate-scope-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  flex: 0 0 auto;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--white));
}

.route-rate-scope-card-icon--specific {
  color: #6d28d9;
  background: color-mix(in srgb, #7c3aed 12%, var(--white));
}

.transport-route-form--revamp .route-rate-scope-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0;
  min-width: 0;
}

.transport-route-form--revamp .route-rate-scope-card-title {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--text-main);
}

.route-rate-scope-card-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted, #64748b);
}

.transport-route-form--revamp .route-rate-clients-block {
  margin-top: 0.15rem;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: color-mix(in srgb, var(--white) 94%, var(--primary) 6%);
}

.transport-route-form--revamp .route-rate-clients-list {
  max-height: 16rem;
  border-radius: 12px;
}

.transport-route-form--revamp .route-rate-company-item {
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
}

.transport-route-form--revamp .route-rate-company-item:hover {
  background: color-mix(in srgb, var(--primary) 7%, var(--white));
}

.route-rate-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96) 32%);
}

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

  .route-rate-route-bridge {
    flex-direction: row;
    padding: 0.15rem 0;
  }

  .route-rate-route-bridge-line {
    width: auto;
    height: 2px;
    min-height: 0;
    flex: 1 1 auto;
  }

  .transport-route-form--revamp .route-rate-scope-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .route-rate-form-top {
    flex-direction: column;
  }

  .route-rate-preview {
    width: 100%;
  }

  .route-rate-form-actions {
    position: static;
    background: transparent;
  }
}

body[data-theme="dark"] .route-rate-preview {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, var(--surface)), var(--surface));
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
}

body[data-theme="dark"] .route-rate-preview__value {
  color: var(--text-main);
}

body[data-theme="dark"] .route-rate-route-col,
body[data-theme="dark"] .route-rate-route-col--origin,
body[data-theme="dark"] .route-rate-route-col--dest {
  background: color-mix(in srgb, var(--surface) 92%, var(--primary) 8%);
}

body[data-theme="dark"] .route-rate-field select,
body[data-theme="dark"] .route-rate-price-input-wrap,
body[data-theme="dark"] .transport-route-form--revamp .route-rate-scope-card,
body[data-theme="dark"] .transport-route-form--revamp .route-rate-clients-block {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line));
}

body[data-theme="dark"] .route-rate-form-actions {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.96) 32%);
}

body[data-theme="dark"] .route-rate-editing-hint {
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
}

.create-trip-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.65rem 0;
  margin-bottom: 0.1rem;
  border: none;
  background: transparent;
}

.create-trip-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: #f1f5f9;
  color: var(--primary);
  box-shadow: none;
}

.create-trip-hero-icon .btn-icon {
  width: 1.45rem;
  height: 1.45rem;
}

.create-trip-hero-copy {
  flex: 1 1 12rem;
  min-width: 0;
}

.create-trip-hero-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.create-trip-hero-sub {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--muted, #5a7a96);
}

.create-trip-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
}

.create-trip-hero-badge--ok {
  color: #0f766e;
  background: color-mix(in srgb, #10b981 16%, var(--white));
  border-color: color-mix(in srgb, #10b981 35%, var(--line));
}

.create-trip-hero-badge--muted {
  color: var(--muted, #5a7a96);
  background: color-mix(in srgb, var(--muted) 8%, var(--white));
}

.create-trip-empty-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.35rem 0.1rem;
}

.create-trip-empty-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 10%, var(--white));
  color: var(--primary);
  opacity: 0.85;
}

.create-trip-empty-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.create-trip-empty-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.create-trip-empty-detail {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted, #5a7a96);
}

.create-trip-summary-panel {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  min-height: 0;
}

.create-trip-summary-panel--active {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.create-trip-summary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.create-trip-summary-route {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.45;
  color: var(--text-main);
}

.create-trip-summary-route .btn-icon {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  color: var(--primary);
}

.create-trip-summary-status {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  flex-shrink: 0;
}

.create-trip-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.create-trip-status-pill--ok {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.create-trip-status-pill--ok::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #10b981;
}

.create-trip-status-pill--bad {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.create-trip-status-pill--info {
  color: #0369a1;
  background: #f0f9ff;
  border-color: #bae6fd;
}

.create-trip-status-pill--neutral {
  color: var(--text-main);
  background: #f8fafc;
  border-color: var(--line);
}

.create-trip-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
}

@media (max-width: 560px) {
  .create-trip-summary-grid {
    grid-template-columns: 1fr;
  }
}

.create-trip-summary-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
}

.create-trip-summary-tile-ico {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--primary);
}

.create-trip-summary-tile-ico svg {
  width: 1rem;
  height: 1rem;
}

.create-trip-summary-tile-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.create-trip-sk {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--muted, #64748b);
}

.create-trip-sv {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
  word-break: break-word;
}

.create-trip-resource-select {
  width: 100%;
  max-width: 100%;
}

/* Select con búsqueda (asignación vehículo / conductor en viajes y autorizaciones) */
.searchable-select {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.searchable-select-input {
  width: 100%;
  max-width: 100%;
  padding: 0.52rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.92rem;
  background: var(--white);
  color: var(--text-main);
}

.searchable-select-input:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
}

.searchable-select-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.searchable-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Fallback estable: en crear viaje, si no está montado el wrapper searchable,
   mostramos el select nativo (camión / conductor) para evitar listas flotantes rotas. */
#form-create-trip select.searchable-select-native:not([data-searchable-mounted="1"]) {
  position: static;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0.48rem 0.62rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.module-shell[data-module-view="authorizations"] select.searchable-select-native:not([data-searchable-mounted="1"]) {
  position: static;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0.48rem 0.62rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.native-trip-filter-input {
  width: 100%;
  min-height: 2.3rem;
  margin: 0 0 0.35rem;
  padding: 0.44rem 0.58rem;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 3%, var(--white));
  font-size: 0.86rem;
}

.native-trip-filter-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.searchable-select-dropdown {
  position: absolute;
  z-index: 120;
  left: 0;
  right: 0;
  top: calc(100% + 0.2rem);
  max-height: min(14rem, 42vh);
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--text-main) 12%, transparent);
}

.searchable-select-dropdown.searchable-select-dropdown--fixed {
  position: fixed;
  right: auto;
  z-index: 5000;
}

.searchable-select-dropdown.hidden {
  display: none;
}

.searchable-select--open .searchable-select-input {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.searchable-select-row {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
}

.searchable-select-row .searchable-select-input {
  flex: 1;
  min-width: 0;
}

.searchable-select-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  padding: 0 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 6%, var(--white));
  color: var(--primary-dark, #0d3f78);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.searchable-select-toggle:hover:not(:disabled) {
  background: color-mix(in srgb, var(--primary) 12%, var(--white));
}

.searchable-select-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.searchable-select-hint {
  margin: 0.2rem 0 0;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--muted, #64748b);
}

.searchable-select-hint--warn {
  color: #b45309;
}

.create-trip-resource-empty {
  margin: 0.15rem 0 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 0.76rem;
  line-height: 1.4;
  color: #92400e;
  background: color-mix(in srgb, #f59e0b 12%, var(--white));
  border: 1px solid color-mix(in srgb, #f59e0b 28%, var(--line));
}

.create-trip-pick-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.15rem 0 0;
  max-height: 9.5rem;
  overflow-y: auto;
}

.create-trip-pick-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.42rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 0.8rem;
  line-height: 1.35;
  cursor: pointer;
  color: var(--text-main);
}

.create-trip-pick-option:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--white));
}

.create-trip-pick-option.is-selected {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
  background: color-mix(in srgb, var(--primary) 14%, var(--white));
  font-weight: 700;
}

.create-trip-pick-option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.searchable-select-option {
  display: block;
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.35;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}

.searchable-select-option:hover,
.searchable-select-option:focus {
  background: color-mix(in srgb, var(--primary) 10%, var(--white));
}

.searchable-select-option.is-active {
  background: color-mix(in srgb, var(--primary) 16%, var(--white));
}

.searchable-select-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.searchable-select-empty {
  padding: 0.5rem 0.65rem;
  font-size: 0.85rem;
  color: var(--muted, #5a7a96);
}

body[data-theme="dark"] .searchable-select-input,
body[data-theme="dark"] .searchable-select-dropdown {
  background: var(--surface, #0f172a);
  color: var(--text-main);
}

.create-trip-surface {
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
  border-radius: 12px;
  padding: 0.72rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 7%, var(--white)), var(--white));
}

.create-trip-surface--premium {
  border-color: color-mix(in srgb, #6d28d9 26%, var(--line));
  background: linear-gradient(150deg, color-mix(in srgb, #8b5cf6 10%, var(--white)), color-mix(in srgb, #0ea5e9 5%, var(--white)));
}

.create-trip-eligibility-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
}

.create-trip-eligibility-badge--ok {
  color: #0f766e;
  background: color-mix(in srgb, #10b981 17%, var(--white));
}

.create-trip-eligibility-badge--blocked {
  color: #9f1239;
  background: color-mix(in srgb, #ef4444 14%, var(--white));
}

.create-trip-fleet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.create-trip-fleet-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 1.6rem;
  align-items: center;
}

.create-trip-fleet-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--line);
}

.create-trip-fleet-stat strong {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.create-trip-fleet-stat--ok {
  color: #0f766e;
  background: color-mix(in srgb, #10b981 14%, var(--white));
  border-color: color-mix(in srgb, #10b981 30%, var(--line));
}

.create-trip-fleet-stat--muted {
  color: var(--muted, #5a7a96);
  background: color-mix(in srgb, var(--muted) 6%, var(--white));
}

.create-trip-flag-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
}

.create-trip-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
}

.create-trip-flag-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.create-trip-flag--busy .create-trip-flag-dot {
  background: var(--primary);
}

.create-trip-flag--offline .create-trip-flag-dot {
  background: var(--warning, #f59e0b);
}

.create-trip-flag--expired .create-trip-flag-dot {
  background: #ef4444;
}

.create-trip-flag--busy {
  background: color-mix(in srgb, var(--primary) 14%, var(--white));
  color: var(--primary-deeper);
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line));
}

.create-trip-flag--offline {
  background: color-mix(in srgb, var(--warning) 14%, var(--white));
  color: color-mix(in srgb, var(--primary-deeper) 35%, #92400e 65%);
  border-color: color-mix(in srgb, var(--warning) 22%, var(--line));
}

.create-trip-flag--expired {
  background: color-mix(in srgb, #ef4444 14%, var(--white));
  color: #9f1239;
}

.create-trip-flag--type {
  background: color-mix(in srgb, #6366f1 12%, var(--white));
  color: color-mix(in srgb, var(--primary-deeper) 40%, #3730a3 60%);
  border-color: color-mix(in srgb, #6366f1 22%, var(--line));
}

/* Formulario asignar viaje */
.assign-trip-form {
  gap: 0.85rem !important;
}

.assign-trip-form.assign-trip-form--revamp {
  gap: 0.95rem !important;
}

.assign-trip-top {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.55rem 0.75rem;
}

.assign-trip-top .assign-trip-stepper {
  flex: 1 1 14rem;
  margin: 0;
}

.assign-trip-top .create-trip-hero-badge {
  align-self: center;
  margin-left: auto;
}

.assign-trip-block {
  margin: 0;
  padding: 0.85rem 0.95rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.assign-trip-form--revamp .assign-trip-block {
  border-radius: 16px;
  border-color: color-mix(in srgb, var(--primary) 14%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 3%, var(--white)), var(--white));
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.assign-trip-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
}

.assign-trip-block-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.assign-trip-block-title .btn-icon {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
}

.assign-trip-block-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.assign-trip-field {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.assign-trip-field-label,
.assign-trip-resource-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.assign-trip-field-label .btn-icon,
.assign-trip-resource-label .btn-icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--primary);
}

.assign-trip-field select,
.assign-trip-field--request select {
  width: 100%;
  min-height: 2.45rem;
  padding: 0.48rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 500;
}

.assign-trip-form--revamp .assign-trip-field select,
.assign-trip-form--revamp .assign-trip-field--request select,
.assign-trip-form--revamp .searchable-select-input {
  min-height: 2.62rem;
  border-radius: 12px;
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
  background: color-mix(in srgb, var(--primary) 3%, var(--white));
}

/* Evita que el select nativo reaparezca sobre el buscador personalizado. */
.assign-trip-form .searchable-select select.searchable-select-native,
.modal-edit-form .searchable-select select.searchable-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none !important;
}

/* UI más limpia: no mostrar lista compacta extra debajo. */
.assign-trip-form--revamp .create-trip-pick-list-mount {
  display: none !important;
}

.assign-trip-field select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.assign-trip-preview {
  min-height: 0;
}

.assign-trip-preview--filled .assign-trip-empty {
  display: none;
}

.assign-trip-preview-active {
  padding: 0.75rem 0.8rem;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background: color-mix(in srgb, var(--primary) 4%, var(--white));
}

.assign-trip-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.65rem;
}

.assign-trip-preview-route {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0;
  flex: 1 1 10rem;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
}

.assign-trip-preview-route .btn-icon {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.12rem;
  color: var(--primary);
}

.assign-trip-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.assign-trip-preview-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.75rem;
  margin: 0;
}

.assign-trip-preview-facts > div {
  min-width: 0;
}

.assign-trip-preview-facts dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #64748b);
}

.assign-trip-preview-facts dd {
  margin: 0.12rem 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
  word-break: break-word;
}

.assign-trip-preview-facts--wide {
  grid-column: 1 / -1;
}

.assign-trip-flags {
  margin: 0;
}

.assign-trip-fleet-stats {
  min-height: 0;
}

.assign-trip-fleet-stats:empty {
  display: none;
}

.assign-trip-fleet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 720px) {
  .assign-trip-fleet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assign-trip-preview-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .assign-trip-preview-facts--wide {
    grid-column: 1 / -1;
  }
}

.assign-trip-resource {
  display: grid;
  gap: 0.38rem;
  margin: 0;
  padding: 0.65rem 0.7rem;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, #10b981 20%, var(--line));
  background: color-mix(in srgb, #10b981 5%, var(--white));
}

.assign-trip-form--revamp .assign-trip-resource {
  border-radius: 13px;
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line));
  background: linear-gradient(160deg, color-mix(in srgb, #10b981 4%, var(--white)), color-mix(in srgb, #0ea5e9 3%, var(--white)));
}

.assign-trip-form--revamp .searchable-select-dropdown {
  z-index: 6500;
  border-radius: 12px;
  border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
}

.assign-trip-resource:focus-within {
  border-color: color-mix(in srgb, #10b981 45%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, #10b981 14%, transparent);
}

.assign-trip-rate {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.assign-trip-rate-inner {
  display: grid;
  gap: 0.6rem;
}

.assign-trip-rate-card {
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, #8b5cf6 28%, var(--line));
  background: linear-gradient(160deg, color-mix(in srgb, #8b5cf6 5%, var(--white)), var(--white));
}

.assign-trip-rate-meta,
.assign-trip-form .trip-rate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 0;
}

.assign-trip-rate-meta:empty {
  display: none;
}

.assign-trip-form .trip-rate-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary) 8%, var(--white));
  color: var(--text-main);
}

.assign-trip-form .trip-rate-meta-chip--value {
  font-weight: 800;
  color: var(--primary-dark, #0d3f78);
  border-color: color-mix(in srgb, var(--primary) 25%, var(--line));
}

.assign-trip-form .trip-rate-meta-chip--muted {
  color: var(--muted, #64748b);
  background: color-mix(in srgb, var(--muted) 8%, var(--white));
}

.assign-trip-rate-guard-note {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted, #64748b);
}

.assign-trip-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
  background: color-mix(in srgb, var(--primary) 5%, var(--white));
}

.assign-trip-form--revamp .assign-trip-footer {
  border-radius: 16px;
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 8%, var(--white)), color-mix(in srgb, #0ea5e9 4%, var(--white)));
}

.assign-trip-checklist {
  flex: 1 1 12rem;
}

.assign-trip-submit-actions {
  margin-left: auto;
}

.assign-trip-form .searchable-select-hint {
  display: none;
}

.assign-trip-empty {
  padding: 0.25rem 0;
}

.assign-trip-empty .create-trip-empty-detail {
  display: none;
}

.create-trip-form {
  gap: 1.1rem !important;
}

.create-trip-stepper {
  list-style: none;
  margin: 0 0 0.35rem;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
}

.create-trip-stepper--track .create-trip-step {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--line);
  padding: 0.55rem 0.5rem;
  position: relative;
}

.create-trip-stepper--track .create-trip-step:last-child {
  border-right: none;
}

.create-trip-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted, #5a7a96);
  background: color-mix(in srgb, var(--muted) 6%, var(--white));
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.create-trip-step--current {
  color: var(--primary-dark, #0d3f78);
  background: color-mix(in srgb, var(--primary) 12%, var(--white));
  box-shadow: inset 0 -3px 0 var(--primary);
}

.create-trip-step--done {
  color: #0f766e;
  background: color-mix(in srgb, #10b981 10%, var(--white));
}

.create-trip-step--done .create-trip-step-n {
  background: #10b981;
  color: #fff;
  border-color: transparent;
}

.create-trip-step--locked {
  opacity: 0.72;
}

.create-trip-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  transition: background 0.2s ease, color 0.2s ease;
}

.create-trip-step--current .create-trip-step-n {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.create-trip-step-t {
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .create-trip-step-t {
    display: none;
  }
  .create-trip-stepper--track .create-trip-step {
    padding: 0.5rem 0.35rem;
  }
}

.create-trip-request-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.create-trip-form .create-trip-fieldset--step1.form-section {
  background: var(--white);
  border-color: var(--line);
}

.create-trip-form .create-trip-fieldset--step1.form-section legend {
  background: linear-gradient(135deg, var(--primary-deeper), var(--primary));
}

.create-trip-request-select-label {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
}

.create-trip-request-select-label .field-label {
  text-transform: none;
  font-size: 0.82rem;
  letter-spacing: 0;
  color: var(--text-main);
}

.create-trip-request-select-label select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.create-trip-request-select-label select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

.create-trip-request-stack {
  gap: 0.85rem;
}

.create-trip-request-stack .create-trip-summary-panel--active {
  margin-top: 0.1rem;
}

.create-trip-fleet-shell {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.create-trip-fleet-shell .create-trip-flag-legend {
  margin-bottom: 0.1rem;
}

.create-trip-fleet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .create-trip-fleet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

.create-trip-resource-card {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  min-width: 0;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #10b981 22%, var(--line));
  background: linear-gradient(160deg, color-mix(in srgb, #10b981 7%, var(--white)), var(--white));
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.create-trip-resource-card:focus-within {
  border-color: color-mix(in srgb, #10b981 50%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, #10b981 18%, transparent);
}

.create-trip-resource-card-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-main);
}

.create-trip-resource-card-head .btn-icon {
  width: 1rem;
  height: 1rem;
  color: #059669;
}

.create-trip-required {
  margin-left: auto;
  color: #dc2626;
  font-weight: 800;
}

.create-trip-fleet-field {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  min-width: 0;
}

.create-trip-rate-inner {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hr-form-card .create-trip-rate-mount.form-section-grid,
.hr-form-card .create-trip-rate-mount .create-trip-rate-catalog,
.hr-form-card .create-trip-rate-mount .create-trip-price-field {
  min-height: 0;
}

.hr-form-card .create-trip-rate-mount .create-trip-rate-catalog,
.hr-form-card .create-trip-rate-mount .create-trip-price-field--hero {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  min-height: 0;
}

.hr-form-card .create-trip-rate-mount select.trip-rate-choice-select {
  min-height: 2.45rem;
  max-height: 2.65rem;
  padding: 0.42rem 0.65rem;
  font-size: 0.86rem;
  line-height: 1.3;
}

.hr-form-card .create-trip-rate-mount .trip-rate-meta {
  margin-top: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.hr-form-card .create-trip-rate-mount .create-trip-price-field--hero .create-trip-price-wrap {
  min-height: 2.55rem;
}

.hr-form-card .create-trip-rate-mount .create-trip-price-field--hero input {
  font-size: 1rem;
  padding: 0.5rem 0.65rem;
}

.create-trip-price-wrap {
  display: flex;
  align-items: stretch;
  border-radius: 10px;
  border: 2px solid color-mix(in srgb, #8b5cf6 35%, var(--line));
  background: var(--white);
  overflow: hidden;
}

.create-trip-price-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-dark, #0d3f78);
  background: color-mix(in srgb, #8b5cf6 8%, var(--white));
  border-right: 1px solid color-mix(in srgb, #8b5cf6 22%, var(--line));
}

.create-trip-price-field--hero input {
  flex: 1;
  min-width: 0;
  font-size: 1.12rem;
  font-weight: 800;
  padding: 0.65rem 0.75rem;
  border: none;
  border-radius: 0;
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.create-trip-price-field--hero:focus-within .create-trip-price-wrap {
  border-color: color-mix(in srgb, #8b5cf6 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, #8b5cf6 16%, transparent);
}

.create-trip-price-field--hero input:focus {
  outline: none;
}

.create-trip-price-hint {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.76rem;
}

.create-trip-rate-mount .form-section-grid {
  gap: 0.85rem;
}

#create-trip-rate-fields .form-section-grid {
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.create-trip-submit-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding: 1rem 0.85rem;
  margin-top: 0.25rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 6%, var(--white)), var(--white));
}

.create-trip-readiness {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  flex: 1 1 14rem;
}

.create-trip-readiness--bar {
  flex: none;
  flex-wrap: nowrap;
  gap: 0;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
}

.create-trip-readiness--bar .create-trip-readiness-item {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--line);
  padding: 0.5rem 0.4rem;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.create-trip-readiness--bar .create-trip-readiness-item:last-child {
  border-right: none;
}

.create-trip-readiness-item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted, #5a7a96);
  background: color-mix(in srgb, var(--muted) 8%, var(--white));
  border: 1px solid var(--line);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.create-trip-readiness-item.is-done {
  color: #0f766e;
  background: color-mix(in srgb, #10b981 14%, var(--white));
  border-color: color-mix(in srgb, #10b981 32%, var(--line));
}

.create-trip-readiness--bar .create-trip-readiness-item.is-done {
  background: color-mix(in srgb, #10b981 12%, var(--white));
  border-color: transparent;
  box-shadow: inset 0 -2px 0 #10b981;
}

@media (max-width: 720px) {
  .create-trip-readiness--bar .create-trip-readiness-item {
    font-size: 0.68rem;
    padding: 0.45rem 0.2rem;
  }

  .create-trip-readiness--bar .assign-trip-check-label {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.create-trip-readiness-mark {
  display: inline-flex;
  width: 0.85rem;
  height: 0.85rem;
  align-items: center;
  justify-content: center;
}

.create-trip-readiness-mark .btn-icon {
  width: 0.75rem;
  height: 0.75rem;
}

.create-trip-submit-btn {
  min-width: min(100%, 14rem);
  padding: 0.72rem 1.35rem;
  font-weight: 800;
  font-size: 0.92rem;
  border-radius: 12px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.create-trip-submit-btn--ready {
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.28);
}

.create-trip-submit-btn--ready:hover:not(:disabled) {
  transform: translateY(-1px);
}

@media (max-width: 1180px) {
  .transport-trips-tab-panels {
    padding: 0.45rem;
    border-radius: 18px;
  }
}

body[data-theme="dark"] .transport-trips-tab-panels {
  background: linear-gradient(180deg, rgba(13, 24, 40, 0.98), rgba(10, 18, 31, 0.94));
  border-color: #243447;
  box-shadow: 0 22px 40px rgba(2, 8, 18, 0.4);
}

body[data-theme="dark"] .transport-form-card--trip .hr-data-card__head {
  background: linear-gradient(180deg, rgba(18, 50, 96, 0.92), rgba(10, 22, 38, 0.9));
}

body[data-theme="dark"] .transport-form-card--route .hr-data-card__head {
  background: linear-gradient(180deg, rgba(52, 28, 108, 0.92), rgba(10, 22, 38, 0.9));
}

body[data-theme="dark"] .transport-route-form .hr-form-hero {
  border-color: rgba(129, 140, 248, 0.22);
  background: linear-gradient(135deg, rgba(40, 28, 78, 0.95), rgba(14, 28, 46, 0.94));
}

body[data-theme="dark"] .transport-route-form .hr-form-hero__title {
  color: #eef2ff;
}

body[data-theme="dark"] .transport-route-form .hr-form-hero__text {
  color: #c7d2fe;
}

body[data-theme="dark"] .transport-route-form .hr-form-hero-badge {
  border-color: rgba(129, 140, 248, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .transport-route-form .form-section {
  border-color: rgba(148, 196, 255, 0.14);
  box-shadow: 0 18px 34px rgba(2, 8, 18, 0.3);
}

body[data-theme="dark"] .transport-route-form .form-section-grid label:not(.route-rate-company-item):not(.route-rate-company-item-text) {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 196, 255, 0.14);
  box-shadow: 0 10px 22px rgba(2, 8, 18, 0.18);
}

body[data-theme="dark"] .transport-route-form-fieldset--origin {
  background: linear-gradient(180deg, rgba(15, 35, 58, 0.94), rgba(10, 22, 38, 0.94));
}

body[data-theme="dark"] .transport-route-form-fieldset--destination {
  background: linear-gradient(180deg, rgba(33, 28, 68, 0.94), rgba(10, 22, 38, 0.94));
}

body[data-theme="dark"] .transport-route-form-fieldset--price {
  background: linear-gradient(180deg, rgba(10, 50, 43, 0.94), rgba(10, 22, 38, 0.94));
}

body[data-theme="dark"] .transport-route-form-fieldset--scope {
  background: linear-gradient(180deg, rgba(66, 42, 12, 0.94), rgba(10, 22, 38, 0.94));
}

body[data-theme="dark"] .transport-route-form .route-rate-scope-card {
  box-shadow: 0 12px 24px rgba(2, 8, 18, 0.18);
}

body[data-theme="dark"] .transport-route-form-actions {
  background: linear-gradient(180deg, rgba(10, 22, 38, 0), rgba(10, 22, 38, 0.96) 28%);
}

body[data-theme="dark"] .create-trip-hero {
  background: linear-gradient(135deg, rgba(23, 55, 85, 0.9), rgba(8, 18, 32, 0.75));
  border-color: rgba(135, 190, 247, 0.28);
}

body[data-theme="dark"] .create-trip-hero-icon {
  background: rgba(37, 99, 235, 0.35);
  color: #93c5fd;
}

body[data-theme="dark"] .create-trip-stepper {
  background: rgba(8, 18, 32, 0.65);
  border-color: rgba(135, 190, 247, 0.28);
}

body[data-theme="dark"] .create-trip-stepper--track .create-trip-step {
  border-right-color: rgba(135, 190, 247, 0.18);
}

body[data-theme="dark"] .create-trip-step {
  background: rgba(8, 18, 32, 0.55);
  color: #9fb9d9;
}

body[data-theme="dark"] .create-trip-step--current {
  color: #e8f4fc;
  background: rgba(23, 55, 85, 0.9);
  box-shadow: inset 0 -3px 0 #3b82f6;
}

body[data-theme="dark"] .create-trip-step--done {
  color: #6ee7b7;
  background: rgba(6, 78, 59, 0.45);
}

body[data-theme="dark"] .create-trip-step-n {
  background: rgba(8, 18, 32, 0.9);
  color: #c8dff7;
  border-color: rgba(135, 190, 247, 0.22);
}

body[data-theme="dark"] .create-trip-step--current .create-trip-step-n {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

body[data-theme="dark"] .create-trip-request-select-label,
body[data-theme="dark"] .create-trip-resource-card {
  background: rgba(8, 18, 32, 0.55);
  border-color: rgba(52, 211, 153, 0.28);
  color: #d2e6ff;
}

body[data-theme="dark"] .create-trip-form .create-trip-fieldset--step1.form-section {
  background: rgba(8, 18, 32, 0.55);
  border-color: rgba(135, 190, 247, 0.22);
}

body[data-theme="dark"] .assign-trip-block {
  background: rgba(8, 18, 32, 0.62);
  border-color: rgba(135, 190, 247, 0.2);
  box-shadow: none;
}

body[data-theme="dark"] .assign-trip-block-head {
  border-bottom-color: rgba(135, 190, 247, 0.14);
}

body[data-theme="dark"] .assign-trip-field select {
  background: rgba(8, 18, 32, 0.72);
  border-color: rgba(135, 190, 247, 0.22);
  color: #e8f4fc;
}

body[data-theme="dark"] .assign-trip-preview-active {
  background: rgba(23, 55, 85, 0.45);
  border-color: rgba(135, 190, 247, 0.22);
}

body[data-theme="dark"] .assign-trip-resource {
  background: rgba(6, 50, 38, 0.35);
  border-color: rgba(52, 211, 153, 0.28);
  color: #d2e6ff;
}

body[data-theme="dark"] .assign-trip-footer {
  background: rgba(23, 55, 85, 0.4);
  border-color: rgba(135, 190, 247, 0.2);
}

body[data-theme="dark"] .assign-trip-form .trip-rate-meta-chip {
  background: rgba(8, 18, 32, 0.65);
  border-color: rgba(135, 190, 247, 0.2);
  color: #c8dff7;
}

body[data-theme="dark"] .create-trip-summary-panel--active {
  background: rgba(8, 18, 32, 0.65);
  border-color: rgba(135, 190, 247, 0.22);
  box-shadow: none;
}

body[data-theme="dark"] .create-trip-summary-head {
  border-bottom-color: rgba(135, 190, 247, 0.18);
}

body[data-theme="dark"] .create-trip-summary-tile-ico {
  background: rgba(23, 55, 85, 0.75);
  color: #93c5fd;
}

body[data-theme="dark"] .create-trip-request-select-label select {
  background: rgba(8, 18, 32, 0.7);
  border-color: rgba(135, 190, 247, 0.25);
  color: #e8f4fc;
}

body[data-theme="dark"] .create-trip-status-pill--ok {
  background: rgba(6, 78, 59, 0.45);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

body[data-theme="dark"] .create-trip-status-pill--bad {
  background: rgba(127, 29, 29, 0.35);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

body[data-theme="dark"] .create-trip-status-pill--info {
  background: rgba(12, 74, 110, 0.45);
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

body[data-theme="dark"] .create-trip-status-pill--neutral {
  background: rgba(8, 18, 32, 0.65);
  color: #c8dff7;
}

body[data-theme="dark"] .create-trip-submit-wrap {
  background: linear-gradient(180deg, rgba(23, 55, 85, 0.5), rgba(8, 18, 32, 0.65));
  border-color: rgba(135, 190, 247, 0.22);
}

body[data-theme="dark"] .create-trip-readiness-item {
  background: rgba(8, 18, 32, 0.65);
  border-color: rgba(135, 190, 247, 0.2);
  color: #9fb9d9;
}

body[data-theme="dark"] .create-trip-readiness-item.is-done {
  color: #6ee7b7;
  background: rgba(6, 78, 59, 0.45);
  border-color: rgba(52, 211, 153, 0.35);
}

body[data-theme="dark"] .create-trip-price-wrap {
  background: rgba(8, 18, 32, 0.7);
  border-color: rgba(167, 139, 250, 0.4);
}

body[data-theme="dark"] .create-trip-price-prefix {
  background: rgba(88, 28, 135, 0.25);
  color: #e9d5ff;
  border-right-color: rgba(167, 139, 250, 0.35);
}

body[data-theme="dark"] .create-trip-price-field--hero input {
  color: #e8f4fc;
}

.trip-rate-choice-select {
  font-variant-numeric: tabular-nums;
}

.trip-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
  min-width: 0;
}

.trip-status-control {
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.trip-status-control select {
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0.45rem 0.6rem;
  min-height: 2.14rem;
  letter-spacing: 0.01em;
  width: 100%;
  max-width: 100%;
  color: #0b2138;
  text-overflow: ellipsis;
}

.trip-status-select option {
  color: #0f172a;
  background: #ffffff;
  font-weight: 600;
}

.trip-status-select {
  background: linear-gradient(135deg, #f3f9ff, #ffffff);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.12);
}

.trip-status-select--pendiente {
  color: #8a5b00;
  border-color: #e7bf66;
  background: linear-gradient(135deg, #fff8df, #fff1bf);
}

.trip-status-select--aprobada_pendiente_asignacion {
  color: #1f4f8c;
  border-color: #9ec8e8;
  background: linear-gradient(135deg, #e9f4fd, #d6ebfa);
}

.trip-status-select--viaje_asignado {
  color: #136041;
  border-color: #8cd9b5;
  background: linear-gradient(135deg, #e8f8ef, #d7f2e4);
}

.trip-status-select--en_transito {
  color: #1f4f8c;
  border-color: #9ec8e8;
  background: linear-gradient(135deg, #edf6fe, #dceefe);
}

.trip-status-select--espera_standby {
  color: #875800;
  border-color: #e7bf66;
  background: linear-gradient(135deg, #fff8df, #ffefc7);
}

.trip-status-select--completada {
  color: #0d5f74;
  border-color: #8cc9d6;
  background: linear-gradient(135deg, #e4f6fb, #d5eef7);
}

.trip-status-select--cerrada {
  color: #334155;
  border-color: #b6c2cf;
  background: linear-gradient(135deg, #f1f5f9, #e5ebf1);
}

.trip-status-select--cancelada,
.trip-status-select--rechazada {
  color: #9f1f1f;
  border-color: #e6a4a4;
  background: linear-gradient(135deg, #fde8e8, #fad9d9);
}

.trip-actions-toolbar {
  justify-content: flex-start;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.trip-actions-toolbar .btn {
  border-radius: 10px;
  flex: 0 0 auto;
  font-size: 0.78rem;
  padding: 0.36rem 0.6rem;
}

.trip-actions-toolbar .btn .btn-icon {
  width: 14px;
  height: 14px;
  min-width: 14px;
}

.trip-actions-stack {
  width: 100%;
  min-width: 13rem;
  gap: 0.55rem;
}

/**
 * El select de estado operativo (badge interactivo) replica el aire de los
 * status pills pero permanece "tappable" desde celda. Forzamos una sola
 * línea con elipsis y mantenemos el aspecto de pill grande.
 */
.trip-status-select {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}

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

.trips-table-wrap table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.92rem;
  border-collapse: separate;
  border-spacing: 0 0.4rem;
}

.trips-table-wrap table thead th,
.trips-table-wrap table tbody td {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  padding: 0.72rem 0.62rem;
}

.trips-table-wrap table thead th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #3f5f82;
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.trips-table-wrap table tbody tr {
  background: color-mix(in srgb, #ffffff 92%, var(--brand-blue-soft) 8%);
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.08);
}

.trips-table-wrap table tbody tr td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.trips-table-wrap table tbody tr td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.trips-table-wrap table tbody td {
  border-top: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
}

.trips-table-wrap table tbody td:first-child {
  border-left: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
}

.trips-table-wrap table tbody td:last-child {
  border-right: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
}

.trips-table-wrap table thead th:nth-child(8),
.trips-table-wrap table tbody td:nth-child(8) {
  min-width: 9rem;
}

.trips-table-wrap table thead th:nth-child(9),
.trips-table-wrap table tbody td:nth-child(9) {
  min-width: 14rem;
}

.trips-table-wrap.requests-table-wrap table thead th:nth-child(5),
.trips-table-wrap.requests-table-wrap table tbody td:nth-child(5) {
  min-width: 13rem;
}

.request-actions-stack {
  min-width: 10.8rem;
}

.request-admin-toolbar {
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.72rem;
}

.request-company-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
}

.request-company-hub-card {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 16px;
  padding: 0.95rem 1rem 0.85rem;
  background: linear-gradient(160deg, #ffffff 0%, color-mix(in srgb, var(--primary) 4%, #ffffff) 60%, color-mix(in srgb, var(--primary) 9%, #ffffff) 100%);
  display: grid;
  gap: 0.7rem;
  box-shadow: 0 6px 16px rgba(13, 63, 121, 0.08), 0 1px 2px rgba(13, 63, 121, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.request-company-hub-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.request-company-hub-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-deeper), var(--primary), var(--brand-blue-mid));
  border-radius: 16px 16px 0 0;
  opacity: 0.95;
}

.request-company-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(13, 63, 121, 0.14), 0 2px 4px rgba(13, 63, 121, 0.06);
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
}

.request-company-hub-card.is-active {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.22);
}

.request-company-hub-card.is-active::before {
  height: 6px;
  opacity: 1;
}

.request-company-hub-card header {
  min-width: 0;
}

.request-company-hub-card h4 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #0d3f79;
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.request-company-hub-head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}

.request-company-hub-titlestack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.request-company-hub-titlestack .status {
  flex-shrink: 0;
  max-width: 100%;
}

.request-company-hub-logo {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.2rem;
}

.request-company-hub-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.request-company-hub-logo--fallback {
  background: linear-gradient(135deg, #377cc0, #2563a8);
  color: #fff;
  font-weight: 800;
}

.request-company-hub-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.request-company-hub-cta {
  margin: 0;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--primary-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.16s ease;
}

.request-company-hub-cta:hover {
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  color: var(--primary);
  box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-1px);
}

.request-company-hub-card.is-active .request-company-hub-cta {
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  color: #ffffff;
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

.request-company-hub-cta svg,
.request-company-hub-cta .btn-icon {
  width: 14px;
  height: 14px;
}

.request-company-hub-metrics span {
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  border-radius: 10px;
  padding: 0.4rem 0.45rem;
  display: grid;
  gap: 0.15rem;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
  min-width: 0;
  overflow: hidden;
}

.request-company-hub-metrics strong {
  font-size: 1.15rem;
  color: #0d3f79;
  font-weight: 800;
  line-height: 1;
}

.request-company-hub-metrics small {
  font-size: clamp(0.58rem, 1.6vw, 0.66rem);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

/* Foto del conductor al editar (óvalo centrado arriba del formulario) */
.driver-edit-photo-block {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin: 0 auto 0.35rem;
}

.driver-edit-photo-oval {
  width: 108px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--primary) 35%, var(--line));
  box-shadow: 0 4px 14px rgba(13, 63, 121, 0.12);
  background: color-mix(in srgb, var(--primary) 8%, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.driver-edit-photo-oval img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.driver-edit-photo-oval--placeholder {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary-dark);
  user-select: none;
}

.driver-edit-photo-hint {
  font-size: 0.78rem;
  text-align: center;
  max-width: 18rem;
}

.request-ops-cards {
  margin-top: 0;
}

@media (max-width: 768px) {
  .request-company-hub-grid {
    grid-template-columns: 1fr;
  }
}

/**
 * Barra de filtros rápidos: pills compactas con badge de count, usadas en
 * "Panel operativo de viajes" y "Panel operativo de solicitudes".
 * Comparten look para mantener coherencia entre módulos.
 */
.ops-filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  padding: 0.3rem 0;
  align-items: center;
}

/** Selector empresa / solo mis solicitudes (cliente en dashboard y solicitudes). */
.client-data-scope-bar {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, var(--primary) 15%);
  background: color-mix(in srgb, var(--white) 94%, var(--primary) 6%);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--primary) 8%, transparent);
}

.client-data-scope-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.9rem;
}

.client-data-scope-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
  flex-shrink: 0;
}

.client-data-scope-label-text {
  margin-left: 0.05rem;
}

.client-data-scope-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: min(100%, 12rem);
  justify-content: flex-end;
}

@media (max-width: 540px) {
  .client-data-scope-pills {
    justify-content: flex-start;
  }
}

.ops-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
  white-space: nowrap;
}

.ops-filter-pill:hover {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  color: var(--primary);
  box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-1px);
}

.ops-filter-pill:active {
  transform: scale(0.97);
}

.ops-filter-pill strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 14%, #ffffff);
  color: var(--primary-deeper);
  font-size: 0.74rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ops-filter-pill.is-active {
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

.ops-filter-pill.is-active strong {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

body[data-theme="dark"] .ops-filter-pill {
  background: linear-gradient(180deg, #17314c 0%, #12263d 100%);
  color: #dbeafe;
  border-color: #4a729e;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .ops-filter-pill:hover {
  background: linear-gradient(180deg, #1c3d5e 0%, #16314d 100%);
  border-color: #6797c7;
  color: #ffffff;
}

body[data-theme="dark"] .ops-filter-pill strong {
  background: rgba(255, 255, 255, 0.08);
  color: #e0ecff;
}

body[data-theme="dark"] .ops-filter-pill.is-active strong {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/**
 * Toolbar superior del admin en módulo Solicitudes: muestra contexto de
 * filtro por empresa + botón de limpiar. Es la barra que aparece justo
 * encima de los filtros de estado cuando se selecciona una empresa.
 */
.request-admin-toolbar {
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 7%, #ffffff), color-mix(in srgb, var(--primary) 14%, #ffffff));
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  margin-bottom: 0.7rem;
}

.request-admin-toolbar-status {
  font-size: 0.86rem;
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

.request-admin-toolbar-status strong {
  color: var(--primary-deeper);
  font-weight: 800;
}

body[data-theme="dark"] .request-admin-toolbar {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, #0f172a), color-mix(in srgb, var(--primary) 12%, #0f172a));
  border-color: color-mix(in srgb, var(--primary) 30%, #2a3f56);
}

body[data-theme="dark"] .request-admin-toolbar-status {
  color: #dbeafe;
}

/**
 * Tarjeta de solicitud: hereda el look de trip-ops-card pero con un acento
 * más cálido en la cabecera y mejor jerarquía del bloque de viaje asociado.
 */
.request-ops-card .request-ops-card-trip {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(16, 185, 129, 0.08));
  border-color: rgba(5, 150, 105, 0.35);
  color: #0a6b3a;
  font-weight: 600;
}

.request-ops-card .request-ops-card-trip-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(5, 150, 105, 0.16);
  color: #047857;
  flex-shrink: 0;
}

.request-ops-card .request-ops-card-trip strong {
  color: #064c2d;
  font-weight: 800;
}

body[data-theme="dark"] .request-ops-card .request-ops-card-trip {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(16, 185, 129, 0.08));
  color: #6ee7b7;
}

body[data-theme="dark"] .request-ops-card .request-ops-card-trip strong {
  color: #a7f3d0;
}

/**
 * Select de cambio de estado dentro de trip-ops-card: queda ligeramente
 * destacado (label + select de 100% ancho).
 */
.trip-ops-card-status-control {
  margin-top: 0.1rem;
}

.trip-ops-card-status-control > span {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.trip-ops-card-status-control select {
  width: 100%;
}

/**
 * Tarjetas de Flota de camiones: heredan el look de .trip-ops-card
 * pero con énfasis en placa (título) y línea inferior con viaje activo.
 */
.vehicle-ops-cards {
  margin: 0;
}

/* Flota Camiones: buscar + vista (misma fila que conductores) */
.vehicle-fleet-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: stretch;
}

/* Conductores: dos filas — arriba búsqueda + vista; abajo filtros alineados */
.driver-fleet-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: stretch;
}

.driver-fleet-toolbar-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.35rem;
  align-items: end;
}

.driver-fleet-toolbar-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 1.1rem;
  align-items: end;
}

.driver-fleet-filter {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.driver-fleet-filter select {
  min-height: 2.45rem;
  width: 100%;
  max-width: 100%;
}

.driver-fleet-list-wrap {
  margin-top: 0.35rem;
}

.driver-fleet-list-avail {
  font-weight: 600;
  font-size: 0.84rem;
}

.driver-fleet-list-actions .toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
}

@media (max-width: 900px) {
  .driver-fleet-toolbar-top {
    grid-template-columns: 1fr;
  }

  .driver-fleet-view-field {
    min-width: 0;
    max-width: 22rem;
  }

  .driver-fleet-toolbar-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .driver-fleet-toolbar-filters {
    grid-template-columns: 1fr;
  }
}

.vehicle-fleet-list-wrap {
  margin-top: 0.35rem;
}

.vehicle-fleet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.vehicle-fleet-table th,
.vehicle-fleet-table td {
  padding: 0.52rem 0.62rem;
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
  text-align: left;
  vertical-align: middle;
}

.vehicle-fleet-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5b6f8d;
  background: linear-gradient(180deg, #edf4fd 0%, #e6f0fb 100%);
  white-space: nowrap;
}

.vehicle-fleet-table tbody tr:hover {
  background: rgba(var(--primary-rgb), 0.04);
}

.vehicle-fleet-list-plate {
  letter-spacing: 0.04em;
}

.vehicle-fleet-list-sub {
  font-size: 0.74rem;
  margin-top: 0.1rem;
}

.vehicle-fleet-list-doc {
  font-size: 0.78rem;
  white-space: nowrap;
}

.vehicle-fleet-list-actions .toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
}

.request-fleet-toolbar {
  align-items: end;
}

.trip-ops-fleet-table .trip-ops-list-status {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.trip-ops-fleet-table .trip-ops-list-status .trip-status-select {
  max-width: 100%;
}

.request-ops-fleet-table .vehicle-fleet-list-doc {
  white-space: normal;
  max-width: 16rem;
}

@media (max-width: 960px) {
  .driver-fleet-toolbar-top {
    grid-template-columns: 1fr;
  }
}

body[data-theme="dark"] .vehicle-fleet-table th {
  background: linear-gradient(180deg, rgba(26, 48, 76, 0.95), rgba(19, 37, 58, 0.92));
  color: #b8d4f0;
}

body[data-theme="dark"] .vehicle-fleet-table td {
  border-bottom-color: rgba(148, 196, 255, 0.12);
}

body[data-theme="dark"] .vehicle-fleet-table tbody tr:hover {
  background: rgba(148, 196, 255, 0.06);
}

.trip-ops-card--vehicle .vehicle-plate-title {
  font-family: "Roboto", "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
  color: #0d3f79;
  -webkit-line-clamp: 1;
}

.trip-ops-card--vehicle .vehicle-doc-date {
  font-size: 0.7rem;
  display: block;
  margin-top: 0.18rem;
}

.trip-ops-card--vehicle .trip-ops-card-item dd .status {
  font-size: 0.7rem;
  padding: 0.22rem 0.55rem;
}

.trip-ops-card--vehicle .vehicle-occupancy-note {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.14), rgba(var(--primary-rgb), 0.04));
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  color: #0d3f79;
}

.trip-ops-card--vehicle .vehicle-occupancy-note svg {
  color: var(--primary);
}

.trip-ops-card--vehicle-disponible::before {
  background: linear-gradient(90deg, color-mix(in srgb, var(--success) 85%, var(--primary) 15%), #2db987, #6ed4a8);
}

.trip-ops-card--vehicle-ocupado::before {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary-deeper) 55%, #c45d34 45%),
    color-mix(in srgb, var(--primary) 38%, #d97706 62%),
    color-mix(in srgb, var(--primary-mid) 55%, #fb923c 45%)
  );
}

.trip-ops-card--vehicle-reservado::before {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary-deeper) 45%, #4f46b5 55%),
    color-mix(in srgb, var(--primary) 40%, #6366f1 60%),
    color-mix(in srgb, var(--primary-mid) 50%, #a5b4fc 50%)
  );
}

.trip-ops-card--vehicle-no-disponible::before {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary-deeper) 35%, #b45309 65%),
    color-mix(in srgb, var(--warning) 70%, #d97706 30%),
    color-mix(in srgb, var(--warning) 45%, var(--brand-blue-mid) 55%)
  );
}

body[data-theme="dark"] .trip-ops-card--vehicle .vehicle-plate-title {
  color: #e6f1ff;
}

body[data-theme="dark"] .trip-ops-card--vehicle .vehicle-occupancy-note {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.28), rgba(var(--primary-rgb), 0.1));
  color: #dbeafe;
}

/* ── Tarjeta de camión (flota) — interfaz detallada ── */
.trip-ops-card--vehicle:not(.portal-ops-card) {
  gap: 0.8rem;
  padding: 1.05rem 1.1rem 0.9rem;
}

.trip-ops-card-head--vehicle {
  align-items: flex-start;
}

.trip-ops-card-head--vehicle .trip-ops-card-head-main {
  align-items: center;
  gap: 0.7rem;
}

.vehicle-plate-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 4.35rem;
  min-height: 3.35rem;
  padding: 0.35rem 0.28rem 0.32rem;
  border-radius: 10px;
  border: 2px solid #1a1a1a;
  background: linear-gradient(180deg, #fff9c4 0%, #ffeb3b 38%, #fdd835 72%, #f9a825 100%);
  box-shadow:
    0 2px 0 rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #0a0a0a;
}

.vehicle-plate-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.vehicle-plate-badge__icon svg {
  width: 0.95rem;
  height: 0.95rem;
  color: #0a0a0a;
}

.vehicle-plate-badge__text {
  display: block;
  margin-top: 0.12rem;
  font-family: "Roboto", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
}

.trip-ops-card-head--vehicle .trip-ops-card-kicker {
  margin-bottom: 0.18rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6b7f96;
}

.trip-ops-card--vehicle:not(.portal-ops-card) .vehicle-plate-title {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0d2f5c;
  -webkit-line-clamp: 2;
}

.vehicle-card-year {
  margin: 0.18rem 0 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
  color: #0d2f5c;
}

.vehicle-card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.vehicle-card-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  white-space: nowrap;
}

.vehicle-card-status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28);
  flex: 0 0 auto;
}

.vehicle-card-status-pill--disponible {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.28);
}

.vehicle-card-status-pill--ocupado {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.24);
}

.vehicle-card-status-pill--reservado {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.24);
}

.vehicle-card-status-pill--no-disponible {
  background: linear-gradient(135deg, #b45309, #d97706);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.24);
}

.vehicle-card-equip-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.08));
  color: #047857;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.vehicle-card-equip-pill__icon {
  font-size: 0.72rem;
  line-height: 1;
}

.vehicle-availability-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.68rem 0.8rem;
  border-radius: 12px;
  border: 1px solid transparent;
  min-width: 0;
}

.vehicle-availability-bar--disponible {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.06));
  border-color: rgba(16, 185, 129, 0.28);
}

.vehicle-availability-bar--ocupado {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.14), rgba(234, 88, 12, 0.06));
  border-color: rgba(234, 88, 12, 0.28);
}

.vehicle-availability-bar--reservado {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(99, 102, 241, 0.06));
  border-color: rgba(99, 102, 241, 0.28);
}

.vehicle-availability-bar--no-disponible {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.14), rgba(217, 119, 6, 0.06));
  border-color: rgba(217, 119, 6, 0.28);
}

.vehicle-availability-bar__main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1 1 auto;
}

.vehicle-availability-bar__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.vehicle-availability-bar--ocupado .vehicle-availability-bar__dot {
  background: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
}

.vehicle-availability-bar--reservado .vehicle-availability-bar__dot {
  background: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.vehicle-availability-bar--no-disponible .vehicle-availability-bar__dot {
  background: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18);
}

.vehicle-availability-bar__copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.vehicle-availability-bar__copy strong {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f5132;
  line-height: 1.2;
}

.vehicle-availability-bar--ocupado .vehicle-availability-bar__copy strong {
  color: #9a3412;
}

.vehicle-availability-bar--reservado .vehicle-availability-bar__copy strong {
  color: #3730a3;
}

.vehicle-availability-bar--no-disponible .vehicle-availability-bar__copy strong {
  color: #92400e;
}

.vehicle-availability-bar__detail {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-availability-bar__update {
  display: grid;
  gap: 0.12rem;
  justify-items: end;
  text-align: right;
  flex: 0 0 auto;
  min-width: 0;
}

.vehicle-availability-bar__update-label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.64rem;
  font-weight: 600;
  color: #6b7f96;
  white-space: nowrap;
}

.vehicle-availability-bar__update-label svg {
  width: 0.8rem;
  height: 0.8rem;
  flex: 0 0 auto;
}

.vehicle-availability-bar__update strong {
  font-size: 0.76rem;
  font-weight: 800;
  color: #0d2f5c;
  white-space: nowrap;
}

.vehicle-card-spec-grid {
  gap: 0.5rem;
}

.vehicle-card-spec-grid .trip-ops-card-item {
  background: #f8fafc;
  border-color: #edf1f5;
}

.trip-ops-card-item-value--ok {
  color: #16a34a !important;
}

.trip-ops-card-item-value--warn {
  color: #d97706 !important;
}

.trip-ops-card-item-value--alert {
  color: #dc2626 !important;
}

.vehicle-card-actions {
  padding-top: 0.1rem;
}

.vehicle-card-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.vehicle-card-actions-grid .trip-ops-card-btn {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.5rem 0.55rem;
  font-size: 0.74rem;
}

.vehicle-ops-cards {
  grid-template-columns: var(--ops-tile-grid, repeat(auto-fit, minmax(min(100%, 17.25rem), 19.5rem)));
  justify-content: start;
  justify-items: start;
}

@media (max-width: 520px) {
  .trip-ops-card-head--vehicle {
    flex-direction: column;
    align-items: stretch;
  }

  .vehicle-card-badges {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }

  .vehicle-availability-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .vehicle-availability-bar__update {
    justify-items: start;
    text-align: left;
  }

  .vehicle-card-actions-grid {
    grid-template-columns: 1fr;
  }
}

body[data-theme="dark"] .vehicle-plate-badge {
  border-color: #334155;
}

body[data-theme="dark"] .trip-ops-card--vehicle .vehicle-plate-title,
body[data-theme="dark"] .vehicle-card-year,
body[data-theme="dark"] .vehicle-availability-bar__update strong {
  color: #e6f1ff;
}

body[data-theme="dark"] .vehicle-card-spec-grid .trip-ops-card-item {
  background: rgba(15, 28, 46, 0.55);
  border-color: rgba(148, 196, 255, 0.12);
}

body[data-theme="dark"] .vehicle-availability-bar--disponible {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(16, 185, 129, 0.08));
  border-color: rgba(16, 185, 129, 0.28);
}

body[data-theme="dark"] .vehicle-availability-bar--disponible .vehicle-availability-bar__copy strong {
  color: #6ee7b7;
}

body[data-theme="dark"] .vehicle-card-equip-pill {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}

/* ── Tarjeta de conductor (flota) — interfaz detallada ── */
.trip-ops-card--driver:not(.portal-ops-card) {
  gap: 0.42rem;
  padding: 0.62rem 0.78rem 0.58rem 0.88rem;
}

.trip-ops-card-head--driver {
  align-items: flex-start;
}

.trip-ops-card-head--driver .trip-ops-card-head-main {
  align-items: center;
  gap: 0.7rem;
}

.trip-ops-card-head--driver .driver-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  color: #1e3a8a;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.trip-ops-card-head--driver .driver-avatar--photo {
  background: #eff6ff;
  padding: 0;
}

.trip-ops-card-head--driver .trip-ops-card-kicker {
  margin-bottom: 0.18rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6b7f96;
}

.trip-ops-card--driver .driver-card-title {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0d2f5c;
  -webkit-line-clamp: 2;
}

.driver-card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.driver-card-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  white-space: nowrap;
}

.driver-card-status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28);
  flex: 0 0 auto;
}

.driver-card-status-pill--available {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.28);
}

.driver-card-status-pill--busy {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.24);
}

.driver-card-status-pill--scheduled {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.24);
}

.driver-card-status-pill--offline {
  background: linear-gradient(135deg, #b45309, #d97706);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.24);
}

.driver-card-doc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.driver-card-doc-pill__icon svg {
  width: 0.75rem;
  height: 0.75rem;
  flex: 0 0 auto;
}

.driver-card-doc-pill--ok {
  color: #047857;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.08));
  border-color: rgba(16, 185, 129, 0.28);
}

.driver-card-doc-pill--warning {
  color: #b45309;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.08));
  border-color: rgba(245, 158, 11, 0.32);
}

.driver-card-doc-pill--missing {
  color: #92400e;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0.08));
  border-color: rgba(245, 158, 11, 0.28);
}

.driver-card-doc-pill--expired {
  color: #b91c1c;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(239, 68, 68, 0.08));
  border-color: rgba(239, 68, 68, 0.28);
}

.driver-trip-bar,
.driver-availability-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.68rem 0.8rem;
  border-radius: 12px;
  border: 1px solid transparent;
  min-width: 0;
}

.driver-trip-bar--available,
.driver-trip-bar--busy,
.driver-availability-bar--available,
.driver-availability-bar--busy {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.06));
  border-color: rgba(16, 185, 129, 0.28);
}

.driver-trip-bar--scheduled,
.driver-availability-bar--scheduled {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(99, 102, 241, 0.06));
  border-color: rgba(99, 102, 241, 0.28);
}

.driver-trip-bar--offline,
.driver-availability-bar--offline {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.14), rgba(217, 119, 6, 0.06));
  border-color: rgba(217, 119, 6, 0.28);
}

.driver-trip-bar__main,
.driver-availability-bar__main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1 1 auto;
}

.driver-trip-bar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: #16a34a;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.driver-trip-bar__icon svg {
  width: 1rem;
  height: 1rem;
}

.driver-trip-bar__copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.driver-trip-bar__copy strong {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f5132;
  line-height: 1.2;
}

.driver-trip-bar__copy span {
  font-size: 0.72rem;
  color: #64748b;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-trip-bar__map {
  flex: 0 0 auto;
  white-space: nowrap;
}

.driver-availability-bar__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.driver-availability-bar--busy .driver-availability-bar__dot {
  background: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
}

.driver-availability-bar--scheduled .driver-availability-bar__dot {
  background: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.driver-availability-bar--offline .driver-availability-bar__dot {
  background: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18);
}

.driver-availability-bar__copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.driver-availability-bar__copy strong {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f5132;
}

.driver-availability-bar--busy .driver-availability-bar__copy strong {
  color: #9a3412;
}

.driver-availability-bar--scheduled .driver-availability-bar__copy strong {
  color: #3730a3;
}

.driver-availability-bar--offline .driver-availability-bar__copy strong {
  color: #92400e;
}

.driver-availability-bar__detail {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.3;
}

.driver-card-spec-grid {
  gap: 0.5rem;
}

.driver-card-spec-grid .trip-ops-card-item {
  background: #f8fafc;
  border-color: #edf1f5;
}

.driver-card-spec-body {
  align-items: flex-start;
}

.driver-card-spec-body .trip-ops-card-item-icon {
  margin-top: 0.05rem;
}

.trip-ops-card-item-value-wrap {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
  flex: 1 1 auto;
}

.driver-card-spec-sub {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  color: #64748b;
}

.driver-card-spec-sub--ok {
  color: #16a34a;
}

.driver-card-spec-sub--warn {
  color: #d97706;
}

.driver-card-spec-sub--alert {
  color: #dc2626;
}

.driver-card-actions {
  padding-top: 0.1rem;
  gap: 0.45rem;
}

.driver-card-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.driver-card-actions-grid .trip-ops-card-btn,
.driver-card-status-btn {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.5rem 0.55rem;
  font-size: 0.74rem;
}

.drivers-ops-cards {
  grid-template-columns: var(--ops-tile-grid, repeat(auto-fit, minmax(min(100%, 17.25rem), 19.5rem)));
  justify-content: start;
  justify-items: start;
}

@media (max-width: 520px) {
  .trip-ops-card-head--driver {
    flex-direction: column;
    align-items: stretch;
  }

  .driver-card-badges {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }

  .driver-trip-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .driver-trip-bar__map {
    width: 100%;
  }

  .driver-card-actions-grid {
    grid-template-columns: 1fr;
  }
}

body[data-theme="dark"] .trip-ops-card--driver .driver-card-title {
  color: #e6f1ff;
}

body[data-theme="dark"] .trip-ops-card-head--driver .driver-avatar {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.28), rgba(37, 99, 235, 0.18));
  color: #bfdbfe;
}

body[data-theme="dark"] .driver-card-spec-grid .trip-ops-card-item {
  background: rgba(15, 28, 46, 0.55);
  border-color: rgba(148, 196, 255, 0.12);
}

body[data-theme="dark"] .driver-trip-bar--available,
body[data-theme="dark"] .driver-trip-bar--busy,
body[data-theme="dark"] .driver-availability-bar--available,
body[data-theme="dark"] .driver-availability-bar--busy {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(16, 185, 129, 0.08));
  border-color: rgba(16, 185, 129, 0.28);
}

body[data-theme="dark"] .driver-trip-bar__copy strong,
body[data-theme="dark"] .driver-availability-bar__copy strong {
  color: #6ee7b7;
}

.request-company-preview {
  margin-top: 0.55rem;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 11px;
  padding: 0.5rem 0.58rem;
  display: flex;
  align-items: center;
  gap: 0.52rem;
  background: color-mix(in srgb, var(--primary) 6%, var(--white));
}

.request-company-preview strong {
  display: block;
  font-size: 0.86rem;
  color: #123d70;
}

.request-company-preview p {
  margin: 0;
  font-size: 0.76rem;
}

.request-company-logo {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.2rem;
}

.request-company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.request-company-logo--fallback {
  background: linear-gradient(135deg, #377cc0, #2563a8);
  color: #fff;
  font-weight: 800;
}

.request-company-logo--sm {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0.15rem;
}

.trip-ops-cards {
  display: grid;
  grid-template-columns: var(--ops-tile-grid, repeat(auto-fill, minmax(min(100%, 17.25rem), 19.5rem)));
  justify-content: start;
  gap: var(--ops-cards-gap, 0.75rem);
  width: 100%;
  min-width: 0;
}

.trip-ops-card:not(.portal-ops-card) {
  position: relative;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  padding: 1.1rem 1.15rem 0.95rem;
  background: #ffffff;
  display: grid;
  gap: 0.85rem;
  box-shadow: 0 4px 18px rgba(15, 35, 70, 0.07), 0 1px 3px rgba(15, 35, 70, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  min-width: 0;
  overflow: hidden;
}

.trip-ops-card:not(.portal-ops-card)::before {
  display: block;
}

.trip-ops-card:not(.portal-ops-card):hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15, 35, 70, 0.11), 0 2px 6px rgba(15, 35, 70, 0.05);
  border-color: #d4e0ef;
}

.trip-ops-card:not(.portal-ops-card) .trip-ops-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.trip-ops-card:not(.portal-ops-card) .trip-ops-card-head-main {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 auto;
}

.trip-ops-card:not(.portal-ops-card) .trip-ops-card-head-info {
  min-width: 0;
  flex: 1 1 auto;
}

.trip-ops-card:not(.portal-ops-card) .trip-ops-card-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 800;
  color: #0d2f5c;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.request-ops-card-company-logo {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.trip-ops-card-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: #6b7f96;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.request-ops-card-meta {
  margin: 0.2rem 0 0;
  font-size: 0.74rem;
}

.trip-ops-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  max-width: 11rem;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  background: #1d63d3;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.trip-ops-card-badge-icon svg {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
}

.trip-ops-card-badge-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.trip-ops-card-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #28a745;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.trip-ops-card-status {
  flex: 0 0 auto;
  max-width: 9.5rem;
  font-size: 0.72rem;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.trip-ops-card-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  background: #f8f9fb;
  border: 1px solid #eef1f5;
  border-radius: 12px;
  min-width: 0;
}

.trip-ops-card-route-node {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  align-content: center;
}

.trip-ops-card-route-node--dest {
  text-align: right;
  justify-items: end;
}

.trip-ops-card-route-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #8a96a8;
}

.trip-ops-card-route-city {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  max-width: 100%;
}

.trip-ops-card-route-pin svg {
  width: 0.95rem;
  height: 0.95rem;
  color: #1d63d3;
  flex: 0 0 auto;
}

.trip-ops-card-route-node strong {
  font-size: 0.92rem;
  color: #152a44;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.trip-ops-card-route-connector {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-width: 2.4rem;
  max-width: 3.5rem;
  align-self: center;
}

.trip-ops-card-route-line {
  flex: 1 1 auto;
  border-top: 2px dotted #c8d2de;
  min-width: 0.75rem;
}

.trip-ops-card-route-arrow svg {
  width: 0.95rem;
  height: 0.95rem;
  color: #1d63d3;
}

.trip-ops-card-route-dot {
  display: none;
}

.trip-ops-card-route-arrow {
  display: inline-flex;
  align-items: center;
}

.trip-ops-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.trip-ops-card-item {
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 11px;
  background: #ffffff;
  border: 1px solid #e8edf3;
  min-width: 0;
}

.trip-ops-card-item-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  font-weight: 700;
  color: #8a96a8;
}

.trip-ops-card-item-body {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.trip-ops-card-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #e8f1fc;
  color: #1d63d3;
  flex: 0 0 auto;
}

.trip-ops-card-item-icon svg {
  width: 1rem;
  height: 1rem;
}

.trip-ops-card-item--value .trip-ops-card-item-icon {
  background: #e6f7ec;
  color: #28a745;
}

.trip-ops-card-item-value {
  font-size: 0.86rem;
  font-weight: 700;
  color: #152a44;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}

.trip-ops-card-item--value .trip-ops-card-item-value {
  color: #28a745;
  font-size: 0.92rem;
  font-weight: 800;
}

.trip-ops-card-item-chevron {
  display: inline-flex;
  align-items: center;
  color: #9aa8ba;
  flex: 0 0 auto;
}

.trip-ops-card-item-chevron svg {
  width: 0.85rem;
  height: 0.85rem;
}

.trip-ops-card-item dt {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
  color: color-mix(in srgb, var(--primary-deeper) 70%, #4a5c7a);
}

.trip-ops-card-item dt svg {
  width: 0.85rem;
  height: 0.85rem;
  color: var(--primary);
  flex: 0 0 auto;
}

.trip-ops-card-item dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #122a4d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.trip-ops-card-item--value dd {
  color: #0a6b3a;
  font-size: 0.92rem;
  font-weight: 800;
}

.trip-ops-card-standby {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0.08));
  border: 1px solid rgba(217, 119, 6, 0.35);
  font-size: 0.76rem;
  color: #7a3e00;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.trip-ops-card-standby > span:not(.request-ops-card-trip-ico) {
  min-width: 0;
  flex: 1 1 auto;
  display: block;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.trip-ops-card-standby strong {
  font-weight: 800;
  color: #6b3000;
}

.trip-ops-card-standby svg {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
}

.trip-ops-card-status-block {
  display: grid;
  gap: 0.45rem;
}

.trip-ops-card-status-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  color: #8a96a8;
}

.trip-ops-card-status-label svg {
  width: 0.85rem;
  height: 0.85rem;
  color: #1d63d3;
}

.trip-ops-card-status-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-radius: 11px;
  background: #edf4fc;
  border: 1px solid #c8daf0;
  min-width: 0;
}

.trip-ops-card-status-picker-leading svg {
  width: 0.95rem;
  height: 0.95rem;
  color: #1d63d3;
  flex: 0 0 auto;
}

.trip-ops-card-status-picker select.trip-status-select {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0 1.5rem 0 0;
  border: none;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0.86rem;
  font-weight: 700;
  color: #1d63d3;
  cursor: pointer;
}

.trip-ops-card-status-picker-chevron {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  pointer-events: none;
  color: #1d63d3;
}

.trip-ops-card-status-picker-chevron svg {
  width: 0.9rem;
  height: 0.9rem;
}

.trip-ops-card-status-picker-value {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1d63d3;
}

.trip-ops-card-actions {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.15rem;
}

.trip-ops-card-actions-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.trip-ops-card-actions-primary .trip-ops-card-btn {
  flex: 1 1 calc(33.333% - 0.35rem);
}

.trip-ops-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 0;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.48rem 0.55rem;
  line-height: 1.2;
}

.trip-ops-card-btn .btn-icon {
  width: 0.9rem;
  height: 0.9rem;
  min-width: 0.9rem;
}

.trip-ops-card-btn--outline {
  background: #ffffff;
  border: 1.5px solid #1d63d3;
  color: #1d63d3;
}

.trip-ops-card-btn--outline:hover {
  background: #f3f8ff;
}

.trip-ops-card-btn--solid {
  background: #1d63d3;
  border: 1.5px solid #1d63d3;
  color: #ffffff;
}

.trip-ops-card-btn--solid:hover {
  background: #1856b8;
  border-color: #1856b8;
}

.trip-ops-card-btn--soft {
  background: #f3f8ff;
  border: 1.5px solid #c8daf0;
  color: #1d63d3;
}

.trip-ops-card-btn--soft:hover {
  background: #e8f1fc;
}

.trip-ops-card-btn--danger {
  width: 100%;
  background: #fff5f5;
  border: 1.5px solid #f5c2c7;
  color: #dc3545;
}

.trip-ops-card-btn--danger:hover {
  background: #fde8ea;
  border-color: #f1aeb5;
}

.trip-ops-card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid #eef1f5;
  font-size: 0.72rem;
  color: #8a96a8;
  min-width: 0;
}

.trip-ops-card-foot-created {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.45;
}

.trip-ops-card-foot-created > span:last-child {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.trip-ops-card-foot-created svg {
  width: 0.85rem;
  height: 0.85rem;
  flex: 0 0 auto;
  margin-top: 0.12rem;
}

.trip-ops-card-actions.toolbar {
  justify-content: flex-start;
  gap: 0.4rem;
  flex-wrap: wrap;
  border-top: none;
}

.trip-ops-card-actions .btn:not(.trip-ops-card-btn) {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
}

@media (max-width: 768px) {
  .trip-ops-cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.5rem), 1fr));
  }
  .trip-ops-card {
    padding: 1rem;
  }
  .trip-ops-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trip-ops-card-actions-primary .trip-ops-card-btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 480px) {
  .trip-ops-card-grid {
    grid-template-columns: 1fr;
  }
  .trip-ops-card-route {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .trip-ops-card-route-node--dest {
    text-align: left;
    justify-items: start;
  }
  .trip-ops-card-route-connector {
    display: none;
  }
}

.company-logo-preview-wrap {
  display: grid;
  justify-items: start;
  gap: 0.35rem;
}

.company-logo-preview {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.24rem;
}

.company-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 999px;
}

.company-logo-preview--fallback {
  background: linear-gradient(135deg, #377cc0, #2563a8);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
}

.company-logo-form-label .company-logo-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;
}

.company-logo-picker-hint {
  display: block;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.company-logo-oval {
  position: relative;
  width: 128px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  background: #fff;
  box-shadow: 0 8px 18px rgba(9, 30, 66, 0.14);
  overflow: hidden;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.hr-employee-avatar-inner .company-logo-form-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 28rem;
  margin: 0 auto;
  gap: 0.35rem;
}

.hr-employee-avatar-inner .company-logo-form-label .field-label {
  justify-content: center;
}

.company-logo-oval--interactive {
  cursor: pointer;
  transition: box-shadow 0.18s ease;
}

.company-logo-oval--interactive:hover,
.company-logo-oval--interactive:focus-within {
  transform: none;
  box-shadow: 0 10px 22px rgba(9, 30, 66, 0.2);
}

.company-logo-oval-img {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: contain;
  border-radius: 50%;
  z-index: 0;
}

.company-logo-oval-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 72%, #1e3a5f), var(--primary-deeper, #1e4a7a));
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
}

.company-logo-oval-fallback svg {
  width: 32px;
  height: 32px;
  opacity: 0.92;
}

.company-logo-oval-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;
}

.company-logo-oval-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  padding: 0.35rem;
  text-align: center;
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.company-logo-oval-overlay-inner svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.company-logo-oval--interactive:hover .company-logo-oval-overlay,
.company-logo-form-label:focus-within .company-logo-oval--interactive .company-logo-oval-overlay {
  opacity: 1;
}

@media (hover: none) {
  .company-logo-oval--interactive .company-logo-oval-overlay {
    opacity: 0.65;
  }
}

body[data-theme="dark"] .company-logo-oval {
  background: #0f172a;
  border-color: color-mix(in srgb, var(--primary) 35%, rgba(148, 163, 184, 0.35));
}

.trip-rate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: -0.05rem;
}

.trip-rate-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary) 8%, var(--white));
}

.create-trip-price-field input {
  font-weight: 700;
  letter-spacing: 0.015em;
}

.create-trip-rate-guard {
  border: 1px dashed color-mix(in srgb, #ef4444 40%, var(--line));
  border-radius: 10px;
  padding: 0.7rem 0.78rem;
  background: color-mix(in srgb, #ef4444 6%, var(--white));
}

.create-trip-rate-guard-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.52rem;
  border: 1px solid color-mix(in srgb, #ef4444 40%, var(--line));
  background: color-mix(in srgb, #ef4444 14%, var(--white));
  color: #9f1239;
  font-weight: 700;
  font-size: 0.72rem;
}



body[data-theme="dark"] .create-trip-rate-guard {
  background: color-mix(in srgb, #ef4444 11%, transparent);
}

body[data-theme="dark"] .trip-status-select--pendiente {
  color: #fde68a;
  border-color: #c09039;
  background: linear-gradient(135deg, #5b4317, #6b4f17);
}

body[data-theme="dark"] .trip-status-select--aprobada_pendiente_asignacion,
body[data-theme="dark"] .trip-status-select--viaje_asignado,
body[data-theme="dark"] .trip-status-select--en_transito,
body[data-theme="dark"] .trip-status-select--espera_standby,
body[data-theme="dark"] .trip-status-select--completada,
body[data-theme="dark"] .trip-status-select--cerrada,
body[data-theme="dark"] .trip-status-select--cancelada,
body[data-theme="dark"] .trip-status-select--rechazada {
  color: #e8f4fc;
}

body[data-theme="dark"] .trip-status-select--aprobada_pendiente_asignacion {
  border-color: #3e88ca;
  background: linear-gradient(135deg, #173755, #1f4a72);
}

body[data-theme="dark"] .trip-status-select--viaje_asignado {
  border-color: #2f9c76;
  background: linear-gradient(135deg, #124533, #1a6147);
}

body[data-theme="dark"] .trip-status-select--en_transito {
  border-color: #3e82ca;
  background: linear-gradient(135deg, #173755, #1f4a72);
}

body[data-theme="dark"] .trip-status-select--espera_standby {
  border-color: #a5712a;
  background: linear-gradient(135deg, #5d4319, #6f4f1d);
}

body[data-theme="dark"] .trip-status-select--completada {
  border-color: #228da4;
  background: linear-gradient(135deg, #124555, #165868);
}

body[data-theme="dark"] .trip-status-select--cerrada {
  border-color: #4a5d72;
  background: linear-gradient(135deg, #273346, #1e2837);
}

body[data-theme="dark"] .trip-status-select--cancelada,
body[data-theme="dark"] .trip-status-select--rechazada {
  border-color: #c35d5d;
  background: linear-gradient(135deg, #6b2222, #7e2b2b);
}

body[data-theme="dark"] .trip-status-select option {
  color: #e2e8f0;
  background: #0f172a;
}

body[data-theme="dark"] .trips-table-wrap table thead th {
  color: #9fc3e6;
  border-bottom-color: color-mix(in srgb, var(--primary) 32%, #2a3f56);
}

body[data-theme="dark"] .trips-table-wrap table tbody tr {
  background: color-mix(in srgb, #0f172a 88%, var(--primary) 12%);
  box-shadow: 0 4px 16px rgba(2, 8, 20, 0.45);
}

body[data-theme="dark"] .trips-table-wrap table tbody td {
  border-top-color: color-mix(in srgb, var(--primary) 30%, #2a3f56);
  border-bottom-color: color-mix(in srgb, var(--primary) 30%, #2a3f56);
}

body[data-theme="dark"] .trips-table-wrap table tbody td:first-child {
  border-left-color: color-mix(in srgb, var(--primary) 30%, #2a3f56);
}

body[data-theme="dark"] .trips-table-wrap table tbody td:last-child {
  border-right-color: color-mix(in srgb, var(--primary) 30%, #2a3f56);
}

@media (max-width: 1366px) {
  .trips-table-wrap table {
    font-size: 0.82rem;
    table-layout: auto;
  }
  .trip-actions-stack {
    min-width: 9.8rem;
  }
  .trip-actions-toolbar .btn {
    padding: 0.34rem 0.5rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 1024px) {
  .trips-table-wrap table thead th,
  .trips-table-wrap table tbody td {
    padding: 0.56rem 0.48rem;
  }
  .trip-status-control select {
    min-height: 1.94rem;
    padding: 0.35rem 0.46rem;
    font-size: 0.8rem;
  }
  .trip-actions-stack {
    min-width: 8.6rem;
  }
  .request-actions-stack {
    min-width: 8.2rem;
  }
  .create-trip-surface {
    padding: 0.58rem;
  }
  .request-company-hub-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  }
}

@media (max-width: 768px) {
  .trip-actions-stack,
  .request-actions-stack {
    min-width: 0;
  }
  .trips-table-wrap table thead th:nth-child(8),
  .trips-table-wrap table tbody td:nth-child(8) {
    min-width: 9rem;
    width: 9rem;
  }
  .trips-table-wrap table thead th:nth-child(9),
  .trips-table-wrap table tbody td:nth-child(9),
  .trips-table-wrap.requests-table-wrap table thead th:nth-child(5),
  .trips-table-wrap.requests-table-wrap table tbody td:nth-child(5) {
    min-width: 10rem;
    width: 10rem;
  }
  .trip-actions-toolbar .btn {
    padding: 0.32rem 0.44rem;
    font-size: 0.7rem;
  }
}

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

.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-brand-logo {
  display: block;
  height: 64px;
  width: auto;
  max-width: 248px;
  object-fit: contain;
  margin: 0 0 0.55rem;
  user-select: none;
  -webkit-user-drag: none;
  filter:
    saturate(1.22)
    contrast(1.09)
    drop-shadow(0 3px 12px rgba(var(--primary-rgb), 0.35))
    drop-shadow(0 0 22px rgba(var(--primary-mid-rgb), 0.4));
}

@media (max-width: 540px) {
  .auth-modal-brand-logo {
    height: 52px;
    max-width: 200px;
  }
}

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

#auth-modal,
#auth-modal .modal-card-auth,
#auth-content {
  writing-mode: horizontal-tb;
  direction: ltr;
  unicode-bidi: isolate;
}

.auth-modal-heading {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  flex-wrap: wrap;
  min-width: 0;
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  font-weight: 700;
  color: var(--text-main, var(--text));
  line-height: 1.25;
}

.auth-modal-heading-icon {
  flex-shrink: 0;
}

.auth-modal-heading-text {
  flex: 1 1 12rem;
  min-width: 0;
}

#auth-modal .form-grid.auth-form,
#auth-modal .form-grid.auth-form-recover {
  grid-template-columns: 1fr;
}

#auth-modal .field-label {
  text-transform: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main, var(--text));
  letter-spacing: normal;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

#auth-modal .field-label svg {
  flex-shrink: 0;
}

#auth-modal .tab {
  word-break: normal;
  hyphens: manual;
  overflow-wrap: break-word;
}

.modal-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  min-width: 0;
}

.modal-head__copy {
  flex: 1 1 auto;
  min-width: 0;
}

.modal-head__copy h2 {
  margin: 0;
  line-height: 1.25;
}

.modal-head__subtitle {
  margin: 0.35rem 0 0;
}

#crud-modal .module-panel-actions--footer.modal-edit-actions .btn,
#crud-modal .module-panel-actions--footer.modal-edit-actions .module-panel-btn,
#crud-modal .detail-view-close-btn,
#crud-modal .module-panel-actions--footer.modal-edit-actions .module-panel-btn__label,
.modal-card-edit .module-panel-actions--footer.modal-edit-actions .btn,
.modal-card-edit .module-panel-actions--footer.modal-edit-actions .module-panel-btn,
.modal-card-edit .module-panel-actions--footer.modal-edit-actions .module-panel-btn__label {
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  min-width: 0;
  overflow: visible;
  text-overflow: unset;
  max-width: 100%;
}

#crud-modal .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--secondary,
#crud-modal .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary {
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.modal-head .module-panel-btn--close {
  flex: 0 0 auto;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.modal-body-lead {
  margin: 0 0 0.75rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.modal-reason-field {
  display: block;
  margin: 0 0 0.85rem;
}

.modal-reason-field > span {
  display: block;
  margin-bottom: 0.35rem;
}

.modal-reason-field textarea {
  width: 100%;
  box-sizing: border-box;
}

.modal-edit-actions.module-panel-actions {
  margin-top: 0.85rem;
}

#crud-form.p-form-colored.modal-edit-form .modal-edit-actions.module-panel-actions {
  margin-top: 0.75rem;
}

.modal-card--discard {
  width: min(440px, 92vw);
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #f59e0b 22%, var(--line));
  box-shadow:
    0 24px 48px rgba(7, 30, 61, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.modal-card--discard::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%);
}

.modal-discard {
  display: flex;
  flex-direction: column;
  padding: 0.35rem 1.35rem 1.35rem;
}

.modal-discard__top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.15rem;
}

.modal-discard__top .module-panel-btn--close {
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0.3rem;
  border-radius: 10px;
  border-color: transparent;
  background: transparent;
  color: var(--muted, #64748b);
  box-shadow: none;
}

.modal-discard__top .module-panel-btn--close:hover {
  color: var(--text, #0f172a);
  background: color-mix(in srgb, var(--line) 55%, transparent);
  border-color: color-mix(in srgb, var(--line) 80%, transparent);
}

.modal-discard__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  padding: 0.15rem 0.5rem 1.15rem;
}

.modal-discard__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid rgba(245, 158, 11, 0.28);
  box-shadow:
    0 4px 14px rgba(245, 158, 11, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: #d97706;
}

.modal-discard__icon .btn-icon {
  width: 1.45rem;
  height: 1.45rem;
  stroke-width: 2.25;
}

.modal-discard__title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text, #0f172a);
  letter-spacing: -0.01em;
}

.modal-discard__message {
  margin: 0;
  max-width: 34ch;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-soft, #64748b);
}

.modal-discard__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding-top: 0.15rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}

.modal-discard__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: 11px;
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.16s ease;
}

.modal-discard__btn .btn-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.modal-discard__btn--discard {
  order: 1;
  background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(185, 28, 28, 0.08);
}

.modal-discard__btn--discard:hover {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border-color: rgba(220, 38, 38, 0.45);
  color: #991b1b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 12px rgba(185, 28, 28, 0.14);
  transform: translateY(-1px);
}

.modal-discard__btn--keep {
  order: 2;
  min-height: 2.65rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.22);
}

.modal-discard__btn--keep:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.28);
}

.modal-discard__btn:active {
  transform: translateY(0) scale(0.985);
}

body[data-theme="dark"] .modal-card--discard {
  border-color: rgba(251, 191, 36, 0.22);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

body[data-theme="dark"] .modal-card--discard::before {
  background: linear-gradient(90deg, #b45309 0%, #f59e0b 50%, #b45309 100%);
}

body[data-theme="dark"] .modal-discard__icon {
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.55) 0%, rgba(69, 26, 3, 0.35) 100%);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .modal-discard__title {
  color: var(--text-main, #f1f5f9);
}

body[data-theme="dark"] .modal-discard__message {
  color: var(--muted, #94a3b8);
}

body[data-theme="dark"] .modal-discard__actions {
  border-top-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .modal-discard__btn--discard {
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.35) 0%, rgba(69, 10, 10, 0.45) 100%);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .modal-discard__btn--discard:hover {
  background: linear-gradient(180deg, rgba(153, 27, 27, 0.45) 0%, rgba(127, 29, 29, 0.5) 100%);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.45);
}

body[data-theme="dark"] .modal-discard__top .module-panel-btn--close:hover {
  color: #f1f5f9;
  background: rgba(148, 163, 184, 0.12);
}

@media (max-width: 480px) {
  .modal-discard__actions {
    grid-template-columns: 1fr;
  }

  .modal-discard__btn--keep {
    order: 1;
  }

  .modal-discard__btn--discard {
    order: 2;
  }
}

.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;
}

/* Modales de edición: mismas tarjetas de sección que solicitudes (`p-form-colored`). */
#crud-form.p-form-colored.modal-edit-form {
  margin-top: 0.85rem;
}

#crud-form.p-form-colored.modal-edit-form .modal-edit-actions {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
}

#crud-form.p-form-colored.modal-edit-form .form-section {
  margin: 0;
}

#crud-form.p-form-colored.modal-edit-form .modal-edit-custom-slot {
  grid-column: 1 / -1;
}

.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;
}

body[data-theme="dark"] .modal-edit-form .form-section-grid label:not(.route-rate-company-item):not(.route-rate-company-item-text) {
  background: rgba(15, 28, 46, 0.95);
  border-color: rgba(148, 196, 255, 0.18);
  color: #e2eaf6;
  box-shadow: 0 4px 12px rgba(2, 8, 18, 0.2);
}

body[data-theme="dark"] .modal-edit-form .form-section-grid label:not(.route-rate-company-item):not(.route-rate-company-item-text):focus-within {
  border-color: rgba(148, 196, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(99, 167, 247, 0.15);
}

body[data-theme="dark"] .modal-edit-form label > span,
body[data-theme="dark"] .modal-edit-form .modal-field-label {
  color: #b8d4f0;
}

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

body[data-theme="dark"] #crud-form.p-form-colored.modal-edit-form > label:not(.route-rate-company-item):not(.route-rate-company-item-text) {
  background: rgba(15, 28, 46, 0.95);
  border-color: rgba(148, 196, 255, 0.18);
  color: #e2eaf6;
}

/* ── Mejoras visuales formularios editar / visualizar ── */
#crud-form.p-form-colored.modal-edit-form .form-section {
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary, #377cc0) 14%, #e2e8f0);
  background: linear-gradient(145deg, rgba(255,255,255,0.99), rgba(248,250,252,0.95));
  box-shadow: 0 2px 8px rgba(15,23,42,0.04), 0 1px 2px rgba(15,23,42,0.05);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
  margin: 0;
}

#crud-form.p-form-colored.modal-edit-form .form-section:hover {
  box-shadow: 0 4px 16px rgba(15,23,42,0.06), 0 2px 4px rgba(55,124,192,0.08);
}

#crud-form.p-form-colored.modal-edit-form .form-section legend {
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary, #377cc0);
  padding: 0.6rem 1rem 0.45rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary, #377cc0) 8%, transparent), transparent 85%);
  width: 100%;
  border-bottom: 1px solid color-mix(in srgb, var(--primary, #377cc0) 10%, #e2e8f0);
  margin: 0;
}

.modal-edit-form label > span:first-child {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
  margin-bottom: 0.28rem;
}

.modal-edit-form label:focus-within > span:first-child {
  color: var(--primary, #377cc0);
}

.modal-edit-form input:not([type="checkbox"]):not([type="radio"]),
.modal-edit-form select,
.modal-edit-form textarea {
  border-radius: 9px;
  border: 1.5px solid #e2e8f0;
  background: rgba(255,255,255,0.94);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.modal-edit-form input:not([type="checkbox"]):not([type="radio"]):focus,
.modal-edit-form select:focus,
.modal-edit-form textarea:focus {
  border-color: var(--primary, #377cc0);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #377cc0) 16%, transparent);
  background: #fff;
  outline: none;
}

.modal-edit-form input[readonly],
.modal-edit-form input[disabled],
.modal-edit-form select[disabled] {
  background: color-mix(in srgb, #f1f5f9 88%, transparent);
  color: #94a3b8;
  cursor: not-allowed;
  border-color: #e2e8f0;
}

.modal-file-attach-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.modal-file-attach-actions .modal-attach-filename {
  flex: 1 1 12rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-edit-actions:not(.module-panel-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: 2147483647;
  isolation: isolate;
  display: grid;
  gap: 0.75rem;
  width: min(400px, calc(100vw - 1.5rem));
  pointer-events: none;
}

.toast-container .toast {
  pointer-events: auto;
}

.toast {
  --toast-accent: #38bdf8;
  --toast-icon-bg: rgba(56, 189, 248, 0.14);
  --toast-icon-fg: #0284c7;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 0.75rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 251, 255, 0.96) 100%);
  color: var(--text);
  box-shadow:
    0 16px 40px rgba(var(--primary-rgb), 0.14),
    0 2px 8px rgba(11, 33, 56, 0.06);
  padding: 0.9rem 0.85rem 0.95rem 0.95rem;
  opacity: 0;
  transform: translateX(1.25rem) scale(0.97);
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body[data-theme="dark"] .toast {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(18, 34, 54, 0.96) 0%, rgba(12, 26, 42, 0.98) 100%);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

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

.toast.toast-hide {
  opacity: 0;
  transform: translateX(0.75rem) scale(0.98);
}

.toast-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--toast-accent);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: 0.05rem;
  border-radius: 999px;
  background: var(--toast-icon-bg);
  color: var(--toast-icon-fg);
  flex-shrink: 0;
}

.toast-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.toast-body {
  min-width: 0;
  padding-top: 0.05rem;
}

.toast-title {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--toast-icon-fg);
}

.toast-message {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  word-break: break-word;
}

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

.toast-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: -0.15rem -0.1rem 0 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.toast-close svg {
  width: 0.95rem;
  height: 0.95rem;
}

.toast-close:hover {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--text);
}

body[data-theme="dark"] .toast-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  transform-origin: left center;
  background: var(--toast-accent);
  opacity: 0.55;
  animation: toast-progress-shrink var(--toast-duration, 3200ms) linear forwards;
}

@keyframes toast-progress-shrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.toast-success {
  --toast-accent: #22c55e;
  --toast-icon-bg: rgba(34, 197, 94, 0.14);
  --toast-icon-fg: #15803d;
}

body[data-theme="dark"] .toast-success {
  --toast-icon-bg: rgba(34, 197, 94, 0.18);
  --toast-icon-fg: #4ade80;
}

.toast-error {
  --toast-accent: #ef4444;
  --toast-icon-bg: rgba(239, 68, 68, 0.14);
  --toast-icon-fg: #b91c1c;
}

body[data-theme="dark"] .toast-error {
  --toast-icon-bg: rgba(239, 68, 68, 0.2);
  --toast-icon-fg: #f87171;
}

.toast-info {
  --toast-accent: #38bdf8;
  --toast-icon-bg: rgba(56, 189, 248, 0.14);
  --toast-icon-fg: #0369a1;
}

body[data-theme="dark"] .toast-info {
  --toast-icon-bg: rgba(56, 189, 248, 0.18);
  --toast-icon-fg: #7dd3fc;
}

.toast-warn {
  --toast-accent: #f59e0b;
  --toast-icon-bg: rgba(245, 158, 11, 0.16);
  --toast-icon-fg: #b45309;
}

body[data-theme="dark"] .toast-warn {
  --toast-icon-bg: rgba(245, 158, 11, 0.2);
  --toast-icon-fg: #fbbf24;
}

@media (max-width: 480px) {
  .toast-container {
    top: auto;
    bottom: 1rem;
    right: 50%;
    transform: translateX(50%);
    width: min(400px, calc(100vw - 1.25rem));
  }

  .toast {
    transform: translateY(1rem) scale(0.97);
  }

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

  .toast.toast-hide {
    transform: translateY(0.5rem) scale(0.98);
  }
}

/* Aviso tras cierre por inactividad (sustituye toast en sitio público) */
.session-idle-banner {
  position: sticky;
  top: 0;
  z-index: 120;
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12) 0%, rgba(255, 255, 255, 0.96) 100%);
  box-shadow: var(--shadow-card);
}

body[data-theme="dark"] .session-idle-banner {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.22) 0%, rgba(15, 28, 46, 0.96) 100%);
}

.session-idle-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.session-idle-banner-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.session-idle-banner-hint {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  max-width: 42rem;
}

.session-idle-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.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-register-success-banner {
  position: relative;
  margin: 0 0 1rem;
  padding: 1rem 2.25rem 1rem 1rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, #1b8e5f 35%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, #1b8e5f 12%, #ffffff) 0%, #f5fdf9 100%);
  box-shadow: 0 8px 22px rgba(15, 80, 50, 0.08);
}

.auth-register-success-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f3d28;
}

.auth-register-success-body {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #163423;
}

.auth-register-success-email {
  margin: 0.35rem 0 0.35rem;
  font-size: 0.88rem;
}

.auth-register-success-hint {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.auth-register-success-dismiss {
  position: absolute;
  top: 0.4rem;
  right: 0.45rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 251, 255, 0.92));
  color: #0f3d28;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(var(--primary-rgb), 0.08);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.16s ease;
}

.auth-register-success-dismiss:hover {
  background: linear-gradient(180deg, #ffffff, #eef6ff);
  border-color: color-mix(in srgb, var(--primary) 32%, transparent);
  box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-1px);
}

body[data-theme="dark"] .auth-register-success-banner {
  background: linear-gradient(135deg, color-mix(in srgb, #1b8e5f 22%, #0f1f34) 0%, #0f1f34 100%);
  border-color: color-mix(in srgb, #1b8e5f 45%, #334155);
}

body[data-theme="dark"] .auth-register-success-title {
  color: #e8fdf3;
}

body[data-theme="dark"] .auth-register-success-body {
  color: #d1e8dd;
}

body[data-theme="dark"] .auth-register-success-dismiss {
  color: #e8fdf3;
  background: linear-gradient(180deg, rgba(31, 54, 79, 0.95), rgba(20, 38, 58, 0.96));
  border-color: rgba(148, 196, 255, 0.2);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .auth-register-success-dismiss:hover {
  background: linear-gradient(180deg, rgba(40, 68, 98, 0.98), rgba(24, 45, 67, 0.98));
  border-color: rgba(148, 196, 255, 0.32);
}

.users-pending-redirect {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0.75rem 0 1.1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--line));
  background: color-mix(in srgb, var(--primary) 6%, var(--module-soft-bg, #f5f9ff));
}

.users-pending-redirect-text {
  margin: 0;
  flex: 1 1 200px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-embedded-pending-users {
  margin-top: 0.25rem;
}

.auth-transport-assign-note {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-transport-assign-note a {
  font-weight: 600;
}

.admin-queue-redirect .auth-central-redirect-lead {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

body[data-theme="dark"] .users-pending-redirect {
  background: color-mix(in srgb, var(--primary) 14%, #0f1f34);
  border-color: color-mix(in srgb, #5a73d4 50%, #334155);
}

.auth-pane {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 68%, #eef6ff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 12px 28px rgba(var(--primary-rgb), 0.08);
}

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

#form-register.auth-register-form {
  --reg-control-h: 2.75rem;
  align-items: start;
}

#form-register .register-kind-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

#form-register .register-kind-label {
  font-weight: 650;
  font-size: 0.92rem;
}

#form-register .register-kind-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

#form-register .register-kind-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body[data-theme="dark"] #form-register .register-kind-option {
  background: rgba(14, 28, 48, 0.55);
  border-color: rgba(129, 187, 255, 0.28);
}

#form-register .register-kind-option:has(input:checked) {
  border-color: var(--accent, var(--brand-blue-mid));
  box-shadow: 0 0 0 2px rgba(var(--primary-mid-rgb), 0.18);
}

#form-register .register-kind-option input {
  accent-color: var(--accent, var(--brand-blue-mid));
}

#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);
}

.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;
}

.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;
}

.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;
}

.phone-field-register,
.phone-field-b2b {
  min-width: 0;
}

#b2b-form .phone-input-professional .phone-cc-select {
  align-self: stretch;
  min-height: 2.75rem;
}

.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(var(--primary-rgb), 0.08), rgba(var(--primary-rgb), 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(var(--primary-rgb), 0.08), rgba(var(--primary-rgb), 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.95rem 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(var(--primary-rgb), 0.08), rgba(var(--primary-rgb), 0.03)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%23377cc0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 0.4rem center;
  background-size: 100% 100%, 1.05rem 1.05rem;
  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;
}

.phone-input-professional .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: 2.75rem;
  font: inherit;
  background: transparent;
  text-transform: none !important;
  letter-spacing: normal !important;
}

#form-register.auth-register-form .phone-input-professional .phone-national-input {
  min-height: 0 !important;
  height: 100% !important;
  align-self: stretch;
}

.phone-input-professional .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;
}

.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;
}

.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: minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  min-width: 0;
}

.auth-login-shell > .auth-form,
.auth-login-shell > .auth-login-side {
  min-width: 0;
}

.auth-login-side {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f9fcff, #eef6ff);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 10px 24px rgba(var(--primary-rgb), 0.07);
}

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

.auth-side-heading {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  min-width: 0;
}

.auth-side-heading-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.auth-side-heading-icon svg {
  display: block;
}

.auth-side-heading-text {
  flex: 1 1 10rem;
  min-width: 0;
  line-height: 1.3;
}

.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(var(--primary-rgb), 0.2);
  background: rgba(var(--primary-rgb), 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-modal .btn {
  border-radius: 10px;
}

#auth-modal .btn.full,
#auth-modal .auth-form button[type="submit"] {
  min-height: 2.85rem;
  justify-content: center;
}

#auth-modal .auth-password-row .btn,
#auth-modal .password-field .btn {
  min-height: 2.75rem;
  padding-inline: 0.85rem;
}

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

[data-login-submit] {
  position: relative;
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

[data-login-submit] .auth-submit-content {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  justify-content: center;
}

[data-login-submit] .auth-submit-icon {
  display: inline-flex;
  align-items: center;
}

[data-login-submit] .auth-submit-spinner {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

[data-login-submit] .auth-submit-spinner::before {
  content: "";
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  animation: b2b-spin 0.7s linear infinite;
}

[data-login-submit].is-loading {
  cursor: progress;
  opacity: 0.92;
}

[data-login-submit].is-loading .auth-submit-content {
  visibility: hidden;
}

[data-login-submit].is-loading .auth-submit-spinner {
  display: flex;
}

[data-login-submit][disabled]:not(.is-loading) {
  opacity: 0.7;
  cursor: not-allowed;
}

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

.auth-register-form input.auth-password-input.password-match-ok {
  border-color: #2d9d62 !important;
  box-shadow: 0 0 0 3px rgba(45, 157, 98, 0.16) !important;
}

.auth-register-form input.auth-password-input.password-match-bad {
  border-color: #d64545 !important;
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.16) !important;
}

#form-recover-complete .auth-input-control.password-match-ok {
  border-color: #2d9d62 !important;
  box-shadow: 0 0 0 3px rgba(45, 157, 98, 0.16) !important;
}

#form-recover-complete .auth-input-control.password-match-bad {
  border-color: #d64545 !important;
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.16) !important;
}

.register-password-match-hint {
  font-size: 0.75rem;
}

.register-terms-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: linear-gradient(180deg, #f9fcff 0%, #f3f9ff 100%);
}

.register-terms-title {
  display: block;
  font-weight: 700;
  color: var(--text-main);
}

.register-terms-copy {
  display: block;
  font-size: 0.79rem;
  line-height: 1.45;
  margin-top: 0.15rem;
}

.register-terms-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.register-terms-link:hover {
  color: var(--primary-dark);
}

.register-terms-check {
  display: flex;
  width: 100%;
  margin-top: 0.5rem;
  justify-content: center;
  align-items: flex-start;
  gap: 0.45rem;
  flex-wrap: wrap;
  text-align: center;
}

.register-terms-check input[type="checkbox"] {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.auth-field-stack {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.auth-remember-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0.15rem 0 0.25rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.auth-remember-check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.45rem;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 500;
  cursor: pointer;
}

.auth-remember-check > span:last-child {
  min-width: 0;
  word-break: normal;
  overflow-wrap: break-word;
}

.auth-remember-check input[type="checkbox"] {
  margin-top: 0.12rem;
}

.auth-remember-hint {
  display: block;
  margin: 0;
  padding-left: 1.55rem;
  font-size: 0.78rem;
  line-height: 1.35;
  min-width: 0;
  word-break: normal;
  overflow-wrap: break-word;
}

.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(var(--primary-rgb), 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(var(--primary-rgb), 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 {
  margin: 0.15rem 0 0;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary, var(--brand-blue-deep)) 22%, var(--line, #dbe7f3) 78%);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary, var(--brand-blue-deep)) 7%, #ffffff 93%) 0%,
    color-mix(in srgb, var(--brand-blue-mid) 5%, #f8fafc 95%) 100%
  );
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.auth-recover-hint-inner {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.85rem 1rem 0.95rem 0.95rem;
  border-left: 4px solid color-mix(in srgb, var(--primary, var(--brand-blue-deep)) 85%, var(--brand-blue-mid) 15%);
}

.auth-recover-hint-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--primary, var(--brand-blue-deep));
  background: color-mix(in srgb, var(--primary, var(--brand-blue-deep)) 12%, #ffffff 88%);
  border: 1px solid color-mix(in srgb, var(--primary, var(--brand-blue-deep)) 18%, transparent);
}

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

.auth-recover-hint-body {
  min-width: 0;
  flex: 1;
}

.auth-recover-hint-title {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text, #0f172a);
  line-height: 1.35;
}

.auth-recover-hint-text {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--text, #334155) 88%, var(--muted, #64748b) 12%);
}

.auth-recover-hint-text:last-child {
  margin-bottom: 0;
}

.auth-recover-actions {
  margin-top: 0.35rem;
}

.turnstile-row {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0 0.2rem;
  min-height: 65px;
}

.turnstile-shell {
  width: 100%;
  max-width: 356px;
  display: grid;
  gap: 0.55rem;
  padding: 0.72rem 0.82rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 6px 20px rgba(24, 78, 143, 0.06);
}

.turnstile-shell-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 auto;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.09);
  color: #1f4d81;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.turnstile-row .cf-turnstile {
  width: 100%;
  max-width: 320px;
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

body[data-theme="dark"] .turnstile-shell {
  border-color: #476b93;
  background: linear-gradient(180deg, rgba(20, 41, 67, 0.96) 0%, rgba(16, 32, 53, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .turnstile-shell-label {
  background: rgba(117, 176, 244, 0.14);
  color: #b6ddff;
}

.auth-form-recover .auth-recover-actions .auth-recover-submit {
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary, var(--brand-blue-deep)) 28%, transparent);
}

.auth-form-recover .auth-recover-actions .auth-recover-submit:hover {
  box-shadow: 0 6px 20px color-mix(in srgb, var(--primary, var(--brand-blue-deep)) 35%, transparent);
  filter: brightness(1.02);
}

@media (prefers-reduced-motion: reduce) {
  .auth-form-recover .auth-recover-actions .auth-recover-submit:hover {
    filter: none;
  }
}

.password-strength-suite {
  margin-top: 0.55rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--primary-rgb), 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, var(--brand-blue-deep) 0%, var(--accent, #5cabdf) 50%, var(--brand-blue-mid) 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: var(--primary-dark);
  background: rgba(var(--primary-rgb), 0.14);
  border-color: rgba(var(--primary-rgb), 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: linear-gradient(180deg, #f5f9fd, #edf4fb);
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.06);
}

.tab {
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary-dark);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.16s ease;
}

.tab:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
  border-color: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary);
  transform: translateY(-1px);
}

.tab.active {
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  color: var(--white);
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

@media (max-width: 720px) {
  #auth-modal.modal {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(0.45rem, env(safe-area-inset-top, 0px)) max(0.45rem, env(safe-area-inset-right, 0px))
      max(0.45rem, env(safe-area-inset-bottom, 0px)) max(0.45rem, env(safe-area-inset-left, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .modal-card-auth {
    width: 100%;
    max-width: 100%;
    max-height: none;
    margin: 0 auto;
    padding: 1rem 0.85rem 1.05rem;
    border-radius: 16px;
  }

  .modal-card-auth .modal-head {
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .modal-card-auth .modal-head .btn-text {
    margin-left: auto;
    flex-shrink: 0;
  }

  .auth-modal-title-wrap {
    min-width: 0;
    flex: 1 1 10rem;
  }

  .modal-card-auth .modal-head .auth-modal-heading {
    font-size: clamp(0.92rem, 4.2vw, 1.12rem);
    line-height: 1.28;
  }

  .auth-modal-subtitle {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  #auth-modal .tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;
    margin-bottom: 0.65rem;
    padding: 0.25rem;
  }

  #auth-modal .tab {
    padding: 0.48rem 0.3rem;
    font-size: 0.76rem;
    line-height: 1.25;
    text-align: center;
    min-height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    word-break: normal;
    hyphens: none;
    overflow-wrap: break-word;
  }

  #auth-content {
    margin-top: 0.2rem;
    padding-right: 0;
  }

  .auth-header-premium h3 {
    font-size: 0.98rem;
  }

  .auth-header-premium .muted {
    font-size: 0.8rem;
  }

  .auth-login-side {
    padding: 0.75rem 0.8rem;
  }

  .auth-login-side h3 {
    font-size: 0.9rem;
  }

  .auth-bullets {
    font-size: 0.78rem;
  }

  .auth-help {
    font-size: 0.8rem;
    padding: 0.5rem 0.65rem;
  }

  .auth-pane {
    padding: 0.85rem 0.8rem;
  }

  .auth-form,
  .auth-form-recover {
    gap: 0.65rem;
  }

  #form-register.auth-register-form {
    grid-template-columns: 1fr !important;
  }

  .auth-register-form .register-doc-section {
    grid-template-columns: 1fr;
  }

  .auth-register-form #register-doc-empresa.register-doc-block--empresa {
    grid-template-columns: 1fr;
  }

  .auth-register-success-banner {
    padding: 0.8rem 1.85rem 0.85rem 0.8rem;
  }

  .auth-recover-hint-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .auth-recover-hint-icon {
    width: auto;
  }

  .password-strength-suite {
    padding: 0.62rem 0.68rem;
  }

  .password-rule-grid {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .password-strength-meta {
    min-width: 0;
  }

  .auth-password-row .auth-input-row {
    min-width: 0;
    flex: 1 1 100%;
  }

  .auth-password-row .btn.btn-action {
    flex: 1 1 auto;
    min-width: min(100%, 8rem);
  }

  #form-register .phone-input-professional {
    flex-wrap: wrap;
    height: auto;
    min-height: 2.75rem;
    overflow: visible;
  }

  #form-register .phone-input-professional .phone-reg-flag-slot {
    flex: 0 0 auto;
  }

  #form-register .phone-input-professional .phone-cc-select {
    flex: 1 1 5.5rem;
    min-width: min(100%, 5.5rem);
    max-width: none;
  }

  #form-register .phone-input-professional .phone-national-input {
    flex: 1 1 100%;
    min-height: 2.65rem;
    height: auto !important;
  }

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

.b2b-leads-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.b2b-leads-toolbar-hint {
  flex: 1 1 14rem;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.42;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.b2b-leads-live-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.71rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 40, 40, 0.35);
  color: #8b1f1f;
  background: rgba(214, 40, 40, 0.08);
}

.b2b-leads-live-pill--ok {
  border-color: rgba(34, 197, 94, 0.45);
  color: #136536;
  background: rgba(34, 197, 94, 0.1);
}

.b2b-leads-loading {
  display: flex;
  gap: 0.95rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px dashed rgba(var(--primary-rgb), 0.35);
  background: linear-gradient(120deg, #f8fbff 0%, #eef6ff 100%);
}

.b2b-leads-spinner {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  border: 3px solid rgba(var(--primary-rgb), 0.15);
  border-top-color: var(--primary);
  animation: b2b-spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.b2b-leads-loading-text {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
}

.b2b-leads-loading-text strong {
  font-size: 0.95rem;
}

.b2b-leads-mosaic {
  display: grid;
  grid-template-columns: var(--ops-tile-grid, repeat(auto-fill, minmax(min(100%, 17.25rem), 19.5rem)));
  justify-content: start;
  gap: var(--ops-cards-gap, 0.75rem);
}

.b2b-leads-card {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  background: linear-gradient(175deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 4px 18px rgba(15, 35, 70, 0.07), 0 1px 3px rgba(15, 35, 70, 0.04);
  padding: 0.55rem 0.72rem 0.5rem;
  overflow: hidden;
  min-height: 0;
}

.b2b-leads-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
}

.b2b-accent-a::before {
  background: linear-gradient(180deg, var(--brand-blue-mid), var(--primary));
}

.b2b-accent-b::before {
  background: linear-gradient(180deg, var(--brand-blue-deep), var(--primary-dark));
}

.b2b-accent-c::before {
  background: linear-gradient(180deg, var(--brand-blue-soft), var(--brand-blue-mid));
}

.b2b-leads-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.72rem;
}

.b2b-leads-card-identity {
  display: flex;
  gap: 0.55rem;
  min-width: 0;
}

.b2b-leads-avatar {
  flex-shrink: 0;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary-dark);
  background: linear-gradient(140deg, #e8f3fc, #d9ebfa);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.b2b-leads-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.28;
}

.b2b-leads-company {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
}

.b2b-leads-chip-row {
  margin-top: 0.42rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.b2b-chip {
  font-size: 0.71rem;
  font-weight: 700;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary-dark);
  border: 1px solid rgba(var(--primary-rgb), 0.15);
}

.b2b-chip-strong {
  background: rgba(var(--primary-rgb), 0.16);
}

.b2b-leads-when {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-soft);
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.05);
}

.b2b-leads-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.85rem;
  margin: 0;
  padding: 0.55rem 0 0;
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
}

.b2b-leads-meta div {
  min-width: 0;
}

.b2b-leads-meta dt {
  margin: 0;
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
}

.b2b-leads-meta dd {
  margin: 0.12rem 0 0;
  font-size: 0.82rem;
  line-height: 1.38;
}

.b2b-leads-meta > div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.b2b-leads-link {
  font-weight: 700;
  color: var(--primary);
  word-break: break-word;
}

.b2b-leads-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.b2b-leads-brief {
  margin-top: 0.72rem;
  padding: 0.68rem 0.74rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.b2b-leads-brief-title {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.b2b-leads-brief-body {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-main);
}

.b2b-leads-footer-footnote {
  margin: 1rem 0 0;
  font-size: 0.78rem;
}

@media (max-width: 620px) {
  .b2b-leads-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .b2b-leads-meta > div:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

body[data-theme="dark"] .b2b-leads-loading {
  background: linear-gradient(120deg, rgba(var(--primary-rgb), 0.12), rgba(15, 23, 42, 0.65));
  border-color: rgba(148, 163, 184, 0.25);
}

body[data-theme="dark"] .b2b-leads-live-pill {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
}

body[data-theme="dark"] .b2b-leads-live-pill--ok {
  border-color: rgba(52, 211, 153, 0.55);
  color: #86efac;
  background: rgba(16, 185, 129, 0.12);
}

body[data-theme="dark"] .b2b-leads-card {
  background: linear-gradient(175deg, rgba(22, 32, 54, 0.98), rgba(15, 23, 42, 0.95));
  border-color: rgba(148, 163, 184, 0.2);
}

body[data-theme="dark"] .b2b-leads-avatar {
  background: linear-gradient(140deg, rgba(var(--primary-rgb), 0.35), rgba(30, 64, 175, 0.25));
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.25);
}

body[data-theme="dark"] .b2b-chip {
  background: rgba(59, 130, 246, 0.12);
  color: #bae6fd;
  border-color: rgba(148, 163, 184, 0.25);
}

body[data-theme="dark"] .b2b-chip-strong {
  background: rgba(59, 130, 246, 0.28);
}

body[data-theme="dark"] .b2b-leads-when {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

body[data-theme="dark"] .b2b-leads-brief {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
}

@media (max-width: 900px) {
  .auth-login-shell {
    grid-template-columns: 1fr;
  }
}

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

/* Cinta superior con degradado de marca */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    #1d4f86 0%,
    #377cc0 28%,
    #7db4e8 55%,
    #c4e0fa 78%,
    transparent 100%
  );
  z-index: 2;
}

/* Resplandores suaves para dar profundidad al fondo */
.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(420px 260px at 10% -5%, rgba(125, 180, 232, 0.16), transparent 70%),
    radial-gradient(560px 340px at 92% 115%, rgba(55, 124, 192, 0.14), transparent 72%);
}

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

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.25rem);
  align-items: start;
}

@media (min-width: 880px) {
  .footer-grid {
    grid-template-columns: minmax(280px, 1.35fr) minmax(140px, 0.75fr) minmax(140px, 0.75fr);
    align-items: start;
    gap: clamp(2rem, 4vw, 3rem);
  }

  .footer-brand-logo-wrap {
    width: min(100%, 300px);
  }

  .footer-brand-copy,
  .footer-brand-contact {
    max-width: 24rem;
  }
}

.footer-col-brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0;
  width: 100%;
}

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

/* Placa clara para el logo: el PNG recortado (fondo transparente, azules de marca)
   gana tamaño y legibilidad sobre una superficie luminosa con borde degradado. */
.footer-brand-logo-wrap {
  display: block;
  flex: 0 0 auto;
  width: min(100%, 280px);
  min-width: 0;
  line-height: 0;
  padding: 0.9rem 1.25rem;
  border-radius: 16px;
  background: linear-gradient(160deg, #ffffff 0%, #eaf3fc 100%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 14px 30px rgba(2, 14, 28, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.footer-brand-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left center;
  user-select: none;
  -webkit-user-drag: none;
}

.footer-brand-copy {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 22rem;
}

.footer-brand-copy p {
  margin: 0;
  font-size: clamp(0.95rem, 1.35vw, 1.08rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.footer-brand-contact {
  margin-top: 1.25rem;
  max-width: 22rem;
}

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

.site-footer h4 {
  position: relative;
  display: inline-block;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1.1rem;
  padding-bottom: 0.55rem;
}

.site-footer h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.2rem;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent, #7db4e8), transparent);
}

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

/* Enlaces legales: el color por defecto del <a> no hereda bien del párrafo */
.site-footer p a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 0.18em;
}

.site-footer p a:hover {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.65);
}

.site-footer p a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Listas de enlaces del footer (mapa del sitio + legal) */
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-links a {
  position: relative;
  display: inline-block;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  text-decoration: none;
  padding-left: 0;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent, #7db4e8);
  transform: translateY(-50%);
  transition: width 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #ffffff;
  padding-left: 0.85rem;
}

.footer-links a:hover::before,
.footer-links a:focus-visible::before {
  width: 0.55rem;
}

.footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Lista de datos de contacto */
.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  line-height: 1.45;
}

.footer-contact-item a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-contact-item a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.footer-contact-icon {
  width: 32px;
  height: 32px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(125, 180, 232, 0.12);
  border: 1px solid rgba(125, 180, 232, 0.25);
  color: var(--accent, #7db4e8);
  flex: 0 0 auto;
  box-sizing: border-box;
}

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

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, box-shadow 0.2s ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  transform: translateY(-3px);
  background: linear-gradient(135deg, var(--primary, #377cc0), var(--accent, #7db4e8));
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(55, 124, 192, 0.35);
}

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

/* "Carretera" divisoria: línea discontinua con un camión que la recorre */
.footer-bottom {
  position: relative;
  margin-top: 3rem;
  padding: 1.2rem 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

.footer-road-truck {
  position: absolute;
  top: -27px;
  left: 0;
  width: 30px;
  height: 30px;
  color: rgba(157, 197, 238, 0.7);
  pointer-events: none;
  transform: translateX(-48px);
  animation: footer-truck-drive 18s linear infinite;
}

@keyframes footer-truck-drive {
  from { transform: translateX(-48px); }
  to { transform: translateX(calc(100vw + 48px)); }
}

@media (prefers-reduced-motion: reduce) {
  .footer-road-truck {
    display: none;
  }
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
}

.footer-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.footer-top-btn:hover {
  background: var(--primary, #377cc0);
  border-color: var(--primary, #377cc0);
  color: #ffffff;
}

.footer-top-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.footer-top-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  .footer-brand-logo-wrap {
    width: min(100%, 250px);
    padding: 0.75rem 1rem;
  }

  .footer-brand-copy,
  .footer-brand-contact {
    max-width: none;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ─── WHATSAPP FAB ─── */
.whatsapp-fab {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.1rem;
  height: 4.1rem;
  border-radius: 50%;
  padding: 0.55rem;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(7, 32, 28, 0.96), rgba(18, 140, 126, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 18px 44px rgba(6, 24, 22, 0.28),
    0 10px 26px rgba(18, 140, 126, 0.24);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.whatsapp-fab::before {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -65%;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.42) 0%, rgba(37, 211, 102, 0) 68%);
  z-index: -1;
  animation: whatsappPulse 3s ease-in-out infinite;
}

.whatsapp-fab::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(1.5rem - 1px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 55%);
  z-index: -1;
}

.whatsapp-fab:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 24px 52px rgba(6, 24, 22, 0.34),
    0 14px 30px rgba(18, 140, 126, 0.32);
}

.whatsapp-fab:active {
  transform: translateY(-1px) scale(0.99);
}

.whatsapp-fab:focus-visible {
  outline: none;
  border-color: rgba(146, 255, 190, 0.6);
  box-shadow:
    0 0 0 4px rgba(37, 211, 102, 0.18),
    0 18px 44px rgba(6, 24, 22, 0.28),
    0 10px 26px rgba(18, 140, 126, 0.24);
}

.whatsapp-fab-icon-wrap {
  display: grid;
  place-items: center;
  width: 2.95rem;
  height: 2.95rem;
  min-width: 2.95rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #1faa74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 22px rgba(37, 211, 102, 0.32);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-fab:hover .whatsapp-fab-icon-wrap {
  transform: scale(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 14px 28px rgba(37, 211, 102, 0.4);
}

.whatsapp-fab-icon {
  width: 1.28rem;
  height: 1.28rem;
  min-width: 1.28rem;
}

/* ─── 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% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.18); opacity: 1; }
}

@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);
  }
}

/* Drawer lateral: entra deslizándose desde el borde derecho */
@keyframes publicNavSideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Entrada escalonada de los enlaces del drawer */
@keyframes publicNavLinkIn {
  from {
    opacity: 0;
    transform: translateX(26px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  @media (max-width: 1024px) {
    body:not(.portal-mode) #main-nav.nav-open,
    body:not(.portal-mode) #main-nav.nav-open a,
    body:not(.portal-mode).public-nav-open::before {
      animation: none !important;
    }
  }

  .hamburger::before {
    transition: none !important;
  }

  .hamburger svg line {
    transition: 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: 1024px) {
  .theme-option,
  .lang-option {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
}

@media (max-width: 920px) {

  .portal-layout {
    grid-template-columns: 1fr;
    height: 100dvh;
    min-height: 100dvh;
  }

  .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 var(--portal-sidebar-border);
    border-bottom: none;
    box-shadow:
      16px 0 40px rgba(11, 33, 56, 0.18),
      0 0 0 1px rgba(var(--primary-rgb), 0.06) inset;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: hidden;
    overscroll-behavior: contain;
    padding: 1.15rem 0.95rem 1.35rem;
    background: var(--portal-sidebar-bg);
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-rail-scroll {
    overflow-y: auto;
    gap: 0.2rem;
    padding-right: 0.15rem;
  }

  .sidebar-rail-foot {
    border-top: 1px solid var(--portal-sidebar-border);
    padding-top: 0.75rem;
  }

  .sidebar-user-panel {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
  }

  .sidebar-user-text strong,
  .sidebar-user-text #sidebar-session-display-name {
    font-size: 0.92rem;
    white-space: normal;
  }

  .sidebar-user-text span,
  .sidebar-user-text #session-meta {
    font-size: 0.78rem;
    white-space: normal;
  }

  .sidebar-session-avatar-wrap {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .sidebar-session-avatar-initial {
    font-size: 1.1rem;
  }

  body.portal-drawer-open #portal-sidebar.sidebar {
    transform: translateX(0);
    box-shadow:
      24px 0 56px rgba(11, 33, 56, 0.22),
      0 0 0 1px rgba(var(--primary-rgb), 0.08) inset;
  }

  .sidebar-rail-head {
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.45rem 0.85rem;
    margin-bottom: 0.15rem;
    border-bottom: 1px solid var(--portal-sidebar-border);
    width: 100%;
  }

  .sidebar-brand-logo-wrap {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .sidebar-section-label {
    display: block;
    padding-top: 1rem;
    color: rgba(var(--primary-rgb), 0.5);
  }

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

  .sidebar-logout {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--portal-sidebar-border);
    flex-direction: column;
    align-items: stretch;
  }

  .sidebar-theme-box {
    margin-top: 0.55rem;
    padding: 0.55rem 0.5rem;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    justify-content: flex-start;
  }

  .sidebar-theme-title {
    display: block;
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--portal-sidebar-link);
    font-weight: 700;
  }

  .theme-toggle--compact {
    transform: none;
  }

  .side-link {
    flex-direction: row;
    text-align: left;
    padding: 0.72rem 0.75rem;
    font-size: 0.88rem;
    border-radius: 12px;
    margin-bottom: 2px;
    border: 1px solid transparent;
    background: rgba(var(--primary-rgb), 0.03);
    gap: 0.65rem;
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  }

  .side-link.active::after {
    display: none;
  }

  .side-link:hover {
    transform: translateX(4px);
    background: rgba(var(--primary-rgb), 0.08);
    border-color: rgba(var(--primary-rgb), 0.14);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
  }

  .side-link.sidebar-logout-btn:hover {
    background: rgba(214, 40, 40, 0.1);
    color: var(--danger);
    border-color: rgba(214, 40, 40, 0.2);
    box-shadow: 0 6px 18px rgba(214, 40, 40, 0.1);
  }

  .side-link.active {
    border-color: rgba(var(--primary-rgb), 0.28);
    background: var(--portal-sidebar-active-bg);
    color: var(--portal-sidebar-active-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }

  .side-link-badge {
    position: static;
    margin-left: auto;
  }

  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; }
  .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;
    width: 3.5rem;
    height: 3.5rem;
    padding: 0.42rem;
  }

  .whatsapp-fab-icon-wrap {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
  }

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

@media (max-width: 1320px) {
  #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(var(--primary-mid-rgb), 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(var(--primary-rgb), 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--primary-rgb), 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"] .sidebar-user-text strong,
body[data-theme="dark"] .sidebar-user-text #sidebar-session-display-name {
  color: #e8f2fc;
}

body[data-theme="dark"] .sidebar-brand-logo-wrap {
  background: #1a2f47;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(var(--primary-mid-rgb), 0.2);
}

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"] #contact .b2b-form-feedback--success {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(74, 222, 128, 0.45);
  color: #bbf7d0;
}

body[data-theme="dark"] #contact .b2b-form-feedback--error {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

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-text {
  background: transparent;
  border-color: #4a729e;
  color: #e6f1ff;
}

body[data-theme="dark"] .btn-outline {
  background: linear-gradient(180deg, #17314c 0%, #12263d 100%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .btn-outline:hover {
  background: linear-gradient(180deg, #1c3d5e 0%, #16314d 100%);
  border-color: #6797c7;
  color: #ffffff;
}

body[data-theme="dark"] .btn-text {
  border-color: transparent;
  box-shadow: none;
}

body[data-theme="dark"] .btn-text:hover {
  background: rgba(var(--primary-rgb), 0.16);
  color: #ffffff;
}

body[data-theme="dark"] .btn-action {
  background: linear-gradient(180deg, #3f86cf 0%, #2d6cab 100%);
  border-color: rgba(168, 211, 255, 0.26);
  color: #f4f9ff;
  box-shadow: 0 12px 24px rgba(6, 20, 38, 0.28);
}

body[data-theme="dark"] .btn-action:hover {
  background: linear-gradient(180deg, #4b94dd 0%, #3377ba 100%);
  border-color: rgba(189, 223, 255, 0.34);
}

body[data-theme="dark"] .btn-primary {
  background: linear-gradient(180deg, #4b93da 0%, #3473b4 100%);
  border-color: rgba(168, 211, 255, 0.22);
  box-shadow: 0 14px 28px rgba(6, 20, 38, 0.3);
}

body[data-theme="dark"] .btn-primary:hover {
  background: linear-gradient(180deg, #5aa4ea 0%, #3a7bbd 100%);
}

body[data-theme="dark"] .btn-approve {
  box-shadow: 0 12px 24px rgba(5, 35, 23, 0.32);
}

body[data-theme="dark"] .btn-reject {
  box-shadow: 0 12px 24px rgba(49, 11, 11, 0.28);
}

.p-card,
.kpi,
.media-card,
.step,
.coverage-card,
.contact-form {
  border: 1px solid rgba(var(--primary-rgb), 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;
}

.p-form {
  gap: 0.95rem;
}

.p-form label {
  border: 1px solid rgba(var(--primary-rgb), 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(var(--primary-rgb), 0.48);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.14);
}

.p-form input,
.p-form select,
.p-form textarea {
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  background: #fff;
}

.p-form input:focus,
.p-form select:focus,
.p-form textarea:focus {
  border-color: rgba(var(--primary-rgb), 0.55);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 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(var(--primary-rgb), 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;
}

@media (prefers-reduced-motion: reduce) {
  .module-appear {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/**
 * Misma vista que el ciclo anterior (`#view-root[data-skip-entry-motion="1"]` desde el router):
 * evita parpadeo al reinyectar HTML por poll/sync — sin re-ejecutar `hr-panel-in` en paneles y pestañas.
 * Afecta Gestión humana, Contratación, Usuarios, Autorizaciones, Viajes/Camiones (pestañas), etc.
 */
#view-root[data-skip-entry-motion="1"] .hr-workspace-panel:not(.hidden),
#view-root[data-skip-entry-motion="1"] .auth-tab-panel:not(.hidden),
#view-root[data-skip-entry-motion="1"] .hr-action-card__panel,
#view-root[data-skip-entry-motion="1"] .module-filters {
  animation: none !important;
}

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

.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(var(--primary-rgb), 0.15);
  overflow: hidden;
}

.quality-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #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: 1fr;
  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(var(--primary-rgb), 0.12);
  border: 1px solid rgba(var(--primary-rgb), 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(var(--primary-rgb), 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(var(--primary-rgb), 0.22);
  background: rgba(var(--primary-rgb), 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(var(--primary-rgb), 0.28);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 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-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.news-relevance-card p,
.news-relevance-lead {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.news-relevance-lead strong {
  display: inline;
  font-weight: 800;
  color: #0f3d6e;
}

.news-plate-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
  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(var(--primary-rgb), 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(var(--primary-rgb), 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(var(--primary-rgb), 0.12);
  border: 1px solid rgba(var(--primary-rgb), 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(var(--primary-rgb), 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(var(--primary-rgb), 0.4);
  border-radius: 10px;
  background: rgba(var(--primary-rgb), 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(var(--primary-rgb), 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(var(--primary-rgb), 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(var(--primary-rgb), 0.24);
  background: rgba(var(--primary-rgb), 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(var(--primary-rgb), 0.22);
  background: rgba(var(--primary-rgb), 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(var(--primary-rgb), 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(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  margin-bottom: 0.55rem;
}

.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(var(--primary-rgb), 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-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);
}

.hr-alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
}

.hr-alert-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 8px 18px -16px rgba(15, 23, 42, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hr-alert-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: var(--hr-alert-tone, #94a3b8);
}

.hr-alert-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 14px 26px -18px rgba(15, 23, 42, 0.28);
}

.hr-alert-card-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--hr-alert-tone, #94a3b8) 14%, transparent);
  color: var(--hr-alert-tone, #475569);
}

.hr-alert-card-ico svg {
  width: 18px !important;
  height: 18px !important;
}

.hr-alert-card-body {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.hr-alert-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
}

.hr-alert-card-value {
  font-size: 1.5rem;
  line-height: 1.05;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.hr-alert-card-help {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #64748b;
}

.hr-alert-card--ok    { --hr-alert-tone: #15803d; }
.hr-alert-card--info  { --hr-alert-tone: var(--primary); }
.hr-alert-card--warn  { --hr-alert-tone: #b45309; background: linear-gradient(135deg, #ffffff 0%, #fff8eb 100%); }
.hr-alert-card--alert { --hr-alert-tone: #b91c1c; background: linear-gradient(135deg, #ffffff 0%, #fff1f2 100%); }

body[data-theme="dark"] .hr-alert-card {
  background: linear-gradient(135deg, #111827 0%, #0b1424 100%);
  border-color: #1f2937;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 24px -22px rgba(0, 0, 0, 0.5);
}

body[data-theme="dark"] .hr-alert-card-label {
  color: #cbd5e1;
}

body[data-theme="dark"] .hr-alert-card-value {
  color: #e2e8f0;
}

body[data-theme="dark"] .hr-alert-card-help {
  color: #94a3b8;
}

body[data-theme="dark"] .hr-alert-card--warn {
  background: linear-gradient(135deg, #111827 0%, #2a1f0a 100%);
}

body[data-theme="dark"] .hr-alert-card--alert {
  background: linear-gradient(135deg, #111827 0%, #2a0d10 100%);
}

tr[data-sst-state="cumplido"] {
  background: rgba(34, 197, 94, 0.07);
}

tr[data-sst-state="en-gestion"] {
  background: rgba(37, 99, 235, 0.07);
}

tr[data-sst-state="pendiente"] {
  background: rgba(217, 119, 6, 0.08);
}

body[data-theme="dark"] tr[data-sst-state="cumplido"] {
  background: rgba(34, 197, 94, 0.1);
}
body[data-theme="dark"] tr[data-sst-state="en-gestion"] {
  background: rgba(96, 165, 250, 0.1);
}
body[data-theme="dark"] tr[data-sst-state="pendiente"] {
  background: rgba(251, 191, 36, 0.12);
}

/* —— Historial v3: shell history-studio, timeline y tarjetas —— */
.history-shell {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.history-studio-head {
  margin-bottom: 0;
}

.history-shell .history-studio-kpis {
  flex-wrap: wrap;
}

.hist-shell-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hist-section-toolbar {
  margin: 0;
}

.hist-section-nav {
  width: 100%;
}

.hist-panels {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hist-panel {
  display: block;
}

.hist-data-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.15rem 0 0;
}

.hist-panel-intro h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.hist-quick-filters {
  margin: 0;
}

.hist-toolbar {
  margin: 0;
}

.hist-toolbar--audit {
  justify-content: flex-end;
}

.hist-advanced-filters summary {
  list-style: none;
  cursor: pointer;
}

.hist-advanced-filters summary::-webkit-details-marker {
  display: none;
}

.hist-advanced-filters-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.65rem;
  margin-top: 0.65rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary) 4%, #fff);
}

.hist-advanced-filters-body label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
}

.hist-advanced-filters-body input,
.hist-advanced-filters-body select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
}

.hist-result-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

.hist-result-meta {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
}

.hist-result-meta span {
  font-weight: 800;
  color: var(--text);
}

.hist-result-sort {
  font-size: 0.8rem;
}

.hist-render-more {
  margin-top: 0.35rem;
}

.hist-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 0.75rem;
}

.hist-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.9rem 1rem 0.85rem 1.15rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.07);
  overflow: hidden;
}

.hist-card__accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
}

.hist-card--status-completada .hist-card__accent,
.hist-card--status-cerrada .hist-card__accent {
  background: #059669;
}

.hist-card--status-en_transito .hist-card__accent,
.hist-card--status-viaje_asignado .hist-card__accent,
.hist-card--status-espera_standby .hist-card__accent {
  background: #2563eb;
}

.hist-card--status-pendiente .hist-card__accent,
.hist-card--status-aprobada_pendiente_asignacion .hist-card__accent {
  background: #d97706;
}

.hist-card--status-cancelada .hist-card__accent,
.hist-card--status-rechazada .hist-card__accent {
  background: #dc2626;
}

.hist-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
}

.hist-card__number {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f3f75;
}

.hist-card__client {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.hist-card__route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.4rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 6%, #f1f5f9);
}

.hist-card__city-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.1rem;
}

.hist-card__city strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hist-card__route-line {
  width: 1.5rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #94a3b8, var(--primary));
}

.hist-card__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.7rem;
  margin: 0;
}

.hist-card__facts > div {
  min-width: 0;
}

.hist-card__facts dt {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0 0 0.12rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.hist-card__facts dt svg {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
}

.hist-card__facts dd {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hist-card__fact--wide {
  grid-column: 1 / -1;
}

.hist-card__fact--wide dd {
  white-space: normal;
}

.hist-card__fact--money dd {
  color: #047857;
  font-weight: 800;
}

.hist-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.hist-card__dates {
  margin: 0;
  font-size: 0.76rem;
}

.hist-card__actions {
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hist-table-wrap {
  margin-top: 0.2rem;
  overflow-x: auto;
}

.hist-table {
  min-width: 52rem;
}

.hist-table-sub {
  font-size: 0.74rem;
  margin-top: 0.1rem;
}

.hist-table-route {
  display: inline;
  font-size: 0.84rem;
}

.hist-table-route-arrow {
  display: inline-block;
  margin: 0 0.25rem;
  color: #64748b;
  font-weight: 700;
}

.hist-table-actions .toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
}

.hist-trace-table-changes {
  display: inline-block;
  max-width: 22rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #475569;
  white-space: normal;
}

.hist-plate {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hist-money {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f3f75;
}

.hist-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.5rem;
}

.hist-kpi {
  padding: 0.62rem 0.72rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background: linear-gradient(145deg, rgba(var(--brand-blue-soft-rgb), 0.35), #fff);
}

.hist-kpi span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.12rem;
}

.hist-kpi strong {
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hist-kpi--warn {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(254, 243, 199, 0.55);
}

.hist-kpi--ok strong {
  color: #047857;
}

.hist-fleet-subnav {
  margin: 0;
}

.hist-fleet-pane {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hist-fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 0.65rem;
}

.hist-fleet-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hist-fleet-card:hover {
  border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.hist-fleet-card--fuel {
  border-left: 3px solid #2563eb;
}

.hist-fleet-card--technical {
  border-left: 3px solid #d97706;
}

.hist-fleet-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.hist-fleet-card__date {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.12rem;
}

.hist-fleet-card__plate {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f3f75;
}

.hist-fleet-card__sub,
.hist-fleet-card__desc {
  margin: 0.18rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #475569;
}

.hist-fleet-card__badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.28rem;
  flex-shrink: 0;
}

.hist-fleet-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 0.65rem;
  margin: 0;
}

.hist-fleet-card__meta dt {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  margin: 0 0 0.08rem;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
}

.hist-fleet-card__meta dt svg {
  width: 0.82rem;
  height: 0.82rem;
}

.hist-fleet-card__meta dd {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
}

.hist-badge {
  display: inline-block;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 700;
  white-space: nowrap;
}

.hist-badge--ok {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.hist-badge--warn {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.hist-badge--type {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.hist-badge--status {
  background: rgba(100, 116, 139, 0.14);
  color: #334155;
}

.hist-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.hist-timeline-item {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.65rem 0 0.85rem;
  position: relative;
}

.hist-timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0.62rem;
  top: 1.65rem;
  bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--primary) 18%, var(--line));
}

.hist-timeline-marker {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent);
  z-index: 1;
}

.hist-timeline-item--create .hist-timeline-marker {
  background: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.25);
}

.hist-timeline-item--delete .hist-timeline-marker {
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

.hist-timeline-item--update .hist-timeline-marker {
  background: #d97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25);
}

.hist-timeline-body {
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.hist-timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.hist-timeline-date {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.1rem;
}

.hist-timeline-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f3f75;
}

.hist-timeline-module {
  margin: 0.12rem 0 0;
  font-size: 0.8rem;
}

.hist-timeline-summary {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text);
}

.hist-timeline-actor {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
}

.hist-timeline-foot {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

.hist-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 2.25rem 1.25rem;
  text-align: center;
  border-radius: 16px;
  border: 1px dashed color-mix(in srgb, var(--primary) 22%, var(--line));
  background: color-mix(in srgb, var(--primary) 4%, #fff);
}

.hist-empty p {
  margin: 0;
  font-weight: 600;
}

.hist-empty__icon {
  display: flex;
  opacity: 0.45;
}

.hist-empty__icon svg {
  width: 2rem;
  height: 2rem;
}

/* —— Historial unificado: trazabilidad —— */
.hist-trace-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hist-trace-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  padding: 1.15rem 1.25rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary) 9%, #fff) 0%,
    color-mix(in srgb, var(--primary) 3%, #fff) 55%,
    #fff 100%
  );
  box-shadow: 0 8px 28px rgba(11, 63, 138, 0.06);
}

.hist-trace-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

.hist-trace-hero__badge svg {
  width: 0.85rem;
  height: 0.85rem;
}

.hist-trace-hero h2 {
  margin: 0.45rem 0 0.2rem;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 800;
  color: #0b3f8a;
  letter-spacing: -0.02em;
}

.hist-trace-hero__lead {
  margin: 0;
  max-width: 42rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #475569;
}

.hist-trace-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hist-trace-kpi {
  min-width: 5.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 10%, var(--line));
  background: rgba(255, 255, 255, 0.88);
  text-align: center;
}

.hist-trace-kpi dt {
  margin: 0 0 0.15rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.hist-trace-kpi dd {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f3f75;
}

.hist-trace-kpi--ok dd {
  color: #047857;
}

.hist-trace-kpi--warn dd {
  color: #b45309;
}

.hist-trace-kpi--danger dd {
  color: #b91c1c;
}

.hist-trace-kpi--primary dd {
  color: var(--primary);
}

.hist-trace-workspace {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hist-trace-action-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hist-trace-module-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.35rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.hist-trace-module-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  flex-shrink: 0;
  max-width: 15rem;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.hist-trace-module-chip:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  color: var(--primary);
}

.hist-trace-module-chip.is-active {
  background: color-mix(in srgb, var(--primary) 10%, #fff);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  color: #0b3f8a;
  box-shadow: 0 3px 12px color-mix(in srgb, var(--primary) 18%, transparent);
}

.hist-trace-module-chip__ico,
.hist-trace-module-ico,
.hist-trace-card__module-ico,
.hist-trace-table-module-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}

.hist-trace-module-chip__ico svg,
.hist-trace-module-ico svg,
.hist-trace-card__module-ico svg,
.hist-trace-table-module-ico svg {
  width: 0.9rem;
  height: 0.9rem;
}

.hist-trace-module-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9.5rem;
}

.hist-trace-module-chip__count {
  min-width: 1.35rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
  color: #475569;
  background: color-mix(in srgb, var(--primary) 8%, #f1f5f9);
}

.hist-trace-module-chip.is-active .hist-trace-module-chip__count {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 16%, #fff);
}

.hist-trace-export-btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.hist-trace-result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.hist-trace-card__module {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.14rem 0.55rem 0.14rem 0.38rem;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
}

.hist-trace-table-module {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hist-trace-action-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.hist-trace-action-pill:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  color: var(--primary);
}

.hist-trace-action-pill.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent);
}

.hist-trace-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}

.hist-trace-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 14rem;
  min-width: min(100%, 14rem);
  padding: 0.35rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.hist-trace-search svg {
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.hist-trace-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 0.88rem;
  padding: 0.25rem 0;
}

.hist-trace-search input:focus {
  outline: none;
}

.hist-trace-layout-toggle {
  display: flex;
  gap: 0.35rem;
}

.hist-trace-advanced summary {
  list-style: none;
  cursor: pointer;
}

.hist-trace-advanced summary::-webkit-details-marker {
  display: none;
}

.hist-trace-advanced-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.55rem 0.75rem;
  margin-top: 0.55rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary) 3%, #fff);
}

.hist-trace-result-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}

.hist-trace-result-meta {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.hist-trace-result-meta span {
  color: var(--primary);
  font-weight: 800;
}

.hist-trace-result-sort {
  font-size: 0.78rem;
}

.hist-trace-feed {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.hist-trace-day__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  padding: 0 0.15rem;
}

.hist-trace-day__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: capitalize;
  color: #0b3f8a;
}

.hist-trace-day__count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 8%, #fff);
}

.hist-trace-day__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hist-trace-stream,
.hist-trace-day__body {
  position: relative;
}

.hist-trace-card {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: stretch;
}

.hist-trace-card__rail {
  display: flex;
  justify-content: center;
  padding-top: 1.1rem;
  position: relative;
}

.hist-trace-card__rail::after {
  content: "";
  position: absolute;
  top: 1.65rem;
  bottom: -0.55rem;
  width: 2px;
  background: color-mix(in srgb, var(--primary) 16%, var(--line));
}

.hist-trace-day__body .hist-trace-card:last-child .hist-trace-card__rail::after,
.hist-trace-stream .hist-trace-card:last-child .hist-trace-card__rail::after {
  display: none;
}

.hist-trace-card__dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 28%, transparent);
  z-index: 1;
}

.hist-trace-card--create .hist-trace-card__dot {
  background: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.28);
}

.hist-trace-card--delete .hist-trace-card__dot {
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.28);
}

.hist-trace-card--update .hist-trace-card__dot {
  background: #d97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.28);
}

.hist-trace-card__body {
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 11%, var(--line));
  background: #fff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.hist-trace-card__body:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  box-shadow: 0 6px 18px rgba(11, 63, 138, 0.08);
}

.hist-trace-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.35rem;
}

.hist-trace-card__action {
  font-size: 0.72rem !important;
}

.hist-trace-card__title {
  margin: 0 0 0.25rem;
  font-size: 0.96rem;
  font-weight: 800;
  color: #0f3f75;
  line-height: 1.3;
}

.hist-trace-card__summary {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text);
}

.hist-trace-card__changes {
  margin: 0.35rem 0 0;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  font-size: 0.78rem;
  line-height: 1.45;
  color: #475569;
}

.hist-trace-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid color-mix(in srgb, var(--primary) 8%, var(--line));
  font-size: 0.76rem;
  color: #64748b;
}

.hist-trace-card__time {
  font-weight: 700;
  color: #475569;
}

.hist-trace-card__actor {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.hist-trace-card__actor svg {
  width: 0.82rem;
  height: 0.82rem;
}

.hist-trace-card__actor--empty {
  opacity: 0.72;
  color: #64748b;
}

.hist-trace-card__detail {
  margin-left: auto;
}

.hist-trace-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 2.5rem 1.25rem;
  text-align: center;
  border-radius: 16px;
  border: 1px dashed color-mix(in srgb, var(--primary) 22%, var(--line));
  background: color-mix(in srgb, var(--primary) 4%, #fff);
}

.hist-trace-empty p {
  margin: 0;
  font-weight: 600;
}

.hist-trace-empty__icon {
  display: flex;
  opacity: 0.45;
}

.hist-trace-empty__icon svg {
  width: 2rem;
  height: 2rem;
}

.hist-trace-more {
  display: flex;
  justify-content: center;
  padding-top: 0.25rem;
}

body[data-theme="dark"] .hist-trace-hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, var(--surface)) 0%, var(--surface) 100%);
}

body[data-theme="dark"] .hist-trace-kpi,
body[data-theme="dark"] .hist-trace-card__body,
body[data-theme="dark"] .hist-trace-search,
body[data-theme="dark"] .hist-trace-action-pill {
  background: var(--surface);
}

body[data-theme="dark"] .hist-trace-hero h2,
body[data-theme="dark"] .hist-trace-card__title,
body[data-theme="dark"] .hist-trace-kpi dd {
  color: var(--text);
}

body[data-theme="dark"] .hist-trace-action-pill.is-active {
  color: #fff;
}

@media (max-width: 720px) {
  .hist-trace-hero {
    padding: 0.95rem;
  }

  .hist-trace-kpis {
    width: 100%;
  }

  .hist-trace-kpi {
    flex: 1 1 calc(33% - 0.45rem);
    min-width: 4.5rem;
  }

  .hist-trace-card__detail {
    margin-left: 0;
    width: 100%;
  }
}

.history-fleet-money-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.history-fleet-money-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.65rem;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}

.history-fleet-money-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.92rem;
}

.history-fleet-money-wrap:focus-within {
  border-color: color-mix(in srgb, var(--primary) 45%, #cbd5e1);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.history-fleet-live-hint,
.history-fleet-sync-hint {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.history-fleet-sync-hint strong {
  font-weight: 700;
  color: #0f3f75;
}

.history-fleet-create-form {
  margin-top: 0.25rem;
}

.history-plate {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.86rem;
}

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

  .hist-card__route-line {
    display: none;
  }
}

@media (max-width: 720px) {
  .hist-table thead {
    display: none;
  }

  .hist-table tbody tr {
    display: block;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
  }

  .hist-table tbody td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 34%) minmax(0, 1fr);
    gap: 0.35rem 0.65rem;
    padding: 0.28rem 0.62rem;
    border-bottom: 0;
  }

  .hist-table tbody td::before {
    content: attr(data-label);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
  }

  .hist-table tbody td.hist-table-actions {
    display: block;
    padding-top: 0.45rem;
  }

  .hist-table tbody td.hist-table-actions::before {
    display: none;
  }
}

body[data-theme="dark"] .hist-card,
body[data-theme="dark"] .hist-fleet-card,
body[data-theme="dark"] .hist-timeline-body {
  background: #0f172a;
  border-color: #334155;
}

body[data-theme="dark"] .hist-card__route {
  background: color-mix(in srgb, var(--primary) 14%, #1e293b);
}

body[data-theme="dark"] .hist-card__number,
body[data-theme="dark"] .hist-fleet-card__plate,
body[data-theme="dark"] .hist-timeline-title {
  color: #93c5fd;
}

body[data-theme="dark"] .hist-advanced-filters-body,
body[data-theme="dark"] .hist-empty,
body[data-theme="dark"] .hist-kpi {
  background: #0f172a;
  border-color: #334155;
}
tr[data-payroll-state="pending"] {
  background: rgba(217, 119, 6, 0.07);
}

tr[data-payroll-state="paid"] {
  background: rgba(34, 197, 94, 0.05);
}

body[data-theme="dark"] tr[data-payroll-state="pending"] {
  background: rgba(251, 191, 36, 0.1);
}

body[data-theme="dark"] tr[data-payroll-state="paid"] {
  background: rgba(34, 197, 94, 0.08);
}

.history-fleet-grid .p-card {
  height: 100%;
}

body[data-theme="dark"] .history-fleet-tabs,
body[data-theme="dark"] .history-fleet-kpi,
body[data-theme="dark"] .history-fleet-log-card,
body[data-theme="dark"] .history-fleet-empty {
  background: #0f172a;
  border-color: #334155;
}

body[data-theme="dark"] .history-fleet-tab {
  background: linear-gradient(180deg, #17314c 0%, #12263d 100%);
  border-color: #4a729e;
  color: #dbeafe;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .history-fleet-tab:hover {
  background: linear-gradient(180deg, #1c3d5e 0%, #16314d 100%);
  border-color: #6797c7;
  color: #ffffff;
}

body[data-theme="dark"] .history-fleet-tab.is-active {
  color: #ffffff;
  border-color: rgba(173, 214, 255, 0.28);
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

body[data-theme="dark"] .history-fleet-log-plate,
body[data-theme="dark"] .history-fleet-log-money {
  color: #93c5fd;
}

body[data-theme="dark"] .history-fleet-money-wrap {
  background: #0f172a;
  border-color: #334155;
}

body[data-theme="dark"] .history-fleet-money-prefix {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

body[data-theme="dark"] .history-fleet-money-wrap input {
  background: transparent;
  color: #e2e8f0;
}

.driver-report-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.7rem;
}

.driver-report-kpi {
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: linear-gradient(145deg, rgba(var(--brand-blue-soft-rgb), 0.5), #ffffff);
}

.driver-report-kpi h4 {
  margin: 0 0 0.4rem;
  font-size: 0.84rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #375b80;
}

.driver-report-kpi strong {
  font-size: 1.06rem;
  color: #0d3f78;
}

.reports-card-pro {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(var(--brand-blue-soft-rgb), 0.42), #ffffff 58%, #f7fbff 100%);
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.16s ease;
}

.reports-card-pro::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-deeper), var(--primary), var(--brand-blue-mid));
  opacity: 0.96;
}

.reports-card-pro:hover {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
  box-shadow: 0 18px 34px rgba(var(--primary-rgb), 0.12), 0 4px 10px rgba(15, 23, 42, 0.05);
  transform: translateY(-2px);
}

.reports-card-pro .p-card-header {
  padding-top: 1.05rem;
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.07), rgba(var(--brand-blue-soft-rgb), 0.2));
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
}

.reports-card-pro .p-card-header h2 {
  color: var(--primary-deeper);
}

.reports-card-pro .p-card-icon {
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.16);
}

.reports-card-pro .p-card-body {
  padding-top: 0.95rem;
}

.reports-card-subtitle {
  margin: 0.22rem 0 0;
  max-width: 32rem;
  font-size: 0.82rem;
  color: #46698f;
  line-height: 1.48;
}

.reports-card-actions {
  justify-content: flex-start;
  gap: 0.45rem;
}

.reports-card-actions .btn {
  min-width: 6.2rem;
  justify-content: center;
}

.reports-workspace {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reports-workspace-panel {
  min-width: 0;
}

.reports-workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.35rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--white);
}

.reports-workspace-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.16s ease;
}

.reports-workspace-tab:hover {
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  color: var(--primary);
  box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-1px);
}

.reports-workspace-tab.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

.reports-workspace-tab .btn-icon {
  width: 1rem;
  height: 1rem;
}

.reports-export-filters {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.95rem 1rem 1rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 15%, var(--line));
  background: linear-gradient(180deg, rgba(var(--brand-blue-soft-rgb), 0.18), rgba(255, 255, 255, 0.96));
  box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.06);
}

.reports-export-filters-head {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: flex-start;
}

.reports-export-filters-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.reports-export-filters-head h3 {
  margin: 0;
  color: var(--primary-deeper);
  font-size: 1rem;
}

.reports-export-filters-copy {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #4b6581;
  max-width: 48rem;
}

.reports-export-filters-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.reports-export-group {
  margin-bottom: 1.25rem;
  padding: 1rem 1.05rem 1.05rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(var(--brand-blue-soft-rgb), 0.18));
  box-shadow: 0 12px 26px rgba(var(--primary-rgb), 0.07);
}

.reports-export-group:last-child {
  margin-bottom: 0;
}

.reports-export-group-title {
  margin: 0 0 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark, #0d3f78);
}

.reports-export-grid {
  gap: 0.9rem;
}

.reports-card-actions {
  flex-wrap: wrap;
  gap: 0.45rem;
}

.modal-card-report-preview {
  width: min(1120px, 96vw);
  max-height: min(92vh, 920px);
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 0;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12), 0 8px 20px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.report-preview-head {
  align-items: flex-start;
  gap: 0;
  padding: 0;
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  background: linear-gradient(180deg, #f0f6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: none;
  flex-shrink: 0;
}

.report-preview-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex: 1 1 auto;
  padding: 1.15rem 1.25rem 1rem;
}

.report-preview-logo-wrap {
  width: 62px;
  height: 62px;
  min-width: 62px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  flex-shrink: 0;
}

.report-preview-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.report-preview-head h2 {
  margin: 0;
  color: #0f2d52;
  line-height: 1.15;
  font-size: 1.35rem;
  font-weight: 800;
}

.report-preview-kicker {
  margin: 0 0 0.28rem;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2563eb;
}

.report-preview-meta {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.report-preview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  margin-top: 0.55rem;
}

.report-preview-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
}

.report-preview-stat .btn-icon {
  width: 0.95rem;
  height: 0.95rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.report-preview-stat strong {
  color: #334155;
  font-weight: 700;
}

.report-preview-head-actions {
  display: flex;
  align-items: flex-start;
  padding: 1rem 1rem 0 0;
  flex-shrink: 0;
}

.report-preview-close-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
  font-size: 0.9rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.report-preview-close-btn .btn-icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 2.25;
}

.report-preview-close-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  transform: none;
  color: #1e3a5f;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.report-preview-body {
  flex: 1 1 auto;
  min-height: 8rem;
  max-height: min(58vh, 620px);
  overflow: auto;
  margin: 0.85rem 1rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.report-preview-table-wrap {
  min-width: max-content;
}

.report-preview-table {
  margin: 0;
  font-size: 0.81rem;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
}

.report-preview-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.82rem 1rem;
  background: #f8fafc;
  color: #94a3b8;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: bottom;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.report-preview-header.is-numeric,
.report-preview-cell.is-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.report-preview-table thead th.is-primary {
  left: 0;
  z-index: 3;
}

.report-preview-table tbody td {
  padding: 0.82rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.45;
}

.report-preview-table tbody tr:last-child td {
  border-bottom: none;
}

.report-preview-table tbody tr:nth-child(even) td {
  background: #ffffff;
}

.report-preview-table tbody tr:hover td {
  background: #f8fafc;
}

.report-preview-table tbody td.is-primary {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #ffffff;
  box-shadow: 8px 0 14px -12px rgba(15, 23, 42, 0.12);
}

.report-preview-table tbody tr:nth-child(even) td.is-primary {
  background: #ffffff;
}

.report-preview-table tbody tr:hover td.is-primary {
  background: #f8fafc;
}

.report-preview-cell--currency .report-value,
.report-preview-cell--number .report-value,
.report-preview-cell--percent .report-value,
.report-preview-cell--value .report-value,
.report-value--highlight {
  font-weight: 700;
  color: #2563eb;
  font-size: 0.92rem;
}

.report-metric {
  color: #0f2d52;
  font-weight: 600;
}

.report-value {
  color: #334155;
}

.report-empty {
  color: #94a3b8;
}

.report-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.75rem;
  padding: 0.18rem 0.68rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.report-cat-badge .btn-icon {
  width: 0.82rem;
  height: 0.82rem;
  flex-shrink: 0;
}

.report-cat-badge--info {
  background: #eff6ff;
  color: #1d4ed8;
}

.report-cat-badge--warning {
  background: #fff7ed;
  color: #c2410c;
}

.report-cat-badge--success {
  background: #f0fdf4;
  color: #15803d;
}

.report-detail {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.report-detail__icon {
  width: 1.65rem;
  height: 1.65rem;
  min-width: 1.65rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.report-detail__icon .btn-icon {
  width: 0.82rem;
  height: 0.82rem;
}

.report-detail__icon--info {
  background: #eff6ff;
  color: #2563eb;
}

.report-detail__icon--warning {
  background: #fff7ed;
  color: #ea580c;
}

.report-detail__icon--success {
  background: #f0fdf4;
  color: #16a34a;
}

.report-detail__text {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.4;
}

.report-code {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.08rem 0.52rem;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary-deeper);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
}

.report-note {
  display: inline-block;
  line-height: 1.45;
  color: #64748b;
}

.report-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0.1rem 0.62rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.report-badge--success {
  background: rgba(27, 142, 95, 0.12);
  border-color: rgba(27, 142, 95, 0.2);
  color: #156f4b;
}

.report-badge--warning {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.2);
  color: #9a5a04;
}

.report-badge--danger {
  background: rgba(214, 40, 40, 0.1);
  border-color: rgba(214, 40, 40, 0.18);
  color: #a11d1d;
}

.report-badge--info {
  background: rgba(var(--primary-rgb), 0.12);
  border-color: rgba(var(--primary-rgb), 0.18);
  color: var(--primary-deeper);
}

.report-badge--neutral {
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(100, 116, 139, 0.16);
  color: #526171;
}

.report-preview-empty-row {
  padding: 1rem 0.85rem !important;
  color: #94a3b8;
  text-align: center;
  font-style: italic;
}

.report-preview-footer-bar {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  flex-wrap: nowrap;
  margin: 0.65rem 1rem 0;
  padding: 0.72rem 0.95rem;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #64748b;
}

.report-preview-footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  border-radius: 50%;
  background: #dbeafe;
  color: #2563eb;
  margin-top: 0.05rem;
}

.report-preview-footer-icon .btn-icon {
  width: 0.82rem;
  height: 0.82rem;
}

.report-preview-footer-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.report-preview-footer-brand {
  font-weight: 700;
  color: #475569;
  font-size: 0.72rem;
}

.report-preview-footer-note {
  font-size: 0.7rem;
  color: #64748b;
  opacity: 1;
}

.report-preview-copy {
  margin: 0 0 0.8rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.05), rgba(var(--brand-blue-soft-rgb), 0.18));
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: center;
}

.report-preview-actions {
  flex-shrink: 0;
}

.report-preview-actions .module-panel-actions__bar {
  margin-top: 0;
  border-radius: 0;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  justify-content: space-between;
}

.report-preview-actions .module-panel-actions__group--secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.report-preview-export-btn {
  min-width: 6.8rem;
  min-height: 2.45rem;
  justify-content: center;
  gap: 0.42rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #1e293b;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s, background 0.18s;
}

.report-preview-export-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.report-preview-export-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.report-preview-export-btn__icon .btn-icon {
  width: 1rem;
  height: 1rem;
}

.report-preview-export-btn--pdf .report-preview-export-btn__icon {
  color: #dc2626;
}

.report-preview-export-btn--excel .report-preview-export-btn__icon {
  color: #16a34a;
}

.report-preview-export-btn--print .report-preview-export-btn__icon {
  color: #64748b;
}

.report-preview-close-primary {
  min-width: 8.5rem;
  min-height: 2.65rem;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 10px;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(37, 105, 184, 0.28);
}

.report-preview-close-primary .btn-icon {
  width: 0.95rem;
  height: 0.95rem;
  color: #ffffff;
  stroke: currentColor;
  flex-shrink: 0;
}

.report-preview-actions .btn {
  min-width: 0;
  overflow: visible;
  max-width: 100%;
  white-space: normal;
}

@media (max-width: 720px) {
  .reports-export-filters-head {
    flex-direction: column;
  }

  .reports-export-filters-badge {
    white-space: normal;
  }

  .reports-export-group {
    padding: 0.9rem;
  }

  .reports-card-actions .btn,
  .report-preview-actions .btn {
    flex: 1 1 100%;
  }

  .modal-card-report-preview {
    width: min(96vw, 96vw);
    border-radius: 16px;
  }

  .report-preview-head {
    flex-direction: column;
    align-items: stretch;
  }

  .report-preview-brand {
    align-items: flex-start;
    padding: 0.9rem;
  }

  .report-preview-head-actions {
    border-top: 1px solid #e2e8f0;
    padding: 0.55rem 0.9rem;
    justify-content: flex-end;
  }

  .report-preview-body {
    max-height: min(52vh, 520px);
    margin: 0.65rem 0.75rem 0;
  }

  .report-preview-footer-bar {
    margin: 0.5rem 0.75rem 0;
  }

  .report-preview-actions .module-panel-actions__bar {
    padding: 0.55rem 0.75rem 0.75rem;
  }
}

body[data-theme="dark"] .report-preview-body {
  background: rgba(10, 22, 38, 0.96);
  border-color: rgba(131, 190, 233, 0.16);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .report-preview-logo-wrap {
  background: rgba(255, 255, 255, 0.98);
}

body[data-theme="dark"] .modal-card-report-preview {
  border-color: rgba(135, 190, 247, 0.2);
  background: linear-gradient(180deg, #081523 0%, #0c1b2c 20%, #08131f 100%);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

body[data-theme="dark"] .report-preview-head {
  background: linear-gradient(180deg, rgba(18, 45, 71, 0.72) 0%, rgba(10, 24, 38, 0.88) 100%);
  border-bottom-color: rgba(131, 190, 233, 0.16);
  box-shadow: none;
}

body[data-theme="dark"] .report-preview-head h2 {
  color: #f0f7ff;
}

body[data-theme="dark"] .report-preview-kicker {
  color: #93c5fd;
}

body[data-theme="dark"] .report-preview-stat {
  color: #94a3b8;
}

body[data-theme="dark"] .report-preview-stat .btn-icon {
  color: #64748b;
}

body[data-theme="dark"] .report-preview-close-btn {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(131, 190, 233, 0.28);
  color: #e2e8f0;
}

body[data-theme="dark"] .report-preview-close-btn:hover {
  background: rgba(30, 58, 95, 0.85);
  border-color: rgba(147, 197, 253, 0.45);
  color: #f8fafc;
}

body[data-theme="dark"] .report-preview-meta,
body[data-theme="dark"] .report-preview-copy {
  color: #dbeafe;
}

body[data-theme="dark"] .report-preview-footer-bar {
  border-color: rgba(131, 190, 233, 0.14);
  background: rgba(18, 45, 71, 0.54);
}

body[data-theme="dark"] .report-preview-footer-icon {
  background: rgba(37, 99, 235, 0.22);
  color: #93c5fd;
}

body[data-theme="dark"] .report-preview-footer-brand {
  color: #cbd5e1;
}

body[data-theme="dark"] .report-preview-footer-note,
body[data-theme="dark"] .report-detail__text,
body[data-theme="dark"] .report-note {
  color: #94a3b8;
}

body[data-theme="dark"] .report-preview-actions .module-panel-actions__bar {
  border-top-color: rgba(131, 190, 233, 0.14);
  background: linear-gradient(180deg, rgba(14, 30, 50, 0.8) 0%, rgba(8, 18, 32, 0.9) 100%);
}

body[data-theme="dark"] .report-preview-export-btn {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(131, 190, 233, 0.22);
  color: #e2e8f0;
}

body[data-theme="dark"] .report-preview-export-btn:hover {
  background: rgba(24, 40, 64, 0.92);
  border-color: rgba(147, 197, 253, 0.38);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .report-preview-copy {
  border-color: rgba(131, 190, 233, 0.14);
  background: linear-gradient(180deg, rgba(18, 45, 71, 0.54), rgba(10, 24, 38, 0.76));
}

body[data-theme="dark"] .report-preview-table thead th {
  background: rgba(12, 24, 40, 0.96);
  color: #64748b;
  border-bottom-color: rgba(131, 190, 233, 0.12);
}

body[data-theme="dark"] .report-preview-table tbody td {
  border-color: rgba(131, 190, 233, 0.12);
  background: rgba(10, 22, 38, 0.9);
  color: #dbeafe;
}

body[data-theme="dark"] .report-preview-table tbody tr:nth-child(even) td {
  background: rgba(10, 22, 38, 0.9);
}

body[data-theme="dark"] .report-preview-table tbody tr:hover td {
  background: rgba(24, 52, 82, 0.72);
}

body[data-theme="dark"] .report-preview-table tbody td.is-primary {
  background: rgba(10, 22, 38, 0.96);
  box-shadow: 10px 0 16px -16px rgba(0, 0, 0, 0.6);
}

body[data-theme="dark"] .report-preview-table tbody tr:nth-child(even) td.is-primary {
  background: rgba(10, 22, 38, 0.96);
}

body[data-theme="dark"] .report-preview-table tbody tr:hover td.is-primary {
  background: rgba(24, 52, 82, 0.72);
}

body[data-theme="dark"] .report-metric {
  color: #f0f7ff;
}

body[data-theme="dark"] .report-preview-cell--currency .report-value,
body[data-theme="dark"] .report-preview-cell--number .report-value,
body[data-theme="dark"] .report-preview-cell--percent .report-value,
body[data-theme="dark"] .report-value,
body[data-theme="dark"] .report-note {
  color: #f8fbff;
}

body[data-theme="dark"] .report-empty,
body[data-theme="dark"] .report-preview-empty-row {
  color: #9fb9d9;
}

body[data-theme="dark"] .report-code {
  background: rgba(131, 190, 233, 0.14);
  color: #dbeafe;
}

body[data-theme="dark"] .report-badge--success {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.24);
  color: #bbf7d0;
}

body[data-theme="dark"] .report-badge--warning {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.24);
  color: #fde68a;
}

body[data-theme="dark"] .report-badge--danger {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.24);
  color: #fecaca;
}

body[data-theme="dark"] .report-badge--info {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(96, 165, 250, 0.24);
  color: #dbeafe;
}

body[data-theme="dark"] .report-badge--neutral {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.22);
  color: #d6e3f5;
}

/* Panel BI — analítica corporativa */
.reports-bi {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 18%, #f6fbff 100%);
  color: var(--text);
  box-shadow: 0 18px 42px rgba(var(--primary-rgb), 0.08), 0 2px 8px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.reports-bi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-deeper), var(--primary), var(--brand-blue-mid));
  opacity: 0.96;
}

.reports-bi-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background: linear-gradient(180deg, rgba(var(--brand-blue-soft-rgb), 0.42), rgba(var(--primary-rgb), 0.04));
}

.reports-bi-toolbar-intro,
.reports-bi-toolbar-controls {
  position: relative;
  min-width: 0;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 255, 0.96));
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.08);
}

.reports-bi-toolbar-intro {
  padding: 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.18rem;
  overflow: hidden;
}

.reports-bi-toolbar-intro::after {
  content: "";
  position: absolute;
  right: -2.25rem;
  bottom: -3rem;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--brand-blue-soft-rgb), 0.55), transparent 72%);
  pointer-events: none;
}

.reports-bi-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.reports-bi-title {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.reports-bi-sub {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.reports-bi-updated {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-soft);
}

.reports-bi-toolbar-controls {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  justify-items: stretch;
  padding: 1rem 1.05rem;
}

.reports-bi-period-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-start;
}

.reports-bi-chip {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.16s ease;
}

.reports-bi-chip:hover {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  color: var(--primary);
  box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-1px);
}

.reports-bi-chip.is-active {
  color: #ffffff;
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

.reports-bi-period-summary {
  display: grid;
  gap: 0.28rem;
  justify-items: start;
}

.reports-bi-period-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 2rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  color: var(--primary-deeper);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.08);
}

.reports-bi-period-note {
  font-size: 0.72rem;
  color: var(--text-soft);
}

.reports-bi-toolbar-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-start;
}

.reports-bi-toolbar-btns .btn {
  min-width: 9rem;
  justify-content: center;
}

.reports-bi-toolbar-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr));
  gap: 0.7rem;
}

.reports-bi-stat {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 15%, var(--line));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 255, 0.95));
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.08);
}

.reports-bi-stat strong {
  font-size: 1.18rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--primary-dark);
  line-height: 1.1;
}

.reports-bi-stat span {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.reports-bi-section {
  padding: 1.1rem 1.2rem 0.35rem;
}

.reports-bi-section--compact {
  padding-top: 0.55rem;
}

.reports-bi-section-title {
  margin: 0 0 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.reports-bi-customizer {
  margin: 1rem 1.2rem 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 12px 26px rgba(var(--primary-rgb), 0.08);
}

.reports-bi-customizer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  margin-bottom: 0.9rem;
}

.reports-bi-customizer-copy {
  display: grid;
  gap: 0.2rem;
  min-width: min(100%, 18rem);
  flex: 1 1 20rem;
}

.reports-bi-customizer-title {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.reports-bi-customizer-hint {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-soft);
  max-width: 28rem;
}

.reports-bi-customizer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
  flex: 0 1 24rem;
}

.reports-bi-customizer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 0.9rem;
}

.reports-bi-customizer-group {
  margin: 0;
  padding: 0.85rem 0.95rem 0.95rem;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(var(--brand-blue-soft-rgb), 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.reports-bi-customizer-group--wide {
  grid-column: span 1;
}

.reports-bi-customizer-group legend {
  padding: 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
}

.reports-bi-customizer-checks {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.reports-bi-customizer-checks--dual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1rem;
}

.reports-bi-customizer-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text);
  margin-top: 0;
  padding: 0.15rem 0;
  cursor: pointer;
  min-width: 0;
}

.reports-bi-customizer-item input {
  accent-color: var(--primary);
  margin-top: 0.12rem;
}

.reports-bi-customizer-item-label {
  display: block;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .reports-bi-customizer-group--wide {
    grid-column: span 1;
  }

  .reports-bi-customizer-presets {
    justify-content: flex-start;
    flex-basis: 100%;
  }

  .reports-bi-customizer-checks--dual {
    grid-template-columns: 1fr;
  }

  .reports-bi-toolbar,
  .reports-bi-section,
  .reports-bi-insights {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .reports-bi-customizer {
    margin-left: 0.9rem;
    margin-right: 0.9rem;
  }

  .reports-bi-toolbar-intro,
  .reports-bi-toolbar-controls {
    padding: 0.9rem;
  }

  .reports-bi-toolbar-btns .btn {
    flex: 1 1 100%;
  }

  .reports-bi-toolbar-stats {
    grid-template-columns: 1fr 1fr;
  }

  .reports-bi-card-head {
    flex-direction: column;
  }
}

body[data-theme="dark"] .reports-bi-customizer,
body[data-theme="dark"] .reports-bi-customizer-group {
  background: linear-gradient(180deg, rgba(18, 45, 71, 0.84), rgba(10, 24, 38, 0.92));
  border-color: rgba(131, 190, 233, 0.18);
  box-shadow: 0 16px 30px rgba(2, 8, 20, 0.42);
}

.reports-bi-insights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.7rem;
  padding: 0.85rem 1.2rem 0;
}

.reports-bi-insight {
  padding: 0.8rem 0.85rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.08);
}

.reports-bi-insight strong {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 0.18rem;
  color: var(--text);
}

.reports-bi-insight p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-soft);
}

.reports-bi-insight--ok {
  border-color: rgba(27, 142, 95, 0.35);
  background: linear-gradient(180deg, rgba(27, 142, 95, 0.12), rgba(255, 255, 255, 0.96));
  box-shadow: inset 4px 0 0 rgba(27, 142, 95, 0.45), 0 10px 22px rgba(var(--primary-rgb), 0.08);
}

.reports-bi-insight--warn {
  border-color: rgba(217, 119, 6, 0.35);
  background: linear-gradient(180deg, rgba(245, 159, 0, 0.15), rgba(255, 255, 255, 0.96));
  box-shadow: inset 4px 0 0 rgba(217, 119, 6, 0.45), 0 10px 22px rgba(var(--primary-rgb), 0.08);
}

.reports-bi-insight--alert {
  border-color: rgba(214, 40, 40, 0.35);
  background: linear-gradient(180deg, rgba(214, 40, 40, 0.12), rgba(255, 255, 255, 0.96));
  box-shadow: inset 4px 0 0 rgba(214, 40, 40, 0.42), 0 10px 22px rgba(var(--primary-rgb), 0.08);
}

.reports-bi-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.25rem, 1fr));
  gap: 0.75rem;
}

.reports-bi-kpi {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
  min-height: 7rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.08);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.16s ease;
}

.reports-bi-kpi:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-2px);
}

.reports-bi-kpi-ico {
  flex-shrink: 0;
  display: flex;
  color: var(--primary);
}

.reports-bi-kpi-ico .btn-icon {
  width: 1rem;
  height: 1rem;
}

.reports-bi-kpi-body {
  flex: 1;
  min-width: 0;
}

.reports-bi-kpi--primary {
  border-color: transparent;
  background: linear-gradient(145deg, var(--primary-deeper) 0%, var(--primary-dark) 55%, #255f94 100%);
  color: #f0f7ff;
  box-shadow: 0 8px 22px rgba(30, 74, 115, 0.32);
}

.reports-bi-kpi--primary .reports-bi-kpi-ico,
.reports-bi-kpi--primary .reports-bi-kpi-val {
  color: #ffffff;
}

.reports-bi-kpi--primary .reports-bi-kpi-lbl,
.reports-bi-kpi--primary .reports-bi-kpi-meta {
  color: #c5dff5;
  opacity: 1;
}

.reports-bi-kpi--sla {
  border-color: rgba(27, 142, 95, 0.35);
}

.reports-bi-kpi--warn {
  border-color: rgba(217, 119, 6, 0.4);
  background: rgba(245, 159, 0, 0.08);
}

.reports-bi-kpi-val {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.15;
}

.reports-bi-kpi-lbl {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.reports-bi-kpi-meta {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.67rem;
  color: var(--text-soft);
}

.reports-bi-trend {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 0.12rem 0.38rem;
  border-radius: 6px;
  font-size: 0.64rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.reports-bi-kpi--primary .reports-bi-trend--up {
  color: #a7f3d0;
  background: rgba(15, 45, 72, 0.35);
}

.reports-bi-kpi--primary .reports-bi-trend--down {
  color: #fecaca;
  background: rgba(15, 45, 72, 0.35);
}

.reports-bi-kpi--primary .reports-bi-trend--flat {
  color: #dbeafe;
  background: rgba(15, 45, 72, 0.28);
}

.reports-bi-trend--up {
  color: var(--success);
  background: rgba(27, 142, 95, 0.12);
}

.reports-bi-trend--down {
  color: var(--danger);
  background: rgba(214, 40, 40, 0.1);
}

.reports-bi-trend--flat {
  color: var(--text-soft);
  background: rgba(var(--primary-rgb), 0.08);
}

.reports-bi-score-row {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(10rem, 0.85fr);
  gap: 0.65rem;
}

.reports-bi-score-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.08);
}

.reports-bi-score-card h3 {
  margin: 0 0 0.2rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.reports-bi-score-card p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-soft);
}

.reports-bi-score-card--chart {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.reports-bi-ring {
  position: relative;
  width: 4.25rem;
  height: 4.25rem;
  flex-shrink: 0;
}

.reports-bi-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.reports-bi-ring-bg {
  fill: none;
  stroke: rgba(var(--primary-rgb), 0.18);
  stroke-width: 3;
}

.reports-bi-ring-fg {
  fill: none;
  stroke: var(--success);
  stroke-width: 3;
  stroke-linecap: round;
}

.reports-bi-ring--assign .reports-bi-ring-fg {
  stroke: var(--primary);
}

.reports-bi-ring strong {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
}

.reports-bi-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.7rem;
  padding-bottom: 0.75rem;
}

.reports-bi-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.08);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.16s ease;
}

.reports-bi-card:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-2px);
}

.reports-bi-card--wide {
  grid-column: span 8;
}

.reports-bi-card--xl {
  grid-column: span 12;
}

.reports-bi-card--rankings .reports-bi-rankings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0.2rem 1rem 1rem;
}

.reports-bi-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.09) 0%, rgba(var(--brand-blue-soft-rgb), 0.28) 100%);
}

.reports-bi-card-head h3 {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.reports-bi-card-head h3 .btn-icon {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
}

.reports-bi-card-sub {
  margin: 0.18rem 0 0;
  font-size: 0.71rem;
  color: var(--text-soft);
}

.reports-bi-card-stat {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  white-space: nowrap;
}

.reports-bi-chart-wrap {
  position: relative;
  height: 240px;
  padding: 0.2rem 0.85rem 0.95rem;
}

.reports-bi-chart-wrap--tall {
  height: 280px;
}

.reports-bi-chart-wrap--donut {
  height: 210px;
}

.reports-bi-chart-wrap--mini {
  height: 140px;
  padding: 0 0.5rem 0.5rem;
}

.reports-bi-lb {
  min-width: 0;
}

.reports-bi-lb h4 {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.reports-bi-lb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.reports-bi-lb-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.55rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
  background: rgba(var(--primary-rgb), 0.03);
}

.reports-bi-lb-rank {
  width: 1.35rem;
  height: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary-dark);
  background: rgba(var(--primary-rgb), 0.14);
}

.reports-bi-lb-main {
  min-width: 0;
}

.reports-bi-lb-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.reports-bi-lb-bar {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.12);
  overflow: hidden;
}

.reports-bi-lb-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-deeper), var(--primary));
}

.reports-bi-lb-val {
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--primary-dark);
}

.reports-bi-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.reports-bi-foot {
  margin: 0;
  padding: 0.8rem 1rem 1rem;
  font-size: 0.74rem;
  text-align: center;
  border-top: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.03), rgba(var(--brand-blue-soft-rgb), 0.18));
}

@media (max-width: 1100px) {
  .reports-bi-toolbar {
    grid-template-columns: 1fr;
  }
  .reports-bi-toolbar-controls {
    align-items: stretch;
  }
  .reports-bi-period-chips,
  .reports-bi-toolbar-btns {
    justify-content: flex-start;
  }
  .reports-bi-score-row {
    grid-template-columns: 1fr;
  }
  .reports-bi-card--rankings .reports-bi-rankings {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .reports-bi-card,
  .reports-bi-card--wide,
  .reports-bi-card--xl {
    grid-column: span 12;
  }
}

body[data-theme="dark"] .reports-bi {
  border-color: rgba(135, 190, 247, 0.2);
  background: linear-gradient(180deg, #081523 0%, #0c1b2c 20%, #08131f 100%);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.42);
}

body[data-theme="dark"] .reports-bi-toolbar {
  border-bottom-color: rgba(131, 190, 233, 0.14);
  background: linear-gradient(180deg, rgba(18, 45, 71, 0.96), rgba(10, 21, 35, 0.84));
}

body[data-theme="dark"] .reports-bi-toolbar-intro,
body[data-theme="dark"] .reports-bi-toolbar-controls {
  background: linear-gradient(180deg, rgba(18, 45, 71, 0.88), rgba(11, 25, 40, 0.94));
  border-color: rgba(131, 190, 233, 0.2);
  box-shadow: 0 18px 32px rgba(2, 8, 20, 0.45);
}

body[data-theme="dark"] .reports-bi-title,
body[data-theme="dark"] .reports-bi-customizer-title,
body[data-theme="dark"] .reports-bi-card-head h3,
body[data-theme="dark"] .reports-bi-insight strong,
body[data-theme="dark"] .reports-bi-kpi-val,
body[data-theme="dark"] .reports-bi-stat strong,
body[data-theme="dark"] .reports-bi-lb-name,
body[data-theme="dark"] .reports-bi-ring strong {
  color: #f8fbff;
}

body[data-theme="dark"] .reports-bi-kicker,
body[data-theme="dark"] .reports-bi-section-title,
body[data-theme="dark"] .reports-bi-customizer-group legend,
body[data-theme="dark"] .reports-bi-card-stat,
body[data-theme="dark"] .reports-bi-lb-val {
  color: #b9d8f5;
}

body[data-theme="dark"] .reports-bi-sub,
body[data-theme="dark"] .reports-bi-updated,
body[data-theme="dark"] .reports-bi-stat span,
body[data-theme="dark"] .reports-bi-card-sub,
body[data-theme="dark"] .reports-bi-score-card p,
body[data-theme="dark"] .reports-bi-customizer-hint,
body[data-theme="dark"] .reports-bi-customizer-item,
body[data-theme="dark"] .reports-bi-insight p,
body[data-theme="dark"] .reports-bi-foot,
body[data-theme="dark"] .reports-bi-lb h4,
body[data-theme="dark"] .reports-bi-empty {
  color: #9fb9d9;
}

body[data-theme="dark"] .reports-bi-section-title {
  border-bottom-color: rgba(131, 190, 233, 0.14);
}

body[data-theme="dark"] .reports-bi-kpi,
body[data-theme="dark"] .reports-bi-score-card,
body[data-theme="dark"] .reports-bi-card,
body[data-theme="dark"] .reports-bi-insight,
body[data-theme="dark"] .reports-bi-stat,
body[data-theme="dark"] .reports-bi-chip {
  background: linear-gradient(180deg, rgba(15, 28, 46, 0.88), rgba(9, 20, 32, 0.92));
  border-color: rgba(131, 190, 233, 0.16);
  box-shadow: 0 16px 30px rgba(2, 8, 20, 0.4);
}

body[data-theme="dark"] .reports-bi-chip {
  border-color: #4a729e;
  color: #dbeafe;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .reports-bi-chip:hover {
  background: linear-gradient(180deg, #1c3d5e 0%, #16314d 100%);
  border-color: #6797c7;
  color: #ffffff;
}

body[data-theme="dark"] .reports-bi-kpi--primary {
  background: linear-gradient(145deg, #122d47 0%, #1e4a73 55%, #255f94 100%);
  border-color: rgba(131, 190, 233, 0.18);
}

body[data-theme="dark"] .reports-bi-chip.is-active {
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  border-color: rgba(173, 214, 255, 0.28);
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

body[data-theme="dark"] .reports-bi-period-badge {
  border-color: rgba(131, 190, 233, 0.18);
  background: linear-gradient(180deg, rgba(15, 28, 46, 0.88), rgba(10, 20, 32, 0.92));
  color: #dbeafe;
  box-shadow: 0 12px 22px rgba(2, 8, 20, 0.28);
}

body[data-theme="dark"] .reports-bi-period-note {
  color: #9fb9d9;
}

body[data-theme="dark"] .reports-bi-card-head {
  border-bottom-color: rgba(131, 190, 233, 0.16);
  background: linear-gradient(180deg, rgba(20, 49, 77, 0.92), rgba(12, 28, 46, 0.86));
}

body[data-theme="dark"] .reports-bi-lb-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(131, 190, 233, 0.12);
}

body[data-theme="dark"] .reports-bi-lb-rank {
  color: #dbeafe;
  background: rgba(131, 190, 233, 0.14);
}

body[data-theme="dark"] .reports-bi-foot {
  border-top-color: rgba(131, 190, 233, 0.14);
  background: linear-gradient(180deg, rgba(10, 22, 38, 0.72), rgba(10, 22, 38, 0.96));
}

body[data-theme="dark"] .reports-workspace-tabs {
  background: rgba(8, 18, 32, 0.65);
  border-color: rgba(135, 190, 247, 0.22);
}

body[data-theme="dark"] .reports-workspace-tab {
  background: linear-gradient(180deg, #17314c 0%, #12263d 100%);
  border-color: #4a729e;
  color: #dbeafe;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .reports-workspace-tab:hover {
  background: linear-gradient(180deg, #1c3d5e 0%, #16314d 100%);
  border-color: #6797c7;
  color: #ffffff;
}

body[data-theme="dark"] .reports-workspace-tab.is-active {
  color: #fff;
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  border-color: rgba(173, 214, 255, 0.28);
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

.ops-module-head {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: flex-start;
  border: 1px solid rgba(var(--primary-rgb), 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(var(--primary-mid-rgb), 0.32);
  background: linear-gradient(135deg, rgba(var(--brand-blue-soft-rgb), 0.55), rgba(248, 251, 255, 0.98));
}

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

.ops-module-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  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(var(--primary-rgb), 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-shell--workspace,
.hiring-shell--workspace {
  gap: 1.1rem;
}

.payroll-shell--workspace > .fleet-hero-strip:first-child,
.hiring-shell--workspace > .fleet-hero-strip:first-child {
  margin-bottom: 0;
}

/* —— Gestión humana v2: jerarquía, alertas y tarjetas de liquidación —— */
.payroll-module--v2 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.payroll-module-head {
  margin: 0;
}

.payroll-module-head .ops-chip--warn {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(254, 243, 199, 0.65);
  color: #92400e;
}

.payroll-workspace-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.payroll-panel-intro {
  margin-bottom: 0.1rem;
}

.payroll-module--v2 .hr-workspace-panel[data-payroll-panel="operate"] > .hr-alert-grid {
  margin-bottom: 0.15rem;
}

.payroll-operate-panel .payroll-actions-grid {
  gap: 0.85rem;
}

@media (min-width: 900px) {
  .payroll-module--v2 .payroll-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* —— Gestión humana y Contratación: modo limpio (menos ruido visual) —— */
.payroll-module--clean {
  gap: 0.75rem;
}

.payroll-module--clean.hiring-shell--workspace,
.payroll-module--clean.payroll-shell--workspace {
  gap: 0.75rem;
}

.payroll-module--clean .hr-module-pro.payroll-shell--workspace,
.payroll-module--clean .hr-module-pro.hiring-shell--workspace {
  padding-bottom: 0;
}

.payroll-module--clean .hr-form-hero,
.payroll-module--clean .hr-form-wizard-lead,
.payroll-module--clean .hr-form-wizard-kicker {
  display: none;
}

.payroll-module-head--compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--white, #fff);
}

.payroll-module-head--compact .payroll-module-head__title h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.payroll-module-head__chips,
.payroll-module-head__kpi {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.payroll-module-kpi {
  list-style: none;
}

.payroll-module-kpi__item {
  margin: 0;
  padding: 0.28rem 0.62rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #f1f5f9;
  min-width: 0;
}

.payroll-module-kpi__item dt {
  margin: 0 0 0.1rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
}

.payroll-module-kpi__item dd {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  line-height: 1.25;
}

.payroll-module-kpi__item dd strong {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text, #0f172a);
}

.payroll-module-kpi__item--ok {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}

.payroll-module-kpi__item--neutral {
  background: transparent;
  border-color: var(--line, #e2e8f0);
}

.payroll-module-kpi__item--warn {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
}

.payroll-module-kpi__item--warn dt,
.payroll-module-kpi__item--warn dd {
  color: #92400e;
}

.payroll-module-kpi__item--warn dd strong {
  color: #b45309;
}

.payroll-module-kpi__item--alert {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.payroll-module-kpi__item--alert dt,
.payroll-module-kpi__item--alert dd {
  color: #991b1b;
}

.payroll-module-kpi__item--alert dd strong {
  color: #b91c1c;
}

.payroll-driver-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 0 0 1.1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line, #e2e8f0);
  background: linear-gradient(135deg, #fffbeb 0%, #f8fafc 55%);
}

.payroll-driver-kpi > div {
  margin: 0;
}

.payroll-driver-kpi dt {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
}

.payroll-driver-kpi dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text, #0f172a);
}

.payroll-driver-kpi dd strong {
  font-weight: 800;
}

body[data-theme="dark"] .payroll-driver-kpi {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.12) 0%, rgba(15, 23, 42, 0.9) 55%);
  border-color: rgba(148, 163, 184, 0.25);
}

/* Parámetros legales anuales (Gestión humana) */
.payroll-legal-panel {
  padding: 0;
  overflow: hidden;
}

.payroll-legal-panel__head {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line, #e2e8f0);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.5) 0%, #ffffff 100%);
}

.payroll-legal-panel__head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.payroll-legal-panel__head p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.payroll-legal-panel__brand {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.payroll-legal-panel__body {
  padding: 1rem 1.15rem 1.15rem;
}

.payroll-legal-notice {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.payroll-legal-notice--info {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.payroll-legal-notice--warn {
  display: block;
}

.payroll-legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1.15rem;
  align-items: start;
}

.payroll-legal-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text, #0f172a);
}

.payroll-legal-editor-year {
  color: var(--primary-dark, #1e40af);
}

.payroll-legal-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.65rem 1rem;
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.65) 0%, #f8fafc 55%);
}

.payroll-legal-summary > div {
  margin: 0;
}

.payroll-legal-summary dt {
  margin: 0 0 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
}

.payroll-legal-summary dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text, #0f172a);
}

.payroll-legal-form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 0.35rem;
}

.payroll-legal-form-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.payroll-legal-history__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.payroll-legal-history__count {
  font-size: 0.8rem;
}

.payroll-legal-vigencias-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: min(68vh, 720px);
  overflow: auto;
  padding-right: 0.15rem;
}

.payroll-legal-vigencia-card {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.payroll-legal-vigencia-card.is-current {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.35) 0%, #ffffff 100%);
}

.payroll-legal-vigencia-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.payroll-legal-vigencia-card__year {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.payroll-legal-vigencia-card__range {
  margin: 0.15rem 0 0;
  font-size: 0.74rem;
}

.payroll-legal-vigencia-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.65rem;
  margin: 0 0 0.6rem;
}

.payroll-legal-vigencia-card__metrics dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted, #64748b);
}

.payroll-legal-vigencia-card__metrics dd {
  margin: 0.08rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text, #0f172a);
}

.payroll-legal-vigencia-card__actions {
  justify-content: flex-end;
  gap: 0.4rem;
}

.payroll-legal-empty {
  margin: 0;
  padding: 1rem;
  text-align: center;
  border: 1px dashed var(--line, #e2e8f0);
  border-radius: 12px;
}

@media (max-width: 1024px) {
  .payroll-legal-layout {
    grid-template-columns: 1fr;
  }

  .payroll-legal-vigencias-grid {
    max-height: none;
  }
}

body[data-theme="dark"] .payroll-legal-panel__head {
  background: linear-gradient(180deg, rgba(6, 44, 43, 0.45) 0%, rgba(12, 24, 40, 0.96) 100%);
  border-bottom-color: rgba(148, 196, 255, 0.12);
}

body[data-theme="dark"] .payroll-legal-summary,
body[data-theme="dark"] .payroll-legal-vigencia-card.is-current {
  background: linear-gradient(135deg, rgba(6, 44, 43, 0.35) 0%, rgba(15, 23, 42, 0.92) 55%);
  border-color: rgba(52, 211, 153, 0.22);
}

body[data-theme="dark"] .payroll-legal-vigencia-card {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .payroll-legal-notice--info {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.2);
}

/* Cabecera RRHH / Contratación: título + conmutador Registrar | Consultar */
.hr-workspace-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line, #e2e8f0);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.hr-workspace-header--payroll {
  border-color: color-mix(in srgb, #10b981 22%, var(--line));
  background: linear-gradient(145deg, rgba(236, 253, 245, 0.55) 0%, #ffffff 42%, #f8fafc 100%);
}

.hr-workspace-header--hiring {
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
  background: linear-gradient(145deg, rgba(var(--brand-blue-soft-rgb), 0.35) 0%, #ffffff 42%, #f8fafc 100%);
}

.hr-workspace-header .payroll-module-head--compact {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hr-workspace-header__switch {
  flex: 1 1 18rem;
  max-width: 36rem;
  min-width: min(100%, 16rem);
}

.hr-workspace-tabs--switch {
  display: flex;
  width: 100%;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(241, 245, 249, 0.95);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.hr-workspace-tab--switch {
  flex: 1 1 0;
  min-width: 9.5rem;
  min-height: 2.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font: inherit;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.14s ease;
}

.hr-workspace-tab--switch .hr-workspace-tab-body {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  text-align: left;
  min-width: 0;
}

.hr-workspace-tab--switch .hr-workspace-tab-label {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hr-workspace-tab--switch .hr-workspace-tab-hint {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  opacity: 0.85;
  white-space: normal;
  text-wrap: balance;
}

.hr-workspace-tab--switch .hr-workspace-tab-ico {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #64748b;
}

.hr-workspace-tab--switch:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(148, 163, 184, 0.35);
  color: #334155;
  transform: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.hr-workspace-tab--switch.is-active {
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 52%, var(--primary-dark) 100%);
  border-color: color-mix(in srgb, var(--primary-deeper) 25%, transparent);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.28);
  transform: none;
}

.hr-workspace-tab--switch.is-active .hr-workspace-tab-ico {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.hr-workspace-tab--switch.is-active .hr-workspace-tab-hint {
  opacity: 0.92;
}

.hr-module-pro--payroll .hr-workspace-tab--switch.is-active {
  background: linear-gradient(180deg, #34d399 0%, #10b981 48%, #059669 100%);
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.28);
}

@media (max-width: 720px) {
  .hr-workspace-header {
    flex-direction: column;
    align-items: stretch;
  }

  .hr-workspace-header__switch {
    max-width: none;
    width: 100%;
  }

  .hr-workspace-tab--switch .hr-workspace-tab-hint {
    display: none;
  }

  .hr-workspace-tab--switch {
    min-height: 2.55rem;
  }
}

.hr-workspace-tabs--segment {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.28rem;
  border-radius: 12px;
  border: 1px solid var(--line, #e2e8f0);
  background: #f8fafc;
  box-shadow: none;
  width: fit-content;
  max-width: 100%;
}

.hr-workspace-tab--segment {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0.45rem 1rem;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted, #64748b);
}

.hr-workspace-tab--segment:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text, #0f172a);
  transform: none;
}

.hr-workspace-tab--segment.is-active {
  background: var(--white, #fff);
  color: var(--primary-dark, #1e40af);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.payroll-module--clean .payroll-data-toolbar--compact {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  gap: 0.55rem;
}

.payroll-data-nav--minimal {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  gap: 0.35rem;
}

.payroll-data-nav--minimal .payroll-data-nav-tab {
  flex: 0 1 auto;
  box-shadow: none;
  border-radius: 999px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--white, #fff);
  padding: 0.38rem 0.72rem;
  font-size: 0.82rem;
}

.payroll-data-nav--minimal .payroll-data-nav-tab.is-active {
  background: var(--primary, #3b82f6);
  border-color: transparent;
  color: #fff;
  box-shadow: none;
}

.payroll-data-nav--minimal .payroll-data-nav-ico {
  display: none;
}

.payroll-data-nav--minimal .payroll-data-nav-count {
  margin-left: 0.35rem;
  min-width: 1.25rem;
  font-size: 0.72rem;
}

.payroll-module--clean .payroll-operate-panel,
.payroll-module--clean.hiring-shell--workspace .payroll-operate-panel {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.payroll-module--clean .payroll-result-meta {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
}

.payroll-module--clean .hiring-table-wrap {
  margin-top: 0;
}

/* Liquidación masiva (panel compacto dentro de nómina) */
.payroll-bulk-panel {
  margin: 0.85rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: linear-gradient(180deg, rgba(var(--brand-blue-soft-rgb), 0.22), rgba(255, 255, 255, 0.98));
}

.payroll-bulk-panel__intro {
  margin-bottom: 0.65rem;
}

.payroll-bulk-title {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.payroll-bulk-lead {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.payroll-bulk-fields {
  display: grid;
  gap: 0.65rem;
}

.payroll-bulk-field input[type="date"] {
  max-width: 14rem;
}

.payroll-bulk-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line, #e2e8f0);
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}

.payroll-bulk-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0.1rem 0 0;
  cursor: pointer;
  accent-color: var(--primary, #3b82f6);
}

.payroll-bulk-option__copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.payroll-bulk-option__label {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text, #0f172a);
}

.payroll-bulk-option__hint {
  font-size: 0.76rem;
  line-height: 1.35;
}

.payroll-bulk-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}

.payroll-bulk-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.payroll-bulk-generate-btn .btn-icon {
  width: 1rem;
  height: 1rem;
}

.payroll-bulk-generate-btn[aria-busy="true"] {
  opacity: 0.88;
  pointer-events: none;
}

.modal-card--payroll-bulk-result {
  width: min(520px, 94vw);
}

.payroll-bulk-result-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.payroll-bulk-result-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-size: 0.82rem;
  background: #f1f5f9;
}

.payroll-bulk-result-stat--ok {
  background: #ecfdf5;
  color: #065f46;
}

.payroll-bulk-result-stat--ok strong {
  color: #047857;
}

.payroll-bulk-result-stat--skip {
  background: #fffbeb;
  color: #92400e;
}

.payroll-bulk-result-stat--skip strong {
  color: #b45309;
}

.payroll-bulk-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: min(42vh, 320px);
  overflow-y: auto;
}

.payroll-bulk-result-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line, #e2e8f0);
  background: #f8fafc;
}

.payroll-bulk-result-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text, #0f172a);
}

.payroll-bulk-result-reason {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted, #64748b);
}

.payroll-bulk-result-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

body[data-theme="dark"] .payroll-bulk-panel {
  background: linear-gradient(180deg, rgba(24, 36, 68, 0.5), rgba(15, 23, 42, 0.65));
  border-color: rgba(148, 163, 184, 0.2);
}

body[data-theme="dark"] .payroll-bulk-option {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .payroll-bulk-option__label {
  color: #e2e8f0;
}

body[data-theme="dark"] .payroll-bulk-result-list li {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.16);
}

.payroll-module--clean .auth-tabs-bar {
  border-bottom: 1px solid var(--line, #e2e8f0);
  margin-bottom: 0.65rem;
}

.payroll-module--clean .hr-form-card .p-card-header p,
.payroll-module--clean .hr-action-card__copy p {
  font-size: 0.82rem;
}

.payroll-employees-grid.directory-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.directory-card--compact {
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--white, #fff);
  box-shadow: none;
}

.directory-card--compact::before {
  display: none;
}

.directory-card--compact:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transform: none;
}

.directory-card__compact-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.65rem 0.85rem;
  align-items: center;
}

.directory-card--compact .directory-card__avatar {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 0.78rem;
}

.directory-card__compact-main {
  min-width: 0;
}

.directory-card--compact .directory-card__title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

.directory-card--compact .directory-card__subline {
  margin: 0.12rem 0 0;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directory-card__compact-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
}

.directory-card__compact-actions {
  justify-content: flex-end;
}

.directory-card--compact .directory-card__ops {
  margin-top: 0.5rem;
}

.payroll-module--clean .payroll-run-cards-grid {
  gap: 0.55rem;
}

.payroll-run-card--compact {
  padding: 0.55rem 0.72rem 0.5rem;
  border-radius: 12px;
  border-width: 1px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  min-height: 0;
  justify-content: flex-start;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.payroll-run-card--compact:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.1);
}

.payroll-run-card--compact .payroll-run-card-head {
  align-items: center;
  gap: 0.5rem;
}

.payroll-run-card--compact .payroll-run-card-kicker {
  margin-bottom: 0.08rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #64748b;
}

.payroll-run-card--compact .payroll-run-card-kicker {
  font-size: 0.68rem;
}

.payroll-run-card--compact .payroll-run-card-title {
  font-size: 0.95rem;
  line-height: 1.22;
}

.payroll-run-card--compact .status {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.22rem 0.62rem;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}

.payroll-run-card--compact .payroll-run-card-actions {
  gap: 0.42rem;
}

.payroll-run-card--compact .payroll-run-card-actions > .btn {
  flex: 0 0 2.05rem;
  width: 2.05rem;
  height: 1.9rem;
  padding: 0;
  border-radius: 0.68rem;
  justify-content: center;
}

.payroll-run-card--compact .payroll-run-card-actions > .btn svg,
.payroll-run-card--compact .payroll-run-card-actions > .btn i {
  margin: 0;
}

.payroll-run-card--compact .payroll-run-card-employee {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.payroll-employee-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: flex-end;
  margin-bottom: 0.65rem;
}

.payroll-employee-search {
  flex: 1 1 12rem;
  min-width: 0;
}

@media (max-width: 720px) {
  .directory-card__compact-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .directory-card__compact-meta,
  .directory-card__compact-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

body[data-theme="dark"] .payroll-module-head--compact {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.2);
}

body[data-theme="dark"] .payroll-module-kpi__item {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .payroll-module-kpi__item dt,
body[data-theme="dark"] .payroll-module-kpi__item dd {
  color: #94a3b8;
}

body[data-theme="dark"] .payroll-module-kpi__item dd strong {
  color: #f1f5f9;
}

body[data-theme="dark"] .payroll-module-kpi__item--ok {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.35);
}

body[data-theme="dark"] .payroll-module-kpi__item--neutral {
  background: rgba(15, 23, 42, 0.5);
}

body[data-theme="dark"] .payroll-module-kpi__item--warn {
  background: rgba(120, 53, 15, 0.35);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fcd34d;
}

body[data-theme="dark"] .payroll-module-kpi__item--warn dt,
body[data-theme="dark"] .payroll-module-kpi__item--warn dd {
  color: #fde68a;
}

body[data-theme="dark"] .payroll-module-kpi__item--warn dd strong {
  color: #fef3c7;
}

body[data-theme="dark"] .payroll-module-kpi__item--alert {
  background: rgba(127, 29, 29, 0.35);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

body[data-theme="dark"] .payroll-module-kpi__item--alert dt,
body[data-theme="dark"] .payroll-module-kpi__item--alert dd {
  color: #fecaca;
}

body[data-theme="dark"] .payroll-module-kpi__item--alert dd strong {
  color: #fee2e2;
}

body[data-theme="dark"] .hr-workspace-header {
  background: linear-gradient(180deg, rgba(18, 32, 52, 0.98) 0%, rgba(12, 24, 40, 0.96) 100%);
  border-color: rgba(148, 196, 255, 0.16);
  box-shadow: 0 8px 24px rgba(2, 8, 18, 0.35);
}

body[data-theme="dark"] .hr-workspace-header--payroll {
  background: linear-gradient(145deg, rgba(6, 44, 43, 0.5) 0%, rgba(12, 24, 40, 0.96) 55%);
}

body[data-theme="dark"] .hr-workspace-header--hiring {
  background: linear-gradient(145deg, rgba(29, 37, 79, 0.45) 0%, rgba(12, 24, 40, 0.96) 55%);
}

body[data-theme="dark"] .hr-workspace-tabs--switch {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(148, 196, 255, 0.14);
}

body[data-theme="dark"] .hr-workspace-tab--switch {
  color: #94a3b8;
}

body[data-theme="dark"] .hr-workspace-tab--switch:hover {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
}

body[data-theme="dark"] .hr-workspace-tab--switch.is-active {
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  color: #f3f9ff;
}

body[data-theme="dark"] .hr-module-pro--payroll .hr-workspace-tab--switch.is-active {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
}

body[data-theme="dark"] .hr-workspace-tabs--segment {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.2);
}

body[data-theme="dark"] .hr-workspace-tab--segment.is-active {
  background: rgba(30, 41, 59, 0.95);
  color: #93c5fd;
}

body[data-theme="dark"] .directory-card--compact {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.18);
}

.payroll-insight-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  background: linear-gradient(160deg, rgba(45, 212, 191, 0.12) 0%, rgba(255, 255, 255, 0.98) 56%, rgba(240, 253, 250, 0.96) 100%);
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.08);
}

.hiring-shell--workspace .payroll-insight-strip {
  border-color: rgba(var(--primary-rgb), 0.16);
  background: linear-gradient(160deg, rgba(var(--brand-blue-soft-rgb), 0.2) 0%, rgba(255, 255, 255, 0.98) 56%, rgba(244, 247, 255, 0.96) 100%);
  box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.08);
}

.payroll-insight-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f766e;
  margin-bottom: 0.25rem;
}

.hiring-shell--workspace .payroll-insight-label {
  color: var(--brand-blue-deep);
}

.payroll-insight-value {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--text);
}

.payroll-data-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.hiring-shell--workspace .payroll-data-toolbar {
  border-color: rgba(var(--primary-rgb), 0.12);
  box-shadow: 0 10px 26px rgba(var(--primary-rgb), 0.07);
}

.payroll-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.payroll-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.16s ease;
}

.payroll-quick-pill:hover {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  color: var(--primary);
  box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-1px);
}

.payroll-quick-pill.is-active {
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

body[data-theme="dark"] .payroll-quick-pill {
  background: linear-gradient(180deg, #17314c 0%, #12263d 100%);
  border-color: #4a729e;
  color: #dbeafe;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .payroll-quick-pill:hover {
  background: linear-gradient(180deg, #1c3d5e 0%, #16314d 100%);
  border-color: #6797c7;
  color: #ffffff;
}

body[data-theme="dark"] .payroll-quick-pill.is-active {
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  border-color: rgba(173, 214, 255, 0.28);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

.payroll-data-toolbar-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.7rem 0.85rem;
  align-items: end;
}

.payroll-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  min-width: 0;
}

.payroll-filter-field select {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.52rem 0.68rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  font-size: 0.9rem;
}

.payroll-filters-advanced {
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: #ffffff;
}

.payroll-filters-advanced[open] {
  border-color: rgba(var(--primary-rgb), 0.26);
  box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.08);
}

.payroll-filters-advanced__summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  margin: 0.35rem;
  border-radius: 10px;
  color: #334155;
  font-weight: 700;
  font-size: 0.9rem;
  user-select: none;
}

.payroll-filters-advanced__summary::-webkit-details-marker {
  display: none;
}

.payroll-filters-advanced__summary:hover {
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary-dark);
}

.payroll-filters-advanced > .payroll-data-toolbar-filters {
  padding: 0.25rem 0.75rem 0.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.payroll-filters-advanced .payroll-filter-field {
  gap: 0.32rem;
}

.payroll-filters-advanced .payroll-filter-field select {
  min-height: 2.5rem;
  border-radius: 9px;
}

.payroll-filters-advanced .payroll-filters-reset {
  height: 2.5rem;
  align-self: end;
}

.payroll-data-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.42rem;
  border-radius: 14px;
  border: 1px solid rgba(20, 184, 166, 0.16);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.96));
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.06);
}

.payroll-data-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 8.5rem;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.16s ease;
}

.payroll-data-nav-tab:hover {
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  color: var(--primary);
  box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-1px);
}

.payroll-data-nav-tab.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

.payroll-data-nav-ico svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.payroll-data-nav-count {
  margin-left: auto;
  min-width: 1.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--primary) 14%, #ffffff);
  color: var(--primary-deeper);
}

.payroll-data-nav-tab.is-active .payroll-data-nav-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

body[data-theme="dark"] .payroll-insight-strip {
  border-color: rgba(94, 234, 212, 0.18);
  background: linear-gradient(160deg, rgba(13, 47, 47, 0.92), rgba(12, 24, 40, 0.96));
  box-shadow: 0 14px 30px rgba(2, 8, 18, 0.42);
}

body[data-theme="dark"] .hiring-shell--workspace .payroll-insight-strip {
  border-color: rgba(148, 196, 255, 0.16);
  background: linear-gradient(160deg, rgba(24, 36, 68, 0.94), rgba(12, 24, 40, 0.96));
}

body[data-theme="dark"] .payroll-insight-label {
  color: #7dd3fc;
}

body[data-theme="dark"] .payroll-insight-value {
  color: #e2e8f0;
}

body[data-theme="dark"] .payroll-data-toolbar {
  border-color: rgba(148, 196, 255, 0.14);
  background: linear-gradient(180deg, rgba(17, 30, 49, 0.96), rgba(12, 24, 40, 0.94));
  box-shadow: 0 14px 30px rgba(2, 8, 18, 0.42);
}

body[data-theme="dark"] .hiring-shell--workspace .payroll-data-toolbar {
  border-color: rgba(148, 196, 255, 0.14);
  background: linear-gradient(180deg, rgba(17, 30, 52, 0.96), rgba(12, 24, 40, 0.94));
}

body[data-theme="dark"] .payroll-filter-field select {
  border-color: rgba(148, 196, 255, 0.18);
  background: linear-gradient(180deg, rgba(18, 32, 52, 0.96), rgba(12, 24, 40, 0.94));
  color: #e2e8f0;
}

body[data-theme="dark"] .payroll-filters-advanced {
  background: #0f172a;
  border-color: #334155;
}

body[data-theme="dark"] .payroll-filters-advanced[open] {
  border-color: rgba(148, 197, 255, 0.36);
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.35);
}

body[data-theme="dark"] .payroll-filters-advanced__summary {
  color: #cbd5e1;
}

body[data-theme="dark"] .payroll-filters-advanced__summary:hover {
  background: rgba(148, 197, 255, 0.12);
  color: #e2e8f0;
}

body[data-theme="dark"] .payroll-filters-advanced > .payroll-data-toolbar-filters {
  border-top-color: #334155;
}

body[data-theme="dark"] .payroll-data-nav {
  border-color: rgba(45, 212, 191, 0.16);
  background: linear-gradient(180deg, rgba(11, 33, 33, 0.92), rgba(12, 24, 40, 0.95));
  box-shadow: 0 14px 28px rgba(2, 8, 18, 0.38);
}

body[data-theme="dark"] .payroll-data-nav-tab {
  background: linear-gradient(180deg, #17314c 0%, #12263d 100%);
  border-color: #4a729e;
  color: #dbeafe;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .payroll-data-nav-tab:hover {
  background: linear-gradient(180deg, #1c3d5e 0%, #16314d 100%);
  border-color: #6797c7;
  color: #ffffff;
}

body[data-theme="dark"] .payroll-data-nav-tab.is-active {
  color: #fff;
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  border-color: rgba(173, 214, 255, 0.28);
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

body[data-theme="dark"] .payroll-data-nav-count {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

body[data-theme="dark"] .payroll-data-nav-tab.is-active .payroll-data-nav-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.payroll-data-panes {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.payroll-data-pane {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.payroll-result-meta {
  margin: 0;
  font-size: 0.86rem;
}

.payroll-table-shell {
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.payroll-table-shell .table-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.payroll-module--v2 .emp-cell-name {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.payroll-module--v2 .emp-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.payroll-run-cards-grid {
  display: grid;
  grid-template-columns: var(--ops-tile-grid, repeat(auto-fill, minmax(min(100%, 17.25rem), 19.5rem)));
  justify-content: start;
  gap: var(--ops-cards-gap, 0.75rem);
}

.payroll-run-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(20, 184, 166, 0.2);
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.08);
}

.payroll-run-card--pending {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.1);
}

.payroll-run-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
}

.payroll-run-card-kicker {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.payroll-run-card-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  color: #0f172a;
}

.payroll-run-card-employee {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  color: #475569;
}

.payroll-run-card-actions {
  flex-wrap: wrap;
  gap: 0.35rem;
}

.payroll-run-card-actions > .btn {
  flex: 1 1 10.5rem;
  min-width: 0;
  justify-content: center;
}

.payroll-table-fallback {
  margin-top: 0.5rem;
}

.payroll-table-fallback summary {
  cursor: pointer;
  list-style: none;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.payroll-table-fallback summary::-webkit-details-marker {
  display: none;
}

@media (max-width: 720px) {
  .payroll-insight-strip {
    grid-template-columns: 1fr;
  }

  .payroll-data-nav-tab {
    flex: 1 1 100%;
  }
}

/**
 * Barra de pestañas modernizada para Gestión humana y Contratación.
 * Diseño plano con acento activo de bloque sólido y tipografía
 * compacta (sin "hints" descriptivos para no saturar la cabecera).
 */
.hr-workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.25rem;
  padding: 0.32rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.hr-workspace-tab {
  flex: 1 1 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.55rem 0.95rem;
  background: transparent;
  color: #475569;
  font: inherit;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.16s ease;
}

.hr-workspace-tab:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
  border-color: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary);
  box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-1px);
}

.hr-workspace-tab:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.55);
  outline-offset: 2px;
}

.hr-workspace-tab--pro.is-active {
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

.hiring-shell--workspace .hr-workspace-tab--pro.is-active {
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

.hr-workspace-tab-num {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
  background: rgba(15, 23, 42, 0.06);
}

.hr-workspace-tab.is-active .hr-workspace-tab-num {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.hiring-shell--workspace .hr-workspace-tab-num {
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--brand-blue-deep);
}

.hiring-shell--workspace .hr-workspace-tab.is-active .hr-workspace-tab-num {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.hr-workspace-tab-body {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.hr-workspace-tab-label {
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.hr-workspace-tab-hint {
  display: none;
  font-size: 0.72rem;
  font-weight: 500;
  color: inherit;
  opacity: 0.82;
  line-height: 1.25;
}

@media (min-width: 720px) {
  .hr-workspace-tab--pro .hr-workspace-tab-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.08rem;
  }

  .hr-workspace-tab--pro .hr-workspace-tab-hint {
    display: block;
    white-space: nowrap;
  }

  .hr-workspace-tab--pro.is-active .hr-workspace-tab-hint {
    opacity: 0.9;
  }
}

.hr-workspace-tabs--pro {
  gap: 0.25rem;
  padding: 0.32rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hiring-shell--workspace .hr-workspace-tabs--pro {
  border-color: rgba(var(--primary-rgb), 0.2);
  background: linear-gradient(180deg, #ffffff, rgba(var(--brand-blue-soft-rgb), 0.38));
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.1);
}

.hr-workspace-tab--pro {
  min-height: 2.55rem;
  align-items: center;
  border-radius: 10px;
}

.hr-workspace-tab--pro.is-active {
  transform: none;
}

.hr-workspace-tab-ico {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #64748b;
  transition: color 0.18s ease;
}

.hiring-shell--workspace .hr-workspace-tab-ico {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--brand-blue-deep);
}

.hr-workspace-tab--has-icon.is-active .hr-workspace-tab-ico,
.hiring-shell--workspace .hr-workspace-tab--has-icon.is-active .hr-workspace-tab-ico {
  background: transparent;
  border: 0;
  color: #ffffff;
}

.hr-tab-icon-svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
  color: currentColor;
}

.hiring-shell--workspace .hr-tab-icon-svg {
  color: currentColor;
}

.hr-module-pro.payroll-shell--workspace,
.hr-module-pro.hiring-shell--workspace {
  padding-bottom: 0.15rem;
}

.hr-module-pro.payroll-shell--workspace .ops-module-head--rich,
.hr-module-pro.hiring-shell--workspace .ops-module-head--rich {
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 12px 36px rgba(10, 46, 92, 0.07);
}

.hr-module-pro.hiring-shell--workspace .ops-module-head-hiring.ops-module-head--rich {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 12px 36px rgba(var(--primary-rgb), 0.07);
}

.hr-module-pro.payroll-shell--workspace .ops-command-bar,
.hr-module-pro.hiring-shell--workspace .ops-command-bar {
  border-radius: 14px;
  border-color: rgba(var(--primary-rgb), 0.16);
  box-shadow: 0 6px 22px rgba(var(--primary-rgb), 0.05);
}

.hr-module-pro.hiring-shell--workspace .ops-command-bar {
  border-color: rgba(var(--primary-rgb), 0.26);
  background: linear-gradient(180deg, #ffffff, rgba(var(--brand-blue-soft-rgb), 0.35));
}

.hr-workspace-panels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hr-flow-shell .p-form {
  gap: 0.86rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hr-flow-shell .p-form label {
  padding: 0.62rem 0.78rem;
}

.hr-flow-shell .form-section {
  padding: 0.82rem 0.9rem 0.94rem;
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.hr-flow-shell .form-section-grid {
  gap: 0.72rem 0.95rem;
}

.hr-workspace-panel:not(.hidden) {
  animation: hr-panel-in 0.22s ease-out;
}

.hr-workspace-panel.tab-switch-instant:not(.hidden) {
  animation: none !important;
}

@keyframes hr-panel-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hr-workspace-panel:not(.hidden) {
    animation: none;
  }
}

.hr-workspace-intro {
  margin: 0.55rem 0 0;
  font-size: 0.86rem;
  line-height: 1.48;
  max-width: 46rem;
}

.hr-enterprise-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.75rem;
  margin-top: 0.65rem;
  padding: 0.62rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--primary-rgb), 0.28);
  background: linear-gradient(
    95deg,
    rgba(var(--brand-blue-soft-rgb), 0.72),
    rgba(240, 249, 255, 0.55)
  );
  font-size: 0.81rem;
  line-height: 1.45;
  color: #2d4f62;
}

.hr-enterprise-strip--hiring {
  border-color: rgba(var(--primary-mid-rgb), 0.45);
  background: linear-gradient(
    95deg,
    rgba(var(--brand-blue-soft-rgb), 0.92),
    rgba(var(--primary-mid-rgb), 0.12)
  );
}

.hr-enterprise-strip-label {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary-dark);
}

.hr-enterprise-strip--hiring .hr-enterprise-strip-label {
  color: var(--brand-blue-deep);
}

.hr-enterprise-strip-text {
  flex: 1 1 220px;
  min-width: 0;
}

body[data-theme="dark"] .hr-enterprise-strip {
  border-color: rgba(var(--primary-mid-rgb), 0.35);
  background: linear-gradient(95deg, rgba(var(--primary-rgb), 0.18), rgba(15, 40, 62, 0.65));
  color: #cfe9fc;
}

body[data-theme="dark"] .hr-enterprise-strip--hiring {
  border-color: rgba(var(--primary-mid-rgb), 0.42);
  background: linear-gradient(
    95deg,
    rgba(var(--primary-mid-rgb), 0.16),
    rgba(15, 40, 62, 0.62)
  );
}

body[data-theme="dark"] .hr-enterprise-strip-label {
  color: var(--brand-blue-mid);
}

body[data-theme="dark"] .hr-enterprise-strip--hiring .hr-enterprise-strip-label {
  color: #b8dcfb;
}

.hr-workspace-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.hr-workspace-jump-btn.btn-primary {
  flex: 1 1 min(240px, 100%);
  justify-content: center;
  min-height: auto;
  padding: 0.7rem 1.2rem;
  font-size: 0.92rem;
  letter-spacing: normal;
  border-radius: var(--radius-sm);
}

.hr-workspace-jump-btn.btn-primary:focus-visible {
  outline: 3px solid rgba(var(--primary-mid-rgb), 0.55);
  outline-offset: 3px;
}

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

.ops-command-cluster {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  min-width: 0;
  flex: 1 1 auto;
}

.ops-command-cluster-label {
  margin: 0;
  padding-left: 0.06rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: #5f7ea1;
}

.hr-module-pro--payroll .ops-command-cluster:first-of-type .ops-command-cluster-label {
  color: #0f766e;
}

.hr-module-pro--hiring .ops-command-cluster:first-of-type .ops-command-cluster-label {
  color: #4338ca;
}

.hr-workspace-quicknav {
  margin-top: 1rem;
}

.hr-workspace-quicknav-label {
  margin: 0 0 0.45rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #567fad;
}

.hr-module-pro .hr-workspace-jumps {
  margin-top: 0;
}

.fleet-hero-strip--solo.fleet-hero-strip--hr-payroll {
  background: linear-gradient(125deg, #0c4a6e 0%, #0f766e 48%, #0891b2 100%);
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.28);
}

.fleet-hero-strip--solo.fleet-hero-strip--hr-hiring {
  background: linear-gradient(125deg, #3730a3 0%, #4f46e5 46%, #2563eb 100%);
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.26);
}

.hr-module-pro--payroll .hr-workspace-tabs--pro {
  border-color: rgba(20, 184, 166, 0.18);
}

.hr-module-pro--hiring .hr-workspace-tabs--pro {
  border-color: rgba(99, 102, 241, 0.22);
}

.hr-module-pro--payroll .hr-workspace-tab--pro.is-active {
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

.hr-module-pro--payroll .hr-workspace-tab-ico {
  color: #0f766e;
}

.hr-module-pro--hiring .hr-workspace-tab-ico {
  color: #4f46e5;
}

.hr-module-pro.payroll-shell--workspace .ops-module-head--rich {
  border-left: 4px solid #14b8a6;
}

.hr-module-pro.hiring-shell--workspace .ops-module-head-hiring.ops-module-head--rich {
  border-left: 4px solid #6366f1;
}

.hr-module-pro.payroll-shell--workspace .ops-module-title h2,
.hr-module-pro.hiring-shell--workspace .ops-module-title h2 {
  font-size: 1.26rem;
  line-height: 1.28;
}

@media (min-width: 720px) {
  .hr-module-pro.payroll-shell--workspace .ops-module-title h2,
  .hr-module-pro.hiring-shell--workspace .ops-module-title h2 {
    font-size: 1.38rem;
  }
}

.hr-overview-guide {
  margin: 0.95rem 0 0;
  padding: 0.88rem 1rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  background: linear-gradient(145deg, rgba(var(--brand-blue-soft-rgb), 0.42), rgba(255, 255, 255, 0.98));
  box-shadow: 0 6px 22px rgba(var(--primary-rgb), 0.06);
}

.hr-overview-guide--payroll {
  border-left: 4px solid #14b8a6;
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.12), rgba(255, 255, 255, 0.97));
}

.hr-overview-guide--hiring {
  border-left: 4px solid #6366f1;
  background: linear-gradient(145deg, rgba(129, 140, 248, 0.16), rgba(255, 255, 255, 0.97));
}

.hr-overview-guide-kicker {
  margin: 0 0 0.32rem;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #446d93;
}

.hr-overview-guide-lead {
  margin: 0 0 0.62rem;
  font-size: 0.875rem;
  line-height: 1.52;
  color: #29455e;
  max-width: 48rem;
}

.hr-overview-guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.85rem;
  line-height: 1.48;
  color: #374e66;
}

.hr-overview-guide-steps li {
  display: grid;
  grid-template-columns: 1.65rem 1fr;
  gap: 0.62rem;
  align-items: flex-start;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.hr-overview-guide--payroll .hr-overview-guide-steps li {
  border-color: rgba(20, 184, 166, 0.22);
}

.hr-overview-guide--hiring .hr-overview-guide-steps li {
  border-color: rgba(99, 102, 241, 0.22);
}

.hr-overview-guide-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, #0891b2);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.32);
  flex-shrink: 0;
}

.hr-overview-guide--hiring .hr-overview-guide-step-num {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.32);
}

.hr-overview-guide-steps strong {
  color: #17324d;
  display: inline-block;
  margin-right: 0.3rem;
}

.hr-flow-block--step {
  position: relative;
  padding-left: 0.95rem;
}

.hr-flow-step-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  padding-right: 0.4rem;
}

.hr-flow-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.32);
}

.hr-flow-step-head h3 {
  margin: 0 0 0.18rem !important;
  font-size: 1.04rem !important;
  letter-spacing: -0.01em;
  color: #17324d;
  text-transform: none !important;
}

.hr-flow-step-lead {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.45;
}

.hr-module-pro--hiring .hr-flow-block--step {
  border-color: rgba(99, 102, 241, 0.18);
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.7), rgba(248, 250, 255, 0.98));
}

.hr-module-pro--hiring .hr-flow-block--step[data-flow-step="2"] .hr-flow-step-num {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.34);
}

.hr-module-pro .ops-block-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.22rem;
}

.hr-module-pro .ops-block-head h3 {
  font-size: 1rem;
  letter-spacing: -0.015em;
  text-transform: none;
  color: var(--text-main, #17324d);
}

.hr-module-pro .ops-block-lead.muted {
  font-size: 0.835rem;
  line-height: 1.45;
}

@media (max-width: 920px) {
  .hr-module-pro .ops-command-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .hr-module-pro .ops-command-cluster {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .hr-workspace-jump-btn.btn-primary {
    flex: 1 1 100%;
  }
}

.hr-flow-shell .fleet-hero-strip {
  transition: padding 0.2s ease, opacity 0.2s ease;
}

.hr-flow-shell .fleet-hero-strip {
  padding: 0.4rem 0.55rem;
  opacity: 0.96;
}

.hr-flow-shell .fleet-hero-metric span {
  font-size: 0.68rem;
}

.hr-flow-shell .fleet-hero-metric strong {
  font-size: 0.98rem;
}

.hr-flow-shell[data-hr-workspace="operate"] .payroll-actions-grid,
.hr-flow-shell[data-hr-workspace="operate"] .hiring-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

@media (min-width: 900px) {
  .hr-flow-shell[data-hr-workspace="operate"] .payroll-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hr-flow-shell[data-hr-workspace="operate"] .payroll-actions-grid > .p-card,
.hr-flow-shell[data-hr-workspace="operate"] .payroll-actions-grid > .hr-action-card,
.hr-flow-shell[data-hr-workspace="operate"] .hiring-actions-grid > .p-card,
.hr-flow-shell[data-hr-workspace="operate"] .hiring-actions-grid > .hr-action-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hr-flow-shell[data-hr-workspace="operate"] .payroll-actions-grid > .p-card.p-card--expanded,
.hr-flow-shell[data-hr-workspace="operate"] .payroll-actions-grid > .hr-action-card.hr-action-card--open,
.hr-flow-shell[data-hr-workspace="operate"] .hiring-actions-grid > .p-card.p-card--expanded,
.hr-flow-shell[data-hr-workspace="operate"] .hiring-actions-grid > .hr-action-card.hr-action-card--open {
  grid-column: 1 / -1;
}

.hr-flow-shell[data-hr-workspace="operate"] .p-card-body .hr-form-flow {
  padding-bottom: 0.25rem;
}

.hr-create-toolbar {
  margin-bottom: 0.65rem;
}

/* Controles homologados: minimizar / cancelar / enviar en todos los módulos */
.module-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.module-panel-actions {
  width: 100%;
  grid-column: 1 / -1;
}

.module-panel-actions__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 0.85rem;
  width: 100%;
}

.module-panel-actions--wizard .module-panel-actions__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 0.85rem;
  width: 100%;
  min-width: 0;
}

.module-panel-actions__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.module-panel-actions__group--secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: 14px;
  background: color-mix(in srgb, #f1f5f9 78%, transparent);
  border: 1px solid color-mix(in srgb, #94a3b8 16%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 3px rgba(15, 23, 42, 0.04);
}

.module-panel-actions__group--tools {
  justify-content: center;
  min-width: 0;
}

.module-panel-actions__group--tools .btn {
  min-height: 2.5rem;
  border-radius: 11px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.module-panel-actions__group--primary {
  margin-inline-start: auto;
  justify-content: flex-end;
}

.module-panel-actions--wizard .module-panel-actions__group {
  min-width: 0;
  flex: 0 1 auto;
}

.module-panel-actions--wizard .module-panel-actions__group--secondary {
  margin-inline-end: auto;
}

.module-panel-actions--wizard .module-panel-actions__group--primary {
  margin-inline-start: 0;
}

.module-panel-actions--wizard .module-panel-actions__group--tools {
  justify-content: center;
}

.module-panel-btn__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  line-height: 1.1;
}

.module-panel-btn__label {
  white-space: nowrap;
}

/* ── Footer actions bar: separador visual elevado ── */
.module-panel-actions--footer .module-panel-actions__bar {
  position: relative;
  padding: 0.85rem 1rem 0.8rem;
  margin-top: 0.5rem;
  border-top: 2px solid color-mix(in srgb, var(--primary, #377cc0) 14%, #e2e8f0);
  border-radius: 0 0 14px 14px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--primary, #377cc0) 4%, #f8fafc) 0%,
    #f1f5f9 100%
  );
}

body[data-theme="dark"] .module-panel-actions--footer .module-panel-actions__bar {
  border-top-color: color-mix(in srgb, var(--primary, #377cc0) 22%, rgba(255,255,255,0.06));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--primary, #377cc0) 8%, rgba(15, 23, 42, 0.6)) 0%,
    rgba(15, 23, 42, 0.4) 100%
  );
}

.module-panel-actions--footer .module-panel-btn:not(.btn-primary),
.module-panel-toolbar .module-panel-btn:not(.btn-primary) {
  --mpa-btn-bg: rgba(255, 255, 255, 0.92);
  --mpa-btn-edge: color-mix(in srgb, #94a3b8 28%, transparent);
  --mpa-btn-icon-bg: color-mix(in srgb, var(--primary) 9%, #f8fafc);
  --mpa-btn-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(15, 23, 42, 0.05),
    0 2px 6px rgba(15, 23, 42, 0.04);
  min-height: 2.45rem;
  padding-inline: 0.9rem 1.05rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  color: #475569;
  border: 1px solid var(--mpa-btn-edge);
  background: var(--mpa-btn-bg);
  box-shadow: var(--mpa-btn-shadow);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.16s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.module-panel-toolbar .module-panel-btn {
  min-height: 2.4rem;
  padding-inline: 0.8rem 0.95rem;
  border-radius: 10px;
  font-size: 0.78rem;
}

.module-panel-actions--footer .module-panel-btn:not(.btn-primary) .btn-icon,
.module-panel-toolbar .module-panel-btn:not(.btn-primary) .btn-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  padding: 0.32rem;
  box-sizing: content-box;
  border-radius: 7px;
  background: var(--mpa-btn-icon-bg);
  opacity: 1;
  transition: background 0.22s ease, transform 0.18s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.module-panel-btn--minimize,
.module-panel-btn--expand {
  min-width: 7rem;
  color: #64748b;
}

/* ── Cancel button: destructivo claramente visible ── */
.module-panel-btn--cancel {
  --mpa-btn-bg: color-mix(in srgb, #fff1f2 60%, rgba(255,255,255,0.9));
  --mpa-btn-edge: color-mix(in srgb, #fca5a5 38%, transparent);
  --mpa-btn-icon-bg: color-mix(in srgb, #f87171 12%, #fff);
  min-width: 6.9rem;
  margin-inline-start: 0;
  padding-inline: 0.9rem 1.05rem;
  position: relative;
  border-radius: 10px;
  color: #b91c1c;
  font-weight: 650;
}

.module-panel-btn--cancel::before {
  display: none;
}

.module-panel-btn--cancel:hover {
  color: #991b1b;
  --mpa-btn-bg: color-mix(in srgb, #fee2e2 75%, #fff);
  --mpa-btn-edge: color-mix(in srgb, #f87171 45%, transparent);
  --mpa-btn-icon-bg: color-mix(in srgb, #ef4444 16%, #fff1f2);
  --mpa-btn-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 2px 6px rgba(220, 38, 38, 0.12),
    0 8px 18px rgba(220, 38, 38, 0.16);
  transform: translateY(-1px);
}

.module-panel-btn--minimize:hover,
.module-panel-btn--expand:hover {
  color: #334155;
  --mpa-btn-bg: #fff;
  --mpa-btn-edge: color-mix(in srgb, var(--primary) 28%, #94a3b8);
  --mpa-btn-icon-bg: color-mix(in srgb, var(--primary) 14%, #f1f5f9);
  --mpa-btn-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 2px 6px rgba(15, 23, 42, 0.06),
    0 8px 20px rgba(var(--primary-rgb), 0.1);
  transform: translateY(-1px);
}

.module-panel-btn--minimize:hover .btn-icon,
.module-panel-btn--expand:hover .btn-icon,
.module-panel-btn--cancel:hover .btn-icon {
  transform: scale(1.08);
}

.module-panel-btn--minimize:active,
.module-panel-btn--expand:active,
.module-panel-btn--cancel:active {
  transform: translateY(0) scale(0.985);
}

.module-panel-btn--minimize:focus-visible,
.module-panel-btn--expand:focus-visible,
.module-panel-btn--cancel:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 2px;
}

.module-panel-btn--cancel.btn-danger-soft {
  color: #b91c1c;
  --mpa-btn-bg: color-mix(in srgb, #fff1f2 60%, rgba(255,255,255,0.9));
  --mpa-btn-edge: color-mix(in srgb, #fca5a5 38%, transparent);
  --mpa-btn-icon-bg: color-mix(in srgb, #f87171 12%, #fff);
}

.module-panel-btn--cancel.btn-danger-soft:hover {
  color: #991b1b;
  --mpa-btn-bg: color-mix(in srgb, #fee2e2 75%, #fff);
  --mpa-btn-edge: color-mix(in srgb, #f87171 45%, transparent);
  --mpa-btn-icon-bg: color-mix(in srgb, #ef4444 16%, #fff1f2);
  --mpa-btn-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 6px rgba(220, 38, 38, 0.1),
    0 8px 20px rgba(220, 38, 38, 0.14);
  transform: translateY(-1px);
}

.module-panel-btn--cancel.btn-danger-soft:hover .btn-icon {
  transform: scale(1.08);
}

.module-panel-btn--cancel.btn-danger-soft .btn-icon {
  background: color-mix(in srgb, #f87171 12%, #fff);
}

/* ── Cancel-edit: neutro, para formularios inline ── */
.module-panel-btn--cancel-edit {
  margin-inline-start: 0;
  padding-inline-start: 0.85rem;
  border-inline-start: 0;
  color: #64748b;
  --mpa-btn-bg: rgba(255, 255, 255, 0.88);
  --mpa-btn-edge: color-mix(in srgb, #94a3b8 25%, transparent);
}

.hr-action-card__head .module-panel-toolbar {
  flex: 0 0 auto;
  margin-bottom: 0;
  margin-left: auto;
}

.admin-users-session-topbar__actions .module-panel-btn--expand,
.admin-users-session-topbar__actions .module-panel-btn--minimize {
  min-width: 7.5rem;
}

.form-flow-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  width: 100%;
  grid-column: 1 / -1;
}

.form-flow-actions > .btn,
.form-flow-actions.module-panel-actions .btn {
  min-height: 2.5rem;
  border-radius: 12px;
}

.form-flow-actions > .btn-primary:last-child,
.form-flow-actions.module-panel-actions .module-panel-actions__group--primary > .btn-primary {
  margin-inline-start: 0;
}

/* CTA principal en pies de formulario — gradiente refinado 2026 */
.module-panel-actions--footer .module-panel-actions__group--primary > .btn-primary,
.module-panel-actions--footer .module-panel-actions__group--primary > .btn,
.hr-form-wizard-footer .module-panel-actions__group--primary .btn-primary,
.hr-form-wizard-footer .hr-form-wizard-submit {
  position: relative;
  isolation: isolate;
  overflow: visible;
  min-height: 2.8rem;
  padding: 0.65rem 1.55rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 42%, transparent) !important;
  background: linear-gradient(
    168deg,
    color-mix(in srgb, var(--primary) 88%, #fff) 0%,
    var(--primary) 48%,
    color-mix(in srgb, var(--primary-dark, #2a6399) 92%, #0f172a) 100%
  ) !important;
  background-image: linear-gradient(
    168deg,
    color-mix(in srgb, var(--primary) 88%, #fff) 0%,
    var(--primary) 48%,
    color-mix(in srgb, var(--primary-dark, #2a6399) 92%, #0f172a) 100%
  ) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(7, 30, 61, 0.42), 0 0 1px rgba(7, 30, 61, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 2px rgba(var(--primary-rgb), 0.18),
    0 8px 24px rgba(var(--primary-rgb), 0.28);
  transition:
    transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.22s ease;
}

.module-panel-actions--footer .module-panel-actions__group--primary > .btn-primary .module-panel-btn__label,
.module-panel-actions--footer .module-panel-actions__group--primary > .btn-primary .module-panel-btn__inner {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

.module-panel-actions--footer .module-panel-actions__group--primary > .btn-primary .btn-icon,
.hr-form-wizard-footer .module-panel-actions__group--primary .btn-primary .btn-icon,
.hr-form-wizard-footer .hr-form-wizard-submit .btn-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  padding: 0.32rem;
  box-sizing: content-box;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--primary, #2872c0) !important;
  stroke: currentColor;
  opacity: 1;
  filter: none;
  box-shadow: 0 1px 4px rgba(7, 30, 61, 0.18);
}

.module-panel-actions--footer .module-panel-actions__group--primary > .btn-primary::after,
.hr-form-wizard-footer .module-panel-actions__group--primary .btn-primary::after,
.hr-form-wizard-footer .hr-form-wizard-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}

.module-panel-actions--footer .module-panel-actions__group--primary > .btn-primary:hover:not(:disabled),
.hr-form-wizard-footer .module-panel-actions__group--primary .btn-primary:hover:not(:disabled),
.hr-form-wizard-footer .hr-form-wizard-submit:hover:not(:disabled) {
  background: linear-gradient(
    168deg,
    color-mix(in srgb, var(--primary) 82%, #fff) 0%,
    color-mix(in srgb, var(--primary) 96%, #fff) 48%,
    var(--primary-dark, #2a6399) 100%
  ) !important;
  background-image: linear-gradient(
    168deg,
    color-mix(in srgb, var(--primary) 82%, #fff) 0%,
    color-mix(in srgb, var(--primary) 96%, #fff) 48%,
    var(--primary-dark, #2a6399) 100%
  ) !important;
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 2px 4px rgba(var(--primary-rgb), 0.2),
    0 14px 32px rgba(var(--primary-rgb), 0.34);
}

.module-panel-actions--footer .module-panel-actions__group--primary > .btn-primary:hover:not(:disabled)::after,
.hr-form-wizard-footer .module-panel-actions__group--primary .btn-primary:hover:not(:disabled)::after,
.hr-form-wizard-footer .hr-form-wizard-submit:hover:not(:disabled)::after {
  transform: translateX(120%);
}

.module-panel-actions--footer .module-panel-actions__group--primary > .btn-primary:active:not(:disabled),
.hr-form-wizard-footer .module-panel-actions__group--primary .btn-primary:active:not(:disabled),
.hr-form-wizard-footer .hr-form-wizard-submit:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 4px 14px rgba(var(--primary-rgb), 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .module-panel-actions--footer .module-panel-actions__group--primary > .btn-primary::after,
  .hr-form-wizard-footer .module-panel-actions__group--primary .btn-primary::after,
  .hr-form-wizard-footer .hr-form-wizard-submit::after {
    display: none;
  }

  .module-panel-actions--footer .module-panel-btn,
  .module-panel-toolbar .module-panel-btn,
  .module-panel-actions--footer .module-panel-actions__group--primary > .btn-primary,
  .hr-form-wizard-footer .hr-form-wizard-submit {
    transition: none;
  }
}

.form-flow-actions--wizard {
  margin-top: 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.form-flow-actions--wizard .module-panel-actions__bar {
  border-top: none;
  padding-top: 0;
}

.create-trip-submit-actions {
  flex: 1 1 18rem;
}

@media (max-width: 900px) {
  .module-panel-actions--wizard .module-panel-actions__bar {
    flex-direction: column;
    align-items: stretch;
  }

  .module-panel-actions--wizard .module-panel-actions__group--secondary {
    margin-inline-end: 0;
    width: 100%;
    justify-content: stretch;
  }

  .module-panel-actions--wizard .module-panel-actions__group--tools,
  .module-panel-actions--wizard .module-panel-actions__group--primary {
    width: 100%;
    justify-content: stretch;
  }

  .module-panel-actions--wizard .module-panel-actions__group--tools .btn,
  .module-panel-actions--wizard .module-panel-actions__group--primary .btn,
  .module-panel-actions--wizard .module-panel-actions__group--secondary .module-panel-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .form-flow-actions > .btn,
  .module-panel-actions__group > .btn {
    flex: 1 1 calc(50% - 0.25rem);
  }

  .module-panel-actions__bar {
    justify-content: stretch;
  }

  .module-panel-actions__group--primary {
    margin-inline-start: 0;
    flex: 1 1 100%;
    width: 100%;
  }

  .module-panel-actions__group--primary > .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .form-flow-actions > .btn,
  .module-panel-actions__group > .btn,
  .module-panel-toolbar .module-panel-btn {
    flex: 1 1 100%;
    min-width: 0;
  }

  .module-panel-actions__group--secondary {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
  }

  .module-panel-actions__group--secondary {
    flex-direction: column;
    border-radius: 14px;
    padding: 0.35rem;
    gap: 0.28rem;
  }

  .module-panel-btn--cancel {
    margin-inline-start: 0;
    padding-inline-start: 0.9rem;
    width: 100%;
    border-top: none;
    border-radius: 10px;
    padding-top: 0.62rem;
    margin-top: 0;
  }

  .module-panel-btn--cancel::before {
    display: none;
  }

  body[data-theme="dark"] .module-panel-btn--cancel {
    border-top-color: transparent;
  }
}

.hr-form-flow {
  --hr-form-gap: 1rem;
}

.hr-form-compact {
  max-width: 36rem;
  margin-inline: auto;
}

.hr-form-card,
.hr-form-card--md,
.hr-form-card--lg,
.hr-form-card--xl {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.hr-form-card .p-card-body {
  display: grid;
  gap: 1.1rem;
  padding: 1.2rem 1.3rem 1.35rem;
}

.hr-form-card .hr-data-card__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.9rem 1.2rem;
  padding: 1.15rem 1.3rem 1rem;
}

.hr-form-card .hr-data-card__brand {
  align-items: flex-start;
  gap: 0.9rem;
}

.hr-form-card .hr-data-card__titles {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.hr-form-card .hr-data-card__titles h2 {
  font-size: 1.14rem;
}

.hr-form-card .hr-data-card__stat {
  max-width: 24rem;
  padding: 0.56rem 0.82rem;
  border-radius: 14px;
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: right;
  white-space: normal;
}

.hr-form-card .hr-form-compact,
.hr-form-card .hr-form-wizard {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}

.hr-form-card .form-section-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.82rem 0.95rem;
  align-items: start;
}

.hr-form-card .form-section-grid label:not(.route-rate-company-item):not(.route-rate-company-item-text) {
  min-height: 0;
  align-self: start;
  padding: 0.68rem 0.8rem;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.hr-form-card .form-section-grid input,
.hr-form-card .form-section-grid select {
  min-height: 2.7rem;
}

.hr-form-card .form-section-grid textarea {
  min-height: 6rem;
  resize: vertical;
}

.hr-form-card .form-section {
  border-radius: 16px;
  padding: 1.05rem 1.15rem 1rem;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.hr-form-card .form-section legend {
  font-size: 0.9rem;
}

.hr-form-card .hr-form-wizard-toolbar {
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
}

.hr-form-card .hr-form-wizard-dots {
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.hr-form-card .hr-form-wizard-dot {
  min-height: 4rem;
  padding: 0.55rem 0.5rem;
  border-radius: 14px;
}

.hr-form-card .hr-form-wizard-footer {
  margin-top: 1.15rem;
  padding-top: 1rem;
}

.hr-form-card--payroll .hr-data-card__head {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.94));
}

.hr-form-card--hiring .hr-data-card__head {
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.96), rgba(255, 255, 255, 0.94));
}

.ops-block--payroll-flow {
  gap: 1rem;
}

.ops-block--payroll-flow .auth-tab-panels {
  padding: 0.75rem;
  border-radius: 24px;
}

.ops-block--payroll-flow .auth-tab-panel {
  width: 100%;
}

@media (min-width: 960px) {
  .hr-form-card--md .form-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-form-card--lg .form-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-form-card--xl .form-section-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1380px) {
  .hr-form-card--lg .form-section-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hr-form-card--xl .form-section-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hr-form-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) auto;
  gap: 0.95rem 1.1rem;
  align-items: start;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  background: linear-gradient(135deg, rgba(var(--brand-blue-soft-rgb), 0.2), rgba(255, 255, 255, 0.98));
  box-shadow: 0 16px 34px rgba(var(--primary-rgb), 0.07);
}

.hr-form-hero--payroll {
  border-color: rgba(20, 184, 166, 0.2);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(240, 249, 255, 0.98));
}

.hr-form-hero--hiring {
  border-color: rgba(99, 102, 241, 0.18);
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.98), rgba(249, 250, 255, 0.98));
}

.hr-form-hero__copy {
  min-width: 0;
}

.hr-form-hero__eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5e88ad;
}

.hr-form-hero__title {
  margin: 0.28rem 0 0;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f3354;
}

.hr-form-hero__text {
  margin: 0.45rem 0 0;
  max-width: 46rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #466883;
}

.hr-form-hero__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.hr-form-hero-badge {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  min-width: 8rem;
  padding: 0.6rem 0.78rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.hr-form-hero-badge strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: #113a60;
}

.hr-form-hero-badge small {
  font-size: 0.72rem;
  font-weight: 700;
  color: #4d6b86;
}

.hr-form-help {
  margin: 0.65rem 0 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(55, 124, 192, 0.18);
  padding: 0.04rem 0.65rem 0.55rem;
  background: rgba(248, 252, 255, 0.55);
}

.hr-form-help summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: #376596;
  padding: 0.45rem 0;
}

.hr-form-contract-tests {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hr-form-contract-tests .btn {
  flex: 1 1 auto;
  min-width: 8rem;
}

.hr-form-wizard {
  max-width: 38rem;
  margin-inline: auto;
}

.hr-form-wizard-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(55, 124, 192, 0.14);
}

.hr-form-wizard-kicker {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5e88ad;
}

.hr-form-wizard-lead {
  margin: 0.25rem 0 0;
  font-size: 0.81rem;
  line-height: 1.45;
  color: #466883;
  max-width: 28rem;
}

.hr-form-wizard-meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.42rem;
  min-width: 9.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #1e5688;
  padding: 0.42rem 0.58rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(55, 124, 192, 0.09), rgba(255, 255, 255, 0.65));
  border: 1px solid rgba(55, 124, 192, 0.12);
  align-self: center;
}

.hr-wizard-progress-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(55, 124, 192, 0.14);
  overflow: hidden;
}

.hr-wizard-progress-fill {
  display: block;
  height: 100%;
  width: 50%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-blue-deep), var(--brand-blue-mid));
  box-shadow: 0 0 12px rgba(var(--primary-mid-rgb), 0.45);
  transition: width 0.28s cubic-bezier(0.33, 1, 0.68, 1);
}

.hr-wizard-progress-label {
  font-variant-numeric: tabular-nums;
  text-align: center;
  letter-spacing: -0.02em;
}

@media (prefers-reduced-motion: reduce) {
  .hr-wizard-progress-fill {
    transition: none;
  }
}

.hr-form-wizard-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-bottom: 0.75rem;
}

.hr-form-wizard-dots--few .hr-form-wizard-dot {
  flex: 1 1 140px;
}

.hr-form-wizard-dot {
  flex: 1 1 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  padding: 0.42rem 0.35rem;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  font: inherit;
  cursor: pointer;
  color: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.hr-form-wizard-dot:hover {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  color: var(--primary);
  box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-1px);
}

.hr-form-wizard-dot.is-done {
  border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
  background: linear-gradient(180deg, rgba(var(--brand-blue-soft-rgb), 0.82), #f4f9ff);
}

.hr-form-wizard-dot.is-active {
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
  transform: translateY(-1px);
}

/* Paso con campos por completar: realce rojo breve para guiar entre pantallas del wizard. */
.hr-form-wizard-dot.is-error {
  border-color: #d64545;
  background: linear-gradient(180deg, #fff2f2 0%, #ffe3e3 100%);
  color: #be2f2f;
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.16);
  animation: hrWizardDotShake 0.45s ease;
}

.hr-form-wizard-dot.is-error.is-active {
  background: linear-gradient(180deg, #e26a6a 0%, #d64545 60%, #b62f2f 100%);
  color: #ffffff;
}

@keyframes hrWizardDotShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

@media (prefers-reduced-motion: reduce) {
  .hr-form-wizard-dot.is-error { animation: none; }
}

/* Aviso cuando no hay cargos creados en el catálogo (selector de cargo deshabilitado). */
.emp-position-empty-hint {
  color: #b06a00;
  font-weight: 600;
  background: linear-gradient(180deg, #fff8ec 0%, #fff1d6 100%);
  border: 1px solid #f1d28a;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}

.hr-dot-num {
  font-size: 0.82rem;
  font-weight: 800;
}

.hr-form-wizard-dot small {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.hr-form-step {
  padding-bottom: 0.35rem;
}

.hr-form-step.hidden {
  display: none !important;
}

.hr-form-wizard-footer {
  margin-top: 1.1rem;
  padding: 0.95rem 1rem 0.65rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, #e2e8f0);
  background: color-mix(in srgb, #f8fafc 88%, #fff);
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  bottom: 0;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.05);
  z-index: 2;
}

.hr-form-wizard-footer__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.hr-form-wizard-footer-nav {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.18rem;
  align-items: center;
  padding: 0.24rem;
  border-radius: 999px;
  background: color-mix(in srgb, #e2e8f0 38%, #fff);
  border: 1px solid color-mix(in srgb, #94a3b8 22%, transparent);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hr-wizard-nav-btn {
  min-height: 2.45rem;
  padding-inline: 1rem;
  border-radius: 999px;
  border: none;
  font-size: 0.8125rem;
  font-weight: 650;
  background: transparent;
  box-shadow: none;
  color: #64748b;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.hr-wizard-nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  transform: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.hr-wizard-nav-btn--next:not(:disabled) {
  color: var(--primary-dark);
  font-weight: 700;
  background: #fff;
  box-shadow: 0 1px 3px rgba(var(--primary-rgb), 0.1);
}

.hr-wizard-nav-btn--next:hover:not(:disabled) {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary-light) 35%, #fff);
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.14);
}

.hr-wizard-nav-btn[data-hr-wizard-prev]:disabled {
  opacity: 0.55;
  color: #94a3b8;
  cursor: not-allowed;
}

.hr-form-wizard-hint {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: end;
}

.hr-form-wizard-footer .module-panel-actions--footer {
  padding-top: 0.8rem;
}

.hr-form-wizard-footer .module-panel-actions--wizard.form-flow-actions--wizard {
  display: block;
  border-top: none;
  padding-top: 0;
  width: 100%;
  min-width: 0;
}

.hr-form-wizard-footer .module-panel-actions--wizard .module-panel-actions__bar {
  justify-content: flex-end;
}

.hr-form-wizard-footer .module-panel-btn--minimize,
.hr-form-wizard-footer .module-panel-btn--expand,
.hr-form-wizard-footer .module-panel-btn--cancel {
  min-width: 0;
  flex: 0 1 auto;
}

.hr-form-wizard-footer .module-panel-actions__group--tools .btn,
.hr-form-wizard-footer .module-panel-actions__group--primary .btn {
  min-width: 0;
  max-width: 100%;
}

.hr-form-wizard-footer .module-panel-actions__group--tools .btn {
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

.hr-form-wizard-footer .module-panel-actions__group--primary .btn-primary,
.hr-form-wizard-footer .hr-form-wizard-submit {
  min-height: 2.8rem;
  padding: 0.65rem 1.55rem;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 650;
}

.hr-form-wizard-submit:disabled,
.hr-form-wizard-contract-draft:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Foto empleado: óvalo + input (crear / editar nómina), reutiliza .profile-avatar-* */
.hr-employee-avatar-row {
  display: flex;
  justify-content: center;
  padding: 0.15rem 0 0.55rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.hr-employee-avatar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
  max-width: 100%;
}

.hr-employee-avatar-caption {
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 0;
  max-width: 22rem;
}

.hr-employee-avatar-row--lead {
  border-bottom: none;
  padding-bottom: 0.2rem;
}

body[data-theme="dark"] .hr-employee-avatar-row {
  border-bottom-color: rgba(148, 196, 255, 0.12);
}

.hr-employee-avatar-row--lead {
  border-bottom: none;
  padding-bottom: 0.2rem;
}

.payroll-shell .payroll-actions-grid .form-section,
.hiring-shell .hiring-actions-grid .form-section {
  border-radius: 12px;
}

.payroll-shell .payroll-actions-grid .form-section-grid,
.hiring-shell .hiring-actions-grid .form-section-grid {
  gap: 0.72rem 0.85rem;
}

body[data-theme="dark"] .hr-form-help {
  border-color: rgba(148, 196, 255, 0.2);
  background: rgba(12, 28, 46, 0.55);
}

body[data-theme="dark"] .hr-form-help summary {
  color: #a9c7e8;
}

body[data-theme="dark"] .hr-form-card .form-section-grid label:not(.route-rate-company-item):not(.route-rate-company-item-text) {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 196, 255, 0.14);
  box-shadow: 0 10px 22px rgba(2, 8, 18, 0.2);
}

body[data-theme="dark"] .hr-form-card .form-section {
  box-shadow: 0 18px 36px rgba(2, 8, 18, 0.28);
}

body[data-theme="dark"] .hr-form-card--payroll .hr-data-card__head {
  background: linear-gradient(180deg, rgba(8, 44, 43, 0.92), rgba(10, 22, 38, 0.88));
}

body[data-theme="dark"] .hr-form-card--hiring .hr-data-card__head {
  background: linear-gradient(180deg, rgba(29, 37, 79, 0.92), rgba(10, 22, 38, 0.88));
}

body[data-theme="dark"] .hr-form-wizard-lead {
  color: #bfd9f5;
}

body[data-theme="dark"] .hr-form-wizard-meta {
  background: linear-gradient(180deg, rgba(55, 124, 192, 0.22), rgba(12, 28, 46, 0.72));
  border-color: rgba(148, 196, 255, 0.16);
  color: #dbeafe;
}

body[data-theme="dark"] .hr-wizard-progress-track {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .hr-wizard-progress-fill {
  box-shadow: 0 0 14px rgba(var(--primary-mid-rgb), 0.4);
}

body[data-theme="dark"] .hr-form-wizard-dot {
  background: linear-gradient(180deg, #17314c 0%, #12263d 100%);
  border-color: #4a729e;
  color: #cfe9fc;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .hr-form-wizard-dot.is-active {
  border-color: rgba(173, 214, 255, 0.28);
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

body[data-theme="dark"] .hr-form-wizard-footer {
  border-color: rgba(148, 196, 255, 0.18);
  background: linear-gradient(180deg, rgba(14, 28, 46, 0.98) 0%, rgba(10, 22, 38, 0.96) 100%);
  box-shadow: 0 -12px 32px rgba(2, 8, 18, 0.45);
}

body[data-theme="dark"] .hr-form-wizard-footer__head {
  border-bottom-color: rgba(148, 196, 255, 0.12);
}

body[data-theme="dark"] .hr-form-wizard-footer-nav {
  --mpa-segment-bg: rgba(15, 28, 46, 0.92);
  --mpa-segment-edge: rgba(148, 196, 255, 0.14);
  background: var(--mpa-segment-bg);
  border-color: var(--mpa-segment-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .hr-wizard-nav-btn {
  color: #94a3b8;
}

body[data-theme="dark"] .hr-wizard-nav-btn:hover:not(:disabled) {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

body[data-theme="dark"] .hr-wizard-nav-btn--next:not(:disabled) {
  color: #bfdbfe;
  background: rgba(var(--primary-rgb), 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .hr-wizard-nav-btn--next:hover:not(:disabled) {
  color: #eff6ff;
  background: rgba(var(--primary-rgb), 0.28);
}

body[data-theme="dark"] .hr-wizard-nav-btn[data-hr-wizard-prev]:disabled {
  color: #64748b;
}

body[data-theme="dark"] .module-panel-actions__group--secondary {
  background: color-mix(in srgb, #1e293b 72%, transparent);
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .hr-form-hero {
  border-color: rgba(148, 196, 255, 0.18);
  background: linear-gradient(135deg, rgba(16, 34, 54, 0.96), rgba(10, 22, 38, 0.94));
  box-shadow: 0 18px 36px rgba(2, 8, 18, 0.28);
}

body[data-theme="dark"] .hr-form-hero--payroll {
  border-color: rgba(45, 212, 191, 0.2);
  background: linear-gradient(135deg, rgba(8, 44, 43, 0.96), rgba(10, 22, 38, 0.94));
}

body[data-theme="dark"] .hr-form-hero--hiring {
  border-color: rgba(129, 140, 248, 0.26);
  background: linear-gradient(135deg, rgba(29, 37, 79, 0.96), rgba(10, 22, 38, 0.94));
}

body[data-theme="dark"] .hr-form-hero__eyebrow {
  color: #9cc6ef;
}

body[data-theme="dark"] .hr-form-hero__title {
  color: #eff6ff;
}

body[data-theme="dark"] .hr-form-hero__text {
  color: #bfd9f5;
}

body[data-theme="dark"] .hr-form-hero-badge {
  border-color: rgba(148, 196, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 12px 24px rgba(2, 8, 18, 0.22);
}

body[data-theme="dark"] .hr-form-hero-badge strong {
  color: #eff6ff;
}

body[data-theme="dark"] .hr-form-hero-badge small {
  color: #a9c8ea;
}

.hr-guide-drawer {
  border-radius: 14px;
  border: 1px dashed rgba(55, 124, 192, 0.38);
  background: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.hr-guide-drawer-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  padding: 0.62rem 0.85rem;
  font-weight: 700;
  color: #1e4d7b;
}

.hr-guide-drawer-summary::-webkit-details-marker {
  display: none;
}

.hr-guide-drawer-summary::after {
  content: "";
  margin-left: auto;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  transition: transform 0.2s ease;
}

.hr-guide-drawer[open] .hr-guide-drawer-summary::after {
  transform: rotate(225deg);
  margin-top: 0.2rem;
}

.hr-guide-drawer-kicker {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5e88ad;
}

.hr-guide-drawer-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
}

.hr-guide-drawer-body {
  padding: 0 0.75rem 0.85rem;
}

.hr-guide-drawer-body .module-spotlight {
  margin-top: 0;
}

.hiring-shell--workspace .hr-guide-drawer {
  border-color: rgba(var(--primary-mid-rgb), 0.38);
  background: rgba(var(--brand-blue-soft-rgb), 0.35);
}

.payroll-shell--workspace .payroll-data-grid {
  gap: 1rem;
}

.hiring-shell--workspace .hiring-results-grid {
  gap: 1rem;
}

body[data-theme="dark"] .hr-workspace-tabs {
  border-color: rgba(148, 196, 255, 0.16);
  background: rgba(14, 32, 52, 0.6);
  box-shadow: 0 2px 8px rgba(2, 8, 18, 0.35);
}

body[data-theme="dark"] .hr-workspace-tabs--pro {
  border-color: rgba(148, 196, 255, 0.16);
  background: rgba(14, 32, 52, 0.6);
  box-shadow: 0 2px 8px rgba(2, 8, 18, 0.35);
}

body[data-theme="dark"] .hiring-shell--workspace .hr-workspace-tabs--pro {
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(14, 25, 52, 0.6);
}

body[data-theme="dark"] .hr-workspace-tab {
  background: transparent;
  color: #c7daf2;
}

body[data-theme="dark"] .hr-workspace-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e2eefe;
}

body[data-theme="dark"] .hr-workspace-tab.is-active {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

body[data-theme="dark"] .hiring-shell--workspace .hr-workspace-tab.is-active {
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

body[data-theme="dark"] .hr-module-pro--payroll .hr-workspace-tab.is-active {
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

body[data-theme="dark"] .hr-workspace-tab-num {
  background: rgba(255, 255, 255, 0.08);
  color: #c7daf2;
}

body[data-theme="dark"] .hr-workspace-tab.is-active .hr-workspace-tab-num {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

body[data-theme="dark"] .hr-workspace-tab-ico {
  background: transparent;
  border: 0;
  color: #93c5fd;
}

body[data-theme="dark"] .hiring-shell--workspace .hr-workspace-tab-ico {
  background: transparent;
  border: 0;
  color: #a5b4fc;
}

body[data-theme="dark"] .hr-workspace-tab.is-active .hr-workspace-tab-ico,
body[data-theme="dark"] .hiring-shell--workspace .hr-workspace-tab.is-active .hr-workspace-tab-ico {
  color: #ffffff;
}

body[data-theme="dark"] .hr-tab-icon-svg,
body[data-theme="dark"] .hiring-shell--workspace .hr-tab-icon-svg {
  color: currentColor;
}

body[data-theme="dark"] .hr-guide-drawer {
  border-color: rgba(148, 196, 255, 0.28);
  background: rgba(8, 22, 38, 0.55);
}

body[data-theme="dark"] .hr-guide-drawer-summary {
  color: #eaf4ff;
}

body[data-theme="dark"] .hr-guide-drawer-kicker {
  color: #8fb8e8;
}

body[data-theme="dark"] .hiring-shell--workspace .hr-guide-drawer {
  border-color: rgba(var(--primary-mid-rgb), 0.32);
  background: rgba(var(--primary-rgb), 0.14);
}

.module-spotlight {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.15rem;
  align-items: center;
  padding: 1.05rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(55, 124, 192, 0.22);
  box-shadow: 0 14px 34px rgba(10, 46, 92, 0.08);
  overflow: hidden;
  position: relative;
}

.module-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 80% at 100% 0%, rgba(255, 255, 255, 0.55), transparent 52%);
}

.module-spotlight-visual {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 52, 92, 0.22);
  position: relative;
  z-index: 1;
}

.module-spotlight-visual svg {
  width: 26px;
  height: 26px;
}

.module-spotlight-text {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.module-spotlight-title {
  margin: 0 0 0.28rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0c3d63;
}

.module-spotlight-lead {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #355e84;
}

.module-spotlight-list {
  margin: 0;
  padding-left: 1.15rem;
  color: #305573;
  font-size: 0.82rem;
  line-height: 1.55;
}

.module-spotlight-list li {
  margin-bottom: 0.18rem;
}

.module-spotlight--payroll {
  background: linear-gradient(135deg, rgba(var(--brand-blue-soft-rgb), 0.95) 0%, #e8f4fc 40%, #f0f9ff 100%);
}

.module-spotlight--payroll .module-spotlight-visual {
  background: linear-gradient(145deg, var(--brand-blue-deep), var(--primary-deeper));
}

.module-spotlight--hiring {
  background: linear-gradient(135deg, #f5fbff 0%, rgba(var(--brand-blue-soft-rgb), 0.9) 38%, #f0f9ff 100%);
}

.module-spotlight--hiring .module-spotlight-visual {
  background: linear-gradient(145deg, var(--brand-blue-mid), var(--brand-blue-deep));
}

.ops-module-head--rich .ops-module-subtitle {
  margin: 0.38rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #486788;
  max-width: 52rem;
}

.ops-block-head .ops-block-lead {
  margin: 0.28rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.payroll-shell .payroll-filters-bar {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  background: linear-gradient(
    180deg,
    rgba(var(--brand-blue-soft-rgb), 0.75),
    rgba(255, 255, 255, 0.96)
  );
}

.payroll-shell .table-wrap tbody tr:nth-child(even) td,
.hiring-shell .table-wrap tbody tr:nth-child(even) td {
  background: rgba(55, 124, 192, 0.035);
}

@media (max-width: 720px) {
  .hr-form-card,
  .hr-form-card--md,
  .hr-form-card--lg,
  .hr-form-card--xl {
    width: 100%;
  }

  .hr-form-card .p-card-body {
    padding: 0.95rem;
  }

  .hr-form-card .hr-data-card__head {
    grid-template-columns: 1fr;
    padding: 1rem 1rem 0.9rem;
  }

  .hr-form-card .hr-data-card__stat {
    max-width: none;
    text-align: left;
  }

  .hr-form-card .form-section-grid,
  .hr-form-card--xl .form-section-grid {
    grid-template-columns: 1fr;
  }

  .ops-block--payroll-flow .auth-tab-panels {
    padding: 0.55rem;
    border-radius: 18px;
  }

  .hr-form-hero {
    grid-template-columns: 1fr;
    padding: 0.9rem;
  }

  .hr-form-hero__badges {
    justify-content: flex-start;
  }

  .hr-form-hero-badge {
    min-width: 0;
    flex: 1 1 10rem;
  }

  .module-spotlight {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .module-spotlight-visual {
    width: 48px;
    height: 48px;
  }
}

body[data-theme="dark"] .module-spotlight {
  border-color: rgba(148, 196, 255, 0.2);
  box-shadow: 0 14px 38px rgba(2, 10, 22, 0.45);
}

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

body[data-theme="dark"] .module-spotlight-lead,
body[data-theme="dark"] .module-spotlight-list {
  color: #bfd9f5;
}

body[data-theme="dark"] .module-spotlight--payroll {
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb), 0.2),
    rgba(15, 76, 129, 0.52)
  );
}

body[data-theme="dark"] .module-spotlight--hiring {
  background: linear-gradient(
    135deg,
    rgba(var(--primary-mid-rgb), 0.18),
    rgba(15, 76, 129, 0.48)
  );
}

body[data-theme="dark"] .ops-module-head--rich .ops-module-subtitle {
  color: #a9c7e8;
}

body[data-theme="dark"] .payroll-shell .payroll-filters-bar {
  border-color: rgba(94, 164, 232, 0.28);
  background: linear-gradient(180deg, rgba(12, 38, 62, 0.92), rgba(15, 33, 54, 0.96));
}

body[data-theme="dark"] .payroll-shell .table-wrap tbody tr:nth-child(even) td,
body[data-theme="dark"] .hiring-shell .table-wrap tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

.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;
}

.module-shell {
  display: grid;
  gap: 0.9rem;
}

.module-shell-head {
  border: 1px solid rgba(var(--primary-rgb), 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(var(--primary-rgb), 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(var(--primary-rgb), 0.34);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: rgba(var(--primary-rgb), 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(var(--primary-rgb), 0.3);
  background: rgba(var(--primary-rgb), 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(var(--primary-rgb), 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, var(--primary), var(--primary-deeper));
  background-size: cover;
  background-position: center;
}

.profile-avatar.has-image {
  color: transparent;
  /* Rostros/logos: encajar sin recorte (evita “zoom” de cover) */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  background-color: #f1f5f9;
}

.profile-avatar.profile-avatar--logo-contain.has-image {
  background-size: contain;
  background-repeat: no-repeat;
  background-color: #fff;
  background-position: center center;
}

body[data-theme="dark"] .profile-avatar.profile-avatar--logo-contain.has-image {
  background-color: #0f172a;
}

body[data-theme="dark"] .profile-avatar.has-image {
  background-color: #0f172a;
}

.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;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  cursor: pointer;
  border: 0;
  z-index: 2;
}

.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(var(--primary-rgb), 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(var(--primary-rgb), 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(var(--primary-rgb), 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(var(--primary-rgb), 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-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(var(--primary-rgb), 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(var(--primary-rgb), 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));
}

.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;
}

.hiring-shell .hiring-table-wrap {
  border-radius: 18px;
  padding: 0.2rem 0.3rem 0.4rem;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: linear-gradient(180deg, rgba(245, 247, 255, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hiring-shell .hiring-table {
  min-width: 68rem;
  border-collapse: separate;
  border-spacing: 0 0.48rem;
}

.hiring-shell .hiring-table thead th {
  padding: 0.55rem 0.68rem 0.75rem;
  border-bottom: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #5b6f8d;
}

.hiring-shell .hiring-table tbody tr {
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.06));
}

.hiring-shell .hiring-table tbody td {
  padding: 0.72rem 0.72rem;
  line-height: 1.4;
  vertical-align: top;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.96);
}

.hiring-shell .hiring-table tbody td:first-child {
  border-left: 1px solid rgba(148, 163, 184, 0.14);
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

.hiring-shell .hiring-table tbody td:last-child {
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.hiring-shell .hiring-table tbody tr:hover td {
  background: linear-gradient(180deg, rgba(247, 249, 255, 0.98), rgba(255, 255, 255, 1));
  border-color: rgba(99, 102, 241, 0.18);
}

.hiring-table-cell-main {
  min-width: 14rem;
}

.hiring-table-primary {
  display: grid;
  gap: 0.18rem;
}

.hiring-table-primary strong {
  font-size: 0.92rem;
  line-height: 1.25;
  color: var(--text);
}

.hiring-table-primary span {
  font-size: 0.74rem;
  color: var(--text-soft);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hiring-table-cell-actions {
  min-width: 14rem;
}

.hiring-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.5rem 1rem;
}

.hiring-empty-actions {
  margin-top: 0.15rem;
}

.hiring-cards {
  display: none;
  gap: 0.75rem;
}

.hiring-candidate-card {
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.hiring-candidate-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.hiring-candidate-card__head h4 {
  margin: 0;
  font-size: 0.95rem;
}

.hiring-candidate-card__meta {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
}

.hiring-candidate-card__meta dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin-bottom: 0.1rem;
}

.hiring-candidate-card__meta dd {
  margin: 0;
}

.hiring-candidate-card__actions {
  flex-wrap: wrap;
  gap: 0.35rem;
}

@media (max-width: 960px) {
  .hiring-cards--candidates {
    display: grid;
  }

  .hiring-table-desktop {
    display: none;
  }

  .hiring-shell .hiring-table {
    min-width: 0;
  }
}

@media (min-width: 961px) {
  .hiring-table-desktop {
    display: block;
  }
}

.hiring-contract-candidate-picker:not(.hidden) {
  display: block;
}

.hiring-contract-employee-picker.hidden {
  display: none;
}

.hiring-table-actions {
  gap: 0.38rem !important;
  justify-content: flex-end;
}

.hiring-table-actions > .btn {
  border-radius: 10px;
  min-height: 2rem;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.hiring-status-select {
  width: 100%;
  min-width: 11.5rem;
  padding: 0.52rem 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  background: linear-gradient(180deg, #ffffff, #f7f9ff);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hiring-status-select:focus {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow:
    0 0 0 3px rgba(129, 140, 248, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.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.4rem 0.7rem;
  font-size: 0.8rem;
}

.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 {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
  margin: 0.5rem 0;
  border-radius: 14px;
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  background: linear-gradient(
    180deg,
    rgba(var(--brand-blue-soft-rgb), 0.42),
    rgba(248, 252, 255, 0.98)
  );
}

.hr-flow-block h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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"] .site-footer p a {
  color: rgba(232, 244, 255, 0.96);
  text-decoration-color: rgba(130, 175, 228, 0.45);
}

body[data-theme="dark"] .site-footer p a:hover {
  color: #ffffff;
  text-decoration-color: rgba(190, 218, 255, 0.8);
}

body[data-theme="dark"] .footer-brand-copy p {
  color: rgba(218, 235, 255, 0.9);
}

body[data-theme="dark"] .footer-brand-logo-wrap {
  background: linear-gradient(160deg, #f4f9ff 0%, #dcebfa 100%);
  border-color: rgba(173, 208, 243, 0.4);
  box-shadow:
    0 14px 30px rgba(0, 5, 12, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

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.3);
  color: rgba(210, 230, 252, 0.78);
  background: rgba(2, 10, 20, 0.45);
}

body[data-theme="dark"] .footer-road-truck {
  color: rgba(140, 184, 232, 0.6);
}

body[data-theme="dark"] .footer-links a {
  color: rgba(216, 233, 252, 0.8);
}

body[data-theme="dark"] .footer-links a:hover,
body[data-theme="dark"] .footer-links a:focus-visible {
  color: #ffffff;
}

body[data-theme="dark"] .footer-contact-item {
  color: rgba(216, 233, 252, 0.8);
}

body[data-theme="dark"] .footer-contact-item a {
  color: rgba(232, 244, 255, 0.94);
}

body[data-theme="dark"] .footer-top-btn {
  background: rgba(17, 41, 67, 0.9);
  border-color: rgba(112, 157, 212, 0.35);
  color: rgba(221, 237, 255, 0.88);
}

body[data-theme="dark"] .footer-top-btn:hover {
  background: #2b69b3;
  border-color: #5d99df;
  color: #ffffff;
}

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-pane {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 18px 34px rgba(0, 0, 0, 0.28);
}

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 {
  border-color: color-mix(in srgb, #60a5fa 35%, #334155 65%);
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.55) 0%, rgba(15, 23, 42, 0.92) 100%);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .auth-recover-hint-inner {
  border-left-color: #38bdf8;
}

body[data-theme="dark"] .auth-recover-hint-icon {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.25);
}

body[data-theme="dark"] .auth-recover-hint-title {
  color: #f1f5f9;
}

body[data-theme="dark"] .auth-recover-hint-text {
  color: rgba(203, 213, 225, 0.92);
}

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='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%239ed0ff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 0.4rem center;
  background-size: 100% 100%, 1.05rem 1.05rem;
  color: #e8f3ff;
}

body[data-theme="dark"] .phone-input-professional .phone-national-input {
  color: #e8f3ff;
}

body[data-theme="dark"] .register-terms-card {
  border-color: #476b93;
  background: linear-gradient(180deg, #162b42 0%, #1b334f 100%);
}

body[data-theme="dark"] .register-terms-link {
  color: #9ed0ff;
}

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: linear-gradient(180deg, #223a56, #1a3049);
  border-color: rgba(148, 196, 255, 0.18);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .tab {
  color: #cfe1f7;
}

body[data-theme="dark"] .tab:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(148, 196, 255, 0.06));
  border-color: rgba(148, 196, 255, 0.18);
  color: #ffffff;
}

body[data-theme="dark"] .tab.active {
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  color: #ffffff;
  border-color: rgba(173, 214, 255, 0.28);
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

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(21, 46, 74, 0.96), rgba(24, 52, 78, 0.98));
  border-color: rgba(var(--primary-mid-rgb), 0.42);
}

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"] .hr-module-pro.payroll-shell--workspace .ops-command-bar,
body[data-theme="dark"] .hr-module-pro.hiring-shell--workspace .ops-command-bar {
  background: linear-gradient(180deg, rgba(27, 50, 76, 0.98), rgba(22, 42, 62, 0.99));
  border-color: rgba(var(--primary-mid-rgb), 0.32);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .ops-command-cluster-label {
  color: #8eb4d8;
}

body[data-theme="dark"] .hr-module-pro--payroll .ops-command-cluster:first-of-type .ops-command-cluster-label {
  color: #5eead4;
}

body[data-theme="dark"] .hr-module-pro--hiring .ops-command-cluster:first-of-type .ops-command-cluster-label {
  color: #a5b4fc;
}

body[data-theme="dark"] .hr-workspace-quicknav-label {
  color: #93b9e6;
}

body[data-theme="dark"] .fleet-hero-strip--solo.fleet-hero-strip--hr-payroll {
  background: linear-gradient(125deg, #0f172a 0%, #134e4a 42%, #155e75 100%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

body[data-theme="dark"] .fleet-hero-strip--solo.fleet-hero-strip--hr-hiring {
  background: linear-gradient(125deg, #1e1b4b 0%, #3730a3 48%, #1e40af 100%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

body[data-theme="dark"] .hr-overview-guide {
  border-color: rgba(102, 151, 209, 0.28);
  background: linear-gradient(145deg, rgba(27, 50, 76, 0.55), rgba(15, 32, 48, 0.96));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

body[data-theme="dark"] .hr-overview-guide--payroll {
  border-left-color: #2dd4bf;
  background: linear-gradient(145deg, rgba(19, 78, 74, 0.45), rgba(15, 32, 48, 0.96));
}

body[data-theme="dark"] .hr-overview-guide--hiring {
  border-left-color: #818cf8;
  background: linear-gradient(145deg, rgba(55, 48, 163, 0.38), rgba(15, 32, 48, 0.96));
}

body[data-theme="dark"] .hr-overview-guide-kicker {
  color: #9ec5f7;
}

body[data-theme="dark"] .hr-overview-guide-lead {
  color: #d9e9fb;
}

body[data-theme="dark"] .hr-overview-guide-steps {
  color: #b8d3f0;
}

body[data-theme="dark"] .hr-overview-guide-steps li {
  background: rgba(15, 32, 48, 0.62);
  border-color: rgba(102, 151, 209, 0.22);
}

body[data-theme="dark"] .hr-overview-guide--payroll .hr-overview-guide-steps li {
  border-color: rgba(45, 212, 191, 0.28);
}

body[data-theme="dark"] .hr-overview-guide--hiring .hr-overview-guide-steps li {
  border-color: rgba(129, 140, 248, 0.28);
}

body[data-theme="dark"] .hr-overview-guide-steps strong {
  color: #f0f7ff;
}

body[data-theme="dark"] .hr-flow-step-head h3 {
  color: #ebf5ff;
}

body[data-theme="dark"] .hr-module-pro--hiring .hr-flow-block--step {
  background: linear-gradient(180deg, rgba(36, 36, 86, 0.45), rgba(15, 32, 48, 0.92));
  border-color: rgba(129, 140, 248, 0.32);
}

body[data-theme="dark"] .hr-module-pro .ops-block-head h3 {
  color: var(--text-main, #ebf5ff);
}

body[data-theme="dark"] .hr-module-pro.payroll-shell--workspace .ops-module-head--rich,
body[data-theme="dark"] .hr-module-pro.hiring-shell--workspace .ops-module-head--rich {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
}

body[data-theme="dark"] .hr-module-pro.hiring-shell--workspace .ops-module-head-hiring.ops-module-head--rich {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
}

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, rgba(var(--primary-rgb), 0.22), #162a40);
  border-color: rgba(var(--primary-mid-rgb), 0.32);
}

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;
}

.module-shell[data-module-view="dashboard"] {
  --module-accent-start: var(--brand-blue-deep);
  --module-accent-end: var(--brand-blue-mid);
  gap: 0;
  background: transparent;
}

.module-shell[data-module-view="dashboard"] .module-shell-body {
  gap: 0;
  background: transparent;
}

.module-shell[data-module-view^="transport-"],
.module-shell[data-module-view="history"],
.module-shell[data-module-view="reports"] {
  --module-accent-start: var(--primary);
  --module-accent-end: var(--brand-blue-mid);
}

.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;
}

/* Contratación (workspace): ancho real del panel + tablas que usen más alto de pantalla */
.module-shell[data-module-view="hiring"] .module-shell-body {
  width: 100%;
  max-width: none;
}

.hiring-shell--workspace .hr-workspace-panels,
.hiring-shell--workspace .payroll-data-panel,
.hiring-shell--workspace .payroll-data-panes,
.hiring-shell--workspace .payroll-data-pane:not(.hidden),
.hiring-shell--workspace .payroll-table-shell {
  width: 100%;
  min-width: 0;
}

.hiring-shell--workspace .table-wrap {
  max-height: min(78vh, 52rem);
}

.hiring-shell--workspace .hiring-table {
  min-width: max(100%, 68rem);
}

.hiring-shell--workspace .hiring-table--positions .hiring-table-cell-actions .toolbar {
  flex-wrap: wrap;
  gap: 0.35rem;
}

.module-shell[data-module-view="admin-users"] {
  --module-accent-start: #5a73d4;
  --module-accent-end: #4a8cc9;
}

.module-shell[data-module-view="authorizations"] {
  --module-accent-start: var(--brand-blue-deep);
  --module-accent-end: var(--brand-blue-mid);
}

.auth-hub-sync-loading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.15rem 1.2rem;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--module-accent-end, var(--brand-blue-mid)) 40%, var(--line, #cfd8dc));
  background: linear-gradient(125deg, color-mix(in srgb, var(--module-accent-start, var(--brand-blue-deep)) 8%, var(--white, #fff)) 0%, var(--module-soft-bg, #f5f9ff) 100%);
}

.auth-hub-sync-spinner {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 3px solid rgba(var(--primary-rgb), 0.2);
  border-top-color: var(--module-accent-end, var(--brand-blue-deep));
  animation: auth-hub-spin 0.85s linear infinite;
}

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

.auth-hub-sync-loading-text {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.auth-hub-sync-loading-text strong {
  font-size: 0.98rem;
}

body[data-theme="dark"] .auth-hub-sync-loading {
  background: linear-gradient(125deg, rgba(var(--primary-rgb), 0.14), rgba(15, 23, 42, 0.92));
  border-color: color-mix(in srgb, var(--brand-blue-mid) 38%, transparent);
}

body[data-theme="dark"] .auth-hub-sync-spinner {
  border-color: rgba(var(--primary-mid-rgb), 0.18);
  border-top-color: var(--brand-blue-mid);
}

.auth-queue-section {
  margin: 1.35rem 0 1.75rem;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--module-border-strong, #c5d8ec) 88%, transparent);
  background: color-mix(in srgb, var(--module-soft-bg, #f5f9ff) 96%, #ffffff 4%);
}

.auth-queue-section--info {
  border-style: dashed;
  background: color-mix(in srgb, var(--module-accent-start, #5a73d4) 6%, var(--module-soft-bg, #f5f9ff) 94%);
}

.auth-queue-section--misc {
  border-color: color-mix(in srgb, var(--brand-blue-deep) 26%, var(--module-border-strong, #c5d8ec) 74%);
}

.module-shell[data-module-view="authorizations"] .auth-queue-section {
  --auth-strip-color: var(--brand-blue-deep);
  border-left: 4px solid var(--auth-strip-color);
}

.module-shell[data-module-view="authorizations"] .auth-queue-section--portal {
  --auth-strip-color: var(--primary-deeper);
}

.module-shell[data-module-view="authorizations"] .auth-queue-section[data-auth-section="portal_access"] {
  --auth-strip-color: var(--brand-blue-deep);
}

.module-shell[data-module-view="authorizations"] .auth-queue-section[data-auth-section="transport_fleet"] {
  --auth-strip-color: color-mix(in srgb, var(--brand-blue-deep) 62%, var(--brand-blue-mid) 38%);
}

.module-shell[data-module-view="authorizations"] .auth-queue-section[data-auth-section="workforce"] {
  --auth-strip-color: color-mix(in srgb, var(--brand-blue-deep) 42%, var(--brand-blue-mid) 58%);
}

.module-shell[data-module-view="authorizations"] .auth-queue-section[data-auth-section="hr_absences"] {
  --auth-strip-color: var(--brand-blue-mid);
}

.module-shell[data-module-view="authorizations"] .auth-queue-section[data-auth-section="payroll_pay"] {
  --auth-strip-color: var(--accent);
}

.module-shell[data-module-view="authorizations"] .auth-queue-section--misc {
  --auth-strip-color: color-mix(in srgb, var(--brand-blue-deep) 55%, var(--primary-dark) 45%);
}

.module-shell[data-module-view="authorizations"] .auth-queue-section--info {
  --auth-strip-color: color-mix(in srgb, var(--text-soft) 42%, var(--brand-blue-deep) 58%);
}

.module-shell[data-module-view="authorizations"] .auth-flow-catalog {
  border-left: 4px solid var(--brand-blue-deep);
}

.module-shell[data-module-view="authorizations"] .auth-section-count {
  background: color-mix(in srgb, var(--brand-blue-soft) 68%, #ffffff 32%);
  color: var(--primary-deeper);
  border: 1px solid color-mix(in srgb, var(--brand-blue-deep) 22%, transparent);
}

.auth-queue-section-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}

.auth-queue-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.auth-section-count {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--module-accent-end, #4a8cc9) 14%, #ffffff 86%);
  color: color-mix(in srgb, var(--module-accent-start, #2d4a9c) 85%, #1a1a1a 15%);
}

.auth-queue-section-desc {
  margin: 0.35rem 0 0.5rem;
  line-height: 1.45;
  font-size: 0.92rem;
}

.auth-queue-section-origin {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--muted, #5c6b7a);
}

.auth-origin-label {
  font-weight: 600;
  color: var(--text, inherit);
}

.auth-queue-section-body {
  margin-top: 0.25rem;
}

.module-shell[data-module-view="authorizations"] .auth-queue-section--transport-req {
  --auth-strip-color: color-mix(in srgb, var(--primary-deeper) 35%, var(--brand-blue-deep) 65%);
}

.auth-tabs-layout {
  margin: 0.35rem 0 1.05rem;
}

.auth-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--module-border-strong, #c5d8ec) 88%, transparent);
  background: linear-gradient(180deg, rgba(var(--brand-blue-soft-rgb), 0.16), rgba(255, 255, 255, 0.98));
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 14px 30px rgba(var(--primary-rgb), 0.08);
}

.auth-tab-btn {
  flex: 0 0 auto;
  margin: 0;
  min-height: 2.65rem;
  padding: 0.46rem 0.8rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--primary-dark);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.16s ease;
}

.auth-tab-btn:hover {
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  color: var(--primary);
  box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-1px);
}

.auth-tab-btn.is-active {
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

body[data-theme="dark"] .auth-tab-btn {
  background: linear-gradient(180deg, #17314c 0%, #12263d 100%);
  border-color: #4a729e;
  color: #dbeafe;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .auth-tabs-bar {
  background: linear-gradient(180deg, rgba(20, 37, 59, 0.98), rgba(11, 23, 38, 0.94));
  border-color: #334155;
  box-shadow: 0 18px 34px rgba(2, 8, 18, 0.34);
}

body[data-theme="dark"] .auth-tab-btn:hover {
  background: linear-gradient(180deg, #1c3d5e 0%, #16314d 100%);
  border-color: #6797c7;
  color: #ffffff;
}

body[data-theme="dark"] .auth-tab-btn.is-active .auth-tab-badge {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

body[data-theme="dark"] .module-shell[data-module-view="transport-vehicles"] .auth-tab-panels,
body[data-theme="dark"] .module-shell[data-module-view="admin-users"] .auth-tab-panels,
body[data-theme="dark"] .payroll-shell--workspace .auth-tab-panels,
body[data-theme="dark"] .hiring-shell--workspace .auth-tab-panels {
  background: linear-gradient(180deg, rgba(13, 24, 40, 0.98), rgba(10, 18, 31, 0.94));
  border-color: #243447;
  box-shadow: 0 22px 40px rgba(2, 8, 18, 0.4);
}

.auth-tab-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--brand-blue-soft) 58%, #ffffff 42%);
  color: var(--primary-deeper);
  border: 1px solid color-mix(in srgb, var(--brand-blue-deep) 18%, transparent);
}

.auth-tab-panels {
  display: grid;
  gap: 0.95rem;
  margin-top: 0.8rem;
}

.auth-tab-panel[hidden] {
  display: none !important;
}

.auth-tab-panel:not(.hidden) {
  animation: hr-panel-in 0.22s ease-out;
}

.auth-tab-panel.tab-switch-instant:not(.hidden),
.hr-workspace-panel.tab-switch-instant:not(.hidden),
.payroll-data-pane.tab-switch-instant:not(.hidden),
.hist-panel.tab-switch-instant:not(.hidden),
.hist-fleet-pane.tab-switch-instant:not(.hidden) {
  animation: none !important;
}

.auth-tab-panel > .p-card,
.auth-tab-panel > .ops-block {
  margin: 0;
}

.module-shell[data-module-view="transport-vehicles"] .auth-tab-panels,
.module-shell[data-module-view="admin-users"] .auth-tab-panels,
.payroll-shell--workspace .auth-tab-panels,
.hiring-shell--workspace .auth-tab-panels {
  padding: 0.4rem;
  border-radius: 20px;
  border: 1px solid rgba(var(--primary-rgb), 0.08);
  background: linear-gradient(180deg, rgba(var(--brand-blue-soft-rgb), 0.12), rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 36px rgba(var(--primary-rgb), 0.06);
}

.module-shell[data-module-view="transport-vehicles"] .auth-tab-panel > .p-card,
.module-shell[data-module-view="admin-users"] .auth-tab-panel > .p-card,
.payroll-shell--workspace .auth-tab-panel > .p-card,
.hiring-shell--workspace .auth-tab-panel > .p-card {
  border-radius: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .auth-tab-panel:not(.hidden) {
    animation: none;
  }
}

@media (max-width: 720px) {
  .auth-tabs-bar {
    padding: 0.35rem;
    border-radius: 14px;
  }

  .auth-tab-btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .module-shell[data-module-view="transport-vehicles"] .auth-tab-panels,
  .module-shell[data-module-view="admin-users"] .auth-tab-panels,
  .payroll-shell--workspace .auth-tab-panels,
  .hiring-shell--workspace .auth-tab-panels {
    padding: 0.75rem;
    border-radius: 16px;
  }
}

.auth-tab-panel .auth-queue-section {
  margin-top: 0;
}

.auth-queue-scroll {
  max-height: min(55vh, 520px);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.auth-info-blocks {
  margin: 1rem 0 0;
}

.auth-request-cards-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: min(50vh, 420px);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.auth-request-card {
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--module-border-strong, #c5d8ec) 88%, transparent);
  padding: 0.65rem 0.75rem;
  background: color-mix(in srgb, #ffffff 92%, var(--module-soft-bg, #f5f9ff) 8%);
}

.auth-request-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.auth-request-card-id {
  font-weight: 700;
}

.auth-request-card-route {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.92rem;
  line-height: 1.35;
}

.auth-request-card-meta,
.auth-request-card-date {
  margin: 0.1rem 0;
  font-size: 0.84rem;
}

.auth-request-card-actions {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-start;
}

.auth-request-card-actions > .btn {
  flex: 1 1 10.5rem;
  min-width: 0;
  justify-content: center;
}

.route-rate-scope-mount {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.route-rate-scope-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.65rem;
}

.route-rate-scope-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  text-align: left;
  font: inherit;
  border-radius: 12px;
  border: 2px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: color-mix(in srgb, #ffffff 94%, var(--primary) 6%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.route-rate-scope-card:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
}

.route-rate-scope-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.route-rate-scope-card-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted, #64748b);
}

.route-rate-scope-card-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary-deeper, #1e3a5f);
}

.route-rate-scope-card.is-selected,
.route-rate-scope-card[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  background: color-mix(in srgb, var(--primary) 12%, var(--white));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 14%, transparent);
}

.route-rate-clients-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  padding: 0.72rem;
  background: color-mix(in srgb, #ffffff 90%, var(--brand-blue-soft, #e8f4fc) 10%);
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.route-rate-clients-block.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.route-rate-clients-block.is-active {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  opacity: 1;
  pointer-events: auto;
}

.route-rate-clients-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.route-rate-clients-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.route-rate-clients-search-row input[type="search"] {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.52rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.route-rate-clients-filter-meta {
  font-size: 0.8rem;
  white-space: nowrap;
}

.route-rate-clients-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 6rem;
  max-height: min(22rem, 50vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.35rem;
  border-radius: 8px;
  border: 1px dashed color-mix(in srgb, var(--primary) 20%, var(--line));
  background: var(--white);
  -webkit-overflow-scrolling: touch;
}

.route-rate-company-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  margin: 0;
  border: none;
  background: transparent;
  box-sizing: border-box;
}

.route-rate-company-item:hover {
  background: color-mix(in srgb, var(--primary) 8%, var(--white));
}

.route-rate-company-item input[type="checkbox"] {
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.route-rate-company-item-text {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-main, #0f172a);
  cursor: pointer;
}

.route-rate-company-name {
  font-weight: 700;
  color: var(--primary-deeper, #1e3a5f);
  word-break: break-word;
}

.route-rate-company-tax {
  font-size: 0.78rem;
}

.route-rate-clients-empty {
  margin: 0.35rem 0;
  font-size: 0.86rem;
}

.route-rate-clients-toolbar {
  justify-content: flex-start;
  gap: 0.4rem;
}

.route-rate-company-count-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  padding: 0.55rem 0.72rem;
  background: color-mix(in srgb, #ffffff 85%, var(--brand-blue-soft) 15%);
}

.route-rate-company-count-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1f4f8c;
}

.route-rate-company-count-value {
  font-size: 0.92rem;
  color: #0f172a;
}

.route-rate-scope-help {
  border-radius: 10px;
  padding: 0.56rem 0.68rem;
  border: 1px dashed color-mix(in srgb, var(--primary) 25%, var(--line));
  background: color-mix(in srgb, #ffffff 84%, var(--brand-blue-soft) 16%);
}

.route-rates-table-wrap {
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, #ffffff 94%, var(--brand-blue-soft) 6%);
  padding: 0.45rem 0.55rem;
}

.route-rates-table {
  min-width: 48rem;
  border-collapse: separate;
  border-spacing: 0 0.4rem;
}

.route-rates-table thead th {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--primary-deeper, #1e3a5f);
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  white-space: nowrap;
}

.route-rates-table tbody td {
  vertical-align: middle;
  padding: 0.85rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-main, #1e293b);
  background: color-mix(in srgb, #ffffff 95%, var(--brand-blue-soft) 5%);
  border-top: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
}

.route-rates-table tbody tr td:first-child {
  border-left: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.route-rates-table tbody tr td:last-child {
  border-right: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.route-rate-route-cell {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
  max-width: 22rem;
}

/**
 * Bloque introductorio sobre la tabla de tarifas — explica con un texto
 * corto qué es esta vista para usuarios menos técnicos.
 */
.route-rates-intro {
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, #ffffff), color-mix(in srgb, var(--primary) 14%, #ffffff));
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.route-rates-intro-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-deeper, #1e3a5f);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.route-rates-intro-body {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-main, #334155);
  line-height: 1.45;
}

.route-rates-intro-note {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.82rem;
  color: var(--muted, #64748b);
  line-height: 1.4;
}

.route-rates-intro svg,
.route-rates-intro .btn-icon {
  vertical-align: -2px;
}

body[data-theme="dark"] .route-rates-intro {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, #0f172a), color-mix(in srgb, var(--primary) 12%, #0f172a));
  border-color: color-mix(in srgb, var(--primary) 30%, #2a3f56);
}

body[data-theme="dark"] .route-rates-intro-title {
  color: #e2e8f0;
}

body[data-theme="dark"] .route-rates-intro-body,
body[data-theme="dark"] .route-rates-intro-note {
  color: #94a3b8;
}

body[data-theme="dark"] .route-rates-table thead th {
  color: #cbd5e1;
}

body[data-theme="dark"] .route-rates-table tbody td {
  color: #e2e8f0;
}

body[data-theme="dark"] .route-rate-route-city {
  color: #e0f2fe;
}

body[data-theme="dark"] .route-rate-route-dept,
body[data-theme="dark"] .route-rate-route-label {
  color: #94a3b8;
}

body[data-theme="dark"] .route-rate-route-arrow {
  background: color-mix(in srgb, var(--primary) 35%, #0f172a);
  color: #7dd3fc;
}

/**
 * Hint de subsección dentro de los formularios coloreados.
 * Texto introductorio compacto que aparece debajo del <legend>.
 */
.form-section .form-section-hint {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  line-height: 1.45;
}

.route-rate-route-leg {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1 1 0;
}

.route-rate-route-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.route-rate-route-city {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary-deeper, #0f3d6e);
  letter-spacing: -0.01em;
}

.route-rate-route-dept {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted, #64748b);
}

.route-rate-route-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, var(--white));
  color: var(--primary-dark);
}

.route-rate-route-arrow .btn-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.route-rate-scope-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.route-rate-scope-badge--all {
  color: #1f4f8c;
  background: color-mix(in srgb, #bfdbfe 58%, #ffffff 42%);
  border: 1px solid #93c5fd;
}

.route-rate-scope-badge--specific {
  color: #065f46;
  background: color-mix(in srgb, #bbf7d0 62%, #ffffff 38%);
  border: 1px solid #86efac;
}

.route-rate-client-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.route-rate-client-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
  background: color-mix(in srgb, #ffffff 88%, var(--brand-blue-soft) 12%);
  color: #1f3550;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.28rem 0.58rem;
}

.route-rate-clients-all {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted, #64748b);
}

.route-rate-money-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-start;
}

.route-rate-value {
  font-size: 1.08rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.15;
}

.route-rate-value-unit {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  letter-spacing: 0.02em;
}

.route-rate-actions {
  gap: 0.34rem;
  justify-content: flex-start;
}

body[data-theme="dark"] .route-rate-scope-card,
body[data-theme="dark"] .route-rate-clients-block,
body[data-theme="dark"] .route-rate-clients-list {
  background: color-mix(in srgb, var(--surface, #0f172a) 92%, var(--primary) 8%);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
}

body[data-theme="dark"] .route-rate-company-item:hover {
  background: color-mix(in srgb, var(--primary) 18%, var(--surface, #0f172a));
}

body[data-theme="dark"] .route-rate-company-count-wrap,
body[data-theme="dark"] .route-rate-scope-help,
body[data-theme="dark"] .route-rates-table-wrap {
  border-color: color-mix(in srgb, var(--primary) 35%, #233044);
  background: color-mix(in srgb, #0f172a 84%, var(--primary) 16%);
}

body[data-theme="dark"] .route-rate-company-count-label {
  color: #93c5fd;
}

body[data-theme="dark"] .route-rate-company-count-value,
body[data-theme="dark"] .route-rate-value {
  color: #e2e8f0;
}

body[data-theme="dark"] .route-rate-scope-badge--all {
  color: #bfdbfe;
  border-color: #3b82f6;
  background: color-mix(in srgb, #1d4ed8 28%, transparent);
}

body[data-theme="dark"] .route-rate-scope-badge--specific {
  color: #bbf7d0;
  border-color: #22c55e;
  background: color-mix(in srgb, #15803d 30%, transparent);
}

body[data-theme="dark"] .route-rate-client-chip {
  color: #dbeafe;
  border-color: color-mix(in srgb, var(--primary) 40%, #243041);
  background: color-mix(in srgb, #0f172a 70%, var(--primary) 30%);
}

body[data-theme="dark"] .route-rate-clients-select {
  border-color: color-mix(in srgb, var(--primary) 35%, #2b3749);
  background: color-mix(in srgb, #0f172a 85%, var(--primary) 15%);
}

body[data-theme="dark"] .auth-tab-btn.is-active {
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  border-color: rgba(173, 214, 255, 0.28);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

body[data-theme="dark"] .auth-request-card {
  background: color-mix(in srgb, #0f172a 88%, var(--module-soft-bg, #1e293b) 12%);
}

.auth-type-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--module-accent-start, #5a73d4) 12%, transparent);
  color: inherit;
  max-width: 14rem;
}

.auth-detail-cell {
  font-size: 0.88rem;
  max-width: 18rem;
}

.auth-pending-table {
  margin-top: 0.35rem;
}

.auth-approval-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.auth-pending-table tbody td:last-child {
  text-align: right;
  vertical-align: middle;
}

.auth-pending-table .auth-approval-toolbar .btn {
  min-width: 6.25rem;
  justify-content: center;
}

.auth-flow-catalog {
  margin-top: 1.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--module-border-strong, #c5d8ec) 90%, transparent);
  background: var(--module-soft-bg, #f5f9ff);
}

.auth-flow-catalog-summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.95rem;
}

.auth-flow-catalog-lead {
  margin: 0.65rem 0 0.5rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.auth-flow-catalog-list {
  margin: 0.35rem 0 0.15rem;
  padding-left: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.auth-hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 1.1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--module-accent-end, var(--brand-blue-mid)) 38%, var(--line, #c5d8ec));
  background: linear-gradient(
    125deg,
    color-mix(in srgb, var(--module-accent-start, var(--brand-blue-deep)) 12%, #ffffff 88%) 0%,
    color-mix(in srgb, var(--brand-blue-soft) 35%, #ffffff 65%) 100%
  );
  box-shadow: 0 8px 26px rgba(var(--primary-rgb), 0.1);
}

.auth-hub-toolbar-lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  min-width: 0;
}

.auth-hub-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 650;
  font-size: 0.88rem;
  color: var(--text-main, #0b1d33);
}

.auth-hub-live-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--brand-blue-deep);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.28);
  animation: auth-hub-pulse 2.2s ease-in-out infinite;
}

@keyframes auth-hub-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(0.92);
  }
}

.auth-hub-live-meta {
  font-size: 0.8rem;
}

.auth-hub-sync-btn {
  flex-shrink: 0;
}

.auth-ref-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.18rem 0.48rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-blue-deep) 10%, var(--brand-blue-soft) 90%);
  border: 1px solid color-mix(in srgb, var(--brand-blue-deep) 22%, transparent);
  color: var(--primary-deeper);
  white-space: nowrap;
}

.auth-sync-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line, #c5d8ec);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: flex-start;
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-sync-banner strong {
  margin-right: 0.35rem;
}

.auth-sync-banner--err {
  background: color-mix(in srgb, #dc2626 9%, #fff5f5);
  border-color: color-mix(in srgb, #dc2626 32%, transparent);
}

.auth-sync-banner--warn {
  background: color-mix(in srgb, #d97706 11%, #fffbeb);
  border-color: color-mix(in srgb, #d97706 30%, transparent);
}

.auth-inbox-card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.auth-inbox-card-title-row .auth-inbox-card-name {
  flex: 1;
  min-width: min(100%, 12rem);
}

.auth-inbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
}

.auth-inbox-card {
  position: relative;
  display: flex;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line, #c5d8ec) 82%, var(--brand-blue-deep) 18%);
  background: linear-gradient(165deg, #ffffff 0%, color-mix(in srgb, var(--brand-blue-soft) 42%, #ffffff 58%) 100%);
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.08);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-inbox-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.auth-inbox-card-accent {
  width: 5px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--brand-blue-deep), var(--brand-blue-mid));
}

.auth-inbox-card-main {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1rem 1rem 0.65rem;
  min-width: 0;
  flex: 1;
}

.auth-inbox-card-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-blue-deep), var(--brand-blue-mid));
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.35);
}

.auth-inbox-card-body {
  flex: 1;
  min-width: 0;
}

.auth-inbox-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}

.auth-inbox-card-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.auth-inbox-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-blue-soft) 58%, #ffffff 42%);
  color: var(--primary-deeper);
  border: 1px solid color-mix(in srgb, var(--brand-blue-deep) 16%, transparent);
}

.auth-inbox-card-email {
  margin: 0.35rem 0 0.45rem;
  font-size: 0.84rem;
  color: var(--text-soft, #344f69);
  word-break: break-word;
}

.auth-inbox-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.auth-inbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--module-accent-start) 10%, #ffffff 90%);
  border: 1px solid color-mix(in srgb, var(--module-accent-start) 22%, transparent);
  color: color-mix(in srgb, var(--text) 88%, var(--module-accent-start) 12%);
}

.auth-inbox-chip svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.auth-inbox-card-date {
  margin: 0.55rem 0 0.45rem;
  font-size: 0.78rem;
  color: var(--text-soft, #64748b);
}

.auth-inbox-actions {
  margin-top: 0.15rem;
}

.auth-inbox-empty .empty-state {
  margin: 0.5rem 0;
}

.auth-inbox-source {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.auth-inbox-source svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.auth-inbox-source--db {
  background: color-mix(in srgb, var(--brand-blue-mid) 14%, #ffffff 86%);
  color: var(--primary-deeper);
  border: 1px solid color-mix(in srgb, var(--brand-blue-mid) 30%, transparent);
}

.auth-inbox-source--auth {
  background: color-mix(in srgb, var(--warning) 14%, #fffbf0 86%);
  color: #9a3412;
  border: 1px solid color-mix(in srgb, var(--warning) 32%, transparent);
}

.auth-inbox-card--orphan {
  border-color: color-mix(in srgb, var(--warning) 26%, var(--line, #c5d8ec) 74%);
  background: linear-gradient(165deg, #fffbf0 0%, #ffffff 100%);
}

.auth-inbox-card--orphan .auth-inbox-card-accent {
  background: linear-gradient(180deg, color-mix(in srgb, var(--warning) 92%, #92400e 8%), var(--warning));
}

body[data-theme="dark"] .auth-inbox-source--db {
  background: color-mix(in srgb, var(--brand-blue-mid) 24%, #0f1f34 76%);
  color: var(--brand-blue-soft);
  border-color: color-mix(in srgb, var(--brand-blue-mid) 35%, transparent);
}

body[data-theme="dark"] .auth-inbox-source--auth {
  background: color-mix(in srgb, var(--warning) 22%, #2a1810 78%);
  color: #fcd34d;
  border-color: color-mix(in srgb, var(--warning) 38%, transparent);
}

body[data-theme="dark"] .auth-inbox-card--orphan {
  background: linear-gradient(165deg, #2a2118 0%, #1c1929 100%);
  border-color: color-mix(in srgb, var(--warning) 34%, #334155 66%);
}

@media (max-width: 520px) {
  .auth-inbox-card-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-inbox-card-avatar {
    width: 2.75rem;
    height: 2.75rem;
  }
}

body[data-theme="dark"] .auth-hub-toolbar {
  background: linear-gradient(125deg, color-mix(in srgb, var(--module-accent-start) 22%, #0f1f34) 0%, #0f1f34 100%);
  border-color: color-mix(in srgb, var(--module-accent-end) 40%, #334155 60%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .auth-hub-live {
  color: #e8f3ff;
}

body[data-theme="dark"] .auth-inbox-card {
  background: linear-gradient(165deg, #13283f 0%, #0f1f34 100%);
  border-color: color-mix(in srgb, var(--module-accent-end) 35%, #334155 65%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

body[data-theme="dark"] .auth-inbox-chip {
  background: color-mix(in srgb, var(--module-accent-start) 18%, #0f1f34 82%);
  border-color: color-mix(in srgb, var(--module-accent-end) 28%, transparent);
  color: #c8dff8;
}

body[data-theme="dark"] .auth-inbox-pulse {
  background: color-mix(in srgb, var(--brand-blue-deep) 36%, #0f1f34 64%);
  color: var(--brand-blue-soft);
}

body[data-theme="dark"] .auth-queue-section {
  background: color-mix(in srgb, var(--module-accent-start, #5a73d4) 8%, #0f1f34 92%);
}

body[data-theme="dark"] .auth-queue-section--info {
  background: color-mix(in srgb, var(--module-accent-start, #5a73d4) 12%, #0f1f34 88%);
}

body[data-theme="dark"] .module-shell[data-module-view="authorizations"] .auth-section-count {
  background: color-mix(in srgb, var(--brand-blue-deep) 34%, #0f1f34 66%);
  color: var(--brand-blue-soft);
  border-color: color-mix(in srgb, var(--brand-blue-mid) 40%, transparent);
}

body[data-theme="dark"] .auth-flow-catalog {
  background: color-mix(in srgb, var(--module-accent-start, #5a73d4) 10%, #0f1f34 90%);
}

.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(180deg, #5794d8 0%, #377cc0 54%, #2a6399 100%);
  border-color: rgba(29, 83, 132, 0.18);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(47, 116, 198, 0.2);
}

.portal-main .btn-action:hover {
  background: linear-gradient(180deg, #67a3e4 0%, #4185cc 52%, #2a6399 100%);
  border-color: rgba(29, 83, 132, 0.28);
}

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(180deg, #5d9ce2 0%, #377cc0 52%, #244f78 100%);
  border-color: rgba(149, 196, 255, 0.45);
  color: #f3f9ff;
  box-shadow: 0 12px 24px rgba(4, 17, 34, 0.28);
}

.portal-main .dash-grid {
  grid-template-columns: var(--ops-tile-grid, repeat(auto-fill, minmax(min(100%, 17.25rem), 19.5rem)));
  justify-content: start;
  gap: var(--ops-cards-gap, 0.75rem);
  align-items: stretch;
}

/**
 * Viajes: acciones de alta (crear viaje + tarifa) en columna única para que el formulario
 * de asignación use todo el ancho del panel y no quede partido en dos mitades de pantalla.
 */
.portal-main .dash-grid.trips-actions-row--two {
  grid-template-columns: minmax(0, 1fr);
}

@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));
  }
}

/**
 * Modo "apilado" para la pestaña Seguimiento del módulo Contratación.
 * Cada tarjeta (alertas, candidatos, vacantes, entrevistas, contratos, cargos)
 * ocupa el ancho completo del panel, de modo que las tablas con muchas columnas
 * (8-9 cabeceras) no requieran scroll horizontal y se lean cómodamente.
 */
.hiring-data-grid.hiring-results-grid.hiring-results-grid--stacked,
.hiring-shell--workspace .hiring-results-grid.hiring-results-grid--stacked {
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
}

@media (min-width: 1024px) {
  .hiring-data-grid.hiring-results-grid.hiring-results-grid--stacked {
    grid-template-columns: minmax(0, 1fr);
  }
}

/**
 * Cuando la tabla aún excede el ancho del card (móviles muy estrechos),
 * `.table-wrap` mantiene el scroll-x pero le damos pista visual con
 * gradiente lateral y aire interno suficiente para que se vea ordenado.
 */
.hiring-results-grid--stacked .table-wrap {
  position: relative;
  border-radius: 10px;
  border: 1px solid rgba(var(--primary-rgb), 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 10px 24px rgba(15, 23, 42, 0.05);
  background: linear-gradient(
      to right,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0) 24px
    ),
    linear-gradient(
      to left,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0) 24px
    ),
    linear-gradient(
      to right,
      rgba(11, 29, 51, 0.08),
      rgba(11, 29, 51, 0)
    ),
    linear-gradient(to left, rgba(11, 29, 51, 0.08), rgba(11, 29, 51, 0));
  background-attachment: local, local, scroll, scroll;
  background-position: 0 0, 100% 0, 0 0, 100% 0;
  background-repeat: no-repeat;
  background-size: 24px 100%, 24px 100%, 14px 100%, 14px 100%;
}

.hiring-results-grid--stacked .table-wrap table {
  min-width: 100%;
}

body[data-theme="dark"] .hiring-results-grid--stacked .table-wrap {
  border-color: rgba(148, 196, 255, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.02) inset,
    0 14px 28px rgba(2, 8, 18, 0.34);
  background: linear-gradient(
      to right,
      rgba(8, 18, 32, 1) 0%,
      rgba(8, 18, 32, 0) 24px
    ),
    linear-gradient(
      to left,
      rgba(8, 18, 32, 1) 0%,
      rgba(8, 18, 32, 0) 24px
    ),
    linear-gradient(
      to right,
      rgba(148, 196, 255, 0.12),
      rgba(148, 196, 255, 0)
    ),
    linear-gradient(to left, rgba(148, 196, 255, 0.12), rgba(148, 196, 255, 0));
  background-attachment: local, local, scroll, scroll;
  background-position: 0 0, 100% 0, 0 0, 100% 0;
  background-repeat: no-repeat;
  background-size: 24px 100%, 24px 100%, 14px 100%, 14px 100%;
}

.portal-main .dash-grid > .p-card,
.portal-main .hiring-actions-grid > .p-card,
.portal-main .hiring-actions-grid > .hr-action-card,
.portal-main .hiring-data-grid > .p-card,
.portal-main .hiring-data-grid > .hr-data-card,
.portal-main .payroll-data-grid > .p-card,
.portal-main .payroll-data-grid > .hr-data-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-actions-grid > .hr-action-card,
.portal-main .hiring-data-grid > .p-card,
.portal-main .hiring-data-grid > .hr-data-card,
.portal-main .payroll-data-grid > .p-card,
.portal-main .payroll-data-grid > .hr-data-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-actions-grid > .hr-action-card .hr-action-card__panel,
.portal-main .hiring-data-grid > .p-card .p-card-body,
.portal-main .hiring-data-grid > .hr-data-card .hr-data-card__body,
.portal-main .payroll-data-grid > .p-card .p-card-body,
.portal-main .payroll-data-grid > .hr-data-card .hr-data-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"] .portal-main .muted,
body[data-theme="dark"] .portal-main .ops-block-lead {
  color: var(--text-soft);
}

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"] .portal-main .quality-row span,
body[data-theme="dark"] .portal-main .quality-row b {
  color: var(--text-soft);
}

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(180deg, #71acee 0%, #4589cf 52%, #2b5f90 100%);
}

@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;
  }
}

.side-link {
  position: relative;
}
.side-link-badge {
  position: absolute;
  top: 0.2rem;
  right: 0.15rem;
  margin-left: 0;
  flex-shrink: 0;
  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;
  min-height: 1.15rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
}

.side-link--notif-inbox .side-link-badge:empty,
.side-link--notif-inbox:not(:has(.side-link-badge))::before {
  content: none;
}

/* Campana + «Sonido» / «Avisos»: clics independientes (ver app.js). */
.side-link-notif-control {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: -0.2rem 0.1rem -0.2rem -0.25rem;
  padding: 0.12rem 0.2rem;
  border-radius: 10px;
  cursor: default;
}
.side-link-notif-control:hover {
  background: rgba(255, 255, 255, 0.08);
}
.side-link-notif-bell {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0.05rem 0;
  cursor: pointer;
}
.side-link-notif-pref-col {
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
  align-items: flex-start;
  min-width: 0;
}
.side-link-notif-sound-pill,
.side-link-notif-alerts-pill {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.12;
  opacity: 0.9;
  max-width: 4.8rem;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  padding: 0.02rem 0;
}
.side-link-notif-control:hover .side-icon {
  opacity: 1;
}
.side-link.side-link--notif-sound-muted .side-link-notif-bell .side-icon {
  opacity: 0.45;
}
.side-link.side-link--notif-sound-muted .side-link-notif-bell {
  position: relative;
}
.side-link.side-link--notif-sound-muted .side-link-notif-bell::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 50%;
  height: 2px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 1px;
  transform: translateY(-50%) rotate(-32deg);
  pointer-events: none;
}
.side-link.side-link--notif-sound-muted .side-link-notif-sound-pill {
  opacity: 0.72;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.45);
}
.side-link.side-link--notif-alerts-off .side-link-notif-alerts-pill {
  opacity: 0.72;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.45);
}

.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, var(--primary-deeper) 0%, var(--primary) 52%, var(--brand-blue-mid) 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(var(--primary-rgb), 0.28);
  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;
}

.users-hero-strip--command {
  align-items: stretch;
  justify-content: space-between;
  gap: 1.15rem 1.4rem;
}

.admin-users-hero-main {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.admin-users-hero-main h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.08;
  max-width: 18ch;
}

.users-hero-strip--command .admin-users-hero-main > p:last-child {
  max-width: 64ch;
}

.admin-users-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-users-hero-panel {
  flex: 0 1 360px;
  min-width: min(100%, 300px);
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.09));
  backdrop-filter: blur(8px);
}

.admin-users-hero-panel--compact {
  align-content: start;
}

.admin-users-hero-panel__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.admin-users-hero-panel__copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.45;
}

.admin-users-hero-score {
  display: grid;
  gap: 0.18rem;
}

.admin-users-hero-score span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.admin-users-hero-score strong {
  font-size: 2.2rem;
  line-height: 1;
  color: #fff;
}

.admin-users-hero-score p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.45;
}

.users-hero-strip--command .users-hero-actions {
  width: 100%;
  gap: 0.6rem;
}

.admin-users-hero-panel--compact .users-hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.users-hero-strip--command .users-hero-actions .btn {
  flex: 1 1 12.5rem;
  justify-content: center;
}

.admin-users-hero-panel--compact .users-hero-actions .btn {
  flex: initial;
  width: 100%;
}

.admin-users-insights-grid,
.admin-users-command-grid {
  display: grid;
  grid-template-columns: var(--ops-tile-grid, repeat(auto-fill, minmax(min(100%, 17.25rem), 19.5rem)));
  justify-content: start;
  gap: var(--ops-cards-gap, 0.75rem);
  margin-bottom: 1rem;
}

.admin-users-insight-card,
.admin-users-command-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.admin-users-insight-card--highlight {
  background: linear-gradient(145deg, rgba(240, 247, 255, 0.98), rgba(255, 252, 242, 0.96));
  border-color: rgba(55, 124, 192, 0.18);
}

.admin-users-insight-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.admin-users-insight-card__eyebrow,
.admin-users-command-card__eyebrow,
.admin-users-section-kicker {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  font-weight: 800;
}

.admin-users-insight-card__value {
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
  color: var(--primary-dark);
}

.admin-users-insight-card h3,
.admin-users-command-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.28;
  color: var(--text);
}

.admin-users-insight-card p,
.admin-users-command-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.admin-users-inline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.admin-users-inline-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.62rem 0.75rem;
  border-radius: 12px;
  background: rgba(var(--brand-blue-soft-rgb), 0.2);
  border: 1px solid rgba(var(--primary-rgb), 0.08);
}

.admin-users-inline-list li strong {
  color: var(--text);
  font-size: 0.84rem;
}

.admin-users-inline-list li span {
  font-size: 0.76rem;
  color: var(--text-soft);
  text-align: right;
}

.admin-users-inline-empty {
  margin: 0;
}

.admin-users-mini-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-users-mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  background: rgba(var(--brand-blue-soft-rgb), 0.26);
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 700;
}

.admin-users-mini-chip strong {
  color: var(--text);
  font-size: 0.8rem;
}

.admin-users-mini-chip--muted {
  color: var(--text-soft);
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.16);
}

.admin-users-command-card {
  gap: 0.9rem;
}

.admin-users-command-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #377cc0, #245b90);
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 91, 144, 0.24);
}

.admin-users-command-card__icon svg {
  width: 1.28rem;
  height: 1.28rem;
}

.admin-users-command-card__body {
  display: grid;
  gap: 0.45rem;
}

.admin-users-command-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-users-command-card__meta span {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-users-command-card.is-active {
  border-color: rgba(var(--primary-rgb), 0.24);
  background: linear-gradient(160deg, rgba(239, 246, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 16px 38px rgba(var(--primary-rgb), 0.14);
}

.admin-users-command-card > .btn {
  margin-top: auto;
  align-self: flex-start;
}

.admin-users-data-card {
  border-color: rgba(var(--primary-rgb), 0.12);
}

.admin-users-data-card .hr-card-icon {
  background: linear-gradient(145deg, #377cc0, #245b90);
}

.admin-users-data-card .p-card-body {
  display: grid;
  gap: 0.75rem;
}

.admin-users-focus-card {
  border-color: rgba(var(--primary-rgb), 0.18);
  box-shadow: 0 18px 40px rgba(var(--primary-rgb), 0.1);
}

.admin-users-focus-card .hr-data-card__head {
  background: linear-gradient(180deg, rgba(var(--brand-blue-soft-rgb), 0.32), rgba(255, 255, 255, 0.94));
}

.admin-users-focus-card .toolbar.hr-create-toolbar {
  margin-bottom: 0.75rem !important;
}

.admin-users-focus-card .toolbar.hr-create-toolbar .btn {
  min-width: 13rem;
  justify-content: center;
}

.admin-users-form-lead {
  margin: 0 0 0.1rem;
  max-width: 44rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.admin-users-list-shell {
  display: grid;
  gap: 0.35rem;
}

.admin-users-section-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  background: linear-gradient(180deg, rgba(var(--brand-blue-soft-rgb), 0.18), rgba(255, 255, 255, 0.92));
}

.admin-users-section-copy {
  margin: 0.22rem 0 0;
  max-width: 52rem;
  line-height: 1.5;
}

.admin-users-section-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-start;
}

.admin-users-session-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  background: linear-gradient(180deg, rgba(var(--brand-blue-soft-rgb), 0.22), rgba(255, 255, 255, 0.95));
}

.admin-users-session-topbar--compact {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.admin-users-session-topbar__metrics,
.admin-users-session-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.admin-users-inline-note {
  margin: -0.2rem 0 0;
}

.portal-data-hydrating-banner {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md, 8px);
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
  color: var(--text, #1e293b);
  font-size: 0.92rem;
  line-height: 1.35;
}

body[data-theme="dark"] .portal-data-hydrating-banner {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: var(--text, #e2e8f0);
}

body[data-theme="dark"] .admin-users-hero-panel {
  border-color: rgba(191, 219, 254, 0.2);
  background: linear-gradient(180deg, rgba(8, 20, 36, 0.32), rgba(8, 20, 36, 0.16));
}

body[data-theme="dark"] .admin-users-hero-panel__copy,
body[data-theme="dark"] .admin-users-hero-panel__eyebrow {
  color: rgba(239, 246, 255, 0.9);
}

body[data-theme="dark"] .admin-users-insight-card,
body[data-theme="dark"] .admin-users-command-card {
  border-color: rgba(148, 196, 255, 0.14);
  background: linear-gradient(165deg, rgba(14, 28, 46, 0.96), rgba(10, 22, 38, 0.94));
  box-shadow: 0 16px 34px rgba(2, 8, 18, 0.42);
}

body[data-theme="dark"] .admin-users-insight-card--highlight,
body[data-theme="dark"] .admin-users-command-card.is-active {
  background: linear-gradient(165deg, rgba(18, 36, 58, 0.98), rgba(11, 24, 40, 0.94));
  border-color: rgba(96, 165, 250, 0.26);
}

body[data-theme="dark"] .admin-users-insight-card__value,
body[data-theme="dark"] .admin-users-mini-chip,
body[data-theme="dark"] .admin-users-data-card .hr-data-card__stat {
  color: #d9ecff;
}

body[data-theme="dark"] .admin-users-insight-card h3,
body[data-theme="dark"] .admin-users-command-card h3,
body[data-theme="dark"] .admin-users-inline-list li strong {
  color: #f4f8ff;
}

body[data-theme="dark"] .admin-users-insight-card p,
body[data-theme="dark"] .admin-users-command-card p,
body[data-theme="dark"] .admin-users-inline-list li span,
body[data-theme="dark"] .admin-users-command-card__meta span,
body[data-theme="dark"] .admin-users-section-copy,
body[data-theme="dark"] .admin-users-form-lead,
body[data-theme="dark"] .admin-users-inline-empty,
body[data-theme="dark"] .admin-users-inline-note {
  color: #a9c8ea;
}

body[data-theme="dark"] .admin-users-inline-list li,
body[data-theme="dark"] .admin-users-section-summary,
body[data-theme="dark"] .admin-users-session-topbar {
  background: linear-gradient(180deg, rgba(18, 32, 52, 0.9), rgba(12, 24, 40, 0.9));
  border-color: rgba(148, 196, 255, 0.12);
}

body[data-theme="dark"] .admin-users-session-topbar--compact {
  background: transparent;
  border-color: transparent;
}

body[data-theme="dark"] .admin-users-focus-card {
  border-color: rgba(96, 165, 250, 0.22);
  box-shadow: 0 20px 40px rgba(2, 8, 18, 0.42);
}

body[data-theme="dark"] .admin-users-focus-card .hr-data-card__head {
  background: linear-gradient(180deg, rgba(18, 32, 52, 0.98), rgba(14, 28, 46, 0.9));
}

body[data-theme="dark"] .admin-users-mini-chip {
  background: rgba(var(--primary-rgb), 0.14);
  border-color: rgba(148, 196, 255, 0.18);
}

body[data-theme="dark"] .admin-users-mini-chip strong {
  color: #f4f8ff;
}

body[data-theme="dark"] .admin-users-mini-chip--muted {
  background: rgba(71, 85, 105, 0.28);
  color: #a9c8ea;
}

body[data-theme="dark"] .admin-users-command-card__meta span {
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 900px) {
  .admin-users-hero-panel {
    flex-basis: 100%;
  }

  .users-hero-strip--command .users-hero-actions .btn {
    flex-basis: calc(50% - 0.35rem);
  }
}

@media (max-width: 640px) {
  .admin-users-inline-list li,
  .admin-users-session-topbar,
  .admin-users-section-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .users-hero-strip--command .users-hero-actions .btn,
  .admin-users-command-card > .btn {
    width: 100%;
  }

  .admin-users-hero-panel--compact .users-hero-actions {
    grid-template-columns: 1fr;
  }

  .admin-users-hero-main h2 {
    max-width: none;
  }
}

.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: 900;
  font-size: 0.9rem;
  color: #0a0a0a;
  background: linear-gradient(180deg, #fff9c4 0%, #ffeb3b 45%, #fdd835 100%);
  border: 2px solid #1a1a1a;
  padding: 0.22rem 0.55rem;
  border-radius: 7px;
  display: inline-block;
  letter-spacing: 0.08em;
  width: fit-content;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.18);
}

.drivers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 0.9rem;
}
.driver-card {
  background: var(--white);
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 28, 46, 0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}
.driver-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(15, 28, 46, 0.1);
}
.driver-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 0.95rem 0.8rem;
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb), 0.1),
    rgba(var(--brand-blue-soft-rgb), 0.4)
  );
  border-bottom: 1px solid var(--line);
}
.driver-card-head-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.driver-avatar {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-blue-deep), var(--brand-blue-mid));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.8px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.22);
}
.driver-avatar--photo {
  padding: 0;
  border-radius: 14px;
}
.driver-avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.driver-card-title {
  min-width: 0;
}
.driver-card-kicker {
  margin: 0 0 0.22rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #496280;
}
.driver-card-title h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  color: #102847;
}
.driver-card-status-stack {
  display: grid;
  gap: 0.36rem;
  justify-items: end;
  flex-shrink: 0;
}
.driver-card-body {
  padding: 0.8rem 0.95rem 0.9rem;
  display: grid;
  gap: 0.68rem;
}
.driver-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.48rem;
}
.driver-meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.18rem 0.56rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  color: #244566;
  font-size: 0.72rem;
  font-weight: 700;
}
.driver-meta-chip--warn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.3);
  color: #9a6700;
}
.driver-doc-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.72rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.driver-doc-pill--ok {
  color: #166534;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.26);
}
.driver-doc-pill--warning {
  color: #9a6700;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
}
.driver-doc-pill--missing {
  color: #8a4b00;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(245, 158, 11, 0.3);
}
.driver-doc-pill--expired {
  color: #b42318;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
}
.driver-card-summary {
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem 0.78rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.06), rgba(248, 251, 255, 0.98));
  border: 1px solid rgba(var(--primary-rgb), 0.1);
}
.driver-card-summary strong {
  display: block;
  color: #153455;
  font-size: 0.9rem;
}
.driver-card-summary p {
  margin: 0;
  color: #566d88;
  font-size: 0.8rem;
  line-height: 1.4;
}
.driver-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.driver-fact {
  display: grid;
  gap: 0.28rem;
  padding: 0.62rem 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  background: rgba(255, 255, 255, 0.92);
}
.driver-fact > span {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: #4b6684;
  font-size: 0.72rem;
  font-weight: 700;
}
.driver-fact > span svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--primary);
}
.driver-fact strong {
  color: #0f2747;
  font-size: 0.84rem;
  word-break: break-word;
  line-height: 1.35;
}
.driver-card-inline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.1rem 0;
  border-top: 1px dashed rgba(var(--primary-rgb), 0.12);
}
.driver-card-inline-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.driver-card-inline-row > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #365270;
  font-size: 0.78rem;
  font-weight: 700;
}
.driver-card-inline-row > span:first-child svg {
  width: 0.92rem;
  height: 0.92rem;
  color: var(--primary);
}
.driver-card-inline-row > span:last-child {
  min-width: 0;
  text-align: right;
  color: #0f2747;
  font-size: 0.8rem;
  line-height: 1.35;
}
.driver-card-actions {
  display: flex;
  gap: 0.45rem;
  padding: 0.72rem 0.95rem 0.92rem;
  border-radius: 12px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(var(--primary-rgb), 0.02));
  flex-wrap: wrap;
}
.driver-card-actions > .btn {
  flex: 1 1 calc(50% - 0.25rem);
  min-width: 0;
  justify-content: center;
}
.driver-card--busy {
  border-color: rgba(245, 158, 11, 0.24);
}
.driver-card--scheduled {
  border-color: rgba(59, 130, 246, 0.24);
}
.driver-card--available {
  border-color: rgba(16, 185, 129, 0.2);
}
.driver-card--offline {
  border-color: rgba(239, 68, 68, 0.24);
}

.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, #134e5f 0%, var(--brand-blue-deep) 45%, var(--brand-blue-mid) 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(var(--primary-rgb), 0.28);
}
.calendar-toolbar h2 {
  margin: 0.1rem 0 0.2rem;
  color: #fff;
  font-size: 1.5rem;
  text-transform: capitalize;
}

.calendar-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
}
.calendar-title-block h2 {
  margin: 0;
}
.calendar-view-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.calendar-view-toggle .btn {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
  color: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
}
.calendar-view-toggle .btn:hover {
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  color: var(--primary);
}
.calendar-view-toggle .btn.is-active {
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}
.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: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
  color: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.08);
}
.calendar-controls .btn:hover {
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  color: var(--primary);
}
.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, var(--brand-blue-mid), var(--primary)); }
.dot-teal { background: linear-gradient(135deg, var(--brand-blue-soft), var(--brand-blue-mid)); }
.dot-violet { background: linear-gradient(135deg, var(--brand-blue-mid), var(--brand-blue-deep)); }
.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-days--view-day {
  grid-template-columns: 1fr;
}
.cal-days--view-week .cal-cell {
  min-height: 118px;
}
.cal-days--view-day .cal-cell {
  min-height: 260px;
}
.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(var(--primary-rgb), 0.12), rgba(var(--primary-rgb), 0.03));
  box-shadow: inset 0 0 0 2px rgba(var(--primary-rgb), 0.35);
}
.cal-cell-has-events {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.06), #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, var(--primary), var(--primary-deeper));
  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(var(--primary-rgb), 0.08);
  border-left: 3px solid var(--brand-blue-deep);
  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(var(--primary-rgb), 0.14);
}
.cal-event.dot-blue { background: rgba(var(--primary-rgb), 0.1); border-left-color: var(--primary); }
.cal-event.dot-teal { background: rgba(var(--brand-blue-soft-rgb), 0.55); border-left-color: var(--brand-blue-mid); }
.cal-event.dot-violet { background: rgba(var(--primary-rgb), 0.12); border-left-color: var(--brand-blue-deep); }
.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;
}

/* —— Vista Recursos (timeline por conductor / camión) —— */
.calendar-shell--view-resources {
  gap: 0.85rem;
}
.calendar-grid--timeline {
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.cal-timeline-wrap {
  display: grid;
  gap: 0.65rem;
}
.cal-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0 0.15rem;
}
.cal-resource-group-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.06), rgba(var(--brand-blue-soft-rgb), 0.35));
  border: 1px solid rgba(var(--primary-rgb), 0.14);
}
.cal-resource-group-toggle .btn {
  min-height: 2rem;
  padding-inline: 0.7rem;
  font-size: 0.78rem;
}
.cal-resource-group-toggle .btn.is-active {
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  border-color: color-mix(in srgb, var(--primary-deeper) 20%, transparent);
  color: #fff;
  font-weight: 800;
}
.cal-timeline-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: rgba(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 0.16);
}
.cal-timeline-scroll {
  overflow: auto;
  max-height: min(72vh, 760px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
  scroll-behavior: smooth;
}
.cal-timeline-grid {
  --cal-time-w: 72px;
  --cal-res-min: 168px;
  display: grid;
  grid-template-columns: var(--cal-time-w) repeat(var(--cal-cols, 1), minmax(var(--cal-res-min), 1fr));
  grid-template-rows: auto 1fr;
  min-width: max(100%, calc(var(--cal-time-w) + var(--cal-cols, 1) * var(--cal-res-min)));
  position: relative;
}
.cal-timeline-corner {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 4;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 76px;
}
.cal-timeline-resources-header {
  display: contents;
}
.cal-timeline-resource-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  min-height: 76px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-right: 1px solid var(--line);
  border-bottom: 2px solid var(--res-accent, var(--primary));
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.cal-timeline-resource-head:last-child {
  border-right: none;
}
.cal-timeline-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--res-accent, var(--primary)) 88%, #fff), var(--res-accent, var(--primary)));
  border: 2px solid color-mix(in srgb, var(--res-accent, var(--primary)) 35%, #fff);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--res-accent, var(--primary)) 28%, transparent);
}
.cal-timeline-avatar--photo {
  padding: 0;
  background: #e2e8f0;
}
.cal-timeline-avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cal-timeline-avatar--fallback {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--res-accent, var(--primary)) 22%, #fff),
    color-mix(in srgb, var(--res-accent, var(--primary)) 10%, #f8fafc)
  );
}
.cal-timeline-avatar--driver .cal-timeline-avatar-icon,
.cal-timeline-avatar--vehicle .cal-timeline-avatar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--res-accent, var(--primary));
  opacity: 0.92;
}
.cal-timeline-avatar--driver .cal-timeline-avatar-icon .btn-icon,
.cal-timeline-avatar--vehicle .cal-timeline-avatar-icon .btn-icon {
  width: 100%;
  height: 100%;
  stroke-width: 2.1;
}
.cal-timeline-avatar-letter {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.cal-timeline-resource-meta {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.cal-timeline-resource-meta strong {
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-timeline-resource-meta .muted {
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-timeline-resource-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary-dark);
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.18);
}
.cal-timeline-resource-kind {
  opacity: 0.55;
  font-size: 0.95rem;
}
.cal-timeline-times {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  left: 0;
  z-index: 2;
  background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
  border-right: 1px solid var(--line);
}
.cal-timeline-time-slot {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--cal-slot-h, 56px);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0.2rem 0.45rem 0 0;
  pointer-events: none;
}
.cal-timeline-time-slot span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, #f1f5f9 35%);
  padding-left: 0.25rem;
}
.cal-timeline-columns {
  display: contents;
}
.cal-timeline-col {
  position: relative;
  border-right: 1px solid var(--line);
  background: #fff;
}
.cal-timeline-col:last-child {
  border-right: none;
}
.cal-timeline-col-bands,
.cal-timeline-col-events {
  position: relative;
}
.cal-timeline-hour-band {
  position: absolute;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  pointer-events: none;
}
.cal-timeline-hour-band--alt {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.025), rgba(var(--primary-rgb), 0.01));
}
.cal-timeline-block {
  position: absolute;
  z-index: 1;
  display: grid;
  gap: 0.12rem;
  align-content: start;
  padding: 0.38rem 0.5rem;
  border: 1px solid color-mix(in srgb, var(--block-accent, var(--primary)) 28%, var(--line));
  border-left: 4px solid var(--block-accent, var(--primary));
  border-radius: 10px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--block-accent, var(--primary)) 12%, #fff),
    color-mix(in srgb, var(--block-accent, var(--primary)) 6%, #fff)
  );
  box-shadow: 0 8px 18px color-mix(in srgb, var(--block-accent, var(--primary)) 14%, transparent);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.14s ease, z-index 0s;
}
.cal-timeline-block:hover,
.cal-timeline-block:focus-visible {
  transform: translateY(-1px) scale(1.01);
  z-index: 2;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--block-accent, var(--primary)) 22%, transparent);
  outline: none;
}
.cal-timeline-block--compact {
  padding: 0.28rem 0.42rem;
  gap: 0.05rem;
}
.cal-timeline-block-time {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: 0.15px;
}
.cal-timeline-block-title {
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-timeline-block-sub {
  font-size: 0.7rem;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-timeline-block--status-en_transito {
  --block-accent: #0d9488;
}
.cal-timeline-block--status-viaje_asignado {
  --block-accent: #4a8fd4;
}
.cal-timeline-block--status-espera_standby {
  --block-accent: #ea580c;
}
.cal-timeline-block--status-entregado,
.cal-timeline-block--status-cerrado {
  --block-accent: #64748b;
}
.cal-timeline-block--interview {
  --block-accent: #7c3aed;
}
.cal-timeline-block--absence {
  --block-accent: #db2777;
}
.cal-timeline-block--clipped::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 18px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.92));
  pointer-events: none;
}
.cal-timeline-now {
  position: absolute;
  left: var(--cal-time-w);
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  pointer-events: none;
}
.cal-timeline-now-label {
  flex: 0 0 auto;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  background: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}
.cal-timeline-now-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #ef4444, rgba(239, 68, 68, 0.45));
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.15);
}
.cal-timeline-now-line::before {
  content: "";
  position: absolute;
  left: calc(var(--cal-time-w) + 0.2rem);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  transform: translate(-50%, -3px);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}
.cal-timeline-empty {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  padding: 3rem 1.5rem;
  text-align: center;
  border: 1px dashed rgba(var(--primary-rgb), 0.22);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.04), #fff);
}
.cal-timeline-empty-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-size: 1.35rem;
}
.cal-timeline-empty h3 {
  margin: 0;
  font-size: 1.05rem;
}
.cal-timeline-empty-hint {
  max-width: 34rem;
  font-size: 0.82rem;
}
.calendar-side-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.cal-legend-item--hint {
  font-size: 0.74rem;
}
@media (max-width: 900px) {
  .cal-timeline-grid {
    --cal-time-w: 58px;
    --cal-res-min: 140px;
  }
  .cal-timeline-resource-head {
    padding: 0.6rem 0.55rem;
    gap: 0.4rem;
    grid-template-columns: auto 1fr auto;
  }
  .cal-timeline-resource-kind {
    display: none;
  }
  .cal-timeline-scroll {
    max-height: min(68vh, 620px);
  }
}
@media (max-width: 560px) {
  .cal-timeline-meta {
    flex-direction: column;
    align-items: stretch;
  }
  .cal-resource-group-toggle {
    width: 100%;
    justify-content: center;
  }
}

.dot-trip { background: linear-gradient(135deg, #4a8fd4, var(--primary-dark)); }
.dot-interview { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.dot-absence { background: linear-gradient(135deg, #ec4899, #be185d); }
.cal-event.dot-trip { background: rgba(74, 143, 212, 0.1); border-left-color: #4a8fd4; }
.cal-event.dot-interview { background: rgba(139, 92, 246, 0.1); border-left-color: #7c3aed; }
.cal-event.dot-absence { background: rgba(236, 72, 153, 0.1); border-left-color: #db2777; }

.calendar-side-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--ops-cards-min, 21rem)), 1fr));
  gap: var(--ops-cards-gap, 0.65rem);
}
.cal-day-list, .cal-upcoming-list {
  display: grid;
  gap: 0.38rem;
}
.cal-day-event,
.cal-upcoming-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  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-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-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-data-grid > .hr-data-card,
.hiring-actions-grid > .p-card,
.hiring-actions-grid > .hr-action-card,
.hr-flow-block .hiring-actions-grid > * {
  display: flex;
  flex-direction: column;
}

.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, var(--primary-deeper), var(--brand-blue-deep)); }
.users-stat-violet { background: linear-gradient(135deg, var(--brand-blue-deep), var(--brand-blue-mid)); }
.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); }

.notif-pref-banner {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: rgba(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  font-size: 0.88rem;
}
.notif-pref-banner strong {
  display: block;
  margin-bottom: 0.2rem;
  font-weight: 700;
}

.notif-toolbar {
  margin-bottom: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

/**
 * Variante "peligro suave" para acciones destructivas no críticas
 * (p. ej. eliminar una notificación de la bandeja). Mantiene la altura
 * y forma del .btn-action pero con tinte rojo discreto, no chillón.
 */
.btn.btn-action.btn-danger-soft {
  border: 1px solid color-mix(in srgb, #fda4af 32%, transparent);
  color: #be123c;
  background: color-mix(in srgb, #fff1f2 55%, #fff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 3px rgba(225, 29, 72, 0.06);
  border-radius: 10px;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.18s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.btn.btn-action.btn-danger-soft:hover {
  color: #9f1239;
  background: color-mix(in srgb, #ffe4e6 62%, #fff);
  border-color: color-mix(in srgb, #fb7185 38%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 8px rgba(225, 29, 72, 0.1);
  transform: translateY(-1px);
}
.btn.btn-action.btn-danger-soft .btn-icon {
  color: currentColor;
}
body[data-theme="dark"] .btn.btn-action.btn-danger-soft {
  border-color: rgba(251, 113, 133, 0.22);
  color: #fda4af;
  background: color-mix(in srgb, #881337 24%, #1e293b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.22);
}
body[data-theme="dark"] .btn.btn-action.btn-danger-soft:hover {
  color: #fecdd3;
  background: color-mix(in srgb, #9f1239 32%, #1e293b);
  border-color: rgba(251, 113, 133, 0.32);
  transform: translateY(-1px);
}
.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, var(--primary), var(--primary-deeper)); }
.notif-tag-violet { background: linear-gradient(135deg, var(--brand-blue-deep), var(--primary-dark)); }
.notif-tag-slate { background: linear-gradient(135deg, #475569, #334155); }
.notif-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .notif-card { grid-template-columns: auto 1fr; }
  .notif-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

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"] .driver-card-summary,
body[data-theme="dark"] .driver-fact {
  background: linear-gradient(180deg, rgba(18, 32, 54, 0.98), rgba(11, 22, 38, 0.98));
  border-color: #2b3e58;
  color: #dbe7f5;
}
body[data-theme="dark"] .driver-card-title h4,
body[data-theme="dark"] .driver-card-summary strong,
body[data-theme="dark"] .driver-fact strong,
body[data-theme="dark"] .driver-card-inline-row > span:last-child {
  color: #f8fbff;
}
body[data-theme="dark"] .driver-card-summary p,
body[data-theme="dark"] .driver-fact > span,
body[data-theme="dark"] .driver-card-inline-row > span:first-child,
body[data-theme="dark"] .driver-card-kicker {
  color: #9db5cf;
}
body[data-theme="dark"] .driver-meta-chip {
  background: rgba(74, 143, 212, 0.14);
  border-color: rgba(121, 173, 228, 0.24);
  color: #dbeafe;
}
body[data-theme="dark"] .driver-meta-chip--warn {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.28);
  color: #fde68a;
}
body[data-theme="dark"] .driver-doc-pill--ok {
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.34);
}
body[data-theme="dark"] .driver-doc-pill--warning,
body[data-theme="dark"] .driver-doc-pill--missing {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.34);
}
body[data-theme="dark"] .driver-doc-pill--expired {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.34);
}
body[data-theme="dark"] .cal-cell-other { background: #0e1a2e; }
body[data-theme="dark"] .cal-cell-today {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.22), rgba(var(--primary-rgb), 0.06));
  box-shadow: inset 0 0 0 2px rgba(var(--primary-mid-rgb), 0.45);
}
body[data-theme="dark"] .cal-weekdays {
  background: linear-gradient(180deg, #122036, #0b1424);
  border-bottom-color: #2b3e58;
}
body[data-theme="dark"] .vehicle-plate {
  background: linear-gradient(180deg, #fff9c4 0%, #ffeb3b 45%, #fdd835 100%);
  color: #0a0a0a;
  border-color: #1a1a1a;
}

body[data-theme="dark"] .calendar-filters-bar {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.2), rgba(14, 32, 52, 0.94));
  border-color: rgba(var(--primary-mid-rgb), 0.28);
}

body[data-theme="dark"] .cal-cell-has-events {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.14), #122036);
}

body[data-theme="dark"] .cal-timeline-scroll,
body[data-theme="dark"] .cal-timeline-col,
body[data-theme="dark"] .cal-timeline-corner,
body[data-theme="dark"] .cal-timeline-resource-head,
body[data-theme="dark"] .cal-timeline-times {
  background: #122036;
  border-color: #2b3e58;
  color: #e2eaf6;
}
body[data-theme="dark"] .cal-timeline-resource-head {
  background: linear-gradient(180deg, #152438 0%, #122036 100%);
}
body[data-theme="dark"] .cal-timeline-times {
  background: linear-gradient(90deg, #0e1a2e 0%, #122036 100%);
}
body[data-theme="dark"] .cal-timeline-corner {
  background: linear-gradient(180deg, #152438, #0e1a2e);
}
body[data-theme="dark"] .cal-timeline-hour-band {
  background: #122036;
  border-bottom-color: rgba(255, 255, 255, 0.04);
}
body[data-theme="dark"] .cal-timeline-hour-band--alt {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.08), rgba(var(--primary-rgb), 0.03));
}
body[data-theme="dark"] .cal-timeline-block {
  color: #f1f5f9;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--block-accent, var(--primary)) 22%, #122036),
    color-mix(in srgb, var(--block-accent, var(--primary)) 10%, #0e1a2e)
  );
  border-color: color-mix(in srgb, var(--block-accent, var(--primary)) 35%, #2b3e58);
}
body[data-theme="dark"] .cal-timeline-block-time {
  color: #dbeafe;
}
body[data-theme="dark"] .cal-timeline-empty {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.1), #122036);
  border-color: rgba(var(--primary-mid-rgb), 0.28);
}
body[data-theme="dark"] .cal-timeline-avatar--fallback {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--res-accent, var(--primary)) 28%, #122036),
    color-mix(in srgb, var(--res-accent, var(--primary)) 12%, #0e1a2e)
  );
}
body[data-theme="dark"] .cal-timeline-avatar--photo {
  background: #1e293b;
}
body[data-theme="dark"] .cal-timeline-avatar--driver .cal-timeline-avatar-icon,
body[data-theme="dark"] .cal-timeline-avatar--vehicle .cal-timeline-avatar-icon {
  color: color-mix(in srgb, var(--res-accent, #93c5fd) 78%, #fff);
}

body[data-theme="dark"] .cal-resource-group-toggle {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.16), rgba(14, 28, 46, 0.96));
  border-color: rgba(var(--primary-mid-rgb), 0.28);
}
body[data-theme="dark"] .cal-timeline-meta-pill {
  color: #dbeafe;
  background: rgba(var(--primary-rgb), 0.16);
  border-color: rgba(var(--primary-mid-rgb), 0.28);
}

body[data-theme="dark"] .driver-card-head {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.16), rgba(14, 28, 46, 0.96));
  border-bottom-color: var(--line);
}

body[data-theme="dark"] .status-fleet-equipo-seco {
  color: #e8f4fc;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.32), rgba(30, 74, 115, 0.55));
  border-color: rgba(var(--primary-mid-rgb), 0.35);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .status-fleet-ocupado,
body[data-theme="dark"] .status-fleet-programado,
body[data-theme="dark"] .status-fleet-disponible {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

body[data-theme="dark"] .notif-card-unread {
  border-color: rgba(var(--primary-mid-rgb), 0.5);
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.14), #122036);
}

@media (max-width: 760px) {
  .driver-card-head {
    flex-direction: column;
  }
  .driver-card-status-stack {
    width: 100%;
    justify-items: start;
  }
  .driver-card-facts {
    grid-template-columns: 1fr;
  }
  .driver-card-inline-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .driver-card-inline-row > span:last-child {
    text-align: left;
  }
  .calendar-toolbar { flex-direction: column; align-items: stretch; }
  .calendar-controls { justify-content: flex-end; }
  .cal-cell { min-height: 84px; }
  .cal-days--view-week .cal-cell { min-height: 78px; }
  .cal-days--view-day .cal-cell { min-height: 200px; }
  .cal-event-title { display: none; }
}

@media (max-width: 560px) {
  .driver-card-actions > .btn {
    flex-basis: 100%;
  }
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 0.68rem;
  align-items: stretch;
}

.user-grid.directory-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 0.82rem;
}

.directory-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.58rem;
  min-width: 0;
  padding: 0.74rem;
  border-radius: 18px;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 255, 0.98)),
    radial-gradient(circle at top right, rgba(var(--brand-blue-soft-rgb), 0.16), transparent 42%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.065);
  overflow: hidden;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
  contain: layout paint;
}

.directory-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.9), rgba(var(--brand-blue-soft-rgb), 0.72));
}

.directory-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
  border-color: rgba(var(--primary-rgb), 0.2);
}

.directory-card--vehicle.directory-card--disponible::before,
.directory-card--driver.directory-card--available::before,
.directory-card--user.directory-card--ok::before {
  background: linear-gradient(90deg, #10b981, #34d399, #7dd3fc);
}

.directory-card--vehicle.directory-card--ocupado::before,
.directory-card--driver.directory-card--busy::before {
  background: linear-gradient(90deg, #f59e0b, #fb923c, #f97316);
}

.directory-card--vehicle.directory-card--reservado::before,
.directory-card--driver.directory-card--scheduled::before,
.directory-card--user.directory-card--pending::before {
  background: linear-gradient(90deg, #4f46e5, #6366f1, #8b5cf6);
}

.directory-card--vehicle.directory-card--no-disponible::before,
.directory-card--driver.directory-card--offline::before,
.directory-card--user.directory-card--inactive::before {
  background: linear-gradient(90deg, #dc2626, #f97316, #f59e0b);
}

.directory-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.62rem;
  min-width: 0;
}

.directory-card__identity {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  min-width: 0;
  flex: 1 1 auto;
}

.directory-card__avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.14), rgba(var(--brand-blue-soft-rgb), 0.48));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: #163a63;
  font-weight: 800;
  letter-spacing: 0.04em;
  overflow: hidden;
}

.directory-card__avatar--plate {
  width: 64px;
  padding: 0;
}

.directory-card__avatar--photo {
  padding: 0;
}

.directory-card__avatar--logo {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #1d4ed8;
}

.directory-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.directory-card__avatar--logo img {
  object-fit: contain;
  background: #fff;
  padding: 0.26rem;
}

.directory-card__heading {
  min-width: 0;
  flex: 1 1 auto;
}

.directory-card__kicker {
  margin: 0 0 0.2rem;
  font-size: 0.64rem;
  line-height: 1.25;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #52708e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directory-card__title {
  margin: 0;
  min-width: 0;
  font-size: 0.94rem;
  line-height: 1.2;
  color: #102847;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

.directory-card__subline {
  margin: 0.3rem 0 0;
  color: #5b7390;
  font-size: 0.78rem;
  line-height: 1.38;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.directory-card__title-note {
  display: inline-flex;
  align-items: center;
  margin-left: 0.36rem;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #0f4b8f;
  background: rgba(var(--primary-rgb), 0.12);
  vertical-align: middle;
}

.directory-card__status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.28rem;
  flex: 0 0 auto;
  min-width: 0;
}

.directory-card__status-stack > * {
  max-width: 100%;
}

.directory-card--user .directory-card__head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.48rem;
}

.directory-card--user .directory-card__identity {
  width: 100%;
}

.directory-card--user .directory-card__status-stack {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  align-self: stretch;
  width: 100%;
  max-width: none;
  gap: 0.35rem 0.45rem;
}

.directory-card--user .directory-card__status-stack .role-chip {
  text-transform: none;
  letter-spacing: 0.02em;
}

.directory-card--user .directory-card__title {
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  word-break: break-word;
}

.directory-card--user .directory-card__subline {
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  word-break: break-word;
}

.directory-card--user .directory-card__subline--email {
  word-break: break-all;
}

.directory-card--user .directory-card__ops-detail {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.directory-card--user .directory-chip strong {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  display: block;
}

.directory-card__ops {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.58rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.98));
}

.directory-card__ops-dot {
  width: 8px;
  height: 8px;
  margin-top: 0.34rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.directory-card__ops-body {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 auto;
}

.directory-card__ops-body strong {
  font-size: 0.8rem;
  line-height: 1.2;
  color: #163658;
}

.directory-card__ops-detail {
  display: block;
  font-size: 0.72rem;
  line-height: 1.32;
  color: #5b7390;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directory-card__ops--ok {
  border-color: rgba(16, 185, 129, 0.22);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(255, 255, 255, 0.96));
}

.directory-card__ops--ok .directory-card__ops-dot {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.directory-card__ops--warn {
  border-color: rgba(245, 158, 11, 0.26);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.96));
}

.directory-card__ops--warn .directory-card__ops-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}

.directory-card__ops--alert {
  border-color: rgba(239, 68, 68, 0.26);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(255, 255, 255, 0.96));
}

.directory-card__ops--alert .directory-card__ops-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.directory-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.6rem;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(148, 163, 184, 0.09);
  color: #32465f;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.directory-pill--ok {
  color: #166534;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.24);
}

.directory-pill--warn {
  color: #9a6700;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
}

.directory-pill--alert {
  color: #b42318;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
}

.directory-card__summary {
  display: grid;
  gap: 0.14rem;
  padding: 0.58rem 0.62rem;
  border-radius: 13px;
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.07), rgba(248, 251, 255, 0.98));
}

.directory-card__summary strong {
  color: #163658;
  font-size: 0.84rem;
  line-height: 1.24;
}

.directory-card__summary p {
  margin: 0;
  color: #5b7390;
  font-size: 0.76rem;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.directory-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
}

.directory-card--user .directory-card__metrics,
.directory-card--company .directory-card__metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-chip {
  display: grid;
  gap: 0.04rem;
  min-width: 0;
  padding: 0.38rem 0.5rem;
  border-radius: 11px;
  border: 1px solid rgba(var(--primary-rgb), 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.directory-chip small {
  font-size: 0.58rem;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #68819d;
}

.directory-chip strong {
  min-width: 0;
  font-size: 0.72rem;
  line-height: 1.2;
  color: #18324d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directory-chip--ok {
  border-color: rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.08);
}

.directory-chip--warn {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.1);
}

.directory-chip--alert {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.08);
}

.directory-card__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
  margin: 0;
}

.directory-card__fact {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  margin: 0;
  padding: 0.45rem 0.52rem;
  border-radius: 11px;
  border: 1px solid rgba(var(--primary-rgb), 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.directory-card__fact dt {
  font-size: 0.62rem;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #68819d;
}

.directory-card__fact dd {
  margin: 0;
  min-width: 0;
  font-size: 0.74rem;
  line-height: 1.32;
  font-weight: 700;
  color: #102847;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

.directory-card__fact--warn {
  border-color: rgba(245, 158, 11, 0.28);
}

.directory-card__fact--alert {
  border-color: rgba(239, 68, 68, 0.28);
}

.directory-card__banner {
  padding: 0.5rem 0.58rem;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(148, 163, 184, 0.08);
  color: #475569;
  font-size: 0.74rem;
  line-height: 1.4;
}

.directory-card__banner strong {
  color: inherit;
}

.directory-card__banner--warn {
  border-color: rgba(245, 158, 11, 0.26);
  background: rgba(245, 158, 11, 0.12);
  color: #8a4b00;
}

.directory-card__banner--alert {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.1);
  color: #9f1239;
}

.directory-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.directory-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  padding-top: 0.58rem;
  margin-top: auto;
  border-top: 1px solid rgba(var(--primary-rgb), 0.1);
}

.directory-card__actions > .btn {
  flex: 1 1 calc(50% - 0.24rem);
  min-width: 0;
  justify-content: center;
}

.directory-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 0.85rem;
}

.user-grid.directory-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 0.85rem;
}

.user-grid-companies {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.vehicle-ops-cards.directory-grid,
.drivers-grid.directory-grid,
.payroll-employees-grid.directory-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.directory-card--employee {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 252, 255, 0.98)),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 44%);
}

.directory-card--employee.directory-card--contract-notice_window::before,
.directory-card--employee.directory-card--contract-expired::before {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.directory-card--employee.directory-card--contract-active::before {
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.directory-card--employee.is-filtered-out {
  display: none;
}

.directory-card__select {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  margin-top: 0.25rem;
}

.payroll-employee-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.payroll-employee-search,
.payroll-employee-filter {
  flex: 1 1 12rem;
  min-width: 10rem;
}

.payroll-employee-toolbar-actions {
  margin-left: auto;
}

.emp-contract-end-preview input[readonly] {
  background: rgba(var(--primary-rgb), 0.06);
  cursor: default;
}

.directory-card {
  gap: 0.62rem;
  padding: 0.8rem 0.84rem 0.78rem;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.directory-card--user {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 255, 0.98)),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.16), transparent 42%);
}

.directory-card--company {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 248, 255, 0.98)),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.14), transparent 46%);
}

.directory-card--vehicle {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 252, 255, 0.98)),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.14), transparent 44%);
}

.directory-card--driver {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 255, 251, 0.98)),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.14), transparent 44%);
}

.directory-card__head {
  gap: 0.66rem;
}

.directory-card__identity {
  align-items: flex-start;
  gap: 0.66rem;
}

.directory-card__avatar {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.directory-card--company .directory-card__avatar,
.directory-card--user .directory-card__avatar {
  width: 48px;
  height: 48px;
}

.directory-card__avatar--plate {
  width: 64px;
  height: 44px;
  border-radius: 8px;
}

.directory-card__kicker {
  margin-bottom: 0.18rem;
  font-size: 0.63rem;
}

.directory-card__title {
  font-size: 0.95rem;
  line-height: 1.22;
}

.directory-card--vehicle .directory-card__title {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.directory-card__subline {
  margin-top: 0.26rem;
  font-size: 0.76rem;
  line-height: 1.36;
}

.directory-card__status-stack {
  gap: 0.28rem;
}

.directory-card__summary {
  padding: 0.56rem 0.62rem;
  border-radius: 12px;
}

.directory-card__summary strong {
  font-size: 0.82rem;
}

.directory-card__summary p {
  font-size: 0.74rem;
  line-height: 1.34;
}

.directory-card__metrics {
  gap: 0.36rem;
}

.directory-card--company .directory-card__metrics,
.directory-card--user .directory-card__metrics {
  gap: 0.38rem;
}

.directory-chip {
  padding: 0.36rem 0.48rem;
  border-radius: 10px;
}

.directory-chip strong {
  font-size: 0.71rem;
}

.directory-card__facts {
  gap: 0.36rem;
}

.directory-card__fact {
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
}

.directory-card__fact dd {
  font-size: 0.73rem;
}

.directory-card__tags {
  gap: 0.28rem;
}

.directory-card__actions {
  gap: 0.38rem;
  padding-top: 0.56rem;
}

.directory-card__actions > .btn {
  min-height: 2.12rem;
  border-radius: 10px;
  font-size: 0.76rem;
}

.directory-card__avatar--plate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  min-height: 40px;
  padding: 0.28rem 0.22rem;
  border-radius: 8px;
  border: 2px solid #1a1a1a;
  background: linear-gradient(180deg, #fff9c4 0%, #ffeb3b 38%, #fdd835 72%, #f9a825 100%);
  box-shadow:
    0 2px 0 rgba(15, 23, 42, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #0a0a0a;
  font-family: "Roboto", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: inherit;
  letter-spacing: 0;
  overflow: hidden;
}

.directory-card__plate-text {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 0.72rem;
  line-height: 1.05;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  color: #0a0a0a;
  letter-spacing: 0.04em;
}

.directory-card__avatar--plate-plate6 .directory-card__plate-text {
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.directory-card__avatar--plate-plate7 .directory-card__plate-text {
  font-size: 0.6rem;
  letter-spacing: 0.025em;
}

.directory-card__metrics--quad {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.directory-card__metrics--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-card--driver.directory-card--doc-expired {
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.07),
    inset 3px 0 0 #ef4444;
}

.directory-card--driver.directory-card--doc-warning {
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.07),
    inset 3px 0 0 #f59e0b;
}

.directory-card--driver.directory-card--doc-missing {
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.07),
    inset 3px 0 0 #6366f1;
}

.directory-card--user .directory-card__tags .perm-tag,
.directory-card--company .directory-card__tags .perm-tag {
  font-size: 0.66rem;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  background: rgba(var(--primary-rgb), 0.08);
  color: #1e4a73;
  font-weight: 700;
}

.directory-card--company .directory-card__avatar--logo {
  border-radius: 14px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: linear-gradient(145deg, #ffffff, #f5f3ff);
}

.directory-card--company .directory-card__kicker {
  color: #6d28d9;
}

.directory-card--user .directory-card__avatar:not(.directory-card__avatar--photo) {
  background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.2), rgba(59, 130, 246, 0.42));
}

.admin-users-list-shell .directory-grid {
  padding: 0.12rem 0.04rem 0.2rem;
}

.user-grid-companies.directory-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 0.9rem;
}

@media (max-width: 520px) {
  .directory-card__metrics--quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body[data-theme="dark"] .perm-check {
  border-color: rgba(121, 173, 228, 0.22);
  background: linear-gradient(180deg, rgba(15, 28, 46, 0.96), rgba(11, 22, 38, 0.94));
  box-shadow: 0 14px 28px rgba(2, 8, 18, 0.28);
}

body[data-theme="dark"] .perm-check:hover {
  background: linear-gradient(180deg, rgba(18, 32, 54, 0.98), rgba(12, 24, 40, 0.98));
  border-color: rgba(121, 173, 228, 0.3);
}

body[data-theme="dark"] .perm-check:has(input[type="checkbox"]:checked) {
  border-color: rgba(96, 165, 250, 0.44);
  background: linear-gradient(180deg, rgba(20, 44, 76, 0.98), rgba(11, 27, 47, 0.96));
  box-shadow: 0 18px 32px rgba(8, 26, 48, 0.34);
}

body[data-theme="dark"] .directory-card {
  background: linear-gradient(180deg, rgba(14, 28, 46, 0.97), rgba(10, 22, 38, 0.98));
  border-color: rgba(121, 173, 228, 0.18);
  box-shadow: 0 20px 36px rgba(2, 8, 18, 0.44);
}

body[data-theme="dark"] .directory-card--user {
  background:
    linear-gradient(180deg, rgba(14, 28, 46, 0.97), rgba(10, 22, 38, 0.98)),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.2), transparent 44%);
}

body[data-theme="dark"] .directory-card--company {
  background:
    linear-gradient(180deg, rgba(18, 26, 52, 0.97), rgba(11, 18, 38, 0.98)),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 46%);
}

body[data-theme="dark"] .directory-card--vehicle {
  background:
    linear-gradient(180deg, rgba(12, 29, 46, 0.97), rgba(9, 22, 36, 0.98)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.17), transparent 44%);
}

body[data-theme="dark"] .directory-card--driver {
  background:
    linear-gradient(180deg, rgba(11, 31, 37, 0.97), rgba(8, 24, 29, 0.98)),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.16), transparent 44%);
}

body[data-theme="dark"] .directory-card:hover {
  border-color: rgba(121, 173, 228, 0.3);
  box-shadow: 0 24px 42px rgba(2, 8, 18, 0.52);
}

body[data-theme="dark"] .directory-card__avatar {
  color: #eef6ff;
  border-color: rgba(121, 173, 228, 0.24);
  background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.24), rgba(30, 58, 92, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .directory-card__kicker,
body[data-theme="dark"] .directory-chip small,
body[data-theme="dark"] .directory-card__fact dt {
  color: #95acc8;
}

body[data-theme="dark"] .directory-card__title,
body[data-theme="dark"] .directory-chip strong,
body[data-theme="dark"] .directory-card__fact dd,
body[data-theme="dark"] .directory-card__summary strong {
  color: #f8fbff;
}

body[data-theme="dark"] .directory-card__subline {
  color: #9db5cf;
}

body[data-theme="dark"] .directory-card__ops {
  background: linear-gradient(135deg, rgba(17, 31, 51, 0.94), rgba(11, 22, 38, 0.98));
  border-color: rgba(121, 173, 228, 0.16);
}

body[data-theme="dark"] .directory-card__ops-body strong {
  color: #f8fbff;
}

body[data-theme="dark"] .directory-card__ops-detail {
  color: #9db5cf;
}

body[data-theme="dark"] .directory-card__ops--ok {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(11, 22, 38, 0.98));
  border-color: rgba(52, 211, 153, 0.28);
}

body[data-theme="dark"] .directory-card__ops--warn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(11, 22, 38, 0.98));
  border-color: rgba(251, 191, 36, 0.28);
}

body[data-theme="dark"] .directory-card__ops--alert {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(11, 22, 38, 0.98));
  border-color: rgba(248, 113, 113, 0.28);
}

body[data-theme="dark"] .directory-card__avatar--plate {
  border-color: #1a1a1a;
  background: linear-gradient(180deg, #fff9c4 0%, #ffeb3b 38%, #fdd835 72%, #f9a825 100%);
  color: #0a0a0a;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body[data-theme="dark"] .directory-card__banner--alert {
  color: #fecdd3;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(248, 113, 113, 0.28);
}

body[data-theme="dark"] .directory-card--company .directory-card__kicker {
  color: #c4b5fd;
}

body[data-theme="dark"] .module-panel-toolbar,
body[data-theme="dark"] .module-panel-actions {
  color: #e8f1ff;
}

body[data-theme="dark"] .module-panel-actions--footer .module-panel-btn,
body[data-theme="dark"] .module-panel-toolbar .module-panel-btn {
  --mpa-btn-bg: color-mix(in srgb, #1e293b 88%, transparent);
  --mpa-btn-edge: rgba(148, 163, 184, 0.16);
  --mpa-btn-icon-bg: rgba(var(--primary-rgb), 0.16);
  --mpa-btn-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .module-panel-btn--minimize,
body[data-theme="dark"] .module-panel-btn--expand {
  color: #cbd5e1;
}

body[data-theme="dark"] .module-panel-btn--minimize:hover,
body[data-theme="dark"] .module-panel-btn--expand:hover {
  color: #f8fafc;
  --mpa-btn-bg: color-mix(in srgb, #334155 92%, #1e293b);
  --mpa-btn-edge: rgba(148, 196, 255, 0.22);
  --mpa-btn-icon-bg: rgba(var(--primary-rgb), 0.22);
  --mpa-btn-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.28),
    0 8px 20px rgba(var(--primary-rgb), 0.12);
}

body[data-theme="dark"] .module-panel-btn--cancel.btn-danger-soft {
  color: #fda4af;
  --mpa-btn-bg: color-mix(in srgb, #881337 22%, #1e293b);
  --mpa-btn-edge: rgba(251, 113, 133, 0.22);
  --mpa-btn-icon-bg: rgba(244, 63, 94, 0.18);
}

body[data-theme="dark"] .module-panel-btn--cancel.btn-danger-soft:hover {
  color: #fecdd3;
  --mpa-btn-bg: color-mix(in srgb, #9f1239 28%, #1e293b);
  --mpa-btn-edge: rgba(251, 113, 133, 0.32);
  --mpa-btn-icon-bg: rgba(244, 63, 94, 0.26);
  --mpa-btn-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.28),
    0 8px 20px rgba(225, 29, 72, 0.16);
}

body[data-theme="dark"] .directory-card--user .directory-card__tags .perm-tag,
body[data-theme="dark"] .directory-card--company .directory-card__tags .perm-tag {
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(121, 173, 228, 0.24);
}

body[data-theme="dark"] .directory-card__title-note {
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.18);
}

body[data-theme="dark"] .directory-card__summary,
body[data-theme="dark"] .directory-chip,
body[data-theme="dark"] .directory-card__fact {
  background: linear-gradient(180deg, rgba(17, 31, 51, 0.94), rgba(11, 22, 38, 0.98));
  border-color: rgba(121, 173, 228, 0.16);
}

body[data-theme="dark"] .directory-card--company .directory-card__summary {
  background: linear-gradient(180deg, rgba(31, 25, 58, 0.95), rgba(15, 18, 39, 0.98));
}

body[data-theme="dark"] .directory-card--driver .directory-card__summary {
  background: linear-gradient(180deg, rgba(13, 41, 42, 0.94), rgba(8, 24, 29, 0.98));
}

body[data-theme="dark"] .directory-card--vehicle .directory-card__summary {
  background: linear-gradient(180deg, rgba(14, 36, 57, 0.94), rgba(9, 22, 36, 0.98));
}

body[data-theme="dark"] .directory-card__summary p {
  color: #9db5cf;
}

body[data-theme="dark"] .directory-pill {
  color: #d6e7fb;
  background: rgba(71, 85, 105, 0.24);
  border-color: rgba(121, 173, 228, 0.18);
}

body[data-theme="dark"] .directory-pill--ok {
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.32);
}

body[data-theme="dark"] .directory-pill--warn {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.32);
}

body[data-theme="dark"] .directory-pill--alert {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.32);
}

body[data-theme="dark"] .directory-chip--ok {
  background: rgba(16, 185, 129, 0.11);
  border-color: rgba(16, 185, 129, 0.28);
}

body[data-theme="dark"] .directory-chip--warn {
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(245, 158, 11, 0.3);
}

body[data-theme="dark"] .directory-chip--alert {
  background: rgba(239, 68, 68, 0.11);
  border-color: rgba(239, 68, 68, 0.28);
}

body[data-theme="dark"] .directory-card__banner {
  color: #cbd5e1;
  background: rgba(71, 85, 105, 0.18);
  border-color: rgba(121, 173, 228, 0.14);
}

body[data-theme="dark"] .directory-card__banner--warn {
  color: #fde68a;
  background: rgba(180, 83, 9, 0.22);
  border-color: rgba(245, 158, 11, 0.26);
}

body[data-theme="dark"] .directory-card__actions {
  border-top-color: rgba(121, 173, 228, 0.14);
}

@media (max-width: 760px) {
  .directory-card__head {
    flex-direction: column;
  }

  .directory-card__status-stack {
    width: 100%;
    align-items: flex-start;
  }

  .directory-card__facts {
    grid-template-columns: 1fr;
  }

  .directory-card--user .directory-card__metrics,
  .directory-card--company .directory-card__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .directory-grid,
  .perm-grid {
    grid-template-columns: 1fr;
  }

  .directory-card__actions > .btn {
    flex-basis: 100%;
  }

  .directory-card__metrics,
  .directory-card--user .directory-card__metrics,
  .directory-card--company .directory-card__metrics {
    grid-template-columns: 1fr;
  }
}

.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(var(--primary-rgb), 0.08), rgba(var(--brand-blue-soft-rgb), 0.45));
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 14px;
}

.p-form-colored {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.85rem !important;
}

.p-form-colored.transport-trip-create-form,
.p-form-colored.transport-route-form:not(.transport-route-form--revamp) {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  align-items: start;
}

.p-form-colored.transport-trip-create-form > .transport-trip-create-form__resources,
.p-form-colored.transport-trip-create-form > .transport-trip-create-form__pricing {
  grid-column: 1 / -1;
}

.p-form-colored.transport-route-form > .transport-route-form-fieldset--origin {
  grid-column: 1 / span 6;
}

.p-form-colored.transport-route-form > .transport-route-form-fieldset--destination {
  grid-column: 7 / -1;
}

.p-form-colored.transport-route-form > .transport-route-form-fieldset--price {
  grid-column: 1 / span 4;
}

.p-form-colored.transport-route-form > .transport-route-form-fieldset--scope.full {
  grid-column: 5 / -1;
}

@media (max-width: 1180px) {
  .p-form-colored.transport-trip-create-form,
  .p-form-colored.transport-route-form:not(.transport-route-form--revamp) {
    grid-template-columns: 1fr !important;
  }

  .p-form-colored.transport-trip-create-form > .transport-trip-create-form__resources,
  .p-form-colored.transport-trip-create-form > .transport-trip-create-form__pricing,
  .p-form-colored.transport-route-form > .transport-route-form-fieldset--origin,
  .p-form-colored.transport-route-form > .transport-route-form-fieldset--destination,
  .p-form-colored.transport-route-form > .transport-route-form-fieldset--price,
  .p-form-colored.transport-route-form > .transport-route-form-fieldset--scope.full {
    grid-column: 1 / -1;
  }
}

.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, var(--primary-deeper), var(--primary));
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 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;
  align-items: start;
}
.form-section-grid > label.full,
.form-section-grid > .full {
  grid-column: 1 / -1;
}
.form-section-grid label:not(.route-rate-company-item):not(.route-rate-company-item-text) {
  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-route-rate .route-rate-company-item,
.route-rate-scope-fieldset .route-rate-company-item {
  display: flex !important;
  flex-direction: row !important;
}

#form-route-rate .route-rate-company-item-text,
.route-rate-scope-fieldset .route-rate-company-item-text,
.p-form .route-rate-company-item-text {
  display: flex !important;
  flex-direction: column !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-weight: 500;
}

/* Casillas «tipo de vehículo que conduce» (creación/edición de empleado y conductor). */
.hr-conductor-vehicle-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}
.hr-conductor-vehicle-types .hr-conductor-vehicle-type-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.4rem;
  width: auto;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
}
.hr-conductor-vehicle-types .hr-conductor-vehicle-type-option input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}
/* `display: grid` arriba anula el `display:none` del atributo [hidden] en labels. */
.form-section-grid label[hidden],
.form-section-grid label.hidden,
.form-section-grid .emp-contract-duration-branch.hidden,
.form-section-grid .emp-contract-duration-branch[hidden],
.emp-contract-duration-panel.hidden,
.emp-contract-duration-panel[hidden],
.p-form label[hidden],
.p-form label.hidden,
.p-form-colored label[hidden],
.p-form-colored label.hidden,
.modal-edit-form label[hidden],
.modal-edit-form label.hidden,
#crud-form label[hidden],
#crud-form label.hidden {
  display: none !important;
}

.emp-contract-duration-panel {
  grid-column: 1 / -1;
  margin: 0.2rem 0 0.4rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px dashed rgba(var(--primary-rgb), 0.28);
  background: color-mix(in srgb, var(--primary) 5%, #fff);
}

.emp-contract-duration-title {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

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

.emp-contract-duration-hint {
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0 0 0.65rem;
}

.emp-contract-duration-fields {
  margin: 0;
}

.emp-contract-duration-branch {
  min-width: 0;
}

/* Los bloques «Fecha inicio contrato vigente» y «Fecha fin del contrato» son <div> de fila
   completa con tarjeta <label> + párrafo de ayuda. El min-height:100% genérico de
   `.hr-form-card .form-section-grid label` estira el label al alto del wrap y expulsa el
   párrafo fuera del contenedor: el texto quedaba dibujado DETRÁS de las tarjetas de los
   campos siguientes. Se anula y el wrap apila label + ayuda con su propio flujo. */
.hr-form-card .form-section-grid .emp-contract-vigente-start label:not(.route-rate-company-item):not(.route-rate-company-item-text),
.hr-form-card .form-section-grid .emp-contract-end-preview label:not(.route-rate-company-item):not(.route-rate-company-item-text),
.emp-contract-vigente-start label,
.emp-contract-end-preview label {
  min-height: 0;
}

.emp-contract-duration-branch.full {
  grid-column: 1 / -1;
}

body[data-theme="dark"] .emp-contract-duration-panel {
  background: color-mix(in srgb, var(--primary) 12%, var(--card, #1a2332));
  border-color: rgba(var(--primary-rgb), 0.35);
}
.form-section-grid label:not(.route-rate-company-item):not(.route-rate-company-item-text):focus-within {
  border-color: rgba(var(--primary-rgb), 0.45);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

#form-route-rate .route-rate-company-item:hover,
.route-rate-scope-fieldset .route-rate-company-item:hover {
  background: color-mix(in srgb, var(--primary) 8%, var(--white));
}

#form-route-rate .route-rate-company-item:focus-within,
.route-rate-scope-fieldset .route-rate-company-item:focus-within {
  box-shadow: none;
  outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent);
}

body[data-theme="dark"] .route-rate-company-name {
  color: #e8f2fc;
}

body[data-theme="dark"] .route-rate-company-item-text {
  color: var(--text-main, #e8f2fc);
}

#form-admin-user-edit .form-section-grid > label {
  min-height: 100%;
}

#form-admin-user-edit .form-section-grid input,
#form-admin-user-edit .form-section-grid select {
  min-height: 2.35rem;
}

#form-admin-user-edit .auth-password-row {
  align-items: stretch;
}

#form-admin-user-edit .auth-password-row .btn {
  min-height: 2.5rem;
  white-space: nowrap;
}

.form-section-blue {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.09), rgba(var(--primary-rgb), 0.04));
  border-color: rgba(var(--primary-rgb), 0.28);
}
.form-section-blue legend { background: linear-gradient(135deg, var(--primary-deeper), var(--primary)); }
.form-section-violet {
  background: linear-gradient(
    135deg,
    rgba(var(--brand-blue-soft-rgb), 0.55),
    rgba(var(--primary-rgb), 0.06)
  );
  border-color: rgba(var(--primary-rgb), 0.28);
}
.form-section-violet legend { background: linear-gradient(135deg, var(--brand-blue-deep), var(--primary-dark)); }
.form-section-cyan {
  background: linear-gradient(
    135deg,
    rgba(var(--primary-mid-rgb), 0.14),
    rgba(var(--brand-blue-soft-rgb), 0.35)
  );
  border-color: rgba(var(--primary-mid-rgb), 0.32);
}
.form-section-cyan legend { background: linear-gradient(135deg, var(--brand-blue-deep), var(--brand-blue-mid)); }
.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 {
  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(var(--primary-rgb), 0.18),
    rgba(var(--primary-mid-rgb), 0.16)
  );
  color: var(--primary);
}

body[data-theme="dark"] .form-section {
  background: linear-gradient(180deg, #122036, #0e1a2c);
  border-color: #2b3e58;
}
body[data-theme="dark"] .form-section-grid label:not(.route-rate-company-item):not(.route-rate-company-item-text) {
  background: #0f1c30;
  border-color: #2b3e58;
  color: #e2eaf6;
}
body[data-theme="dark"] .form-section-blue { background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.22), rgba(var(--primary-rgb), 0.09)); }
body[data-theme="dark"] .form-section-violet { background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.22), rgba(var(--primary-rgb), 0.08)); }
body[data-theme="dark"] .form-section-cyan { background: linear-gradient(135deg, rgba(var(--primary-mid-rgb), 0.18), rgba(var(--primary-rgb), 0.08)); }
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;
}
body[data-theme="dark"] .field-label .field-required-mark {
  color: #f87171;
}

/* Crear empleado (#form-employee): estilos en styles/payroll-module.css (.payroll-studio) */

.btn-primary {
  background: var(--primary) !important;
  background-image: none !important;
  border: none !important;
  color: #fff !important;
  box-shadow:
    0 1px 2px rgba(var(--primary-rgb), 0.14),
    0 8px 22px rgba(var(--primary-rgb), 0.28);
  transition: background 0.18s ease, transform 0.16s ease, box-shadow 0.18s ease;
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--primary) 90%, #fff) !important;
  transform: translateY(-1px);
  filter: none;
  box-shadow:
    0 2px 4px rgba(var(--primary-rgb), 0.16),
    0 12px 28px rgba(var(--primary-rgb), 0.34);
}

.btn-primary.hr-workspace-jump-btn {
  box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.38);
}

.btn-primary.hr-workspace-jump-btn:hover {
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.48);
}

body[data-theme="dark"] .btn-primary.hr-workspace-jump-btn {
  box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.38);
}

body[data-theme="dark"] .btn-primary.hr-workspace-jump-btn:hover {
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.48);
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary.hr-workspace-jump-btn:hover {
    transform: none;
  }
}

.kpi {
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.07), rgba(var(--primary-mid-rgb), 0.08));
  pointer-events: none;
}

.create-card-toggle {
  background: linear-gradient(135deg, var(--primary-deeper), var(--primary)) !important;
  color: #fff !important;
}
.create-card-toggle:hover {
  background: linear-gradient(135deg, var(--primary), var(--brand-blue-mid)) !important;
}

/* Colaborador: perfil / edición y vacantes (acciones) */
.modal-card-edit.modal-card-edit--employee {
  width: min(980px, calc(100vw - 1.25rem));
  border-radius: 20px;
  overflow: hidden;
  --modal-card-pad-top: 1.4rem;
  --modal-card-pad-x: 1.4rem;
  --modal-card-pad-bottom: 1.4rem;
}

.modal-card-edit.modal-card-edit--wide-info {
  width: min(760px, 96vw);
}

.modal-card-edit.modal-card-edit--wide-info.modal-card--portal-detail {
  width: min(900px, 96vw);
}

.portal-detail-modal {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.portal-detail-hero {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb), 0.1),
    rgba(255, 255, 255, 0.88)
  );
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.portal-detail-logo {
  width: 108px;
  height: 108px;
  flex-shrink: 0;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.35rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
}

.portal-detail-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portal-detail-logo--fallback {
  background: linear-gradient(145deg, #377cc0, #1e4d8c);
  color: #fff;
  padding: 0;
}

.portal-detail-logo--fallback span {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
}

.portal-detail-logo--avatar {
  border-radius: 50%;
  padding: 0;
}

.portal-detail-logo--avatar img {
  object-fit: cover;
  border-radius: 50%;
}

.portal-detail-logo--avatar.portal-detail-logo--fallback span {
  font-size: 1.85rem;
}

.portal-detail-loc .detail-perms-list {
  margin: 0.15rem 0 0;
}

.portal-detail-hero-main {
  flex: 1;
  min-width: 0;
}

.portal-detail-eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
  color: var(--text-soft);
}

.portal-detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.portal-detail-meta {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
}

.portal-detail-meta strong {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.portal-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.portal-detail-stats li {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.portal-detail-stats strong {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
}

.portal-detail-stats li > span:last-child {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.portal-detail-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem;
}

.portal-detail-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.78rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

a.portal-detail-tile:hover {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  background: #fff;
}

.portal-detail-tile--muted {
  opacity: 0.92;
}

.portal-detail-tile-icon {
  flex-shrink: 0;
  margin-top: 0.08rem;
  color: var(--primary);
}

.portal-detail-tile-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.portal-detail-tile-text {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.portal-detail-tile-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  font-weight: 800;
}

.portal-detail-tile-value {
  font-size: 0.9rem;
  font-weight: 600;
  word-break: break-word;
  line-height: 1.35;
}

.portal-detail-loc {
  margin: 0;
  padding: 0.88rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(248, 252, 255, 0.55);
}

.portal-detail-loc-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--text);
}

.portal-detail-loc-title svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--primary);
}

.portal-detail-loc-line {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
}

.portal-detail-loc-sub {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.portal-detail-loc-sub svg {
  flex-shrink: 0;
  opacity: 0.85;
}

body[data-theme="dark"] .portal-detail-hero {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.14), rgba(15, 23, 42, 0.55));
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: none;
}

body[data-theme="dark"] .portal-detail-logo {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.28);
}

body[data-theme="dark"] .portal-detail-tile {
  background: rgba(15, 23, 42, 0.38);
  border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] a.portal-detail-tile:hover {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(96, 165, 250, 0.35);
}

body[data-theme="dark"] .portal-detail-loc {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .portal-detail-loc-title {
  color: #e2e8f0;
}

body[data-theme="dark"] .portal-detail-loc-line {
  color: #f1f5f9;
}

.modal-info-body--portal-detail {
  padding: 0.15rem 0 0.35rem;
}

.modal-info-body--portal-detail .portal-detail-modal {
  gap: 1.15rem;
}

.portal-detail-hero--trip,
.portal-detail-hero--request {
  align-items: flex-start;
}

.portal-detail-route-line {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}

.portal-detail-route-line svg {
  flex-shrink: 0;
  margin-right: 0.2rem;
  color: var(--primary);
}

.portal-detail-highlight__actions {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px dashed color-mix(in srgb, var(--primary) 18%, var(--line));
}

.portal-detail-highlight--notes .detail-note {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.portal-detail-hero--vehicle {
  align-items: center;
}

.portal-detail-hero-plate {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-detail-hero-plate .directory-card__avatar--plate {
  transform: scale(1.06);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.portal-detail-highlight {
  margin: 0;
  padding: 0.88rem 1rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb), 0.07),
    rgba(255, 255, 255, 0.72)
  );
}

.portal-detail-highlight__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--text);
}

.portal-detail-highlight__title svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--primary);
}

.portal-detail-highlight__body {
  font-size: 0.95rem;
  line-height: 1.45;
}

.portal-detail-highlight__body .portal-detail-loc-line {
  margin: 0;
}

.portal-detail-highlight__body .portal-detail-loc-sub {
  margin-top: 0.35rem;
}

.detail-grid--sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 720px) {
  .detail-grid--sections {
    grid-template-columns: 1fr;
  }
}

.detail-section--card {
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
}

.detail-section--card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 12px 0 0 12px;
  background: color-mix(
    in srgb,
    var(--primary) calc(42% + var(--detail-section-i, 0) * 6%),
    #94a3b8
  );
  opacity: 0.85;
}

.detail-section--card .detail-section-title {
  padding-left: 0.15rem;
}

.detail-section--card .detail-row {
  padding: 0.28rem 0.32rem;
  border-radius: 8px;
  border-bottom: none;
  background: rgba(255, 255, 255, 0.45);
}

.detail-section--card .detail-row:nth-child(even) {
  background: rgba(var(--primary-rgb), 0.04);
}

body[data-theme="dark"] .portal-detail-highlight {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(15, 23, 42, 0.5));
  border-color: rgba(148, 163, 184, 0.24);
}

body[data-theme="dark"] .portal-detail-highlight__title {
  color: #e2e8f0;
}

body[data-theme="dark"] .detail-section--card .detail-row {
  background: rgba(15, 23, 42, 0.35);
}

body[data-theme="dark"] .detail-section--card .detail-row:nth-child(even) {
  background: rgba(var(--primary-rgb), 0.08);
}

.modal-card-edit.modal-card-edit--trip-assign-friendly {
  width: min(720px, 96vw);
}

.modal-card-edit.modal-card-edit--approve-trip {
  width: min(700px, 96vw);
}

.modal-card-edit.modal-card-edit--assign-revamp {
  width: min(760px, 96vw);
  border-radius: 20px;
}

.modal-form-section {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.modal-form-section:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}

.modal-form-section-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark, #0d3f78);
  letter-spacing: -0.02em;
}

.modal-form-section-hint {
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted, #5a7a96);
}

.modal-field-label--html {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
  color: var(--text-main, var(--text));
}

.modal-field-label--html .btn-icon {
  flex-shrink: 0;
  color: var(--primary);
}

.modal-card-edit--approve-trip .modal-edit-form select {
  min-height: 2.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: calc(var(--radius) - 2px);
}

.modal-card-edit--approve-trip .modal-edit-actions .btn-primary {
  box-shadow: 0 4px 14px rgba(var(--primary-rgb, 27, 142, 95), 0.35);
}

.approve-trip-hero {
  margin: 0 0 1rem;
  padding: 1.15rem 1.2rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 9%, var(--white)) 0%, var(--white) 55%, color-mix(in srgb, #0ea5e9 6%, var(--white)) 100%);
  box-shadow: 0 8px 28px rgba(7, 30, 61, 0.08);
}

.approve-trip-hero.assign-revamp-hero {
  padding: 1rem 1.05rem 0.95rem;
  border-radius: 16px;
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
}

body[data-theme="dark"] .approve-trip-hero {
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 18%, transparent) 0%, color-mix(in srgb, var(--white) 4%, transparent) 100%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.approve-trip-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.75rem;
}

.approve-trip-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--primary) 14%, var(--white));
  color: var(--primary-dark, #0d3f78);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
}

.approve-trip-source-badge--portal {
  background: color-mix(in srgb, var(--primary) 10%, var(--white));
}

.approve-trip-source-badge .btn-icon {
  width: 1rem;
  height: 1rem;
}

.approve-trip-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.26rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.approve-trip-pill--tk {
  background: color-mix(in srgb, #0ea5e9 16%, var(--white));
  color: #0369a1;
  border: 1px solid color-mix(in srgb, #0ea5e9 40%, var(--line));
}

.approve-trip-pill--dry {
  background: color-mix(in srgb, var(--muted) 12%, var(--white));
  color: var(--text-main);
  border: 1px solid var(--line);
}

body[data-theme="dark"] .approve-trip-pill--tk {
  color: #7dd3fc;
}

.approve-trip-hero-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-card-edit--assign-revamp .modal-form-section {
  margin-top: 0.8rem;
  padding: 0.7rem 0.75rem 0;
  border-top: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
}

.modal-card-edit--assign-revamp .modal-form-section-title {
  font-size: 0.93rem;
  color: var(--text-main);
}

.modal-card-edit--assign-revamp .modal-form-section-hint {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.modal-card-edit--assign-revamp .modal-edit-form label {
  padding: 0.62rem 0.68rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
  background: color-mix(in srgb, var(--primary) 3%, var(--white));
}

.modal-card-edit--assign-revamp .modal-edit-form label input,
.modal-card-edit--assign-revamp .modal-edit-form label select {
  min-height: 2.52rem;
  border-radius: 10px;
}

.approve-trip-hero-ref {
  margin: 0 0 0.65rem;
}

.approve-trip-ref-pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--primary-dark, #0d3f78);
  background: color-mix(in srgb, var(--primary) 12%, var(--white));
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--line);
}

.approve-trip-hero-route {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.4;
  margin-bottom: 0.9rem;
  color: var(--text-main);
}

.approve-trip-hero-route .btn-icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--primary);
}

.approve-trip-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.65rem 1rem;
  margin-bottom: 0.65rem;
}

.approve-trip-hero-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.approve-trip-meta-k {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.approve-trip-meta-v {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
}

.approve-trip-hero-cargo {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-main);
  padding-top: 0.65rem;
  border-top: 1px dashed color-mix(in srgb, var(--line) 85%, transparent);
}

.approve-trip-hero-cargo strong {
  color: var(--primary-dark, #0d3f78);
}

/* Scroll en modal CRUD (detalle solicitud, formularios largos) */
#crud-modal .modal-card.modal-card-edit {
  --modal-card-pad-top: 1.4rem;
  --modal-card-pad-x: 1.4rem;
  --modal-card-pad-bottom: 0;
  max-height: min(92vh, 960px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: var(--modal-card-pad-top) var(--modal-card-pad-x) var(--modal-card-pad-bottom);
  box-sizing: border-box;
}

#crud-modal .modal-card.modal-card-edit.modal-card--detail-view,
#crud-modal .modal-card.modal-card-edit.modal-card-edit--wide-info.modal-card--detail-view {
  --modal-card-pad-top: 1.15rem;
  --modal-card-pad-x: 1.25rem;
  --modal-card-pad-bottom: 0;
  width: min(920px, calc(100vw - 1.25rem));
  border-radius: 22px;
}

#crud-modal .modal-card.modal-card-edit.modal-card-edit--wide-info.modal-card--portal-detail {
  --modal-card-pad-top: 1.15rem;
  --modal-card-pad-x: 1.25rem;
  --modal-card-pad-bottom: 0;
}

#crud-modal .modal-card.modal-card-edit > #crud-modal-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

#crud-modal .modal-card.modal-card-edit > #crud-modal-content:not(:has(.modal-info-layout)) {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal-info-layout {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.modal-info-layout > .modal-head {
  flex-shrink: 0;
  margin-bottom: 0.75rem;
}

.modal-info-layout__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 0.25rem;
  scrollbar-gutter: stable;
}

.modal-info-layout > .module-panel-actions--footer.modal-edit-actions {
  flex-shrink: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-inline: calc(-1 * var(--modal-card-pad-x, 1.4rem));
  width: calc(100% + (2 * var(--modal-card-pad-x, 1.4rem)));
  max-width: none;
  position: relative;
  z-index: 4;
  overflow: visible;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
}

/* ──────────────────────────────────────────────────────────────────────────
   Formularios de edición (openEditModal): cabecera y pie SIEMPRE visibles.
   #crud-modal-content es el área con scroll (overflow-y:auto / overflow-x:hidden),
   así que NO usamos sangrado con márgenes negativos (se recortarían); fijamos la
   cabecera arriba y la barra de acciones abajo, con fondo opaco, para que los
   botones «Cancelar / Guardar cambios» nunca queden cortados ni pegados al borde.
   ────────────────────────────────────────────────────────────────────────── */
#crud-modal .modal-card.modal-card-edit > #crud-modal-content > .modal-head {
  position: sticky;
  top: 0;
  z-index: 6;
  flex-shrink: 0;
  margin-bottom: 0.85rem;
  padding-bottom: 0.8rem;
  background: var(--white);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

body[data-theme="dark"] #crud-modal .modal-card.modal-card-edit > #crud-modal-content > .modal-head {
  background: var(--white);
  border-bottom-color: color-mix(in srgb, var(--line) 58%, transparent);
}

#crud-modal
  .modal-card.modal-card-edit
  > #crud-modal-content
  > #crud-form.modal-edit-form
  > .module-panel-actions--footer.modal-edit-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex-shrink: 0;
  margin-top: 0.6rem !important;
  margin-bottom: 0 !important;
  max-width: none;
  overflow: visible;
  box-sizing: border-box;
}

/* Barra de acciones fija: borde superior nítido, fondo opaco (para que los campos
   pasen por debajo sin transparentarse) y respeto del área segura inferior. */
#crud-modal
  .modal-card.modal-card-edit
  > #crud-modal-content
  > #crud-form.modal-edit-form
  > .module-panel-actions--footer.modal-edit-actions
  .module-panel-actions__bar {
  margin-top: 0;
  /* La barra es full-bleed (margin-inline negativo), así que el padding horizontal
     debe igualar el del card para que los botones queden alineados con los campos
     y nunca toquen el borde con overflow:hidden (evita el recorte de «Guardar»). */
  padding: 0.95rem var(--modal-card-pad-x, 1.4rem)
    max(0.95rem, calc(0.6rem + env(safe-area-inset-bottom, 0px)));
  border-radius: 0;
  border-top: 1px solid color-mix(in srgb, var(--primary, #377cc0) 18%, #e2e8f0);
  box-shadow: 0 -10px 18px -14px rgba(15, 23, 42, 0.28);
}

body[data-theme="dark"]
  #crud-modal
  .modal-card.modal-card-edit
  > #crud-modal-content
  > #crud-form.modal-edit-form
  > .module-panel-actions--footer.modal-edit-actions
  .module-panel-actions__bar {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--primary, #377cc0) 12%, #122036) 0%,
    #0f1c2e 100%
  );
  border-top-color: color-mix(in srgb, var(--primary, #377cc0) 30%, rgba(255, 255, 255, 0.08));
  box-shadow: 0 -10px 20px -14px rgba(0, 0, 0, 0.6);
}

/* Holgura inferior del formulario para que el último campo no quede tapado
   por el pie fijo al final del scroll. */
#crud-modal .modal-card.modal-card-edit > #crud-modal-content > #crud-form.modal-edit-form {
  padding-bottom: 0.35rem;
}

.trip-assign-friendly-intro {
  margin: 0.5rem 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary) 6%, var(--white));
}

body[data-theme="dark"] .trip-assign-friendly-intro {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

.trip-assign-friendly-route {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text-main, var(--text));
  margin-bottom: 0.85rem;
  line-height: 1.35;
}

.trip-assign-friendly-route .btn-icon {
  flex-shrink: 0;
  margin-top: 0.12rem;
  color: var(--primary);
}

.trip-assign-friendly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem 1rem;
}

.trip-assign-friendly-cell {
  display: grid;
  gap: 0.2rem;
  font-size: 0.88rem;
}

.trip-assign-friendly-cell .btn-icon {
  opacity: 0.85;
}

.trip-assign-lbl {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted, #5a7a96);
}

.trip-assign-tk-banner {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.86rem;
  line-height: 1.45;
  background: color-mix(in srgb, #0ea5e9 12%, var(--white));
  border: 1px solid color-mix(in srgb, #0ea5e9 35%, var(--line));
}

.trip-assign-tk-banner--dry {
  background: color-mix(in srgb, var(--primary) 8%, var(--white));
  border-color: var(--line);
}

body[data-theme="dark"] .trip-assign-tk-banner {
  background: color-mix(in srgb, #0ea5e9 18%, transparent);
}

body[data-theme="dark"] .trip-assign-tk-banner--dry {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}

.modal-info-body--profile {
  margin-top: 0.55rem;
}

.solicitud-detail-heading {
  margin: 0 0 0.65rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--primary-dark, #0d3f78);
}

.solicitud-detail-section .dash-grid {
  gap: 0.7rem 1.1rem;
}

.solicitud-detail-client-row {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.solicitud-detail-notes {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}

.solicitud-detail-section--mod-log {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.request-mod-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.request-mod-log-item {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary) 5%, var(--white));
}

.request-mod-log-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.request-mod-log-just {
  margin: 0.35rem 0 0;
  white-space: pre-wrap;
  font-size: 0.92rem;
}

.solicitud-trip-summary {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary) 8%, var(--white));
}

.solicitud-trip-summary-actions {
  margin-top: 0.2rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--line);
}

body[data-theme="dark"] .solicitud-trip-summary {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}

.employee-profile-card {
  display: grid;
  gap: 1rem;
}

.employee-profile-hero-photo {
  width: 100%;
  min-height: 140px;
  max-height: 220px;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center center;
  border: 1px solid var(--line);
}

.employee-profile-hero-photo--letter {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-mid), var(--primary-dark));
  color: var(--white);
  font-size: clamp(2rem, 8vw, 2.85rem);
  font-weight: 800;
}

.employee-profile-hero-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: -54px;
  padding: 0 0.5rem;
}

.employee-profile-hero-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid var(--bg, #fff);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
  background: var(--card, #fff);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.employee-profile-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.employee-profile-hero-avatar--letter {
  background: linear-gradient(135deg, var(--primary-mid), var(--primary-dark));
  color: var(--white);
  font-size: 2.4rem;
  font-weight: 800;
}

.employee-profile-hero-photo-caption {
  margin: 0;
  font-size: 0.78rem;
  text-align: center;
}

body[data-theme="dark"] .employee-profile-hero-avatar {
  border-color: var(--card, #1f2937);
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.6);
}

.employee-profile-intro {
  text-align: center;
}

.employee-profile-name {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.3;
}

.employee-profile-intro-meta {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.employee-profile-chip {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.12);
  font-size: 0.82rem;
  font-weight: 700;
}

.employee-profile-section {
  padding-top: 0.35rem;
  border-top: 1px dashed var(--line);
}

.employee-profile-section-title {
  margin: 0 0 0.45rem;
  font-size: 0.93rem;
  font-weight: 800;
}

.employee-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 0.55rem;
}

.employee-profile-kv {
  padding: 0.45rem 0.62rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

body[data-theme="dark"] .employee-profile-kv {
  background: rgba(0, 0, 0, 0.22);
}

.employee-profile-kv span {
  display: block;
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.employee-profile-kv strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.91rem;
  font-weight: 600;
}

.employee-profile-section--payroll-history {
  margin-top: 0.35rem;
}

.employee-payroll-history__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.55rem;
}

.employee-payroll-history__stats {
  font-size: 0.82rem;
}

.employee-payroll-history__table-wrap {
  margin-bottom: 0.55rem;
}

.employee-payroll-history__table {
  width: 100%;
  font-size: 0.88rem;
}

.employee-payroll-history__table th,
.employee-payroll-history__table td {
  vertical-align: top;
  padding: 0.55rem 0.45rem;
}

.employee-payroll-history__type {
  display: block;
  font-size: 0.78rem;
  margin-top: 0.12rem;
}

.employee-payroll-history__money {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.employee-payroll-history__paid-date {
  display: block;
  font-size: 0.76rem;
  margin-top: 0.15rem;
}

.employee-payroll-history__actions {
  text-align: right;
  white-space: nowrap;
}

.employee-payroll-history__footer {
  margin-top: 0.35rem;
}

.employee-payroll-history__empty,
.employee-payroll-history__more-note {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.payroll-employee-filter-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(55, 124, 192, 0.08), rgba(13, 148, 136, 0.06));
}

.payroll-employee-filter-banner__copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}

.payroll-employee-filter-banner__label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.employee-edit-grid {
  gap: 0.78rem 1rem !important;
}

.modal-card-edit--employee .modal-edit-form {
  gap: 0.95rem 1rem;
}

.modal-card-edit--employee .modal-edit-custom-slot {
  padding: 0.88rem 0.95rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.modal-card-edit--employee .modal-edit-section-title {
  margin: 0 0 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body[data-theme="dark"] .modal-card-edit.modal-card-edit--employee {
  background: linear-gradient(180deg, rgba(11, 21, 35, 0.98), rgba(8, 17, 29, 0.98));
}

body[data-theme="dark"] .modal-card-edit--employee .modal-edit-custom-slot {
  border-color: rgba(148, 196, 255, 0.12);
  background: linear-gradient(180deg, rgba(17, 30, 49, 0.94), rgba(12, 24, 40, 0.92));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

body[data-theme="dark"] .modal-card-edit--employee .modal-edit-section-title {
  border-bottom-color: rgba(148, 196, 255, 0.1);
}

.employee-table-actions,
.vacancy-row-actions {
  flex-wrap: wrap;
  gap: 0.35rem !important;
  justify-content: flex-end;
}

.vacancy-detail-sheet {
  display: grid;
  gap: 0.85rem;
}

.vacancy-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.vacancy-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.14);
  border: 1px solid rgba(var(--primary-rgb), 0.28);
}

.modal-edit-custom-slot .modal-edit-section-title {
  display: block;
  margin: 0.85rem 0 0.4rem;
  font-size: 0.93rem;
  font-weight: 800;
}

.modal-edit-custom-slot:first-child .modal-edit-section-title {
  margin-top: 0;
}

.vacancy-detail-reqs strong {
  display: block;
  margin-bottom: 0.2rem;
}

.detail-grid {
  display: grid;
  gap: 0.95rem;
}

.detail-section {
  border: 1px solid var(--line);
  background: rgba(248, 252, 255, 0.55);
  border-radius: 12px;
  padding: 0.75rem 0.95rem 0.85rem;
}

.detail-section-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.detail-section-title svg.btn-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--primary);
}

.detail-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.45rem 1rem;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.18rem 0;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.06);
}

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

.detail-row-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  font-weight: 700;
}

.detail-row-value {
  font-size: 0.92rem;
  color: var(--text);
  word-break: break-word;
}

.detail-row-value strong {
  font-weight: 800;
}

.detail-row-value .status {
  margin-left: 0.35rem;
}

.detail-perms-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.detail-note {
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font-size: 0.86rem;
  color: var(--text);
}

.detail-pre {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0.5rem 0 0;
  max-height: 16rem;
  overflow: auto;
}

body[data-theme="dark"] .detail-section {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .detail-section-title {
  color: #e2e8f0;
}

body[data-theme="dark"] .detail-row {
  border-bottom-color: rgba(148, 163, 184, 0.15);
}

body[data-theme="dark"] .detail-row-label {
  color: rgba(226, 232, 240, 0.7);
}

body[data-theme="dark"] .detail-row-value {
  color: #f1f5f9;
}

body[data-theme="dark"] .detail-note {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

body[data-theme="dark"] .detail-pre {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

/* Transporte — tabla ejecutiva uniforme (solicitudes/vehículos) */
.portal-main .transport-exec-table-wrap {
  overflow-x: auto;
  margin: 0;
  padding: 0;
}

.portal-main .transport-exec-table-wrap table {
  width: 100%;
  min-width: 66rem;
  border-collapse: separate;
  border-spacing: 0 0.36rem;
  font-size: 0.91rem;
}

.portal-main .transport-exec-table-wrap table thead th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #3f5f82;
  padding: 0.42rem 0.6rem;
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
}

.portal-main .transport-exec-table-wrap table tbody td {
  padding: 0.68rem 0.62rem;
  border-top: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
}

.portal-main .transport-exec-table-wrap table tbody tr {
  background: color-mix(in srgb, #ffffff 93%, var(--brand-blue-soft) 7%);
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.08);
}

.portal-main .transport-exec-table-wrap table tbody td:first-child {
  border-left: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.portal-main .transport-exec-table-wrap table tbody td:last-child {
  border-right: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.portal-main .requests-table-wrap table {
  min-width: 58rem;
}

.portal-main .requests-table-wrap table thead th:nth-child(5),
.portal-main .requests-table-wrap table tbody td:nth-child(5) {
  min-width: 12rem;
}

.portal-main .vehicles-table-wrap table thead th:nth-child(9),
.portal-main .vehicles-table-wrap table tbody td:nth-child(9) {
  min-width: 13rem;
}

.portal-main .vehicles-table-wrap table thead th:nth-child(8),
.portal-main .vehicles-table-wrap table tbody td:nth-child(8) {
  min-width: 12rem;
}

.portal-main .history-table-wrap table {
  min-width: 72rem;
}

.portal-main .history-table-wrap table thead th:nth-child(4),
.portal-main .history-table-wrap table tbody td:nth-child(4) {
  min-width: 10rem;
}

.portal-main .history-table-wrap table thead th:nth-child(7),
.portal-main .history-table-wrap table tbody td:nth-child(7) {
  min-width: 11rem;
}

.portal-main .history-table-wrap .history-col-client {
  min-width: 8rem;
  max-width: 12rem;
}

.portal-main .history-table-wrap .history-col-status {
  white-space: nowrap;
}

.portal-main .history-report-table-wrap {
  margin-top: 0.7rem;
}

.portal-main .history-report-table-wrap table {
  min-width: 52rem;
}

/* Conductores (cards) con misma línea ejecutiva */
.portal-main .drivers-grid .driver-card {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line));
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.1);
}

.portal-main .drivers-grid .driver-card-head {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.11), rgba(var(--brand-blue-soft-rgb), 0.42));
}

body[data-theme="dark"] .portal-main .transport-exec-table-wrap table thead th {
  color: #9fc3e6;
  border-bottom-color: color-mix(in srgb, var(--primary) 32%, #2a3f56);
}

body[data-theme="dark"] .portal-main .transport-exec-table-wrap table tbody tr {
  background: color-mix(in srgb, #0f172a 88%, var(--primary) 12%);
  box-shadow: 0 4px 16px rgba(2, 8, 20, 0.45);
}

body[data-theme="dark"] .portal-main .transport-exec-table-wrap table tbody td {
  border-top-color: color-mix(in srgb, var(--primary) 30%, #2a3f56);
  border-bottom-color: color-mix(in srgb, var(--primary) 30%, #2a3f56);
}

body[data-theme="dark"] .portal-main .transport-exec-table-wrap table tbody td:first-child {
  border-left-color: color-mix(in srgb, var(--primary) 30%, #2a3f56);
}

body[data-theme="dark"] .portal-main .transport-exec-table-wrap table tbody td:last-child {
  border-right-color: color-mix(in srgb, var(--primary) 30%, #2a3f56);
}

body[data-theme="dark"] .trip-ops-card {
  background: #101c2c;
  border-color: rgba(148, 196, 255, 0.14);
  box-shadow: 0 8px 22px rgba(2, 8, 20, 0.55), 0 1px 2px rgba(2, 8, 20, 0.3);
}

body[data-theme="dark"] .trip-ops-card:hover {
  border-color: rgba(148, 196, 255, 0.28);
  box-shadow: 0 14px 28px rgba(2, 8, 20, 0.7), 0 2px 4px rgba(2, 8, 20, 0.35);
}

body[data-theme="dark"] .trip-ops-card-kicker {
  color: #94a8c0;
}

body[data-theme="dark"] .trip-ops-card-title {
  color: #e6f1ff;
}

body[data-theme="dark"] .trip-ops-card-badge {
  background: #2563c7;
}

body[data-theme="dark"] .trip-ops-card-route {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(148, 196, 255, 0.14);
}

body[data-theme="dark"] .trip-ops-card-route-label {
  color: #94a8c0;
}

body[data-theme="dark"] .trip-ops-card-route-node strong {
  color: #dbeafe;
}

body[data-theme="dark"] .trip-ops-card-route-pin svg,
body[data-theme="dark"] .trip-ops-card-route-arrow svg {
  color: #7eb8ff;
}

body[data-theme="dark"] .trip-ops-card-route-line {
  border-top-color: rgba(148, 196, 255, 0.25);
}

body[data-theme="dark"] .trip-ops-card-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 196, 255, 0.14);
}

body[data-theme="dark"] .trip-ops-card-item-label {
  color: #94a8c0;
}

body[data-theme="dark"] .trip-ops-card-item-icon {
  background: rgba(37, 99, 199, 0.22);
  color: #93c5fd;
}

body[data-theme="dark"] .trip-ops-card-item--value .trip-ops-card-item-icon {
  background: rgba(40, 167, 69, 0.18);
  color: #6ee7b7;
}

body[data-theme="dark"] .trip-ops-card-item-value {
  color: #dbeafe;
}

body[data-theme="dark"] .trip-ops-card-item--value .trip-ops-card-item-value {
  color: #6ee7b7;
}

body[data-theme="dark"] .trip-ops-card-item dt {
  color: #9fc3e6;
}

body[data-theme="dark"] .trip-ops-card-item dt svg {
  color: color-mix(in srgb, var(--primary) 80%, #d6e6ff);
}

body[data-theme="dark"] .trip-ops-card-item dd {
  color: #e2ecff;
}

body[data-theme="dark"] .trip-ops-card-item--value dd {
  color: #5fe2a1;
}

body[data-theme="dark"] .trip-ops-card-standby {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(251, 191, 36, 0.08));
  border-color: rgba(251, 191, 36, 0.45);
  color: #fcd9a3;
}

body[data-theme="dark"] .trip-ops-card-standby strong {
  color: #ffe6b5;
}

body[data-theme="dark"] .trip-ops-card-status-label {
  color: #94a8c0;
}

body[data-theme="dark"] .trip-ops-card-status-picker {
  background: rgba(37, 99, 199, 0.16);
  border-color: rgba(148, 196, 255, 0.2);
}

body[data-theme="dark"] .trip-ops-card-status-picker select.trip-status-select,
body[data-theme="dark"] .trip-ops-card-status-picker-value {
  color: #93c5fd;
}

body[data-theme="dark"] .trip-ops-card-btn--outline {
  background: transparent;
  border-color: #4b8fe8;
  color: #93c5fd;
}

body[data-theme="dark"] .trip-ops-card-btn--solid {
  background: #2563c7;
  border-color: #2563c7;
  color: #ffffff;
}

body[data-theme="dark"] .trip-ops-card-btn--soft {
  background: rgba(37, 99, 199, 0.16);
  border-color: rgba(148, 196, 255, 0.2);
  color: #93c5fd;
}

body[data-theme="dark"] .trip-ops-card-btn--danger {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

body[data-theme="dark"] .trip-ops-card-foot {
  border-top-color: rgba(148, 196, 255, 0.12);
  color: #94a8c0;
}

body[data-theme="dark"] .trip-ops-card-actions {
  border-top-color: transparent;
}

body[data-theme="dark"] .hiring-shell .hiring-table-wrap {
  border-color: rgba(129, 140, 248, 0.18);
  background: linear-gradient(180deg, rgba(16, 27, 46, 0.96), rgba(11, 21, 37, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .hiring-shell .hiring-table thead th {
  color: #95afd0;
}

body[data-theme="dark"] .hiring-shell .hiring-table tbody tr {
  filter: drop-shadow(0 12px 20px rgba(2, 8, 18, 0.42));
}

body[data-theme="dark"] .hiring-shell .hiring-table tbody td {
  background: rgba(17, 30, 49, 0.95);
  border-top-color: rgba(148, 196, 255, 0.12);
  border-bottom-color: rgba(148, 196, 255, 0.12);
}

body[data-theme="dark"] .hiring-shell .hiring-table tbody td:first-child {
  border-left-color: rgba(148, 196, 255, 0.12);
}

body[data-theme="dark"] .hiring-shell .hiring-table tbody td:last-child {
  border-right-color: rgba(148, 196, 255, 0.12);
}

body[data-theme="dark"] .hiring-shell .hiring-table tbody tr:hover td {
  background: rgba(20, 35, 58, 0.98);
  border-color: rgba(129, 140, 248, 0.24);
}

body[data-theme="dark"] .hiring-table-primary strong {
  color: #f4f8ff;
}

body[data-theme="dark"] .hiring-table-primary span {
  color: #9ebcdf;
}

body[data-theme="dark"] .hiring-table-actions > .btn {
  box-shadow: none;
}

body[data-theme="dark"] .hiring-status-select {
  border-color: rgba(129, 140, 248, 0.22);
  background: linear-gradient(180deg, rgba(20, 35, 58, 0.96), rgba(13, 25, 41, 0.98));
  color: #eaf2ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .hiring-status-select:focus {
  border-color: rgba(129, 140, 248, 0.34);
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .request-company-hub-card {
  background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 18%, #0b1626) 0%, #101c2c 60%, color-mix(in srgb, var(--primary) 8%, #0b1626) 100%);
  border-color: color-mix(in srgb, var(--primary) 34%, #2a3f56);
  box-shadow: 0 8px 22px rgba(2, 8, 20, 0.55), 0 1px 2px rgba(2, 8, 20, 0.3);
}

body[data-theme="dark"] .request-company-hub-card:hover {
  border-color: color-mix(in srgb, var(--primary) 50%, #2a3f56);
  box-shadow: 0 14px 28px rgba(2, 8, 20, 0.7), 0 2px 4px rgba(2, 8, 20, 0.35);
}

body[data-theme="dark"] .request-company-hub-card.is-active {
  border-color: color-mix(in srgb, var(--primary) 65%, #2a3f56);
  box-shadow: 0 16px 30px rgba(var(--primary-rgb), 0.45);
}

body[data-theme="dark"] .request-company-hub-card h4 {
  color: #e6f1ff;
}

body[data-theme="dark"] .request-company-hub-cta {
  background: linear-gradient(180deg, #17314c 0%, #12263d 100%);
  border-color: #4a729e;
  color: #dbeafe;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .request-company-hub-cta:hover {
  background: linear-gradient(180deg, #1c3d5e 0%, #16314d 100%);
  border-color: #6797c7;
  color: #ffffff;
}

body[data-theme="dark"] .request-company-hub-card.is-active .request-company-hub-cta {
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  border-color: rgba(173, 214, 255, 0.28);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

body[data-theme="dark"] .request-company-hub-metrics span {
  background: rgba(255, 255, 255, 0.04);
  border-color: color-mix(in srgb, var(--primary) 26%, #2a3f56);
}

body[data-theme="dark"] .request-company-hub-metrics strong {
  color: #dbeafe;
}

body[data-theme="dark"] .request-company-hub-metrics small {
  color: #94b4d6;
}

/* Modo portal sin scroll lateral: tablas y tarjetas fluidas */
.portal-main .dash-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.portal-main .user-grid.directory-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.portal-main .user-grid-companies {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

/**
 * Las tablas operativas (viajes, solicitudes, rutas, vehículos) prefieren
 * scroll horizontal antes que destrozar pills/botones rompiendo palabras a la
 * mitad. Mantenemos table-layout:auto para que cada columna pida el ancho que
 * necesita y agregamos overflow-x:auto al contenedor — más legible que un layout
 * fijo a la fuerza.
 */
.portal-main .table-wrap,
.portal-main .trips-table-wrap,
.portal-main .transport-exec-table-wrap,
.portal-main .route-rates-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.portal-main .table-wrap table,
.portal-main .trips-table-wrap table,
.portal-main .transport-exec-table-wrap table,
.portal-main .requests-table-wrap table,
.portal-main .vehicles-table-wrap table,
.portal-main .history-table-wrap table,
.portal-main .history-report-table-wrap table,
.portal-main .route-rates-table {
  width: 100%;
  table-layout: auto;
}

/**
 * Texto normal (direcciones, rutas, observaciones): permitimos wrap por
 * espacios, pero NO romper palabras (overflow-wrap:normal). Los pills y
 * botones tienen reglas más fuertes arriba para mantener una sola línea.
 */
.portal-main .table-wrap table thead th,
.portal-main .table-wrap table tbody td,
.portal-main .trips-table-wrap table thead th,
.portal-main .trips-table-wrap table tbody td,
.portal-main .transport-exec-table-wrap table thead th,
.portal-main .transport-exec-table-wrap table tbody td {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  vertical-align: top;
}

.portal-main .trips-table-wrap table thead th:nth-child(8),
.portal-main .trips-table-wrap table tbody td:nth-child(8) {
  min-width: 9rem;
}

.portal-main .trips-table-wrap table thead th:nth-child(9),
.portal-main .trips-table-wrap table tbody td:nth-child(9) {
  min-width: 14rem;
}

.portal-main .trips-table-wrap.requests-table-wrap table thead th:nth-child(5),
.portal-main .trips-table-wrap.requests-table-wrap table tbody td:nth-child(5),
.portal-main .requests-table-wrap table thead th:nth-child(5),
.portal-main .requests-table-wrap table tbody td:nth-child(5) {
  min-width: 13rem;
}

.payroll-shell .table-wrap,
.hiring-shell .table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

/* Botonera consistente — Gestión humana y Contratación
   Toma como referencia la compacidad y claridad visual de Solicitudes. */
.payroll-shell .toolbar,
.hiring-shell .toolbar,
.payroll-shell .hr-form-wizard-footer-nav,
.hiring-shell .hr-form-wizard-footer-nav,
.payroll-shell .hr-form-wizard-submit-row,
.hiring-shell .hr-form-wizard-submit-row {
  gap: 0.42rem;
}

.payroll-shell .toolbar .btn,
.hiring-shell .toolbar .btn,
.payroll-shell .hr-form-wizard-footer-nav .btn,
.hiring-shell .hr-form-wizard-footer-nav .btn {
  border-radius: 10px;
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: normal;
  padding: 0.4rem 0.7rem;
  min-height: auto;
}

.payroll-shell .toolbar .btn .btn-icon,
.hiring-shell .toolbar .btn .btn-icon,
.payroll-shell .hr-form-wizard-footer-nav .btn .btn-icon,
.hiring-shell .hr-form-wizard-footer-nav .btn .btn-icon {
  width: 14px;
  height: 14px;
  min-width: 14px;
}

.payroll-shell .module-panel-actions--footer .btn-primary,
.hiring-shell .module-panel-actions--footer .btn-primary {
  min-height: 2.75rem;
  padding: 0.62rem 1.4rem;
  font-size: 0.875rem;
  border-radius: 999px;
}

.payroll-shell .hr-form-wizard-footer .module-panel-actions__bar,
.hiring-shell .hr-form-wizard-footer .module-panel-actions__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 0.75rem;
  width: 100%;
  min-width: 0;
}

.payroll-shell .hr-form-wizard-footer .module-panel-actions__group,
.hiring-shell .hr-form-wizard-footer .module-panel-actions__group {
  min-width: 0;
  flex: 0 1 auto;
}

.payroll-shell .hr-form-wizard-footer .module-panel-actions__group--secondary,
.hiring-shell .hr-form-wizard-footer .module-panel-actions__group--secondary {
  margin-inline-end: auto;
}

.payroll-shell .hr-form-wizard-footer .module-panel-btn--minimize,
.payroll-shell .hr-form-wizard-footer .module-panel-btn--cancel,
.hiring-shell .hr-form-wizard-footer .module-panel-btn--minimize,
.hiring-shell .hr-form-wizard-footer .module-panel-btn--cancel {
  min-width: 0;
}

.payroll-shell .hr-form-wizard-footer .module-panel-actions__group--tools .btn,
.hiring-shell .hr-form-wizard-footer .module-panel-actions__group--tools .btn {
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  min-width: 0;
  max-width: 100%;
}

.payroll-shell .btn-outline,
.hiring-shell .btn-outline {
  background: transparent;
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line));
  color: var(--primary-dark);
  box-shadow: none;
}

.payroll-shell .btn-outline:hover,
.hiring-shell .btn-outline:hover {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
  background: color-mix(in srgb, var(--primary-light) 28%, #fff);
  color: var(--primary);
  transform: none;
}

.payroll-shell .p-form > .btn.full,
.hiring-shell .p-form > .btn.full {
  min-height: auto;
  border-radius: var(--radius-sm);
  justify-content: center;
  font-size: 0.92rem;
  padding-block: 0.7rem;
}

body[data-theme="dark"] .payroll-shell .btn-outline,
body[data-theme="dark"] .hiring-shell .btn-outline {
  background: #17314c;
  border-color: #4a729e;
  color: #e6f1ff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .payroll-shell .btn-outline:hover,
body[data-theme="dark"] .hiring-shell .btn-outline:hover {
  background: #1d4064;
  border-color: #5d88b8;
  color: #ffffff;
}

/* Tarjetas pro — Gestión humana y Contratación */
.hr-action-cards-grid {
  gap: 1.1rem;
}

.hr-action-card {
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 58%, #f1f5f9 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 14px 34px rgba(15, 23, 42, 0.07);
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.18s ease;
}

.hr-action-card:hover {
  border-color: rgba(var(--primary-rgb), 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 16px 36px rgba(var(--primary-rgb), 0.1);
  transform: translateY(-2px);
}

.hr-action-card--open,
.hr-action-card.p-card--expanded {
  border-color: rgba(var(--primary-rgb), 0.34);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 18px 42px rgba(var(--primary-rgb), 0.12);
  transform: none;
}

.hr-action-card__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 0.62rem 1rem;
  padding: 1.1rem 1.2rem 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  background: linear-gradient(135deg, rgba(var(--brand-blue-soft-rgb), 0.32), rgba(255, 255, 255, 0.88));
}

.hr-action-card__head .hr-card-icon {
  grid-row: 1 / -1;
  align-self: start;
}

.hr-action-card__head .hr-action-card__copy {
  grid-column: 2;
}

.hr-action-card__head .module-panel-toolbar {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  margin: 0;
}


.hr-action-card--open .hr-action-card__head,
.hr-action-card.p-card--expanded .hr-action-card__head {
  border-bottom-color: rgba(var(--primary-rgb), 0.14);
}

.hr-card-icon {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--brand-blue-deep), var(--primary-dark));
  color: #fff;
  box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.28);
  flex-shrink: 0;
}

.hr-card-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.hr-module-pro--payroll .hr-action-card .hr-card-icon {
  background: linear-gradient(145deg, #0f766e, #14b8a6);
  box-shadow: 0 8px 18px rgba(20, 184, 166, 0.28);
}

.hr-module-pro--hiring .hr-action-card .hr-card-icon {
  background: linear-gradient(145deg, #4338ca, #6366f1);
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.28);
}

.hr-action-card__copy {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.hr-action-card__copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.3;
}

.hr-action-card__desc {
  margin: 0.28rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-soft);
  max-width: 36rem;
}

.hr-action-card__cta {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  margin-top: 0.15rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: auto;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  border: 1px solid rgba(29, 83, 132, 0.18);
  background: linear-gradient(180deg, #5794d8 0%, #377cc0 54%, #2a6399 100%);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: normal;
  box-shadow: 0 10px 22px rgba(47, 116, 198, 0.2);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.hr-action-card__cta:hover {
  border-color: rgba(29, 83, 132, 0.28);
  background: linear-gradient(180deg, #67a3e4 0%, #4185cc 52%, #2a6399 100%);
  transform: translateY(-1px);
}

.hr-action-card__cta.is-active {
  border-color: rgba(29, 83, 132, 0.34);
  background: linear-gradient(180deg, #2f6ea9 0%, #265d90 54%, #1e4c76 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.28);
}

.hr-action-card__cta-ico .btn-icon {
  width: 1rem;
  height: 1rem;
}

.hr-action-card__panel {
  padding: 0.42rem 1.2rem 1.24rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0.96));
  animation: hr-panel-in 0.22s ease-out;
}

.hr-action-card__panel[hidden] {
  display: none !important;
}

/* Tarjetas de creación dentro del rail Registrar (patrón Gestión humana, por módulo) */
[class$="-operate__main"] .hr-action-card,
.requests-workspace-panel[data-requests-panel="operate"] .hr-action-card,
.sst-studio > .hr-action-card {
  margin: 0;
  transform: none;
}

[class$="-operate__main"] .hr-action-card:hover,
.requests-workspace-panel[data-requests-panel="operate"] .hr-action-card:hover,
.sst-studio > .hr-action-card:hover {
  transform: none;
}

[class$="-operate__main"] .hr-action-card__head,
.requests-workspace-panel[data-requests-panel="operate"] .hr-action-card__head,
.sst-studio > .hr-action-card .hr-action-card__head {
  padding: 1.2rem 1.45rem 1rem;
}

[class$="-operate__main"] .hr-action-card__panel,
.requests-workspace-panel[data-requests-panel="operate"] .hr-action-card__panel,
.sst-studio > .hr-action-card .hr-action-card__panel {
  padding: 0 1.45rem 1.35rem;
}

[class$="-operate__main"] .auth-tab-panel.hidden {
  display: none !important;
}

[class$="-operate__main"] .auth-tab-panel:not(.hidden) {
  min-width: 0;
}

.hr-action-card__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.hr-data-card {
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.hr-data-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.92));
}

.hr-data-card__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.hr-data-card__titles h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hr-data-card__stat {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  background: rgba(var(--brand-blue-soft-rgb), 0.45);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brand-blue-deep);
  letter-spacing: -0.01em;
}

.hr-module-pro--payroll .hr-data-card__stat {
  border-color: rgba(20, 184, 166, 0.28);
  background: rgba(45, 212, 191, 0.14);
  color: #0f766e;
}

.hr-module-pro--hiring .hr-data-card__stat {
  border-color: rgba(99, 102, 241, 0.28);
  background: rgba(129, 140, 248, 0.14);
  color: #4338ca;
}

.hr-data-card__body {
  padding: 1rem 1.2rem 1.2rem;
}

.hr-data-card .table-wrap {
  margin: 0 -1.15rem;
  padding: 0 1.15rem;
}

@media (max-width: 640px) {
  .hr-action-card__head {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .hr-action-card__cta {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }

  .hr-data-card__head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 1024px) {
  .payroll-shell .toolbar .btn,
  .hiring-shell .toolbar .btn,
  .payroll-shell .hr-form-wizard-footer-nav .btn,
  .hiring-shell .hr-form-wizard-footer-nav .btn,
  .hr-action-card__cta {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }

  .hr-form-wizard-hint {
    text-align: start;
    flex-basis: 100%;
  }
}

body[data-theme="dark"] .hr-action-card {
  border-color: rgba(148, 196, 255, 0.14);
  background: linear-gradient(165deg, rgba(18, 32, 52, 0.98), rgba(12, 24, 40, 0.95));
  box-shadow: 0 12px 32px rgba(2, 8, 18, 0.45);
}

body[data-theme="dark"] .hr-action-card__head {
  border-bottom-color: rgba(148, 196, 255, 0.1);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.16), rgba(12, 24, 40, 0.4));
}

body[data-theme="dark"] .hr-action-card__cta {
  background: linear-gradient(180deg, #5d9ce2 0%, #377cc0 52%, #244f78 100%);
  border-color: rgba(149, 196, 255, 0.45);
  color: #f3f9ff;
  box-shadow: 0 12px 24px rgba(4, 17, 34, 0.28);
}

body[data-theme="dark"] .hr-action-card__panel {
  background: linear-gradient(180deg, rgba(17, 30, 49, 0.72), rgba(12, 24, 40, 0.94));
}

body[data-theme="dark"] .hr-data-card {
  border-color: rgba(148, 196, 255, 0.14);
  background: rgba(14, 28, 46, 0.92);
  box-shadow: 0 12px 32px rgba(2, 8, 18, 0.4);
}

body[data-theme="dark"] .hr-data-card__head {
  border-bottom-color: rgba(148, 196, 255, 0.1);
  background: linear-gradient(180deg, rgba(18, 32, 52, 0.95), rgba(14, 28, 46, 0.88));
}

body[data-theme="dark"] .hr-data-card__stat {
  background: rgba(var(--primary-rgb), 0.14);
  border-color: rgba(148, 196, 255, 0.2);
  color: #cfe9fc;
}

.hiring-shell--workspace .hr-action-card {
  border-radius: 20px;
  overflow: hidden;
}

.hiring-shell--workspace .hr-action-card__head {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.18), rgba(255, 255, 255, 0.92));
}

.hiring-shell--workspace .hr-action-card:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 22px 44px rgba(67, 56, 202, 0.14);
}

.hiring-shell--workspace .hiring-pro-data-card {
  border-radius: 20px;
  border-color: rgba(99, 102, 241, 0.14);
  box-shadow: 0 14px 34px rgba(67, 56, 202, 0.08);
}

.hiring-shell--workspace .hiring-pro-data-card .hr-data-card__head {
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.94), rgba(255, 255, 255, 0.96));
}

.hiring-shell--workspace .hiring-pro-data-card .hr-data-card__stat {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.16);
  color: #4338ca;
}

.hiring-data-card-shell {
  display: grid;
  gap: 1rem;
}

.hiring-data-card-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem 1rem;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: linear-gradient(180deg, rgba(243, 244, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.hiring-data-card-summary--brand {
  border-color: rgba(59, 130, 246, 0.14);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.hiring-data-card-summary--violet {
  border-color: rgba(139, 92, 246, 0.14);
  background: linear-gradient(180deg, rgba(245, 243, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.hiring-data-card-summary--cyan {
  border-color: rgba(6, 182, 212, 0.16);
  background: linear-gradient(180deg, rgba(236, 254, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.hiring-data-card-summary--amber {
  border-color: rgba(245, 158, 11, 0.16);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 255, 255, 0.98));
}

.hiring-data-card-summary--emerald {
  border-color: rgba(16, 185, 129, 0.16);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(255, 255, 255, 0.98));
}

.hiring-data-card-copy {
  flex: 1 1 18rem;
  min-width: 0;
}

.hiring-data-card-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hiring-data-card-text {
  margin: 0.3rem 0 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.hiring-data-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.hiring-data-card-metric {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 92px;
  padding: 0.55rem 0.72rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.hiring-data-card-metric strong {
  font-size: 1rem;
  line-height: 1.1;
  color: var(--text);
}

.hiring-data-card-metric small {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-soft);
}

.hiring-data-card-metric--ok {
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(236, 253, 245, 0.95);
}

.hiring-data-card-metric--warn {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(255, 251, 235, 0.98);
}

body[data-theme="dark"] .hiring-shell--workspace .hr-action-card {
  border-color: rgba(129, 140, 248, 0.16);
  box-shadow: 0 14px 34px rgba(2, 8, 18, 0.42);
}

body[data-theme="dark"] .hiring-shell--workspace .hr-action-card__head {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(12, 24, 40, 0.42));
}

body[data-theme="dark"] .hiring-shell--workspace .hiring-pro-data-card {
  border-color: rgba(129, 140, 248, 0.18);
  box-shadow: 0 16px 36px rgba(2, 8, 18, 0.44);
}

body[data-theme="dark"] .hiring-shell--workspace .hiring-pro-data-card .hr-data-card__head {
  background: linear-gradient(180deg, rgba(22, 34, 58, 0.96), rgba(14, 28, 46, 0.9));
}

body[data-theme="dark"] .hiring-shell--workspace .hiring-pro-data-card .hr-data-card__stat {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(129, 140, 248, 0.22);
  color: #dbe7ff;
}

body[data-theme="dark"] .hiring-data-card-summary {
  border-color: rgba(129, 140, 248, 0.16);
  background: linear-gradient(180deg, rgba(22, 34, 58, 0.92), rgba(14, 28, 46, 0.92));
}

body[data-theme="dark"] .hiring-data-card-kicker,
body[data-theme="dark"] .hiring-data-card-text,
body[data-theme="dark"] .hiring-data-card-metric small {
  color: #a9c8ea;
}

body[data-theme="dark"] .hiring-data-card-metric {
  border-color: rgba(148, 196, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

body[data-theme="dark"] .hiring-data-card-metric strong {
  color: #f4f8ff;
}

body[data-theme="dark"] .hiring-data-card-metric--ok {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.22);
}

body[data-theme="dark"] .hiring-data-card-metric--warn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.24);
}

@media (max-width: 720px) {
  .hiring-data-card-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .hiring-data-card-metrics {
    width: 100%;
  }

  .hiring-data-card-metric {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
  }
}

/* Ajuste corporativo final RRHH + Contratación */
.fleet-hero-strip--solo.fleet-hero-strip--hr-payroll,
.fleet-hero-strip--solo.fleet-hero-strip--hr-hiring {
  background: linear-gradient(125deg, var(--brand-blue-deep) 0%, var(--primary-dark) 52%, var(--brand-blue-mid) 100%);
  box-shadow: 0 14px 34px rgba(var(--primary-rgb), 0.28);
}

.hr-module-pro--payroll .hr-workspace-tabs--pro,
.hr-module-pro--hiring .hr-workspace-tabs--pro {
  border-color: rgba(var(--primary-rgb), 0.2);
}

.hr-module-pro--payroll .hr-workspace-tab--pro.is-active,
.hr-module-pro--hiring .hr-workspace-tab--pro.is-active {
  background: linear-gradient(180deg, #4a8fd4 0%, var(--primary) 55%, var(--primary-dark) 100%);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.2);
}

.hr-module-pro--payroll .hr-workspace-tab-ico,
.hr-module-pro--hiring .hr-workspace-tab-ico {
  color: var(--brand-blue-deep);
}

.hr-module-pro.payroll-shell--workspace .ops-module-head--rich,
.hr-module-pro.hiring-shell--workspace .ops-module-head-hiring.ops-module-head--rich {
  border-left: 4px solid var(--brand-blue-deep);
}

.hr-overview-guide--payroll,
.hr-overview-guide--hiring {
  border-left: 4px solid var(--brand-blue-deep);
  background: linear-gradient(145deg, rgba(var(--brand-blue-soft-rgb), 0.22), rgba(255, 255, 255, 0.97));
}

body[data-theme="dark"] .hiring-shell--workspace .hr-workspace-tab--pro.is-active,
body[data-theme="dark"] .hr-module-pro--payroll .hr-workspace-tab--pro.is-active,
body[data-theme="dark"] .hr-module-pro--hiring .hr-workspace-tab--pro.is-active {
  background: linear-gradient(180deg, #4b94dd 0%, #2f71bc 100%);
  box-shadow: 0 12px 22px rgba(6, 20, 38, 0.22);
}

body[data-theme="dark"] .driver-report-kpi,
body[data-theme="dark"] .reports-card-pro {
  background: linear-gradient(160deg, rgba(var(--primary-rgb), 0.2), rgba(15, 23, 42, 0.72));
  border-color: color-mix(in srgb, var(--primary) 34%, #2a3f56);
}

body[data-theme="dark"] .reports-card-pro .p-card-header {
  border-bottom-color: rgba(131, 190, 233, 0.16);
  background: linear-gradient(180deg, rgba(20, 49, 77, 0.92), rgba(12, 28, 46, 0.86));
}

body[data-theme="dark"] .reports-card-pro .p-card-header h2,
body[data-theme="dark"] .reports-export-group-title {
  color: #dbeafe;
}

body[data-theme="dark"] .reports-card-subtitle {
  color: #a9c7e8;
}

body[data-theme="dark"] .reports-export-group {
  border-color: rgba(131, 190, 233, 0.16);
  background: linear-gradient(180deg, rgba(18, 45, 71, 0.82), rgba(10, 24, 38, 0.92));
  box-shadow: 0 16px 30px rgba(2, 8, 20, 0.42);
}

body[data-theme="dark"] .reports-export-filters {
  border-color: rgba(131, 190, 233, 0.16);
  background: linear-gradient(180deg, rgba(18, 45, 71, 0.78), rgba(10, 24, 38, 0.9));
  box-shadow: 0 16px 30px rgba(2, 8, 20, 0.42);
}

body[data-theme="dark"] .reports-export-filters-head h3,
body[data-theme="dark"] .reports-export-filters-kicker,
body[data-theme="dark"] .reports-export-filters-badge {
  color: #dbeafe;
}

body[data-theme="dark"] .reports-export-filters-copy {
  color: #9fc3e6;
}

body[data-theme="dark"] .reports-export-filters-badge {
  border-color: rgba(131, 190, 233, 0.18);
  background: rgba(15, 28, 46, 0.72);
}

body[data-theme="dark"] .reports-export-group-title {
  border-bottom-color: rgba(131, 190, 233, 0.14);
}

body[data-theme="dark"] .driver-report-kpi h4,
body[data-theme="dark"] .reports-card-subtitle {
  color: #9fc3e6;
}

body[data-theme="dark"] .driver-report-kpi strong {
  color: #e2eef9;
}

/* ===================================================================
   RRHH — Gestión humana + Contratación: refresh visual compartido (2026)
   Variables --hr-ui-* · menos ruido y más aire en ambos módulos.
   =================================================================== */

.hr-module-pro--payroll.payroll-shell--workspace,
.hr-module-pro--hiring.hiring-shell--workspace {
  --hr-ui-surface: rgba(255, 255, 255, 0.78);
  --hr-ui-raised: #ffffff;
  --hr-ui-edge: rgba(15, 23, 42, 0.07);
  --hr-ui-edge-strong: rgba(15, 23, 42, 0.1);
  --hr-ui-muted: rgba(248, 250, 252, 0.98);
  gap: 1.15rem;
}

.hr-module-pro--payroll.payroll-shell--workspace .hr-workspace-panels,
.hr-module-pro--hiring.hiring-shell--workspace .hr-workspace-panels {
  gap: 1.05rem;
}

.hr-module-pro--payroll .hr-workspace-header--payroll,
.hr-module-pro--hiring .hr-workspace-header--hiring {
  align-items: center;
  padding: 1rem 1.2rem;
  border-radius: 20px;
  border: 1px solid var(--hr-ui-edge-strong);
  background: var(--hr-ui-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 18px 48px rgba(15, 23, 42, 0.06);
}

.hr-module-pro--payroll .hr-workspace-header .payroll-module-head__title h2,
.hr-module-pro--hiring .hr-workspace-header .payroll-module-head__title h2 {
  font-size: 1.3rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.hr-module-pro--payroll .hr-workspace-tab--switch .hr-workspace-tab-hint,
.hr-module-pro--hiring .hr-workspace-tab--switch .hr-workspace-tab-hint {
  display: none;
}

.hr-module-pro--payroll .hr-workspace-tab--switch .hr-workspace-tab-body,
.hr-module-pro--hiring .hr-workspace-tab--switch .hr-workspace-tab-body {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.hr-module-pro--payroll .hr-workspace-tabs--switch,
.hr-module-pro--hiring .hr-workspace-tabs--switch {
  padding: 0.32rem;
  border-radius: 999px;
  border: 1px solid var(--hr-ui-edge-strong);
  background: rgba(241, 245, 249, 0.72);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
  gap: 0.22rem;
}

.hr-module-pro--payroll .hr-workspace-tab--switch,
.hr-module-pro--hiring .hr-workspace-tab--switch {
  min-height: 2.5rem;
  border-radius: 999px;
  font-weight: 650;
}

.hr-module-pro--payroll .hr-workspace-tab--switch .hr-workspace-tab-label,
.hr-module-pro--hiring .hr-workspace-tab--switch .hr-workspace-tab-label {
  font-size: 0.9rem;
  font-weight: 700;
}

.hr-module-pro--payroll .payroll-module-kpi__item,
.hr-module-pro--hiring .payroll-module-kpi__item {
  border-radius: 14px;
  padding: 0.4rem 0.78rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hr-module-pro--payroll .payroll-module-kpi__item dt,
.hr-module-pro--hiring .payroll-module-kpi__item dt {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.69rem;
  font-weight: 600;
  opacity: 0.9;
}

.hr-module-pro--payroll .ops-block--payroll-data,
.hr-module-pro--hiring .ops-block--payroll-data {
  padding: 0.9rem 1rem 1.05rem;
  border-radius: 22px;
  border: 1px solid var(--hr-ui-edge);
  background: color-mix(in srgb, var(--hr-ui-raised) 88%, var(--hr-ui-muted));
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.05);
}

.hr-module-pro--payroll .payroll-data-toolbar--compact,
.hr-module-pro--hiring .payroll-data-toolbar--compact {
  gap: 0.85rem;
}

.hr-module-pro--payroll .payroll-data-nav,
.hr-module-pro--hiring .payroll-data-nav {
  padding: 0.38rem;
  border-radius: 16px;
  border: 1px solid var(--hr-ui-edge-strong);
  background: var(--hr-ui-muted);
  box-shadow: none;
}

.hr-module-pro--payroll .payroll-data-nav-tab,
.hr-module-pro--hiring .payroll-data-nav-tab {
  border-radius: 13px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  font-weight: 650;
  font-size: 0.8rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.hr-module-pro--payroll .payroll-data-nav-tab:hover,
.hr-module-pro--hiring .payroll-data-nav-tab:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--hr-ui-edge);
}

.hr-module-pro--payroll .payroll-data-nav-tab.is-active,
.hr-module-pro--hiring .payroll-data-nav-tab.is-active {
  background: var(--hr-ui-raised);
  color: var(--primary-dark, #1e40af);
  border-color: var(--hr-ui-edge-strong);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.hr-module-pro--payroll .payroll-data-nav-tab.is-active .payroll-data-nav-count,
.hr-module-pro--hiring .payroll-data-nav-tab.is-active .payroll-data-nav-count {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  color: var(--primary-deeper, #1e3a8a);
}

.hr-module-pro--payroll .payroll-table-shell,
.hr-module-pro--hiring .payroll-table-shell {
  border-radius: 18px;
  border: 1px solid var(--hr-ui-edge-strong);
  background: var(--hr-ui-raised);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.05);
}

.hr-module-pro--hiring .hiring-data-search-toolbar--panel {
  margin-bottom: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 16px;
  border: 1px solid var(--hr-ui-edge);
  background: var(--hr-ui-raised);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.hr-module-pro--hiring .hiring-candidate-card {
  border-radius: 16px;
  border: 1px solid var(--hr-ui-edge-strong);
  background: var(--hr-ui-raised);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.hr-module-pro--hiring .hiring-candidate-card:hover {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--hr-ui-edge-strong));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.hr-module-pro--hiring .hiring-table-wrap {
  border-radius: 0;
}

.hr-module-pro--payroll .payroll-run-cards-grid {
  gap: 1rem;
}

.hr-module-pro--payroll .payroll-run-card {
  border-radius: 18px;
  border: 1px solid var(--hr-ui-edge-strong);
  background: var(--hr-ui-raised);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
  gap: 0.75rem;
}

.hr-module-pro--payroll .payroll-run-card--pending {
  border-color: rgba(245, 158, 11, 0.28);
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.07);
}

.hr-module-pro--payroll .payroll-run-card-kicker {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.68rem;
  font-weight: 600;
}

.hr-module-pro--payroll .payroll-run-card--compact {
  border-radius: 18px;
  min-height: auto;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}

.hr-module-pro--payroll .payroll-run-card--compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.09);
}

.hr-module-pro--payroll .payroll-quick-pill,
.hr-module-pro--hiring .payroll-quick-pill {
  font-weight: 650;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.06);
}

.hr-module-pro--payroll .payroll-quick-pill:hover,
.hr-module-pro--hiring .payroll-quick-pill:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1);
}

.hr-module-pro--payroll .payroll-quick-pill.is-active,
.hr-module-pro--hiring .payroll-quick-pill.is-active {
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.18);
}

.hr-module-pro--payroll .payroll-employees-grid .directory-card--compact {
  border-radius: 16px;
  border: 1px solid var(--hr-ui-edge-strong);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.hr-module-pro--payroll .payroll-employees-grid .directory-card--compact:hover {
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.hr-module-pro--payroll .payroll-result-meta,
.hr-module-pro--hiring .payroll-result-meta {
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

.hr-module-pro--payroll .ops-block--payroll-flow,
.hr-module-pro--hiring .ops-block--payroll-flow {
  padding: 0.15rem;
  border-radius: 22px;
  border: 1px solid var(--hr-ui-edge);
  background: color-mix(in srgb, var(--hr-ui-muted) 80%, transparent);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.04);
}

.hr-module-pro--payroll .ops-block--payroll-flow .auth-tabs-layout,
.hr-module-pro--hiring .ops-block--payroll-flow .auth-tabs-layout {
  padding: 0.15rem 0.25rem 0;
}

.hr-module-pro--payroll .ops-block--payroll-flow .auth-tab-panels,
.hr-module-pro--hiring .ops-block--payroll-flow .auth-tab-panels {
  border-radius: 18px;
  background: transparent;
}

body[data-theme="dark"] .hr-module-pro--payroll.payroll-shell--workspace,
body[data-theme="dark"] .hr-module-pro--hiring.hiring-shell--workspace {
  --hr-ui-surface: rgba(15, 23, 42, 0.55);
  --hr-ui-raised: rgba(15, 23, 42, 0.78);
  --hr-ui-edge: rgba(148, 163, 184, 0.14);
  --hr-ui-edge-strong: rgba(148, 163, 184, 0.22);
  --hr-ui-muted: rgba(15, 23, 42, 0.42);
}

body[data-theme="dark"] .hr-module-pro--payroll .hr-workspace-header--payroll,
body[data-theme="dark"] .hr-module-pro--hiring .hr-workspace-header--hiring {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 48px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .hr-module-pro--payroll .hr-workspace-header .payroll-module-head__title h2,
body[data-theme="dark"] .hr-module-pro--hiring .hr-workspace-header .payroll-module-head__title h2 {
  color: #f1f5f9;
}

body[data-theme="dark"] .hr-module-pro--payroll .payroll-data-nav-tab.is-active,
body[data-theme="dark"] .hr-module-pro--hiring .payroll-data-nav-tab.is-active {
  color: #e0f2fe;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .hr-module-pro--payroll .payroll-data-nav-tab.is-active .payroll-data-nav-count,
body[data-theme="dark"] .hr-module-pro--hiring .payroll-data-nav-tab.is-active .payroll-data-nav-count {
  color: #f8fafc;
}

/* ─── NÓMINA v2 — clases generadas por refactorización UI (payroll-v2) ─── */
/*
 * payroll-v2.css — Gestión humana / Nómina
 * Importar DESPUÉS del stylesheet principal de la aplicación.
 * Agrega las clases nuevas sin tocar las existentes.
 *
 * Variables configurables — sobrescribir en :root si el sistema
 * de diseño usa nombres distintos:
 */
:root {
  --pr-stripe-pending:   #F59E0B;   /* ámbar — liquidación pendiente */
  --pr-stripe-paid:      #10B981;   /* teal  — liquidación pagada    */
  --pr-color-net:        #1D4ED8;   /* azul  — importe neto resaltado */
  --pr-color-ded:        #DC2626;   /* rojo  — deducciones            */
  --pr-chip-bg:          #EFF6FF;
  --pr-chip-color:       #1E40AF;
  --pr-amt-border:       rgba(0,0,0,.08);
  --pr-amt-net-bg:       rgba(0,0,0,.03);
  /* Colores de avatar (índice 0-3) */
  --pr-av0-bg: #DBEAFE; --pr-av0-fg: #1E40AF;  /* azul   */
  --pr-av1-bg: #D1FAE5; --pr-av1-fg: #065F46;  /* verde  */
  --pr-av2-bg: #FEF3C7; --pr-av2-fg: #92400E;  /* ámbar  */
  --pr-av3-bg: #EDE9FE; --pr-av3-fg: #4C1D95;  /* violeta */
  /* Chips de ausencias */
  --pr-abs-warn-bg:    #FEF3C7; --pr-abs-warn-fg:    #92400E;
  --pr-abs-ok-bg:      #D1FAE5; --pr-abs-ok-fg:      #065F46;
  --pr-abs-info-bg:    #DBEAFE; --pr-abs-info-fg:    #1E3A8A;
  --pr-abs-neutral-bg: #F3F4F6; --pr-abs-neutral-fg: #374151;
  /* Badge SMMLV / Prestación */
  --pr-badge-smmlv-bg: #EDE9FE; --pr-badge-smmlv-fg: #4C1D95;
  --pr-badge-driver-bg:#FEF3C7; --pr-badge-driver-fg:#92400E;
  /* Barra de alerta de contrato */
  --pr-contract-alert-bg:  #FFFBEB; --pr-contract-alert-fg:  #92400E; --pr-contract-alert-bd: #FDE68A;
  --pr-contract-expired-bg:#FEF2F2; --pr-contract-expired-fg:#991B1B; --pr-contract-expired-bd:#FECACA;
}

/* ─── TARJETA DE LIQUIDACIÓN ─────────────────────────────────────────── */

.payroll-run-card {
  position: relative;   /* necesario para la franja absoluta */
  overflow: hidden;     /* recorta la franja en las esquinas redondeadas */
  display: flex;
  flex-direction: column;
  min-width: 0;
  container-type: inline-size;
  container-name: payroll-run-card;
}

/* Franja lateral de estado (4 px, sin border-radius propio) */
.payroll-run-stripe {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 0;
  background: transparent;
}
.payroll-run-card--pending .payroll-run-stripe { background: var(--pr-stripe-pending); }
.payroll-run-card--paid    .payroll-run-stripe { background: var(--pr-stripe-paid);    }

/* Encabezado: tipo / periodo / nombre + badge de estado */
.payroll-run-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 13px 13px 9px 20px; /* 20 px izquierda despeja la franja */
  gap: 10px;
}
.payroll-run-card-identity { flex: 1; min-width: 0; }
.payroll-run-card-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted, #6B7280);
  font-weight: 600;
  margin: 0 0 2px;
}
.payroll-run-card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.2;
}
.payroll-run-card-employee {
  font-size: 12px;
  color: var(--muted, #6B7280);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chips de etiquetas (Prima, Int. cesantías, Ausentismo…) */
.payroll-run-card-chips {
  display: flex;
  gap: 5px;
  padding: 0 20px 9px;
  flex-wrap: wrap;
}
.payroll-run-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--pr-chip-bg);
  color: var(--pr-chip-color);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

/* Grid de importes: 3 columnas (col1 | col2 | Neto); se apila si la tarjeta es estrecha */
.payroll-run-amounts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--pr-amt-border);
  border-bottom: 1px solid var(--pr-amt-border);
  min-width: 0;
}
.payroll-run-amount-col {
  padding: 10px 10px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.payroll-run-amount-col + .payroll-run-amount-col {
  padding-left: 10px;
  border-left: 1px solid var(--pr-amt-border);
}
.payroll-run-amount-col--net {
  background: var(--pr-amt-net-bg);
}
.payroll-run-amount-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted, #6B7280);
  font-weight: 600;
}
.payroll-run-amount-value {
  font-size: clamp(0.68rem, 3.2cqi, 0.8125rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payroll-run-amount-value--ded { color: var(--pr-color-ded); }
.payroll-run-amount-value--net {
  font-size: clamp(0.75rem, 3.6cqi, 0.9375rem);
  font-weight: 700;
  color: var(--pr-color-net);
  font-variant-numeric: tabular-nums;
}

/* Tarjeta estrecha: importes en filas (evita recorte de Neto) */
@container payroll-run-card (max-width: 24.5rem) {
  .payroll-run-amounts {
    grid-template-columns: 1fr;
  }
  .payroll-run-amount-col {
    padding: 8px 14px 8px 16px;
  }
  .payroll-run-amount-col + .payroll-run-amount-col {
    padding-left: 16px;
    border-left: none;
    border-top: 1px solid var(--pr-amt-border);
  }
  .payroll-run-amount-value,
  .payroll-run-amount-value--net {
    font-size: 0.8125rem;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    overflow-wrap: anywhere;
  }
  .payroll-run-amount-value--net {
    font-size: 0.9375rem;
  }
}

/* Acciones de la tarjeta */
.payroll-run-card-actions.toolbar {
  padding: 9px 13px 9px 20px;
  flex-wrap: wrap;
}

/* ─── TARJETA DE EMPLEADO (modo compact) ─────────────────────────────── */

/* Avatar con inicial: 4 colores basados en hash del nombre */
.payroll-emp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: -.5px;
}
.payroll-emp-avatar--0 { background: var(--pr-av0-bg); color: var(--pr-av0-fg); }
.payroll-emp-avatar--1 { background: var(--pr-av1-bg); color: var(--pr-av1-fg); }
.payroll-emp-avatar--2 { background: var(--pr-av2-bg); color: var(--pr-av2-fg); }
.payroll-emp-avatar--3 { background: var(--pr-av3-bg); color: var(--pr-av3-fg); }

/* Chip de rol (Empleado / Conductor · prestación servicios) */
.payroll-emp-role-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  background: rgba(0,0,0,.05);
  color: var(--text, #374151);
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 500;
}

/* Salario con cifras tabulares */
.payroll-emp-salary {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Badges de meta (SMMLV, Prestación) */
.payroll-emp-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
}
.payroll-emp-badge--smmlv { background: var(--pr-badge-smmlv-bg); color: var(--pr-badge-smmlv-fg); }
.payroll-emp-badge--driver { background: var(--pr-badge-driver-bg); color: var(--pr-badge-driver-fg); }

/* Barra de alerta de contrato (inferior a la fila compacta) */
.payroll-emp-contract-alert {
  padding: 6px 12px;
  font-size: 11px;
  line-height: 1.4;
  background: var(--pr-contract-alert-bg);
  color: var(--pr-contract-alert-fg);
  border-top: 1px solid var(--pr-contract-alert-bd);
}
.payroll-emp-contract-alert--expired {
  background: var(--pr-contract-expired-bg);
  color: var(--pr-contract-expired-fg);
  border-top-color: var(--pr-contract-expired-bd);
}

/* Acciones Renovar / No renovar (tabla y tarjetas de empleados) */
.payroll-contract-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem;
  border-radius: 11px;
  background: rgba(241, 245, 249, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.payroll-contract-btn {
  min-height: 1.95rem;
  padding: 0.28rem 0.62rem;
  border-radius: 9px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: none;
}

.payroll-contract-btn .btn-icon {
  width: 13px;
  height: 13px;
}

.payroll-contract-btn--renew {
  color: #1d4ed8;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid rgba(59, 130, 246, 0.34);
}

.payroll-contract-btn--renew:hover {
  color: #1e3a8a;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: rgba(37, 99, 235, 0.45);
}

.payroll-contract-btn--non-renew {
  color: #92400e;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid rgba(245, 158, 11, 0.34);
}

.payroll-contract-btn--non-renew:hover {
  color: #78350f;
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  border-color: rgba(217, 119, 6, 0.42);
}

.directory-card__actions .payroll-contract-actions,
.directory-card__compact-actions .payroll-contract-actions,
.hiring-table-actions .payroll-contract-actions {
  margin-inline: 0.12rem;
}

/* Modales renovación / no renovación */
.modal-card-edit.modal-card-edit--employee-renewal,
.modal-card-edit.modal-card-edit--employee-non-renewal {
  width: min(560px, 97%);
}

.modal-card-edit--employee-renewal .modal-edit-form,
.modal-card-edit--employee-non-renewal .modal-edit-form {
  gap: 0.75rem;
}

.modal-card-edit--employee-renewal .modal-edit-actions,
.modal-card-edit--employee-non-renewal .modal-edit-actions {
  margin-top: 0.35rem !important;
}

.modal-card-edit--employee-renewal .modal-edit-actions .module-panel-actions__bar,
.modal-card-edit--employee-non-renewal .modal-edit-actions .module-panel-actions__bar {
  margin-top: 0;
}

.modal-card-edit--employee-renewal .module-panel-actions__group--secondary,
.modal-card-edit--employee-non-renewal .module-panel-actions__group--secondary {
  background: transparent;
  border: 0;
  padding: 0;
}

.modal-card-edit--employee-renewal .module-panel-actions__group--primary,
.modal-card-edit--employee-non-renewal .module-panel-actions__group--primary {
  margin-inline-start: auto;
}

.modal-card-edit--employee-renewal .module-panel-actions__group--primary .btn-primary,
.modal-card-edit--employee-non-renewal .module-panel-actions__group--primary .btn-primary {
  min-height: 2.5rem;
  padding-inline: 1rem;
  white-space: nowrap;
}

.modal-card-edit--employee-non-renewal .module-panel-actions__group--primary .btn-primary {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  border-color: rgba(217, 119, 6, 0.55);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.22);
}

.modal-card-edit--employee-non-renewal .module-panel-actions__group--primary .btn-primary:hover {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
}

.employee-contract-renewal-word {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px dashed rgba(59, 130, 246, 0.28);
  background: rgba(239, 246, 255, 0.65);
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.employee-contract-renewal-word input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex-shrink: 0;
}

.employee-contract-non-renewal-meta {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.95), rgba(255, 255, 255, 0.92));
  font-size: 0.82rem;
  line-height: 1.45;
}

.employee-contract-non-renewal-meta p {
  margin: 0;
}

.employee-contract-non-renewal-late {
  margin: 0.15rem 0 0 !important;
  color: #b45309;
  font-weight: 600;
}

body[data-theme="dark"] .payroll-contract-actions {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 196, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .payroll-contract-btn--renew {
  color: #bfdbfe;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.55), rgba(30, 64, 175, 0.38));
  border-color: rgba(96, 165, 250, 0.35);
}

body[data-theme="dark"] .payroll-contract-btn--non-renew {
  color: #fde68a;
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.45), rgba(146, 64, 14, 0.32));
  border-color: rgba(251, 191, 36, 0.28);
}

body[data-theme="dark"] .employee-contract-renewal-word {
  color: #dbeafe;
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(30, 58, 138, 0.22);
}

body[data-theme="dark"] .employee-contract-non-renewal-meta {
  border-color: rgba(251, 191, 36, 0.2);
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.28), rgba(15, 23, 42, 0.55));
}

body[data-theme="dark"] .employee-contract-non-renewal-late {
  color: #fcd34d;
}

body[data-theme="dark"] .modal-card-edit--employee-renewal .modal-edit-actions .module-panel-actions__bar,
body[data-theme="dark"] .modal-card-edit--employee-non-renewal .modal-edit-actions .module-panel-actions__bar {
  border-top-color: rgba(148, 196, 255, 0.14);
}

/* ─── CHIPS DE TIPO DE AUSENCIA (tabla de ausencias) ─────────────────── */

.payroll-abs-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.payroll-abs-chip--warn    { background: var(--pr-abs-warn-bg);    color: var(--pr-abs-warn-fg);    }
.payroll-abs-chip--ok      { background: var(--pr-abs-ok-bg);      color: var(--pr-abs-ok-fg);      }
.payroll-abs-chip--info    { background: var(--pr-abs-info-bg);    color: var(--pr-abs-info-fg);    }
.payroll-abs-chip--neutral { background: var(--pr-abs-neutral-bg); color: var(--pr-abs-neutral-fg); }

/* ═══════════════════════════════════════════════════════════════════════════
   MEJORAS UI — Botones Cancelar/Guardar · Vistas detalle · Reportes
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Botón CANCELAR: identidad visual más fuerte ─────────────────────── */
.module-panel-actions--footer .module-panel-btn--cancel {
  --mpa-btn-bg: linear-gradient(180deg, #fff5f6 0%, #fff0f1 100%);
  --mpa-btn-edge: rgba(244, 63, 94, 0.32);
  --mpa-btn-icon-bg: color-mix(in srgb, #f43f5e 16%, #fff);
  color: #b91c1c;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-width: 1.5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 2px 6px rgba(225, 29, 72, 0.1),
    0 1px 2px rgba(225, 29, 72, 0.06);
}

.module-panel-actions--footer .module-panel-btn--cancel:hover {
  --mpa-btn-bg: linear-gradient(180deg, #ffe4e6 0%, #fecdd3 100%);
  --mpa-btn-edge: rgba(251, 113, 133, 0.48);
  --mpa-btn-icon-bg: color-mix(in srgb, #f43f5e 22%, #fff1f2);
  color: #9f1239;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 12px rgba(225, 29, 72, 0.18),
    0 8px 22px rgba(225, 29, 72, 0.12);
  transform: translateY(-1.5px);
}

/* Contenedor secundario: tinte rosado cuando hay cancelar */
.module-panel-actions--footer .module-panel-actions__group--secondary:has(.module-panel-btn--cancel) {
  background: color-mix(in srgb, #fff5f6 70%, rgba(241, 245, 249, 0.85));
  border-color: color-mix(in srgb, #fda4af 26%, rgba(148, 163, 184, 0.16));
}

/* ── 2. Botón GUARDAR: más prominente ───────────────────────────────────── */
.module-panel-actions--footer .module-panel-actions__group--primary > .btn-primary {
  background: linear-gradient(180deg, #4293de 0%, #2872c0 46%, #1d5ea8 100%) !important;
  border-color: rgba(18, 68, 138, 0.42) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  font-weight: 700 !important;
  letter-spacing: 0.025em !important;
  text-shadow: 0 1px 2px rgba(7, 30, 61, 0.42), 0 0 1px rgba(7, 30, 61, 0.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 14px rgba(var(--primary-rgb), 0.34),
    0 10px 30px rgba(var(--primary-rgb), 0.22) !important;
}

.module-panel-actions--footer .module-panel-actions__group--primary > .btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #54a2e8 0%, #3882d0 46%, #2870b8 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 6px 18px rgba(var(--primary-rgb), 0.4),
    0 16px 36px rgba(var(--primary-rgb), 0.28) !important;
  transform: translateY(-2px) !important;
}

/* Barra de acciones en modales — interfaz unificada (Cancelar | Guardar) */
.module-panel-actions--footer.modal-edit-actions {
  grid-column: 1 / -1;
  margin-top: 1rem !important;
}

#crud-modal .module-panel-actions--footer.modal-edit-actions,
.modal-card-edit .module-panel-actions--footer.modal-edit-actions {
  margin-inline: calc(-1 * var(--modal-card-pad-x, 1.4rem));
  margin-bottom: 0;
  width: calc(100% + (2 * var(--modal-card-pad-x, 1.4rem)));
  max-width: none;
  box-sizing: border-box;
  overflow: visible;
  position: sticky;
  bottom: 0;
  z-index: 4;
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.report-preview-actions.module-panel-actions--footer.modal-edit-actions {
  margin-top: 0.65rem !important;
  margin-inline: calc(-1 * var(--modal-card-pad-x, 1.2rem));
  margin-bottom: 0;
  width: calc(100% + (2 * var(--modal-card-pad-x, 1.2rem)));
  overflow: visible;
}

.module-panel-actions--footer.modal-edit-actions .module-panel-actions__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 0;
  padding: 0.9rem var(--modal-card-pad-x, 1.4rem)
    max(1.05rem, calc(0.9rem + env(safe-area-inset-bottom, 0px)));
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 -6px 16px rgba(15, 23, 42, 0.06);
  overflow: visible;
  min-width: 0;
}

.modal-info-layout > .module-panel-actions--footer.modal-edit-actions .module-panel-actions__bar,
.detail-view-footer .module-panel-actions__bar {
  overflow: visible;
  flex-wrap: wrap;
  padding: 0.9rem var(--modal-card-pad-x, 1.4rem)
    max(1.05rem, calc(0.9rem + env(safe-area-inset-bottom, 0px)));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 -6px 16px rgba(15, 23, 42, 0.06);
}

.report-preview-actions.module-panel-actions--footer.modal-edit-actions .module-panel-actions__bar {
  padding: 0.85rem 1.2rem 1rem;
  border-radius: 0 0 24px 24px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--secondary,
.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--secondary:has(.module-panel-btn--cancel) {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary {
  position: relative;
  flex: 0 0 auto;
  margin-inline-start: auto;
  padding-inline-start: 1rem;
}

.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 1.85rem;
  background: rgba(148, 163, 184, 0.32);
}

/* Cancelar — blanco, borde con tinte rojo suave e icono en chip */
.module-panel-actions--footer.modal-edit-actions .module-panel-btn--cancel {
  --mpa-btn-bg: #ffffff;
  --mpa-btn-edge: rgba(180, 35, 24, 0.22);
  --mpa-btn-icon-bg: rgba(220, 38, 38, 0.08);
  min-height: 2.7rem;
  min-width: 7rem;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(180, 35, 24, 0.22);
  background: #ffffff;
  color: #b42318;
  font-weight: 650;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 2px 6px rgba(15, 23, 42, 0.04);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.18s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.module-panel-actions--footer.modal-edit-actions .module-panel-btn--cancel:hover {
  --mpa-btn-bg: #fff5f5;
  --mpa-btn-edge: rgba(220, 38, 38, 0.42);
  --mpa-btn-icon-bg: rgba(220, 38, 38, 0.15);
  background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
  color: #991b1b;
  border-color: rgba(220, 38, 38, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 4px 14px rgba(220, 38, 38, 0.16);
  transform: translateY(-1px);
}

.module-panel-actions--footer.modal-edit-actions .module-panel-btn--cancel:active {
  transform: translateY(0) scale(0.985);
}

.module-panel-actions--footer.modal-edit-actions .module-panel-btn--cancel .btn-icon {
  width: 15px;
  height: 15px;
  padding: 0.3rem;
  box-sizing: content-box;
  border-radius: 8px;
  background: var(--mpa-btn-icon-bg) !important;
  color: #b42318;
  stroke: currentColor;
  box-shadow: none;
  transition: background 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.module-panel-actions--footer.modal-edit-actions .module-panel-btn--cancel:hover .btn-icon {
  transform: rotate(-32deg);
}

.module-panel-actions--footer.modal-edit-actions .module-panel-btn--cancel .module-panel-btn__inner {
  gap: 0.55rem;
}

/* Guardar — azul con degradado, icono en chip translúcido */
.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn-primary,
.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  min-width: 8.5rem;
  max-width: 100%;
  padding: 0.6rem 1.45rem;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 168, 0.5) !important;
  background: linear-gradient(180deg, #4a98e4 0%, #3186d4 50%, #2364b4 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-shadow: 0 1px 1px rgba(7, 30, 61, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 2px 6px rgba(37, 105, 184, 0.28),
    0 6px 18px rgba(37, 105, 184, 0.22);
  transition:
    transform 0.18s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.22s ease,
    filter 0.2s ease;
  transform: none;
  overflow: visible;
  flex-shrink: 0;
}

.module-panel-actions--footer.modal-edit-actions .module-panel-btn--cancel {
  overflow: visible;
  flex-shrink: 0;
  max-width: 100%;
}

.module-panel-actions--footer.modal-edit-actions .module-panel-btn__inner {
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 0.2rem;
}

.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn-primary .module-panel-btn__label,
.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn-primary .module-panel-btn__inner {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  gap: 0.5rem;
}

.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn-primary .btn-icon {
  width: 15px;
  height: 15px;
  padding: 0.3rem;
  box-sizing: content-box;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  stroke: currentColor;
  filter: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn-primary:hover:not(:disabled) .btn-icon {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.06);
}

.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn-primary::after {
  display: none;
}

.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #5aa3e8 0%, #3b8fd8 52%, #2a75c4 100%) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 4px 10px rgba(37, 105, 184, 0.3),
    0 12px 28px rgba(37, 105, 184, 0.3);
  transform: translateY(-2px) !important;
}

.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.985) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 2px 6px rgba(37, 105, 184, 0.24);
}

@media (max-width: 560px) {
  #crud-modal .module-panel-actions--footer.modal-edit-actions .module-panel-actions__bar,
  .modal-card-edit .module-panel-actions--footer.modal-edit-actions .module-panel-actions__bar,
  .detail-view-footer .module-panel-actions__bar,
  .report-preview-actions.module-panel-actions--footer.modal-edit-actions .module-panel-actions__bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.8rem 1rem max(0.95rem, calc(0.8rem + env(safe-area-inset-bottom, 0px)));
  }

  .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary::before {
    display: none;
  }

  .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary {
    padding-inline-start: 0;
  }

  #crud-modal .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary,
  #crud-modal .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--secondary,
  .modal-card-edit .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary,
  .modal-card-edit .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--secondary,
  .detail-view-footer .module-panel-actions__group--primary,
  .detail-view-footer .module-panel-actions__group--secondary,
  .report-preview-actions.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary,
  .report-preview-actions.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--secondary {
    width: 100%;
    margin-inline-start: 0;
    justify-content: stretch;
  }

  #crud-modal .module-panel-actions--footer.modal-edit-actions .module-panel-btn--cancel,
  #crud-modal .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn-primary,
  #crud-modal .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn,
  .modal-card-edit .module-panel-actions--footer.modal-edit-actions .module-panel-btn--cancel,
  .modal-card-edit .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn-primary,
  .modal-card-edit .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn,
  .detail-view-footer .btn,
  .detail-view-footer .module-panel-btn,
  .detail-view-footer .detail-view-close-btn,
  .report-preview-actions.module-panel-actions--footer.modal-edit-actions .btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
}

/* Dark theme – cancelar */
body[data-theme="dark"] .module-panel-actions--footer .module-panel-btn--cancel {
  --mpa-btn-bg: linear-gradient(180deg, rgba(136, 19, 55, 0.42) 0%, rgba(127, 15, 50, 0.34) 100%);
  --mpa-btn-edge: rgba(251, 113, 133, 0.32);
  --mpa-btn-icon-bg: color-mix(in srgb, #f43f5e 18%, #1e293b);
  color: #fda4af;
}
body[data-theme="dark"] .module-panel-actions--footer .module-panel-btn--cancel:hover {
  --mpa-btn-bg: linear-gradient(180deg, rgba(159, 18, 57, 0.52) 0%, rgba(136, 15, 45, 0.46) 100%);
  --mpa-btn-edge: rgba(251, 113, 133, 0.46);
  color: #fecdd3;
}
body[data-theme="dark"] .module-panel-actions--footer .module-panel-actions__group--secondary:has(.module-panel-btn--cancel) {
  background: color-mix(in srgb, rgba(136, 19, 55, 0.22) 70%, rgba(15, 23, 42, 0.85));
  border-color: rgba(251, 113, 133, 0.2);
}
body[data-theme="dark"] .module-panel-actions--footer.modal-edit-actions .module-panel-actions__bar {
  border-top-color: rgba(148, 196, 255, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.55) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary::before {
  background: rgba(148, 196, 255, 0.16);
}

body[data-theme="dark"] .module-panel-actions--footer.modal-edit-actions .module-panel-btn--cancel {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(148, 196, 255, 0.16);
  color: #fca5a5;
}

body[data-theme="dark"] .module-panel-actions--footer.modal-edit-actions .module-panel-btn--cancel .btn-icon {
  color: #fca5a5;
}

body[data-theme="dark"] .module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary > .btn-primary {
  border-color: rgba(96, 165, 250, 0.38) !important;
}

/* ── 3. Vista detalle VIAJE y SOLICITUD: tiles de información ────────────── */

/* Sección informativa del modal: espaciado y estructura */
.modal-info-body {
  padding: 0.2rem 0 0.4rem;
}

/* Ítems del dash-grid dentro de modales de info → tiles visuales */
.modal-info-body .dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (max-width: 640px) {
  .modal-info-body .dash-grid {
    grid-template-columns: 1fr;
  }
}

.modal-info-body .dash-grid > div,
.modal-info-body .dash-grid > p {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.05);
  line-height: 1.55;
  font-size: 0.9rem;
}

.modal-info-body .dash-grid > div strong,
.modal-info-body .dash-grid > p strong {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  margin-bottom: 0.2rem;
}

.modal-info-body .dash-grid > div.full {
  grid-column: 1 / -1;
}

/* Cabeceras de sección dentro del modal de detalle */
.solicitud-detail-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--primary-deeper, #1e4a73);
}

.solicitud-detail-heading::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.1em;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  flex-shrink: 0;
}

/* Resumen del viaje asignado dentro de solicitud */
.solicitud-trip-summary {
  padding: 0.9rem 1.05rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.07), rgba(var(--brand-blue-soft-rgb), 0.22));
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.08);
}

.solicitud-trip-summary-actions {
  margin-top: 0.55rem;
  padding-top: 0.7rem;
  border-top: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
}

/* dash-grid en la sección detalle de solicitud: gap específico */
.solicitud-detail-section .dash-grid {
  gap: 0.6rem 0.9rem;
}

/* Dark – tiles de información */
body[data-theme="dark"] .modal-info-body .dash-grid > div,
body[data-theme="dark"] .modal-info-body .dash-grid > p {
  background: linear-gradient(180deg, rgba(20, 37, 59, 0.85) 0%, rgba(12, 27, 44, 0.9) 100%);
  border-color: rgba(148, 196, 255, 0.18);
  box-shadow: 0 2px 8px rgba(2, 8, 20, 0.22);
  color: #e2eaf6;
}
body[data-theme="dark"] .modal-info-body .dash-grid > div strong,
body[data-theme="dark"] .modal-info-body .dash-grid > p strong {
  color: #83bee9;
}
body[data-theme="dark"] .solicitud-detail-heading {
  color: #b8d9f5;
  border-bottom-color: rgba(131, 190, 233, 0.28);
}
body[data-theme="dark"] .solicitud-trip-summary {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18), rgba(15, 28, 46, 0.72));
  border-color: rgba(131, 190, 233, 0.22);
}

/* ── 4. Modal REPORTES: vista previa clara (cabecera, tabla y acciones) ─── */

.report-preview-actions.module-panel-actions--footer.modal-edit-actions .module-panel-actions__bar {
  justify-content: space-between;
  flex-wrap: wrap;
  overflow: visible;
  padding: 0.9rem 1.2rem max(1.05rem, calc(0.9rem + env(safe-area-inset-bottom, 0px)));
}

.report-preview-actions.module-panel-actions--footer.modal-edit-actions .btn,
.report-preview-actions.module-panel-actions--footer.modal-edit-actions .module-panel-btn,
.report-preview-actions.module-panel-actions--footer.modal-edit-actions .module-panel-btn__label {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  max-width: 100%;
}

.report-preview-actions.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--secondary,
.report-preview-actions.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary {
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.report-preview-actions.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary::before {
  display: none;
}

.report-preview-actions.module-panel-actions--footer.modal-edit-actions .module-panel-actions__group--primary {
  padding-inline-start: 0;
}

.report-preview-actions.module-panel-actions--footer.modal-edit-actions .report-preview-close-primary {
  gap: 0.45rem;
}

.report-preview-actions.module-panel-actions--footer.modal-edit-actions .report-preview-close-primary .btn-icon {
  width: 0.95rem;
  height: 0.95rem;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  color: #ffffff !important;
  stroke: currentColor;
  filter: none;
  box-shadow: none;
}

.report-preview-actions.module-panel-actions--footer.modal-edit-actions .report-preview-close-primary:hover:not(:disabled) .btn-icon {
  color: #ffffff !important;
}

/* ── Ficha «Ver detalle» unificada (grid icono + etiqueta + valor) ─────────── */

.modal-card-edit.modal-card-edit--wide-info.modal-card--detail-view,
.modal-card-edit.modal-card--detail-view {
  width: min(920px, calc(100vw - 1.25rem));
  border-radius: 22px;
}

.modal-info-body--detail-view {
  padding: 0;
}

.modal-info-layout--headless {
  padding-top: 0.15rem;
}

.modal-info-layout--headless .modal-head--sr-only {
  position: absolute;
  top: max(0.35rem, env(safe-area-inset-top, 0px));
  right: max(0.35rem, env(safe-area-inset-right, 0px));
  z-index: 8;
  margin: 0;
  width: auto;
  min-height: 0;
  pointer-events: none;
}

.modal-info-layout--headless .modal-head--sr-only .module-panel-btn--close {
  pointer-events: auto;
}

.modal-info-layout--headless .modal-head--sr-only .modal-head__copy {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.modal-info-layout--headless .modal-head--sr-only .module-panel-btn--close {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #94a3b8);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.detail-view-sheet {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-view-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding: 0.15rem 2.4rem 0.35rem 0;
}

.detail-view-sheet__brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.detail-view-sheet__module-icon {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.detail-view-sheet__module-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.detail-view-sheet__module-icon--blue {
  background: linear-gradient(145deg, #e8f2fc, #d7e9fb);
  color: #1d5fa8;
}

.detail-view-sheet__module-icon--green {
  background: linear-gradient(145deg, #e7f8ef, #d4f1e2);
  color: #15803d;
}

.detail-view-sheet__module-icon--orange {
  background: linear-gradient(145deg, #fff3e8, #ffe6cf);
  color: #c2410c;
}

.detail-view-sheet__module-icon--purple {
  background: linear-gradient(145deg, #f1ecff, #e4dbff);
  color: #6d28d9;
}

.detail-view-sheet__module-icon--teal {
  background: linear-gradient(145deg, #e6fbf8, #d2f5ef);
  color: #0f766e;
}

.detail-view-sheet__module-icon--rose {
  background: linear-gradient(145deg, #ffe9ef, #ffd7e3);
  color: #be123c;
}

.detail-view-sheet__titles {
  min-width: 0;
}

.detail-view-sheet__title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--primary-deeper, #123f6d);
  line-height: 1.2;
}

.detail-view-sheet__subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.28rem 0 0;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.detail-view-sheet__subtitle svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--primary);
}

.detail-view-sheet__status {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.detail-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.detail-view-card {
  display: flex;
  align-items: flex-start;
  gap: 0.72rem;
  padding: 0.82rem 0.9rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.07), rgba(var(--brand-blue-soft-rgb, 99, 167, 247), 0.18));
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.08);
  min-width: 0;
}

.detail-view-card--full {
  grid-column: 1 / -1;
}

.detail-view-card__icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-view-card__icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.detail-view-card--blue .detail-view-card__icon {
  background: #e8f2fc;
  color: #1d5fa8;
}

.detail-view-card--green .detail-view-card__icon,
.detail-view-card--highlight.detail-view-card--green .detail-view-card__icon {
  background: #e7f8ef;
  color: #15803d;
}

.detail-view-card--orange .detail-view-card__icon {
  background: #fff3e8;
  color: #c2410c;
}

.detail-view-card--purple .detail-view-card__icon {
  background: #f1ecff;
  color: #6d28d9;
}

.detail-view-card--teal .detail-view-card__icon {
  background: #e6fbf8;
  color: #0f766e;
}

.detail-view-card--rose .detail-view-card__icon {
  background: #ffe9ef;
  color: #be123c;
}

.detail-view-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  min-width: 0;
}

.detail-view-card__label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #7b93ad;
}

.detail-view-card__value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-deeper, #123f6d);
  line-height: 1.4;
  word-break: break-word;
}

.detail-view-card__value strong {
  color: var(--primary-deeper, #123f6d);
}

.detail-view-card__sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-soft);
  line-height: 1.35;
}

.detail-view-card--highlight .detail-view-card__value,
.detail-view-card__value .detail-view-money {
  color: #15803d;
}

.detail-view-notes {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--primary) 18%, var(--line));
  background: color-mix(in srgb, var(--primary) 4%, #fff);
}

.detail-view-notes__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
}

.detail-view-notes__body .detail-note {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.detail-view-inline-action {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  margin-top: -0.15rem;
}

.detail-view-footer .module-panel-actions__bar {
  justify-content: flex-start;
  gap: 0.65rem 0.85rem;
  border-radius: 0 0 22px 22px;
}

.detail-view-footer .module-panel-actions__group--secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 100%;
}

.detail-view-footer .module-panel-actions__group--primary {
  margin-inline-start: auto;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.detail-view-footer .btn,
.detail-view-footer .module-panel-btn,
.detail-view-footer .detail-view-close-btn,
.detail-view-footer .module-panel-btn__label {
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  overflow: visible;
  text-overflow: unset;
  max-width: 100%;
}

.detail-view-footer .module-panel-btn__inner {
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 0.2rem;
}

.detail-view-footer .detail-view-close-btn {
  min-height: 2.65rem;
  min-width: 7rem;
  max-width: 100%;
  padding: 0.58rem 1.05rem;
  border-color: color-mix(in srgb, var(--line) 75%, #94a3b8);
  color: #475569;
  background: #fff;
  overflow: visible;
  flex-shrink: 0;
}

.detail-view-footer .detail-view-close-btn:hover:not(:disabled) {
  border-color: #94a3b8;
  background: #f8fafc;
}

@media (max-width: 720px) {
  .detail-view-grid {
    grid-template-columns: 1fr;
  }

  .detail-view-sheet__head {
    flex-direction: column;
    padding-right: 2.75rem;
  }
}

body[data-theme="dark"] .detail-view-card {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18), rgba(15, 28, 46, 0.72));
  border-color: rgba(131, 190, 233, 0.22);
}

body[data-theme="dark"] .detail-view-card__label {
  color: #8fb4d8;
}

body[data-theme="dark"] .detail-view-card__value {
  color: #e8f2ff;
}

body[data-theme="dark"] .detail-view-card__value strong {
  color: #dbeafe;
}

body[data-theme="dark"] .detail-view-sheet__title {
  color: #dbeafe;
}

body[data-theme="dark"] .detail-view-sheet__module-icon--blue {
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.5));
  color: #93c5fd;
}

body[data-theme="dark"] .modal-info-layout--headless .modal-head--sr-only .module-panel-btn--close {
  background: rgba(15, 28, 46, 0.92);
  border-color: rgba(148, 196, 255, 0.2);
}

/* ===================================================================
   Realce UI · Editar y Visualizar (mejora global de módulos)
   Aplica a los modales compartidos detail-view-sheet (visualizar) y
   modal-edit-form (editar): solicitudes, viajes, flota, calendario,
   historial, reportería, gestión humana, contratación, SST, B2B,
   usuarios, autorizaciones, perfil, timbre, avisos y notificaciones.
   =================================================================== */

/* ── Visualizar: cabecera con separador y mejor jerarquía ── */
.detail-view-sheet__head {
  position: relative;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
}

.detail-view-sheet__title {
  font-size: 1.22rem;
}

.detail-view-sheet__subtitle {
  font-weight: 600;
}

/* ── Visualizar: tarjetas de campo con realce e interacción ── */
.detail-view-card {
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.detail-view-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.1);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
}

.detail-view-card__value {
  font-size: 0.94rem;
}

/* Campos destacados (valor, salario, tarifa, factura): realce verde sobre la base azul */
.detail-view-card--highlight {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #16a34a 14%, rgba(var(--primary-rgb), 0.07)),
    color-mix(in srgb, #16a34a 8%, rgba(var(--brand-blue-soft-rgb, 99, 167, 247), 0.18))
  );
  border-color: color-mix(in srgb, #16a34a 34%, var(--line));
}

.detail-view-card--highlight .detail-view-card__icon {
  background: #dcfce7;
  color: #15803d;
}

.detail-view-card--highlight .detail-view-card__value {
  font-size: 1rem;
  font-weight: 800;
}

/* ── Visualizar: pie de acciones más definido ── */
.detail-view-footer .module-panel-actions__bar {
  border-top: 1px solid color-mix(in srgb, var(--primary) 10%, var(--line));
  padding-block: 0.85rem;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--primary) 3%, transparent));
}

/* ── Editar: formulario más legible y consistente ── */
.modal-edit-form input:not([type="checkbox"]):not([type="radio"]),
.modal-edit-form select,
.modal-edit-form textarea {
  min-height: 2.45rem;
}

.modal-edit-form textarea {
  min-height: 4.6rem;
  line-height: 1.45;
}

/* Marca de campo obligatorio */
.modal-edit-form label.is-required > span:first-child::after,
.modal-edit-form label[data-required="true"] > span:first-child::after {
  content: "*";
  margin-inline-start: 0.2rem;
  color: #dc2626;
  font-weight: 800;
}

/* Sección de edición: cuerpo con respiro uniforme */
#crud-form.p-form-colored.modal-edit-form .form-section > .form-section-grid,
#crud-form.p-form-colored.modal-edit-form .form-section > .form-section-body {
  padding: 0.85rem 1rem 1rem;
}

/* ── Tema oscuro: paridad de los realces ── */
body[data-theme="dark"] .detail-view-sheet__head {
  border-bottom-color: rgba(148, 196, 255, 0.16);
}

body[data-theme="dark"] .detail-view-card:hover {
  border-color: rgba(148, 196, 255, 0.32);
  box-shadow: 0 8px 22px rgba(2, 8, 18, 0.4);
}

body[data-theme="dark"] .detail-view-card--highlight {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.22), rgba(var(--primary-rgb), 0.14));
  border-color: rgba(34, 197, 94, 0.34);
}

body[data-theme="dark"] .detail-view-card--highlight .detail-view-card__icon {
  background: rgba(34, 197, 94, 0.2);
  color: #6ee7b7;
}

body[data-theme="dark"] .detail-view-footer .module-panel-actions__bar {
  border-top-color: rgba(148, 196, 255, 0.16);
  background: linear-gradient(180deg, transparent, rgba(99, 167, 247, 0.06));
}

/* ═══════════════════════════════════════════════════════════════════
   Auth modal — refresco visual (login / registro / recuperar)
   Solo presentación; no altera nombres, ids ni estructura de campos.
   ═══════════════════════════════════════════════════════════════════ */

/* Tarjeta del modal: borde y sombra más premium + acento superior */
#auth-modal .modal-card-auth {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
  box-shadow:
    0 24px 60px rgba(7, 30, 61, 0.22),
    0 2px 8px rgba(7, 30, 61, 0.08);
}

#auth-modal .modal-card-auth::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #1d4f86 0%, #377cc0 35%, #7db4e8 70%, #c4e0fa 100%);
  pointer-events: none;
}

/* Inputs: anillo de foco sobre toda la fila (look más moderno) */
#auth-modal .auth-input-row {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

#auth-modal .auth-input-row:hover {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
}

#auth-modal .auth-input-row:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.16);
}

/* Evita el doble borde: el control no repinta su anillo si la fila ya lo hace */
#auth-modal .auth-input-row .auth-input-control:focus {
  box-shadow: none;
}

/* Toggle de contraseña: compacto e inline incluso en móvil */
#auth-modal .auth-password-row {
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.4rem;
}

#auth-modal .auth-password-row .auth-input-row {
  flex: 1 1 auto;
  min-width: 0;
}

#auth-modal .auth-password-row .btn {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
}

/* CTA principal: degradado y micro-interacción al pasar el cursor */
#auth-modal .btn-primary.full {
  background-image: linear-gradient(135deg, #4a8fd4 0%, var(--primary) 52%, var(--primary-dark) 100%);
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

#auth-modal .btn-primary.full:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(var(--primary-rgb), 0.28);
  filter: saturate(1.05);
}

#auth-modal .btn-primary.full:active {
  transform: translateY(0);
}

#auth-modal .modal-card-auth {
  width: min(900px, calc(100vw - 1.5rem));
  max-height: min(94vh, 820px);
}

#auth-modal .modal-head {
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

#auth-modal .auth-modal-title-wrap {
  gap: 0.45rem;
}

#auth-modal .auth-modal-brand-logo {
  height: clamp(54px, 8vw, 72px);
  max-width: min(270px, 72vw);
  margin-bottom: 0;
}

#auth-modal .tabs {
  margin: 0.95rem 0 1rem;
}

#auth-modal #form-login.auth-pane {
  position: relative;
  gap: 1rem;
  padding: clamp(1rem, 2.2vw, 1.35rem);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.98)),
    radial-gradient(circle at top right, rgba(var(--primary-rgb), 0.12), transparent 42%);
  box-shadow:
    0 18px 36px rgba(7, 30, 61, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

#auth-modal #form-login .auth-input-row {
  min-height: 3rem;
  border-radius: 14px;
}

#auth-modal #form-login .auth-input-prefix {
  min-width: 2.75rem;
}

#auth-modal #form-login .auth-submit-content {
  font-weight: 700;
}

#auth-modal .auth-login-side {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100%;
  border-radius: 22px;
  padding: 1.25rem;
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.64), transparent 24%),
    radial-gradient(circle at 72% 74%, rgba(196, 224, 250, 0.72), transparent 34%),
    linear-gradient(145deg, #eaf5ff 0%, #d9ebfb 45%, #f7fbff 100%);
  box-shadow:
    0 20px 42px rgba(var(--primary-rgb), 0.14),
    0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

#auth-modal .auth-login-side::before,
#auth-modal .auth-login-side::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

#auth-modal .auth-login-side::before {
  width: 12rem;
  height: 12rem;
  right: -4.5rem;
  top: -4.5rem;
  background: rgba(var(--primary-rgb), 0.16);
}

#auth-modal .auth-login-side::after {
  width: 9rem;
  height: 9rem;
  left: -3.4rem;
  bottom: -3.1rem;
  background: rgba(255, 255, 255, 0.72);
}

#auth-modal .auth-login-visual {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(17rem, 72%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
}

#auth-modal .auth-login-visual-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 60px rgba(var(--primary-rgb), 0.12);
}

#auth-modal .auth-login-visual-ring--middle {
  inset: 13%;
  background: rgba(255, 255, 255, 0.34);
}

#auth-modal .auth-login-visual-ring--inner {
  inset: 28%;
  background: rgba(255, 255, 255, 0.72);
}

#auth-modal .auth-login-visual-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #4a8fd4, var(--primary-dark));
  box-shadow: 0 18px 36px rgba(var(--primary-rgb), 0.28);
}

#auth-modal .auth-login-visual-icon svg {
  width: 2.2rem;
  height: 2.2rem;
}

@media (min-width: 901px) {
  #auth-modal .auth-login-shell {
    grid-template-columns: minmax(320px, 0.95fr) minmax(260px, 0.72fr);
    gap: 1.2rem;
    align-items: stretch;
  }

  #auth-modal .auth-login-shell > .auth-login-side {
    display: flex;
    min-height: 24rem;
  }
}

@media (max-width: 900px) {
  #auth-modal .modal-card-auth {
    width: min(560px, calc(100vw - 1rem));
  }

  #auth-modal .auth-login-side {
    min-height: 8rem;
    padding: 0.9rem;
  }

  #auth-modal .auth-login-visual {
    width: min(9rem, 48%);
  }
}

@media (max-width: 640px) {
  #auth-modal .modal-card-auth {
    max-height: min(96vh, 820px);
  }

  #auth-modal .auth-login-side {
    display: none;
  }
}

body[data-theme="dark"] #auth-modal .modal-card-auth {
  box-shadow:
    0 26px 60px rgba(2, 10, 20, 0.5),
    0 2px 8px rgba(2, 10, 20, 0.35);
}

body[data-theme="dark"] #auth-modal .modal-head {
  border-bottom-color: rgba(148, 196, 255, 0.16);
}

body[data-theme="dark"] #auth-modal #form-login.auth-pane {
  background:
    linear-gradient(180deg, rgba(18, 36, 58, 0.96), rgba(15, 31, 50, 0.98)),
    radial-gradient(circle at top right, rgba(117, 176, 244, 0.15), transparent 42%);
  box-shadow:
    0 20px 42px rgba(2, 10, 20, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

body[data-theme="dark"] #auth-modal .auth-login-side {
  border-color: rgba(148, 196, 255, 0.18);
  background:
    radial-gradient(circle at 24% 22%, rgba(148, 196, 255, 0.14), transparent 24%),
    radial-gradient(circle at 72% 74%, rgba(76, 137, 205, 0.2), transparent 34%),
    linear-gradient(145deg, #12243a 0%, #183451 48%, #0f1f34 100%);
  box-shadow:
    0 22px 48px rgba(2, 10, 20, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

body[data-theme="dark"] #auth-modal .auth-login-side::before {
  background: rgba(117, 176, 244, 0.14);
}

body[data-theme="dark"] #auth-modal .auth-login-side::after {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] #auth-modal .auth-login-visual-ring {
  border-color: rgba(148, 196, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 24px 60px rgba(2, 10, 20, 0.32);
}

body[data-theme="dark"] #auth-modal .auth-login-visual-ring--middle {
  background: rgba(117, 176, 244, 0.08);
}

body[data-theme="dark"] #auth-modal .auth-login-visual-ring--inner {
  background: rgba(18, 36, 58, 0.92);
}

body[data-theme="dark"] #auth-modal .auth-input-row:focus-within {
  border-color: #78abe8;
  box-shadow: 0 0 0 3px rgba(117, 176, 244, 0.24);
}

/* Login: formulario protagonista sin panel lateral decorativo. */
#auth-modal .auth-login-shell {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

#auth-modal .auth-login-shell > #form-login.auth-pane {
  width: 100%;
}

#auth-modal #form-login.auth-pane {
  padding: clamp(1.15rem, 3vw, 1.85rem);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  background:
    radial-gradient(circle at 10% 0%, rgba(var(--primary-mid-rgb), 0.22), transparent 34%),
    radial-gradient(circle at 92% 18%, rgba(var(--primary-rgb), 0.16), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, #f5fbff 58%, #eaf5ff 100%);
  box-shadow:
    0 24px 54px rgba(7, 30, 61, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

#auth-modal #form-login.auth-pane::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.18) 1px, transparent 1px),
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.12) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.16), transparent 58%);
}

#auth-modal #form-login.auth-pane > * {
  position: relative;
  z-index: 1;
}

#auth-modal #form-login .auth-input-row {
  background: rgba(255, 255, 255, 0.92);
  border-color: color-mix(in srgb, var(--primary) 16%, var(--line));
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.07);
}

@media (min-width: 901px) {
  #auth-modal .auth-login-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

body[data-theme="dark"] #auth-modal #form-login.auth-pane {
  border-color: rgba(148, 196, 255, 0.2);
  background:
    radial-gradient(circle at 10% 0%, rgba(117, 176, 244, 0.16), transparent 34%),
    radial-gradient(circle at 92% 18%, rgba(55, 124, 192, 0.22), transparent 30%),
    linear-gradient(145deg, rgba(18, 36, 58, 0.98) 0%, #102238 58%, #0d1b2d 100%);
}

body[data-theme="dark"] #auth-modal #form-login .auth-input-row {
  background: rgba(10, 24, 40, 0.72);
  border-color: rgba(148, 196, 255, 0.18);
  box-shadow: 0 14px 30px rgba(2, 10, 20, 0.22);
}

/* Login 360: experiencia visual más inmersiva, sin añadir textos. */
#auth-modal.modal {
  padding: clamp(0.75rem, 2.4vw, 1.6rem);
  background:
    radial-gradient(circle at 18% 12%, rgba(131, 190, 233, 0.34), transparent 28%),
    radial-gradient(circle at 82% 88%, rgba(55, 124, 192, 0.3), transparent 32%),
    linear-gradient(135deg, rgba(5, 22, 39, 0.78), rgba(8, 35, 62, 0.66));
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

#auth-modal .modal-card-auth {
  width: min(680px, calc(100vw - 1.25rem));
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(238, 248, 255, 0.9)),
    radial-gradient(circle at 18% 0%, rgba(var(--primary-mid-rgb), 0.32), transparent 36%);
  box-shadow:
    0 34px 90px rgba(3, 18, 35, 0.34),
    0 18px 45px rgba(var(--primary-rgb), 0.18),
    0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

#auth-modal .modal-card-auth::before {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.7), transparent 28%),
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.65), rgba(var(--primary-mid-rgb), 0.18), transparent 62%);
  opacity: 0.42;
  mask-image: linear-gradient(#000 0 5px, transparent 5px);
}

#auth-modal .modal-card-auth::after {
  content: "";
  position: absolute;
  right: -4.5rem;
  top: -5rem;
  width: 13rem;
  height: 13rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--primary-mid-rgb), 0.28), transparent 68%);
  pointer-events: none;
}

#auth-modal .modal-head,
#auth-modal .tabs,
#auth-modal #auth-content {
  position: relative;
  z-index: 1;
}

#auth-modal .auth-modal-brand-logo {
  display: none;
}

#auth-modal .modal-head {
  align-items: center;
  padding: 0.15rem 0 0.9rem;
  border-bottom: 0;
}

#auth-modal .auth-modal-heading {
  width: 100%;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(240, 248, 255, 0.54)),
    radial-gradient(circle at 0% 0%, rgba(var(--primary-rgb), 0.16), transparent 42%);
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  box-shadow: 0 14px 30px rgba(var(--primary-rgb), 0.1);
}

#auth-modal .auth-modal-heading-icon {
  width: 2.8rem !important;
  height: 2.8rem !important;
  padding: 0.68rem;
  border-radius: 18px;
  color: #ffffff !important;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  box-shadow:
    0 12px 28px rgba(var(--primary-rgb), 0.28),
    0 0 0 7px rgba(var(--primary-rgb), 0.08);
}

#auth-modal .module-panel-btn--close {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 10px 24px rgba(7, 30, 61, 0.1);
}

#auth-modal .tabs {
  margin: 0.15rem 0 1.05rem;
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  background: rgba(255, 255, 255, 0.66);
  box-shadow:
    0 16px 32px rgba(7, 30, 61, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.86) inset;
}

#auth-modal .tab {
  border-radius: 999px;
  border: 0;
  background: transparent;
  min-height: 2.65rem;
}

#auth-modal .tab.active {
  background:
    linear-gradient(135deg, var(--primary) 0%, #2f75b7 48%, var(--primary-dark) 100%);
  box-shadow:
    0 14px 28px rgba(var(--primary-rgb), 0.26),
    0 1px 0 rgba(255, 255, 255, 0.24) inset;
}

#auth-modal #auth-content {
  margin-top: 0;
  padding: 0;
}

#auth-modal #form-login.auth-pane {
  gap: 1.05rem;
  padding: clamp(1.15rem, 3.5vw, 2rem);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(242, 249, 255, 0.72)),
    radial-gradient(circle at 0% 0%, rgba(var(--primary-mid-rgb), 0.28), transparent 36%),
    radial-gradient(circle at 100% 100%, rgba(var(--primary-rgb), 0.18), transparent 38%);
  box-shadow:
    0 24px 58px rgba(7, 30, 61, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.94) inset;
  overflow: hidden;
}

#auth-modal #form-login.auth-pane::before {
  background:
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.16) 1px, transparent 1px),
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.1) 1px, transparent 1px),
    radial-gradient(circle at 85% 5%, rgba(255, 255, 255, 0.88), transparent 24%);
  background-size: 36px 36px, 36px 36px, auto;
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.2), transparent 62%);
}

#auth-modal #form-login .auth-field-stack {
  gap: 0.48rem;
  padding: 0.72rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(var(--primary-rgb), 0.08);
}

#auth-modal #form-login .auth-plain-label {
  padding-inline: 0.15rem;
  font-weight: 750;
  color: color-mix(in srgb, var(--text) 82%, var(--primary));
}

#auth-modal #form-login .auth-input-row {
  min-height: 3.45rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(var(--primary-rgb), 0.14);
  box-shadow:
    0 12px 26px rgba(var(--primary-rgb), 0.08),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

#auth-modal #form-login .auth-input-row:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 30px rgba(var(--primary-rgb), 0.12),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

#auth-modal #form-login .auth-input-row:focus-within {
  border-color: rgba(var(--primary-rgb), 0.52);
  box-shadow:
    0 0 0 4px rgba(var(--primary-rgb), 0.13),
    0 18px 34px rgba(var(--primary-rgb), 0.14);
}

#auth-modal #form-login .auth-input-prefix {
  min-width: 3.25rem;
  border-radius: 16px 0 0 16px;
  color: var(--primary);
  background:
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.12), rgba(var(--primary-mid-rgb), 0.12));
}

#auth-modal #form-login .auth-input-control {
  font-size: 0.98rem;
}

#auth-modal #form-login .auth-password-row .btn {
  min-height: 3.45rem;
  border-radius: 18px;
  padding-inline: 0.95rem;
  border-color: rgba(var(--primary-rgb), 0.14);
  background: rgba(255, 255, 255, 0.68);
}

#auth-modal #form-login .auth-remember-row {
  gap: 0.35rem;
  padding: 0.8rem 0.9rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(var(--primary-rgb), 0.1);
}

#auth-modal #form-login .auth-remember-check input {
  accent-color: var(--primary);
  width: 1.05rem;
  height: 1.05rem;
}

#auth-modal #form-login .cf-turnstile {
  overflow: hidden;
  border-radius: 18px;
}

#auth-modal #form-login .btn-primary.full {
  min-height: 3.55rem;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #59a5eb 0%, var(--primary) 46%, #1e4a73 100%);
  box-shadow:
    0 18px 34px rgba(var(--primary-rgb), 0.32),
    0 1px 0 rgba(255, 255, 255, 0.28) inset;
}

#auth-modal #form-login .btn-primary.full:hover {
  transform: translateY(-2px);
  box-shadow:
    0 24px 42px rgba(var(--primary-rgb), 0.38),
    0 1px 0 rgba(255, 255, 255, 0.3) inset;
}

@media (max-width: 720px) {
  #auth-modal.modal {
    padding: 0.55rem;
  }

  #auth-modal .modal-card-auth {
    border-radius: 24px;
    padding: 0.8rem;
  }

  #auth-modal .auth-modal-heading {
    padding: 0.72rem;
  }

  #auth-modal .auth-modal-heading-icon {
    width: 2.4rem !important;
    height: 2.4rem !important;
  }

  #auth-modal #form-login.auth-pane {
    border-radius: 22px;
    padding: 0.95rem;
  }

  #auth-modal #form-login .auth-field-stack {
    padding: 0.58rem;
  }
}

body[data-theme="dark"] #auth-modal.modal {
  background:
    radial-gradient(circle at 18% 12%, rgba(117, 176, 244, 0.22), transparent 28%),
    radial-gradient(circle at 82% 88%, rgba(55, 124, 192, 0.24), transparent 32%),
    linear-gradient(135deg, rgba(2, 8, 18, 0.88), rgba(5, 18, 32, 0.82));
}

body[data-theme="dark"] #auth-modal .modal-card-auth {
  border-color: rgba(148, 196, 255, 0.18);
  background:
    linear-gradient(145deg, rgba(17, 33, 53, 0.95), rgba(10, 23, 38, 0.92)),
    radial-gradient(circle at 18% 0%, rgba(117, 176, 244, 0.18), transparent 36%);
}

body[data-theme="dark"] #auth-modal .auth-modal-heading,
body[data-theme="dark"] #auth-modal .tabs,
body[data-theme="dark"] #auth-modal #form-login .auth-field-stack,
body[data-theme="dark"] #auth-modal #form-login .auth-remember-row {
  border-color: rgba(148, 196, 255, 0.14);
  background: rgba(12, 27, 44, 0.58);
}

body[data-theme="dark"] #auth-modal #form-login.auth-pane {
  border-color: rgba(148, 196, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(17, 34, 55, 0.92), rgba(9, 21, 36, 0.8)),
    radial-gradient(circle at 0% 0%, rgba(117, 176, 244, 0.16), transparent 36%),
    radial-gradient(circle at 100% 100%, rgba(55, 124, 192, 0.18), transparent 38%);
}

body[data-theme="dark"] #auth-modal #form-login .auth-plain-label {
  color: #e2efff;
}

body[data-theme="dark"] #auth-modal #form-login .auth-input-row {
  background: rgba(8, 20, 34, 0.84);
  border-color: rgba(148, 196, 255, 0.16);
  box-shadow: 0 14px 30px rgba(2, 10, 20, 0.26);
}

body[data-theme="dark"] #auth-modal #form-login .auth-input-prefix {
  color: #9ed0ff;
  background: rgba(117, 176, 244, 0.1);
  border-color: rgba(148, 196, 255, 0.16);
}

body[data-theme="dark"] #auth-modal #form-login .auth-password-row .btn,
body[data-theme="dark"] #auth-modal .module-panel-btn--close {
  background: rgba(15, 31, 50, 0.78);
  border-color: rgba(148, 196, 255, 0.16);
}

/* ════════════════════════════════════════════════════════════════════
   AUTH — rediseño inmersivo "cadena de frío Antares"
   Vidrio azul profundo, emblema flotante y transición de marca (ruta
   logística en movimiento). Texto siempre legible en cualquier tema.
   Solo presentación: no cambia nombres, ids ni estructura de campos.
   ════════════════════════════════════════════════════════════════════ */

@keyframes auth-overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes auth-form-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes auth-emblem-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
@keyframes auth-track-slide {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 60px 0, 0 0; }
}
@keyframes auth-aurora-pan {
  0%   { transform: translate3d(-4%, -2%, 0) rotate(0deg); }
  50%  { transform: translate3d(4%, 3%, 0) rotate(8deg); }
  100% { transform: translate3d(-4%, -2%, 0) rotate(0deg); }
}

/* Overlay: noche azul Antares con aurora difusa */
#auth-modal.modal {
  padding: clamp(0.85rem, 2.6vw, 1.8rem);
  background:
    radial-gradient(circle at 16% 14%, rgba(131, 190, 233, 0.30), transparent 30%),
    radial-gradient(circle at 84% 86%, rgba(45, 106, 168, 0.34), transparent 34%),
    linear-gradient(140deg, rgba(4, 18, 33, 0.86), rgba(7, 33, 60, 0.78));
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  animation: auth-overlay-in 0.4s ease both;
}

/* Tarjeta: vidrio profundo, borde luminoso, profundidad y entrada animada */
#auth-modal .modal-card-auth {
  position: relative;
  isolation: isolate;
  width: min(660px, calc(100vw - 1.25rem));
  padding: clamp(1.1rem, 2.8vw, 1.7rem) clamp(1.1rem, 3vw, 1.9rem) clamp(1.2rem, 3vw, 1.9rem);
  border-radius: 30px;
  border: 1px solid rgba(148, 196, 255, 0.28);
  background:
    linear-gradient(150deg, rgba(20, 44, 74, 0.92) 0%, rgba(11, 28, 50, 0.94) 55%, rgba(8, 21, 38, 0.96) 100%);
  box-shadow:
    0 40px 90px rgba(2, 12, 26, 0.55),
    0 12px 36px rgba(20, 70, 130, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
  color: #e8f2ff;
  overflow: hidden;
  animation: auth-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Cinta superior tipo "ruta logística" en movimiento continuo */
#auth-modal .modal-card-auth::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  border-radius: 30px 30px 0 0;
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.92) 0 18px,
      rgba(131, 190, 233, 0.55) 18px 30px,
      rgba(255, 255, 255, 0) 30px 60px),
    linear-gradient(90deg, #1d4f86, #377cc0, #83bee9);
  background-size: 60px 100%, 100% 100%;
  background-repeat: repeat-x, no-repeat;
  opacity: 0.92;
  mask-image: none;
  -webkit-mask-image: none;
  pointer-events: none;
  z-index: 2;
  animation: auth-track-slide 5.5s linear infinite;
}

/* Aurora interna en movimiento (transición de marca) */
#auth-modal .modal-card-auth::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -40%;
  right: auto;
  top: auto;
  width: auto;
  height: auto;
  border-radius: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(99, 167, 247, 0.24), transparent 45%),
    radial-gradient(circle at 70% 62%, rgba(131, 190, 233, 0.18), transparent 50%);
  filter: blur(10px);
  pointer-events: none;
  animation: auth-aurora-pan 18s ease-in-out infinite;
}

#auth-modal .modal-head,
#auth-modal .tabs,
#auth-modal #auth-content {
  position: relative;
  z-index: 1;
}

/* Logo plano fuera; emblema circular flotante (estilo avatar de referencia) */
#auth-modal .auth-modal-brand-logo { display: none; }

#auth-modal .modal-head {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: 0.7rem 0 1rem;
  border-bottom: 0;
}

#auth-modal .auth-modal-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

#auth-modal .auth-modal-heading {
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #eef6ff;
  font-size: clamp(1.02rem, 3vw, 1.22rem);
  text-shadow: 0 2px 12px rgba(2, 12, 26, 0.4);
}

#auth-modal .auth-modal-heading-text {
  color: #eef6ff;
  flex: 0 1 auto;
  text-align: center;
}

#auth-modal .auth-modal-heading-icon {
  width: 72px !important;
  height: 72px !important;
  padding: 18px;
  box-sizing: border-box;
  border-radius: 50%;
  color: #ffffff !important;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.4), transparent 46%),
    linear-gradient(150deg, #4a8fd4 0%, #377cc0 50%, #1e4a73 100%);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    0 18px 40px rgba(13, 55, 102, 0.55),
    0 0 0 10px rgba(131, 190, 233, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  animation: auth-emblem-float 5.5s ease-in-out infinite;
}

/* Cerrar: flotante, esquina superior derecha */
#auth-modal .modal-head .module-panel-btn--close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border-radius: 14px;
  color: #d6e8ff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 196, 255, 0.22);
  box-shadow: none;
}
#auth-modal .modal-head .module-panel-btn--close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Tabs: control segmentado tipo píldora, centrado */
#auth-modal .tabs {
  margin: 0.2rem auto 1.1rem;
  max-width: 420px;
  padding: 0.32rem;
  gap: 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 196, 255, 0.2);
  background: rgba(6, 20, 38, 0.55);
  box-shadow:
    0 10px 26px rgba(2, 12, 26, 0.4) inset,
    0 1px 0 rgba(255, 255, 255, 0.06);
}
#auth-modal .tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(214, 232, 255, 0.72);
  min-height: 2.5rem;
}
#auth-modal .tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
  transform: none;
}
#auth-modal .tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, #4a8fd4 0%, #377cc0 50%, #1e4a73 100%);
  border-color: transparent;
  box-shadow:
    0 12px 24px rgba(13, 55, 102, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.28) inset;
}

#auth-modal #auth-content {
  margin-top: 0;
  padding: 0 0.1rem;
}
#auth-modal #auth-content > form,
#auth-modal #auth-content > .auth-header-premium,
#auth-modal #auth-content > .auth-register-success-banner {
  animation: auth-form-in 0.45s ease both;
}

/* Paneles de formulario: vidrio translúcido sobre la tarjeta */
#auth-modal .auth-pane,
#auth-modal #form-login.auth-pane {
  border: 1px solid rgba(148, 196, 255, 0.18);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow:
    0 18px 40px rgba(2, 12, 26, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
}
#auth-modal #form-login.auth-pane {
  padding: clamp(1.2rem, 3.4vw, 1.9rem);
  gap: 1rem;
}

/* Encabezados internos (registro / recuperar) */
#auth-modal .auth-header-premium h3 { color: #eaf3ff; }
#auth-modal .auth-header-premium .muted { color: rgba(206, 226, 248, 0.74); }

/* ── Texto siempre legible (claro) ── */
#auth-modal,
#auth-modal label,
#auth-modal .field-label,
#auth-modal .auth-plain-label,
#auth-modal #form-login .auth-plain-label,
#auth-modal .register-kind-label,
#auth-modal .register-terms-title,
#auth-modal .auth-modal-heading {
  color: #e3eefc;
}
#auth-modal .muted,
#auth-modal small.muted,
#auth-modal .register-kind-hint,
#auth-modal .register-doc-empresa-note,
#auth-modal .register-terms-copy,
#auth-modal .password-policy-hint,
#auth-modal .register-password-match-hint,
#auth-modal .phone-field-hint,
#auth-modal .auth-remember-hint {
  color: rgba(202, 223, 247, 0.72);
}
#auth-modal a { color: #9ed0ff; }
#auth-modal strong { color: #f0f7ff; }

/* ── Controles de entrada ── */
#auth-modal input:not([type="checkbox"]):not([type="radio"]):not(.auth-input-control),
#auth-modal select,
#auth-modal textarea {
  color: #eaf3ff;
  background: rgba(8, 22, 40, 0.62);
  border: 1px solid rgba(148, 196, 255, 0.22);
}
#auth-modal input:not([type="checkbox"]):not([type="radio"])::placeholder {
  color: rgba(200, 220, 245, 0.5);
}
#auth-modal select option { color: #0b2138; background: #eaf3ff; }
#auth-modal input:not([type="checkbox"]):not([type="radio"]):focus,
#auth-modal select:focus,
#auth-modal textarea:focus {
  border-color: rgba(131, 190, 233, 0.85);
  box-shadow: 0 0 0 3px rgba(131, 190, 233, 0.2);
}

/* Campos sin caja interna (look más limpio) */
#auth-modal .auth-field-stack,
#auth-modal #form-login .auth-field-stack {
  padding: 0;
  border: 0;
  background: transparent;
  gap: 0.45rem;
}

/* Filas con icono (login / recuperar / asignar contraseña) */
#auth-modal .auth-input-row,
#auth-modal #form-login .auth-input-row {
  min-height: 3.4rem;
  border-radius: 16px;
  background: rgba(8, 22, 40, 0.6);
  border: 1px solid rgba(148, 196, 255, 0.22);
  box-shadow: none;
}
#auth-modal .auth-input-row:hover,
#auth-modal #form-login .auth-input-row:hover {
  border-color: rgba(131, 190, 233, 0.5);
  transform: none;
  box-shadow: none;
}
#auth-modal .auth-input-row:focus-within,
#auth-modal #form-login .auth-input-row:focus-within {
  border-color: rgba(131, 190, 233, 0.85);
  box-shadow: 0 0 0 4px rgba(131, 190, 233, 0.18);
}
#auth-modal .auth-input-row .auth-input-control {
  background: transparent;
  border: 0;
  color: #eaf3ff;
}
#auth-modal .auth-input-prefix,
#auth-modal #form-login .auth-input-prefix {
  min-width: 3.1rem;
  border-radius: 16px 0 0 16px;
  color: #9ed0ff;
  background: linear-gradient(180deg, rgba(131, 190, 233, 0.18), rgba(55, 124, 192, 0.14));
  border-right: 1px solid rgba(148, 196, 255, 0.18);
}

/* Botón Mostrar/Ocultar contraseña */
#auth-modal .auth-password-row .btn,
#auth-modal .password-field .btn,
#auth-modal #form-login .auth-password-row .btn {
  color: #d6e8ff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 196, 255, 0.22);
}
#auth-modal .auth-password-row .btn:hover,
#auth-modal .password-field .btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Recordar credenciales */
#auth-modal .auth-remember-row,
#auth-modal #form-login .auth-remember-row {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 196, 255, 0.16);
}
#auth-modal .auth-remember-check span { color: #e3eefc; }
#auth-modal input[type="checkbox"],
#auth-modal input[type="radio"] { accent-color: #4a8fd4; }

/* Registro: bloques internos translúcidos */
#auth-modal .register-kind-options { gap: 0.6rem; }
#auth-modal .register-kind-option {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 196, 255, 0.2);
  color: #e3eefc;
  border-radius: 12px;
}
#auth-modal .register-kind-option:hover { border-color: rgba(131, 190, 233, 0.5); }
#auth-modal .register-terms-card,
#auth-modal .auth-inline-note,
#auth-modal .password-strength-suite,
#auth-modal .auth-recover-hint {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 196, 255, 0.16);
  border-radius: 16px;
}
#auth-modal .password-strength-headline { color: #eaf3ff; }
#auth-modal .password-rule-grid li { color: rgba(206, 226, 248, 0.78); }
#auth-modal .auth-recover-hint-title { color: #eaf3ff; }
#auth-modal .auth-recover-hint-text { color: rgba(206, 226, 248, 0.74); }
#auth-modal .auth-recover-hint-icon { color: #9ed0ff; }

/* Teléfono (registro) */
#auth-modal .phone-input-professional {
  background: rgba(8, 22, 40, 0.6);
  border: 1px solid rgba(148, 196, 255, 0.22);
}
#auth-modal .phone-cc-select,
#auth-modal .phone-national-input {
  background: transparent;
  color: #eaf3ff;
  border: 0;
}

/* Banner de éxito de registro mantiene su tarjeta clara legible */
#auth-modal .auth-register-success-banner,
#auth-modal .auth-register-success-title,
#auth-modal .auth-register-success-body { color: #0f3d28; }

/* CTA principal */
#auth-modal .btn-primary.full,
#auth-modal #form-login .btn-primary.full {
  min-height: 3.45rem;
  border-radius: 16px;
  color: #ffffff;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #59a5eb 0%, #377cc0 46%, #1e4a73 100%);
  box-shadow:
    0 18px 34px rgba(13, 55, 102, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.28) inset;
}
#auth-modal .btn-primary.full:hover,
#auth-modal #form-login .btn-primary.full:hover {
  transform: translateY(-2px);
  box-shadow:
    0 24px 44px rgba(13, 55, 102, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.3) inset;
}

#auth-modal .cf-turnstile { border-radius: 14px; overflow: hidden; }

@media (max-width: 720px) {
  #auth-modal.modal { padding: 0.6rem; }
  #auth-modal .modal-card-auth { border-radius: 22px; padding: 1rem 0.9rem 1.1rem; }
  #auth-modal .auth-modal-heading-icon {
    width: 60px !important;
    height: 60px !important;
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #auth-modal.modal,
  #auth-modal .modal-card-auth,
  #auth-modal #auth-content > form,
  #auth-modal #auth-content > .auth-header-premium,
  #auth-modal .auth-modal-heading-icon,
  #auth-modal .modal-card-auth::before,
  #auth-modal .modal-card-auth::after {
    animation: none !important;
  }
}
