:root {
  --bg-scaffold: #f3ebe6;
  --primary-teal: #25666a;
  --primary-teal-hover: #1f5659;
  --primary-teal-light: rgba(37, 102, 106, 0.1);
  --text-slate: #2c3e40;
  --card-white: #ffffff;
  --border-subtle: #e0e0e0;
  --drawer-bg: #2c3e40;
  --drawer-selected: #1b6a6b;
  --delete-red: #c05448;
  --text-muted: #7a8a8e;
  --surface-muted: #e8ecec;
  --light-teal: rgba(37, 102, 106, 0.08);
  --scrollbar-track: transparent;
  --scrollbar-thumb: #4d7f82;
  --scrollbar-thumb-hover: #25666a;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.06);

  --badge-ring: var(--card-white);
  --badge-bg: linear-gradient(155deg, #eb6f62 0%, #c05448 55%, #a8463c 100%);
  --badge-shadow:
    0 0 0 2px var(--badge-ring),
    0 1px 3px rgba(28, 18, 16, 0.16),
    0 4px 10px rgba(192, 84, 72, 0.32);

  --font-family: "Inter", system-ui, -apple-system, sans-serif;
}

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

@supports (-moz-appearance: none) {
  * {
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    scrollbar-width: thin;
  }
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  margin-block: 6px;
}

*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

*::-webkit-scrollbar-thumb {
  min-height: 40px;
  background: linear-gradient(180deg, #6f9da0 0%, var(--scrollbar-thumb) 100%);
  background-clip: padding-box;
  border: 3px solid transparent;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(25, 78, 81, 0.12);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  background-clip: padding-box;
  border-width: 2px;
}

*::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-scaffold);
  color: var(--text-slate);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--text-slate);
}

a {
  text-decoration: none;
  color: var(--primary-teal);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-teal-hover);
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.module-card {
  position: relative;
  background-color: var(--card-white);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 24px 28px 24px 24px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: visible;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
  box-shadow: var(--badge-shadow);
  pointer-events: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.module-badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(32%, -32%);
  z-index: 3;
  display: none;
  min-width: 1.375rem;
  height: 1.375rem;
  padding: 0 0.42rem;
  font-size: 0.75rem;
}

.module-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 102, 106, 0.3);
}

.module-icon-container {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #eef7f8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.module-card:hover .module-icon-container {
  background-color: rgba(37, 102, 106, 0.15);
  transform: scale(1.05);
}

.module-icon {
  font-size: 1.75rem;
  color: var(--primary-teal);
  margin-bottom: 0;
}

.module-card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-right: 12px;
}

.module-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-slate);
  margin-bottom: 4px;
  text-align: left;
}

.module-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0;
  text-align: left;
}

.module-card-arrow {
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 1.15rem;
  color: var(--primary-teal);
  opacity: 0.6;
  transition: all 0.25s ease;
}

.module-card:hover .module-card-arrow {
  opacity: 1;
  transform: translateX(4px);
}

.welcome-header {
  margin-bottom: 2rem;
}

.welcome-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-slate);
}

.welcome-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Choices.js global — formularios y filtros */
.app-choices--default,
.app-choices--form {
  width: 100%;
  margin-bottom: 0;
}

.app-choices--default .choices__inner,
.app-choices--form .choices__inner {
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  min-height: 48px;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  box-shadow: none;
  background-color: var(--card-white);
  color: var(--text-slate);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.app-choices--default.is-focused .choices__inner,
.app-choices--form.is-focused .choices__inner {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.1);
}

.app-choices--default .choices__list--single .choices__item,
.app-choices--form .choices__list--single .choices__item {
  color: var(--text-slate);
  font-weight: 500;
}

/* Flatpickr — calendario admin (sustituye el date nativo) */
.app-date-native {
  display: none !important;
}

.app-date-input.form-control,
.app-date-input {
  width: 100%;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='3' stroke='%2325666a' stroke-width='1.8'/%3E%3Cpath stroke='%2325666a' stroke-width='1.8' stroke-linecap='round' d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
  padding-right: 2.5rem;
}

.flatpickr-calendar {
  font-family: var(--font-family);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(44, 62, 64, 0.12);
  overflow: hidden;
  z-index: 1400;
  padding: 10px 12px 12px;
  width: 308px;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after,
.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
  display: none;
}

.flatpickr-months .flatpickr-month {
  color: var(--text-slate);
  fill: var(--text-slate);
}

.flatpickr-current-month {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-slate);
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month {
  fill: var(--primary-teal);
  color: var(--primary-teal);
  border-radius: 8px;
  padding: 6px 8px;
  top: 8px;
  height: auto;
  width: auto;
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month {
  left: 8px !important;
}

.flatpickr-calendar .flatpickr-months .flatpickr-next-month {
  right: 8px !important;
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month:hover {
  background: var(--primary-teal-light);
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--primary-teal);
}

span.flatpickr-weekday {
  color: #7a8a8e;
  font-weight: 700;
  font-size: 0.75rem;
}

.flatpickr-days,
.dayContainer {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

.flatpickr-day {
  color: var(--text-slate);
  border-radius: 10px;
  max-width: 40px;
  height: 40px;
  line-height: 40px;
  border: none;
  font-weight: 500;
}

.flatpickr-day:hover,
.flatpickr-day:focus,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
  background: var(--primary-teal-light);
  border-color: transparent;
  color: var(--primary-teal);
}

.flatpickr-day.today {
  background: var(--primary-teal-hover) !important;
  border-color: var(--primary-teal-hover) !important;
  color: #fff !important;
  font-weight: 700;
}

.flatpickr-day.today:hover,
.flatpickr-day.today:focus {
  background: var(--primary-teal) !important;
  border-color: var(--primary-teal) !important;
  color: #fff !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--primary-teal) !important;
  border-color: var(--primary-teal) !important;
  color: #fff !important;
  font-weight: 700;
}

.flatpickr-day.today.selected,
.flatpickr-day.today.selected:hover {
  background: var(--primary-teal-hover) !important;
  border-color: var(--primary-teal-hover) !important;
  color: #fff !important;
}

.flatpickr-day.inRange {
  background: var(--primary-teal-light);
  box-shadow: none;
  border-color: transparent;
  color: var(--primary-teal);
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #a8b5b7;
}

body.dark-theme .app-date-input.form-control,
body.dark-theme .app-date-input {
  background-color: var(--input-bg, #263336);
  color: var(--text-slate);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='3' stroke='%233ba4a9' stroke-width='1.8'/%3E%3Cpath stroke='%233ba4a9' stroke-width='1.8' stroke-linecap='round' d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
}

body.dark-theme .flatpickr-calendar {
  background: var(--card-white);
  border-color: var(--border-subtle);
}

body.dark-theme .flatpickr-months .flatpickr-month,
body.dark-theme .flatpickr-current-month,
body.dark-theme .flatpickr-day {
  color: var(--text-slate);
  fill: var(--text-slate);
}

body.dark-theme .flatpickr-day.today,
body.dark-theme .flatpickr-day.today:hover,
body.dark-theme .flatpickr-day.today.selected {
  background: var(--primary-teal-hover) !important;
  border-color: var(--primary-teal-hover) !important;
  color: #fff !important;
}

.app-choices--default .choices__list--dropdown,
.app-choices--form .choices__list--dropdown {
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  font-family: var(--font-family);
  z-index: 1000;
  margin-top: 4px;
}

.app-choices--default .choices__list--dropdown .choices__item,
.app-choices--form .choices__list--dropdown .choices__item {
  padding: 10px 16px;
  color: var(--text-slate);
  transition:
    background-color 0.15s,
    color 0.15s;
}

.app-choices--default .choices__list--dropdown .choices__item--selectable.is-highlighted,
.app-choices--form .choices__list--dropdown .choices__item--selectable.is-highlighted {
  background-color: var(--primary-teal) !important;
  color: white !important;
}

.app-choices--default .choices__list--dropdown .choices__item--selectable.is-selected,
.app-choices--form .choices__list--dropdown .choices__item--selectable.is-selected {
  background-color: rgba(37, 102, 106, 0.1);
  color: var(--primary-teal);
  font-weight: 600;
}

.app-choices--default[data-type*="select-one"]::after,
.app-choices--form[data-type*="select-one"]::after {
  border-color: var(--primary-teal) transparent transparent transparent;
  right: 1rem;
}

/* Selectores de año compactos (calendario, ausencias) */
.app-choices--year {
  width: auto;
  min-width: 120px;
}

.app-choices--year .choices__inner {
  border-radius: 20px;
  padding: 4px 28px 4px 12px;
  min-height: 32px;
  border-color: var(--primary-teal);
  background-color: var(--light-teal);
}

.app-choices--year .choices__list--single .choices__item {
  color: var(--primary-teal) !important;
  font-weight: 600;
  font-size: 0.85rem;
}

.app-choices--year[data-type*="select-one"]::after {
  border-color: var(--primary-teal) transparent transparent transparent;
  right: 8px;
  margin-top: -2px;
}

/* Select estilo píldora (nóminas, filtros compactos) */
.app-choices--pill {
  width: 100%;
  min-width: 110px;
}

.app-choices--pill .choices__inner {
  border: none;
  background: transparent;
  padding: 6px 22px 6px 8px;
  min-height: auto;
  box-shadow: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.app-choices--pill .choices__list--single .choices__item {
  color: var(--text-slate);
  font-weight: 600;
}

.app-choices--pill.is-focused .choices__inner {
  box-shadow: none;
}

.admin-filter-pill .choices.app-choices--pill {
  flex: 0 1 auto;
}

.admin-filter-pill:focus-within .choices.app-choices--pill .choices__list--single .choices__item {
  color: var(--text-slate);
}

#filterYear + .choices.app-choices--form,
#filterBloqueosYear + .choices.app-choices--form,
#selectMesNomina + .choices.app-choices--form {
  width: 100%;
}

.app-choices--year .choices__list--dropdown {
  border-radius: 12px;
  font-size: 0.85rem;
}

.app-choices--year .choices__list--single .choices__item,
.app-choices--year .choices__list--dropdown .choices__item {
  white-space: nowrap;
}

/* Desplegable abierto: stacking y sin recorte en contenedores padre */
.choices.is-open {
  position: relative;
  z-index: 1000;
}

.choices.is-open .choices__list--dropdown {
  z-index: 1001;
}

.card:has(.choices.is-open),
.modal-content:has(.choices.is-open),
.modal-content:has(.table-franjas-horario select:focus),
.modal-content--import:has(.choices.is-open),
.table-responsive--franjas:has(.choices.is-open),
.table-franjas-horario:has(.choices.is-open),
.admin-filter-pill:has(.choices.is-open),
.search-field:has(.choices.is-open),
.partes-filter-card:has(.choices.is-open),
.partes-filter-field:has(.choices.is-open),
.nominas-toolbar:has(.choices.is-open),
.nominas-filter-card:has(.choices.is-open),
.partes-sort-wrap:has(.choices.is-open),
.partes-per-page-wrap:has(.choices.is-open),
.festivos-bulk-bar:has(.choices.is-open),
.form-group:has(.choices.is-open),
.content-body > .d-flex:has(.choices.is-open),
.content-body > div:not(.dias-grid):not([id^="grid"]):has(.choices.is-open) {
  overflow: visible !important;
  position: relative;
  z-index: 1100;
}

/* Contenedores inmediatos del select (p. ej. width: 250px) */
div:has(> .choices.is-open) {
  overflow: visible !important;
}

/* Sin transform en hover mientras hay un desplegable abierto */
body.is-choices-dropdown-open .card:hover,
body.is-choices-dropdown-open .module-card:hover,
body.is-choices-dropdown-open .report-card-visualizar:hover,
body.is-choices-dropdown-open .festivo-card:hover,
body.is-choices-dropdown-open .btn-big-mode:hover,
body.is-choices-dropdown-open .animate-in:hover {
  transform: none !important;
}

body.is-choices-dropdown-open .nominas-toolbar {
  position: relative;
  z-index: 1100;
  overflow: visible !important;
}

body.is-choices-dropdown-open .nominas-grid {
  position: relative;
  z-index: 0;
}

.nominas-toolbar .choices.is-open .choices__list--dropdown,
.nominas-filter-card .choices.is-open .choices__list--dropdown {
  z-index: 1200;
}

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

.text-muted {
  color: var(--text-muted);
}

.font-bold {
  font-weight: 700;
}

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

.d-flex {
  display: flex;
  align-items: center;
}

.d-none {
  display: none !important;
}

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

.justify-content-between {
  justify-content: space-between;
}

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

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

.flex-1 {
  flex: 1;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 1rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: rgba(44, 62, 64, 0.85);
}

.form-control {
  width: 100%;
  height: 48px;
  padding: 0 1rem;
  font-size: 0.9375rem;
  font-family: var(--font-family);
  color: var(--text-slate);
  background-color: var(--card-white);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Evita que el texto dentro del input month se corte */
input[type="month"].form-control {
  display: flex;
  align-items: center;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.1);
}

.form-control::placeholder {
  color: rgba(122, 138, 142, 0.85);
}

/* Inputs numéricos: ocultar spinners nativos (se usan controles .input-stepper) */
input[type="number"].form-control,
input[type="number"].clean-input {
  -moz-appearance: textfield;
}

input[type="number"].form-control::-webkit-inner-spin-button,
input[type="number"].form-control::-webkit-outer-spin-button,
input[type="number"].clean-input::-webkit-inner-spin-button,
input[type="number"].clean-input::-webkit-outer-spin-button,
input[type="number"][readonly]::-webkit-inner-spin-button,
input[type="number"][readonly]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"][readonly] {
  -moz-appearance: textfield;
}

/* Iconos de fecha/hora en modo claro */
input[type="date"].form-control::-webkit-calendar-picker-indicator,
input[type="month"].form-control::-webkit-calendar-picker-indicator,
input[type="datetime-local"].form-control::-webkit-calendar-picker-indicator,
input[type="date"].clean-input::-webkit-calendar-picker-indicator,
input[type="month"].clean-input::-webkit-calendar-picker-indicator,
input[type="time"].form-control::-webkit-calendar-picker-indicator,
input[type="time"].clean-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.9;
  width: 18px;
  height: 18px;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator,
input[type="month"].form-control::-webkit-calendar-picker-indicator,
input[type="datetime-local"].form-control::-webkit-calendar-picker-indicator,
input[type="date"].clean-input::-webkit-calendar-picker-indicator,
input[type="month"].clean-input::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2325666a'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM5 8V6h14v2H5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

input[type="time"].form-control::-webkit-calendar-picker-indicator,
input[type="time"].clean-input::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2325666a'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

/* Stepper numérico personalizado (modo claro y oscuro) */
.input-stepper {
  position: relative;
  display: flex;
  width: 100%;
}

.input-stepper__field {
  flex: 1;
  min-width: 0;
  padding-right: 2.85rem !important;
}

.input-stepper__controls {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 2.35rem;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-subtle);
  border-radius: 0 9px 9px 0;
  overflow: hidden;
  background: var(--surface-muted);
  z-index: 2;
}

.input-stepper__btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.input-stepper__btn:hover {
  background: rgba(37, 102, 106, 0.12);
  color: var(--primary-teal);
}

.input-stepper__btn:active {
  background: rgba(37, 102, 106, 0.2);
}

.input-stepper__btn--up {
  border-bottom: 1px solid var(--border-subtle);
}

.input-stepper--compact .input-stepper__controls {
  width: 2rem;
}

.input-stepper--compact .input-stepper__field {
  padding-right: 2.45rem !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  /* Exactamente la misma altura que .form-control */
  padding: 0 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-family);
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--primary-teal);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-teal-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Cards */
.card {
  background-color: var(--card-white);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  width: 100%;
  transition: box-shadow 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease;
}

.card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.card-body {
  padding: 1.5rem;
}

/* Grid System */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -10px;
  margin-right: -10px;
}

.row-space-evenly {
  justify-content: space-evenly;
}

@media (max-width: 991px) {
  .row-space-evenly>div {
    max-width: 100%;
  }
}

/* Opcional: igualar altura en desktop */
@media (min-width: 1200px) {
  .row-space-evenly .card {
    height: 100%;
  }
}

.col {
  flex: 1;
  padding: 0 10px;
}

.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 10px;
}

.col-sm-6 {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 10px;
}

.col-md-4 {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 10px;
}

.col-md-6 {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 10px;
}

.col-lg-4 {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 10px;
}

.col-lg-3 {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 10px;
}

.col-md-3 {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 10px;
}

.row.g-3 {
  row-gap: 1.25rem;
}

.col-md-5 {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 10px;
}

.p-3 {
  padding: 1rem;
}

.p-4 {
  padding: 1.5rem;
}

.h-100 {
  height: 100%;
}

@media (min-width: 576px) {
  .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 768px) {
  .col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }

  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }

  .col-md-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }

  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 1024px) {
  .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }

  .col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

/* Layout */
.app-wrapper {
  display: block;
  height: 100vh;
  overflow: hidden;
}

/*
 * Shell fijo: el sidebar NO participa en el flujo del contenido.
 * Así, al sustituir solo <main> en la SPA, el menú no se oculta ni parpadea.
 */
#sidebarMount {
  position: static;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

#sidebarMount > * {
  pointer-events: auto;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  z-index: 40;
  background-color: var(--drawer-bg);
  color: white;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  background-color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-teal);
  font-weight: bold;
  font-size: 1.2rem;
}

.sidebar-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
}

.sidebar-nav {
  padding: 1rem 0;
  flex: 1;
  overflow-y: auto;
  overflow-anchor: none;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
}

.sidebar-nav-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-scroll-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  background: linear-gradient(
    to bottom,
    rgba(37, 102, 106, 0) 0%,
    var(--drawer-bg) 72%
  );
  color: rgba(255, 255, 255, 0.72);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 2;
}

.sidebar-scroll-hint.is-visible {
  opacity: 1;
  visibility: visible;
}

.sidebar-scroll-hint i {
  font-size: 1.1rem;
  animation: sidebar-scroll-bounce 1.6s ease-in-out infinite;
}

@keyframes sidebar-scroll-bounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.65;
  }

  50% {
    transform: translateY(4px);
    opacity: 1;
  }
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari/Webkit */
}

.nav-item {
  padding: 0 1rem;
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  font-weight: 500;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
}

.nav-link.active {
  background-color: var(--drawer-selected);
  color: white;
}

.nav-link i {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.nav-link-label {
  flex: 1 1 auto;
  min-width: 0;
}

.sidebar-badge {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.38rem;
  font-size: 0.6875rem;
}

.sidebar-badge[aria-hidden="true"]:not(.is-visible) {
  display: none !important;
}

.count-badge.sidebar-badge.is-visible,
.count-badge.sidebar-badge:not([aria-hidden="true"]) {
  display: inline-flex !important;
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  margin-left: 260px;
  width: calc(100% - 260px);
}

.topbar {
  background-color: var(--bg-scaffold);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.topbar-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.topbar-subtitle {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.3;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-slate);
  font-size: 1.25rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.btn-icon:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.content-body {
  padding: 0 1.5rem 1.5rem 1.5rem;
  flex: 1;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

/* Responsive Sidebar Toggle */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 20;
}

@media (max-width: 991px) {
  .sidebar {
    z-index: 30;
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .sidebar-overlay.show {
    display: block;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }
}

@media (min-width: 992px) {
  .menu-toggle {
    display: none !important;
  }
}

/* Loading Spinner */
.spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(37, 102, 106, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-teal);
  animation: spin 1s ease-in-out infinite;
}

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

/* Badge / Status */
.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-trabajando {
  background-color: #1b8e3e;
}

.status-ausente {
  background-color: #bf2f2f;
}

.text-trabajando {
  color: #1b8e3e;
}

.text-ausente {
  color: #bf2f2f;
}

.badge-chart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background-color: var(--primary-teal-light);
  border-radius: 20px;
  color: var(--primary-teal);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.badge-chart:hover {
  opacity: 0.8;
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
}

.search-clear {
  position: absolute;
  right: 1rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  /* hidden by default */
}

.search-box .form-control {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

/* FAB (Floating Action Button) */
.fab-button,
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--primary-teal);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 102, 106, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 5;
}

.fab-button:hover,
.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 102, 106, 0.5);
}

/* Espacio inferior para que el FAB no tape acciones del último ítem de la lista */
.main-content:has(> .fab) .content-body,
.main-content:has(> .fab-button) .content-body {
  padding-bottom: calc(1.5rem + 56px + 28px + 20px);
}

@media (max-width: 991px) {
  .main-content:has(> .fab) .content-body,
  .main-content:has(> .fab-button) .content-body {
    padding-bottom: calc(1.5rem + 56px + 28px + 28px + env(safe-area-inset-bottom, 0px));
  }
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  overflow-y: auto;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background-color: var(--card-white);
  border-radius: 12px;
  width: 100%;
  max-width: 800px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: modalIn 0.25s ease;
}

.modal-content--horarios {
  max-width: min(96vw, 1180px);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.modal-title,
.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.modal-body {
  margin-bottom: 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.modal-content--import {
  max-width: 680px;
  max-height: min(90vh, 760px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.modal-content--import .modal-header {
  margin-bottom: 0;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-content--import .modal-body {
  padding: 20px 28px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.modal-content--import .modal-footer {
  margin-top: 0;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border-subtle);
}

/* Panel de notificaciones (sidebar) */
.notifications-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.notifications-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.notifications-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 99999;
  width: min(90vw, 450px);
  max-height: min(85vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--card-white);
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -48%) scale(0.96);
  transition:
    opacity 0.28s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.28s ease;
}

.notifications-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.notifications-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.notifications-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.notifications-panel__title .ph-bell {
  font-size: 1.2rem;
  color: var(--text-slate);
  flex-shrink: 0;
}

.notifications-panel__title .modal-title {
  font-size: 1.1rem;
  margin: 0;
}

.notifications-panel__mark-read {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-teal);
  background: rgba(37, 102, 106, 0.1);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.notifications-panel__mark-read:hover {
  background: rgba(37, 102, 106, 0.18);
}

.notifications-panel__mark-read:active {
  transform: scale(0.97);
}

.notifications-panel__body {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 0;
  background: var(--card-white);
}

.notifications-panel__footer {
  flex-shrink: 0;
  padding: 12px;
  text-align: center;
  background: #f8fafc;
  border-top: 1px solid var(--border-subtle);
}

.notifications-panel__close-btn {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.notifications-panel__close-btn:hover {
  color: var(--text-slate);
  background: rgba(0, 0, 0, 0.04);
}

.notifications-panel__empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.notifications-panel__empty .ph {
  font-size: 3rem;
  color: #cbd5e1;
  margin-bottom: 10px;
  display: block;
}

.notifications-panel__empty p {
  margin: 0;
  font-size: 0.95rem;
}

.notifications-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  transition: opacity 0.3s ease, background-color 0.15s ease;
}

.notifications-item:hover {
  background: rgba(37, 102, 106, 0.03);
}

.notifications-item__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(37, 102, 106, 0.1);
  color: var(--primary-teal);
}

.notifications-item__icon .ph {
  font-size: 1.1rem;
}

.notifications-item__content {
  flex: 1;
  min-width: 0;
}

.notifications-item__message {
  margin-bottom: 4px;
  font-size: 0.9rem;
  color: var(--text-slate);
  line-height: 1.4;
}

.notifications-item__date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.notifications-item__date .ph {
  vertical-align: middle;
}

.notifications-item__dismiss {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.notifications-item__dismiss:hover {
  background: #f1f5f9;
  color: #64748b;
}

@media (prefers-reduced-motion: reduce) {

  .notifications-overlay,
  .notifications-panel {
    transition: none;
  }
}

.btn-secondary {
  background-color: var(--surface-muted);
  color: var(--text-slate);
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-secondary:hover {
  background-color: #d9dfdf;
}

/* Employee list item (empleados.php) */
.emp-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
}

.emp-item.is-inactive {
  background-color: #f8f9fa;
  opacity: 0.92;
}

.emp-item:last-child {
  border-bottom: none;
}

.emp-item:hover {
  background-color: rgba(37, 102, 106, 0.03);
}

.emp-badge-baja {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
}

.emp-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.emp-badge-retencion {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  background: #e2e8f0;
}

.emp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.emp-action-baja {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(180, 120, 40, 0.12);
  color: #b45309;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.emp-action-baja:hover {
  background: rgba(180, 120, 40, 0.22);
}

.emp-action-reactivar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(37, 102, 106, 0.12);
  color: var(--primary-teal);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.emp-action-reactivar:hover {
  background: rgba(37, 102, 106, 0.22);
}

.emp-info {
  flex: 1;
  cursor: pointer;
}

.emp-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-slate);
}

.emp-num {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.emp-delete {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: var(--delete-red);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.emp-delete:hover {
  opacity: 0.85;
}

.emp-delete--locked {
  background-color: #cbd5e1;
  cursor: not-allowed;
  opacity: 0.9;
}

.emp-delete--locked:hover {
  opacity: 0.9;
}

/* Empleados: directorio y tarjetas de gestión */
.employees-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.employees-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 42px;
  padding-inline: 1rem;
  border-radius: 10px;
  white-space: nowrap;
}

.employees-toolbar {
  padding: 1.25rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.055);
}

.employees-toolbar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.employees-toolbar-head h2 {
  margin: 0 0 0.2rem;
  color: var(--text-slate);
  font-size: 1rem;
}

.employees-toolbar-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.employees-result-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(37, 102, 106, 0.1);
  color: var(--primary-teal);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.employees-filter-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.75fr) minmax(210px, 0.8fr) minmax(280px, 1.45fr);
  gap: 0.85rem;
  align-items: end;
}

.employees-filter-field {
  min-width: 0;
}

.employees-filter-field > label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.employees-filter-field > label .ph {
  color: var(--primary-teal);
  font-size: 0.95rem;
}

.employees-filter-field .form-control,
.employees-filter-field .choices__inner {
  min-height: 48px;
  border-radius: 11px;
}

.employees-filter-field .search-box {
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 48px;
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  background: var(--card-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.employees-filter-field .search-box:focus-within {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.1);
}

.employees-filter-field .search-box .form-control {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.employees-list,
#empleadosListBody {
  width: 100%;
}

.employees-page .emp-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  min-width: 0;
  height: 100%;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--card-white);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.055);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.employees-page .emp-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary-teal);
}

.employees-page .emp-item.is-inactive::before {
  background: #d97706;
}

.employees-page .emp-item.is-upcoming::before {
  background: #4f46e5;
}

.employees-page .emp-item:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 102, 106, 0.28);
  background: var(--card-white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.emp-card-main {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-width: 0;
}

.emp-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(37, 102, 106, 0.16), rgba(37, 102, 106, 0.07));
  color: var(--primary-teal);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.employees-page .emp-info {
  min-width: 0;
}

.emp-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.employees-page .emp-name {
  overflow: hidden;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emp-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 750;
}

.emp-status--active {
  color: #16734a;
  background: #e8f7ef;
}

.emp-status--inactive {
  color: #9a5208;
  background: #fff2dc;
}

.emp-status--sin-contrato {
  color: #9a5208;
  background: #fff2dc;
}

.emp-status--proxima-incorporacion {
  color: #4338ca;
  background: #eef2ff;
}

.emp-context {
  margin-top: 0.42rem;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emp-context--proxima-incorporacion {
  color: #4f46e5;
}

.emp-context--sin-contrato,
.emp-context--activo {
  color: #a15c12;
}

.employees-page .emp-num {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

.employees-page .emp-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-subtle);
}

.employees-page .emp-actions--inactive {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.employees-page .emp-actions--single {
  grid-template-columns: 1fr;
}

.employees-page .emp-actions button,
.employees-page .emp-actions .emp-delete--locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  width: auto;
  height: 38px;
  min-width: 0;
  padding: 0 0.65rem;
  border-radius: 9px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.emp-edit {
  border: 1px solid rgba(37, 102, 106, 0.2);
  background: rgba(37, 102, 106, 0.07);
  color: var(--primary-teal);
  cursor: pointer;
}

.emp-edit:hover {
  background: rgba(37, 102, 106, 0.14);
}

.employees-page .emp-delete {
  background: rgba(192, 84, 72, 0.12);
  color: var(--delete-red);
}

.employees-page .emp-delete--locked {
  border: 1px solid #dbe3e7;
  background: #f1f4f5;
  color: #7b8b91;
  cursor: not-allowed;
  opacity: 1;
}

@media (max-width: 860px) {
  .employees-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employees-filter-field--search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .employees-page .topbar-subtitle,
  .employees-add-btn span {
    display: none;
  }

  .employees-add-btn {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .employees-toolbar-head {
    align-items: center;
  }

  .employees-toolbar-head p {
    display: none;
  }

  .employees-filter-grid {
    grid-template-columns: 1fr;
  }

  .employees-filter-field--search {
    grid-column: auto;
  }
}

body.dark-theme.employees-page .employees-toolbar {
  box-shadow: none;
}

body.dark-theme.employees-page .employees-filter-field .search-box {
  background: var(--input-bg);
  border-color: var(--border-subtle);
}

body.dark-theme.employees-page .emp-avatar {
  background: rgba(69, 184, 189, 0.14);
  color: var(--primary-teal);
}

body.dark-theme.employees-page .emp-status--active {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

body.dark-theme.employees-page .emp-status--inactive {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

body.dark-theme.employees-page .emp-status--sin-contrato {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

body.dark-theme.employees-page .emp-status--proxima-incorporacion {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

body.dark-theme.employees-page .emp-edit {
  border-color: rgba(69, 184, 189, 0.22);
  background: rgba(69, 184, 189, 0.1);
  color: var(--primary-teal);
}

body.dark-theme.employees-page .emp-delete--locked {
  border-color: var(--border-subtle);
  background: #334246;
  color: var(--text-muted);
}

/* Custom Radio Buttons */
.custom-radio-group {
  display: flex;
  gap: 10px;
}

.custom-radio {
  flex: 1;
  position: relative;
}

.custom-radio input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.custom-radio .radio-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: var(--surface-muted);
  color: var(--text-slate);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.custom-radio input:checked~.radio-btn {
  background: var(--light-teal);
  color: var(--primary-teal);
  border-color: var(--primary-teal);
}

/* Custom Select Dropdown */
.custom-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2325666a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px !important;
  cursor: pointer;
}

.custom-select:focus {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.15);
  outline: none;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.4s ease-out forwards;
  opacity: 0;
  /* Starts hidden before animation kicks in */
}

/* Delay staggered animations for list items */
.animate-in:nth-child(1) {
  animation-delay: 0.05s;
}

.animate-in:nth-child(2) {
  animation-delay: 0.1s;
}

.animate-in:nth-child(3) {
  animation-delay: 0.15s;
}

.animate-in:nth-child(4) {
  animation-delay: 0.2s;
}

.animate-in:nth-child(5) {
  animation-delay: 0.25s;
}

.animate-in:nth-child(6) {
  animation-delay: 0.3s;
}

.animate-in:nth-child(7) {
  animation-delay: 0.35s;
}

.animate-in:nth-child(n + 8) {
  animation-delay: 0.4s;
}

.btn,
.btn-icon,
.stat-chip,
.fab,
.fab-button {
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn:active,
.btn-icon:active,
.fab:active,
.fab-button:active {
  transform: scale(0.95);
}

/* SweetAlert2 inyecta un <select class="swal2-select"> residual; no mostrar ni con Choices */
.swal2-select,
.swal2-select + .choices {
  display: none !important;
}

/* Calendario festivos: selección múltiple */
.festivos-bulk-bar {
  border: 1px solid var(--border-subtle);
  background: var(--card-white);
}

.festivos-bulk-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-slate);
}

.festivos-bulk-delete {
  background: var(--delete-red, #c05448);
  color: #fff;
  font-weight: 600;
}

.festivos-bulk-delete:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.festivo-card {
  border: 1px solid var(--border-subtle);
}

.festivo-card.is-selected {
  border-color: var(--primary-teal) !important;
  box-shadow: 0 0 0 2px rgba(37, 102, 106, 0.15);
}

.festivo-card-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem;
}

.festivo-select-wrap {
  display: flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.festivo-select {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--primary-teal);
  cursor: pointer;
}

.festivo-card-date {
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  border-radius: 12px;
  width: 64px;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  flex-shrink: 0;
}

.festivo-card-date-month {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.festivo-card-date-day {
  font-size: 1.5rem;
  font-weight: 800;
}

.festivo-card-info {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.festivo-card-title {
  margin: 0 0 2px;
  font-size: 1.05rem;
  color: var(--text-slate);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.festivo-card-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: capitalize;
}

.festivo-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.festivo-card-action {
  flex-shrink: 0;
}

.festivo-card-action--edit {
  color: var(--primary-teal);
  background: rgba(14, 165, 165, 0.08);
}

.festivo-card-action--delete {
  color: var(--delete-red);
  background: rgba(192, 84, 72, 0.05);
}

/* --- Modern Search Bar (Fichajes Mensuales) --- */
.search-bar-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2.5rem;
  width: 100%;
  justify-content: space-evenly;
  align-items: center;
}

.search-bar {
  background: var(--card-white);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 8px 12px;
  width: 100%;
  /* max-width: 900px; */
  transition: box-shadow 0.3s ease;
}

.search-bar:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  flex-grow: 1;
  position: relative;
  border-radius: 999px;
  transition: background-color 0.2s ease;
  cursor: pointer;
  flex-basis: 0;
  min-width: 0;
}

.search-field:hover {
  background-color: rgba(37, 102, 106, 0.04);
}

.search-field i.icon-lead {
  font-size: 1.4rem;
  color: var(--primary-teal);
  opacity: 0.8;
  flex-shrink: 0;
}

.search-field .field-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
  overflow: hidden;
}

.search-field label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 2px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.clean-select,
.clean-input {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-slate);
  font-weight: 600;
  outline: none;
  width: 100%;
  cursor: pointer;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clean-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  background-position: right;
}

.clean-input::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.search-field select.clean-select {
  padding-right: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg fill=%22%237a8a8e%22 viewBox=%220 0 24 24%22 width=%2224%22 height=%2224%22 xmlns=%22http://www.w3.org/2000/svg%22><path d=%22M7 10l5 5 5-5z%22/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 18px;
}

.search-divider {
  width: 1px;
  height: 44px;
  background-color: var(--border-subtle);
  margin: 0 8px;
  flex-shrink: 0;
}

.search-action {
  margin-left: 8px;
  flex-shrink: 0;
}

.btn-search {
  background-color: var(--primary-teal);
  color: white;
  border: none;
  border-radius: 999px;
  height: 50px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-search i {
  font-size: 1.3rem;
}

.btn-search:hover {
  background-color: var(--primary-teal-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 102, 106, 0.3);
  color: white;
}

@media (max-width: 768px) {
  .search-bar {
    flex-direction: column;
    border-radius: 20px;
    padding: 16px;
    gap: 4px;
  }

  .search-field {
    width: 100%;
    border-radius: 12px;
  }

  .search-divider {
    width: 100%;
    height: 1px;
    margin: 8px 0;
  }

  .search-action {
    width: 100%;
    margin-left: 0;
    margin-top: 12px;
  }

  .btn-search {
    width: 100%;
    justify-content: center;
  }
}

/* Modal de baja: SweetAlert aplica márgenes laterales a un input con ancho
   propio; limitarlo al contenido evita que desborde el popup. */
.swal2-popup.empleado-baja-popup .swal2-input {
  display: block;
  align-self: center;
  width: calc(100% - 4rem) !important;
  min-width: 0 !important;
  max-width: calc(100% - 4rem) !important;
  margin-right: 2rem !important;
  margin-left: 2rem !important;
  box-sizing: border-box !important;
}

.empleado-baja-efecto {
  width: calc(100% - 4rem);
  margin: 14px 2rem 0;
  box-sizing: border-box;
  text-align: left;
}

.empleado-baja-efecto[hidden] {
  display: none;
}

.empleado-baja-efecto-titulo {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--primary-teal);
  font-size: 0.82rem;
  font-weight: 700;
}

.empleado-baja-efecto label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 7px 0;
  padding: 10px 12px;
  border: 1px solid #dde4e5;
  border-radius: 10px;
  background: #fafcfc;
  cursor: pointer;
}

.empleado-baja-efecto label:has(input:checked) {
  border-color: rgba(37, 102, 106, 0.55);
  background: rgba(37, 102, 106, 0.07);
}

.empleado-baja-efecto input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--primary-teal);
}

.empleado-baja-efecto span,
.empleado-baja-efecto b,
.empleado-baja-efecto small {
  display: block;
}

.empleado-baja-efecto b {
  color: var(--text-slate);
  font-size: 0.85rem;
}

.empleado-baja-efecto small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* --- Estilos para Tablas Modernas --- */
.table-responsive {
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.table-custom th {
  background-color: var(--surface-muted);
  color: var(--text-slate);
  font-weight: 700;
  padding: 14px 16px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Bordes redondeados solo para los extremos del encabezado */
.table-custom th:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.table-custom th:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.table-custom td {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  font-size: 0.95rem;
}

.table-custom tbody tr:last-child td {
  border-bottom: none;
}

.table-custom tbody tr {
  transition: background-color 0.2s ease;
}

.table-custom tbody tr:hover {
  background-color: rgba(37, 102, 106, 0.03);
  /* Un verde azulado hiper suave */
}

.dropzone {
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
}

.pdf-action-wrapper {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0;
}

.pdf-action-wrapper.is-visible {
  max-height: 60px;
  /* Altura suficiente para el botón */
  opacity: 1;
  transform: translateY(0);
  margin-top: 16px;
  /* Separación de la barra de búsqueda */
}

/* Premium Table Styling */
.premium-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
}

.premium-table th {
  color: var(--text-muted, #64748b);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0 20px 8px 20px;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  text-align: left;
  white-space: nowrap;
}

.dias-grid {
  display: grid;
  gap: 12px;
  /* Esto genera 3 columnas en pantallas grandes y baja a 2 o 1 automáticamente si se encoge */
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.premium-table tbody tr {
  background-color: var(--card-white, #ffffff);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.02),
    0 1px 2px rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-table tbody tr:hover {
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 4px 6px -2px rgba(0, 0, 0, 0.03);
  border-color: var(--primary-teal, #25666a);
}

.premium-table td {
  padding: 16px 20px;
  vertical-align: middle;
  border: none;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.premium-table tbody tr:hover td {
  border-top: 1px solid rgba(37, 102, 106, 0.1);
  border-bottom: 1px solid rgba(37, 102, 106, 0.1);
}

.premium-table td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  border-left: 1px solid transparent;
}

.premium-table tbody tr:hover td:first-child {
  border-left: 1px solid rgba(37, 102, 106, 0.1);
}

.premium-table td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-right: 1px solid transparent;
}

.premium-table tbody tr:hover td:last-child {
  border-right: 1px solid rgba(37, 102, 106, 0.1);
}

/* Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-validado {
  background-color: rgba(37, 102, 106, 0.12);
  color: var(--primary-teal, #25666a);
  border: 1px solid rgba(37, 102, 106, 0.2);
}

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

/* Animations */
.fade-enter {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Button styling */
.btn-premium {
  background: white;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-premium:hover {
  border-color: var(--primary-teal, #25666a);
  color: var(--primary-teal, #25666a);
  background: rgba(37, 102, 106, 0.03);
  box-shadow: 0 4px 6px -1px rgba(37, 102, 106, 0.1);
  text-decoration: none;
}

/* Dashboard Split Layout */
.dashboard-col-historial,
.dashboard-col-consultar {
  width: 100%;
}

@media (min-width: 1200px) {
  .dashboard-col-historial {
    flex: 0 0 65%;
    max-width: 65%;
  }

  .dashboard-col-consultar {
    flex: 0 0 35%;
    max-width: 35%;
  }
}

.admin-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 4px 16px;
  border-radius: 999px;
  /* Forma de píldora redondeada */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.admin-filter-pill:hover,
.admin-filter-pill:focus-within {
  border-color: var(--primary-teal);
  box-shadow: 0 4px 14px rgba(37, 102, 106, 0.08);
}

.admin-filter-pill i {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.admin-filter-pill:focus-within i {
  color: var(--primary-teal);
}

.admin-filter-pill select.clean-select,
.admin-filter-pill input.clean-input {
  border: none;
  background: transparent;
  font-weight: 600;
  color: var(--text-slate);
  outline: none;
  padding: 6px 8px;
  font-size: 0.95rem;
}

.admin-filter-pill select.clean-select {
  padding-right: 22px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%237a8a8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.admin-filter-pill input.clean-input {
  width: 65px;
  text-align: center;
}

/* Ocultar las flechitas feas del input number en Chrome/Edge */
.admin-filter-pill input[type="number"]::-webkit-inner-spin-button,
.admin-filter-pill input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.admin-filter-pill .divider {
  width: 1px;
  height: 18px;
  background-color: var(--border-subtle);
  margin: 0 4px;
}

/* === Configuración: logo, sello y retención (vista general) === */
.config-card {
  background: var(--card-white);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.03);
  padding: 1.75rem;
  margin-bottom: 2rem;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.config-card:hover {
  border-color: #d8e1e9;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.config-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  padding-bottom: 1rem;
}

.config-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(37, 102, 106, 0.08);
  color: var(--primary-teal, #25666a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.config-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-slate, #0f172a);
}

.config-card-subtitle {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted, #64748b);
}

.config-banner-calibrador {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: linear-gradient(135deg, #f0f9f9 0%, #e6f4f4 100%);
  border: 1px solid rgba(37, 102, 106, 0.18);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.config-switch-group {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.config-switch-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
}

.config-switch-item:not(:last-child) {
  border-bottom: 1px dashed var(--border-subtle, #e2e8f0);
}

.config-switch-item .form-check-input {
  width: 38px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
}

.config-switch-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-slate, #0f172a);
  cursor: pointer;
  margin: 0;
}

/* === Configuración: pestaña de módulos === */
.config-modules-card {
  overflow: hidden;
}

.config-modules-header-icon {
  background: linear-gradient(135deg, rgba(37, 102, 106, 0.14), rgba(37, 102, 106, 0.06));
}

.config-modules-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.9rem 1rem;
  color: var(--text-slate, #334155);
  background: rgba(37, 102, 106, 0.06);
  border: 1px solid rgba(37, 102, 106, 0.14);
  border-radius: 12px;
}

.config-modules-notice i {
  margin-top: 1px;
  color: var(--primary-teal, #25666a);
  font-size: 1.2rem;
}

.config-modules-notice p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.config-modules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.config-module-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  min-height: 92px;
  padding: 1rem;
  color: inherit;
  background: var(--config-nested-bg, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.config-module-item:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 102, 106, 0.38);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.config-module-item:has(.config-module-toggle:checked) {
  background: linear-gradient(135deg, rgba(37, 102, 106, 0.075), rgba(37, 102, 106, 0.025));
  border-color: rgba(37, 102, 106, 0.3);
}

.config-module-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--primary-teal, #25666a);
  background: rgba(37, 102, 106, 0.1);
  border-radius: 12px;
  font-size: 1.35rem;
}

.config-module-copy {
  min-width: 0;
}

.config-module-name {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-slate, #334155);
  font-size: 0.95rem;
  line-height: 1.25;
}

.config-module-description {
  display: block;
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  line-height: 1.4;
}

.config-module-control {
  position: relative;
  width: 44px;
  height: 24px;
}

.config-module-toggle {
  width: 44px;
  height: 24px;
  margin: 0;
  appearance: none;
  background: #cbd5e1;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.config-module-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
  transition: transform 0.2s ease;
}

.config-module-toggle:checked {
  background: var(--primary-teal, #25666a);
}

.config-module-toggle:checked::after {
  transform: translateX(20px);
}

.config-module-toggle:focus-visible {
  outline: 3px solid rgba(37, 102, 106, 0.22);
  outline-offset: 3px;
}

.config-modules-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
}

.config-modules-count {
  color: var(--text-muted, #64748b);
  font-size: 0.86rem;
  font-weight: 600;
}

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

@media (max-width: 520px) {
  .config-module-item {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding: 0.85rem;
  }

  .config-module-icon {
    width: 40px;
    height: 40px;
  }

  .config-modules-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

body.dark-theme .config-module-item {
  background: rgba(15, 23, 42, 0.28);
}

body.dark-theme .config-module-item:has(.config-module-toggle:checked) {
  background: rgba(37, 102, 106, 0.16);
}

.config-module-wrapper{min-width:0;border:1px solid var(--border-subtle,#e2e8f0);border-radius:14px;overflow:hidden;background:var(--config-nested-bg,#f8fafc)}
.config-module-wrapper>.config-module-item{border:0;border-radius:0;box-shadow:none;background:transparent}
.config-module-wrapper>.config-module-item:hover{transform:none;box-shadow:none}
.config-module-required{display:block;justify-self:end;width:auto;height:auto}.config-module-required>span{display:inline-flex;align-items:center;padding:.35rem .55rem;border-radius:999px;background:rgba(37,102,106,.12);color:var(--primary-teal,#25666a);font-size:.62rem;font-weight:800;letter-spacing:.035em;text-transform:uppercase;white-space:nowrap}
.config-module-details-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.65rem 1rem;border:0;border-top:1px solid var(--border-subtle,#e2e8f0);background:rgba(255,255,255,.4);color:var(--primary-teal,#25666a);font:700 .72rem inherit;cursor:pointer}
.config-module-details-toggle i{transition:transform .18s ease}.config-module-details-toggle[aria-expanded="true"] i{transform:rotate(180deg)}
.config-module-details{padding:.3rem 1rem .7rem;border-top:1px solid var(--border-subtle,#e2e8f0);background:rgba(255,255,255,.35)}
.config-module-detail{display:grid;grid-template-columns:20px minmax(0,1fr);gap:.55rem;padding:.7rem 0;color:var(--text-slate,#334155);font-size:.76rem}.config-module-detail+.config-module-detail{border-top:1px solid var(--border-subtle,#e2e8f0)}.config-module-detail>i{color:var(--primary-teal,#25666a);font-size:1rem}.config-module-detail strong{display:block}.config-module-detail small{display:block;margin-top:.18rem;color:var(--text-muted,#64748b);font-size:.68rem;font-weight:400;line-height:1.35}.config-module-detail.is-toggle{grid-template-columns:20px minmax(0,1fr) 20px;cursor:pointer}.config-module-detail-check{width:18px;height:18px;margin:1px 0 0;accent-color:var(--primary-teal,#25666a)}.config-module-detail-check:disabled{opacity:.4;cursor:not-allowed}
body.dark-theme .config-module-wrapper{background:rgba(15,23,42,.28)}body.dark-theme .config-module-details-toggle,body.dark-theme .config-module-details{background:rgba(15,23,42,.2)}

.config-branding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.config-upload-zone {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--config-nested-bg, #fafbfc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.config-upload-zone:hover {
  border-color: rgba(37, 102, 106, 0.3);
  background: var(--config-nested-bg-hover, #f8fafc);
}

.config-upload-preview {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  border: 2px dashed var(--border-subtle, #cbd5e1);
  background: var(--card-white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.config-upload-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 8px;
  display: none;
}

.config-upload-preview img.is-visible {
  display: block;
}

.config-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.8rem;
  gap: 4px;
}

.config-upload-placeholder i {
  font-size: 1.8rem;
}

.config-upload-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.config-upload-btn {
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
}

.config-sello-size-block {
  border-left: 1px solid var(--border-subtle, #e2e8f0);
  padding-left: 1.25rem;
  margin-left: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-width: 148px;
  flex-shrink: 0;
}

.config-sello-size-label {
  font-size: 0.82rem;
  color: var(--text-slate);
  margin-bottom: 0;
}

.config-sello-mm-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.config-sello-mm-input {
  width: 5.5rem;
  min-width: 5.5rem;
  height: 38px;
  padding: 0 0.35rem;
  text-align: center;
  border-radius: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.config-plazos-rows {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.config-plazos-subsection {
  padding-top: 0.25rem;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
}

.config-plazos-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-slate, #334155);
}

.config-plazos-subtitle i {
  font-size: 1.15rem;
  color: var(--primary-teal, #25666a);
}

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

.config-plazo-card {
  background: var(--config-nested-bg, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.config-plazo-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 102, 106, 0.25);
}

.config-plazo-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-plazo-header i {
  font-size: 1.25rem;
  color: var(--primary-teal, #25666a);
}

.config-plazo-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-slate, #334155);
}

.config-plazo-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-plazo-input-group input {
  max-width: 100px;
  text-align: center;
  font-weight: 700;
  border-radius: 8px;
  height: 38px;
}

.config-plazo-unit {
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
}

.emp-contratos-banner {
  border: 1px solid rgba(180, 83, 9, 0.25);
  background: rgba(255, 244, 222, 0.65);
}

.emp-badge-contrato {
  display: inline-block;
  margin-top: 4px;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
}

.mb-5 {
  margin-bottom: 2.5rem !important;
}

.mt-5 {
  margin-top: 2.5rem !important;
}

.pt-5 {
  padding-top: 2.5rem !important;
}

.border-top {
  border-top: 1px solid var(--border-subtle, #e2e8f0);
}

/* ====================== DASHBOARD SPLIT LAYOUT ====================== */

.dashboard-split {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.dashboard-col-historial,
.dashboard-col-consultar {
  width: 100%;
}

/* Escritorio - Layout en dos columnas */
@media (min-width: 1200px) {
  .dashboard-col-historial {
    flex: 0 0 38%;
    /* Más estrecha */
    max-width: 38%;
  }

  .dashboard-col-consultar {
    flex: 0 0 60%;
    /* Más ancha */
    max-width: 60%;
  }
}

/* Tablets grandes */
@media (min-width: 992px) and (max-width: 1199px) {
  .dashboard-col-historial {
    flex: 0 0 40%;
    max-width: 40%;
  }

  .dashboard-col-consultar {
    flex: 0 0 58%;
    max-width: 58%;
  }
}

/* Móvil - se apilan */
@media (max-width: 991px) {
  .dashboard-split {
    gap: 16px;
  }

  .dashboard-col-historial,
  .dashboard-col-consultar {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Mejorar altura de tarjetas */
@media (min-width: 1200px) {
  .dashboard-split .card {
    height: 100%;
  }
}

/* ====================== TARJETA HISTORIAL COMPACTA ====================== */

.report-card {
  background: white;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 12px;

  /* Evita que el hover se corte */
  position: relative;
  z-index: 1;
}

.report-card:hover {
  box-shadow:
    0 10px 25px -5px rgb(0 0 0 / 0.08),
    0 8px 10px -6px rgb(0 0 0 / 0.06);
  border-color: var(--primary-teal);
}

/* === EVITAR DOBLE BORDE === */
.report-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 16px;
  pointer-events: none;
  transition: all 0.3s ease;
  opacity: 0;
}

.report-card:hover::before {
  opacity: 1;
  border-color: var(--primary-teal);
}

/* Resto del CSS (mantengo compacto) */

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.date-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-icon {
  width: 42px;
  height: 42px;
  background-color: #f0f9f9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--primary-teal);
}

.month-year {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-slate);
  line-height: 1.1;
}

.description {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.pdf-icon {
  color: #e74c3c;
  font-size: 1.35rem;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.pdf-icon:hover {
  background-color: #fdf2f2;
  color: #c0392b;
}

.report-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 12px 0;
}

.report-status {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.badge {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-validado {
  background-color: rgba(37, 102, 106, 0.1);
  color: var(--primary-teal);
}

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

.mode-btn {
  padding: 10px 24px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}

.mode-btn.active {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: var(--primary-teal);
}

.grid-informes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

@media (min-width: 1400px) {
  .grid-informes {
    grid-template-columns: repeat(4, 1fr);
    /* 4 columnas como pediste */
  }
}

.report-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.report-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Estilo para el grid de la vista "Visualizar Partes" */
.grid-informes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.report-card-visualizar {
  background: var(--card-white);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.report-card-visualizar:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.btn-big-mode {
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  background: var(--card-white);
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  padding: 20px;
}

.btn-big-mode:hover {
  border-color: var(--primary-teal);
  box-shadow: 0 8px 25px rgba(37, 102, 106, 0.15);
}

.btn-volver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  color: #475569;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
}

.btn-volver:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.card-dia-fichaje {
  background: var(--card-white);
  border: 1.5px solid var(--primary-teal);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.card-dia-fichaje:hover {
  background: var(--light-teal);
  box-shadow: 0 4px 12px rgba(37, 102, 106, 0.1);
}

.dia-numero-box {
  width: 40px;
  height: 40px;
  background-color: var(--primary-teal);
  /* Cuadro verde sólido */
  color: white;
  /* Número en blanco */
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.dia-info-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dia-nombre {
  font-weight: 700;
  color: var(--text-slate);
  font-size: 0.95rem;
  line-height: 1.2;
}

.dia-tiempo {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-dia-fichaje-chevron {
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
  opacity: 0.65;
}

/* --- Partes Mensuales: selección y generar --- */
.partes-seleccion-heading {
  color: var(--text-slate);
  font-weight: 700;
  font-size: 1.8rem;
}

.partes-mode-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.partes-mode-icon i {
  font-size: 3rem;
}

.partes-mode-icon--teal {
  background: rgba(37, 102, 106, 0.1);
}

.partes-mode-icon--teal i {
  color: var(--primary-teal);
}

.partes-mode-icon--sky {
  background: rgba(14, 165, 233, 0.1);
}

.partes-mode-icon--sky i {
  color: #0ea5e9;
}

.partes-mode-title {
  font-weight: 700;
  color: var(--text-slate);
  font-size: 1.4rem;
}

.partes-mode-desc,
.partes-section-desc {
  font-size: 0.95rem;
}

.partes-generar-cards-row {
  max-width: 1100px;
  margin: 0 auto 2rem;
}

.partes-card-masiva {
  border: 1px solid rgba(37, 102, 106, 0.3);
}

.partes-section-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(37, 102, 106, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.partes-section-icon i {
  font-size: 1.5rem;
  color: var(--primary-teal);
}

.partes-section-title {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-slate);
}

.partes-btn-rounded {
  border-radius: 12px;
  font-size: 1rem;
}

.partes-btn-rounded--lg {
  font-size: 1.05rem;
}

.partes-btn-icon {
  font-size: 1.2rem;
}

.partes-btn-icon--lg {
  font-size: 1.3rem;
}

.partes-empleado-field {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  background: var(--card-white);
}

.partes-empleado-field-icon {
  color: var(--primary-teal);
  margin-right: 12px;
  font-size: 1.2rem;
}

.partes-empleado-field-content {
  flex-grow: 1;
}

.partes-empleado-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
  display: block;
}

.partes-init-icon {
  width: 80px;
  height: 80px;
  background: rgba(37, 102, 106, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.partes-init-icon i {
  font-size: 2.5rem;
  color: var(--primary-teal);
}

.partes-init-title {
  color: var(--text-slate);
  font-weight: 600;
}

.partes-dashboard-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.partes-dashboard-heading-icon {
  font-size: 1.5rem;
  color: var(--primary-teal);
}

.partes-dashboard-heading {
  font-size: 1.25rem;
  margin: 0;
  color: var(--text-slate);
}

.partes-search-bar-compact {
  grid-template-columns: 1fr auto;
}

.partes-filter-field--mesano {
  flex: 1 1 auto;
  min-width: 200px;
  cursor: pointer;
}

.partes-filter-month-wrap {
  position: relative;
  min-height: 22px;
  display: flex;
  align-items: center;
}

.partes-filter-month-display {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-slate);
  line-height: 1.3;
  pointer-events: none;
  text-transform: capitalize;
}

.partes-filter-month-display.is-placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.partes-filter-month-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  opacity: 0;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-slate);
}

.partes-filter-month-input:disabled {
  cursor: not-allowed;
}

.partes-pdf-wrapper {
  margin-bottom: 24px;
}

.partes-tiempo-mes-card {
  background-color: var(--light-teal);
  border: 1px solid rgba(37, 102, 106, 0.2);
}

.partes-tiempo-mes-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.partes-tiempo-mes-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.partes-tiempo-mes-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.partes-tiempo-mes-sublabel {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.partes-tiempo-mes-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.partes-tiempo-mes-clock {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(37, 102, 106, 0.12);
  color: var(--primary-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.partes-tiempo-mes-clock i {
  font-size: 1.35rem;
}

.partes-tiempo-mes-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background-color: var(--card-white);
  color: var(--primary-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.partes-tiempo-mes-icon i {
  font-size: 1.6rem;
}

.partes-tiempo-mes-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-slate);
}

.partes-tiempo-mes-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-teal);
}

.partes-empty-fichajes-icon {
  width: 60px;
  height: 60px;
  background: var(--surface-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.partes-empty-fichajes-icon i {
  font-size: 2rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.partes-empty-fichajes-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-slate);
}

/* --- Partes Mensuales: cabecera generar --- */
.partes-generar-wrap {
  max-width: 100%;
}

.partes-generar-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 16px;
  margin-bottom: 1.25rem;
}

.partes-generar-heading h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-slate);
}

.partes-generar-heading p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-partes-ver-todos {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--primary-teal);
  background: var(--card-white);
  color: var(--primary-teal);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-partes-ver-todos:hover {
  background: rgba(37, 102, 106, 0.08);
  border-color: var(--primary-teal-hover);
}

.btn-partes-ver-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--primary-teal);
  background: var(--card-white);
  color: var(--primary-teal);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-partes-ver-outline:hover {
  background: rgba(37, 102, 106, 0.08);
}

.btn-partes-ver-outline .ph-caret-right {
  font-size: 0.95rem;
  opacity: 0.8;
}

.partes-generar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.partes-generar-footer-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1 1 240px;
}

.partes-generar-footer-info > i {
  font-size: 1.5rem;
  color: var(--primary-teal);
  flex-shrink: 0;
  margin-top: 2px;
}

.partes-generar-footer-info strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-slate);
  margin-bottom: 2px;
}

.partes-generar-footer-info p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.card-dia-fichaje--ver-mas {
  border-style: dashed;
  border-color: rgba(37, 102, 106, 0.45);
  background: transparent;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.card-dia-fichaje--ver-mas:hover {
  background: rgba(37, 102, 106, 0.06);
  border-color: var(--primary-teal);
}

.card-dia-ver-mas-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px dashed rgba(37, 102, 106, 0.35);
  background: rgba(37, 102, 106, 0.06);
  color: var(--primary-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-dia-ver-mas-icon i {
  font-size: 1.2rem;
}

.card-dia-ver-mas-title {
  font-weight: 700;
  color: var(--text-slate);
  font-size: 0.95rem;
  line-height: 1.2;
}

.card-dia-ver-mas-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dia-tiempo-valor--cero {
  color: #e11d48;
}

.config-tabs-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  border-bottom: 2px solid var(--border-subtle, #e2e8f0);
  padding-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.config-tabs-bar::-webkit-scrollbar {
  display: none;
}

.h-tabs-scroll-wrap {
  position: relative;
}

.h-tabs-scroll-hint {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 12px;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4px;
  background: linear-gradient(
    to right,
    rgba(245, 243, 238, 0) 0%,
    var(--h-tabs-hint-bg, var(--scaffold-bg, #f5f3ee)) 55%,
    var(--h-tabs-hint-bg, var(--scaffold-bg, #f5f3ee)) 100%
  );
  color: var(--primary-teal, #25666a);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 2;
}

.h-tabs-scroll-hint.is-visible {
  opacity: 1;
  visibility: visible;
}

.h-tabs-scroll-hint i {
  font-size: 1.1rem;
  animation: h-tabs-scroll-bounce 1.6s ease-in-out infinite;
}

@keyframes h-tabs-scroll-bounce {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.65;
  }

  50% {
    transform: translateX(4px);
    opacity: 1;
  }
}

.config-tab-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted, #64748b);
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  flex: 0 0 auto;
  white-space: nowrap;
}

.config-tab-btn i {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.config-tab-btn:hover {
  color: var(--primary-teal, #25666a);
  background: rgba(37, 102, 106, 0.05);
}

.config-tab-btn.active {
  border-color: var(--primary-teal, #25666a);
  color: var(--primary-teal, #25666a);
  background: rgba(37, 102, 106, 0.08);
}

.config-tab-btn.active i {
  transform: scale(1.1);
}

.config-tab-pane {
  display: none;
}

.config-tab-pane.active {
  display: block;
}

/* Datos de la empresa + centros de trabajo */
.empresa-datos-card {
  border: 1px solid var(--border-subtle, #e2e8f0);
  overflow: visible;
}

.empresa-datos-hero {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, #f0f9f9 0%, #f8fafc 55%, #fff 100%);
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
}

.empresa-datos-hero-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-teal, #25666a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.empresa-datos-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-slate, #0f172a);
}

.empresa-datos-sub {
  font-size: 0.92rem;
  color: var(--text-muted, #64748b);
  max-width: 42rem;
}

.empresa-datos-body {
  padding: 1.5rem 1.75rem 0.5rem;
}

@media (min-width: 992px) {
  .empresa-datos-body {
    padding: 2rem 2.25rem 0.5rem;
  }
}

.empresa-datos-group-card {
  background: #fff !important;
  border: 1px solid var(--border-subtle, #e2e8f0) !important;
  border-radius: 14px !important;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.06),
    0 4px 14px rgba(15, 23, 42, 0.04) !important;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.empresa-datos-group-card:hover {
  border-color: #dbe3ea !important;
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.07),
    0 8px 22px rgba(15, 23, 42, 0.06) !important;
}

.empresa-datos-group-card.card {
  overflow: visible !important;
}

.empresa-datos-body .empresa-datos-group-card.card:hover {
  transform: none;
}

.empresa-datos-group-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-slate, #0f172a);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  padding-bottom: 0.65rem;
}

.empresa-field-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-slate, #334155);
  margin-bottom: 0.35rem;
}

.empresa-field-control {
  border-radius: 10px;
}

.empresa-datos-sep {
  border-color: var(--border-subtle, #e2e8f0);
  opacity: 1;
}

.empresa-datos-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-teal, #25666a);
  margin-bottom: 0.25rem;
}

.empresa-btn-guardar {
  border-radius: 10px;
}

/* Configuración de correo (SMTP) */
#formCorreoDatos .correo-section-card {
  padding: 1.5rem 1.75rem !important;
  margin-bottom: 1.75rem !important;
}

#formCorreoDatos .correo-section-card:last-of-type {
  margin-bottom: 0 !important;
}

#formCorreoDatos .empresa-datos-group-title {
  margin-bottom: 1.25rem !important;
  padding-bottom: 0.85rem;
}

#formCorreoDatos .correo-form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#formCorreoDatos .correo-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem 1.5rem;
}

@media (min-width: 768px) {
  #formCorreoDatos .correo-form-row--connection {
    grid-template-columns: minmax(0, 1.6fr) minmax(110px, 0.45fr) minmax(150px, 0.55fr);
  }

  #formCorreoDatos .correo-form-row--split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #formCorreoDatos .correo-form-row--delivery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#formCorreoDatos .correo-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

#formCorreoDatos .correo-form-field .empresa-field-label {
  margin-bottom: 0;
}

#formCorreoDatos .correo-form-field .form-control {
  width: 100%;
}

#formCorreoDatos .correo-form-field .correo-field-hint {
  margin: 0.15rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted, #64748b);
}

#formCorreoDatos .correo-form-field--full {
  max-width: 100%;
}

#formCorreoDatos .correo-form-field textarea.form-control {
  min-height: 160px;
  height: auto;
  padding: 0.85rem 1rem;
  line-height: 1.5;
  resize: vertical;
}

#formCorreoDatos .correo-select-control {
  height: 48px;
  border-radius: 10px;
}

#formCorreoDatos .correo-form-actions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
}

.centros-trabajo-wrap {
  border-top: 1px solid var(--border-subtle, #e2e8f0);
  background: #fafbfc;
  padding: 1.25rem 1.75rem 1.5rem;
}

@media (min-width: 992px) {
  .centros-trabajo-wrap {
    padding: 1.5rem 2.25rem 1.75rem;
  }
}

.centros-trabajo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.centros-trabajo-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-slate, #0f172a);
}

.centros-trabajo-hint {
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
  max-width: 36rem;
}

.centros-trabajo-add-btn {
  border-radius: 10px;
  font-weight: 600;
}

/* Contenedor principal de la tabla */
.table-centros-trabajo {
  width: 100%;
  background: var(--card-white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-collapse: collapse;
  /* Fundamental para quitar los espacios feos entre celdas */
  text-align: left;
}

/* Cabeceras (Thead) */
.table-centros-trabajo thead th {
  background-color: #f8fafc;
  /* Gris muy limpio */
  color: #64748b;
  /* Texto sutil para no robar protagonismo */
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

/* Celdas del cuerpo (Tbody) */
.table-centros-trabajo tbody td {
  padding: 16px 20px;
  vertical-align: middle;
  font-size: 0.95rem;
  color: var(--text-slate);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease;
}

/* Quitar el borde inferior de la última fila para que no choque con el border-radius */
.table-centros-trabajo tbody tr:last-child td {
  border-bottom: none;
}

/* Efecto hover al pasar el ratón por la fila */
.table-centros-trabajo tbody tr:hover td {
  background-color: rgba(37, 102, 106, 0.03);
  /* Un levísimo tinte del color principal */
}

/* Ajuste del Badge (Etiqueta PIN/NFC) 
  Sobrescribimos un poco el estilo inline para que se vea más profesional
*/
.table-centros-trabajo .badge {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background-color: var(--surface-muted) !important;
  color: var(--text-slate) !important;
  border: 1px solid var(--border-subtle);
}

/* Ajuste específico del botón "Eliminar" 
  Evitamos que herede los 48px de altura de los botones del formulario
*/
.table-centros-trabajo .btn-outline-danger {
  color: var(--delete-red);
  border: 1px solid rgba(192, 84, 72, 0.3);
  /* Borde rojo muy suave */
  background: transparent;
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 8px;
  font-weight: 600;
  height: auto;
  /* Anulamos el height: 48px global */
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.table-centros-trabajo .btn-outline-danger:hover {
  background: var(--delete-red);
  color: white;
  border-color: var(--delete-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(192, 84, 72, 0.2);
}

.table-centros-trabajo .btn-outline-danger:active {
  transform: translateY(0);
}

.table-centros-trabajo .btn-outline-primary {
  color: var(--primary-teal);
  border: 1px solid rgba(37, 102, 106, 0.3);
  /* Borde teal suave */
  background: transparent;
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 8px;
  font-weight: 600;
  height: auto;
  /* Anulamos el height: 48px global */
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.table-centros-trabajo .btn-outline-primary:hover {
  background: var(--primary-teal);
  color: white;
  border-color: var(--primary-teal);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 102, 106, 0.2);
}

.table-centros-trabajo .btn-outline-primary:active {
  transform: translateY(0);
}

body.dark-theme .table-centros-trabajo .btn-outline-primary {
  color: #3ba4a9;
  border-color: rgba(59, 164, 169, 0.3);
}

body.dark-theme .table-centros-trabajo .btn-outline-primary:hover {
  background: #3ba4a9;
  color: #111;
  border-color: #3ba4a9;
}

.table-centros-trabajo td.text-end {
  white-space: nowrap;
}

/* Gestor de centros de trabajo */
#seccion-centros-trabajo.centros-trabajo-wrap {
  margin-top: 2rem !important;
  padding: 1.5rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(37, 102, 106, 0.035), transparent 38%),
    #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.055);
}

.centros-trabajo-head {
  align-items: center;
  margin-bottom: 1.25rem;
}

.centros-trabajo-heading,
.centros-trabajo-title-row,
.centro-name-cell {
  display: flex;
  align-items: center;
}

.centros-trabajo-heading {
  gap: 0.9rem;
}

.centros-trabajo-title-row {
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.25rem;
}

.centros-trabajo-icon {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(37, 102, 106, 0.1);
  color: var(--primary-teal);
  font-size: 1.35rem;
}

.centros-trabajo-title {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}

.centros-trabajo-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(37, 102, 106, 0.09);
  color: var(--primary-teal);
  font-size: 0.72rem;
  font-weight: 700;
}

.centros-trabajo-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.65rem 1rem;
  border-radius: 10px !important;
}

.centros-trabajo-table-shell {
  overflow: hidden;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 13px;
  background: #fff;
}

#seccion-centros-trabajo .table-centros-trabajo {
  border: 0;
  border-radius: 0;
}

#seccion-centros-trabajo .table-centros-trabajo thead th {
  padding: 12px 18px;
  background: #f7f9fa;
  font-size: 0.7rem;
}

#seccion-centros-trabajo .table-centros-trabajo tbody td {
  padding: 14px 18px;
}

.centro-name-cell {
  gap: 0.75rem;
}

.centro-row-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #f0f6f6;
  color: var(--primary-teal);
  font-size: 1rem;
}

.table-centros-trabajo .centro-tipo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
}

.table-centros-trabajo .centro-tipo--nfc {
  background: #eef2ff !important;
  color: #4f46e5 !important;
  border-color: #dfe3ff;
}

.table-centros-trabajo .btn-del-centro-trabajo,
.table-centros-trabajo .btn-edit-centro-trabajo {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  font-size: 1rem;
}

.table-centros-trabajo .btn-edit-centro-trabajo {
  margin-right: 0.35rem;
}

.centros-empty-row td {
  padding: 0 !important;
}

.centros-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.4rem 1rem;
  color: var(--text-muted, #64748b);
  text-align: center;
}

.centros-empty strong {
  margin: 0.65rem 0 0.25rem;
  color: var(--text-slate, #334155);
}

.centros-empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #eef5f5;
  color: var(--primary-teal);
  font-size: 1.25rem;
}

.centro-modal {
  max-width: 540px !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 18px !important;
  border: 1px solid rgba(37, 102, 106, 0.12);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

#modalCentroTrabajoNuevo.modal-overlay {
  align-items: center;
}

/* La regla global de Choices habilita overflow visible y elimina visualmente
   las esquinas del modal. Aquí el menú cabe dentro, así que conservamos el recorte. */
.modal-content.centro-modal:has(.choices.is-open) {
  overflow: hidden !important;
}

.centro-modal-header {
  margin-bottom: 0 !important;
  padding: 1.5rem 1.75rem !important;
  background: linear-gradient(135deg, #eef7f7 0%, #f8fbfb 58%, #fff 100%);
  border-bottom: 1px solid rgba(37, 102, 106, 0.1);
}

.centro-modal-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}

.centro-modal-title-wrap h2 {
  margin: 0 0 0.3rem;
  color: var(--text-slate, #334155);
  font-size: 1.2rem;
  line-height: 1.25;
}

.centro-modal-title-wrap p {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.84rem;
  line-height: 1.45;
}

.centro-modal-icon {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--primary-teal), #1d5458);
  color: #fff;
  font-size: 1.3rem;
  box-shadow: 0 8px 18px rgba(37, 102, 106, 0.2);
}

.centro-modal-header .modal-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: -0.25rem -0.35rem 0 0.5rem;
  border: 1px solid transparent;
  font-size: 1.1rem;
}

.centro-modal-header .modal-close:hover {
  color: var(--primary-teal);
  background: rgba(37, 102, 106, 0.08);
  border-color: rgba(37, 102, 106, 0.12);
}

.centro-modal-body {
  padding: 1.75rem !important;
}

.centro-modal-body .mb-4 {
  margin-bottom: 1.35rem !important;
}

.centro-modal-body .form-label {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--text-slate, #334155);
  font-size: 0.84rem;
  font-weight: 650;
}

.centro-modal-body .form-control {
  min-height: 48px;
  padding-inline: 0.95rem;
  border-radius: 11px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.centro-modal-body .form-control:focus {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.12);
}

.centro-modal-help {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: 0.55rem;
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  line-height: 1.4;
}

.centro-modal-help .ph {
  margin-top: 0.08rem;
  color: var(--primary-teal);
  font-size: 0.9rem;
}

.centro-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin: 1.65rem -1.75rem -1.75rem;
  padding: 1.1rem 1.75rem;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
  background: #f8fafb;
}

.centro-modal-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding-inline: 1.15rem;
  border-radius: 10px;
  font-weight: 650;
}

@media (max-width: 640px) {
  #seccion-centros-trabajo.centros-trabajo-wrap {
    padding: 1rem;
  }

  .centros-trabajo-head,
  .centros-trabajo-add-btn {
    width: 100%;
  }

  #seccion-centros-trabajo .table-centros-trabajo thead th:nth-child(2),
  #seccion-centros-trabajo .table-centros-trabajo tbody td:nth-child(2) {
    display: none;
  }

  #modalCentroTrabajoNuevo.modal-overlay {
    align-items: center;
    padding: 16px;
  }

  .centro-modal {
    max-width: none !important;
    border-radius: 16px !important;
  }

  .centro-modal-header,
  .centro-modal-body {
    padding: 1.25rem !important;
  }

  .centro-modal-icon {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .centro-modal-actions {
    margin: 1.4rem -1.25rem -1.25rem;
    padding: 1rem 1.25rem;
  }

  .centro-modal-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

body.dark-theme .centro-modal-header {
  background: linear-gradient(135deg, rgba(37, 102, 106, 0.2), rgba(37, 102, 106, 0.06));
}

body.dark-theme .centro-modal-actions {
  background: rgba(15, 23, 42, 0.22);
}

/* Tabla de franjas horarias: sin recorte de desplegables */
.table-responsive--franjas {
  overflow: visible;
}

.table-franjas-horario {
  overflow: visible;
}

.table-franjas-horario tbody td {
  overflow: visible;
  vertical-align: middle;
  padding: 12px 14px;
}

.table-franjas-horario thead th {
  padding: 12px 14px;
}

.table-franjas-horario .franja-col-dia {
  min-width: 150px;
  width: 150px;
}

.table-franjas-horario .franja-col-hora {
  min-width: 120px;
}

.table-franjas-horario .franja-col-descanso {
  min-width: 108px;
}

.table-franjas-horario .franja-col-efectivo {
  min-width: 76px;
  white-space: nowrap;
}

.table-franjas-horario .franja-col-dia .choices__list--single .choices__item {
  white-space: nowrap;
}

.table-franjas-horario .form-control {
  min-height: 42px;
  height: auto;
}

.table-franjas-horario input[type="time"].form-control {
  padding-right: 0.5rem;
}

.table-franjas-horario .app-choices--form .choices__inner {
  min-height: 42px;
}

.table-franjas-horario .franja-acciones {
  white-space: nowrap;
}

.table-franjas-horario .franja-acciones .btn + .btn {
  margin-left: 6px;
}

.table-franjas-horario .franja-drag-col {
  width: 36px;
  padding: 0 !important;
}

.table-franjas-horario .franja-drag-cell {
  width: 36px;
  padding: 8px 4px 8px 10px !important;
  vertical-align: middle;
}

.franja-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: grab;
  padding: 0;
  font-size: 1.1rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.franja-drag-handle:hover {
  background-color: rgba(37, 102, 106, 0.08);
  color: var(--primary-teal);
}

.franja-drag-handle:active {
  cursor: grabbing;
}

.table-franjas-horario tr.franja-row--dragging {
  opacity: 0.5;
}

.table-franjas-horario tr.franja-row--drag-over td {
  box-shadow: inset 0 2px 0 var(--primary-teal);
}

/* Modal Tab Navigation Styling */
.modal-tabs-nav {
  display: flex;
  flex-wrap: nowrap;
  border-bottom: 2px solid var(--border-subtle, #e2e8f0);
  margin-bottom: 20px;
  gap: 15px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  --h-tabs-hint-bg: var(--card-white, #ffffff);
}

.modal-tabs-nav::-webkit-scrollbar {
  display: none;
}

.modal-tab-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  background: none;
  border: none;
  padding: 10px 15px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  margin-bottom: -2px;
}

.modal-tab-btn:hover:not(:disabled) {
  color: var(--primary-teal, #25666a);
}

.modal-tab-btn.active {
  color: var(--primary-teal, #25666a);
  border-bottom-color: var(--primary-teal, #25666a);
}

.modal-tab-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--text-muted, #64748b);
}

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

.modal-tab-content.active {
  display: block;
}

/* Custom buttons inside table */
.btn-sm-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1rem;
}

/* === Dashboard Presencia === */
.dashboard-presencia-page {
  --dashboard-bg: var(--bg-scaffold);
  --dashboard-panel-bg: var(--card-white);
  --dashboard-shadow: var(--shadow-sm);
  --dashboard-shadow-soft: var(--shadow-sm);
  background: var(--dashboard-bg) !important;
}

.dashboard-presencia-page .dashboard-presencia-body {
  padding: 0.75rem 1.25rem 2rem;
  background: var(--dashboard-bg);
}

.dashboard-presencia-page .dashboard-page-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 1rem 1.25rem 0;
  padding: 0.85rem 1.25rem;
  background: var(--bg-scaffold);
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  box-shadow: none;
}

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

@media (max-width: 640px) {
  .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-summary-card {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.dashboard-summary-card:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
}

.dashboard-summary-card.trabajando:hover {
  border-color: #86efac;
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.16);
  background: #e8fdf0;
}

.dashboard-summary-card.ausente:hover {
  border-color: #fda4af;
  box-shadow: 0 12px 28px rgba(244, 63, 94, 0.14);
  background: #ffeef0;
}

.dashboard-summary-card.trabajando {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.dashboard-summary-card.ausente {
  background: #fff1f2;
  border-color: #fecdd3;
}

.dashboard-summary-content {
  min-width: 0;
}

.dashboard-summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  background: var(--card-white);
  border: 1px solid var(--border-subtle);
}

.dashboard-summary-card.trabajando .dashboard-summary-icon {
  color: #16a34a;
  border-color: #bbf7d0;
}

.dashboard-summary-card.ausente .dashboard-summary-icon {
  color: #e11d48;
  border-color: #fecdd3;
}

.dashboard-summary-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.dashboard-summary-value {
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.dashboard-summary-card.trabajando .dashboard-summary-value {
  color: #16a34a;
}

.dashboard-summary-card.ausente .dashboard-summary-value {
  color: #e11d48;
}

.dashboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.dashboard-search-card {
  flex: 1 1 280px;
  background: var(--card-white);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 4px;
}

.dashboard-search-box {
  border-radius: 10px;
}

.dashboard-search-input {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 0.92rem;
}

.dashboard-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 6px;
  background: var(--card-white);
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.dashboard-filter-pill {
  border: 1px solid transparent;
  background: var(--surface-muted);
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dashboard-filter-pill:hover {
  border-color: rgba(37, 102, 106, 0.28);
  color: var(--primary-teal, #25666a);
  background: #eef6f6;
  box-shadow: 0 4px 12px rgba(37, 102, 106, 0.1);
}

.dashboard-filter-pill.active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.dashboard-filter-pill[data-filter="working"].active {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

.dashboard-filter-pill[data-filter="absent"].active {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #be123c;
}

.dashboard-section {
  margin-bottom: 1.75rem;
}

.dashboard-section-header {
  margin-bottom: 0.85rem;
  padding: 0 0.25rem;
}

.dashboard-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-section-count {
  font-size: 0.88rem;
  font-weight: 700;
  color: #94a3b8;
}

.dashboard-section-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dashboard-section-dot--working {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.22);
  animation: dashboard-pulse 2s ease-in-out infinite;
}

.dashboard-section-dot--absent {
  background: #94a3b8;
}

@keyframes dashboard-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.22); }
  50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.08); }
}

.dashboard-section-panel {
  padding: 1.15rem 1.1rem 0.5rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background-color: var(--card-white);
}

.dashboard-section-panel--absent {
  background-color: var(--card-white);
}

.dashboard-section-empty {
  margin: 0.5rem 0 1rem;
  padding: 2rem 1.25rem;
  border-radius: 12px;
  background: var(--surface-muted);
  border: 1px dashed var(--border-subtle);
  color: #64748b;
  font-size: 0.92rem;
  text-align: center;
}

.dashboard-empty-search {
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--card-white);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.dashboard-presencia-page .dashboard-emp-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

@media (min-width: 640px) {
  .dashboard-presencia-page .dashboard-emp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .dashboard-presencia-page .dashboard-emp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .dashboard-presencia-page .dashboard-emp-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.dashboard-presencia-page .dashboard-emp-grid-item {
  min-width: 0;
}

.dashboard-presencia-page .dashboard-emp-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 14px;
  padding: 0.7rem 0.8rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 0;
  height: 100%;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
  cursor: pointer;
  position: relative;
}

.dashboard-presencia-page .dashboard-emp-card--working {
  border-color: rgba(34, 197, 94, 0.22);
}

.dashboard-presencia-page .dashboard-emp-card--absent {
  border-color: rgba(15, 23, 42, 0.08);
}

.dashboard-presencia-page .dashboard-emp-card--working:hover {
  border-color: rgba(34, 197, 94, 0.5);
  background: #f4fdf7;
  box-shadow:
    0 12px 30px rgba(34, 197, 94, 0.18),
    0 0 0 1px rgba(34, 197, 94, 0.14);
}

.dashboard-presencia-page .dashboard-emp-card--absent:hover {
  border-color: rgba(37, 102, 106, 0.38);
  background: #f8fafc;
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(37, 102, 106, 0.1);
}

.dashboard-presencia-page .dashboard-emp-card--working:hover .emp-action-btn--working {
  background: #dcfce7;
  border-color: rgba(34, 197, 94, 0.35);
}

.dashboard-presencia-page .dashboard-emp-card--absent:hover .emp-action-btn--absent {
  background: #eef6f6;
  border-color: rgba(37, 102, 106, 0.22);
  color: var(--primary-teal, #25666a);
}

.dashboard-presencia-page .emp-status-dot {
  width: 6px;
  height: 6px;
}

.dashboard-emp-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  padding: 1.15rem 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  position: relative;
}

.dashboard-emp-card--working {
  border-color: rgba(34, 197, 94, 0.18);
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.08);
}

.dashboard-emp-card--absent {
  border-color: rgba(15, 23, 42, 0.06);
  background: #ffffff;
  opacity: 1;
}

.dashboard-emp-card--working:hover {
  border-color: rgba(34, 197, 94, 0.32);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.12);
}

.dashboard-emp-card--absent:hover {
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.dashboard-presencia-page .dashboard-emp-card__top {
  margin-bottom: 0.1rem;
}

.dashboard-emp-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0.25rem;
}

.dashboard-presencia-page .emp-status-pill {
  padding: 3px 8px;
  font-size: 0.68rem;
  gap: 4px;
}

.emp-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.emp-status-pill--working {
  background: rgba(220, 252, 231, 0.95);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.emp-status-pill--absent {
  background: rgba(255, 228, 230, 0.95);
  color: #e11d48;
  border: 1px solid rgba(244, 63, 94, 0.18);
}

.emp-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: dashboard-pulse 2s ease-in-out infinite;
}

.dashboard-presencia-page .dashboard-emp-avatar {
  width: 30px;
  height: 30px;
  font-size: 0.95rem;
}

.dashboard-emp-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.dashboard-emp-avatar--working {
  background: rgba(220, 252, 231, 0.9);
  color: #16a34a;
}

.dashboard-emp-avatar--absent {
  background: #f1f5f9;
  color: #94a3b8;
}

.dashboard-presencia-page .dashboard-emp-name {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-emp-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.dashboard-presencia-page .dashboard-emp-meta {
  font-size: 0.72rem;
  line-height: 1.2;
}

.dashboard-emp-meta {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
}

.dashboard-presencia-page .emp-yearly-hours-badge {
  font-size: 0.68rem;
  padding: 3px 8px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-yearly-hours-badge {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(219, 234, 254, 0.85);
  color: #2563eb;
  padding: 5px 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border: 1px solid rgba(59, 130, 246, 0.12);
}

.dashboard-presencia-page .emp-last-punch {
  margin-top: 0;
  font-size: 0.72rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-last-punch {
  margin-top: 0.1rem;
  font-size: 0.8rem;
  color: #475569;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.emp-last-punch i {
  color: #94a3b8;
  margin-top: 2px;
}

.dashboard-presencia-page .emp-action-btn {
  margin-top: 0.15rem;
  padding: 6px 8px;
  font-size: 0.72rem;
  border-radius: 9px;
}

.emp-action-btn {
  margin-top: auto;
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  color: var(--primary-teal, #25666a);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.emp-action-btn--working {
  background: rgba(240, 253, 244, 0.9);
  border-color: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.emp-action-btn--absent {
  background: #fafafa;
  color: #64748b;
}

.dashboard-emp-card:hover .emp-action-btn--working {
  background: rgba(220, 252, 231, 0.95);
  border-color: rgba(34, 197, 94, 0.28);
}

.dashboard-emp-card:hover .emp-action-btn--absent {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
}

@media (max-width: 768px) {
  .dashboard-presencia-page .dashboard-page-topbar {
    margin: 0.75rem 0.75rem 0;
    padding: 0.85rem 1rem;
  }

  .dashboard-presencia-page .dashboard-presencia-body {
    padding: 0.75rem;
  }

  .dashboard-filter-pills {
    width: 100%;
    justify-content: center;
  }
}

/* === Modal rendimiento semanal (SweetAlert) === */
.weekly-performance-popup {
  border-radius: 16px !important;
  padding: 0 !important;
  overflow: visible !important;
}

.weekly-performance-title {
  font-size: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.weekly-performance-html {
  padding: 0 !important;
  margin: 0 !important;
  text-align: left !important;
  width: 100% !important;
  overflow: visible !important;
}

.weekly-performance-popup .weekly-performance-close {
  position: absolute !important;
  top: 0.85rem !important;
  right: 0.85rem !important;
  margin: 0 !important;
  color: var(--text-muted) !important;
  z-index: 2;
}

.weekly-performance-popup .weekly-performance-close:hover {
  color: var(--delete-red) !important;
}

.weekly-modal-wrapper {
  text-align: left;
  padding: 2.85rem 1.5rem 1.5rem;
}

.weekly-modal-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  padding-bottom: 1.15rem;
  margin-bottom: 1.15rem;
}

.weekly-modal-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-teal, #25666a);
}

.weekly-modal-emp-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-slate, #0f172a);
  margin: 0 0 6px;
  line-height: 1.2;
}

.weekly-modal-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

.weekly-modal-range i {
  color: var(--primary-teal, #25666a);
  font-size: 1rem;
}

.weekly-modal-total-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.65rem;
  background: rgba(37, 102, 106, 0.08);
  border: 1px solid rgba(37, 102, 106, 0.2);
  padding: 12px 16px;
  border-radius: 12px;
}

.weekly-modal-total-card .total-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary-teal, #25666a);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.weekly-modal-total-card .total-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-slate, #0f172a);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.weekly-modal-section-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-slate, #0f172a);
  margin: 0 0 0.85rem;
}

.weekly-modal-days-grid {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  overflow-x: auto;
  overflow-y: visible;
  padding: 6px 2px 8px;
}

.weekly-modal-days-grid::-webkit-scrollbar {
  height: 4px;
}

.weekly-modal-days-grid::-webkit-scrollbar-thumb {
  background-color: var(--border-subtle, #cbd5e1);
  border-radius: 4px;
}

.weekly-modal-day-col {
  flex: 1;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px 12px;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 12px;
  background: var(--surface-muted, #f1f5f9);
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.weekly-modal-day-col.active.is-clickable {
  cursor: pointer;
}

.weekly-modal-day-col.active.is-clickable:focus-visible {
  outline: 2px solid rgba(37, 102, 106, 0.45);
  outline-offset: 2px;
}

.day-detail-popup-title {
  display: none;
}

.day-detail-popup-html {
  margin: 0;
  padding: 0;
}

.day-detail-modal {
  text-align: left;
}

.day-detail-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.day-detail-title {
  margin: 0 0 16px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.day-detail-intervals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-detail-interval-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.day-detail-interval-time {
  display: block;
  font-size: 1rem;
  color: #0f172a;
}

.day-detail-interval-center {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.82rem;
  color: #64748b;
}

.day-detail-interval-duration {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 102, 106, 0.12);
  color: #25666a;
  font-size: 0.82rem;
  font-weight: 700;
}

.day-detail-loading,
.day-detail-empty,
.day-detail-error {
  text-align: center;
  padding: 28px 12px;
  color: #64748b;
}

.day-detail-error {
  color: #e11d48;
}

.spin-animation {
  animation: dashboard-spin 0.9s linear infinite;
}

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

.weekly-modal-day-col.is-today:not(.active) {
  border-color: rgba(37, 102, 106, 0.28);
}

.weekly-modal-day-col.active {
  border-color: rgba(37, 102, 106, 0.38);
  background: var(--card-white);
  box-shadow: inset 0 0 0 1px rgba(37, 102, 106, 0.06);
}

.weekly-modal-day-col.active:hover {
  border-color: rgba(37, 102, 106, 0.55);
  box-shadow: 0 0 0 2px rgba(37, 102, 106, 0.12);
}

.weekly-modal-day-col .day-name {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weekly-modal-day-col.active .day-name {
  color: var(--primary-teal, #25666a);
}

.weekly-modal-day-col .day-number-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.14);
  color: var(--text-muted, #64748b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  margin: 8px 0;
}

.weekly-modal-day-col.is-today .day-number-circle {
  box-shadow: 0 0 0 2px rgba(37, 102, 106, 0.2);
}

.weekly-modal-day-col.active .day-number-circle {
  background: rgba(37, 102, 106, 0.14);
  color: var(--primary-teal, #25666a);
}

.weekly-modal-day-col .day-duration {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-muted, #94a3b8);
  font-variant-numeric: tabular-nums;
}

.weekly-modal-day-col.active .day-duration {
  color: var(--primary-teal, #25666a);
}

/* Campos obligatorios (Subtle highlighting) */
.form-control[required],
select[required] {
  border-left: 3px solid var(--primary-teal, #25666a) !important;
  background-color: #fafbfc !important;
}

/* Soporte para selectores Choices obligatorios */
select[required] + .choices .choices__inner {
  border-left: 3px solid var(--primary-teal, #25666a) !important;
  background-color: #fafbfc !important;
}

.required-asterisk {
  color: #c05448;
  font-weight: bold;
  margin-left: 2px;
}

/* ====================== CABECERA DERECHA (TOPBAR ACTIONS) ====================== */
.topbar-right-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-action-btn {
  background: var(--card-white);
  border: 1px solid var(--border-subtle);
  color: var(--text-slate);
  font-size: 1.2rem;
  cursor: pointer;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  outline: none;
  overflow: visible;
}

.topbar-action-btn:hover {
  background: var(--surface-muted);
  border-color: var(--primary-teal);
  color: var(--primary-teal);
}

.topbar-badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(28%, -28%);
  display: none;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.32rem;
  font-size: 0.625rem;
  font-weight: 700;
}

/* Contenedor de desplegable de Perfil */
.profile-dropdown-container {
  position: relative;
  display: inline-block;
}

.profile-trigger-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 12px;
  transition: background-color 0.2s ease;
  text-align: left;
  outline: none;
}

.profile-trigger-btn:hover {
  background-color: rgba(37, 102, 106, 0.06);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.profile-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.profile-name {
  font-weight: 700;
  color: var(--text-slate);
  font-size: 0.92rem;
}

.profile-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-arrow {
  color: var(--text-slate);
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.profile-dropdown-container.is-open .profile-arrow {
  transform: rotate(180deg);
}

/* Menú desplegable */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: var(--card-white);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  min-width: 190px;
  padding: 8px;
  display: none;
  z-index: 100;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-dropdown-container.is-open .profile-dropdown-menu {
  display: block;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text-slate);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.15s ease;
}

.profile-menu-item:hover {
  background-color: rgba(37, 102, 106, 0.06);
  color: var(--primary-teal);
}

.profile-menu-item i {
  font-size: 1.1rem;
}

.profile-menu-divider {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: 6px 0;
}

.profile-menu-item.logout-item {
  color: var(--delete-red);
}

.profile-menu-item.logout-item:hover {
  background-color: rgba(192, 84, 72, 0.08);
  color: var(--delete-red);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====================== MODOS OSCUROS (DARK THEME OVERRIDES) ====================== */
body.dark-theme {
  --bg-scaffold: #12181a;
  --primary-teal: #3ba4a9;
  --primary-teal-hover: #4dc5ca;
  --primary-teal-light: rgba(59, 164, 169, 0.15);
  --text-slate: #e2e8f0;
  --card-white: #1e2628;
  --border-subtle: #2d383b;
  --delete-red: #e06c5f;
  --text-muted: #94a3b8;
  --surface-muted: #2d383b;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Ajustes específicos de componentes en Modo Oscuro */
body.dark-theme .topbar-action-btn {
  background: #1e2628;
}

body.dark-theme .form-control[required],
body.dark-theme select[required],
body.dark-theme select[required] + .choices .choices__inner {
  background-color: var(--input-bg, #263336) !important;
}

body.dark-theme .app-choices--default .choices__list--dropdown,
body.dark-theme .app-choices--form .choices__list--dropdown,
body.dark-theme .app-choices--year .choices__list--dropdown {
  background-color: #1e2628 !important;
  color: #e2e8f0 !important;
  border-color: #2d383b !important;
}

body.dark-theme .app-choices--default .choices__list--dropdown .choices__item--selectable.is-highlighted,
body.dark-theme .app-choices--form .choices__list--dropdown .choices__item--selectable.is-highlighted,
body.dark-theme .app-choices--year .choices__list--dropdown .choices__item--selectable.is-highlighted {
  background-color: rgba(59, 164, 169, 0.15) !important;
  color: #3ba4a9 !important;
}

body.dark-theme .table-centros-trabajo thead th {
  background-color: #1a2022;
  color: #94a3b8;
}

body.dark-theme .table-centros-trabajo tbody tr:hover td {
  background-color: rgba(59, 164, 169, 0.05);
}

body.dark-theme .modal-content {
  background-color: #1e2628;
  border-color: #2d383b;
}

body.dark-theme .form-control {
  background-color: var(--input-bg, #263336);
  border-color: #2d383b;
  color: #e2e8f0;
}

body.dark-theme .form-control:focus {
  border-color: var(--primary-teal);
  background-color: var(--input-bg, #263336);
  color: #e2e8f0;
}

body.dark-theme .notifications-panel {
  background-color: #1e2628;
  border-left-color: #2d383b;
}

body.dark-theme .notifications-item {
  border-bottom-color: #2d383b;
}

body.dark-theme .notifications-item:hover {
  background-color: rgba(59, 164, 169, 0.05);
}

body.dark-theme .swal2-popup {
  background-color: #1e2628 !important;
  color: #e2e8f0 !important;
}

body.dark-theme .swal2-title,
body.dark-theme .swal2-html-container {
  color: #e2e8f0 !important;
}

body.dark-theme .config-card-icon {
  background: rgba(59, 164, 169, 0.15);
  color: var(--primary-teal);
}

body.dark-theme .stat-chip {
  background: rgba(59, 164, 169, 0.15) !important;
}

body.dark-theme .weekly-performance-popup {
  background: var(--card-white) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .weekly-performance-close {
  color: var(--text-muted) !important;
}

body.dark-theme .weekly-performance-close:hover {
  color: var(--delete-red) !important;
}

body.dark-theme .weekly-modal-kicker,
body.dark-theme .weekly-modal-total-card .total-label {
  color: var(--primary-teal) !important;
}

body.dark-theme .weekly-modal-emp-name,
body.dark-theme .weekly-modal-section-title,
body.dark-theme .weekly-modal-total-card .total-value {
  color: var(--text-slate) !important;
}

body.dark-theme .weekly-modal-range {
  color: var(--text-muted) !important;
}

body.dark-theme .weekly-modal-total-card {
  background: rgba(69, 184, 189, 0.12) !important;
  border-color: rgba(69, 184, 189, 0.28) !important;
}

body.dark-theme .weekly-modal-day-col {
  background: var(--input-bg) !important;
  border-color: var(--border-subtle) !important;
}

body.dark-theme .weekly-modal-day-col .day-number-circle {
  background: rgba(148, 163, 184, 0.14) !important;
  color: var(--text-muted) !important;
}

body.dark-theme .weekly-modal-day-col.active {
  background: var(--card-white) !important;
  border-color: rgba(69, 184, 189, 0.45) !important;
  box-shadow: inset 0 0 0 1px rgba(69, 184, 189, 0.1) !important;
}

body.dark-theme .weekly-modal-day-col.active:hover {
  box-shadow: 0 0 0 2px rgba(69, 184, 189, 0.18) !important;
}

body.dark-theme .weekly-modal-day-col.active .day-name,
body.dark-theme .weekly-modal-day-col.active .day-duration {
  color: var(--primary-teal) !important;
}

body.dark-theme .weekly-modal-day-col.active .day-number-circle {
  background: rgba(69, 184, 189, 0.18) !important;
  color: #b8f0f2 !important;
}

body.dark-theme .weekly-modal-day-col.is-today:not(.active) {
  border-color: rgba(69, 184, 189, 0.28) !important;
}

body.dark-theme .clean-input {
  color: #e2e8f0 !important;
}

body.dark-theme .card,
body.dark-theme .module-card,
body.dark-theme .config-card,
body.dark-theme .table-custom,
body.dark-theme .notifications-panel__empty {
  background-color: var(--card-white) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .table-custom thead th {
  background-color: #1a2022 !important;
  color: #94a3b8 !important;
}

body.dark-theme .table-custom tbody tr:hover td {
  background-color: rgba(59, 164, 169, 0.05) !important;
}

body.dark-theme .btn-icon:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* === INCIDENCIAS: LISTA DESPLEGABLE POR EMPLEADO === */
.incidencias-empleado-card {
  overflow: hidden;
  padding: 0;
}

.incidencias-empleado-header {
  width: 100%;
  border: none;
  background: transparent;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  text-align: left;
}

.incidencias-empleado-header:hover {
  background: rgba(37, 102, 106, 0.04);
}

.incidencias-empleado-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.incidencias-empleado-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(37, 102, 106, 0.1);
  color: var(--primary-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.incidencias-empleado-avatar i {
  font-size: 1.5rem;
}

.incidencias-empleado-name {
  font-weight: 700;
  color: var(--text-slate);
  font-size: 1.05rem;
}

.incidencias-empleado-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.incidencias-empleado-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.incidencias-count-badge {
  background-color: rgba(192, 84, 72, 0.1);
  color: #c05448;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.incidencias-caret {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.incidencias-empleado-card.is-expanded .incidencias-caret {
  transform: rotate(180deg);
}

.incidencias-empleado-detail {
  border-top: 1px solid var(--border-subtle);
  background: #f8fafc;
  padding: 14px 16px 16px;
}

.incidencias-detail-loading,
.incidencias-detail-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.incidencias-detail-empty.is-error {
  color: var(--delete-red);
}

.incidencia-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--card-white);
}

.incidencia-row:last-child {
  margin-bottom: 0;
}

.incidencia-row-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 260px;
}

.incidencia-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(192, 84, 72, 0.1);
  color: #c05448;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.incidencia-row-icon i {
  font-size: 1.2rem;
}

.incidencia-row-title {
  font-weight: 700;
  color: var(--text-slate);
  font-size: 0.98rem;
  margin-bottom: 2px;
}

.incidencia-row-meta,
.incidencia-row-date {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.incidencia-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .incidencia-row {
    flex-direction: column;
    align-items: stretch;
  }

  .incidencia-row-actions {
    justify-content: stretch;
  }

  .incidencia-row-actions .btn-resolver-solicitud {
    flex: 1;
    justify-content: center;
  }
}

body.dark-theme .incidencias-empleado-detail {
  background: rgba(255, 255, 255, 0.03);
}

body.dark-theme .incidencias-empleado-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.hor-resumen-semanal {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
}

.hor-semana-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hor-semana-head i {
  font-size: 1rem;
  color: var(--primary-teal);
}

.hor-semana-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 1200px) {
  .hor-semana-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .hor-semana-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hor-dia-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--card-white);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.hor-dia-card:hover {
  box-shadow: 0 4px 14px rgba(37, 102, 106, 0.08);
}

.hor-dia-card--activo {
  border-top: 3px solid var(--primary-teal);
}

.hor-dia-card--libre {
  background: #f8fafc;
}

.hor-dia-card--finde.hor-dia-card--libre {
  background: #f1f5f9;
}

.hor-dia-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hor-dia-card__dia {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-slate);
}

.hor-dia-card__badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 102, 106, 0.12);
  color: var(--primary-teal);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.hor-dia-card__estado {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hor-dia-card__estado i {
  font-size: 1rem;
  opacity: 0.75;
}

.hor-dia-card__franjas {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hor-franja-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(37, 102, 106, 0.06);
  color: var(--text-slate);
  font-size: 0.78rem;
  line-height: 1.35;
}

.hor-franja-chip__time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.hor-franja-chip__time i,
.hor-franja-chip i {
  flex-shrink: 0;
  color: var(--primary-teal);
  font-size: 0.9rem;
}

.hor-franja-chip__desc {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(37, 102, 106, 0.1);
  color: var(--primary-teal);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

body.dark-theme .hor-resumen-semanal {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
}

body.dark-theme .hor-dia-card {
  background: rgba(255, 255, 255, 0.03);
}

body.dark-theme .hor-dia-card--libre,
body.dark-theme .hor-dia-card--finde.hor-dia-card--libre {
  background: rgba(255, 255, 255, 0.02);
}

body.dark-theme .hor-franja-chip {
  background: rgba(59, 164, 169, 0.12);
}

/* === BOTONES DE RESOLUCIÓN DE SOLICITUDES === */
.btn-resolver-solicitud {
  border: 1px solid transparent;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.btn-resolver-solicitud.btn-aprobar {
  border-color: var(--primary-teal, #25666a);
  background: rgba(37, 102, 106, 0.05);
  color: var(--primary-teal, #25666a);
}

.btn-resolver-solicitud.btn-aprobar:hover {
  background: var(--primary-teal, #25666a);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 102, 106, 0.15);
}

.btn-resolver-solicitud.btn-rechazar {
  border-color: var(--delete-red, #c05448);
  background: rgba(192, 84, 72, 0.05);
  color: var(--delete-red, #c05448);
}

.btn-resolver-solicitud.btn-rechazar:hover {
  background: var(--delete-red, #c05448);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(192, 84, 72, 0.15);
}

.btn-resolver-solicitud.btn-mantener {
  border-color: var(--border-subtle, #cbd5e1);
  background: var(--card-white, #fff);
  color: var(--text-muted, #7a8a8e);
}

.btn-resolver-solicitud.btn-mantener:hover {
  background: var(--surface-muted, #e8ecec);
  color: var(--text-slate, #2c3e40);
  transform: translateY(-1px);
}

/* Estilos de botones de resolución en tema oscuro */
body.dark-theme .btn-resolver-solicitud.btn-aprobar {
  border-color: var(--primary-teal);
  background: rgba(59, 164, 169, 0.1);
  color: var(--primary-teal);
}

body.dark-theme .btn-resolver-solicitud.btn-aprobar:hover {
  background: var(--primary-teal);
  color: #111 !important;
}

body.dark-theme .btn-resolver-solicitud.btn-rechazar {
  border-color: var(--delete-red);
  background: rgba(224, 108, 95, 0.1);
  color: var(--delete-red);
}

body.dark-theme .btn-resolver-solicitud.btn-rechazar:hover {
  background: var(--delete-red);
  color: white !important;
}

/* === TARJETAS DE SOLICITUDES (contraste claro/oscuro) === */
.solicitud-card-fechas {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary-teal);
  margin-bottom: 2px;
}

.solicitud-card-motivo {
  font-size: 0.85rem;
  color: var(--text-slate);
  opacity: 0.88;
}

.solicitud-card-saldo,
.solicitud-card-aviso {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  border: 1px solid transparent;
}

.solicitud-card-saldo--ok {
  color: #1a5c60;
  background: rgba(37, 102, 106, 0.12);
  border-color: rgba(37, 102, 106, 0.28);
}

.solicitud-card-saldo--warning {
  color: #7a5200;
  background: rgba(162, 122, 0, 0.14);
  border-color: rgba(162, 122, 0, 0.35);
}

.solicitud-card-saldo--danger {
  color: #8f3428;
  background: rgba(192, 84, 72, 0.14);
  border-color: rgba(192, 84, 72, 0.35);
}

.solicitud-card-aviso {
  color: #7a5200;
  background: rgba(162, 122, 0, 0.14);
  border-color: rgba(162, 122, 0, 0.35);
}

body.dark-theme .solicitud-card-fechas {
  color: #7ee8ec;
}

body.dark-theme .solicitud-card-motivo {
  color: #d5e3ec;
  opacity: 1;
}

body.dark-theme .solicitud-card-saldo--ok {
  color: #b8f4f7;
  background: rgba(69, 184, 189, 0.22);
  border-color: rgba(126, 232, 236, 0.45);
}

body.dark-theme .solicitud-card-saldo--warning {
  color: #ffd98a;
  background: rgba(255, 193, 77, 0.16);
  border-color: rgba(255, 211, 122, 0.45);
}

body.dark-theme .solicitud-card-saldo--danger {
  color: #ffb4aa;
  background: rgba(224, 108, 95, 0.2);
  border-color: rgba(255, 180, 170, 0.45);
}

body.dark-theme .solicitud-card-aviso {
  color: #ffd98a;
  background: rgba(255, 193, 77, 0.16);
  border-color: rgba(255, 211, 122, 0.45);
}

.solicitud-modal-texto {
  margin: 0 0 12px;
  font-size: 0.92rem;
  text-align: left;
  color: #4a5a63;
  line-height: 1.45;
}

.solicitud-modal-texto--last {
  margin-bottom: 16px;
}

body.dark-theme .solicitud-modal-texto {
  color: #c8d6e0;
}

.solicitud-modal-texto--instruccion {
  margin-bottom: 14px;
}

/* === MODAL HORAS AUSENCIA (SweetAlert2) === */
.solicitud-horas-swal {
  width: 30em !important;
  max-width: 94vw !important;
  padding: 1.35rem 1.25rem 1.1rem !important;
}

.solicitud-horas-swal .swal2-title {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.75rem !important;
  padding: 0 !important;
}

.solicitud-horas-swal__container {
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  text-align: left !important;
}

.solicitud-horas-swal__actions {
  margin-top: 1rem !important;
  gap: 0.5rem !important;
  flex-wrap: wrap !important;
}

.solicitud-horas-modal {
  text-align: left;
}

.solicitud-horas-modal__resumen {
  background: var(--primary-teal-light, rgba(37, 102, 106, 0.1));
  border: 1px solid rgba(37, 102, 106, 0.22);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.solicitud-horas-modal__empleado {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-slate, #2c3e40);
  margin-bottom: 6px;
  line-height: 1.3;
}

.solicitud-horas-modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.solicitud-horas-modal__badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  background: #a27a00;
  color: #fff;
}

.solicitud-horas-modal__fecha {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--primary-teal, #25666a);
}

.solicitud-horas-modal .solicitud-card-saldo--modal {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  margin-top: 0;
  margin-bottom: 8px;
}

.solicitud-horas-modal__saldo-restante {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  border: 1px solid transparent;
}

.solicitud-horas-modal__saldo-restante--idle {
  color: #4a5a63;
  background: rgba(122, 138, 142, 0.12);
  border-color: rgba(122, 138, 142, 0.28);
}

.solicitud-horas-modal__saldo-restante--ok {
  color: #1a5c60;
  background: rgba(37, 102, 106, 0.1);
  border-color: rgba(37, 102, 106, 0.25);
}

.solicitud-horas-modal__saldo-restante--warning {
  color: #7a5200;
  background: rgba(162, 122, 0, 0.14);
  border-color: rgba(162, 122, 0, 0.35);
}

.solicitud-horas-modal__saldo-restante--danger {
  color: #8f3428;
  background: rgba(192, 84, 72, 0.14);
  border-color: rgba(192, 84, 72, 0.35);
}

.solicitud-horas-modal__inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 10px;
  background: #f4f7f7;
  border: 1px solid #d5e0e2;
}

.solicitud-horas-modal__label {
  display: block;
  margin: 0;
}

.solicitud-horas-modal__label-text {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 6px;
  color: var(--text-slate, #2c3e40);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.solicitud-horas-modal__input {
  width: 100% !important;
  max-width: none !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  border: 1px solid #b8c8cc !important;
  background: #fff !important;
  color: var(--text-slate, #2c3e40) !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.solicitud-horas-modal__input:focus {
  border-color: var(--primary-teal, #25666a) !important;
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.18) !important;
  outline: none !important;
}

.solicitud-horas-modal__input::placeholder {
  color: #8ea3b3 !important;
  opacity: 1;
  font-weight: 500;
}

body.dark-theme .solicitud-horas-swal {
  background-color: #1b2528 !important;
}

body.dark-theme .solicitud-horas-modal__resumen {
  background: rgba(69, 184, 189, 0.14);
  border-color: rgba(126, 232, 236, 0.28);
}

body.dark-theme .solicitud-horas-modal__empleado {
  color: #f1f5f9;
}

body.dark-theme .solicitud-horas-modal__fecha {
  color: #7ee8ec;
}

body.dark-theme .solicitud-horas-modal__saldo-restante--idle {
  color: #c5d4de;
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.32);
}

body.dark-theme .solicitud-horas-modal__saldo-restante--ok {
  color: #b8f4f7;
  background: rgba(69, 184, 189, 0.18);
  border-color: rgba(126, 232, 236, 0.38);
}

body.dark-theme .solicitud-horas-modal__saldo-restante--warning {
  color: #ffd98a;
  background: rgba(255, 193, 77, 0.16);
  border-color: rgba(255, 211, 122, 0.45);
}

body.dark-theme .solicitud-horas-modal__saldo-restante--danger {
  color: #ffb4aa;
  background: rgba(224, 108, 95, 0.2);
  border-color: rgba(255, 180, 170, 0.45);
}

body.dark-theme .solicitud-horas-modal__inputs {
  background: #263336;
  border-color: #3d4f55;
}

body.dark-theme .solicitud-horas-modal__label-text {
  color: #d5e3ec;
}

body.dark-theme .solicitud-horas-modal__input {
  background: #1b2528 !important;
  border-color: #4a5e66 !important;
  color: #f8fafc !important;
}

body.dark-theme .solicitud-horas-modal__input:focus {
  border-color: #7ee8ec !important;
  box-shadow: 0 0 0 3px rgba(126, 232, 236, 0.2) !important;
}

body.dark-theme .solicitud-horas-modal__input::placeholder {
  color: #8ea3b3 !important;
}

/* ====================== SWEETALERT2 CUSTOM TOAST ====================== */
body .swal2-popup.swal2-toast.custom-toast-popup {
  margin-top: 16px;
  border: 1px solid var(--border-subtle);
  border-left: 5px solid var(--primary-teal);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 16px 20px;
  background: var(--card-white);
  overflow: hidden;
  /* Keep progress bar background inside rounded corners */
  position: relative;
  display: grid !important;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 12px;
}

body.dark-theme .swal2-popup.swal2-toast.custom-toast-popup {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

body .swal2-popup.swal2-toast.custom-toast-popup.toast-success {
  border-left-color: var(--primary-teal);
}

body .swal2-popup.swal2-toast.custom-toast-popup.toast-error {
  border-left-color: var(--delete-red);
}

body .swal2-popup.swal2-toast.custom-toast-popup.toast-warning {
  border-left-color: #f59e0b;
}

body .swal2-popup.swal2-toast.custom-toast-popup.toast-info {
  border-left-color: var(--primary-teal);
}

/* Fix success icon circular line masks when animation changes popup background dynamically */
body .swal2-popup.animate-ball-to-pill .swal2-icon.swal2-success [class^="swal2-success-circular-line"],
body .swal2-popup.animate-ball-to-pill .swal2-icon.swal2-success .swal2-success-fix {
  background-color: var(--card-white) !important;
}



/* Ensure contents sit above the full-screen progress bar background */
body .swal2-popup.swal2-toast.custom-toast-popup .swal2-title.custom-toast-title,
body .swal2-popup.swal2-toast.custom-toast-popup .swal2-html-container.custom-toast-html,
body .swal2-popup.swal2-toast.custom-toast-popup .swal2-icon,
body .swal2-popup.swal2-toast.custom-toast-popup .swal2-close {
  position: relative;
  z-index: 2;
}

body .swal2-popup.swal2-toast.custom-toast-popup .swal2-title.custom-toast-title {
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-slate);
  margin: 0;
  padding: 0;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  display: flex;
  align-items: center;
  line-height: 1.35;
}

body .swal2-popup.swal2-toast.custom-toast-popup .swal2-html-container.custom-toast-html {
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.45;
}

/* Override SweetAlert2 default icon alignment in toast */
body .swal2-popup.swal2-toast.custom-toast-popup .swal2-icon {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  align-self: center;
  justify-self: center;
  width: 2em;
  height: 2em;
  min-width: 2em;
  min-height: 2em;
}

/* Close button styling */
body .swal2-popup.swal2-toast.custom-toast-popup .swal2-close {
  color: var(--text-muted);
  font-size: 1.25rem;
  outline: none;
  transition: color 0.2s ease;
  align-self: center;
  justify-self: end;
  grid-column: 3;
  grid-row: 1;
  margin: 0 0 0 4px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

body .swal2-popup.swal2-toast.custom-toast-popup .swal2-close:hover {
  color: var(--delete-red);
}

body .swal2-popup.swal2-toast.custom-toast-popup.custom-toast-with-action {
  width: min(420px, calc(100vw - 32px));
  min-width: 0;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-items: start;
}

body .swal2-popup.swal2-toast.custom-toast-popup.custom-toast-with-action
  .swal2-html-container.custom-toast-html {
  grid-column: 2 / 4;
  grid-row: 2;
  min-width: 0;
  margin: 6px 0 0;
  padding: 0;
  overflow: visible;
}

body .swal2-popup.swal2-toast.custom-toast-popup.custom-toast-with-action
  .swal2-actions {
  grid-column: 2 / 4;
  grid-row: 3;
  justify-self: start;
  margin: 0;
  padding: 0;
}

body .swal2-popup.swal2-toast.custom-toast-popup .custom-toast-action-msg {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

body .swal2-popup.swal2-toast.custom-toast-popup .custom-toast-action-btn {
  margin: 0.5rem 0 0;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--primary-teal);
  color: #fff;
  box-shadow: none;
}

body .swal2-popup.swal2-toast.custom-toast-popup .custom-toast-action-btn:hover {
  background: #1d5458;
}

.form-group.field-highlight {
  animation: fieldHighlightPulse 0.6s ease-in-out 2;
  border-radius: 10px;
}

@keyframes fieldHighlightPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
  }
}

/* Progress bar as full background overlay */
body .swal2-popup.swal2-toast.custom-toast-popup .swal2-timer-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  z-index: 1;
  background: rgba(37, 102, 106, 0.07);
  /* Light teal background in light mode */
  border-radius: 12px 0 0 12px;
}

body.dark-theme .swal2-popup.swal2-toast.custom-toast-popup .swal2-timer-progress-bar {
  background: rgba(59, 164, 169, 0.08);
  /* Light teal background in dark mode */
}

/* --- Animations --- */
body .swal2-popup.swal2-toast.custom-toast-popup.animate-ball-to-pill {
  animation: ballToPill 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

body .swal2-popup.swal2-toast.custom-toast-popup.custom-toast-hide {
  animation: toastFadeOut 0.2s ease-in forwards;
}

/* Content fade-in delay to wait for popup expansion */
body .swal2-popup.swal2-toast.custom-toast-popup.animate-ball-to-pill .swal2-title.custom-toast-title,
body .swal2-popup.swal2-toast.custom-toast-popup.animate-ball-to-pill .swal2-html-container.custom-toast-html,
body .swal2-popup.swal2-toast.custom-toast-popup.animate-ball-to-pill .swal2-icon,
body .swal2-popup.swal2-toast.custom-toast-popup.animate-ball-to-pill .swal2-close {
  animation: toastContentFadeIn 0.3s ease-out forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

@keyframes ballToPill {
  0% {
    opacity: 0;
    transform: translateY(-80px) scale(0.1);
    border-radius: 100px;
    background-color: var(--primary-teal);
  }

  30% {
    opacity: 1;
    transform: translateY(0) scale(0.15);
    border-radius: 100px;
    background-color: var(--primary-teal);
  }

  65% {
    transform: translateY(0) scale(1.04, 0.88);
    border-radius: 40px;
    background-color: var(--card-white);
  }

  85% {
    transform: translateY(0) scale(0.97, 1.02);
    border-radius: 20px;
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-radius: 12px;
    background-color: var(--card-white);
  }
}

@keyframes toastContentFadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes toastFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* ====================== SWEETALERT2 CUSTOM NOTIFICATIONS MODAL ====================== */
.notifications-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  pointer-events: auto;
}

.notifications-modal {
  width: min(500px, 90vw);
  max-height: min(680px, calc(100vh - 48px));
  overflow: hidden;
  padding: 24px;
  border-radius: 16px;
  background: var(--card-white);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
}

.notifications-modal__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-bottom: 8px;
}

.notifications-modal__header h2 {
  margin: 0;
  padding: 0 40px;
  color: var(--text-slate);
  font-family: var(--font-family);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.notifications-modal__close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.notifications-modal__close:hover {
  background: rgba(192, 84, 72, 0.08);
  color: var(--delete-red);
}

.notifications-modal__body {
  position: relative;
  z-index: 1;
}

body .swal2-popup.custom-notifications-popup {
  padding: 24px;
  border-radius: 16px;
  background: var(--card-white);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  font-family: var(--font-family);
  max-width: 500px;
  width: 90%;
  position: relative;
  overflow: hidden;
}

body .swal2-popup.custom-notifications-popup .swal2-timer-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  z-index: 1;
  background: rgba(37, 102, 106, 0.07);
  border-radius: 16px 0 0 16px;
  pointer-events: none;
}

body.dark-theme .swal2-popup.custom-notifications-popup .swal2-timer-progress-bar {
  background: rgba(59, 164, 169, 0.08);
}

body .swal2-popup.custom-notifications-popup.animate-ball-to-pill {
  animation: ballToPill 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

body .swal2-popup.custom-notifications-popup.swal2-hide {
  animation: none !important;
  opacity: 0 !important;
  display: none !important;
}

body .swal2-popup.custom-notifications-popup .custom-notifications-title,
body .swal2-popup.custom-notifications-popup .custom-notifications-html-container,
body .swal2-popup.custom-notifications-popup .custom-notifications-close {
  position: relative;
  z-index: 2;
}

body .swal2-popup.custom-notifications-popup .custom-notifications-title {
  font-family: var(--font-family);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-slate);
  margin: 0 0 8px 0;
  padding: 0;
}

body .swal2-popup.custom-notifications-popup .custom-notifications-close {
  color: var(--text-muted);
  font-size: 1.5rem;
  outline: none;
  transition: color 0.2s ease;
  background: transparent;
}

body .swal2-popup.custom-notifications-popup .custom-notifications-close:hover {
  color: var(--delete-red);
}

/* Hover effects inside notifications list */
.swal-notifications-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.swal-notifications-empty i {
  font-size: 3rem;
  color: var(--primary-teal);
  margin-bottom: 12px;
}

.swal-notifications-empty p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-slate);
  font-weight: 500;
}

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

.swal-notifications-mark-read {
  background: transparent;
  border: none;
  color: var(--primary-teal);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.swal-notifications-mark-read:hover {
  opacity: 0.8;
}

.swal-notifications-list {
  max-height: 350px;
  overflow-y: auto;
  text-align: left;
}

.swal-notifications-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  transition: background-color 0.2s, opacity 0.3s ease, transform 0.3s ease;
}

.swal-notifications-item:last-child {
  border-bottom: none;
}

.swal-notifications-item:hover {
  background-color: rgba(37, 102, 106, 0.04);
}

body.dark-theme .swal-notifications-item:hover {
  background-color: rgba(59, 164, 169, 0.04);
}

.swal-notifications-item-icon {
  color: var(--primary-teal);
  font-size: 1.25rem;
  margin-top: 2px;
}

.swal-notifications-item-content {
  flex: 1;
  padding-right: 20px;
}

.swal-notifications-item-message {
  font-size: 0.9rem;
  color: var(--text-slate);
  line-height: 1.4;
  font-weight: 500;
}

.swal-notifications-item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.swal-notifications-item-dismiss {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 8px;
  top: 12px;
  font-size: 1.1rem;
  transition: color 0.2s;
}

.swal-notifications-item-dismiss:hover {
  color: var(--delete-red);
}

/* ====================== DARK THEME COMPLETION PASS ====================== */
body.dark-theme {
  --bg-scaffold: #101719;
  --card-white: #1b2528;
  --input-bg: #263336;
  --surface-muted: #263336;
  --border-subtle: #334246;
  --text-slate: #f1f5f9;
  --text-dark: #f1f5f9;
  --text-muted: #a9bbca;
  --primary-teal: #45b8bd;
  --primary-teal-hover: #65d3d7;
  --primary-teal-light: rgba(69, 184, 189, 0.16);
  --light-teal: rgba(69, 184, 189, 0.16);
  --border-color: #334246;
  color-scheme: dark;
}

body.dark-theme,
body.dark-theme .main-content,
body.dark-theme .content-body {
  background-color: var(--bg-scaffold);
  color: var(--text-slate);
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6,
body.dark-theme .welcome-title,
body.dark-theme .topbar-title,
body.dark-theme .module-title,
body.dark-theme .emp-name,
body.dark-theme .modal-title,
body.dark-theme .modal-header h2 {
  color: var(--text-slate) !important;
}

body.dark-theme .text-muted,
body.dark-theme .welcome-subtitle,
body.dark-theme .module-desc,
body.dark-theme .emp-num,
body.dark-theme .form-label,
body.dark-theme label {
  color: var(--text-muted) !important;
}

body.dark-theme .card,
body.dark-theme .module-card,
body.dark-theme .config-card,
body.dark-theme .report-card,
body.dark-theme .report-card-visualizar {
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

/* Dashboard presencia — modo oscuro */
body.dark-theme .dashboard-presencia-page {
  --dashboard-bg: var(--bg-scaffold);
  --dashboard-panel-bg: var(--card-white);
  --dashboard-shadow: var(--shadow-sm);
  --dashboard-shadow-soft: var(--shadow-sm);
  background: var(--dashboard-bg) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-presencia-body {
  background: var(--dashboard-bg);
}

body.dark-theme .dashboard-presencia-page .dashboard-page-topbar {
  background: var(--bg-scaffold) !important;
  border-color: var(--border-subtle) !important;
  box-shadow: none !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-summary-card {
  border-color: var(--border-subtle) !important;
  box-shadow: var(--shadow-sm) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-summary-card.trabajando {
  background: rgba(52, 211, 153, 0.12) !important;
  border-color: rgba(52, 211, 153, 0.28) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-summary-card.ausente {
  background: rgba(248, 113, 113, 0.1) !important;
  border-color: rgba(248, 113, 113, 0.22) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-summary-card.trabajando .dashboard-summary-value {
  color: #6ee7b7 !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-summary-card.ausente .dashboard-summary-value {
  color: #fca5a5 !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-summary-card.trabajando .dashboard-summary-icon {
  background: var(--card-white) !important;
  border-color: rgba(52, 211, 153, 0.28) !important;
  color: #6ee7b7 !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-summary-card.ausente .dashboard-summary-icon {
  background: var(--card-white) !important;
  border-color: rgba(248, 113, 113, 0.22) !important;
  color: #fca5a5 !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-summary-label {
  color: var(--text-muted) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-summary-card.trabajando:hover {
  background: rgba(52, 211, 153, 0.16) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(52, 211, 153, 0.2) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-summary-card.ausente:hover {
  background: rgba(248, 113, 113, 0.14) !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(248, 113, 113, 0.18) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-filter-pill:hover {
  background: rgba(69, 184, 189, 0.12) !important;
  border-color: rgba(69, 184, 189, 0.35) !important;
  color: var(--primary-teal) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-search-card,
body.dark-theme .dashboard-presencia-page .dashboard-filter-pills,
body.dark-theme .dashboard-presencia-page .dashboard-empty-search {
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-filter-pill {
  background: var(--input-bg, #263336) !important;
  border-color: transparent !important;
  color: var(--text-muted) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-filter-pill.active {
  background: rgba(69, 184, 189, 0.14) !important;
  border-color: var(--primary-teal) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-filter-pill[data-filter="working"].active {
  background: rgba(52, 211, 153, 0.14) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  color: #6ee7b7 !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-filter-pill[data-filter="absent"].active {
  background: rgba(248, 113, 113, 0.12) !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
  color: #fca5a5 !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-section-panel {
  background-color: var(--card-white) !important;
  background-image: none !important;
  border-color: var(--border-subtle) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-section-panel--absent {
  background-color: var(--card-white) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-section-empty {
  background: var(--input-bg, #263336) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-muted) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-section-title {
  color: var(--text-slate) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-emp-card {
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24) !important;
  transition: box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

body.dark-theme .dashboard-presencia-page .dashboard-emp-card--working {
  border-color: rgba(52, 211, 153, 0.28) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-emp-card--working:hover {
  border-color: rgba(52, 211, 153, 0.62) !important;
  background: rgba(52, 211, 153, 0.1) !important;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(52, 211, 153, 0.35) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-emp-card--absent:hover {
  border-color: rgba(69, 184, 189, 0.55) !important;
  background: rgba(69, 184, 189, 0.08) !important;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(69, 184, 189, 0.28) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-emp-card--working:hover .emp-action-btn--working {
  background: rgba(52, 211, 153, 0.18) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  color: #6ee7b7 !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-emp-card--absent:hover .emp-action-btn--absent {
  background: rgba(69, 184, 189, 0.12) !important;
  border-color: rgba(69, 184, 189, 0.35) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-emp-name {
  color: var(--text-slate) !important;
}

body.dark-theme .dashboard-presencia-page .emp-yearly-hours-badge {
  background: rgba(69, 184, 189, 0.14) !important;
  color: var(--primary-teal) !important;
  border-color: rgba(69, 184, 189, 0.22) !important;
}

body.dark-theme .dashboard-presencia-page .emp-status-pill--absent {
  background: rgba(248, 113, 113, 0.12) !important;
  color: #fca5a5 !important;
  border-color: rgba(248, 113, 113, 0.22) !important;
}

body.dark-theme .dashboard-presencia-page .emp-status-pill--working {
  background: rgba(52, 211, 153, 0.14) !important;
  color: #6ee7b7 !important;
  border-color: rgba(52, 211, 153, 0.28) !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-emp-avatar--working {
  background: rgba(52, 211, 153, 0.14) !important;
  color: #6ee7b7 !important;
}

body.dark-theme .dashboard-presencia-page .dashboard-emp-avatar--absent {
  background: var(--input-bg) !important;
  color: var(--text-muted) !important;
}

body.dark-theme .dashboard-presencia-page .emp-action-btn {
  background: var(--input-bg) !important;
  border-color: var(--border-subtle) !important;
}

body.dark-theme .dashboard-presencia-page .emp-action-btn--working {
  background: rgba(52, 211, 153, 0.1) !important;
  border-color: rgba(52, 211, 153, 0.28) !important;
  color: #6ee7b7 !important;
}

body.dark-theme .dashboard-presencia-page .emp-action-btn--absent {
  color: var(--text-muted) !important;
}

body.dark-theme .dashboard-summary-card,
body.dark-theme .dashboard-search-card,
body.dark-theme .dashboard-emp-card,
body.dark-theme .empresa-datos-card,
body.dark-theme .empresa-datos-group-card {
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

body.dark-theme .card:hover,
body.dark-theme .module-card:hover,
body.dark-theme .config-card:hover,
body.dark-theme .report-card:hover,
body.dark-theme .dashboard-emp-card--absent:hover {
  border-color: rgba(69, 184, 189, 0.42) !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

body.dark-theme .module-icon-container {
  background: rgba(69, 184, 189, 0.12) !important;
}

body.dark-theme .module-card:hover .module-icon-container {
  background: rgba(69, 184, 189, 0.2) !important;
}

body.dark-theme .module-icon,
body.dark-theme .module-card-arrow,
body.dark-theme .stat-chip i {
  color: var(--primary-teal) !important;
}

body.dark-theme .module-badge,
body.dark-theme .topbar-badge,
body.dark-theme .sidebar-badge {
  --badge-ring: var(--card-white);
  --badge-shadow:
    0 0 0 2px var(--badge-ring),
    0 2px 5px rgba(0, 0, 0, 0.28),
    0 4px 12px rgba(232, 111, 98, 0.22);
}

body.dark-theme .topbar-action-btn,
body.dark-theme .btn-icon {
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .topbar-action-btn:hover,
body.dark-theme .btn-icon:hover {
  background: var(--surface-muted) !important;
  border-color: rgba(69, 184, 189, 0.45) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .profile-trigger-btn,
body.dark-theme .profile-dropdown-menu {
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .profile-name,
body.dark-theme .profile-menu-item {
  color: var(--text-slate) !important;
}

body.dark-theme .profile-role {
  color: var(--text-muted) !important;
}

body.dark-theme .profile-trigger-btn:hover,
body.dark-theme .profile-menu-item:hover {
  background: rgba(69, 184, 189, 0.1) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select,
body.dark-theme .form-control,
body.dark-theme .clean-input,
body.dark-theme .clean-select,
body.dark-theme .custom-select,
body.dark-theme .swal2-input {
  background-color: var(--input-bg) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder,
body.dark-theme .form-control::placeholder,
body.dark-theme .choices__input::placeholder,
body.dark-theme .choices__input--cloned::placeholder {
  color: #8ea3b3 !important;
  opacity: 1;
}

body.dark-theme input:focus,
body.dark-theme textarea:focus,
body.dark-theme select:focus,
body.dark-theme .form-control:focus,
body.dark-theme .clean-input:focus,
body.dark-theme .clean-select:focus {
  background-color: var(--input-bg) !important;
  border-color: var(--primary-teal) !important;
  color: var(--text-slate) !important;
  box-shadow: 0 0 0 3px rgba(69, 184, 189, 0.16) !important;
}

body.dark-theme textarea.form-control {
  height: auto;
  min-height: 96px;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

body.dark-theme input[type="date"],
body.dark-theme input[type="month"],
body.dark-theme input[type="time"],
body.dark-theme input[type="datetime-local"] {
  color-scheme: dark;
}

/* Evita el “cuadrado negro” interno de Chrome en campos fecha/hora */
body.dark-theme input[type="date"]::-webkit-datetime-edit,
body.dark-theme input[type="date"]::-webkit-datetime-edit-fields-wrapper,
body.dark-theme input[type="month"]::-webkit-datetime-edit,
body.dark-theme input[type="month"]::-webkit-datetime-edit-fields-wrapper,
body.dark-theme input[type="time"]::-webkit-datetime-edit,
body.dark-theme input[type="time"]::-webkit-datetime-edit-fields-wrapper,
body.dark-theme input[type="datetime-local"]::-webkit-datetime-edit,
body.dark-theme input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
  background: transparent;
  color: var(--text-slate);
}

body.dark-theme input[type="date"]::-webkit-datetime-edit-text,
body.dark-theme input[type="date"]::-webkit-datetime-edit-month-field,
body.dark-theme input[type="date"]::-webkit-datetime-edit-day-field,
body.dark-theme input[type="date"]::-webkit-datetime-edit-year-field,
body.dark-theme input[type="month"]::-webkit-datetime-edit-month-field,
body.dark-theme input[type="month"]::-webkit-datetime-edit-year-field,
body.dark-theme input[type="time"]::-webkit-datetime-edit-hour-field,
body.dark-theme input[type="time"]::-webkit-datetime-edit-minute-field,
body.dark-theme input[type="time"]::-webkit-datetime-edit-ampm-field {
  color: var(--text-slate);
  background: transparent;
}

body.dark-theme input[type="date"]::-webkit-datetime-edit-month-field:focus,
body.dark-theme input[type="date"]::-webkit-datetime-edit-day-field:focus,
body.dark-theme input[type="date"]::-webkit-datetime-edit-year-field:focus,
body.dark-theme input[type="time"]::-webkit-datetime-edit-hour-field:focus,
body.dark-theme input[type="time"]::-webkit-datetime-edit-minute-field:focus {
  background: rgba(69, 184, 189, 0.18);
  color: var(--text-slate);
  outline: none;
}

body.dark-theme input[type="date"]::-webkit-calendar-picker-indicator,
body.dark-theme input[type="month"]::-webkit-calendar-picker-indicator,
body.dark-theme input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body.dark-theme input[type="date"].clean-input::-webkit-calendar-picker-indicator,
body.dark-theme input[type="month"].clean-input::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 1;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a9bbca'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM5 8V6h14v2H5z'/%3E%3C/svg%3E");
}

body.dark-theme input[type="time"]::-webkit-calendar-picker-indicator,
body.dark-theme input[type="time"].clean-input::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 1;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a9bbca'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/%3E%3C/svg%3E");
}

body.dark-theme input[type="time"]::-webkit-calendar-picker-indicator:hover,
body.dark-theme input[type="date"]::-webkit-calendar-picker-indicator:hover,
body.dark-theme input[type="month"]::-webkit-calendar-picker-indicator:hover,
body.dark-theme input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

body.dark-theme .input-stepper__controls {
  background: #1a2428;
  border-left-color: var(--border-subtle);
}

body.dark-theme .input-stepper__btn {
  color: var(--text-muted);
}

body.dark-theme .input-stepper__btn:hover {
  background: rgba(69, 184, 189, 0.14);
  color: var(--primary-teal);
}

body.dark-theme .input-stepper__btn:active {
  background: rgba(69, 184, 189, 0.24);
}

body.dark-theme .input-stepper__btn--up {
  border-bottom-color: var(--border-subtle);
}

body.dark-theme .custom-select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2345b8bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

body.dark-theme .app-choices--default .choices__inner,
body.dark-theme .app-choices--form .choices__inner,
body.dark-theme .app-choices--year .choices__inner {
  background-color: var(--input-bg) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .app-choices--default.is-focused .choices__inner,
body.dark-theme .app-choices--form.is-focused .choices__inner,
body.dark-theme .app-choices--year.is-focused .choices__inner {
  border-color: var(--primary-teal) !important;
  box-shadow: 0 0 0 3px rgba(69, 184, 189, 0.16) !important;
}

body.dark-theme .app-choices--default .choices__list--single .choices__item,
body.dark-theme .app-choices--form .choices__list--single .choices__item,
body.dark-theme .app-choices--default .choices__list--dropdown .choices__item,
body.dark-theme .app-choices--form .choices__list--dropdown .choices__item {
  color: var(--text-slate) !important;
}

body.dark-theme .app-choices--default .choices__input,
body.dark-theme .app-choices--form .choices__input,
body.dark-theme .app-choices--default .choices__input--cloned,
body.dark-theme .app-choices--form .choices__input--cloned {
  color: var(--text-slate) !important;
  background: transparent !important;
}

body.dark-theme .app-choices--default .choices__list--dropdown,
body.dark-theme .app-choices--form .choices__list--dropdown {
  background-color: var(--input-bg) !important;
  border-color: var(--border-subtle) !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45) !important;
}

body.dark-theme .app-choices--default .choices__list--dropdown .choices__item--selectable.is-highlighted,
body.dark-theme .app-choices--form .choices__list--dropdown .choices__item--selectable.is-highlighted {
  background: rgba(69, 184, 189, 0.2) !important;
  color: #eaffff !important;
}

body.dark-theme .app-choices--default .choices__list--dropdown .choices__item--selectable.is-selected,
body.dark-theme .app-choices--form .choices__list--dropdown .choices__item--selectable.is-selected {
  background: rgba(69, 184, 189, 0.14) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .app-choices--year .choices__inner {
  background-color: rgba(69, 184, 189, 0.1) !important;
  border-color: var(--primary-teal) !important;
}

body.dark-theme .app-choices--year .choices__list--single .choices__item {
  color: var(--primary-teal) !important;
}

body.dark-theme .modal-overlay {
  background: rgba(0, 0, 0, 0.66) !important;
}

body.dark-theme .modal-content,
body.dark-theme .modal-content--import {
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .modal-header,
body.dark-theme .modal-footer,
body.dark-theme .modal-content--import .modal-header,
body.dark-theme .modal-content--import .modal-footer {
  border-color: var(--border-subtle) !important;
}

body.dark-theme .modal-close,
body.dark-theme .btn-icon#modalClose,
body.dark-theme .btn-icon#modalEmpleadoClose,
body.dark-theme #modalContratoClose,
body.dark-theme #modalBloqueoClose,
body.dark-theme #modalImportClose {
  color: var(--text-muted) !important;
  background: transparent !important;
}

body.dark-theme .modal-close:hover,
body.dark-theme .btn-icon#modalClose:hover,
body.dark-theme .btn-icon#modalEmpleadoClose:hover,
body.dark-theme #modalContratoClose:hover,
body.dark-theme #modalBloqueoClose:hover,
body.dark-theme #modalImportClose:hover {
  color: var(--delete-red) !important;
  background: rgba(224, 108, 95, 0.1) !important;
}

body.dark-theme .modal-tab-btn {
  background: var(--input-bg) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-muted) !important;
}

body.dark-theme .modal-tab-btn:hover:not(:disabled),
body.dark-theme .modal-tab-btn.active {
  background: rgba(69, 184, 189, 0.14) !important;
  border-color: var(--primary-teal) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .btn-secondary,
body.dark-theme .btn-outline,
body.dark-theme .mode-btn,
body.dark-theme .btn-big-mode,
body.dark-theme .btn-volver {
  background: var(--surface-muted) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .btn-secondary:hover,
body.dark-theme .btn-outline:hover,
body.dark-theme .mode-btn:hover,
body.dark-theme .btn-big-mode:hover,
body.dark-theme .btn-volver:hover {
  background: #334246 !important;
  border-color: rgba(69, 184, 189, 0.45) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .btn-primary,
body.dark-theme .btn-premium,
body.dark-theme .fab-button,
body.dark-theme .empresa-btn-guardar {
  background: var(--primary-teal) !important;
  border-color: var(--primary-teal) !important;
  color: #062326 !important;
}

body.dark-theme .btn-primary:hover,
body.dark-theme .btn-premium:hover,
body.dark-theme .fab-button:hover,
body.dark-theme .empresa-btn-guardar:hover {
  background: var(--primary-teal-hover) !important;
  border-color: var(--primary-teal-hover) !important;
}

body.dark-theme .emp-item {
  background: var(--card-white) !important;
  border-bottom-color: var(--border-subtle) !important;
}

body.dark-theme .emp-item:hover {
  background: #223033 !important;
}

body.dark-theme .emp-item.is-inactive {
  background: #172023 !important;
  opacity: 1;
}

body.dark-theme .emp-action-baja {
  background: rgba(245, 158, 11, 0.13) !important;
  color: #fbbf24 !important;
}

body.dark-theme .emp-action-baja:hover {
  background: rgba(245, 158, 11, 0.22) !important;
}

body.dark-theme .emp-action-reactivar {
  background: rgba(69, 184, 189, 0.14) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .emp-action-reactivar:hover {
  background: rgba(69, 184, 189, 0.24) !important;
}

body.dark-theme .emp-delete--locked {
  background: #334246 !important;
  color: var(--text-muted) !important;
}

body.dark-theme .emp-badge-retencion {
  background: #334246 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .emp-badge-baja {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #fbbf24 !important;
}

body.dark-theme .emp-header,
body.dark-theme .card .emp-header {
  background: #172123 !important;
  border-bottom-color: var(--border-subtle) !important;
}

body.dark-theme .emp-header:hover,
body.dark-theme .card .emp-header:hover {
  background: #202d30 !important;
}

body.dark-theme .emp-body {
  background: var(--card-white) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .emp-header h3,
body.dark-theme .emp-body h3,
body.dark-theme .emp-body div {
  color: inherit;
}

body.dark-theme .badge-chart,
body.dark-theme .stat-chip {
  background: rgba(69, 184, 189, 0.14) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .festivos-bulk-bar,
body.dark-theme .festivo-card,
body.dark-theme .bloqueo-card,
body.dark-theme .holiday-card {
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .festivo-card:hover,
body.dark-theme .bloqueo-card:hover,
body.dark-theme .holiday-card:hover {
  background: #223033 !important;
}

body.dark-theme .festivo-card-date {
  background: rgba(69, 184, 189, 0.14) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .festivo-card-title {
  color: var(--text-slate) !important;
}

body.dark-theme .festivo-card-subtitle {
  color: var(--text-muted) !important;
}

body.dark-theme .festivo-card-action--edit {
  background: rgba(69, 184, 189, 0.12) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .festivo-card-action--delete {
  background: rgba(224, 108, 95, 0.12) !important;
  color: #f0a99f !important;
}

body.dark-theme .festivo-card input[type="checkbox"],
body.dark-theme input[type="checkbox"] {
  accent-color: var(--primary-teal);
}

body.dark-theme .table-custom,
body.dark-theme .table-centros-trabajo,
body.dark-theme table {
  color: var(--text-slate);
}

body.dark-theme .table-custom td,
body.dark-theme .table-centros-trabajo td {
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .notifications-modal {
  background: var(--card-white);
  border-color: var(--border-subtle);
}

body.dark-theme .notifications-modal-overlay {
  background: rgba(0, 0, 0, 0.62);
}

/* --- Custom Section Box (Configuración/Módulos/Recalculación) --- */
.config-section-box {
  background: var(--config-nested-bg, #f8fafc);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
}

/* --- Report Card Mes Chip (Fichajes Mensuales) --- */
.report-card-mes-chip {
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-card-mes-chip i {
  color: var(--primary-teal);
  font-size: 1.2rem;
}

.report-card-mes-chip span {
  font-weight: 600;
  color: var(--text-slate);
}

body.dark-theme .report-card-mes-chip {
  background: var(--bg-scaffold) !important;
}

/* --- Validation Button in History Grid --- */
.btn-validar-historial-grid {
  border: 1px solid #f59e0b !important;
  background: #fffbeb !important;
  color: #d97706 !important;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-validar-historial-grid:hover {
  background: #fef3c7 !important;
}

body.dark-theme .btn-validar-historial-grid {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}

body.dark-theme .btn-validar-historial-grid:hover {
  background: rgba(245, 158, 11, 0.25) !important;
}

/* --- Additional Dark Theme Overrides --- */
body.dark-theme .config-banner-calibrador {
  background: linear-gradient(135deg, #1b2528 0%, #151d20 100%) !important;
  border-color: var(--border-subtle) !important;
}

/* --- Configuración: tarjetas internas y pestañas en modo oscuro --- */
body.dark-theme {
  --config-nested-bg: #151d20;
  --config-nested-bg-hover: #1a2428;
}

body.dark-theme .config-section-box,
body.dark-theme .config-plazo-card,
body.dark-theme .config-upload-zone {
  background: var(--config-nested-bg) !important;
  border-color: var(--border-subtle) !important;
}

body.dark-theme .config-plazo-card:hover,
body.dark-theme .config-upload-zone:hover {
  background: var(--config-nested-bg-hover) !important;
  border-color: rgba(69, 184, 189, 0.35) !important;
}

body.dark-theme .config-upload-preview {
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
}

body.dark-theme .config-upload-placeholder {
  color: var(--text-muted) !important;
}

body.dark-theme .config-card-header,
body.dark-theme .config-plazos-subsection {
  border-color: var(--border-subtle) !important;
}

body.dark-theme .config-switch-item:not(:last-child) {
  border-bottom-color: var(--border-subtle) !important;
}

body.dark-theme .config-tabs-bar {
  border-bottom-color: var(--border-subtle) !important;
}

body.dark-theme .h-tabs-scroll-hint {
  background: linear-gradient(
    to right,
    rgba(24, 32, 36, 0) 0%,
    var(--h-tabs-hint-bg, var(--scaffold-bg, #182024)) 55%,
    var(--h-tabs-hint-bg, var(--scaffold-bg, #182024)) 100%
  );
}

body.dark-theme .config-tab-btn:hover {
  background: rgba(69, 184, 189, 0.1) !important;
}

body.dark-theme .config-tab-btn.active {
  background: rgba(69, 184, 189, 0.14) !important;
}

body.dark-theme .config-plazo-title,
body.dark-theme .config-plazos-subtitle,
body.dark-theme .config-switch-label,
body.dark-theme .config-card-title {
  color: var(--text-slate) !important;
}

body.dark-theme .config-card-subtitle,
body.dark-theme .config-plazo-unit {
  color: var(--text-muted) !important;
}

.text-slate {
  color: var(--text-slate);
}

body.dark-theme .centros-trabajo-wrap {
  background: var(--bg-scaffold) !important;
}

body.dark-theme .modal-body {
  background: transparent !important;
  border-top-color: var(--border-subtle) !important;
  border-bottom-color: var(--border-subtle) !important;
}

body.dark-theme .modal-body--tinted {
  background: var(--bg-scaffold) !important;
}

body.dark-theme #labelCargaPDF,
body.dark-theme .upload-area {
  background-color: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
}

body.dark-theme .admin-filter-pill {
  background-color: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
  box-shadow: none !important;
}

body.dark-theme .badge-pendiente {
  background-color: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
}

body.dark-theme .badge-validado {
  background-color: rgba(69, 184, 189, 0.15) !important;
  color: var(--primary-teal) !important;
}

/* --- Grid Action Buttons (Email & PDF) --- */
.btn-enviar-individual {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #16a34a !important;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-enviar-individual:hover {
  background: #dcfce7 !important;
}

body.dark-theme .btn-enviar-individual {
  background: rgba(22, 163, 74, 0.15) !important;
  border-color: rgba(22, 163, 74, 0.35) !important;
  color: #4ade80 !important;
}

body.dark-theme .btn-enviar-individual:hover {
  background: rgba(22, 163, 74, 0.25) !important;
}

.btn-pdf-individual {
  background: #fff1f2 !important;
  border: 1px solid #fecdd3 !important;
  color: #e11d48 !important;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-pdf-individual:hover {
  background: #ffe4e6 !important;
}

body.dark-theme .btn-pdf-individual {
  background: rgba(225, 29, 72, 0.15) !important;
  border-color: rgba(225, 29, 72, 0.35) !important;
  color: #fb7185 !important;
}

body.dark-theme .btn-pdf-individual:hover {
  background: rgba(225, 29, 72, 0.25) !important;
}

/* --- Partes Mensuales: Visualizar (filtros compactos, stats, paginación) --- */
.partes-visualizar-wrap {
  max-width: 100%;
  --partes-surface: #faf8f6;
  --partes-border: #e8ecef;
  --partes-border-hover: rgba(37, 102, 106, 0.28);
  --partes-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.partes-visualizar-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 16px;
  margin-bottom: 1.25rem;
}

.partes-visualizar-heading h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-slate);
}

.partes-visualizar-heading p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-enviar-filtrados {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid #10b981;
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-enviar-filtrados:hover {
  background: #d1fae5;
}

.partes-filter-card {
  background: var(--card-white);
  border: 1px solid var(--partes-border, #e8ecef);
  border-radius: 14px;
  padding: 0;
  margin-bottom: 1rem;
  box-shadow: var(--partes-shadow);
  overflow: hidden;
}

.partes-filter-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 52px;
}

.partes-filter-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 0;
  padding: 8px 14px;
  border: none;
  border-right: 1px solid var(--partes-border, #e8ecef);
  border-radius: 0;
  background: var(--card-white);
  transition: background-color 0.2s ease;
}

.partes-filter-field:hover {
  background: var(--partes-surface, #faf8f6);
}

.partes-filter-field:focus-within {
  background: rgba(37, 102, 106, 0.04);
  box-shadow: inset 0 -2px 0 var(--primary-teal);
}

.partes-filter-row > .partes-filter-field:first-child {
  border-top-left-radius: 13px;
  border-bottom-left-radius: 13px;
}

.partes-filter-field--empleado {
  flex: 1.8 1 0;
}

.partes-filter-field--mes {
  flex: 1 1 0;
  min-width: 150px;
}

.partes-filter-field--anio {
  flex: 0 0 128px;
  width: 128px;
  min-width: 128px;
  max-width: 128px;
}

.partes-filter-field-inner {
  flex: 1;
  min-width: 0;
}

.partes-filter-field--anio .partes-filter-field-inner,
.partes-filter-field--anio .partes-choices {
  width: 100%;
  min-width: 0;
}

.partes-filter-field > i {
  width: 34px;
  height: 34px;
  font-size: 1.05rem;
  color: var(--primary-teal);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(37, 102, 106, 0.1);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.partes-filter-field:focus-within > i {
  background: rgba(37, 102, 106, 0.16);
}

.partes-filter-field label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 3px;
  line-height: 1;
}

.partes-filter-field-inner .partes-choices {
  width: 100%;
  margin: 0;
}

.partes-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 12px 8px 10px;
  background: var(--partes-surface, #faf8f6);
  border-top-right-radius: 13px;
  border-bottom-right-radius: 13px;
}

.partes-filtros-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--card-white);
  border: 1px solid var(--partes-border, #e8ecef);
  color: var(--text-slate);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.partes-filtros-badge i {
  color: var(--primary-teal);
  font-size: 1rem;
}

.partes-filtros-badge strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary-teal);
  color: #fff;
  font-size: 0.7rem;
}

.btn-partes-secundario,
.btn-partes-primario {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-partes-secundario {
  background: var(--card-white);
  color: var(--text-slate);
  border-color: var(--partes-border, #e8ecef);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-partes-secundario:hover {
  background: #f8fafc;
  border-color: var(--partes-border-hover);
  color: var(--primary-teal);
}

.btn-partes-secundario i {
  color: var(--primary-teal);
  font-size: 1rem;
}

.btn-partes-secundario:hover i {
  color: #1d4f53;
}

.btn-partes-primario {
  background: var(--primary-teal);
  color: #fff;
  border-color: transparent;
  padding: 8px 16px 8px 10px;
  box-shadow: 0 1px 3px rgba(37, 102, 106, 0.22);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-partes-primario i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.btn-partes-primario:hover {
  background: #1d4f53;
  box-shadow: 0 2px 8px rgba(37, 102, 106, 0.3);
  transform: none;
}

.btn-partes-primario:active {
  transform: scale(0.98);
}

.partes-stats-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 14px 18px;
  margin-bottom: 1.25rem;
  background: var(--card-white);
  border: 1px solid var(--partes-border, #e8ecef);
  border-radius: 14px;
  box-shadow: var(--partes-shadow);
}

.partes-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-slate);
}

.partes-stat-item strong {
  font-size: 1rem;
  font-weight: 800;
}

.partes-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.partes-stat-icon.is-total {
  background: rgba(37, 102, 106, 0.12);
  color: var(--primary-teal);
}

.partes-stat-icon.is-pending {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
}

.partes-stat-icon.is-verified {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}

.partes-sort-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.partes-sort-wrap label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.partes-sort-select,
.partes-per-page-select {
  min-width: 148px;
}

.partes-selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: -0.25rem 0 1.25rem;
  padding: 12px 16px;
  background: #f8fbfb;
  border: 1px solid rgba(37, 102, 106, 0.18);
  border-radius: 14px;
}

.partes-selection-summary,
.partes-selection-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.partes-selection-summary {
  color: var(--text-slate);
  font-size: 0.88rem;
}

.partes-selection-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--primary-teal);
  background: rgba(37, 102, 106, 0.1);
}

.partes-selection-actions button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-firmar-todos {
  background: #174f53;
}

.btn-enviar-seleccionados {
  background: #16805d;
}

.btn-enviar-seleccionados:hover {
  background: #116b4d;
}

.parte-select-control {
  position: relative;
  flex: 0 0 auto;
  cursor: pointer;
}

.parte-select-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.parte-select-control span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  color: transparent;
  background: var(--card-white);
  transition: 0.18s ease;
}

.parte-select-checkbox:focus-visible + span {
  outline: 3px solid rgba(37, 102, 106, 0.18);
  outline-offset: 2px;
}

.parte-select-checkbox:checked + span {
  color: #fff;
  border-color: var(--primary-teal);
  background: var(--primary-teal);
}

.partes-visualizar-wrap .partes-informe-card.is-selected {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.12);
}

/* Select nativo estilizado (sin Tom Select) */
.select-native {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 2.35rem 9px 12px;
  border: 1px solid var(--partes-border, #e2e8f0);
  border-radius: 10px;
  background-color: var(--card-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2325666A' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--text-slate);
  cursor: pointer;
  outline: none;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.select-native:hover:not(:disabled) {
  border-color: var(--partes-border-hover, rgba(37, 102, 106, 0.35));
  background-color: #fafbfc;
}

.select-native:focus {
  outline: none;
}

.select-native:focus-visible {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.14);
}

.select-native:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: #f1f5f9;
}

.partes-generar-select {
  width: 100%;
  font-size: 0.95rem;
  padding: 10px 2.4rem 10px 14px;
  border-radius: 10px;
}

.partes-filter-select {
  font-size: 0.9rem;
  line-height: 1.25;
}

.partes-visualizar-wrap .report-card-visualizar,
.partes-visualizar-wrap .partes-informe-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border-radius: 16px;
  border: 1px solid var(--partes-border, #e8ecef);
  border-left-width: 4px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  padding: 1.15rem 1.2rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.partes-informe-card--pending {
  border-left-color: #f59e0b;
}

.partes-informe-card--partial {
  border-left-color: var(--primary-teal, #25666a);
}

.partes-informe-card--complete {
  border-left-color: #10b981;
}

.partes-visualizar-wrap .report-card-visualizar:hover,
.partes-visualizar-wrap .partes-informe-card:hover {
  transform: none;
  border-color: rgba(37, 102, 106, 0.28);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

@media (max-width: 900px) {
  .partes-selection-toolbar,
  .partes-selection-actions {
    align-items: stretch;
  }

  .partes-selection-actions {
    width: 100%;
  }

  .partes-selection-actions button {
    flex: 1 1 190px;
  }
}

.partes-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.partes-card-emp-info {
  min-width: 0;
}

.partes-card-emp-name {
  margin: 0 0 2px;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-slate);
  line-height: 1.25;
}

.partes-card-emp-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.partes-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.partes-card-actions .btn-enviar-individual,
.partes-card-actions .btn-pdf-individual {
  width: 38px;
  height: 38px;
}

.partes-card-actions .btn-enviar-individual i,
.partes-card-actions .btn-pdf-individual i {
  font-size: 1.25rem;
}

.partes-card-actions .btn-pdf-individual.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.partes-visualizar-wrap .report-card-mes-chip {
  background: rgba(37, 102, 106, 0.06);
  border: 1px solid rgba(37, 102, 106, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
}

.partes-visualizar-wrap .report-card-mes-chip span {
  font-size: 0.9rem;
  color: var(--text-slate);
}

.partes-visualizar-wrap .report-card-mes-chip strong {
  color: var(--primary-teal, #25666a);
  font-weight: 800;
}

.partes-card-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  border-top: 1px solid var(--partes-border, #e8ecef);
  padding-top: 12px;
  margin-top: auto;
}

.partes-card-status-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.partes-card-status-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.partes-card-status-col .status-badge {
  width: 100%;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.badge-pendiente--action {
  cursor: pointer;
  width: 100%;
  justify-content: center;
}

.badge-pendiente--action:hover {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: rgba(245, 158, 11, 0.38) !important;
}

body.dark-theme .select-native {
  color: var(--text-slate);
  background-color: var(--card-white);
  border-color: var(--border-subtle);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2345b8bd' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

body.dark-theme .select-native:hover:not(:disabled) {
  background-color: #172023;
  border-color: rgba(69, 184, 189, 0.35);
}

body.dark-theme .partes-filter-card,
body.dark-theme .partes-stats-bar {
  --partes-surface: var(--bg-scaffold);
  --partes-border: var(--border-subtle);
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

body.dark-theme .partes-filter-field {
  background: var(--card-white);
}

body.dark-theme .partes-filter-field:hover,
body.dark-theme .partes-filter-field:focus-within {
  background: #172023;
}

body.dark-theme .partes-filter-actions {
  background: var(--bg-scaffold);
}

body.dark-theme .partes-filtros-badge,
body.dark-theme .btn-partes-secundario {
  background: var(--card-white);
  border-color: var(--border-subtle);
}

body.dark-theme .partes-filtros-badge i,
body.dark-theme .btn-partes-secundario i {
  color: #6dd8dc;
}

body.dark-theme .btn-partes-secundario:hover i {
  color: #9ae8eb;
}

body.dark-theme .btn-partes-primario i {
  background: rgba(255, 255, 255, 0.34);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

body.dark-theme .partes-visualizar-wrap .report-card-mes-chip {
  background: var(--input-bg) !important;
  border-color: rgba(69, 184, 189, 0.22) !important;
}

body.dark-theme .partes-visualizar-wrap .report-card-mes-chip span {
  color: var(--text-slate) !important;
}

body.dark-theme .partes-visualizar-wrap .report-card-mes-chip strong {
  color: var(--primary-teal) !important;
}

body.dark-theme .partes-informe-card--pending {
  border-left-color: #fbbf24 !important;
}

body.dark-theme .partes-informe-card--partial {
  border-left-color: var(--primary-teal) !important;
}

body.dark-theme .partes-informe-card--complete {
  border-left-color: #34d399 !important;
}

body.dark-theme .partes-card-status-grid {
  border-top-color: var(--border-subtle) !important;
}

body.dark-theme .partes-card-status-label {
  color: var(--text-muted) !important;
}

body.dark-theme .badge-validado {
  border-color: rgba(69, 184, 189, 0.28) !important;
}

body.dark-theme .partes-visualizar-wrap .report-card-visualizar:hover,
body.dark-theme .partes-visualizar-wrap .partes-informe-card:hover {
  border-color: rgba(69, 184, 189, 0.35) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28) !important;
}

/* Partes Mensuales — generar (modo oscuro) */
body.dark-theme .card-dia-fichaje {
  background: var(--card-white) !important;
  border-color: rgba(69, 184, 189, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

body.dark-theme .card-dia-fichaje:hover {
  background: rgba(69, 184, 189, 0.12) !important;
  border-color: var(--primary-teal) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

body.dark-theme .dia-nombre {
  color: var(--text-slate) !important;
}

body.dark-theme .dia-tiempo {
  color: var(--text-muted) !important;
}

body.dark-theme .card-dia-fichaje-chevron {
  color: var(--text-muted) !important;
  opacity: 0.85;
}

body.dark-theme .partes-mode-icon--teal {
  background: rgba(69, 184, 189, 0.14);
}

body.dark-theme .partes-mode-icon--sky {
  background: rgba(14, 165, 233, 0.14);
}

body.dark-theme .partes-mode-icon--sky i {
  color: #38bdf8;
}

body.dark-theme .partes-section-icon {
  background: rgba(69, 184, 189, 0.14);
}

body.dark-theme .partes-card-masiva {
  border-color: rgba(69, 184, 189, 0.35) !important;
}

body.dark-theme .partes-empleado-field {
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
}

body.dark-theme .partes-empleado-field:hover {
  background: #172023 !important;
}

body.dark-theme .partes-init-icon {
  background: rgba(69, 184, 189, 0.1);
}

body.dark-theme .partes-tiempo-mes-card {
  background: rgba(69, 184, 189, 0.12) !important;
  border-color: rgba(69, 184, 189, 0.28) !important;
}

body.dark-theme .partes-tiempo-mes-icon {
  background-color: var(--bg-scaffold) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .partes-tiempo-mes-label {
  color: var(--text-slate) !important;
}

body.dark-theme .partes-empty-fichajes-icon {
  background: var(--surface-muted) !important;
}

body.dark-theme .partes-empty-fichajes-icon i {
  color: var(--text-muted) !important;
  opacity: 1;
}

body.dark-theme .partes-filter-month-display {
  color: var(--text-slate) !important;
}

body.dark-theme .partes-filter-month-display.is-placeholder {
  color: var(--text-muted) !important;
}

body.dark-theme .partes-mensuales-page .search-bar {
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

body.dark-theme .partes-mensuales-page .search-field:hover {
  background-color: rgba(69, 184, 189, 0.08);
}

body.dark-theme .partes-mensuales-page .search-field label {
  color: var(--text-muted) !important;
}

body.dark-theme .btn-partes-ver-todos,
body.dark-theme .btn-partes-ver-outline {
  background: var(--card-white) !important;
  border-color: rgba(69, 184, 189, 0.45) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .btn-partes-ver-todos:hover,
body.dark-theme .btn-partes-ver-outline:hover {
  background: rgba(69, 184, 189, 0.12) !important;
}

body.dark-theme .partes-generar-footer {
  border-top-color: var(--border-subtle) !important;
}

body.dark-theme .partes-generar-footer-info strong {
  color: var(--text-slate) !important;
}

body.dark-theme .partes-tiempo-mes-sublabel {
  color: var(--text-muted) !important;
}

body.dark-theme .partes-tiempo-mes-clock {
  background: rgba(69, 184, 189, 0.14) !important;
  color: var(--primary-teal) !important;
}

body.dark-theme .card-dia-fichaje--ver-mas {
  background: transparent !important;
  border-color: rgba(69, 184, 189, 0.35) !important;
}

body.dark-theme .card-dia-fichaje--ver-mas:hover {
  background: rgba(69, 184, 189, 0.1) !important;
  border-color: var(--primary-teal) !important;
}

body.dark-theme .card-dia-ver-mas-icon {
  background: rgba(69, 184, 189, 0.1) !important;
  border-color: rgba(69, 184, 189, 0.3) !important;
}

body.dark-theme .card-dia-ver-mas-title {
  color: var(--text-slate) !important;
}

body.dark-theme .dia-tiempo-valor--cero {
  color: #fb7185 !important;
}

body.dark-theme .topbar-subtitle {
  color: var(--text-muted) !important;
}

@media (max-width: 768px) {
  .partes-generar-top {
    grid-template-columns: 1fr;
  }

  .btn-partes-ver-todos {
    justify-self: start;
  }
}

/* Choices.js — filtros partes (visualizar, generar, nóminas) */
.partes-filter-card .partes-choices,
.partes-visualizar-wrap .partes-choices,
.search-field .partes-choices {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.partes-filter-card .partes-choices--filter .choices__inner,
.partes-visualizar-wrap .partes-choices--filter .choices__inner,
.search-field .partes-choices--generar .choices__inner {
  min-height: 28px;
  padding: 2px 30px 2px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-slate);
  box-shadow: none;
}

.partes-filter-card .partes-choices--filter .choices__list--single,
.partes-visualizar-wrap .partes-choices--filter .choices__list--single,
.search-field .partes-choices--generar .choices__list--single {
  padding: 0;
}

.partes-filter-card .partes-choices--filter .choices__list--single .choices__item,
.partes-visualizar-wrap .partes-choices--filter .choices__list--single .choices__item,
.search-field .partes-choices--generar .choices__list--single .choices__item {
  padding: 0;
  color: var(--text-slate);
}

.partes-filter-card .partes-choices--filter.is-focused .choices__inner,
.partes-visualizar-wrap .partes-choices--filter.is-focused .choices__inner,
.search-field .partes-choices--generar.is-focused .choices__inner {
  box-shadow: none;
}

.partes-visualizar-wrap .partes-choices--boxed .choices__inner,
.partes-visualizar-wrap .partes-choices--boxed.is-focused .choices__inner {
  min-height: 40px;
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--partes-border, #e2e8f0);
  border-radius: 10px;
  background: var(--card-white);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-slate);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.partes-visualizar-wrap .partes-choices--boxed.is-focused .choices__inner {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.14);
}

.partes-visualizar-wrap .partes-choices--boxed .choices__list--single .choices__item {
  padding: 0;
}

.partes-filter-card .choices[data-type*="select-one"]::after,
.partes-visualizar-wrap .choices[data-type*="select-one"]::after,
.search-field .choices[data-type*="select-one"]::after {
  border-color: var(--primary-teal) transparent transparent;
  margin-top: -2px;
  right: 6px;
}

.partes-visualizar-wrap .partes-choices--boxed[data-type*="select-one"]::after {
  right: 12px;
}

.partes-filter-card .choices__list--dropdown,
.partes-visualizar-wrap .choices__list--dropdown,
.search-field .choices__list--dropdown {
  z-index: 1300;
  margin-top: 6px;
  border: 1px solid var(--partes-border, #e2e8f0);
  border-radius: 10px;
  background: var(--card-white);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  overflow-x: hidden;
  overflow-y: auto;
  word-break: normal;
  white-space: nowrap;
}

.partes-filter-field--empleado .choices__list--dropdown {
  min-width: 100%;
  width: auto;
}

.partes-filter-field--anio .choices__list--dropdown,
.partes-filter-field--mes .choices__list--dropdown {
  min-width: 100% !important;
  width: 100% !important;
}

.partes-filter-card .choices__list--dropdown .choices__item,
.partes-visualizar-wrap .choices__list--dropdown .choices__item,
.search-field .choices__list--dropdown .choices__item {
  padding: 10px 14px;
  min-height: 40px;
  display: flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-slate);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.partes-filter-card .choices__list--dropdown .choices__item--selectable.is-highlighted,
.partes-visualizar-wrap .choices__list--dropdown .choices__item--selectable.is-highlighted,
.search-field .choices__list--dropdown .choices__item--selectable.is-highlighted {
  background: rgba(37, 102, 106, 0.1);
  color: var(--primary-teal);
}

.partes-filter-card .choices__list--dropdown .choices__input,
.partes-filter-card .choices__list--dropdown .choices__input--cloned,
.partes-visualizar-wrap .choices__list--dropdown .choices__input,
.partes-visualizar-wrap .choices__list--dropdown .choices__input--cloned,
.search-field .choices__list--dropdown .choices__input,
.search-field .choices__list--dropdown .choices__input--cloned {
  width: 100% !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 10px 14px !important;
  margin: 0 !important;
  border: none !important;
  border-bottom: 1px solid var(--partes-border, #e8ecef) !important;
  border-radius: 0 !important;
  background: var(--partes-surface, #faf8f6) !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  color: var(--text-slate) !important;
  box-sizing: border-box !important;
}

.partes-filter-card .choices__list--dropdown .choices__input::placeholder,
.partes-visualizar-wrap .choices__list--dropdown .choices__input::placeholder,
.search-field .choices__list--dropdown .choices__input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.partes-filter-card .choices__inner > .choices__input,
.partes-visualizar-wrap .choices__inner > .choices__input,
.search-field .choices__inner > .choices__input {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  border: none !important;
}

body.dark-theme .partes-visualizar-wrap .partes-choices--boxed .choices__inner,
body.dark-theme .partes-filter-card .choices__list--dropdown,
body.dark-theme .partes-visualizar-wrap .choices__list--dropdown,
body.dark-theme .search-field .choices__list--dropdown {
  background: var(--card-white);
  border-color: var(--border-subtle);
  color: var(--text-slate);
}

body.dark-theme .partes-filter-card .choices__list--dropdown .choices__item--selectable.is-highlighted,
body.dark-theme .partes-visualizar-wrap .choices__list--dropdown .choices__item--selectable.is-highlighted,
body.dark-theme .search-field .choices__list--dropdown .choices__item--selectable.is-highlighted {
  background: rgba(69, 184, 189, 0.16);
  color: var(--primary-teal);
}

body.dark-theme .partes-filter-card .choices__list--dropdown .choices__input,
body.dark-theme .partes-filter-card .choices__list--dropdown .choices__input--cloned,
body.dark-theme .partes-visualizar-wrap .choices__list--dropdown .choices__input,
body.dark-theme .partes-visualizar-wrap .choices__list--dropdown .choices__input--cloned,
body.dark-theme .search-field .choices__list--dropdown .choices__input,
body.dark-theme .search-field .choices__list--dropdown .choices__input--cloned {
  background: var(--bg-scaffold) !important;
  border-bottom-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

.report-card-empleado-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.empleado-num-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.empleado-num-badge.tone-0 {
  background: rgba(37, 102, 106, 0.14);
  color: var(--primary-teal);
}

.empleado-num-badge.tone-1 {
  background: rgba(14, 165, 233, 0.14);
  color: #0284c7;
}

.empleado-num-badge.tone-2 {
  background: rgba(139, 92, 246, 0.14);
  color: #7c3aed;
}

.empleado-num-badge.tone-3 {
  background: rgba(244, 63, 94, 0.12);
  color: #e11d48;
}

.partes-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
}

.partes-empty-state i {
  font-size: 3rem;
  color: #cbd5e1;
  display: block;
  margin-bottom: 12px;
}

.partes-empty-state h4 {
  margin: 0 0 6px;
  color: #64748b;
}

.partes-empty-state p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.partes-pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.partes-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.partes-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--card-white);
  color: var(--text-slate);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.partes-page-btn:hover:not(:disabled):not(.is-active) {
  border-color: var(--primary-teal);
  color: var(--primary-teal);
}

.partes-page-btn.is-active {
  background: var(--primary-teal);
  border-color: var(--primary-teal);
  color: #fff;
}

.partes-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.partes-page-ellipsis {
  padding: 0 4px;
  color: var(--text-muted);
  font-weight: 600;
}

.partes-per-page-wrap {
  margin-left: auto;
}

@media (max-width: 991px) {
  .partes-visualizar-top {
    grid-template-columns: 1fr;
  }

  .partes-filter-row {
    flex-wrap: wrap;
    min-height: 0;
  }

  .partes-filter-field--anio {
    flex: 1 1 128px;
    width: auto;
    min-width: 128px;
    max-width: none;
  }

  .partes-filter-field--mes {
    min-width: 0;
  }

  .partes-filter-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
    padding-top: 4px;
    border-top-right-radius: 0;
    border-bottom-left-radius: 13px;
    border-bottom-right-radius: 13px;
  }

  .partes-sort-wrap {
    margin-left: 0;
    width: 100%;
  }

  .partes-pagination-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .partes-per-page-wrap {
    margin-left: 0;
  }
}

body.dark-theme .btn-enviar-filtrados {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #6ee7b7 !important;
}

body.dark-theme .btn-partes-secundario {
  background: var(--surface-muted) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .partes-page-btn {
  background: var(--card-white) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .partes-page-btn.is-active {
  background: var(--primary-teal) !important;
  color: #062326 !important;
}

/* ====================== NÓMINAS ====================== */
.nominas-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nominas-page > .nominas-upload-card,
.nominas-page > .nominas-toolbar {
  flex-shrink: 0;
}

.nominas-upload-card {
  width: 100%;
  border: 1px dashed rgba(37, 102, 106, 0.35);
  background: linear-gradient(135deg, rgba(37, 102, 106, 0.06), rgba(37, 102, 106, 0.02));
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 0;
  overflow: visible;
}

.nominas-upload-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1rem 1.25rem;
}

.nominas-upload-strip-text {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
  text-align: left;
}

.nominas-upload-strip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(37, 102, 106, 0.12);
  color: var(--primary-teal);
  font-size: 1.35rem;
  flex-shrink: 0;
}

.nominas-upload-strip-title {
  display: block;
  font-size: 0.98rem;
  color: var(--text-slate);
  margin-bottom: 0.2rem;
}

.nominas-upload-strip-desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.nominas-upload-actions {
  flex-shrink: 0;
}

.nominas-upload-file {
  display: none;
}

.btn-nominas-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: var(--primary-teal);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(37, 102, 106, 0.22);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-nominas-upload:hover {
  background: #1d4f53;
  box-shadow: 0 2px 8px rgba(37, 102, 106, 0.3);
}

.nominas-upload-console {
  margin: 0;
  padding: 12px 16px 14px;
  text-align: left;
  background: var(--bg-scaffold);
  border-top: 1px solid var(--border-subtle);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  max-height: 180px;
  overflow-y: auto;
}

.nominas-upload-console-title {
  color: var(--primary-teal);
  font-size: 0.9rem;
}

.nominas-upload-log {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Toolbar periodo + filtros */
.nominas-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: var(--card-white);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: visible;
  width: 100%;
}

.nominas-toolbar-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  width: 100%;
}

.nominas-toolbar-intro {
  flex: 1 1 220px;
  min-width: 0;
}

.nominas-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.75rem;
  width: 100%;
}

.nominas-toolbar-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-slate);
}

.nominas-toolbar-period {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.nominas-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1 1 280px;
  justify-content: flex-end;
}

.nominas-filter-helper {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.35rem 0 0;
  color: var(--primary-teal);
  font-size: 0.76rem;
  font-weight: 600;
}

.nominas-filter-helper i {
  font-size: 0.95rem;
}

.nominas-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-scaffold);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.nominas-stat:hover {
  border-color: rgba(37, 102, 106, 0.35);
  background: rgba(37, 102, 106, 0.07);
  transform: translateY(-1px);
}

.nominas-stat:focus-visible {
  outline: 3px solid rgba(37, 102, 106, 0.22);
  outline-offset: 2px;
}

.nominas-stat.is-active {
  box-shadow: 0 0 0 2px rgba(37, 102, 106, 0.18);
}

.nominas-stat--total.is-active {
  border-color: var(--text-muted);
  background: var(--card-white, #fff);
}

.nominas-stat strong {
  font-size: 0.88rem;
  color: var(--text-slate);
}

.nominas-stat--firmada.is-active {
  border-color: rgba(37, 102, 106, 0.45);
  background: rgba(37, 102, 106, 0.12);
}

.nominas-stat--firmada strong {
  color: var(--primary-teal);
}

.nominas-stat--pendiente.is-active {
  border-color: rgba(3, 105, 161, 0.4);
  background: rgba(3, 105, 161, 0.12);
}

.nominas-stat--pendiente strong {
  color: #0369a1;
}

.nominas-stat--sin.is-active {
  border-color: rgba(100, 116, 139, 0.4);
  background: rgba(100, 116, 139, 0.12);
}

.nominas-filter-card {
  margin-bottom: 0;
  flex: 1 1 320px;
  max-width: 100%;
}

.nominas-filter-card .partes-filter-row {
  min-height: 52px;
}

.nominas-filter-card .partes-filter-field--mes {
  flex: 1.4 1 0;
  min-width: 160px;
}

.nominas-filter-card .partes-filter-field--anio {
  flex: 0 0 188px;
  width: 188px;
  min-width: 188px;
  max-width: 188px;
}

.nominas-filter-field--anio .partes-filter-field-inner {
  min-width: 0;
}

.nominas-filter-year {
  width: 100%;
  -moz-appearance: textfield;
  appearance: textfield;
}

.nominas-filter-year::-webkit-outer-spin-button,
.nominas-filter-year::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.partes-filter-field-inner .input-stepper--nominas-year {
  width: 100%;
}

.partes-filter-field-inner .input-stepper--nominas-year .input-stepper__field {
  min-height: 38px;
  padding: 0.45rem 2.85rem 0.45rem 0.7rem !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 10px !important;
  background: var(--card-white) !important;
  box-shadow: none !important;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-slate);
  width: 100%;
  overflow: visible;
  text-overflow: clip;
}

.partes-filter-field-inner .input-stepper--nominas-year .input-stepper__field:focus {
  border-color: var(--primary-teal) !important;
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.14) !important;
  outline: none;
}

.partes-filter-field-inner .input-stepper--nominas-year .input-stepper__controls {
  top: 1px;
  bottom: 1px;
  right: 1px;
  width: 2.35rem;
  border-left: 1px solid var(--border-subtle);
  border-radius: 0 9px 9px 0;
  background: var(--surface-muted);
}

.partes-filter-field-inner .input-stepper--nominas-year .input-stepper__btn {
  font-size: 0.8rem;
}

.nominas-filter-card .partes-filter-row > .partes-filter-field:last-child {
  border-right: none;
  border-top-right-radius: 13px;
  border-bottom-right-radius: 13px;
}

.partes-filter-field-inner .input-stepper--filter {
  width: 100%;
  min-height: 1.35rem;
}

.partes-filter-field-inner .input-stepper--filter .input-stepper__field {
  padding: 0 1.85rem 0 0 !important;
  min-height: 1.35rem;
  height: auto;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-slate);
}

.partes-filter-field-inner .input-stepper--filter .input-stepper__controls {
  top: -2px;
  bottom: -2px;
  right: -2px;
  width: 1.65rem;
  border-left: 1px solid var(--partes-border, #e8ecef);
  border-radius: 0;
  background: var(--surface-muted);
}

.partes-filter-field-inner .input-stepper--filter .input-stepper__btn {
  font-size: 0.7rem;
}

.nominas-btn-avisos {
  width: auto !important;
  min-width: 0;
  padding: 0.65rem 1rem !important;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Grid empleados */
/* Grid empleados */
.nominas-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.page-virtual-spacer {
  position: relative;
  width: 100%;
}

.page-virtual-items {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  will-change: transform;
}

.page-virtual-items > .emp-item,
.page-virtual-items > .fich-emp-item {
  min-height: inherit;
}

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

.nominas-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  font-size: 0.95rem;
}

.nomina-empleado-card {
  display: flex;
  flex-direction: column;
  background: var(--card-white, #ffffff);
  border-radius: 18px;
  border: 1px solid var(--border-subtle, #e2e8f0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 16px 18px 14px;
  gap: 14px;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.nomina-empleado-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.1);
  border-color: rgba(37, 102, 106, 0.25);
}

.nomina-empleado-card.is-firmada {
  border-top: 3px solid #10b981;
}

.nomina-empleado-card.is-pendiente {
  border-top: 3px solid #0284c7;
}

.nomina-empleado-card.is-sin-nomina {
  border-top: 3px solid #cbd5e1;
}

.nomina-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.nomina-card-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
  background: #f1f5f9;
  color: #64748b;
  transition: all 0.2s ease;
}

.nomina-empleado-card.is-firmada .nomina-card-avatar {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.nomina-empleado-card.is-pendiente .nomina-card-avatar {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
}

.nomina-card-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nomina-card-nombre {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-slate, #1e293b);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nomina-card-nif {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nomina-card-nif i {
  font-size: 0.9rem;
  color: #94a3b8;
}

.nomina-card-badge-wrap {
  flex-shrink: 0;
  margin-left: auto;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.badge-validado {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

.badge-pendiente-firma {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

.badge-sin-nomina {
  background: #f8fafc !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}

.nomina-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle, #f1f5f9);
}

.nomina-email-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.nomina-email-chip.is-ok {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
}

.nomina-email-chip.is-missing {
  background: rgba(217, 119, 6, 0.08);
  color: #d97706;
}

.nomina-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.btn-nomina-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-nomina-pdf {
  background: var(--primary-teal, #25666a);
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(37, 102, 106, 0.2);
}

.btn-nomina-pdf:hover {
  background: var(--primary-teal-hover, #1b4d50);
  box-shadow: 0 5px 14px rgba(37, 102, 106, 0.3);
  transform: translateY(-1px);
}

.btn-nomina-avisar {
  background: #2563eb;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.2);
}

.btn-nomina-avisar:hover {
  background: #1d4ed8;
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

/* Legacy aliases (otras pantallas) */
.nominas-upload-inner,
.nominas-upload-icon,
.nominas-upload-title,
.nominas-upload-desc {
  /* conservados por compatibilidad */
}

body.dark-theme .nominas-upload-card {
  border-color: rgba(69, 184, 189, 0.3);
  background: linear-gradient(135deg, rgba(69, 184, 189, 0.1), rgba(69, 184, 189, 0.03));
}

body.dark-theme .nominas-upload-strip-icon {
  background: rgba(69, 184, 189, 0.18);
  color: #7ee8ec;
}

body.dark-theme .btn-nominas-upload {
  color: #062326 !important;
  background: var(--primary-teal);
}

body.dark-theme .btn-nominas-upload:hover {
  color: #062326 !important;
  background: var(--primary-teal-hover);
}

body.dark-theme .btn-nominas-upload i {
  color: inherit !important;
}

body.dark-theme .nominas-toolbar {
  background: var(--card-white);
  border-color: var(--border-subtle);
}

body.dark-theme .nominas-stat {
  background: var(--input-bg);
  border-color: var(--border-subtle);
}

body.dark-theme .nominas-stat--firmada {
  background: rgba(69, 184, 189, 0.12);
  border-color: rgba(69, 184, 189, 0.28);
}

body.dark-theme .nominas-stat--firmada strong {
  color: #7ee8ec;
}

body.dark-theme .nominas-stat--pendiente {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.25);
}

body.dark-theme .nominas-stat--pendiente strong {
  color: #7dd3fc;
}

body.dark-theme .partes-filter-field-inner .input-stepper--filter .input-stepper__controls {
  border-left-color: var(--border-subtle);
  background: var(--input-bg);
}

body.dark-theme .nominas-filter-card .partes-filter-field label {
  color: var(--text-slate) !important;
}

body.dark-theme .partes-filter-field-inner .input-stepper--nominas-year .input-stepper__field {
  background: var(--input-bg) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-slate) !important;
}

body.dark-theme .partes-filter-field-inner .input-stepper--nominas-year .input-stepper__field:focus {
  border-color: var(--primary-teal) !important;
  box-shadow: 0 0 0 3px rgba(69, 184, 189, 0.2) !important;
}

body.dark-theme .partes-filter-field-inner .input-stepper--nominas-year .input-stepper__controls {
  border-left-color: var(--border-subtle);
  background: var(--surface-muted);
}

body.dark-theme .nomina-empleado-card.is-pendiente {
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.2),
    rgba(56, 189, 248, 0.1)
  ) !important;
  border-color: rgba(56, 189, 248, 0.42) !important;
  border-left-color: #38bdf8 !important;
  box-shadow:
    inset 0 0 0 1px rgba(56, 189, 248, 0.1),
    0 2px 8px rgba(14, 116, 144, 0.18);
}

body.dark-theme .nomina-empleado-card.is-pendiente .nomina-empleado-meta {
  border-top-color: rgba(56, 189, 248, 0.28);
  background: rgba(14, 116, 144, 0.12);
}

body.dark-theme .nomina-empleado-card.is-firmada {
  background: rgba(69, 184, 189, 0.08);
}

body.dark-theme .nomina-email-pill {
  background: rgba(69, 184, 189, 0.15);
  color: #7ee8ec;
}

body.dark-theme .nomina-email-pill.is-missing {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

body.dark-theme .nomina-empleado-footer {
  background: rgba(0, 0, 0, 0.15);
  border-top-color: var(--border-subtle);
}

body.dark-theme .nomina-action-btn {
  background: var(--input-bg);
  border-color: var(--border-subtle);
  color: var(--text-slate);
}

body.dark-theme .nomina-action-btn--mail {
  background: rgba(22, 163, 74, 0.15);
  border-color: rgba(22, 163, 74, 0.35);
  color: #4ade80;
}

body.dark-theme .nomina-action-btn--mail:hover {
  background: rgba(22, 163, 74, 0.25);
}

body.dark-theme .nomina-action-btn--pdf {
  background: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.3);
  color: #fb7185;
}

body.dark-theme .nomina-empleado-card .badge-sin-nomina {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.28);
}

body.dark-theme .nomina-empleado-card .badge-pendiente-firma {
  background: rgba(56, 189, 248, 0.22);
  color: #e0f2fe;
  border-color: rgba(125, 211, 252, 0.45);
}

body.dark-theme .nomina-empleado-email.is-missing {
  color: #fbbf24;
}

body.dark-theme .nominas-stat.is-active {
  box-shadow: 0 0 0 2px rgba(69, 184, 189, 0.25);
}

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

  .nominas-upload-actions {
    justify-self: start;
  }

  .nominas-toolbar-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .nominas-filter-card {
    flex: 1 1 auto;
    width: 100%;
  }

  .nominas-btn-avisos {
    width: 100% !important;
    justify-content: center;
  }

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

/* ==========================================================================
   Day Detail Modal Styling (Rendimiento Semanal - Detalle del día)
   ========================================================================== */
.day-detail-popup {
  border-radius: 20px !important;
  padding: 24px 24px 20px !important;
  background: var(--card-white, #ffffff) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.18) !important;
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.06)) !important;
}

.day-detail-popup-html {
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  text-align: left !important;
}

.day-detail-popup-close {
  top: 18px !important;
  right: 18px !important;
  color: var(--text-muted, #94a3b8) !important;
  transition: all 0.2s ease !important;
  border-radius: 50% !important;
  width: 34px !important;
  height: 34px !important;
}

.day-detail-popup-close:hover {
  color: var(--text-slate, #334155) !important;
  background: rgba(0, 0, 0, 0.06) !important;
}

.day-detail-modal {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.day-detail-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
}

.day-detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-teal, #25666a);
  background: rgba(37, 102, 106, 0.09);
  padding: 4px 10px;
  border-radius: 999px;
}

.day-detail-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-slate, #1e293b);
  margin: 0;
  line-height: 1.25;
}

.day-detail-date-sub {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
}

.day-detail-total-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(37, 102, 106, 0.07), rgba(37, 102, 106, 0.02));
  border: 1px solid rgba(37, 102, 106, 0.14);
  border-radius: 12px;
  padding: 10px 16px;
  margin-top: 2px;
}

.day-detail-total-card span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-slate, #475569);
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-detail-total-card strong {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-teal, #25666a);
}

.day-detail-content {
  min-height: 80px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.day-detail-intervals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-detail-interval-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-muted, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.day-detail-interval-item:hover {
  background: #ffffff;
  border-color: rgba(37, 102, 106, 0.35);
  box-shadow: 0 4px 12px rgba(37, 102, 106, 0.08);
  transform: translateY(-1px);
}

.day-detail-interval-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.day-detail-interval-time {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-slate, #1e293b);
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-detail-interval-time i {
  color: var(--primary-teal, #25666a);
  font-size: 1rem;
}

.day-detail-interval-center {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  display: flex;
  align-items: center;
  gap: 5px;
}

.day-detail-interval-duration {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-teal, #25666a);
  background: rgba(37, 102, 106, 0.1);
  padding: 5px 12px;
  border-radius: 999px;
}

.day-detail-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 10px;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
  font-weight: 500;
}

.day-detail-loading i {
  font-size: 1.4rem;
  color: var(--primary-teal, #25666a);
}

.day-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  text-align: center;
  color: var(--text-muted, #94a3b8);
}

.day-detail-empty i {
  font-size: 2.2rem;
  margin-bottom: 8px;
  opacity: 0.6;
}

.day-detail-empty p {
  margin: 0;
  font-size: 0.9rem;
}

.day-detail-error {
  padding: 20px;
  text-align: center;
  color: var(--delete-red, #ef4444);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.day-detail-popup-confirm {
  margin-top: 12px !important;
  background: var(--primary-teal, #25666a) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 10px 32px !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(37, 102, 106, 0.25) !important;
}

.day-detail-popup-confirm:hover {
  background: var(--primary-teal-hover, #1b4d50) !important;
  box-shadow: 0 6px 16px rgba(37, 102, 106, 0.35) !important;
  transform: translateY(-1px) !important;
}

/* Logs */
.logs-page .logs-content { padding-bottom: 2rem; }

.logs-page .logs-filter-card,
.logs-page .logs-table-card {
  overflow: visible;
  border: 1px solid rgba(44, 62, 64, 0.1);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(44, 62, 64, 0.055);
}

.logs-page .logs-filter-heading,
.logs-page .logs-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
}

.logs-page .logs-filter-heading { border-bottom: 1px solid rgba(44, 62, 64, 0.08); }

.logs-page .logs-section-title {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
}

.logs-page .logs-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--primary-teal);
  background: rgba(37, 102, 106, 0.1);
  font-size: 1.25rem;
}

.logs-page .logs-section-icon--history {
  color: #fff;
  background: linear-gradient(145deg, #2b777b, var(--primary-teal));
  box-shadow: 0 6px 14px rgba(37, 102, 106, 0.2);
}

.logs-page .logs-section-title h2 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.25;
}

.logs-page .logs-section-title p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.logs-page .logs-filter-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.logs-page .logs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
}

.logs-page .logs-btn i { font-size: 1rem; }

.logs-page .logs-btn-filter {
  border-color: var(--primary-teal);
  background: var(--primary-teal);
  color: #fff;
  box-shadow: 0 5px 12px rgba(37, 102, 106, 0.18);
}

.logs-page .logs-btn-filter:hover {
  border-color: var(--primary-teal-hover);
  background: var(--primary-teal-hover);
  color: #fff;
  transform: translateY(-1px);
}

.logs-page .logs-btn-export {
  border: 1px solid rgba(37, 102, 106, 0.18);
  background: rgba(37, 102, 106, 0.07);
  color: var(--primary-teal);
}

.logs-page .logs-btn-export:hover {
  border-color: rgba(37, 102, 106, 0.3);
  background: rgba(37, 102, 106, 0.12);
  color: var(--primary-teal-hover);
}

.logs-page .logs-btn-clear {
  border: 1px solid var(--border-subtle);
  background: var(--card-white);
  color: var(--text-muted);
}

.logs-page .logs-filter-body { padding: 1.25rem 1.5rem 1.5rem; }
.logs-page .logs-filter-grid { row-gap: 1rem; }

.logs-page .logs-filter-grid .form-label {
  margin: 0 0 0.45rem;
  color: var(--text-slate);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logs-page .logs-field { position: relative; }

.logs-page .logs-field > i {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  z-index: 2;
  color: var(--primary-teal);
  font-size: 1.05rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.logs-page .logs-field .form-control,
.logs-page .logs-field .form-select {
  min-height: 46px;
  padding-left: 2.65rem;
  border-color: rgba(44, 62, 64, 0.14);
  border-radius: 11px;
  background-color: #fbfcfc;
  font-size: 0.86rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.logs-page .logs-field .form-control:hover,
.logs-page .logs-field .form-select:hover {
  border-color: rgba(37, 102, 106, 0.35);
  background-color: #fff;
}

.logs-page .logs-field .form-control:focus,
.logs-page .logs-field .form-select:focus {
  border-color: var(--primary-teal);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.1);
}

.logs-page .logs-field .choices { margin-bottom: 0; }

.logs-page .logs-field .choices .choices__inner {
  min-height: 46px;
  padding-left: 2.65rem;
  border-color: rgba(44, 62, 64, 0.14);
  border-radius: 11px;
  background: #fbfcfc;
  font-size: 0.86rem;
}

.logs-page .logs-field .choices.is-focused .choices__inner,
.logs-page .logs-field .choices.is-open .choices__inner {
  border-color: var(--primary-teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.1);
}

.logs-page .logs-table-card { overflow: hidden; }
.logs-page .logs-table-heading { padding-top: 1.35rem; padding-bottom: 1rem; }

.logs-page .logs-table-body { padding: 0 1.5rem 1.5rem; }

.logs-page .logs-table-scroll {
  max-height: calc(100vh - 360px);
  min-height: 260px;
  overflow-y: auto;
  border: 1px solid rgba(44, 62, 64, 0.1);
  border-radius: 13px;
}

.logs-page .logs-table { margin-bottom: 0; }

.logs-page .logs-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.logs-page .logs-table thead th {
  padding: 0.9rem 1rem;
  border: 0;
  background: #edf2f2;
  color: var(--text-slate);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.logs-page .logs-table thead th i {
  margin-right: 0.35rem;
  color: var(--primary-teal);
  font-size: 0.9rem;
  vertical-align: -0.08em;
}

.logs-page .logs-table tbody td {
  padding: 0.92rem 1rem;
  border-bottom-color: rgba(44, 62, 64, 0.085);
  font-size: 0.85rem;
  vertical-align: middle;
}

.logs-page .logs-table tbody tr { transition: background-color 0.18s ease; }
.logs-page .logs-table tbody tr:nth-child(even) { background: rgba(232, 236, 236, 0.28); }
.logs-page .logs-table tbody tr:hover { background: rgba(37, 102, 106, 0.055); }
.logs-page .logs-table th:nth-child(1), .logs-page .logs-table td:nth-child(1) { width: 16%; }
.logs-page .logs-table th:nth-child(2), .logs-page .logs-table td:nth-child(2) { width: 13%; }
.logs-page .logs-table th:nth-child(3), .logs-page .logs-table td:nth-child(3) { width: 20%; }

body.dark-theme.logs-page .logs-filter-card,
body.dark-theme.logs-page .logs-table-card,
body.dark-theme.logs-page .logs-table-scroll { border-color: rgba(255, 255, 255, 0.08); }

body.dark-theme.logs-page .logs-filter-heading { border-bottom-color: rgba(255, 255, 255, 0.07); }

body.dark-theme.logs-page .logs-field .form-control,
body.dark-theme.logs-page .logs-field .form-select,
body.dark-theme.logs-page .logs-field .choices .choices__inner {
  border-color: rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.035);
}

body.dark-theme.logs-page .logs-table thead th { background: #27383a; }
body.dark-theme.logs-page .logs-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.018); }
body.dark-theme.logs-page .logs-table tbody tr:hover { background: rgba(63, 145, 150, 0.08); }

@media (max-width: 991.98px) {
  .logs-page .logs-filter-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .logs-page .logs-filter-actions { width: 100%; justify-content: flex-end; }
  .logs-page .logs-table-scroll { max-height: calc(100vh - 420px); }
}

@media (max-width: 575.98px) {
  .logs-page .logs-filter-heading,
  .logs-page .logs-table-heading { padding: 1rem; }
  .logs-page .logs-filter-body,
  .logs-page .logs-table-body { padding: 1rem; }
  .logs-page .logs-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .logs-page .logs-btn-filter { grid-column: 1 / -1; }
  .logs-page .logs-filter-actions .logs-btn-clear[style*="none"] + .logs-btn-export { grid-column: 1 / -1; }
  .logs-page .logs-table-heading { align-items: flex-start; }
  .logs-page .logs-section-title p { display: none; }
}

/* Partes mensuales: espacio de trabajo unificado */
.partes-workspace-page .partes-mensuales-page .topbar-subtitle {
  display: none !important;
}

.partes-workspace-page .partes-mensuales-page > .content-body {
  padding-top: 1.25rem;
}

.partes-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1480px;
  margin: 0 auto 1.25rem;
  padding: 1.25rem 1.4rem;
  overflow: hidden;
  border: 1px solid rgba(44, 62, 64, 0.1);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 15%, rgba(37, 102, 106, 0.1), transparent 25%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 249, 0.9));
  box-shadow: 0 8px 24px rgba(44, 62, 64, 0.055);
}

.partes-workspace-eyebrow {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--primary-teal);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.partes-workspace-header h2 {
  margin: 0 0 0.2rem;
  font-size: 1.4rem;
  line-height: 1.25;
}

.partes-workspace-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.partes-workspace-tabs {
  display: inline-flex;
  flex-shrink: 0;
  gap: 0.25rem;
  padding: 0.3rem;
  border: 1px solid rgba(44, 62, 64, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.partes-workspace-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.partes-workspace-tab i {
  font-size: 1rem;
}

.partes-workspace-tab:hover {
  color: var(--primary-teal);
  background: rgba(37, 102, 106, 0.06);
}

.partes-workspace-tab.is-active {
  background: var(--card-white);
  color: var(--primary-teal);
  box-shadow: 0 3px 10px rgba(44, 62, 64, 0.1);
}

.partes-workspace-panel {
  max-width: 1480px;
  margin-right: auto;
  margin-left: auto;
}

.partes-workspace-page .partes-generar-wrap,
.partes-workspace-page .partes-visualizar-wrap {
  padding-top: 0;
}

.partes-workspace-page .partes-generar-cards-row {
  display: contents;
}

.partes-workspace-page .partes-generar-cards-row > div {
  width: auto;
  max-width: none;
  margin: 0 !important;
  padding: 0;
}

.partes-workspace-page .partes-generar-cards-row .card {
  min-height: 230px;
  border-color: rgba(44, 62, 64, 0.1);
  border-radius: 16px;
  box-shadow: 0 7px 20px rgba(44, 62, 64, 0.05);
}

.partes-workspace-page .partes-card-individual {
  position: relative;
  border-color: rgba(37, 102, 106, 0.22) !important;
  box-shadow: 0 9px 24px rgba(37, 102, 106, 0.075) !important;
}

.partes-workspace-page #modoGenerar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.38fr);
  grid-template-areas:
    "selector aside"
    "content aside";
  gap: 1rem;
  align-items: start;
}

.partes-workspace-page .partes-generar-cards-row > .order-lg-1 {
  grid-area: selector;
}

.partes-workspace-page .partes-generar-cards-row > .order-lg-2 {
  grid-area: aside;
  align-self: stretch;
}

.partes-workspace-page .partes-generar-cards-row > .order-lg-2 .card {
  position: sticky;
  top: 1rem;
  height: auto !important;
  min-height: 0;
}

.partes-workspace-page #initState,
.partes-workspace-page #employeeDashboard {
  grid-area: content;
  min-width: 0;
}

.partes-workspace-page #employeeDashboard > .partes-dashboard-inner {
  max-width: none;
}

.partes-workspace-page #employeeDashboard > .partes-dashboard-inner > .card {
  margin-bottom: 0 !important;
  border: 1px solid rgba(44, 62, 64, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(44, 62, 64, 0.055);
}

.partes-workspace-page .partes-card-individual::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
  background: var(--primary-teal);
}

.partes-card-kicker {
  display: block;
  margin-bottom: 0.12rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.partes-workspace-page .partes-section-title {
  margin: 0;
}

.partes-workspace-page .partes-section-icon--muted {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.partes-workspace-page .partes-section-icon--muted i {
  color: #b45309;
}

.partes-workspace-page .partes-card-masiva {
  border-color: rgba(180, 83, 9, 0.18) !important;
  background:
    linear-gradient(180deg, rgba(255, 250, 243, 0.96), rgba(255, 255, 255, 0.94));
  box-shadow: 0 9px 24px rgba(120, 74, 24, 0.07) !important;
}

.partes-workspace-page .partes-card-masiva #btnGenerarMasivo {
  border: 1px solid rgba(180, 83, 9, 0.35);
  background: #fff;
  color: #a55208;
  box-shadow: 0 5px 14px rgba(180, 83, 9, 0.08);
}

.partes-workspace-page .partes-card-masiva #btnGenerarMasivo:hover {
  border-color: #b45309;
  background: #fff7ed;
  transform: translateY(-1px);
}

.partes-massive-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 9px;
  background: rgba(37, 102, 106, 0.055);
  color: #617477;
  font-size: 0.74rem;
  line-height: 1.4;
}

.partes-massive-note i {
  flex-shrink: 0;
  margin-top: 0.05rem;
  color: var(--primary-teal);
  font-size: 1rem;
}

.partes-workspace-page #initState {
  margin-top: 0;
  padding: 2rem 1.4rem !important;
  border: 1px dashed rgba(44, 62, 64, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.32);
}

.partes-workspace-page #initState .partes-init-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.65rem;
}

.partes-workspace-page #initState .partes-init-title {
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}

.partes-workspace-page #initState p {
  margin-bottom: 0;
  font-size: 0.78rem;
}

.partes-workspace-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0 0.25rem;
}

.partes-workspace-actions p {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.partes-workspace-actions p i {
  color: var(--primary-teal);
  font-size: 1rem;
}

.partes-workspace-page .partes-visualizar-wrap > .partes-filter-card {
  margin-bottom: 1.15rem;
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(44, 62, 64, 0.045);
}

.partes-workspace-page .partes-visualizar-wrap > .partes-filter-card .partes-filter-row {
  min-height: 76px;
}

.partes-workspace-page .partes-visualizar-wrap > .partes-filter-card .partes-filter-field {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.partes-workspace-page .partes-visualizar-wrap > .partes-filter-card .partes-filter-actions {
  gap: 0.65rem;
  padding: 0.75rem;
}

.partes-workspace-page .partes-stats-bar {
  min-height: 82px;
  margin-bottom: 1.15rem;
  padding: 1rem 1.25rem;
  border-radius: 15px;
}

.partes-workspace-page .partes-stat-item {
  gap: 0.55rem;
}

.partes-workspace-page .partes-stat-item + .partes-stat-item {
  margin-left: 0.4rem;
}

.partes-workspace-page .partes-selection-toolbar {
  gap: 1rem;
  margin-bottom: 1.3rem;
  padding: 1rem 1.25rem;
  border-radius: 15px;
}

.partes-workspace-page .partes-selection-summary {
  min-height: 34px;
}

.partes-workspace-page .partes-selection-actions {
  gap: 0.65rem;
}

.partes-workspace-page .partes-selection-actions button {
  min-height: 42px;
}

.partes-workspace-page .grid-informes {
  gap: 1.25rem;
}

body.dark-theme.partes-workspace-page .partes-workspace-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 8% 15%, rgba(69, 184, 189, 0.12), transparent 25%),
    var(--card-white);
}

body.dark-theme.partes-workspace-page .partes-workspace-tabs {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

body.dark-theme.partes-workspace-page .partes-workspace-tab.is-active {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-theme.partes-workspace-page .partes-massive-note,
body.dark-theme.partes-workspace-page #initState {
  background: rgba(255, 255, 255, 0.025);
}

body.dark-theme.partes-workspace-page .partes-card-masiva {
  background: rgba(245, 158, 11, 0.045);
  border-color: rgba(245, 158, 11, 0.16) !important;
}

body.dark-theme.partes-workspace-page .partes-card-masiva #btnGenerarMasivo {
  border-color: rgba(251, 191, 36, 0.3) !important;
  background: rgba(245, 158, 11, 0.1) !important;
  color: #fbbf24 !important;
}

@media (max-width: 1050px) {
  .partes-workspace-page #modoGenerar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "selector"
      "content"
      "aside";
  }

  .partes-workspace-page .partes-generar-cards-row > .order-lg-2 .card {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .partes-workspace-header {
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
  }

  .partes-workspace-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .partes-workspace-tab {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  .partes-workspace-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .partes-workspace-actions .btn-enviar-filtrados {
    align-self: flex-end;
  }
}
/* Selector común de orden de empleados */
.employee-sort-control {
  width: 400px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px 5px 10px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.employee-sort-control:focus-within,
.employee-sort-field:focus-within {
  border-color: transparent;
  box-shadow: none;
}

.employee-sort-icon,
.employee-sort-field > .ph {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(37, 102, 106, 0.09);
  color: var(--primary-teal);
  font-size: 1.05rem;
}

.employee-sort-content {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-sort-content > label,
.employee-sort-control label {
  display: inline-block;
  flex: 0 0 auto;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.employee-sort-select.form-control {
  width: 240px;
  min-width: 240px;
  height: 42px;
  padding: 0 34px 0 14px;
  border: 1px solid #dbe2e4;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(20, 47, 50, 0.02);
  color: var(--text-dark, #304449);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 42px;
  white-space: nowrap;
  text-overflow: clip;
}

.employee-sort-select.form-control:focus {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(37, 102, 106, 0.1);
  outline: none;
}

.employee-sort-control--compact {
  width: 400px;
  min-height: 48px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.employee-sort-field {
  min-width: 400px;
  flex: 0 0 400px;
}

.employee-sort-field .employee-sort-content {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.employee-sort-field .employee-sort-select {
  width: 240px;
  min-width: 240px;
  height: 42px;
}

.partes-sort-wrap > .employee-sort-icon {
  width: 30px;
  height: 30px;
}

.partes-sort-wrap .partes-sort-select,
.partes-sort-wrap .choices,
.partes-sort-wrap .choices__inner,
.partes-sort-wrap .choices__list--dropdown {
  width: 240px;
  min-width: 240px;
}

.partes-sort-wrap .choices__item,
.partes-sort-wrap .choices__list--single {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .employee-sort-control,
  .employee-sort-control--compact,
  .employee-sort-field {
    width: 100%;
    min-width: 100%;
  }
}
