html, body {
   height: 100%;
   font-family: SFS, Arial, sans-serif;
   color: #03234D;
   background-color: #F2F2F7;
}
/* Tooltip custom */
.custom-tooltip-wrap {
   position: relative;
   display: inline-block;
}
.custom-tooltip-wrap .custom-tooltip-bubble {
   display: none !important;
   background-color: #1a1a1a;
   color: #fff;
   text-align: center;
   font-size: 0.78rem;
   line-height: 1.4;
   padding: 6px 10px;
   border-radius: 4px;
   white-space: normal;
   word-wrap: break-word;
   width: 200px;
   position: absolute;
   bottom: calc(100% + 8px);
   left: 50%;
   transform: translateX(-50%);
   z-index: 9000;
   pointer-events: none;
   box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.custom-tooltip-wrap .custom-tooltip-bubble::after {
   content: '';
   position: absolute;
   top: 100%;
   left: 50%;
   transform: translateX(-50%);
   right: auto;
   border: 5px solid transparent;
   border-top-color: #1a1a1a;
}
.custom-tooltip-wrap:hover .custom-tooltip-bubble {
   display: block !important;
}
.custom-tooltip-wrap:hover svg,
.custom-tooltip-wrap:hover .custom-tooltip-icon {
   fill: #0176d3 !important;
   stroke: #0176d3 !important;
}
/* ==========================================================================
   ESTRUCTURA Y ESPACIADO SUPERIOR GLOBAL UNIFICADO (APPLE HIG)
   Alineación vertical idéntica y consistente en todas las páginas (Desktop y Móvil)
   ========================================================================== */
body:not(.login-page) {
   width: 100%;
   display: block; /* Changed from table to block to prevent auto-expansion */
   padding-top: var(--header-height, 50px) !important;
}
body.login-page {
   padding: 0 !important;
   margin: 0 !important;
   min-height: 100vh !important;
   min-height: 100dvh !important;
   display: flex !important;
   flex-direction: column !important;
   align-items: center !important;
   justify-content: center !important;
   background-color: #fbfbfd !important;
   box-sizing: border-box !important;
}
/* Contenedor principal con ritmo visual idéntico (20px desktop, 12px móvil) */
.custom-body-container {
   padding-top: 20px !important;
}
@media (max-width: 768px) {
   body:not(.login-page) {
      padding-top: 50px !important;
   }
   .custom-body-container {
      padding-top: 12px !important;
   }
}
div, form {
   margin: 0px;
   padding: 0px;
}
a {
   color: #0070d2;
   text-decoration: none;
   transition: all 0.1s;
}
.custom-select-header {
   border: none;
   background: transparent;
}
.slds-hide {
   display: none !important;
}
.custom-notificacion {
   top : 20px;
}
.custom-disabled {
   pointer-events: none;
   background-color: #f5f5f5;
   color: #a0a0a0;
   opacity: 0.80;
   cursor: not-allowed;
}
.bg-modal-view-all-custom {
   background: #f3f3f3;
}
/* user */
.user-header-custom {
   background: #242424;
   color: #d8e6fe;
   border-radius: 1.25rem;
}
.forceHighlightsPanel {
   position: relative;
}
.forceChatterUserProfileHighlightsStencilDesktop .profilePic {
   margin: 0 !important;
   margin-top: 0 !important;
   width: 5.5rem !important;
   height: 5.5rem !important;
}
.uiMenu {
   position: relative;
}
.uiMenuList--right.uiMenuList {
   left: auto;
   right: 0;
   transform: translateX(0);
}
.uiMenuList--default.uiMenuList {
   background: var(--slds-g-color-surface-container-1, var(--lwc-colorBackgroundAlt));
   box-shadow: var(--slds-g-shadow-2, var(--lwc-shadowDropDown, 0 2px 3px 0 rgba(0, 0, 0, 0.16)));
   border: var(--slds-g-sizing-border-1, var(--lwc-borderWidthThin, 1px)) solid var(--slds-g-color-border-1, var(--lwc-colorBorder, rgb(229, 229, 229)));
   border-radius: var(--slds-g-radius-border-2, var(--lwc-borderRadiusMedium, 0.25rem));
   padding: var(--slds-g-spacing-1, var(--lwc-spacingXSmall, 0.5rem)) 0;
   float: left;
   position: absolute;
   min-width: 100px;
   max-width: 400px;
   left: 50%;
   transform: translateX(-50%);
   margin-top: var(--lwc-spacingXxxSmall, 0.125rem);
}
.uiPopupTarget .popupTargetContainer, .uiPopupTarget.popupTargetContainer {
   position: absolute;
   border-radius: 3px;
   background-color: var(--slds-g-color-surface-container-1, #FFF);
   box-shadow: 0 1px 5px var(--slds-g-color-neutral-10-opacity-75, rgba(0, 0, 0, .75));
}
div.uiPopupTarget {
   display: none;
   position: absolute;
   z-index: 9999;
}
.forceChatterEntityPhotoDetail .photoWrapper, .forceChatterEntityPhotoDetail .photoIconContainer {
   line-height: 0;
}
.forceChatterEntityPhoto.xLargeSize.circular {
   border: 5px solid var(--slds-g-color-neutral-base-95, var(--lwc-colorBackground, rgb(243, 243, 243)));
}
.forceChatterEntityPhoto.defaultPhoto {
   background-position: center;
   background-size: cover;
   background-repeat: no-repeat;
}
.forceChatterEntityPhoto.circular {
   border-radius: 50%;
}
.forceChatterEntityPhoto.xLargeSize {
   height: 10rem;
   width: 10rem;
}
.forceChatterEntityPhoto.entityPhotoSpecificity {
   overflow: hidden;
   display: inline-block;
   position: relative;
   box-sizing: content-box;
   flex-grow: initial;
}
.forceChatterEntityPhotoDetail .photoDropdown, .forceChatterEntityPhotoDetail .circularInMobile {
   position: absolute;
   bottom: 9%;
   right: 4%;
}
.forceChatterEntityPhotoDetail .photoDropdown .photoIcon {
   width: 21px;
   height: 21px;
   padding: 3.5px;
}
.forceChatterEntityPhotoDetail .photoIcon {
   background: rgba(255, 255, 255, 0.6);
   border-radius: var(--lwc-borderRadiusSmall, 0.125rem);
   color: rgb(74, 74, 74);
   padding: 0;
   line-height: 0;
}
.forceChatterUserProfileHighlightsStencilDesktop .highlightsH1 {
   font-weight: 700 !important;
   font-size: 1.15rem !important;
   letter-spacing: -0.015em !important;
   line-height: 1.25 !important;
   color: #1d1d1f !important;
   margin-top: 0.5rem;
}
.forceStyle.truncate, .forceStyle .truncate, .slds-truncate {
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
   min-width: 0; 
}
.slds-media__body, .slds-col {
   min-width: 0; /* Prevents flex children from pushing parents */
}
.slds-item_detail, .slds-tile__title, .slds-truncate {
   max-width: 100%;
}
.slds-item_detail {
   overflow-wrap: anywhere;
   word-break: break-word;
}
.forceChatterUserProfileHighlightsStencilDesktop .up-m-top_small {
   margin-top: 0.5rem;
}
.forceChatterUserProfileHighlightsStencilDesktop .secondaryFields {
   font-weight: bold;
}
.forceChatterUserProfileHighlightsStencilDesktop .secondaryFields li, .forceChatterUserProfileHighlightsStencilDesktop .secondaryFields div {
   display: inline;
   white-space: nowrap;
}
.forceChatterUserProfileHighlightsStencilDesktop .editAboutMe {
   width: 10rem;
}
/* .forceChatterUserProfileHighlightsStencilDesktop .aboutMeText {
   line-height: 0.25rem;
} */
.forceStyle .assistiveText {
   position: absolute;
   border: 0;
   clip: rect(0, 0, 0, 0);
   width: 1px;
   height: 1px;
   margin: -1px;
   padding: 0;
   overflow: hidden;
}
.assistiveText {
   position: absolute !important;
   height: 1px;
   width: 1px;
   overflow: hidden;
   clip: rect(1px, 1px, 1px, 1px);
}
/* user */
/* ==========================================================================
   LOGIN & RECUPERACIÓN DE CONTRASEÑA (APPLE HIG & RESPONSIVE CENTERING)
   Layout balanceado centrado vertical y horizontalmente en desktop y laptops,
   con scroll fluido y proporciones óptimas sin desbordes ni sensación de quedar al ras.
   ========================================================================== */
.login-background {
   height: 100%;
   border: none;
}
body.login-page .login-background {
   background-color: transparent !important;
   box-shadow: none !important;
   border: none !important;
   width: 100% !important;
   min-height: 100vh !important;
   min-height: 100dvh !important;
   display: flex !important;
   flex-direction: column !important;
   align-items: center !important;
   justify-content: center !important;
   padding: 24px 16px clamp(48px, 8vh, 88px) 16px !important;
   box-sizing: border-box !important;
   margin: auto 0 !important;
   flex: 0 0 auto !important;
   overflow-y: auto !important;
}
body.login-page .custom-login-column {
   width: 100% !important;
   max-width: 390px !important;
   height: auto !important;
   display: flex !important;
   flex-direction: column !important;
   justify-content: center !important;
   align-items: center !important;
   margin: 0 auto !important;
   flex: 0 0 auto !important;
}
body.login-page .custom-login-container {
   padding: 0 !important;
   margin: 0 auto !important;
   max-width: 390px !important;
   width: 100% !important;
   box-sizing: border-box !important;
   transition: all 0.25s ease;
}
.custom_logo_wrapper {
   height: 113px;
   overflow: hidden;
   width: 180px;
   margin-left: auto;
   margin-right: auto;
   text-align: center;
   display: table;
}
.custom_logo-container {
   height: 100%; 
   display: table-cell; 
   vertical-align: bottom;
}
body.login-page .custom_logo_wrapper {
   width: auto !important;
   max-width: 100% !important;
   height: auto !important;
   margin: 0 auto 18px auto !important;
   display: flex !important;
   align-items: center !important;
   justify-content: center !important;
   background: transparent !important;
   box-shadow: none !important;
   border: none !important;
   overflow: visible !important;
}
body.login-page .custom_logo-container {
   display: flex !important;
   align-items: center !important;
   justify-content: center !important;
   height: auto !important;
   width: auto !important;
   background: transparent !important;
   box-shadow: none !important;
   border: none !important;
}
body.login-page .custom_logo {
   width: auto !important;
   max-width: 160px !important;
   height: auto !important;
   max-height: 110px !important;
   object-fit: unset !important;
   margin: 0 auto !important;
   border-radius: 11px !important;
   display: block !important;
   background: transparent !important;
   box-shadow: none !important;
   border: none !important;
}
.custom-login-content {
   margin: 0px auto;
   padding: 1.5rem;
   border-radius: 16px;
   border: 1px solid rgba(0, 0, 0, 0.08);
   color: #03234D;
   margin-bottom: 24px;
   background-color: #ffffff;
   box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
}
body.login-page .custom-login-content {
   margin: 0 auto !important;
   padding: 1.35rem 1.5rem 1.25rem 1.5rem !important;
   border-radius: 18px !important;
   border: 1px solid rgba(0, 0, 0, 0.08) !important;
   color: #03234D;
   margin-bottom: 0 !important;
   background-color: #ffffff !important;
   box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.03) !important;
}

@media (max-width: 768px) {
   body.login-page .login-background {
      padding: max(20px, env(safe-area-inset-top, 20px)) 16px clamp(50px, 10vh, 90px) 16px !important;
   }
   body.login-page .custom_logo_wrapper {
      width: auto !important;
      max-width: 100% !important;
      margin: 0 auto 16px auto !important;
   }
   body.login-page .custom_logo {
      width: auto !important;
      max-width: min(140px, 40vw) !important;
      max-height: 100px !important;
      border-radius: 10px !important;
   }
   body.login-page .custom-login-content {
      padding: 1.25rem 1.25rem 1.15rem 1.25rem !important;
      border-radius: 16px !important;
   }
}
.loginError {
   color: #C23934;
   margin-bottom: 14px;
   font-size: .75rem;
}
.loginSuccess {
   color: #2e844a;
   margin-bottom: 14px;
   font-size: .75rem;
   font-weight: 600;
}
/* SSO Microsoft */
.sso-divider {
   display: flex;
   align-items: center;
   margin: 18px 0;
   color: #706e6b;
   font-size: 13px;
}
.sso-divider::before,
.sso-divider::after {
   content: '';
   flex: 1;
   border-bottom: 1px solid #d8dde6;
}
.sso-divider span {
   padding: 0 12px;
   text-transform: lowercase;
}
body.login-page .sso-divider {
   display: flex !important;
   align-items: center !important;
   margin: 12px 0 !important;
   color: #86868b !important;
   font-size: 13px !important;
}
.microsoft-sso-btn {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 10px;
   width: 100%;
   padding: 11px 16px;
   background: #ffffff;
   color: #5e5e5e;
   border: 1px solid rgba(0, 0, 0, 0.18);
   border-radius: 8px;
   font-size: 0.90rem;
   font-family: inherit;
   font-weight: 500;
   cursor: pointer;
   text-decoration: none;
   transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
   box-sizing: border-box;
   min-height: 44px;
}
.microsoft-sso-btn:hover {
   background-color: #f5f5f7;
   border-color: rgba(0, 0, 0, 0.3);
   color: #1d1d1f;
   text-decoration: none;
}
.microsoft-sso-btn:active {
   background-color: #e6e6e6;
   transform: scale(0.99);
}
.microsoft-sso-btn svg {
   flex-shrink: 0;
}
body.login-page .microsoft-sso-btn {
   display: flex !important;
   align-items: center !important;
   justify-content: center !important;
   gap: 10px !important;
   width: 100% !important;
   padding: 0 16px !important;
   min-height: 42px !important;
   height: 42px !important;
   background: #ffffff !important;
   color: #1d1d1f !important;
   border: 1px solid rgba(0, 0, 0, 0.16) !important;
   border-radius: 8px !important;
   font-size: 0.88rem !important;
   font-weight: 500 !important;
   cursor: pointer !important;
   text-decoration: none !important;
   box-sizing: border-box !important;
   margin-bottom: 0 !important;
   transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}
/* Login Form Fields */
.label,
body.login-page label {
   font-size: 0.82rem !important;
   font-weight: 600 !important;
   color: #1d1d1f !important;
   margin: 0 0 5px 0 !important;
   line-height: inherit !important;
   cursor: default !important;
   display: block !important;
}

body.login-page input.input {
   font-size: 15px !important;
   border-radius: 8px !important;
   border: 1px solid #d8dde6 !important;
   padding: 9px 12px !important;
   min-height: 42px !important;
   height: 42px !important;
   box-sizing: border-box !important;
   background-color: #ffffff !important;
   color: #1d1d1f !important;
   margin-top: 0 !important;
   margin-bottom: 12px !important;
   transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

body.login-page input.input:focus {
   border-color: #0071E3 !important;
   box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15) !important;
   outline: none !important;
}

body.login-page input[type='submit'].button.primary {
   min-height: 42px !important;
   height: 42px !important;
   line-height: 42px !important;
   padding: 0 16px !important;
   border-radius: 8px !important;
   font-size: 0.92rem !important;
   font-weight: 600 !important;
   background: #0071E3 !important;
   border: none !important;
   cursor: pointer !important;
   margin-top: 2px !important;
   transition: background 0.15s ease, transform 0.1s ease !important;
}

body.login-page input[type='submit'].button.primary:hover {
   background: #0077ED !important;
}

body.login-page input[type='submit'].button.primary:active {
   transform: scale(0.99) !important;
}

body.login-page .links {
   margin-top: 14px !important;
   padding-top: 12px !important;
   margin-bottom: 0 !important;
   border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
   text-align: center !important;
}

body.login-page .links a {
   font-size: 0.84rem !important;
   color: #0071E3 !important;
   font-weight: 500 !important;
}

body.login-page .links a:hover {
   text-decoration: underline !important;
}
.inputgroup {
   position: relative;
}
.input:focus {
   background-color: #ffffff;
   border: 1px solid #1589ee;
   outline: 0;
   box-shadow: 0 0 3px #0070D2;
}
.input {
   padding: 12px;
}
input.input, select.input, input.answer-input.input, input.password-input.input {
   border: 1px solid #969492;
   border-radius: 4px;
   border-image-source: initial;
   border-image-slice: initial;
   border-image-width: initial;
   border-image-outset: initial;
   border-image-repeat: initial;
   background-color: #fff;
   font-family: SFS, Arial, sans-serif;
   box-sizing: border-box;
   -webkit-appearance: none;
   font-size: .8125rem;
   transition: all 0.1s;
}
input:-internal-autofill-selected {
   appearance: menulist-button;
   background-image: none !important;
   background-color: light-dark(rgb(232, 240, 254), rgba(70, 90, 126, 0.4)) !important;
   color: fieldtext !important;
}
input:not([type="image" i], [type="range" i], [type="checkbox" i], [type="radio" i]) {
   overflow-clip-margin: 0px !important;
   overflow: clip !important;
}
/* input[type="email" i] {
    padding-block: 1px;
    padding-inline: 2px;
} */
input[type="password" i] {
   -webkit-text-security: disc !important;
   /* padding-block: 1px;
   padding-inline: 2px; */
}
input[type='submit'] {
   -webkit-appearance: none;
}
input {
   height: auto !important;
}
.password {
   display: block;
}
/* input */
.slds-tabs_card, .slds-tabs_card.slds-tabs_card {
   border-radius: 1.25rem;
}
/* Botones */
.primary {
   background-color: #0070d2;
   color: white;
   transition: all 0.1s;
   border: 1px solid transparent;
}
.button {
   padding: 12px 24px;
   border-radius: 4px;
   border: 0;
   font-size: .8125rem;
   font-family: SFS, Arial, sans-serif;
   color: white;
   /* background-color: #D8DDE6; */
   cursor: pointer;
   background-image: none !important;
}
/* Botones */
/* Custom SF */
.wide {
   width: 100%;
}
.bt {
   border-top: 1px solid #F4F6F9;
}
.pt16 {
   padding-top: 16px;
}
.r4 {
   border-radius: 4px;
}
.mt8 {
   margin-top: .5rem;
}
.mb16 {
   margin-bottom: 1rem;
}
.mb20 {
   margin-bottom: 1.25rem;
}
.mb24 {
   margin-bottom: 1.5rem;
}
.small {
   font-size: .75rem;
}
.fl {
   float: left;
}
.slds-icon-custom-departamentos {
   background-color: #1B96FF;
}
.div-tabla-custom {
   border-radius: 0.25rem !important;
}
.custom-a-form {
   color: #0b5cab;
   text-decoration: none;
   -webkit-transition: color 0.1s linear;
   transition: color 0.1s linear;
   border: none;
}
.custom-a-form:focus, .custom-a-form:active {
   border: none;
   --slds-c-input-shadow: unset;
}
/* Corrección de padding estándar Apple HIG para inputs */
.slds-input,
input.slds-input {
   padding-left: 14px !important;
   padding-right: 14px !important;
   box-sizing: border-box !important;
}

/* Solo para campos inline de formulario cuando están en modo readonly */
.slds-form-element_readonly .slds-input {
   padding-left: 0 !important;
}

.custom-lookup-form {
   -webkit-box-shadow: none !important;
   box-shadow: none !important;
   border: none !important;
}
.slds-input[disabled], .slds-input.slds-is-disabled {
   background-color: transparent;
}
.custom-div-button {
   width: 100%; 
   display: flex; 
   padding-top: 1rem;
}
.slds-modal__header {
   border-top-right-radius: 1.25rem;
   border-top-left-radius: 1.25rem;
   padding: 20px 28px 16px 28px !important;
}
.slds-modal__content {
   padding: 24px 28px !important;
}
.slds-modal__footer, .custom-footer-sn-botones {
   border-bottom-right-radius: 1.25rem !important;
   border-bottom-left-radius: 1.25rem !important;
   padding: 16px 28px 20px 28px !important;
}
.slds-textarea,
textarea.slds-textarea {
   padding: 10px 14px !important;
   box-sizing: border-box !important;
}
.slds-m-bottom_xx-small-important {
   margin-bottom:0.25rem !important;
}
.slds-page-header__col-title {
   display: flex;
   align-items: center;
   flex-wrap: wrap;
   gap: 1.5rem;
}
.custom-filtro-header {
   margin: 0;
}
/* Custom SF */
/* --- Estilos para los Lookups --- */
.slds-combobox__form-element .slds-combobox__input,
.slds-combobox__form-element .slds-input_faux {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    min-height: calc(1.875rem + 2px) !important;
}
.slds-combobox__form-element .slds-combobox__input:focus,
.slds-combobox__form-element.slds-has-input-focus .slds-combobox__input {
    border: none !important;
    box-shadow: none !important;
}
#modal-sesion-nuevo-relacionados .slds-modal__content,
#modal-nuevo-departamento .slds-modal__content,
#modal-departamento-nuevo-relacionados .slds-modal__content,
#modal-usuario-nuevo-relacionados .slds-modal__content,
#modal-nuevo-presupuesto .slds-modal__content,
#modal-nueva-ubicacion .slds-modal__content,
#modal-nuevo-turno .slds-modal__content,
#modal-nuevo-festivo .slds-modal__content,
.slds-modal:has(.slds-combobox) .slds-modal__content,
.slds-modal:has(.lookup-input) .slds-modal__content,
#modal-nuevo-miembro-ubicacion .slds-modal__content {
    overflow: visible !important; 
}
#modal-nuevo-turno .slds-modal__content,
#modal-nueva-ubicacion .slds-modal__content,
#modal-nuevo-festivo .slds-modal__content,
.slds-modal:has(.slds-combobox) .slds-modal__content,
.slds-modal:has(.lookup-input) .slds-modal__content,
#modal-sesion-nuevo-relacionados .slds-modal__content,
#modal-nuevo-miembro-ubicacion .slds-modal__content {
    position: relative;
    z-index: 50;
}
#modal-nuevo-turno .slds-modal__footer,
#modal-nueva-ubicacion .slds-modal__footer,
#modal-nuevo-festivo .slds-modal__footer,
.slds-modal:has(.slds-combobox) .slds-modal__footer,
.slds-modal:has(.lookup-input) .slds-modal__footer,
#modal-sesion-nuevo-relacionados .slds-modal__footer,
#modal-nuevo-miembro-ubicacion .slds-modal__footer {
    position: relative;
    z-index: 1;
}
/* --- Fin Estilos para los Lookups --- */
/* media queries */
/* Móviles y pantallas compactas (hasta 767px) */
@media (max-width: 767px) {
  /* estilos para celulares pequeños */
   .slds-m-left_x-large {
      margin-left: 0rem;
   }
   .slds-m-right_medium {
      margin-right: 0rem;
   }
   .slds-p-left_x-large {
      padding-left: 0rem;
   }
   .forceChatterEntityPhoto.xLargeSize {
      height: 8rem;
      width: 8rem;
   }
   .forceChatterUserProfileHighlightsStencilDesktop .highlightsH1 {
      margin-top: 0rem;
      font-size: 1.05rem !important;
   }
   .forceChatterUserProfileHighlightsStencilDesktop .highlightsH1.slds-m-right_small {
      margin-right: 0rem;
   }
   /* Page header responsivo Apple HIG: Título completo en Fila 1 y acciones en Fila 2 */
   .slds-page-header__row:first-child,
   .slds-page-header__row.slds-p-bottom_medium,
   .slds-page-header__row.slds-p-bottom_x_small {
      display: flex !important;
      flex-direction: column !important;
      align-items: stretch !important;
      justify-content: flex-start !important;
      gap: 12px !important;
   }
   .slds-page-header__title,
   .slds-page-header__title.slds-truncate,
   .slds-page-header__col-title .slds-truncate {
      font-size: 1.15rem !important;
      white-space: normal !important;
      word-break: break-word !important;
      overflow: visible !important;
      text-overflow: clip !important;
      line-height: 1.25 !important;
      max-width: 100% !important;
   }
   .slds-page-header__col-title {
      flex: 1 1 100% !important;
      width: 100% !important;
      min-width: 0 !important;
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important;
      gap: 10px !important;
      margin: 0 !important;
   }
   .slds-page-header__col-title .slds-media {
      display: flex !important;
      align-items: center !important;
      gap: 10px !important;
      min-width: 0 !important;
      width: 100% !important;
      margin: 0 !important;
   }
   .slds-page-header__col-title .slds-media__figure {
      margin: 0 !important;
      flex-shrink: 0 !important;
   }
   .slds-page-header__col-title .slds-media__body {
      flex: 1 1 auto !important;
      min-width: 0 !important;
      overflow: visible !important;
   }
   .festivos-sistema-badges {
      display: flex !important;
      align-items: flex-start !important;
      justify-content: flex-start !important;
      flex-wrap: wrap !important;
      gap: 6px !important;
      width: 100% !important;
      max-width: 100% !important;
      margin-top: 6px !important;
   }
   .festivos-sistema-badges .slds-badge {
      margin: 0 !important;
      max-width: 100% !important;
      white-space: normal !important;
      text-align: left !important;
      align-self: flex-start !important;
   }
   .festivos-sistema-badges .slds-badge + .slds-badge {
      margin-left: 0 !important;
   }
   /* Barra de controles Días Festivos del Sistema en móvil (Apple Action Card) */
   .festivos-sistema-controls {
      display: flex !important;
      flex-direction: column !important;
      width: 100% !important;
      gap: 10px !important;
      margin-top: 8px !important;
   }
   .festivos-sistema-filter-row {
      display: flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      width: 100% !important;
      gap: 10px !important;
   }
   .festivos-sistema-filter-row .form-filtro-anio {
      display: flex !important;
      align-items: center !important;
      gap: 6px !important;
      flex: 1 1 auto !important;
   }
   .festivos-sistema-filter-row .form-filtro-anio .slds-select_container {
      flex: 1 1 auto !important;
      min-width: 90px !important;
   }
   .festivos-sistema-filter-row .form-btn-sincronizar {
      flex: 0 0 auto !important;
   }
   .festivos-sistema-controls .form-btn-replicar {
      width: 100% !important;
      display: block !important;
   }
   .festivos-sistema-controls .form-btn-replicar .btn-replicar {
      width: 100% !important;
      height: 38px !important;
      font-size: 0.86rem !important;
      font-weight: 600 !important;
      letter-spacing: -0.01em !important;
      border-radius: 980px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
   }
   .slds-page-header__col-actions {
      width: 100% !important;
      flex: 1 1 100% !important;
      margin: 6px 0 0 0 !important;
      display: flex !important;
      align-items: center !important;
      justify-content: flex-start !important;
      flex-wrap: wrap !important;
      gap: 8px !important;
   }
   .slds-page-header__col-actions .slds-page-header__controls {
      display: flex !important;
      align-items: center !important;
      justify-content: flex-start !important;
      width: 100% !important;
      flex-wrap: wrap !important;
      gap: 8px !important;
      margin: 0 !important;
   }
   .slds-page-header__col-actions .slds-page-header__control {
      display: flex !important;
      align-items: center !important;
      gap: 8px !important;
      flex-wrap: wrap !important;
      margin: 0 !important;
   }
   .slds-page-header__col-actions .slds-button-group-list {
      display: flex !important;
      align-items: center !important;
      gap: 8px !important;
      margin: 0 !important;
      flex-wrap: wrap !important;
   }
   .slds-page-header__col-actions .slds-button_brand,
   .slds-page-header__col-actions .slds-button_neutral,
   .slds-page-header__col-actions .slds-button_destructive,
   .slds-page-header__col-actions .custom-btn-eliminar,
   .slds-page-header__col-actions [id^="btnEliminar"],
   .slds-page-header__col-actions [id="btnEditar"],
   .slds-page-header__col-actions .slds-button {
      height: 34px !important;
      min-height: 34px !important;
      line-height: 34px !important;
      padding: 0 14px !important;
      font-size: 0.82rem !important;
      font-weight: 500 !important;
      border-radius: 8px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      box-sizing: border-box !important;
   }
   /* Cabeceras con 1 solo botón de acción en móvil: Mantener título y botón en el MISMO renglón (Apple Navigation Bar) */
   .slds-page-header__row.header-single-action,
   .slds-page-header__row:has(.slds-page-header__col-actions):not(:has(.slds-page-header__col-actions form)):not(:has(.slds-page-header__col-actions select)):not(:has(.slds-page-header__col-actions button:nth-of-type(2))):not(:has(.slds-page-header__col-actions li:nth-child(2))) {
      flex-direction: row !important;
      align-items: center !important;
      justify-content: space-between !important;
      flex-wrap: nowrap !important;
      gap: 12px !important;
   }
   .slds-page-header__row.header-single-action .slds-page-header__col-title,
   .slds-page-header__row:has(.slds-page-header__col-actions):not(:has(.slds-page-header__col-actions form)):not(:has(.slds-page-header__col-actions select)):not(:has(.slds-page-header__col-actions button:nth-of-type(2))):not(:has(.slds-page-header__col-actions li:nth-child(2))) .slds-page-header__col-title {
      flex: 1 1 auto !important;
      width: auto !important;
      min-width: 0 !important;
   }
   .slds-page-header__row.header-single-action .slds-page-header__col-actions,
   .slds-page-header__row:has(.slds-page-header__col-actions):not(:has(.slds-page-header__col-actions form)):not(:has(.slds-page-header__col-actions select)):not(:has(.slds-page-header__col-actions button:nth-of-type(2))):not(:has(.slds-page-header__col-actions li:nth-child(2))) .slds-page-header__col-actions {
      width: auto !important;
      flex: 0 0 auto !important;
      margin: 0 !important;
      display: flex !important;
      align-items: center !important;
      justify-content: flex-end !important;
   }
   .slds-page-header__row.header-single-action .slds-page-header__controls,
   .slds-page-header__row.header-single-action .slds-page-header__control,
   .slds-page-header__row.header-single-action .slds-button-group-list,
   .slds-page-header__row:has(.slds-page-header__col-actions):not(:has(.slds-page-header__col-actions form)):not(:has(.slds-page-header__col-actions select)):not(:has(.slds-page-header__col-actions button:nth-of-type(2))):not(:has(.slds-page-header__col-actions li:nth-child(2))) .slds-page-header__controls,
   .slds-page-header__row:has(.slds-page-header__col-actions):not(:has(.slds-page-header__col-actions form)):not(:has(.slds-page-header__col-actions select)):not(:has(.slds-page-header__col-actions button:nth-of-type(2))):not(:has(.slds-page-header__col-actions li:nth-child(2))) .slds-page-header__control,
   .slds-page-header__row:has(.slds-page-header__col-actions):not(:has(.slds-page-header__col-actions form)):not(:has(.slds-page-header__col-actions select)):not(:has(.slds-page-header__col-actions button:nth-of-type(2))):not(:has(.slds-page-header__col-actions li:nth-child(2))) .slds-button-group-list {
      width: auto !important;
      margin: 0 !important;
      flex-wrap: nowrap !important;
   }
   .custom-filtro-header {
      width: 100%;
      margin-top: 0.5rem !important;
   }
   .btn-label-full { display: none !important; }
   .btn-label-short { display: inline !important; }
   .slds-radio_button__label {
      white-space: nowrap;
      font-size: 0.7rem;
      /* padding: 0 0.5rem; */
   }
   #form-filtro-vista {
      margin-top: 0.5rem !important;
   }
   .slds-radio_button .slds-radio_faux, .slds-radio_button .slds-radio--faux, .slds-radio--button .slds-radio_faux, .slds-radio--button .slds-radio--faux {
      padding-left: 0.5rem;
      padding-right: 0.5rem;
   }
   /* Scroll horizontal para el Path en móviles */
   .slds-path__scroller {
      overflow-x: auto !important;
      -webkit-overflow-scrolling: touch;
      width: 100%;
      padding-bottom: 5px; /* Espacio para scrollbar nativo */
   }
   /* Notificaciones responsivas */
   .custom-notificacion .slds-notify_toast {
      min-width: 0 !important;
      width: 90% !important;
      margin: 0 auto !important;
      padding: 0.5rem 1rem !important;
   }
   .custom-notificacion .slds-notify_toast h2,
   .custom-notificacion .slds-notify_toast p,
   .custom-notificacion .slds-notify_toast span {
      font-size: 0.85rem !important;
      white-space: normal !important;
      word-wrap: break-word;
   }
   .slds-path__nav {
      width: max-content !important;
   }
   .slds-path__item {
      min-width: 70px;
      max-width: 85px;
   }
   .form-acciones-notificar {
      text-align: right !important;
   }
}
/* 600px hasta 767px */
@media (min-width: 600px) and (max-width: 767px) {
   /* estilos para móviles grandes */
   .slds-m-left_x-large {
      margin-left: 1.5rem;
   }
   .slds-m-right_medium {
      margin-right: 0.75rem;
   }
   /* Page header responsivo */
   .slds-page-header__name-title {
      flex-direction: column !important;
      align-items: flex-start !important;
      gap: 0.5rem !important;
   }
   .btn-label-full { display: none !important; }
   .btn-label-short { display: inline !important; }
   .slds-radio_button__label {
      white-space: nowrap;
      font-size: 0.7rem;
      padding: 0 0.5rem;
   }
   #form-filtro-vista {
      margin-top: 0.5rem !important;
   }
}
/* 768px hasta 991px */
@media (min-width: 768px) and (max-width: 991px) {
  /* estilos para tablets en vertical */
   .slds-m-left_x-large {
      margin-left: 1.5rem;
   }
   .slds-m-right_medium {
      margin-right: 0.75rem;
   }
}
/* Custom table mobile styles (solo móviles hasta 767px) */
@media (max-width: 767px) {
   .slds-max-medium-table_stacked-horizontal, 
   .slds-max-medium-table_stacked-horizontal tbody {
      background-color: transparent !important;
   }
   .slds-max-medium-table_stacked-horizontal td,
   .slds-max-medium-table_stacked-horizontal th {
      width: 100% !important;
      box-sizing: border-box !important;
   }
   /* En tablas apiladas móviles: Etiquetas a la izquierda, datos alineados a la derecha */
   .slds-max-medium-table_stacked-horizontal td,
   .slds-max-medium-table_stacked-horizontal tr:not(.apple-user-row) th {
      text-align: right !important;
   }
   .slds-max-medium-table_stacked-horizontal td::before,
   .slds-max-medium-table_stacked-horizontal tr:not(.apple-user-row) th::before {
      float: left !important;
      text-align: left !important;
      margin-top: 0.125rem !important;
      padding-right: 0.75rem !important;
      font-size: 0.75rem !important;
      line-height: 1.25 !important;
      color: #86868b !important;
      text-transform: uppercase !important;
      letter-spacing: 0.04em !important;
      font-weight: 600 !important;
   }
   /* Anular cualquier centrado inline (style="text-align: center") en celdas en móvil */
   .slds-max-medium-table_stacked-horizontal td[style*="text-align: center"],
   .slds-max-medium-table_stacked-horizontal td[style*="text-align:center"],
   .slds-max-medium-table_stacked-horizontal th[style*="text-align: center"],
   .slds-max-medium-table_stacked-horizontal th[style*="text-align:center"] {
      text-align: right !important;
   }
   /* Asegurar que el contenedor de valor flote / alinee a la derecha */
   .slds-max-medium-table_stacked-horizontal tr:not(.apple-user-row) th .slds-truncate,
   .slds-max-medium-table_stacked-horizontal td .slds-truncate {
      text-align: right !important;
      display: block !important;
      padding-left: 0.75rem !important;
   }
   /* Pastillas (Badges) de estado / activo / licencias alineadas a la derecha */
   .slds-max-medium-table_stacked-horizontal td .slds-badge,
   .slds-max-medium-table_stacked-horizontal th .slds-badge {
      display: inline-flex !important;
      margin-left: auto !important;
   }
   /* Íconos / Cápsulas (ej. Mapa) alineados a la derecha */
   .slds-max-medium-table_stacked-horizontal td a .slds-icon_container,
   .slds-max-medium-table_stacked-horizontal td .slds-icon_container {
      display: inline-flex !important;
      margin-left: auto !important;
      vertical-align: middle !important;
   }
   .slds-max-medium-table_stacked-horizontal td.apple-col-mapa-td {
      text-align: right !important;
   }
   .slds-max-medium-table_stacked-horizontal td.apple-col-mapa-td .apple-map-cell-wrap {
      display: inline-flex !important;
      justify-content: flex-end !important;
      align-items: center !important;
      width: auto !important;
      margin-left: auto !important;
      margin-right: 0 !important;
      text-align: right !important;
   }
   .slds-max-medium-table_stacked-horizontal td.apple-col-mapa-td .apple-map-capsule-btn,
   .slds-max-medium-table_stacked-horizontal td.apple-col-mapa-td .apple-empty-dash {
      margin-left: auto !important;
      margin-right: 0 !important;
   }
   .slds-max-medium-table_stacked-horizontal th:not(.apple-user-row th) a,
   .slds-max-medium-table_stacked-horizontal td a {
      text-align: right !important;
   }
   .mobile-card-row {
      margin-bottom: 1.25rem !important;
      border: 1px solid #dddbda !important;
      border-radius: 0.25rem !important;
      box-shadow: 0 2px 2px rgba(0,0,0,0.05) !important;
      background-color: #ffffff !important;
   }
   .mobile-val-pad {
      padding-left: 0.75rem !important;
   }
   .apple-chevron-col,
   .apple-user-row td.apple-chevron-col,
   .apple-user-row td:last-child {
      display: none !important;
   }
   .apple-user-row th::before {
      display: none !important;
   }
   .mobile-wrap {
      white-space: normal !important;
      word-wrap: break-word !important;
      text-align: right !important;
      width: 100% !important;
      flex-grow: 1 !important;
      display: block !important;
   }
   .mobile-bold {
      font-weight: bold !important;
   }
   .columna-seleccionar {
      width: auto !important;
   }
   .form-acciones-notificar {
      text-align: right !important;
   }
   /* =======================================================================
      Ajustes de Componente para Header de Usuario (usuario.php) en Móviles
      ======================================================================= */
   .user-header-custom {
      padding: 1rem !important;
      border-radius: 0.75rem !important;
      position: relative !important;
   }
   .user-header-custom .media--rec-home {
      margin: 0 !important;
      display: flex !important;
      align-items: center !important;
      position: relative !important;
   }
   .user-header-custom .media__figure.profilePicWrapper,
   .user-header-custom .profilePicWrapper {
      margin: 0 !important;
      flex-shrink: 0 !important;
   }
   .forceChatterUserProfileHighlightsStencilDesktop .profilePic {
      width: 4.5rem !important;
      height: 4.5rem !important;
      margin-top: 0 !important;
   }
   .forceChatterEntityPhoto.xLargeSize {
      width: 4.5rem !important;
      height: 4.5rem !important;
   }
   .forceChatterEntityPhoto.xLargeSize img {
      width: 4.5rem !important;
      height: 4.5rem !important;
      object-fit: cover !important;
      border-radius: 50% !important;
   }
   .user-header-custom .nameActionsContainer {
      padding-left: 0.85rem !important;
      padding-right: 0 !important;
      margin: 0 !important;
      flex: 1 1 auto !important;
      min-width: 0 !important;
   }
   .user-header-custom .primaryFieldAndActions {
      margin: 0 !important;
   }
   .user-header-custom .primaryFieldAndActions span.uiOutputText {
      font-size: 1.15rem !important;
      line-height: 1.25 !important;
      white-space: normal !important;
      word-break: normal !important;
      overflow-wrap: normal !important;
      hyphens: none !important;
      display: block !important;
   }
   /* Botón Editar sin posición absoluta para evitar solapamientos en móvil */
   .user-header-custom .slds-container_right {
      position: static !important;
      margin: 6px 0 0 0 !important;
      width: 100% !important;
      flex: 1 1 100% !important;
   }
   .user-header-custom .slds-button {
      min-width: auto !important;
      padding-left: 0.75rem !important;
      padding-right: 0.75rem !important;
      height: 2rem !important;
      line-height: 1.9rem !important;
      font-size: 0.8125rem !important;
      border-radius: 4px !important;
   }
   .user-header-custom .forceActionLink {
      font-size: 0.8125rem !important;
   }
   /* Rol (Administrador) alineado exactamente debajo del nombre */
   .user-header-custom .editAboutMe {
      display: none !important;
   }
   .user-header-custom > .slds-grid.slds-m-bottom_medium {
      margin-bottom: 0 !important;
      margin-top: 0.25rem !important;
   }
   .user-header-custom .slds-p-left_x-large.aboutMeText {
      padding-left: 5.35rem !important; /* 4.5rem avatar + 0.85rem separación */
      padding-right: 0 !important;
      margin-top: 0 !important;
   }
   .user-header-custom .slds-p-left_x-large.aboutMeText > .aboutMeText {
      padding-left: 0 !important;
      padding-right: 0 !important;
      margin-top: 0 !important;
   }
   .user-header-custom .aboutMeText span.uiOutputTextArea {
      font-size: 0.875rem !important;
      color: #b0c4de !important;
      display: block !important;
   }
   /* Header bienvenida en index.php */
   .header-welcome-meta {
      display: flex !important;
      flex-direction: column !important;
      gap: 0.15rem !important;
      margin-top: 0.25rem !important;
      white-space: normal !important;
      word-break: break-word !important;
      overflow-wrap: break-word !important;
      text-overflow: unset !important;
      line-height: 1.35 !important;
      max-width: 100% !important;
   }
   .header-welcome-meta .meta-separator {
      display: none !important;
   }
   .header-welcome-meta .meta-rol {
      color: #706e6b !important;
      font-size: 0.8125rem !important;
   }
}
/* ==========================================================================
   MODAL RESPONSIVO Y TABLA DE MIEMBROS (MOBILE Y DESKTOP)
   Garantiza que ningún modal del sistema se desborde verticalmente ni corte
   su cabecera en laptops, ventanas redimensionadas o dispositivos móviles.
   ========================================================================== */
.slds-modal {
   display: flex !important;
   flex-direction: column !important;
   align-items: center !important;
   justify-content: flex-start !important;
   overflow-y: auto !important;
   -webkit-overflow-scrolling: touch !important;
   padding: 1.5rem 1rem !important;
   box-sizing: border-box !important;
}

.slds-modal__container {
   position: relative !important;
   margin: auto 0 !important;
   padding: 0 !important;
   width: 100% !important;
   max-width: 600px !important;
   max-height: calc(100vh - 3rem) !important;
   max-height: calc(100dvh - 3rem) !important;
   height: auto !important;
   display: flex !important;
   flex-direction: column !important;
   background: #ffffff !important;
   border-radius: 18px !important;
   box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28), 0 2px 10px rgba(0, 0, 0, 0.08) !important;
   overflow: hidden !important;
   box-sizing: border-box !important;
}

.slds-modal_large .slds-modal__container {
   max-width: 860px !important;
}

.slds-modal_medium .slds-modal__container {
   max-width: 680px !important;
}

.slds-modal_small .slds-modal__container {
   max-width: 520px !important;
}

/* El botón cerrar (X) siempre integrado dentro de la cabecera del modal */
.slds-modal__close,
.slds-modal__container > .slds-modal__close,
.slds-modal__header .slds-modal__close {
   position: absolute !important;
   top: 14px !important;
   right: 14px !important;
   width: 32px !important;
   height: 32px !important;
   min-width: 32px !important;
   min-height: 32px !important;
   border-radius: 50% !important;
   background: #f2f2f7 !important;
   border: 1px solid rgba(0, 0, 0, 0.04) !important;
   color: #6e6e73 !important;
   display: inline-flex !important;
   align-items: center !important;
   justify-content: center !important;
   z-index: 50 !important;
   cursor: pointer !important;
   padding: 0 !important;
   margin: 0 !important;
   transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease !important;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.slds-modal__close:hover,
.slds-modal__close:focus,
.slds-modal__container > .slds-modal__close:hover,
.slds-modal__container > .slds-modal__close:focus {
   background: #e5e5ea !important;
   color: #1d1d1f !important;
   transform: scale(1.04) !important;
   outline: none !important;
}

.slds-modal__close svg,
.slds-modal__close .slds-button__icon {
   width: 14px !important;
   height: 14px !important;
   fill: currentColor !important;
   color: currentColor !important;
}

.slds-modal__container > form {
   display: flex !important;
   flex-direction: column !important;
   flex: 1 1 auto !important;
   min-height: 0 !important;
   overflow: hidden !important;
   margin: 0 !important;
}

.slds-modal__header {
   position: relative !important;
   flex: 0 0 auto !important;
   flex-shrink: 0 !important;
   padding: 1.25rem 3.5rem 1rem 1.5rem !important;
   background: #ffffff !important;
   border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
   border-top-left-radius: 18px !important;
   border-top-right-radius: 18px !important;
}

.slds-modal__header .slds-modal__title {
   font-size: 1.15rem !important;
   font-weight: 700 !important;
   color: #1d1d1f !important;
   letter-spacing: -0.015em !important;
   margin: 0 !important;
   padding: 0 !important;
}

.slds-modal__content {
   flex: 1 1 auto !important;
   min-height: 0 !important;
   overflow-y: auto !important;
   -webkit-overflow-scrolling: touch !important;
   padding: 1.25rem 1.5rem !important;
   background: #ffffff !important;
}

.slds-modal__footer {
   position: relative !important;
   flex: 0 0 auto !important;
   flex-shrink: 0 !important;
   padding: 0.85rem 1.5rem !important;
   background: #fbfbfd !important;
   border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
   border-bottom-left-radius: 18px !important;
   border-bottom-right-radius: 18px !important;
   display: flex !important;
   align-items: center !important;
   justify-content: flex-end !important;
   gap: 10px !important;
}
@media (max-width: 768px) {
   /* Modales centrados verticalmente en móvil (Apple Dialog Card) */
   .slds-modal {
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      padding: 16px !important;
      box-sizing: border-box !important;
   }
   .slds-modal__container {
      position: relative !important;
      top: auto !important;
      bottom: auto !important;
      left: auto !important;
      right: auto !important;
      width: 100% !important;
      max-width: 440px !important;
      margin: auto !important;
      padding: 0 !important;
      border-radius: 18px !important;
      max-height: calc(100dvh - 32px) !important;
      height: auto !important;
      display: flex !important;
      flex-direction: column !important;
      background: #ffffff !important;
      overflow: hidden !important;
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22), 0 2px 10px rgba(0, 0, 0, 0.08) !important;
      z-index: 9999 !important;
      transform: none !important;
   }
   .slds-modal__header {
      position: relative !important;
      flex: 0 0 auto !important;
      border-radius: 18px 18px 0 0 !important;
      padding: 18px 20px 14px 20px !important;
      border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
      background: #ffffff !important;
   }
   .slds-modal__header .slds-modal__title {
      font-size: 1.12rem !important;
      font-weight: 700 !important;
      color: #1d1d1f !important;
      padding-right: 36px !important;
   }
   .slds-modal__close {
      position: absolute !important;
      top: 14px !important;
      right: 14px !important;
      width: 32px !important;
      height: 32px !important;
      border-radius: 50% !important;
      background: #f2f2f7 !important;
      color: #1d1d1f !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      border: none !important;
      z-index: 10 !important;
      margin: 0 !important;
   }
   .slds-modal__close:hover,
   .slds-modal__close:focus {
      background: #e5e5ea !important;
      color: #000000 !important;
   }
   .slds-modal__close svg,
   .slds-modal__close .slds-button__icon {
      width: 14px !important;
      height: 14px !important;
      fill: currentColor !important;
      color: currentColor !important;
   }
   .slds-modal__content {
      flex: 1 1 auto !important;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch !important;
      max-height: calc(100dvh - 160px) !important;
      padding: 16px 20px !important;
      background: #ffffff !important;
   }
   .slds-modal__footer {
      flex: 0 0 auto !important;
      border-radius: 0 0 18px 18px !important;
      padding: 14px 20px !important;
      background: #ffffff !important;
      border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
      display: flex !important;
      align-items: center !important;
      justify-content: flex-end !important;
      gap: 10px !important;
   }
   .slds-modal__footer .slds-button {
      height: 38px !important;
      min-height: 38px !important;
      padding: 0 18px !important;
      font-size: 0.88rem !important;
      font-weight: 600 !important;
      border-radius: 980px !important;
   }
   /* Transformación a tarjeta estructurada con divisores horizontales (según referencia del usuario) */
   .responsive-member-table thead {
      display: none !important;
   }
   .responsive-member-table {
      display: block !important;
      width: 100% !important;
      border: none !important;
      background: transparent !important;
   }
   .responsive-member-table tbody {
      display: block !important;
      width: 100% !important;
   }
   .responsive-member-table tr:not(.tr-empty-state) {
      display: block !important;
      width: 100% !important;
      box-sizing: border-box !important;
      background: #ffffff !important;
      border: 1px solid #e0dfdb !important;
      border-radius: 6px !important;
      margin-bottom: 0.75rem !important;
      padding: 0 !important;
      overflow: hidden !important;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
   }
   /* Fila 1: NOMBRE */
   .responsive-member-table th[scope="row"] {
      display: block !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding: 0.55rem 0.75rem !important;
      border-bottom: 1px solid #e5e5e5 !important;
      border-top: none !important;
      border-left: none !important;
      border-right: none !important;
      margin: 0 !important;
      background: #ffffff !important;
      text-align: left !important;
   }
   .responsive-member-table th[scope="row"]::before {
      content: "NOMBRE:";
      display: block !important;
      font-size: 0.72rem !important;
      font-weight: 600 !important;
      color: #555555 !important;
      text-transform: uppercase !important;
      letter-spacing: 0.5px !important;
      margin-bottom: 0.25rem !important;
   }
   .responsive-member-table th[scope="row"] a {
      color: #0176d3 !important;
      font-size: 0.875rem !important;
      font-weight: 700 !important;
      text-decoration: none !important;
      word-break: break-word !important;
      display: inline-block !important;
   }
   .responsive-member-table th[scope="row"] a:hover {
      text-decoration: underline !important;
   }
   /* Filas 2 y 3: INICIO y FINALIZACIÓN */
   .responsive-member-table td[data-label="Inicio"],
   .responsive-member-table td[data-label="Finalización"] {
      display: flex !important;
      justify-content: space-between !important;
      align-items: center !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding: 0.55rem 0.75rem !important;
      border-bottom: 1px solid #e5e5e5 !important;
      border-top: none !important;
      border-left: none !important;
      border-right: none !important;
      margin: 0 !important;
      background: #ffffff !important;
      font-size: 0.8125rem !important;
      color: #181818 !important;
   }
   .responsive-member-table td[data-label="Inicio"]::before {
      content: "INICIO:";
      display: inline-block !important;
      font-size: 0.72rem !important;
      font-weight: 600 !important;
      color: #555555 !important;
      text-transform: uppercase !important;
      letter-spacing: 0.5px !important;
      margin-right: 0.5rem !important;
   }
   .responsive-member-table td[data-label="Finalización"]::before {
      content: "FINALIZACIÓN:";
      display: inline-block !important;
      font-size: 0.72rem !important;
      font-weight: 600 !important;
      color: #555555 !important;
      text-transform: uppercase !important;
      letter-spacing: 0.5px !important;
      margin-right: 0.5rem !important;
   }
   .responsive-member-table td[data-label="Inicio"] .slds-truncate,
   .responsive-member-table td[data-label="Finalización"] .slds-truncate {
      text-align: right !important;
      white-space: normal !important;
      font-weight: 400 !important;
      color: #181818 !important;
      font-size: 0.8125rem !important;
   }
   /* Fila 4: ACCIONES */
   .responsive-member-table td.td-accion {
      display: flex !important;
      justify-content: space-between !important;
      align-items: center !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding: 0.55rem 0.75rem !important;
      border: none !important;
      margin: 0 !important;
      background: #ffffff !important;
   }
   .responsive-member-table td.td-accion::before {
      content: "ACCIONES:";
      display: inline-block !important;
      font-size: 0.72rem !important;
      font-weight: 600 !important;
      color: #555555 !important;
      text-transform: uppercase !important;
      letter-spacing: 0.5px !important;
   }
   .responsive-member-table td.td-accion form {
      margin: 0 0 0 auto !important;
      width: auto !important;
      display: inline-flex !important;
      justify-content: flex-end !important;
   }
   /* Botón Eliminar tipo píldora (exacto al estilo Notificar del diseño de referencia) */
   .responsive-member-table td.td-accion .custom-btn-eliminar {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      padding: 0.25rem 0.95rem !important;
      min-height: 1.85rem !important;
      height: 1.85rem !important;
      border-radius: 15px !important;
      font-size: 0.75rem !important;
      font-weight: 600 !important;
      letter-spacing: 0.3px !important;
      background-color: #ffffff !important;
      color: #ba0517 !important;
      border: 1px solid #ba0517 !important;
      transition: all 0.2s ease !important;
      cursor: pointer !important;
      width: auto !important;
      min-width: 0 !important;
      box-shadow: none !important;
      margin: 0 !important;
   }
   .responsive-member-table td.td-accion .custom-btn-eliminar:hover,
   .responsive-member-table td.td-accion .custom-btn-eliminar:focus {
      background-color: #ba0517 !important;
      color: #ffffff !important;
      border-color: #ba0517 !important;
   }
   .responsive-member-table td.td-accion .custom-btn-eliminar:active {
      transform: translateY(1px) !important;
   }
   .responsive-member-table td.td-accion .custom-btn-eliminar .btn-eliminar-text {
      display: inline !important;
   }
   .responsive-member-table tr.tr-empty-state td {
      display: block !important;
      width: 100% !important;
      padding: 1.5rem !important;
      text-align: center !important;
      border: none !important;
   }
}
/* Estilo para botón eliminar en tabla de miembros (escritorio: centrado y más compacto) */
@media (min-width: 641px) {
   .responsive-member-table td.td-accion {
      text-align: center !important;
   }
   .responsive-member-table td.td-accion form {
      display: inline-flex !important;
      justify-content: center !important;
      align-items: center !important;
      margin: 0 auto !important;
   }
   .responsive-member-table td.td-accion .custom-btn-eliminar {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      font-weight: 600 !important;
      font-size: 0.75rem !important;
      padding: 0.2rem 0.75rem !important;
      height: 1.75rem !important;
      min-height: 1.75rem !important;
      line-height: 1.75rem !important;
      margin: 0 auto !important;
      border-radius: 4px !important;
      letter-spacing: 0.2px !important;
   }
}
/* Eliminar líneas y efectos de hover, focus y active al interactuar con la tabla de miembros */
.responsive-member-table,
.responsive-member-table *,
.responsive-member-table tr,
.responsive-member-table th,
.responsive-member-table td,
.responsive-member-table a,
.responsive-member-table span,
.responsive-member-table div,
.responsive-member-table thead th,
.responsive-member-table thead th * {
   outline: none !important;
   -webkit-tap-highlight-color: transparent !important;
}
.responsive-member-table thead th,
.responsive-member-table thead th * {
   cursor: default !important;
   user-select: none !important;
}
.responsive-member-table tr:hover,
.responsive-member-table tr:focus,
.responsive-member-table tr:active,
.responsive-member-table th:hover,
.responsive-member-table th:focus,
.responsive-member-table th:active,
.responsive-member-table td:hover,
.responsive-member-table td:focus,
.responsive-member-table td:active,
.responsive-member-table tbody tr:hover > td,
.responsive-member-table tbody tr:hover > th,
.responsive-member-table tbody tr:focus > td,
.responsive-member-table tbody tr:focus > th,
.responsive-member-table tbody tr:active > td,
.responsive-member-table tbody tr:active > th,
.responsive-member-table .slds-has-focus,
.responsive-member-table .slds-has-focus *,
.responsive-member-table :focus,
.responsive-member-table :active,
.responsive-member-table :focus-visible {
   outline: none !important;
   box-shadow: none !important;
   -webkit-box-shadow: none !important;
}
@media (max-width: 640px) {
   .responsive-member-table tr:hover,
   .responsive-member-table tr:focus,
   .responsive-member-table tr:active,
   .responsive-member-table th:hover,
   .responsive-member-table th:focus,
   .responsive-member-table th:active,
   .responsive-member-table td:hover,
   .responsive-member-table td:focus,
   .responsive-member-table td:active,
   .responsive-member-table tbody tr:hover > td,
   .responsive-member-table tbody tr:hover > th {
      background-color: #ffffff !important;
      box-shadow: none !important;
      outline: none !important;
   }
}
/* Botón de notificación en sesiones */
.btn-notificar-seguimiento {
   transition: all 0.3s ease !important;
   border-radius: 15px !important;
   /* padding-left: 1.2rem !important;
   padding-right: 1.2rem !important; */
   font-weight: 600 !important;
   font-size: 0.75rem !important;
   /* text-transform: uppercase; */
   letter-spacing: 0.5px;
}
.btn-notificar-seguimiento:hover {
   background-color: #0070d2 !important;
   color: white !important;
}
.btn-notificar-seguimiento:active {
   transform: translateY(0);
}
/* Alineación de formularios de acciones */
.form-acciones-notificar {
   text-align: left;
   margin: 0;
}
/* Columna seleccionar tabla responsiva */
.columna-seleccionar {
   width: 3.25rem;
   text-align: center; 
   padding: 0.5rem 0.25rem;
}
/* Accordion styles for collaborator sections */
.colaborador-section {
   background-color: #ffffff;
   border: 1px solid #dddbda;
   border-radius: 0.25rem;
   margin-bottom: 1rem;
   box-shadow: 0 2px 2px rgba(0,0,0,0.03);
   overflow: hidden;
   width: 100%;
}
.colaborador-summary {
   display: flex;
   align-items: center;
   padding: 0.65rem 1rem;
   background-color: #f3f3f3;
   border-bottom: 1px solid #dddbda;
   font-size: 0.95rem;
   font-weight: 600;
   cursor: pointer;
   user-select: none;
   list-style: none; /* Hide default list-style for chrome */
   transition: background-color 0.15s ease;
}
.colaborador-summary:hover {
   background-color: #eef1f6;
}
.colaborador-summary a {
   color: #0176d3;
   font-weight: 600;
   text-decoration: none;
}
.colaborador-summary a:hover {
   text-decoration: underline;
   color: #014486;
}
/* Hide default marker in Safari and Chrome */
.colaborador-summary::-webkit-details-marker {
   display: none;
}
.colaborador-summary::marker {
   display: none;
}
/* Arrow icon on the left */
.colaborador-summary::before {
   content: "";
   display: inline-block;
   width: 0.45rem;
   height: 0.45rem;
   border-right: 2px solid #0176d3;
   border-bottom: 2px solid #0176d3;
   transform: rotate(-45deg); /* Pointing right (closed) */
   margin-right: 0.75rem;
   transition: transform 0.2s ease;
   flex-shrink: 0;
}
.colaborador-section[open] > .colaborador-summary::before {
   transform: rotate(45deg); /* Pointing down (open) */
}
.colaborador-section:not([open]) > .colaborador-summary {
   border-bottom: none;
}
.colaborador-content {
   background-color: #ffffff;
}
/* Table refinements inside accordion content */
.colaborador-content table {
   border: none !important;
}
.colaborador-content table thead tr th {
   border-top: none !important;
   background-color: #f9fafc !important;
}
/* Ensure details wrapper takes full width */
.slds-page-header__row_gutters-block {
   display: block !important;
   width: 100% !important;
}
/* Prevent horizontal resizing of textareas and force 100% width */
textarea.slds-textarea, 
textarea.slds-input,
textarea.custom-input-form,
textarea {
   width: 100% !important;
   max-width: 100% !important;
   margin-top: 4px;
   margin-bottom: 4px; 
   border-bottom: none;
   box-sizing: border-box;
   width: 100%;
}
.custom-menu-list .slds-listbox__item:first-child {
   margin-top: 0;
}
.custom-menu-list .slds-listbox__item:last-child {
   margin-bottom: 0;
}
.custom-menu-list .slds-listbox__option {
   padding: 10px 16px !important; /* Smaller padding */
   border: 1px solid #e5e5e5; /* Restore borders */
   border-radius: 8px; /* Restore rounded corners */
   transition: all 0.2s ease-in-out;
   background: #fff;
   box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* Restore subtle shadow */
   display: flex;
   width: 100%;
   box-sizing: border-box;
   align-items: center;
}
.custom-menu-list .slds-listbox__option:hover {
   background: #f9f9f9; 
   box-shadow: 0 2px 5px rgba(0,0,0,0.1);
   border-color: #d8d8d8;
}
.custom-menu-list .slds-listbox__option.is-active {
   background: #eef4fb; 
   box-shadow: none;
   border-color: #c9e0fa; /* Subtle border for active */
}
.custom-menu-list .slds-listbox__option.is-active .slds-listbox__option-text {
   font-weight: 700;
   color: #001f3f;
}
.custom-menu-list .slds-icon_container--circle {
   border-radius: 50%;
   padding: 4px; /* Smaller padding inside icon container */
   box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.custom-menu-list .slds-icon_small {
   width: 1rem;
   height: 1rem;
}
.custom-menu-list .slds-listbox__option-text {
   font-size: 0.9rem; /* Smaller text size */
   color: #080707;
   font-weight: 400;
}
#app-launcher-popover {
   width: 380px !important;
   max-width: 95vw;
   border-radius: 8px;
   border: 1px solid #d8dde6;
   box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
@media (max-width: 768px) {
   #app-launcher-popover {
      position: absolute !important;
      top: calc(100% + 5px) !important;
      left: 2% !important;
      width: 96% !important;
      max-width: none !important;
      min-width: 0 !important; /* Fix for SLDS min-width 25rem */
      border-radius: 8px;
      border: 1px solid #d8dde6 !important;
      max-height: calc(100vh - 80px);
      overflow-y: auto;
      z-index: 10000;
      box-sizing: border-box !important;
   }
   .custom-menu-list {
      width: 100% !important;
      box-sizing: border-box !important;
   }
   .custom-menu-list .slds-listbox__option {
      padding: 8px 12px !important; /* Smaller padding for mobile */
      width: 100% !important;
      box-sizing: border-box !important;
   }
}
/* Cantidad input padding */
.input-cantidad {
   padding-left: 0.75rem !important;
   padding-right: 0.75rem !important;
}
/* Fix p tag margins inside form static elements */
.slds-form-element__static p {
   margin: 0;
   padding: 0;
}
/* Sidebar Vertical Navigation - Salesforce Styling */
.sidebar-nav {
   border-radius: 0.375rem !important;
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
   overflow: hidden;
}
.group-header {
   padding: 0.6rem 1rem !important;
   font-size: 0.75rem !important;
   font-weight: 700 !important;
   text-transform: uppercase !important;
   letter-spacing: 0.05em !important;
   color: #514f4d !important;
   background: #f8f9fb !important;
   border-bottom: 1px solid #e5e5e5 !important;
   border-top: 1px solid #e5e5e5 !important;
   transition: background-color 0.2s ease, color 0.2s ease !important;
}
.group-header .slds-icon {
   fill: #0176d3 !important;
}
.group-header:hover {
   background: #eef4f9 !important;
   color: #0176d3 !important;
}
.diametro-item, .sidebar-nav-item {
   color: #2b2826 !important;
   font-size: 0.875rem !important;
   transition: all 0.2s ease-in-out !important;
}
.diametro-item:hover, .sidebar-nav-item:hover {
   background: #f3f9fe !important;
   color: #0176d3 !important;
}
.diametro-item.active, .sidebar-nav-item.active {
   background: #ebf5fe !important;
   color: #0176d3 !important;
   font-weight: 700 !important;
   border-left: 4px solid #0176d3 !important;
   box-shadow: inset 0 0 0 1px rgba(1, 118, 211, 0.08) !important;
}
/* ── Sección Card Rediseño (Light Theme SLDS) ────────────────────────────────────────────────────────── */
.seccion-card {
   background: #ffffff;
   border: 1px solid #dddbda;
   border-radius: 0.25rem;
   overflow: hidden;
   margin-bottom: 1.5rem;
   animation: seccionFadeIn 0.3s ease;
   color: #181818;
   font-family: inherit;
   box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.1);
}
@keyframes seccionFadeIn {
   from { opacity: 0; transform: translateY(8px); }
   to   { opacity: 1; transform: translateY(0); }
}
@keyframes seccionFadeOut {
   from { opacity: 1; transform: scale(1); }
   to   { opacity: 0; transform: scale(0.95); }
}
.seccion-card-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 1rem 1.5rem;
   border-bottom: 1px solid #dddbda;
   background: #f3f2f2;
   gap: 1rem;
}
.seccion-titulo-input {
   font-weight: 700;
   font-size: 1.125rem;
   border: 1px solid transparent;
   background: transparent;
   color: #2b2826;
   padding: .25rem .5rem;
   border-radius: .25rem;
   transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
   flex: 1;
}
.seccion-titulo-input:focus {
   border-color: #0176d3;
   background: #ffffff;
   outline: none;
   box-shadow: 0 0 3px 0 #0176d3;
}
.seccion-titulo-input.input-error {
   border-color: #ea001e;
   background: #feeeee;
}
.seccion-card-actions {
   display: flex;
   align-items: center;
   gap: .75rem;
   flex-shrink: 0;
}
.seccion-card-actions .btn-agregar-producto {
   background: #ffffff;
   border: 1px solid #dddbda;
   color: #0176d3;
   border-radius: .25rem;
   padding: 0 1rem;
   height: 32px;
   line-height: 30px;
   font-weight: 600;
   transition: background 0.15s, border-color 0.15s;
}
.seccion-card-actions .btn-agregar-producto:hover {
   background: #f3f2f2;
   border-color: #c9c7c5;
}
.seccion-card-actions .btn-agregar-producto svg {
   fill: #0176d3;
}
.seccion-card-actions .btn-eliminar-seccion {
   background: #ffffff;
   border: 1px solid #dddbda;
   color: #706e6b;
   border-radius: .25rem;
   width: 32px;
   height: 32px;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: background 0.15s, border-color 0.15s;
}
.seccion-card-actions .btn-eliminar-seccion:hover {
   background: #feeeee;
   border-color: #ea001e;
}
.seccion-card-actions .btn-eliminar-seccion svg {
   fill: #706e6b;
}
.seccion-card-actions .btn-eliminar-seccion:hover svg {
   fill: #ea001e;
}
.seccion-card-body {
   position: relative;
   min-height: 80px;
   padding: 0.5rem 1.5rem 1.5rem;
   background: #ffffff;
}
.seccion-tabla {
   width: 100%;
   border-collapse: collapse;
   color: #2b2826;
}
.seccion-tabla th {
   text-align: left;
   padding: 1rem 0.5rem;
   font-weight: 700;
   color: #706e6b;
   border-bottom: 2px solid #dddbda;
   font-size: 0.8125rem;
   text-transform: uppercase;
   letter-spacing: 0.0625rem;
}
.seccion-tabla td {
   padding: 1rem 0.5rem;
   border-bottom: 1px solid #dddbda;
   vertical-align: middle;
}
.producto-nombre {
   font-weight: 600;
   color: #0176d3;
}
.producto-codigo {
   font-size: 0.75rem;
   color: #706e6b;
   margin-top: 2px;
}
.input-cant {
   background: #ffffff;
   border: 1px solid #dddbda;
   color: #2b2826;
   width: 60px;
   padding: 4px 8px;
   border-radius: .25rem;
   text-align: right;
   transition: border-color 0.15s, box-shadow 0.15s;
}
.input-cant:focus {
   outline: none;
   border-color: #0176d3;
   box-shadow: 0 0 3px 0 #0176d3;
}
.btn-quitar {
   background: transparent;
   border: 1px solid transparent;
   color: #706e6b;
   border-radius: .25rem;
   width: 28px;
   height: 28px;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: all 0.2s;
}
.btn-quitar:hover {
   background: #feeeee;
   border-color: #ea001e;
}
.btn-quitar svg { fill: #706e6b; }
.btn-quitar:hover svg { fill: #ea001e; }
.fila-pendiente td {
   position: relative;
   background-color: #fffde7;
}
.fila-pendiente td:first-child::before {
   content: '';
   position: absolute;
   left: 0;
   top: 0;
   bottom: 0;
   width: 4px;
   background: #f9a825;
}
.seccion-vacia {
   padding: 2rem;
   text-align: center;
   color: #706e6b;
}
/* ── Modal Buscar ── */
.modal-buscar-backdrop {
   position: fixed;
   top: 0; left: 0; right: 0; bottom: 0;
   background: rgba(8, 7, 7, 0.6);
   z-index: 9999;
   display: flex;
   align-items: center;
   justify-content: center;
   from { opacity: 1; transform: scale(1); }
   to   { opacity: 0; transform: scale(0.95); }
}
.seccion-card-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 1rem 1.5rem;
   border-bottom: 1px solid #dddbda;
   background: #f3f2f2;
   gap: 1rem;
}
.seccion-titulo-input {
   font-weight: 700;
   font-size: 1.125rem;
   border: 1px solid transparent;
   background: transparent;
   color: #2b2826;
   padding: .25rem .5rem;
   border-radius: .25rem;
   transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
   flex: 1;
}
.seccion-titulo-input:focus {
   border-color: #0176d3;
   background: #ffffff;
   outline: none;
   box-shadow: 0 0 3px 0 #0176d3;
}
.seccion-titulo-input.input-error {
   border-color: #ea001e;
   background: #feeeee;
}
.seccion-card-actions {
   display: flex;
   align-items: center;
   gap: .75rem;
   flex-shrink: 0;
}
.seccion-card-actions .btn-agregar-producto {
   background: #ffffff;
   border: 1px solid #dddbda;
   color: #0176d3;
   border-radius: .25rem;
   padding: 0 1rem;
   height: 32px;
   line-height: 30px;
   font-weight: 600;
   transition: background 0.15s, border-color 0.15s;
}
.seccion-card-actions .btn-agregar-producto:hover {
   background: #f3f2f2;
   border-color: #c9c7c5;
}
.seccion-card-actions .btn-agregar-producto svg {
   fill: #0176d3;
}
.seccion-card-actions .btn-eliminar-seccion {
   background: #ffffff;
   border: 1px solid #dddbda;
   color: #706e6b;
   border-radius: .25rem;
   width: 32px;
   height: 32px;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: background 0.15s, border-color 0.15s;
}
.seccion-card-actions .btn-eliminar-seccion:hover {
   background: #feeeee;
   border-color: #ea001e;
}
.seccion-card-actions .btn-eliminar-seccion svg {
   fill: #706e6b;
}
.seccion-card-actions .btn-eliminar-seccion:hover svg {
   fill: #ea001e;
}
.seccion-card-body {
   position: relative;
   min-height: 80px;
   padding: 0.5rem 1.5rem 1.5rem;
   background: #ffffff;
}
.seccion-tabla {
   width: 100%;
   border-collapse: collapse;
   color: #2b2826;
}
.seccion-tabla th {
   text-align: left;
   padding: 1rem 0.5rem;
   font-weight: 700;
   color: #706e6b;
   border-bottom: 2px solid #dddbda;
   font-size: 0.8125rem;
   text-transform: uppercase;
   letter-spacing: 0.0625rem;
}
.seccion-tabla td {
   padding: 1rem 0.5rem;
   border-bottom: 1px solid #dddbda;
   vertical-align: middle;
}
.producto-nombre {
   font-weight: 600;
   color: #0176d3;
}
.producto-codigo {
   font-size: 0.75rem;
   color: #706e6b;
   margin-top: 2px;
}
.input-cant {
   background: #ffffff;
   border: 1px solid #dddbda;
   color: #2b2826;
   width: 60px;
   padding: 4px 8px;
   border-radius: .25rem;
   text-align: right;
   transition: border-color 0.15s, box-shadow 0.15s;
}
.input-cant:focus {
   outline: none;
   border-color: #0176d3;
   box-shadow: 0 0 3px 0 #0176d3;
}
.btn-quitar {
   background: transparent;
   border: 1px solid transparent;
   color: #706e6b;
   border-radius: .25rem;
   width: 28px;
   height: 28px;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: all 0.2s;
}
.btn-quitar:hover {
   background: #feeeee;
   border-color: #ea001e;
}
.btn-quitar svg { fill: #706e6b; }
.btn-quitar:hover svg { fill: #ea001e; }
.fila-pendiente td {
   position: relative;
   background-color: #fffde7;
}
.fila-pendiente td:first-child::before {
   content: '';
   position: absolute;
   left: 0;
   top: 0;
   bottom: 0;
   width: 4px;
   background: #f9a825;
}
.seccion-vacia {
   padding: 2rem;
   text-align: center;
   color: #706e6b;
}
/* ── Modal Buscar ── */
.modal-buscar-backdrop {
   position: fixed;
   top: 0; left: 0; right: 0; bottom: 0;
   background: rgba(8, 7, 7, 0.6);
   z-index: 9999;
   display: flex;
   align-items: center;
   justify-content: center;
   opacity: 0;
   pointer-events: none;
   transition: opacity 0.2s;
}
.modal-buscar-backdrop.active {
   opacity: 1;
   pointer-events: auto;
}
.modal-buscar {
   background: #ffffff;
   width: 100%;
   max-width: 900px;
   border-radius: .25rem;
   box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.16);
   display: flex;
   flex-direction: column;
   max-height: 80vh;
   transform: translateY(20px);
   transition: transform 0.2s;
}
.modal-buscar-backdrop.active .modal-buscar {
   transform: translateY(0);
}
.modal-buscar-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 0.75rem 1rem;
   border-bottom: 1px solid #dddbda;
   background: #f3f2f2;
   border-radius: .25rem .25rem 0 0;
}
.modal-buscar-header h2 {
   font-size: 1.1rem;
   font-weight: 700;
   margin: 0;
   color: #2b2826;
}
.modal-buscar-body {
   padding: 1rem;
   overflow-y: auto;
   flex: 1;
}
.modal-filtros {
   display: flex;
   gap: 1rem;
   margin-bottom: 1rem;
}
.modal-producto-item {
   display: flex;
   align-items: center;
   padding: 0.35rem 0.75rem;
   border: 1px solid #dddbda;
   border-radius: .25rem;
   margin-bottom: 0.25rem;
   transition: background 0.15s;
   background: #ffffff;
}
.modal-producto-item:hover {
   background: #f3f2f2;
}
.modal-producto-info {
   flex: 1;
   display: flex;
   align-items: center;
   gap: 1rem;
   overflow: hidden;
}
.modal-producto-nombre {
   font-size: 0.85rem;
   font-weight: 700;
   color: #2b2826;
   white-space: nowrap;
}
.modal-producto-desc {
   font-size: 0.75rem;
   color: #706e6b;
   margin-top: 0;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}
.modal-producto-precio {
   font-size: 0.85rem;
   font-weight: 700;
   color: #0176d3;
   margin-right: 1rem;
}
.modal-producto-agregado {
   background: #e8f7e8 !important;
   opacity: 0.7;
   border-color: #4bca81;
}
.modal-producto-agregado .modal-producto-nombre {
   text-decoration: line-through;
   color: #706e6b;
}
/* ── Responsive Móviles (hasta 767px) ── */
@media (max-width: 767px) {
   .modal-filtros {
      flex-direction: column;
      align-items: stretch;
   }
   .seccion-card-header {
      flex-direction: column;
      align-items: stretch;
   }
   .seccion-card-actions {
      justify-content: flex-end;
      margin-top: .5rem;
   }
}
/* Responsive Toasts */
@media (max-width: 48rem) {
   .slds-notify_container,
   .custom-notificacion {
      width: 100% !important;
      padding: 0 1rem;
      box-sizing: border-box;
      display: flex;
      justify-content: center;
      left: 0 !important;
      transform: none !important;
   }
   .slds-notify_toast {
      min-width: 0 !important;
      width: 100% !important;
      max-width: 100% !important;
      margin: 0 !important;
      box-sizing: border-box;
      white-space: normal;
   }
   .slds-notify__content h2 {
      white-space: normal;
      word-wrap: break-word;
   }
}
.pills-wrapper {
   margin-bottom: 0.75rem;
   padding: 0.5rem 1.5rem 0 0;
}
@media (max-width: 47.9375em) {
   .btn-quitar {
      float: right;
   }
   .pills-wrapper {
      margin-bottom: 0;
      padding: 0;
   }
   .pills-container {
      border-radius: 0 !important;
      width: 100% !important;
      padding: 0.5rem 0.25rem !important;
   }
}
/* Opcion B - Diseño Pestañas (Folder/Scoped Tabs) */
.pills-container {
   display: flex;
   flex-wrap: wrap;
   gap: 0.15rem;
   background: transparent;
   padding: 0 0.5rem;
   width: 100%;
   border-bottom: 1px solid #dddbda;
}
.pill-btn {
   display: flex;
   align-items: center;
   border-radius: 0.25rem 0.25rem 0 0; /* Esquinas superiores redondeadas */
   font-weight: 600;
   font-size: 0.85rem;
   transition: all 0.2s;
   overflow: hidden;
   border: 1px solid transparent;
   border-bottom: none; /* Delegado al contenedor o tab inactivo */
   margin-bottom: -1px; /* Para sobreponer el borde inferior del contenedor */
   padding: 0.15rem 0.25rem;
}
.pill-btn.active {
   background: #ffffff;
   color: #0176d3;
   border: 1px solid #dddbda;
   border-bottom: 1px solid #ffffff; /* Oculta la línea del contenedor */
   box-shadow: 0 -2px 4px rgba(0,0,0,0.02);
}
.pill-btn:not(.active) {
   background: transparent;
   color: #444;
   border: 1px solid transparent;
   border-bottom: 1px solid transparent;
}
.pill-btn:not(.active):hover {
   background: #f4f6f9;
   color: #0176d3;
}
.pill-btn.btn-nueva-subseccion {
   cursor: pointer;
   margin-left: 0.25rem;
   border: 1px solid transparent !important;
   background: transparent !important;
   color: #706e6b !important;
   margin-bottom: 0;
}
.pill-btn.btn-nueva-subseccion:hover {
   background: #f4f6f9 !important;
   color: #0176d3 !important;
}
.pill-btn .btn-eliminar-subseccion:hover {
   opacity: 1 !important;
}
/* Quitar sombra azul excesiva de inputs y selects en focus */
.slds-input:focus, .slds-select:focus, .custom-input-form:focus {
    box-shadow: none !important;
    outline: none !important;
}
/* Custom time input */
.custom-time-input::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
    opacity: 0;
}
/* Custom time input dropdown (Picklist de horas) */
.custom-time-input-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    margin-top: 2px !important;
    z-index: 99999 !important;
    max-height: 180px !important;
    overflow-y: auto !important;
    background: #ffffff !important;
    border: 1px solid #dddbda !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    padding: 0.25rem 0 !important;
}
.custom-time-input-dropdown .slds-listbox__item {
    cursor: pointer;
}
.custom-time-input-dropdown .slds-listbox__option {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.8125rem !important;
    color: #181818 !important;
    display: flex !important;
    align-items: center !important;
    transition: background-color 0.1s ease !important;
}
.custom-time-input-dropdown .slds-listbox__option:hover {
    background-color: #f3f3f3 !important;
    color: #0176d3 !important;
}
.custom-time-input-dropdown .slds-listbox__option.slds-is-selected {
    background-color: #0176d3 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}
/* Tooltip custom left-aligned */
.custom-tooltip-wrap.custom-tooltip-left .custom-tooltip-bubble {
   left: 0;
   transform: none;
}
.custom-tooltip-wrap.custom-tooltip-left .custom-tooltip-bubble::after {
   left: 10px;
   transform: none;
}
/* Botones formulario detalle */
.custom-div-button {
   width: 100%; 
   display: flex; 
   padding-top: 1rem;
}
/* Formulario estilo Cotizador (Nuevo / Edición) */
.custom-input-form,
input.custom-input-form,
select.custom-input-form,
textarea.custom-input-form {
   width: 100%;
   border: none !important;
   background: transparent !important;
   border-radius: 0 !important;
   box-shadow: none !important;
   padding-left: 0.75rem !important;
}
.custom-input-form:focus,
input.custom-input-form:focus,
select.custom-input-form:focus,
textarea.custom-input-form:focus {
   box-shadow: none !important;
   border: none !important;
   outline: none !important;
   background: transparent !important;
}
input[list]::-webkit-calendar-picker-indicator {
   display: none !important;
   -webkit-appearance: none;
   opacity: 0 !important;
   width: 0 !important;
   height: 0 !important;
}
.slds-modal__header {
   border-top-right-radius: 1.25rem;
   border-top-left-radius: 1.25rem;
}
.slds-modal__footer, .custom-footer-sn-botones {
   border-bottom-right-radius: 1.25rem !important;
   border-bottom-left-radius: 1.25rem !important;
}
.slds-input[disabled], .slds-input.slds-is-disabled {
   background-color: transparent;
}
/* user (Cotizador) */
.user-header-custom {
   background: #242424 !important;
   color: #ffffff !important; /* Mejor contraste */
   border-radius: 1.25rem !important;
}
.forceHighlightsPanel {
   position: relative;
}
.forceChatterUserProfileHighlightsStencilDesktop .profilePic {
   margin: 0 !important;
   margin-top: 0 !important;
   width: 5.5rem !important;
   height: 5.5rem !important;
}
.uiMenu {
   position: relative;
}
.uiMenuList--right.uiMenuList {
   left: auto;
   right: 0;
   transform: translateX(0);
}
.uiMenuList--default.uiMenuList {
   background: var(--slds-g-color-surface-container-1, var(--lwc-colorBackgroundAlt));
   box-shadow: var(--slds-g-shadow-2, var(--lwc-shadowDropDown, 0 2px 3px 0 rgba(0, 0, 0, 0.16)));
   border: var(--slds-g-sizing-border-1, var(--lwc-borderWidthThin, 1px)) solid var(--slds-g-color-border-1, var(--lwc-colorBorder, rgb(229, 229, 229)));
   border-radius: var(--slds-g-radius-border-2, var(--lwc-borderRadiusMedium, 0.25rem));
   padding: var(--slds-g-spacing-1, var(--lwc-spacingXSmall, 0.5rem)) 0;
   float: left;
   position: absolute;
   min-width: 100px;
   max-width: 400px;
   left: 50%;
   transform: translateX(-50%);
   margin-top: var(--lwc-spacingXxxSmall, 0.125rem);
}
.uiPopupTarget .popupTargetContainer, .uiPopupTarget.popupTargetContainer {
   position: absolute;
   border-radius: 3px;
   background-color: var(--slds-g-color-surface-container-1, #FFF);
   box-shadow: 0 1px 5px var(--slds-g-color-neutral-10-opacity-75, rgba(0, 0, 0, .75));
}
div.uiPopupTarget {
   display: none;
   position: absolute;
   z-index: 9999;
}
.forceChatterEntityPhotoDetail .photoWrapper, .forceChatterEntityPhotoDetail .photoIconContainer {
   line-height: 0;
}
.forceChatterEntityPhoto.xLargeSize.circular {
   border: 5px solid var(--slds-g-color-neutral-base-95, var(--lwc-colorBackground, rgb(243, 243, 243)));
}
.forceChatterEntityPhoto.defaultPhoto {
   background-position: center;
   background-size: cover;
   background-repeat: no-repeat;
}
.forceChatterEntityPhoto.circular {
   border-radius: 50%;
}
.forceChatterEntityPhoto.xLargeSize {
   height: 10rem;
   width: 10rem;
}
.forceChatterEntityPhoto.entityPhotoSpecificity {
   overflow: hidden;
   display: inline-block;
   position: relative;
   box-sizing: content-box;
   flex-grow: initial;
}
.forceChatterEntityPhotoDetail .photoDropdown, .forceChatterEntityPhotoDetail .circularInMobile {
   position: absolute;
   bottom: 9%;
   right: 4%;
}
.forceChatterEntityPhotoDetail .photoDropdown .photoIcon {
   width: 21px;
   height: 21px;
   padding: 3.5px;
}
.forceChatterEntityPhotoDetail .photoIcon {
   background: rgba(255, 255, 255, 0.6);
   border-radius: var(--lwc-borderRadiusSmall, 0.125rem);
   color: rgb(74, 74, 74);
   padding: 0;
   line-height: 0;
}
.forceChatterUserProfileHighlightsStencilDesktop .highlightsH1 {
   font-weight: 700 !important;
   font-size: 1.15rem !important;
   letter-spacing: -0.015em !important;
   line-height: 1.25 !important;
   color: #1d1d1f !important;
   margin-top: 0.5rem;
}
.forceStyle.truncate, .forceStyle .truncate, .slds-truncate {
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
   min-width: 0; 
}
.slds-media__body, .slds-col {
   min-width: 0;
}
.slds-item_detail, .slds-tile__title, .slds-truncate {
   max-width: 100%;
}
.slds-item_detail {
   overflow-wrap: anywhere;
   word-break: break-word;
}
.forceChatterUserProfileHighlightsStencilDesktop .up-m-top_small {
   margin-top: 0.5rem;
}
.forceChatterUserProfileHighlightsStencilDesktop .secondaryFields {
   font-weight: bold;
}
.forceChatterUserProfileHighlightsStencilDesktop .secondaryFields li, .forceChatterUserProfileHighlightsStencilDesktop .secondaryFields div {
   display: inline;
   white-space: nowrap;
}
.forceChatterUserProfileHighlightsStencilDesktop .editAboutMe {
   width: 10rem;
}
.custom-select-header {
   border: none;
   background: transparent;
}
.custom-a-form {
   color: #0b5cab;
   text-decoration: none;
   -webkit-transition: color 0.1s linear;
   transition: color 0.1s linear;
}
.custom-a-form:focus, .custom-a-form:active {
   border: none;
   --slds-c-input-shadow: unset;
}
.user-header-custom .primaryFieldAndActions,
.user-header-custom .primaryFieldAndActions span.uiOutputText {
   white-space: normal !important;
   word-wrap: break-word !important;
}
.user-header-custom .slds-button {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    min-width: 5.5rem !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.user-header-custom .forceActionLink {
    font-size: small !important;
    width: 100% !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
/* ========================================================
   Bitácora Timeline Asistencia (Index - Salesforce Style)
   ======================================================== */
.card-bitacora {
   background-color: #ffffff !important;
   border-radius: 4px;
   box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.1);
   height: 100%;
   border: 1px solid #dddbda;
}
.card-bitacora .slds-card__header {
   padding: 1.25rem 1.5rem 0.5rem 1.5rem;
   background-color: transparent;
}
.card-bitacora .bitacora-title {
   font-weight: 700;
   font-size: 1.15rem;
   color: #080707;
   margin: 0;
   line-height: 1.25;
}
.card-bitacora .bitacora-subtitle {
   color: #706e6b;
   font-size: 0.85rem;
   margin-top: 2px;
}
.custom-timeline {
   position: relative;
   width: 100%;
   max-width: 760px;
   margin: 0 auto;
   padding: 1.75rem 0.5rem;
   box-sizing: border-box;
}
/* Línea central vertical continua: SOLO se muestra si ya hay marcajes registrados */
.custom-timeline.has-items::before,
.custom-timeline:has(.timeline-item)::before {
   content: '';
   position: absolute;
   top: 24px;
   bottom: 24px;
   left: 50%;
   width: 2px;
   background: #dddbda;
   transform: translateX(-50%);
   z-index: 1;
}
.timeline-item {
   position: relative;
   display: flex;
   align-items: center;
   margin-bottom: 2.25rem;
   width: 100%;
   z-index: 2;
}
.timeline-item:last-child {
   margin-bottom: 0;
}
/* Columnas izquierda y derecha ocupan 50% exacto */
.timeline-col-left {
   width: 50%;
   padding-right: 32px;
   box-sizing: border-box;
   display: flex;
   align-items: center;
   justify-content: flex-end;
}
.timeline-col-right {
   width: 50%;
   padding-left: 32px;
   box-sizing: border-box;
   display: flex;
   align-items: center;
   justify-content: flex-start;
}
/* Badges sobre la línea - Colores Salesforce Success & Destructive */
.timeline-badge {
   position: absolute;
   left: 50%;
   top: 50%;
   transform: translate(-50%, -50%);
   width: 36px;
   height: 36px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 3;
   box-shadow: 0 0 0 3px #ffffff, 0 2px 4px rgba(0, 0, 0, 0.15);
}
.item-entrada .timeline-badge {
   background-color: #2e844a; /* SLDS Success Green */
}
.item-salida .timeline-badge {
   background-color: #ba0517; /* SLDS Destructive Red */
}
.timeline-badge svg {
   width: 18px;
   height: 18px;
   stroke: #ffffff;
}
/* Textos de fecha */
.timeline-date-text {
   font-size: 0.82rem;
   color: #86868b;
   font-weight: 500;
   white-space: nowrap;
   letter-spacing: -0.01em;
   text-transform: capitalize;
}
.timeline-date-left {
   text-align: right;
}
.timeline-date-right {
   text-align: left;
}
/* Tarjeta de Marcaje Apple HIG */
.timeline-card {
   background: #ffffff;
   border: 1px solid #dddbda;
   border-radius: 4px;
   padding: 12px 18px;
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
   width: 100%;
   max-width: 320px;
   box-sizing: border-box;
   transition: box-shadow 0.2s ease;
}
.timeline-card:hover {
   box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.item-entrada .timeline-card {
   border-left: 4px solid #2e844a;
}
.item-salida .timeline-card {
   border-right: 4px solid #ba0517;
}
.timeline-card-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 12px;
   flex-wrap: wrap;
}
.timeline-type-wrap {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   font-weight: 600;
   font-size: 0.92rem;
   color: #1d1d1f;
   flex-wrap: wrap;
}
.item-entrada .timeline-bullet {
   display: inline-block;
   width: 7px;
   height: 7px;
   border-radius: 50%;
   background-color: #2e844a;
}
.item-salida .timeline-bullet {
   display: inline-block;
   width: 7px;
   height: 7px;
   border-radius: 50%;
   background-color: #ba0517;
}
.timeline-time-val {
   font-size: 0.92rem;
   font-weight: 600;
   color: #1d1d1f;
   white-space: nowrap;
   font-variant-numeric: tabular-nums;
   font-feature-settings: "tnum" 1;
}
.timeline-card-subtitle {
   font-size: 0.8rem;
   color: #86868b;
   margin-top: 4px;
   font-weight: 400;
}
/* Ajuste móvil */
@media (max-width: 640px) {
   .custom-timeline.has-items::before,
   .custom-timeline:has(.timeline-item)::before {
      left: 20px;
      transform: none;
   }
   .timeline-item {
      flex-direction: column;
      align-items: flex-start;
      padding-left: 48px;
      margin-bottom: 2rem;
   }
   .timeline-col-left, .timeline-col-right {
      width: 100%;
      padding: 0;
      justify-content: flex-start;
   }
   .timeline-badge {
      left: 20px;
      transform: translate(-50%, 0);
      top: 0;
   }
   .timeline-date-left, .timeline-date-right {
      text-align: left;
      margin-bottom: 8px;
   }
   .timeline-card-subtitle.slds-text-align_right {
      text-align: left !important;
   }
   .item-salida .timeline-card {
      border-right: 1px solid #dddbda;
      border-left: 4px solid #ba0517;
   }
}
/* Botón Eliminar / Destructivo (Siempre coloreado en rojo sólido con texto blanco y mismo tamaño que botones estándar) */
.custom-btn-eliminar,
.custom-btn-desasignar {
   color: #ffffff !important;
   background-color: #ba0517 !important;
   border: 1px solid #ba0517 !important;
   border-radius: 4px !important;
   padding: 0 1rem !important;
   font-size: 0.8125rem !important;
   font-weight: 500 !important;
   line-height: 1.875rem !important;
   box-sizing: border-box !important;
   display: inline-flex !important;
   align-items: center !important;
   justify-content: center !important;
   text-align: center !important;
   vertical-align: middle !important;
   cursor: pointer !important;
   transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
   text-decoration: none !important;
}
.custom-btn-eliminar:hover,
.custom-btn-eliminar:focus,
.custom-btn-desasignar:hover,
.custom-btn-desasignar:focus {
   background-color: #8e0312 !important;
   border-color: #8e0312 !important;
   color: #ffffff !important;
   text-decoration: none !important;
   box-shadow: 0 2px 4px rgba(142, 3, 18, 0.35) !important;
   z-index: 1 !important;
}
.custom-btn-eliminar:active,
.custom-btn-desasignar:active {
   background-color: #70020e !important;
   border-color: #70020e !important;
   color: #ffffff !important;
}
.slds-button-group-list li form {
   display: inline-flex !important;
   height: 100% !important;
   margin: 0 !important;
   vertical-align: middle !important;
}
.slds-button-group-list li .custom-btn-eliminar,
.slds-button-group-list li .custom-btn-desasignar {
   border-radius: 0 !important;
   margin-left: -1px !important;
}
.slds-button-group-list li:first-child .custom-btn-eliminar,
.slds-button-group-list li:first-child .custom-btn-desasignar {
   border-top-left-radius: 0.25rem !important;
   border-bottom-left-radius: 0.25rem !important;
   border-top-right-radius: 0 !important;
   border-bottom-right-radius: 0 !important;
   margin-left: 0 !important;
}
.slds-button-group-list li:last-child .custom-btn-eliminar,
.slds-button-group-list li:last-child .custom-btn-desasignar {
   border-top-right-radius: 0.25rem !important;
   border-bottom-right-radius: 0.25rem !important;
   border-top-left-radius: 0 !important;
   border-bottom-left-radius: 0 !important;
}
.slds-button-group-list li:only-child .custom-btn-eliminar,
.slds-button-group-list li:only-child .custom-btn-desasignar {
   border-radius: 0.25rem !important;
   margin-left: 0 !important;
}
/* Página de Error Fatal / Error de Conexión */
.error-page-container {
   display: flex !important;
   align-items: center !important;
   justify-content: center !important;
   min-height: 100vh !important;
   background-color: #f3f3f3 !important;
   padding: 1.5rem !important;
   box-sizing: border-box !important;
}
.error-page-card {
   max-width: 600px !important;
   width: 100% !important;
   padding: 2.5rem 2rem !important;
   border-radius: 0.5rem !important;
   display: flex !important;
   flex-direction: column !important;
   align-items: center !important;
   text-align: center !important;
   box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) !important;
}
.error-page-title {
   font-weight: bold !important;
   color: #ffffff !important;
   margin-bottom: 0.75rem !important;
   font-size: 1.35rem !important;
}
.error-page-msg {
   font-size: 1.05rem !important;
   line-height: 1.5 !important;
   text-align: center !important;
   max-width: 90% !important;
   color: #ffffff !important;
   margin-bottom: 1.5rem !important;
}
/* Botón neutral dentro de alertas SLDS o página de error fatal */
.fatal-error-btn,
.error-page-card a.slds-button,
.error-page-card .slds-button_neutral,
.slds-notify_alert a.slds-button_neutral,
.slds-notify_alert .slds-button_neutral,
.slds-notify a.slds-button_neutral {
   border-radius: 0.375rem !important;
   color: #0176d3 !important;
   background-color: #ffffff !important;
   border: 1px solid #c9c9c9 !important;
   padding: 0.5rem 1.5rem !important;
   font-size: 0.875rem !important;
   font-weight: 600 !important;
   text-decoration: none !important;
   display: inline-flex !important;
   align-items: center !important;
   justify-content: center !important;
   cursor: pointer !important;
   transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}
.fatal-error-btn:hover,
.fatal-error-btn:focus,
.error-page-card a.slds-button:hover,
.error-page-card a.slds-button:focus,
.error-page-card .slds-button_neutral:hover,
.error-page-card .slds-button_neutral:focus,
.slds-notify_alert a.slds-button_neutral:hover,
.slds-notify_alert a.slds-button_neutral:focus,
.slds-notify_alert .slds-button_neutral:hover,
.slds-notify_alert .slds-button_neutral:focus,
.slds-notify a.slds-button_neutral:hover,
.slds-notify a.slds-button_neutral:focus {
   background-color: #f3f3f3 !important;
   color: #014486 !important;
   border-color: #aeaeae !important;
   text-decoration: none !important;
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}
/* ==============================================================
   APPLE HIG PRO AESTHETICS OVERRIDES
   ============================================================== */
/* GLOBAL HEADER (Liquid Glass) */
.slds-global-header_container {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: none !important;
}
.slds-global-header {
    background: transparent !important;
}
/* PAGE HEADER (Rounded corners, softer shadow) */
.slds-page-header {
    background: #ffffff !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.02) !important;
    padding: 1.5rem !important;
}
/* CARDS AND TABS */
.slds-card, .slds-tabs_default__content {
    background: #ffffff !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.02) !important;
    overflow: hidden;
}

.slds-tabs_card {
    background: #ffffff !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.02) !important;
    overflow: visible !important;
}
.slds-card__header {
    padding: 1rem 1.25rem !important; /* Más espacio para que el botón Nuevo no roce los bordes */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 0 !important;
}
.slds-card__header-title {
    font-weight: 600 !important;
    letter-spacing: -0.015em;
}
.slds-card__footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
    background: #fafafc !important; /* Un gris muy sutil para diferenciar el footer */
    padding: 0.75rem 1rem !important;
    text-align: center !important;
}
.slds-card__footer-action {
    font-weight: 500 !important;
    color: #007aff !important;
}
.slds-card__footer-action:hover {
    text-decoration: underline !important;
}
/* TABS NAVIGATION */
.slds-tabs_default__nav {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.slds-tabs_default__item.slds-is-active::after {
    background-color: #007aff !important; /* Apple Blue */
    height: 3px !important;
    border-radius: 3px 3px 0 0 !important;
}
.slds-tabs_default__link {
    font-weight: 500 !important;
    color: #8e8e93 !important; /* System Gray */
}
.slds-tabs_default__item.slds-is-active .slds-tabs_default__link {
    color: #1c1c1e !important;
}
/* BUTTONS (APPLE HIG STANDARD 34PX) */
.slds-button_neutral,
.slds-button_destructive,
.slds-button_brand {
    height: 34px !important;
    line-height: 34px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    padding: 0 14px !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.slds-button_neutral {
    color: #0071E3 !important;
    border: 1px solid rgba(0, 113, 227, 0.2) !important;
    border-left-color: rgba(0, 113, 227, 0.2) !important;
    background: #ffffff !important;
}
.slds-button_neutral:hover {
    background: #f2f2f7 !important;
    border-color: rgba(0, 113, 227, 0.4) !important;
    transform: translateY(-1px);
}
.slds-button_destructive {
    border: 1px solid rgba(255, 59, 48, 0.2) !important;
    border-left-color: rgba(255, 59, 48, 0.2) !important;
    color: #ff3b30 !important;
    background: #ffffff !important;
}
.slds-button_destructive:hover {
    background: #ff3b30 !important;
    color: #ffffff !important;
    border-color: #ff3b30 !important;
    transform: translateY(-1px);
}
.slds-button_brand {
    background-color: #0071E3 !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.22) !important;
}
.slds-button_brand:hover {
    background-color: #0077ED !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.32) !important;
}
.slds-button_neutral:active,
.slds-button_destructive:active,
.slds-button_brand:active {
    transform: scale(0.97) !important;
}
/* Espaciado de botones (Apple HIG: botones independientes no deben tocarse) */
.slds-button-group-list {
    display: flex !important;
    gap: 0.5rem !important;
}
/* SLDS fuerza las esquinas a 0 en listas de botones y oculta el borde izquierdo */
.slds-button-group-list li {
    margin: 0 !important;
}
.slds-button-group-list .slds-button,
.slds-button-group .slds-button {
    border-radius: 8px !important;
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-left-width: 1px !important;
    border-left-style: solid !important;
    margin-left: 0 !important; /* El botón mismo podría tener margen negativo */
}
/* INPUTS */
.slds-input, .slds-select, .slds-textarea {
    border-radius: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    background-color: rgba(0, 0, 0, 0.02) !important;
    transition: all 0.2s ease;
}
.slds-input:focus, .slds-select:focus, .slds-textarea:focus {
    background-color: #ffffff !important;
    border-color: #007aff !important;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15) !important;
}
/* SECTION TITLES */
.slds-section__title {
    background: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.slds-section__title span {
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    color: #1c1c1e !important;
    padding-top: 1rem !important;
    padding-bottom: 0.5rem !important;
}
/* PILL BUTTONS (Nueva sección, etc) */
.pill-btn {
    border-radius: 20px !important;
    font-weight: 500 !important;
    background: #f2f2f7 !important;
    border: none !important;
    color: #007aff !important;
    padding: 0.25rem 0.75rem !important;
}
.pill-btn:hover {
    background: #e5e5ea !important;
}
/* ICONS */
.slds-icon-standard-quotes, .slds-icon-standard-account {
    background-color: #007aff !important;
    border-radius: 8px !important;
}
html, body {
   font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
   color: #1c1c1e !important;
   background-color: #f2f2f7 !important;
}
/* MODAL BACKGROUND FOR MARCAJES */
.slds-backdrop {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}
.slds-modal__container {
    border-radius: 12px !important;
}
.slds-modal__header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.slds-modal__content {
    border-radius: 0 !important; 
}
/* Si el modal no tiene footer, el content es el último elemento y debe llevar la curva */
.slds-modal__content:last-child {
    border-radius: 0 0 12px 12px !important;
}
.slds-modal__footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    background: #ffffff !important;
    padding: 0.75rem 1rem !important;
}
/* FIX DEFINITIVO PARA BOTON ELIMINAR CUADRADO */
.slds-button-group-list li .custom-btn-eliminar, .slds-button-group-list li form .custom-btn-eliminar, .slds-button-group-list li:last-child .custom-btn-eliminar, .slds-button-group-list li:only-child .custom-btn-eliminar { border-radius: 8px !important; border-top-left-radius: 8px !important; border-bottom-left-radius: 8px !important; border-left: 1px solid rgba(255, 59, 48, 0.2) !important; margin-left: 0 !important; } 
.slds-button_neutral { border-radius: 8px !important; }

/* FIX PARA HEADER USUARIO OSCURO */
.slds-page-header.user-header-custom { background: #242424 !important; color: #ffffff !important; }

.slds-page-header.user-header-custom *, .slds-page-header.user-header-custom .uiOutputText, .slds-page-header.user-header-custom .uiOutputTextArea { color: #ffffff !important; }
.slds-page-header.user-header-custom .slds-button * { color: inherit !important; }

.slds-page-header.user-header-custom .slds-button_neutral, .slds-page-header.user-header-custom .slds-button_neutral * { color: #007aff !important; } 
.slds-page-header.user-header-custom { background: #242424 !important; border: none !important; }

/* APPLE HIG PREMIUM PROFILE HEADER */
.user-header-custom,
.slds-page-header.user-header-custom {
   background: rgba(28, 28, 30, 0.88) !important;
   backdrop-filter: blur(24px) !important;
   -webkit-backdrop-filter: blur(24px) !important;
   border: 1px solid rgba(255, 255, 255, 0.1) !important;
   box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
   border-radius: 16px !important;
   padding: 1.5rem 2rem !important;
   margin-bottom: 1.25rem !important;
}

.user-header-custom .media--rec-home {
   margin: 0 !important;
   display: flex !important;
   align-items: center !important;
   position: relative !important;
   gap: 1.25rem !important;
}

.user-header-custom .media__figure.profilePicWrapper,
.user-header-custom .profilePicWrapper {
   margin: 0 !important;
   flex-shrink: 0 !important;
}

.user-header-custom a.menuTrigger,
.user-header-custom .theContainer {
   display: inline-block !important;
   position: relative !important;
   overflow: visible !important;
   text-decoration: none !important;
}

.user-header-custom .photoWrapper.kw-avatar-outer-wrapper {
   position: relative !important;
   display: inline-block !important;
   width: 5.5rem !important;
   height: 5.5rem !important;
   line-height: 0 !important;
   overflow: visible !important;
}

.user-header-custom .forceChatterEntityPhoto.xLargeSize {
   width: 5.5rem !important;
   height: 5.5rem !important;
}

.slds-page-header.user-header-custom .entityPhotoSpecificity {
   background-color: transparent !important;
   border: 3px solid rgba(255, 255, 255, 0.9) !important;
   box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
   padding: 2px !important;
   width: 5.5rem !important;
   height: 5.5rem !important;
   border-radius: 50% !important;
   overflow: hidden !important;
   display: flex !important;
   align-items: center !important;
   justify-content: center !important;
}

.slds-page-header.user-header-custom .uiImage,
.slds-page-header.user-header-custom .uiImage img,
#fotoPerfilUsuario {
   width: 100% !important;
   height: 100% !important;
   border-radius: 50% !important;
   object-fit: cover !important;
   display: block !important;
}

.user-header-custom .nameActionsContainer {
   margin: 0 !important;
   padding: 0 0 0 0.5rem !important;
   flex: 1 1 auto !important;
   min-width: 0 !important;
}

.user-header-custom .primaryFieldAndActions,
.user-header-custom .primaryFieldAndActions span.uiOutputText {
   font-size: 1.6rem !important;
   font-weight: 700 !important;
   color: #ffffff !important;
   letter-spacing: -0.025em !important;
   line-height: 1.2 !important;
   margin: 0 !important;
}

.user-header-custom .slds-container_right {
   margin: 0 !important;
   margin-left: auto !important;
   flex-shrink: 0 !important;
   align-self: center !important;
}

/* AJUSTES RESPONSIVOS MÓVIL PARA CABECERA DE USUARIO (APPLE HIG <= 767px) */
@media (max-width: 767px) {
   .user-header-custom,
   .slds-page-header.user-header-custom {
      padding: 16px !important;
      border-radius: 16px !important;
      position: relative !important;
   }
   .user-header-custom .media--rec-home {
      display: flex !important;
      flex-direction: row !important;
      flex-wrap: wrap !important;
      align-items: center !important;
      gap: 12px 14px !important;
      margin: 0 !important;
      width: 100% !important;
      position: static !important;
   }
   .user-header-custom .media__figure.profilePicWrapper,
   .user-header-custom .profilePicWrapper {
      flex: 0 0 auto !important;
      margin: 0 !important;
   }
   .user-header-custom .forceChatterEntityPhoto.xLargeSize,
   .slds-page-header.user-header-custom .entityPhotoSpecificity,
   .user-header-custom .photoWrapper.kw-avatar-outer-wrapper,
   .forceChatterUserProfileHighlightsStencilDesktop .profilePic {
      width: 3.75rem !important;
      height: 3.75rem !important;
   }
   .user-header-custom .nameActionsContainer {
      flex: 1 1 calc(100% - 3.75rem - 16px) !important;
      min-width: 0 !important;
      padding: 0 !important;
      margin: 0 !important;
   }
   .user-header-custom .primaryFieldAndActions {
      margin: 0 !important;
      white-space: normal !important;
      overflow: visible !important;
   }
   .user-header-custom .primaryFieldAndActions span.uiOutputText {
      font-size: 1.22rem !important;
      font-weight: 700 !important;
      color: #ffffff !important;
      line-height: 1.25 !important;
      white-space: normal !important;
      word-break: break-word !important;
      overflow: visible !important;
      text-overflow: clip !important;
      display: block !important;
   }
   .user-header-custom .user-header-subtitle {
      margin-top: 4px !important;
   }
   .user-header-custom .user-header-subtitle__text {
      font-size: 0.82rem !important;
      color: rgba(255, 255, 255, 0.72) !important;
      line-height: 1.3 !important;
      display: block !important;
      word-break: break-word !important;
   }
   /* Contenedor del botón Editar en Fila 2 (No absoluto, no encimado) */
   .user-header-custom .slds-container_right {
      position: static !important;
      top: auto !important;
      right: auto !important;
      width: 100% !important;
      flex: 1 1 100% !important;
      margin: 6px 0 0 0 !important;
      display: flex !important;
      z-index: auto !important;
   }
   .user-header-custom .slds-container_right #header-buttons-view,
   .user-header-custom .slds-container_right .slds-button-group-list,
   .user-header-custom .slds-container_right .slds-button-group-list li {
      width: 100% !important;
      display: block !important;
      margin: 0 !important;
   }
   .user-header-custom .slds-button,
   .user-header-custom .slds-container_right .slds-button {
      width: 100% !important;
      height: 36px !important;
      min-height: 36px !important;
      line-height: 36px !important;
      padding: 0 16px !important;
      font-size: 0.84rem !important;
      font-weight: 600 !important;
      border-radius: 980px !important;
      background: rgba(255, 255, 255, 0.14) !important;
      color: #ffffff !important;
      border: 1px solid rgba(255, 255, 255, 0.28) !important;
      backdrop-filter: blur(12px) !important;
      -webkit-backdrop-filter: blur(12px) !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) !important;
   }
   .user-header-custom .slds-button:hover,
   .user-header-custom .slds-button:active,
   .user-header-custom .slds-container_right .slds-button:hover,
   .user-header-custom .slds-container_right .slds-button:active {
      background: rgba(255, 255, 255, 0.24) !important;
      color: #ffffff !important;
      border-color: rgba(255, 255, 255, 0.45) !important;
   }
}

/* APPLE HIG MENU REDESIGN */
#app-launcher-popover {
   width: 320px !important;
   border-radius: 16px !important;
   border: 1px solid rgba(0,0,0,0.05) !important;
   box-shadow: 0 16px 48px rgba(0,0,0,0.15) !important;
   background: rgba(255, 255, 255, 0.97) !important;
   backdrop-filter: blur(24px) !important;
   -webkit-backdrop-filter: blur(24px) !important;
}
#app-launcher-popover::before, #app-launcher-popover::after {
   display: none !important;
}
#app-launcher-popover .slds-popover__header {
   border-bottom: 1px solid rgba(0,0,0,0.05) !important;
   padding: 1rem 1.25rem !important;
   background: transparent !important;
}
#app-launcher-popover h2 {
   font-size: 13px !important;
   text-transform: uppercase;
   letter-spacing: 0.5px;
   color: #8e8e93 !important;
   font-weight: 600 !important;
}
.custom-menu-list .slds-listbox__option {
   padding: 10px 16px !important;
   border: none !important;
   border-radius: 10px !important;
   transition: background 0.2s ease;
   background: transparent !important;
   box-shadow: none !important;
   width: calc(100% - 16px) !important;
   margin: 4px 8px !important;
}
.custom-menu-list .slds-listbox__option:hover {
   background: rgba(0, 0, 0, 0.05) !important; 
   box-shadow: none !important;
}
.custom-menu-list .slds-listbox__option.is-active {
   background: rgba(0, 122, 255, 0.1) !important; 
   box-shadow: none !important;
}
.custom-menu-list .slds-listbox__option.is-active .slds-listbox__option-text {
   font-weight: 600 !important;
   color: #007aff !important;
}
.custom-menu-list .slds-icon_container--circle {
   box-shadow: 0 2px 4px rgba(0,0,0,0.08) !important;
}
.custom-menu-list .slds-listbox__option-text {
   font-size: 15px !important; 
   color: #1c1c1e !important;
   font-weight: 500 !important;
}

/* UNIFIED APPLE NEUTRAL TIMELINE */
.item-entrada .timeline-badge,
.item-salida .timeline-badge {
   background-color: #007aff !important; /* Apple Blue */
}
.item-entrada .timeline-card {
   border-left: 4px solid #007aff !important;
}
.item-salida .timeline-card {
   border-right: 4px solid #007aff !important;
}
.item-entrada .timeline-bullet,
.item-salida .timeline-bullet {
   background-color: #007aff !important;
}

/* WARNING STATE (Retardo / Salida Temprana) */
.timeline-item.is-warning .timeline-badge,
.timeline-item.is-warning.item-entrada .timeline-badge,
.timeline-item.is-warning.item-salida .timeline-badge {
   background-color: #ff9500 !important; /* Apple Orange */
}
.timeline-item.is-warning.item-entrada .timeline-card {
   border-left-color: #ff9500 !important;
}
.timeline-item.is-warning.item-salida .timeline-card {
   border-right-color: #ff9500 !important;
}
.timeline-item.is-warning .timeline-bullet {
   background-color: #ff9500 !important;
}

.timeline-badge-warning {
   display: inline-flex;
   align-items: center;
   background-color: rgba(255, 149, 0, 0.12);
   color: #b45309;
   padding: 2px 8px;
   border-radius: 9999px;
   font-size: 0.72rem;
   font-weight: 600;
   text-transform: uppercase;
   letter-spacing: 0.03em;
   margin-left: 6px;
   margin-right: 6px;
   border: 1px solid rgba(255, 149, 0, 0.22);
}

/* Estilos Apple HIG (Cards, Icons, Typography) */
.hig-card {
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04) !important;
    border: none !important;
    background: #ffffff !important;
}
.hig-icon-container {
    border-radius: 8px !important;
    padding: 4px !important; /* Smaller padding */
    display: inline-flex !important;
}
.hig-icon-container svg {
    fill: white !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
}
.hig-icon-container.home-icon {
    background-color: #7f8de1 !important;
    padding: 6px !important;
    border-radius: 4px !important; /* Retaining old SLDS feel */
}
.hig-icon-container.recent-icon {
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%) !important;
}
.hig-icon-container.event-icon {
    background: linear-gradient(135deg, #5856d6 0%, #3a3994 100%) !important;
}
.hig-icon-container.turno-icon {
    background: linear-gradient(135deg, #ff9500 0%, #cc7700 100%) !important;
}
.hig-icon-container.historial-icon {
    background: linear-gradient(135deg, #ff2d55 0%, #cc2444 100%) !important;
}
.hig-title {
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    color: #1c1c1e !important;
    letter-spacing: -0.01em !important;
}
.hig-subtitle {
    color: #8e8e93 !important;
    font-weight: 400 !important;
}
.hig-reloj-text {
    font-weight: 300 !important;
    font-size: 3.5rem !important;
    color: #007aff !important;
    letter-spacing: -1px !important;
    font-variant-numeric: tabular-nums !important;
}
.hig-btn-primary {
    border-radius: 12px !important;
    font-weight: 600 !important;
    background-color: #007aff !important;
    color: white !important;
    border: none !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
.hig-btn-primary:active {
    transform: scale(0.98);
}
.hig-btn-secondary {
    border-radius: 12px !important;
    font-weight: 600 !important;
    background-color: #f2f2f7 !important;
    color: #007aff !important;
    border: none !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    transition: background-color 0.15s ease !important;
}
.hig-btn-secondary:active {
    background-color: #e5e5ea !important;
}
.hig-list-container {
    background: #fbfbfd;
    border-radius: 12px;
    padding: 0 16px;
}
.hig-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5ea;
}
.hig-list-row:last-child {
    border-bottom: none;
}
.hig-list-label {
    color: #8e8e93;
    font-size: 0.9rem;
}
.hig-list-val {
    color: #1c1c1e;
    font-size: 0.95rem;
    font-weight: 500;
}
.hig-turno-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.hig-turno-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    background: rgba(88, 86, 214, 0.08);
    color: #5856D6;
    border: 1px solid rgba(88, 86, 214, 0.18);
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    letter-spacing: -0.01em;
}
.hig-empty-map {
    height: 100%;
    min-height: 250px;
    background-color: #f2f2f7;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.hig-empty-map-icon {
    padding: 10px;
    background: rgba(142, 142, 147, 0.12);
    border-radius: 50%;
}
.hig-empty-map-icon svg {
    fill: #8e8e93;
}
.hig-empty-map-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: #8e8e93;
    margin-bottom: 4px;
}
.hig-empty-map-subtitle {
    font-size: 0.85rem;
    color: #aeaeb2;
    max-width: 80%;
    text-align: center;
    line-height: 1.3;
}

/* --- APPLE HIG OVERRIDES --- */

/* Secondary Text Contrast (from #8e8e93 to #6e6e73) */
.hig-subtitle,
.slds-page-header__name-meta,
.slds-text-color_weak,
.bitacora-subtitle,
.hig-empty-map-subtitle,
.hig-empty-map-title {
   color: #6e6e73 !important;
}
.hig-empty-map-icon svg {
   fill: #6e6e73 !important;
}

/* Cards */
.hig-card {
   background-color: #FFFFFF !important;
   border: none !important;
   border-radius: 16px !important;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

/* Historial Table to look like iOS List */
.slds-table.slds-table_bordered {
   border-top: none;
   border-bottom: none;
   background-color: #FFFFFF;
   border-radius: 16px;
   overflow: hidden;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.slds-table thead th {
   background-color: #FFFFFF !important;
   color: #6e6e73 !important;
   font-weight: 600;
   border-bottom: 1px solid #E5E5EA !important;
}
.slds-table tbody tr td, .slds-table tbody tr th {
   border-bottom: 1px solid #E5E5EA !important;
   background-color: #FFFFFF !important; /* override striped */
}
.slds-table tbody tr:last-child td, .slds-table tbody tr:last-child th {
   border-bottom: none !important;
}
/* Ensure alternating striped is removed */
.slds-table_striped tbody tr:nth-of-type(even) > td, 
.slds-table_striped tbody tr:nth-of-type(even) > th {
   background-color: #FFFFFF !important;
}
/* Ensure table container scrolls without clipping shadow */
.slds-scrollable_x {
   padding: 4px;
}
/* UX Typography & Spacing Fixes */
.slds-table thead th {
   padding: 14px 16px !important;
   font-size: 0.75rem !important;
   text-transform: uppercase !important;
   letter-spacing: 0.05em !important;
   color: #8E8E93 !important;
}
.slds-table tbody tr td, .slds-table tbody tr th {
   padding: 16px !important;
   font-size: 0.9rem !important;
}
.hig-list-row {
   padding: 12px 0 !important;
}
.custom-timeline {
   display: flex;
   flex-direction: column;
   justify-content: flex-start;
   min-height: auto;
}

/* Index Apple Cards Calibration (Elimina espacios excesivos en Bitácora y Turno) */
body.index .apple-card-header {
    padding: 16px 20px 8px 20px !important;
}
body.index .apple-card-body {
    padding: 4px 20px 18px 20px !important;
}
body.index .custom-timeline {
    justify-content: flex-start !important;
    padding: 6px 0.5rem 12px 0.5rem !important;
    min-height: auto !important;
}
body.index .custom-timeline.has-items::before,
body.index .custom-timeline:has(.timeline-item)::before {
    top: 6px !important;
    bottom: 6px !important;
}
body.index .hig-list-container {
    margin-top: 0 !important;
}
body.index .hig-list-row {
    padding: 10px 0 !important;
}

/* Historial de Asistencia Table - Apple HIG Responsive (Idéntico a Vacaciones) */
.apple-historial-table {
    min-width: 620px !important;
    width: 100% !important;
    border-collapse: separate !important;
}
.apple-historial-table th {
    white-space: nowrap !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #86868b !important;
    padding: 12px 16px !important;
    background: #fbfbfd !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-top: none !important;
}
.apple-historial-table td {
    padding: 12px 16px !important;
    font-size: 0.86rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    white-space: nowrap !important;
}
.apple-historial-table .apple-table-time {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    font-weight: 600;
}

/* ==========================================================================
   APPLE HIG HERO COMPONENT (macOS / iOS Inspired)
   ========================================================================== */

.apple-hero-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: box-shadow 0.3s ease;
}

.apple-hero-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.03);
}

.apple-hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.apple-hero-greeting-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.apple-hero-avatar-badge {
    font-size: 2rem;
    line-height: 1;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.apple-hero-greeting {
    font-size: 1.55rem !important;
    font-weight: 700 !important;
    color: #1d1d1f !important;
    letter-spacing: -0.025em !important;
    margin: 0;
    line-height: 1.2 !important;
}

.apple-hero-context {
    font-size: 0.82rem !important;
    color: #86868b !important;
    margin: 3px 0 0 0;
    font-weight: 400 !important;
}

.apple-hero-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f7;
    padding: 8px 14px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #1d1d1f;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.apple-hero-date-badge .apple-icon-cal {
    color: #0071e3;
}

.apple-hero-divider {
    height: 1px;
    background: #f0f0f2;
    margin: 20px 0 22px 0;
}

.apple-hero-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.apple-hero-time-zone {
    flex: 1 1 320px;
}

.apple-clock-display {
    font-size: 3.8rem;
    font-weight: 250;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #1d1d1f;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    margin-bottom: 8px;
}

.apple-clock-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.apple-clock-tz {
    font-size: 0.82rem;
    color: #86868b;
    font-weight: 400;
}

/* Dynamic Live Status Badge */
.apple-live-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.apple-live-status-pill.status-activo {
    background: rgba(52, 199, 89, 0.12);
    color: #248a3d;
    border: 1px solid rgba(52, 199, 89, 0.25);
}

.apple-live-status-pill.status-concluido {
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
    border: 1px solid rgba(0, 113, 227, 0.2);
}

.apple-live-status-pill.status-esperando {
    background: #f5f5f7;
    color: #6e6e73;
    border: 1px solid #e5e5ea;
}

.apple-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-pulse {
    background: #34c759;
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
    animation: applePulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes applePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(52, 199, 89, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(52, 199, 89, 0);
    }
}

.dot-concluido {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0071e3;
    display: inline-block;
}

.dot-waiting {
    background: #8e8e93;
}

/* Hero Completed Summary Widget (Apple macOS / iOS HIG) */
.apple-hero-completed-summary {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    background: #fbfbfd;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 10px 18px;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    user-select: none;
}

.apple-completed-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.apple-completed-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0071e3;
    display: inline-block;
}

.apple-completed-tag {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0071e3;
}

.apple-completed-meta {
    font-size: 0.88rem;
    color: #1d1d1f;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.apple-completed-time {
    font-weight: 600;
    color: #1d1d1f;
}

.apple-completed-range {
    color: #86868b;
    font-weight: 450;
}

/* Action Dock Buttons */
.apple-hero-action-dock {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 0 1 auto;
}

.apple-dock-item {
    display: inline-flex;
}

.apple-btn-dock {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.apple-btn-dock.is-primary {
    background: #0071E3;
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.apple-btn-dock.is-primary:hover {
    background: #0077ED;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.apple-btn-dock.is-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 113, 227, 0.2);
}

.apple-btn-dock.is-completed {
    background: rgba(52, 199, 89, 0.08);
    color: #1d1d1f;
    border: 1px solid rgba(52, 199, 89, 0.3);
    cursor: default;
    box-shadow: none;
    font-weight: 500;
}

.apple-btn-dock.is-disabled {
    background: #f5f5f7;
    color: #8e8e93;
    border: 1px solid rgba(0, 0, 0, 0.04);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.75;
}

.apple-btn-icon-svg {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.apple-btn-icon-check {
    color: #248a3d;
    font-size: 0.92rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.apple-btn-title {
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1;
}

.apple-btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: appleSpin 0.8s linear infinite;
    display: inline-block;
}

@keyframes appleSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
    .apple-hero-card {
        padding: 20px 18px;
    }
    .apple-hero-greeting {
        font-size: 1.28rem !important;
    }
    .apple-clock-display {
        font-size: 2.8rem;
    }
    .apple-hero-completed-summary {
        width: 100%;
        align-items: flex-start;
        box-sizing: border-box;
    }
    .apple-hero-action-dock {
        width: 100%;
    }
    .apple-btn-dock {
        width: 100%;
    }
    .apple-dock-item {
        width: 100%;
    }
}

/* ==========================================================================
   APPLE HIG UNIFIED CARDS & BENTO GRID SYSTEM
   ========================================================================== */
.apple-card {
    background: #FFFFFF;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.apple-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
}

.apple-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px 16px 24px;
    min-width: 0;
    max-width: 100%;
}

.apple-card-header.apple-header-with-action {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.apple-card-title-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
}

.apple-card-title-group > div:not(.apple-card-icon-wrap),
.apple-card-title-text {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
}

.apple-card-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.apple-card-icon-wrap svg {
    width: 18px;
    height: 18px;
    display: block;
}

.apple-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.015em;
    margin: 0;
    line-height: 1.25;
    word-break: normal;
    overflow-wrap: break-word;
}

.apple-card-subtitle {
    font-size: 0.82rem;
    color: #86868b;
    margin: 4px 0 0 0 !important;
    line-height: 1.4 !important;
    font-weight: 400;
    white-space: normal !important;
    word-break: normal;
    overflow-wrap: break-word;
    max-width: 100%;
}

.apple-card-body {
    padding: 8px 24px 24px 24px;
    flex: 1 1 auto;
}

/* BENTO METRICS GRID */
.apple-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 900px) {
    .apple-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .apple-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.apple-metric-tile {
    background: #fbfbfd;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 128px;
    transition: all 0.2s ease;
}

.apple-metric-tile:hover {
    background: #f5f5f7;
    border-color: rgba(0, 0, 0, 0.08);
}

.apple-metric-tile[data-kpi-filter] {
    cursor: pointer;
}

.apple-metric-tile[data-kpi-filter]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.apple-metric-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 22px;
}

.apple-metric-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.apple-metric-value-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 8px 0 6px 0;
    min-height: 38px;
}

.apple-metric-big-num {
    font-size: 2.1rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.apple-metric-date {
    font-size: 1.55rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.apple-metric-text {
    font-size: 1.35rem;
    line-height: 1.2;
    white-space: normal;
}

.apple-metric-big-num.num-danger {
    color: #FF3B30;
}

.apple-metric-big-num.num-warning {
    color: #FF9500;
}

.apple-metric-big-num.num-success {
    color: #34C759;
}

.apple-metric-big-num.num-normal {
    color: #1d1d1f;
}

.apple-metric-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 9999px;
    display: inline-block;
    white-space: nowrap;
}

.apple-metric-pill.pill-success {
    background: rgba(52, 199, 89, 0.12);
    color: #248a3d;
}

.apple-metric-pill.pill-warning {
    background: rgba(255, 149, 0, 0.12);
    color: #d97706;
}

.apple-metric-pill.pill-danger {
    background: rgba(255, 59, 48, 0.12);
    color: #d70015;
}

.apple-metric-pill.pill-neutral {
    background: rgba(0, 0, 0, 0.06);
    color: #86868b;
}

.apple-metric-caption {
    font-size: 0.76rem;
    color: #86868b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* APPLE PRIMARY CAPSULE BUTTON (HIG STANDARD) */
.apple-btn-primary {
    background-color: #0071E3 !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
    height: 34px !important;
    line-height: 34px !important;
    padding: 0 16px !important;
    border-radius: 980px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
    -webkit-font-smoothing: antialiased;
}

.apple-btn-primary:hover {
    background-color: #0077ED !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.26) !important;
    color: #ffffff !important;
}

.apple-btn-primary:active {
    transform: scale(0.97) !important;
    background-color: #0062C4 !important;
}

.apple-btn-label-desktop {
    display: inline;
}

.apple-btn-label-mobile {
    display: none;
}

/* APPLE HIG TABLE */
.apple-table-wrap {
    overflow-x: auto;
}

.apple-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.84rem;
}

.apple-table thead th {
    background: #fbfbfd;
    color: #86868b;
    font-size: 0.70rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.apple-table tbody tr.apple-table-row {
    transition: background 0.15s ease;
}

.apple-table tbody tr.apple-table-row:hover {
    background: rgba(0, 113, 227, 0.03);
}

.apple-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: #1d1d1f;
    font-size: 0.84rem;
    vertical-align: middle;
}

.apple-table-time {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    font-family: inherit;
    font-weight: 500;
    color: #1d1d1f;
}

.apple-table-retardo {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    font-weight: 600;
    color: #d97706;
}

.apple-table-row-total td {
    background: #fbfbfd;
    padding: 14px 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* APPLE STATUS CAPSULES */
.apple-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.apple-tag-danger {
    background: rgba(255, 59, 48, 0.12);
    color: #d70015;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.apple-tag-warning {
    background: rgba(255, 149, 0, 0.12);
    color: #b45309;
    border: 1px solid rgba(255, 149, 0, 0.22);
}

.apple-tag-info {
    background: rgba(0, 113, 227, 0.1);
    color: #0071E3;
    border: 1px solid rgba(0, 113, 227, 0.2);
}

.apple-tag-purple,
.apple-tag-vacation {
    background: rgba(175, 82, 222, 0.12);
    color: #8944ab;
    border: 1px solid rgba(175, 82, 222, 0.22);
}

.apple-tag-success {
    background: rgba(52, 199, 89, 0.12);
    color: #248a3d;
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.apple-tag-neutral {
    background: #f5f5f7;
    color: #86868b;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* APPLE SEGMENTED CONTROL (Semana Selector) */
.apple-segmented-nav {
    display: inline-flex;
    align-items: center;
    background: #f5f5f7;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.apple-seg-btn {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1d1d1f;
    transition: all 0.15s ease;
}

.apple-seg-btn:hover:not(:disabled) {
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.apple-seg-btn:disabled {
    color: #c7c7cc;
    cursor: not-allowed;
}

.apple-seg-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1d1d1f;
    padding: 0 12px;
    white-space: nowrap;
}

/* ==========================================================================
   UNIFICACIÓN GLOBAL APPLE HIG COMPACTA (CATÁLOGOS, CABECERAS Y TABLAS)
   ========================================================================== */

/* Page Header de Catálogos (Compacto y Snug) */
.slds-page-header {
    background: #ffffff !important;
    border-radius: 14px !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
    padding: 0.85rem 1.25rem !important;
    margin-top: 0 !important;
    margin-bottom: 0.75rem !important;
}

.slds-page-header.slds-m-bottom_medium {
    margin-bottom: 0.75rem !important;
}

/* ==========================================================================
   TABLET & DESKTOP LAYOUT (>= 768px - iPad Mini, iPad Air/Pro, Laptops & Desktop)
   Apple HIG Regular Horizontal Size Class:
   - Header horizontal (Título a la izquierda, acciones/botones a la derecha)
   - Restauración de tablas estándar (evita colapso a tarjetas de SLDS max-width: 48em)
   - Controles compactos y proporcionados (sin botones estirados al 100%)
   ========================================================================== */
@media (min-width: 768px) {
    /* Page Header: Título y acciones en la misma fila horizontal */
    .slds-page-header__row:first-child,
    .slds-page-header__row.slds-p-bottom_medium,
    .slds-page-header__row.slds-p-bottom_x_small {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 12px !important;
        padding-bottom: 0.65rem !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
        margin-bottom: 0.25rem !important;
    }
    .slds-page-header__col-title {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        margin: 0 !important;
    }
    .slds-page-header__col-actions {
        width: auto !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    /* Apple Cards Header con Acción: Botón en fila superior derecha (vacaciones.php, dashboard.php, directorio.php) */
    .apple-card-header.apple-header-with-action {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 14px !important;
    }
    .apple-card-header.apple-header-with-action .apple-card-title-group {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: none !important;
        margin-left: 0 !important;
    }
    .apple-card-header.apple-header-with-action > div:last-child:not(:first-child) {
        flex: 0 0 auto !important;
        margin-left: auto !important;
        align-self: center !important;
    }

    /* Vacaciones: botón Solicitar Vacaciones compacto arriba a la derecha */
    #btnAbrirModalSolicitud {
        width: auto !important;
        height: 34px !important;
        padding: 0 16px !important;
        border-radius: 8px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Directorio: Select de Empresa y Botón VCF en una sola fila compacta a la derecha */
    body.directorio-page .apple-card-header.apple-header-with-action {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
    }
    body.directorio-page .directorio-header__actions {
        width: auto !important;
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        margin: 0 !important;
    }
    body.directorio-page #formEmpresaDirectorio {
        width: auto !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
    }
    body.directorio-page #directorioEmpresaSelect {
        width: auto !important;
        min-width: 200px !important;
        height: 36px !important;
    }
    body.directorio-page .btn-apple-vcf {
        width: auto !important;
        height: 36px !important;
        line-height: 36px !important;
        padding: 0 16px !important;
    }

    /* Organigrama: Barra de herramientas horizontal compacta */
    body.organigrama-page .apple-card-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 14px !important;
    }
    body.organigrama-page .organigrama-header-controls {
        width: auto !important;
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }
    body.organigrama-page .organigrama-header-controls > form,
    body.organigrama-page .organigrama-header-controls > select {
        width: auto !important;
    }
    body.organigrama-page #organigramaEmpresaSelect,
    body.organigrama-page #organigramaDeptoFilter {
        width: auto !important;
        min-width: 170px !important;
        height: 34px !important;
    }
    body.organigrama-page .organigrama-header-actions-row {
        display: inline-flex !important;
        gap: 6px !important;
        width: auto !important;
    }
    body.organigrama-page .organigrama-header-actions-row button {
        width: auto !important;
        height: 34px !important;
        padding: 0 12px !important;
    }

    /* Dashboard: Filtros compactos inline a la derecha */
    body.dashboard-page .apple-card-header.apple-header-with-action {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
    }
    body.dashboard-page .dashboard-header__actions {
        width: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        margin-top: 0 !important;
    }
    body.dashboard-page select#empresaFilterSelect.apple-select-control {
        width: auto !important;
        min-width: 180px !important;
        flex: 0 0 auto !important;
    }

    /* Días Festivos del Sistema: Controles en fila horizontal a la derecha */
    .festivos-sistema-controls {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        width: auto !important;
        margin-top: 0 !important;
    }
    .festivos-sistema-filter-row {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        width: auto !important;
    }
    .festivos-sistema-controls .form-btn-replicar {
        width: auto !important;
        display: inline-flex !important;
    }
    .festivos-sistema-controls .form-btn-replicar .btn-replicar {
        width: auto !important;
        height: 32px !important;
        padding: 0 16px !important;
        border-radius: 8px !important;
    }

    /* RESTAURACIÓN TOTAL DE TABLAS SLDS EN IPAD / TABLET / LAPTOP (>= 768px)
       Anula el colapso automático de SLDS @media (max-width: 48em) */
    .slds-max-medium-table_stacked-horizontal thead,
    .slds-max-medium-table_stacked thead {
        display: table-header-group !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        clip: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }
    .slds-max-medium-table_stacked-horizontal tbody,
    .slds-max-medium-table_stacked tbody {
        display: table-row-group !important;
    }
    .slds-max-medium-table_stacked-horizontal tr,
    .slds-max-medium-table_stacked tr {
        display: table-row !important;
        border-top: none !important;
        box-shadow: none !important;
        background: transparent !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    }
    .slds-table.slds-table_fixed-layout,
    .slds-table_fixed-layout {
        table-layout: fixed !important;
        width: 100% !important;
    }
    .slds-max-medium-table_stacked-horizontal tbody td,
    .slds-max-medium-table_stacked-horizontal tbody th,
    .slds-max-medium-table_stacked tbody td,
    .slds-max-medium-table_stacked tbody th {
        display: table-cell !important;
        width: auto !important;
        max-width: none !important;
        padding: 10px 12px !important;
        text-align: left !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    }
    .slds-max-medium-table_stacked-horizontal thead th,
    .slds-max-medium-table_stacked thead th {
        display: table-cell !important;
        max-width: none !important;
        padding: 10px 12px !important;
        text-align: left !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    }
    .slds-max-medium-table_stacked-horizontal td::before,
    .slds-max-medium-table_stacked-horizontal th::before,
    .slds-max-medium-table_stacked td::before,
    .slds-max-medium-table_stacked th::before {
        display: none !important;
        content: "" !important;
    }
    .slds-max-medium-table_stacked-horizontal td .slds-truncate,
    .slds-max-medium-table_stacked-horizontal th .slds-truncate {
        display: inline-block !important;
        text-align: left !important;
        padding-left: 0 !important;
    }
    .slds-max-medium-table_stacked-horizontal td[style*="text-align: center"],
    .slds-max-medium-table_stacked-horizontal td[style*="text-align:center"] {
        text-align: center !important;
    }
    .slds-max-medium-table_stacked-horizontal td[style*="text-align: right"],
    .slds-max-medium-table_stacked-horizontal td[style*="text-align:right"] {
        text-align: right !important;
    }
    .slds-max-medium-table_stacked-horizontal td .slds-badge,
    .slds-max-medium-table_stacked-horizontal th .slds-badge {
        margin-left: 0 !important;
        display: inline-flex !important;
    }
}

/* Título de página de catálogo (Apple HIG Headline / Title 3: 1.10rem / 17.6px) */
.slds-page-header__title {
    font-size: 1.10rem !important;
    font-weight: 700 !important;
    color: #1d1d1f !important;
    letter-spacing: -0.015em !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.slds-page-header__name-title h1 span:first-child:not(.slds-page-header__title),
.slds-page-header__name-meta {
    font-size: 0.76rem !important;
    color: #86868b !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.02em !important;
}

/* Contenedores de íconos de cabecera proporcionales (36x36 Apple HIG) */
.slds-page-header .slds-media__figure .slds-icon_container {
    border-radius: 8px !important;
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.slds-page-header .slds-media__figure .slds-icon {
    width: 18px !important;
    height: 18px !important;
}

/* Botón de acción principal 'Nuevo' en cabecera (Apple Prominent Blue 34px) */
.slds-page-header [id^="btn-nuevo"],
.slds-page-header [id^="btn-nueva"],
.slds-page-header .slds-button_brand {
    background: #0071E3 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    height: 34px !important;
    padding: 0 14px !important;
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.22) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 34px !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
}

.slds-page-header [id^="btn-nuevo"]:hover,
.slds-page-header [id^="btn-nueva"]:hover,
.slds-page-header .slds-button_brand:hover {
    background: #0077ED !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.32) !important;
}

.slds-page-header [id^="btn-nuevo"]:active,
.slds-page-header [id^="btn-nueva"]:active,
.slds-page-header .slds-button_brand:active {
    transform: scale(0.97) !important;
}

/* Botones secundarios / neutros en cabecera ('Editar', 'Volver', etc. estilo Apple HIG Neutral 34px) */
.slds-page-header .slds-button_neutral,
.slds-page-header [id="btnEditar"] {
    background: #ffffff !important;
    color: #1d1d1f !important;
    border: 1px solid #d2d2d7 !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.82rem !important;
    height: 34px !important;
    padding: 0 14px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 34px !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
}

.slds-page-header .slds-button_neutral:hover,
.slds-page-header [id="btnEditar"]:hover {
    background: #f5f5f7 !important;
    color: #1d1d1f !important;
    border-color: #86868b !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
}

.slds-page-header .slds-button_neutral:active,
.slds-page-header [id="btnEditar"]:active {
    background: #e5e5ea !important;
    transform: scale(0.97) !important;
}

/* Botones destructivos / eliminar en cabecera ('Eliminar' estilo Apple HIG Destructive 34px) */
.slds-page-header .slds-button_destructive,
.slds-page-header .custom-btn-eliminar,
.slds-page-header [id^="btnEliminar"] {
    background: #ffffff !important;
    color: #ff3b30 !important;
    border: 1px solid rgba(255, 59, 48, 0.25) !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.82rem !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 14px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 34px !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
}

.slds-page-header .slds-button_destructive:hover,
.slds-page-header .custom-btn-eliminar:hover,
.slds-page-header [id^="btnEliminar"]:hover {
    background: #ff3b30 !important;
    color: #ffffff !important;
    border-color: #ff3b30 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(255, 59, 48, 0.25) !important;
}

.slds-page-header .slds-button_destructive:active,
.slds-page-header .custom-btn-eliminar:active,
.slds-page-header [id^="btnEliminar"]:active {
    background: #d70015 !important;
    border-color: #d70015 !important;
    color: #ffffff !important;
    transform: scale(0.97) !important;
}

/* Tablas Modernizadas estilo Apple List (Espaciado compacto) */
.slds-table {
    border: none !important;
    background: transparent !important;
}

.slds-table thead th {
    background: transparent !important;
    color: #86868b !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 8px 12px !important;
}

.slds-table tbody tr {
    transition: background-color 0.15s ease !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.slds-table tbody tr:hover {
    background-color: rgba(0, 113, 227, 0.02) !important;
}

.slds-table tbody tr td,
.slds-table tbody tr th {
    padding: 10px 12px !important;
    font-size: 0.84rem !important;
    color: #1d1d1f !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    background: transparent !important;
}

.slds-table tbody tr:last-child td,
.slds-table tbody tr:last-child th {
    border-bottom: none !important;
}

/* Enlaces de títulos en tablas (negro Apple con hover azul) */
.slds-table tbody th a:not(.apple-email-link),
.slds-table tbody td a.mobile-bold,
.slds-table tbody .mobile-bold {
    color: #1d1d1f !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

.slds-table tbody th a:not(.apple-email-link):hover,
.slds-table tbody td a.mobile-bold:hover {
    color: #0071E3 !important;
}

/* Enlaces secundarios (emails, etc.) */
.slds-table tbody td a:not(.mobile-bold) {
    color: #0071E3 !important;
    text-decoration: none !important;
}

.slds-table tbody td a:not(.mobile-bold):hover {
    text-decoration: underline !important;
}

/* Badges tipo Apple Capsule Tag compactos */
.slds-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
    border-radius: 980px !important;
    letter-spacing: 0.2px !important;
    line-height: 1.2 !important;
    text-transform: none !important;
}

/* Activo / Sí / Éxito */
.slds-badge.slds-theme_success,
.slds-theme_success.slds-badge {
    background-color: rgba(52, 199, 89, 0.12) !important;
    color: #248a3d !important;
    border: 1px solid rgba(52, 199, 89, 0.22) !important;
}

/* Inactivo / No / Error */
.slds-badge.slds-theme_error,
.slds-theme_error.slds-badge {
    background-color: rgba(255, 59, 48, 0.1) !important;
    color: #d70015 !important;
    border: 1px solid rgba(255, 59, 48, 0.2) !important;
}

/* Advertencia / Sin Salida */
.slds-badge.slds-theme_warning,
.slds-theme_warning.slds-badge {
    background-color: rgba(255, 149, 0, 0.12) !important;
    color: #b45309 !important;
    border: 1px solid rgba(255, 149, 0, 0.22) !important;
}

/* Info / Neutro */
.slds-badge.slds-theme_info,
.slds-badge.slds-badge_lightest {
    background-color: rgba(0, 113, 227, 0.1) !important;
    color: #0071E3 !important;
    border: 1px solid rgba(0, 113, 227, 0.2) !important;
}

/* Iconos de Ubicación en tablas */
.slds-table svg.slds-icon[style*="fill: #0176d3"] {
    fill: #0071E3 !important;
    transition: transform 0.15s ease !important;
}

.slds-table a:hover svg.slds-icon {
    transform: scale(1.15) !important;
}

/* ==========================================================================
   SISTEMA UNIFICADO DE ÍCONOS APPLE COMPACTOS (APP ICONS & MENU)
   ========================================================================== */

/* Íconos en el menú desplegable (Compacto 22x22) */
.apple-app-icon {
    width: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Íconos en las cabeceras de página (Proporcional 36x36) */
.apple-app-icon_lg {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.apple-app-icon svg {
    display: block !important;
    width: 12px !important;
    height: 12px !important;
}

.apple-app-icon_lg svg {
    width: 18px !important;
    height: 18px !important;
}

/* Paleta de gradientes Apple por módulo */
.apple-icon-home {
    background: linear-gradient(135deg, #0071E3, #0056B3) !important;
}
.apple-icon-users {
    background: linear-gradient(135deg, #0A84FF, #0056B3) !important;
}
.apple-icon-companies {
    background: linear-gradient(135deg, #0A84FF, #0056B3) !important;
}
.apple-icon-shifts {
    background: linear-gradient(135deg, #FF9500, #D97706) !important;
}
.apple-icon-holidays {
    background: linear-gradient(135deg, #FF2D55, #C7002C) !important;
}
.apple-icon-locations {
    background: linear-gradient(135deg, #34C759, #1E873E) !important;
}

/* Fallback: Modernización de íconos standard SLDS existentes */
.slds-icon-standard-home {
    background: linear-gradient(135deg, #0071E3, #0056B3) !important;
    border-radius: 8px !important;
}
.slds-icon-standard-account,
.slds-icon-standard-contact {
    background: linear-gradient(135deg, #0A84FF, #0056B3) !important;
    border-radius: 8px !important;
}
.slds-icon-standard-event {
    background: linear-gradient(135deg, #FF9500, #D97706) !important;
    border-radius: 6px !important;
}
.slds-icon-standard-date-input {
    background: linear-gradient(135deg, #FF2D55, #C7002C) !important;
    border-radius: 6px !important;
}
.slds-icon-standard-address {
    background: linear-gradient(135deg, #34C759, #1E873E) !important;
    border-radius: 6px !important;
}

/* Menú Waffle anterior retirado a favor de Apple Launchpad */

/* ==========================================================================
   SISTEMA UNIFICADO DE LOOKUPS COMPACTOS (ESTILO APPLE)
   ========================================================================== */

/* Contenedores de formulario que albergan lookups: asegurar que no recorten el menú */
.slds-tabs_card,
.flexipageTabset,
.tabset,
.slds-form,
.slds-form__row,
.slds-form__item,
.slds-form-element,
.slds-form-element__control,
.slds-combobox_container {
    overflow: visible !important;
}

.slds-combobox.slds-is-open {
    position: relative !important;
    z-index: 1050 !important;
}

/* Desplegable de resultados con altura para elementos completos y scroll suave */
.listbox-results,
.slds-dropdown.listbox-results {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    box-sizing: border-box !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    background: #ffffff !important;
    padding: 6px !important;
    margin-top: 4px !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
    z-index: 9999 !important;
}

/* En dispositivos móviles (<=767px), garantizar visibilidad completa y altura táctil Apple HIG */
@media (max-width: 767px) {
    .listbox-results,
    .slds-dropdown.listbox-results {
        max-height: 200px !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        box-sizing: border-box !important;
    }
    
    .listbox-results .slds-listbox__option {
        min-height: 44px !important;
        padding: 8px 12px !important;
    }
}

/* Barra de scroll refinada estilo macOS */
.listbox-results::-webkit-scrollbar {
    width: 6px !important;
}
.listbox-results::-webkit-scrollbar-track {
    background: transparent !important;
}
.listbox-results::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 980px !important;
}
.listbox-results::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35) !important;
}

/* Opciones de la lista del Lookup - Compacto y Proporcional */
.listbox-results .slds-listbox__option {
    border-radius: 6px !important;
    padding: 6px 10px !important;
    min-height: 40px !important;
    transition: background-color 0.15s ease !important;
    align-items: center !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}
.listbox-results .slds-listbox__option:hover,
.listbox-results .slds-listbox__option.slds-has-focus {
    background-color: rgba(0, 113, 227, 0.08) !important;
}

/* Estandarización de íconos en Lookups */
.slds-combobox__input-entity-icon {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
.slds-combobox__input-entity-icon svg,
.slds-combobox__input-entity-icon .slds-icon {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* Íconos en la lista de resultados: compactos y proporcionales (20px badge / 12px SVG) */
.listbox-results .slds-listbox__option-icon {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    margin-right: 8px !important;
}
.listbox-results .slds-listbox__option-icon .slds-icon_container {
    width: 20px !important;
    height: 20px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
.listbox-results .slds-listbox__option-icon svg,
.listbox-results .slds-listbox__option-icon .slds-icon {
    width: 12px !important;
    height: 12px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* Tipografía compacta y estándar SLDS (13px / 400) */
.listbox-results .slds-listbox__option-text {
    font-size: 0.8125rem !important;
    font-weight: 400 !important;
    color: #1d1d1f !important;
    line-height: 1.25 !important;
}
.listbox-results .slds-listbox__option-meta {
    font-size: 0.6875rem !important;
    color: #86868b !important;
    line-height: 1.2 !important;
}

/* Modo Lectura (readonly): NUNCA mostrar buscador habilitado ni botones de borrar */
.slds-form-element_readonly .search-container {
    display: none !important;
}
.slds-form-element_readonly .clear-button {
    display: none !important;
}
.slds-form-element_readonly .slds-dropdown,
.slds-form-element_readonly .listbox-results {
    display: none !important;
}

/* Vista estática para campos vacíos en modo lectura */
.lookup-empty-view {
    font-size: 0.875rem !important;
    color: #86868b !important;
    line-height: 1.5 !important;
    padding-top: 0.25rem !important;
    display: block;
}

/* ==========================================================================
   POPOVER DE CUENTA ESTILO APPLE HIG (LIQUID GLASS / macOS VIBRANCY)
   ========================================================================== */
.apple-account-popover {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 12px !important;
    z-index: 9999 !important;
    width: 250px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04) !important;
    padding: 6px !important;
    box-sizing: border-box !important;
    animation: applePopoverFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes applePopoverFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.apple-account-popover__close-hidden {
    display: none !important;
}

.apple-account-popover__profile {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 10px 10px 10px !important;
}

.apple-account-popover__avatar-wrap {
    width: 38px !important;
    height: 38px !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    background: #f5f5f7 !important;
}

.apple-account-popover__avatar {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.apple-account-popover__details {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.apple-account-popover__name {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: -0.01em !important;
}

.apple-account-popover__email {
    font-size: 11.5px !important;
    color: #86868b !important;
    margin-top: 2px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.apple-account-popover__divider {
    height: 1px !important;
    background: rgba(0, 0, 0, 0.06) !important;
    margin: 2px 6px 5px 6px !important;
}

.apple-account-popover__menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.apple-account-popover__item {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 7px 10px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
    cursor: pointer !important;
}

.apple-account-popover__icon-box {
    width: 16px !important;
    height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.apple-account-popover__icon-box svg {
    width: 15px !important;
    height: 15px !important;
    color: #86868b !important;
    transition: color 0.15s ease !important;
}

.apple-account-popover__item-label {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #1d1d1f !important;
    letter-spacing: -0.01em !important;
    transition: color 0.15s ease !important;
}

/* Hover estados interactivos refinados */
.apple-account-popover__item:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    text-decoration: none !important;
}

.apple-account-popover__item:hover .apple-account-popover__icon-box svg {
    color: #1d1d1f !important;
}

/* Cerrar Sesión hover */
.apple-account-popover__item_logout:hover {
    background-color: rgba(215, 0, 21, 0.07) !important;
}

.apple-account-popover__item_logout:hover .apple-account-popover__item-label {
    color: #d70015 !important;
}

.apple-account-popover__item_logout:hover .apple-account-popover__icon-box svg {
    color: #d70015 !important;
}

/* ==========================================================================
   CABECERA DE USUARIO: SUBTÍTULO DE EMPRESA ESTILO APPLE CONTACTS / macOS
   ========================================================================== */
.user-header-subtitle {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 4px 6px !important;
    margin-top: 5px !important;
    vertical-align: middle !important;
}

.user-header-subtitle__icon {
    width: 14px !important;
    height: 14px !important;
    color: rgba(255, 255, 255, 0.55) !important;
    stroke: currentColor !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.slds-page-header.user-header-custom .user-header-subtitle__text,
.user-header-subtitle__text {
    font-size: 0.88rem !important;
    font-weight: 450 !important;
    color: rgba(255, 255, 255, 0.75) !important;
    letter-spacing: -0.01em !important;
    line-height: 1.25 !important;
}

.user-header-subtitle__puesto {
    font-weight: 550 !important;
    color: rgba(255, 255, 255, 0.94) !important;
}

.user-header-subtitle__separator {
    color: rgba(255, 255, 255, 0.35) !important;
    font-size: 0.72rem !important;
    margin: 0 1px !important;
    user-select: none !important;
}

/* ==========================================================================
   APPLE macOS NATIVE COLLAPSIBLE SIDEBAR & UNIFIED TOOLBAR
   ========================================================================== */

/* Botón disparador de la barra lateral (SF Symbol: sidebar.leading) */
.apple-sidebar-trigger {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    border: none !important;
    background: transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    color: #1d1d1f !important;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: none !important;
    outline: none !important;
}

.apple-sidebar-trigger:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #000000 !important;
}

.apple-sidebar-trigger:active {
    transform: scale(0.94) !important;
    background: rgba(0, 0, 0, 0.10) !important;
}

.apple-sidebar-trigger__icon svg {
    width: 19px !important;
    height: 19px !important;
    display: block !important;
    stroke: currentColor !important;
}

/* Identidad y Título en el Header */
.apple-header-brand {
    display: flex !important;
    align-items: center !important;
}

.apple-header-brand__title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    letter-spacing: -0.015em !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif !important;
}

/* ==========================================================================
   BARRA LATERAL NATIVA macOS (LIQUID GLASS / FROSTED LOOK)
   ========================================================================== */

.apple-sidebar {
    position: fixed !important;
    top: 50px !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 230px !important;
    background: #fbfbfd !important;
    border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
    z-index: 99 !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.apple-sidebar.sidebar-ready {
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.apple-sidebar__inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Grupos y Secciones */
.apple-sidebar__group {
    padding: 6px 0 !important;
}

.apple-sidebar__group-title {
    font-size: 10.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    color: #86868b !important;
    padding: 10px 18px 4px 18px !important;
    text-transform: uppercase !important;
}

/* Elementos de Navegación */
.apple-sidebar__item {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 7px 12px !important;
    margin: 2px 10px !important;
    border-radius: 7px !important;
    text-decoration: none !important;
    color: #1d1d1f !important;
    font-size: 13px !important;
    font-weight: 450 !important;
    letter-spacing: -0.01em !important;
    transition: background-color 0.12s ease, color 0.12s ease !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.apple-sidebar__item:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    text-decoration: none !important;
    color: #000000 !important;
}

.apple-sidebar__item:hover .apple-sidebar__item-icon svg {
    color: #1d1d1f !important;
    stroke: #1d1d1f !important;
}

/* Módulo Activo: El estándar azul insignia de macOS */
.apple-sidebar__item.is-active {
    background: #0071e3 !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 3px rgba(0, 113, 227, 0.25) !important;
}

.apple-sidebar__item.is-active:hover {
    background: #0071e3 !important;
    color: #ffffff !important;
}

.apple-sidebar__item.is-active .apple-sidebar__item-icon svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

/* Ícono del elemento (SF Symbol) */
.apple-sidebar__item-icon {
    width: 18px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.apple-sidebar__item-icon svg {
    width: 16px !important;
    height: 16px !important;
    color: #6e6e73 !important;
    stroke: #6e6e73 !important;
    transition: color 0.12s ease, stroke 0.12s ease !important;
}

.apple-sidebar__item-label {
    flex: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* ==========================================================================
   ADAPTACIÓN DEL LAYOUT Y CONTENIDO PRINCIPAL
   ========================================================================== */

/* En Desktop (>768px): La barra lateral empuja el contenido o se colapsa */
@media (min-width: 769px) {
    body.sidebar-ready:not(.login-page) {
        transition: padding-left 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    body:not(.login-page) {
        padding-left: 230px !important;
    }

    body.login-page {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    html.sidebar-collapsed body:not(.login-page),
    body.sidebar-collapsed:not(.login-page) {
        padding-left: 0 !important;
    }

    html.sidebar-collapsed .apple-sidebar,
    body.sidebar-collapsed .apple-sidebar {
        transform: translateX(-100%) !important;
    }

    .apple-sidebar-backdrop {
        display: none !important;
    }
}

/* En Móviles (<=768px): La barra lateral es un cajón deslizante nativo */
@media (max-width: 768px) {
    body {
        padding-left: 0 !important;
    }

    .apple-sidebar {
        top: 50px !important;
        width: 250px !important;
        height: calc(100vh - 50px) !important;
        z-index: 10001 !important;
        background: #ffffff !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12) !important;
        transform: translateX(-100%) !important;
    }

    .apple-sidebar.sidebar-ready {
        transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    body.sidebar-mobile-open .apple-sidebar {
        transform: translateX(0) !important;
    }

    .apple-sidebar-backdrop {
        position: fixed !important;
        top: 50px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.36) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        z-index: 10000 !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.24s ease !important;
    }

    body.sidebar-mobile-open .apple-sidebar-backdrop {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* Notificación Warning con texto e íconos en blanco consistente con el sistema */
.slds-notify_toast.slds-theme_warning {
   background-color: #d87304 !important;
   color: #ffffff !important;
}

.slds-notify_toast.slds-theme_warning h2,
.slds-notify_toast.slds-theme_warning p,
.slds-notify_toast.slds-theme_warning span,
.slds-notify_toast.slds-theme_warning .slds-notify__content,
.slds-notify_toast.slds-theme_warning .slds-text-heading_small {
   color: #ffffff !important;
}

.slds-notify_toast.slds-theme_warning .slds-icon,
.slds-notify_toast.slds-theme_warning .slds-button__icon {
   fill: #ffffff !important;
}

/* ==========================================================================
   APPLE HIG SEGMENTED CONTROL & VACATIONS MODULE
   ========================================================================== */
.apple-segmented-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
    max-width: 100%;
}

.dashboard-segmented-scroll {
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dashboard-segmented-scroll::-webkit-scrollbar {
    display: none;
}

.apple-segmented-control {
    display: inline-flex;
    background: rgba(118, 118, 128, 0.12);
    padding: 3px;
    border-radius: 12px;
    position: relative;
    user-select: none;
    width: max-content;
}

.apple-segment-btn {
    appearance: none;
    background: transparent;
    border: none;
    border-radius: 9px;
    padding: 7px 14px;
    font-size: 0.84rem;
    font-weight: 500;
    color: #48484a;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    white-space: nowrap;
}

.apple-segment-btn:hover {
    color: #1d1d1f;
}

.apple-segment-btn.is-active {
    background: #ffffff;
    color: #1d1d1f;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.04);
}

.apple-segment-badge {
    background: #d87304;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 9999px;
    line-height: 1.3;
}

.apple-badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 9999px;
    text-transform: capitalize;
}

.apple-badge-status.is-pendiente {
    background: rgba(255, 149, 0, 0.12);
    color: #d87304;
}

.apple-badge-status.is-aprobada {
    background: rgba(52, 199, 89, 0.12);
    color: #248a3d;
}

.apple-badge-status.is-rechazada {
    background: rgba(255, 59, 48, 0.12);
    color: #d70015;
}

.apple-badge-status.is-cancelada {
    background: rgba(0, 0, 0, 0.06);
    color: #86868b;
}

.apple-btn-mini-action {
    font-size: 0.78rem !important;
    padding: 4px 10px !important;
    height: auto !important;
    line-height: 1.2 !important;
    border-radius: 6px !important;
}

/* Micro-botón cápsula de acción Apple (ej. Mapa en tablas) */
.apple-col-mapa-th,
.apple-col-mapa-td {
    text-align: center !important;
}

.apple-map-cell-wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
}

.apple-map-capsule-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    gap: 5px !important;
    padding: 4px 11px !important;
    border-radius: 980px !important;
    font-size: 0.76rem !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    background: rgba(0, 113, 227, 0.08) !important;
    color: #0071E3 !important;
    border: 1px solid rgba(0, 113, 227, 0.15) !important;
    transition: background 0.15s ease, transform 0.12s ease, border-color 0.15s ease !important;
    margin: 0 auto !important;
}

.apple-map-capsule-btn:hover {
    background: rgba(0, 113, 227, 0.16) !important;
    border-color: rgba(0, 113, 227, 0.3) !important;
    color: #005bb5 !important;
    transform: translateY(-0.5px) !important;
}

.apple-map-capsule-btn svg {
    flex-shrink: 0 !important;
}

.apple-empty-dash {
    color: #86868b !important;
    font-size: 0.88rem !important;
    display: inline-block !important;
    text-align: center !important;
    margin: 0 auto !important;
}

.apple-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: #fafafc;
}

.apple-pagination-info {
    font-size: 0.82rem;
    color: #86868b;
}

.apple-pagination-controls {
    display: flex;
    gap: 8px;
}

/* ==========================================================================
   RESPONSIVE APPLE VACACIONES MODULE (APPLE HIG)
   ========================================================================== */

.apple-vacaciones-table {
    min-width: 680px !important;
    width: 100% !important;
    border-collapse: separate !important;
}

.apple-vacaciones-table th {
    white-space: nowrap !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #86868b !important;
    padding: 12px 16px !important;
    background: #fbfbfd !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-top: none !important;
}

.apple-vacaciones-table td {
    padding: 13px 16px !important;
    font-size: 0.86rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.apple-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    position: relative !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.apple-table-wrap::-webkit-scrollbar {
    height: 5px;
}

.apple-table-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.apple-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

@media (max-width: 767px) {
    .apple-card-header.apple-header-with-action {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 10px !important;
    }

    .apple-card-header.apple-header-with-action .apple-card-title-group {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        align-items: flex-start !important;
        max-width: 100% !important;
    }

    .apple-card-icon-wrap {
        width: 32px !important;
        height: 32px !important;
        border-radius: 8px !important;
        margin-top: 2px !important;
        flex-shrink: 0 !important;
    }

    .apple-card-icon-wrap svg {
        width: 17px !important;
        height: 17px !important;
    }

    .apple-card-header.apple-header-with-action > div:last-child:not(:first-child) {
        width: auto !important;
        flex: 0 0 auto !important;
        align-self: flex-start !important;
    }

    #btnAbrirModalSolicitud {
        width: auto !important;
        height: 34px !important;
        line-height: 34px !important;
        padding: 0 14px !important;
        font-size: 0.82rem !important;
        border-radius: 980px !important;
        justify-content: center !important;
    }

    .apple-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .apple-metric-tile {
        padding: 12px 10px !important;
        border-radius: 12px !important;
        min-height: 104px !important;
    }

    .apple-metric-header-row {
        min-height: 18px !important;
        gap: 4px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
    }

    .apple-metric-label {
        font-size: 0.65rem !important;
        letter-spacing: 0.02em !important;
        flex-shrink: 0 !important;
    }

    .apple-metric-pill {
        font-size: 0.62rem !important;
        padding: 2px 5px !important;
        white-space: nowrap !important;
        border-radius: 6px !important;
        flex-shrink: 0 !important;
    }

    .apple-metric-value-wrap {
        margin: 4px 0 2px 0 !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        align-items: baseline !important;
    }

    .apple-metric-big-num {
        font-size: 1.30rem !important;
        white-space: nowrap !important;
        line-height: 1.15 !important;
    }

    .apple-metric-date {
        font-size: 1.18rem !important;
        white-space: nowrap !important;
        font-variant-numeric: tabular-nums !important;
        letter-spacing: -0.01em !important;
    }

    .apple-metric-text {
        font-size: 1.08rem !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        word-break: normal !important;
    }

    .apple-metric-caption {
        font-size: 0.68rem !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        word-break: normal !important;
    }

    .apple-segmented-wrap {
        margin-bottom: 1rem !important;
        width: 100% !important;
    }

    .dashboard-segmented-scroll {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        max-width: 100% !important;
        width: 100% !important;
        display: block !important;
        padding-bottom: 2px !important;
    }
    .dashboard-segmented-scroll::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    .dashboard-segmented-scroll .apple-segmented-control {
        width: max-content !important;
        display: inline-flex !important;
        flex-wrap: nowrap !important;
        padding: 3px !important;
    }
    .dashboard-segmented-scroll .apple-segment-btn {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        justify-content: center !important;
        padding: 7px 14px !important;
        font-size: 0.82rem !important;
        min-height: 36px !important;
    }

    .apple-segmented-control:not(.dashboard-segmented-scroll *) {
        width: 100% !important;
        display: flex !important;
        padding: 3px !important;
    }

    .apple-segmented-control:not(.dashboard-segmented-scroll *) .apple-segment-btn {
        flex: 1 !important;
        justify-content: center !important;
        padding: 8px 10px !important;
        font-size: 0.82rem !important;
        min-height: 38px !important;
    }

    .apple-pagination-wrap {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: center !important;
        text-align: center !important;
        padding: 12px 16px !important;
    }

    .apple-pagination-controls {
        width: 100% !important;
        display: flex !important;
        gap: 10px !important;
    }

    .apple-pagination-controls .slds-button {
        flex: 1 !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
}

@media (max-width: 520px) {
    .apple-btn-label-desktop {
        display: none !important;
    }
    .apple-btn-label-mobile {
        display: inline !important;
    }
}

@media (max-width: 380px) {
    .apple-metrics-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   APPLE HIG MODAL SHEET / DIALOG (VACACIONES)
   ========================================================================== */

.apple-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s ease;
}

.apple-modal.slds-fade-in-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.apple-modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s ease;
}

.apple-modal-backdrop.slds-backdrop_open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.apple-modal-container {
    width: 100%;
    max-width: 480px;
    background: #FFFFFF;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transform: scale(0.96) translateY(8px);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

.apple-modal.slds-fade-in-open .apple-modal-container {
    transform: scale(1) translateY(0);
}

.apple-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.apple-modal-header-text {
    flex: 1;
}

.apple-modal-title {
    font-size: 1.28rem;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.25;
}

.apple-modal-subtitle {
    font-size: 0.82rem;
    color: #86868b;
    margin: 4px 0 0 0;
    line-height: 1.35;
}

.apple-modal-close-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: #86868b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    margin-left: 12px;
    flex-shrink: 0;
}

.apple-modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.09);
    color: #1d1d1f;
}

.apple-modal-close-btn:active {
    transform: scale(0.92);
}

.apple-modal-body {
    padding: 20px 24px;
}

.apple-form-group {
    margin-bottom: 16px;
}

.apple-form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.apple-form-label-optional {
    font-weight: 400;
    color: #86868b;
    font-size: 0.78rem;
}

.apple-form-input {
    width: 100%;
    height: 42px;
    background: #fbfbfd;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 0.88rem;
    color: #1d1d1f;
    font-family: inherit;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    box-sizing: border-box;
}

.apple-form-input:focus {
    background: #ffffff;
    border-color: #0071E3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.apple-form-textarea {
    width: 100%;
    min-height: 72px;
    background: #fbfbfd;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.86rem;
    color: #1d1d1f;
    font-family: inherit;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    resize: none;
    box-sizing: border-box;
    line-height: 1.35;
}

.apple-form-textarea:focus {
    background: #ffffff;
    border-color: #0071E3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

/* APPLE REACTIVE CALCULATION CALLOUT */
.apple-calc-callout {
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-calc-callout.status-neutral {
    background: #fbfbfd;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.apple-calc-callout.status-valid {
    background: rgba(52, 199, 89, 0.06);
    border: 1px solid rgba(52, 199, 89, 0.22);
}

.apple-calc-callout.status-error {
    background: rgba(255, 59, 48, 0.04);
    border: 1px solid rgba(255, 59, 48, 0.18);
}

.apple-calc-callout.status-warning {
    background: rgba(255, 149, 0, 0.05);
    border: 1px solid rgba(255, 149, 0, 0.18);
}

.apple-calc-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.apple-calc-label {
    font-size: 0.76rem;
    color: #86868b;
    display: block;
    margin-bottom: 2px;
}

.apple-calc-number {
    font-size: 1.20rem;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.015em;
}

.apple-calc-callout.status-valid .apple-calc-number {
    color: #248a3d;
}

.apple-calc-callout.status-error .apple-calc-number {
    color: #d70015;
}

.apple-calc-hint {
    font-size: 0.76rem;
    color: #86868b;
    margin-top: 6px;
    line-height: 1.35;
}

.apple-calc-callout.status-error .apple-calc-hint {
    color: #c93400;
    font-weight: 500;
}

.apple-calc-callout.status-valid .apple-calc-hint {
    color: #248a3d;
}

.apple-form-helper {
    font-size: 0.74rem;
    color: #86868b;
    margin-top: 5px;
    line-height: 1.35;
}

/* APPLE MODAL FOOTER & ACTION BUTTONS */
.apple-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: #fbfbfd;
}

.apple-btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: #1d1d1f;
    font-size: 0.8125rem;
    font-weight: 500;
    height: 36px;
    padding: 0 18px;
    border-radius: 980px;
    cursor: pointer;
    transition: all 0.16s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.apple-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.09);
    color: #000000;
}

.apple-btn-secondary:active {
    transform: scale(0.97);
}

.apple-btn-submit {
    background: #0071E3;
    border: none;
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    height: 36px;
    padding: 0 20px;
    border-radius: 980px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.apple-btn-submit:hover:not(:disabled) {
    background: #0077ED;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
}

.apple-btn-submit:active:not(:disabled) {
    transform: scale(0.97);
    background: #0062C4;
}

.apple-btn-submit:disabled {
    opacity: 0.32 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
    background: #0071E3 !important;
    color: #ffffff !important;
}

/* BOTÓN DE CANCELACIÓN EN TABLA (ACCESIBLE Y CONSISTENTE CON SLDS) */
.apple-btn-table-cancel {
    color: #c23934 !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
    padding: 0 0.75rem !important;
    height: 26px !important;
    line-height: 24px !important;
    border-radius: 6px !important;
    border-color: #dddbda !important;
    background: #ffffff !important;
    transition: all 0.16s ease !important;
}

.apple-btn-table-cancel:hover {
    background-color: #fff1f0 !important;
    border-color: #c23934 !important;
    color: #a61a14 !important;
    box-shadow: 0 1px 3px rgba(194, 57, 52, 0.15) !important;
}

.apple-btn-table-cancel:active {
    transform: scale(0.97) !important;
    background-color: #ffe0dd !important;
}
/* ==========================================================================
   USUARIOS - COMPONENTES Y FILAS APPLE HIG
   (Migrado desde usuarios.php para estandarización arquitectónica)
   ========================================================================== */

.apple-user-row {
            cursor: pointer;
            transition: background-color 0.15s ease;
         }
         .apple-user-row:hover {
            background-color: #f7f7f9 !important;
         }
         .apple-user-row:hover .apple-row-chevron {
            stroke: #8e8e93 !important;
            transform: translateX(2px);
         }
         .apple-user-row:hover .apple-user-link {
            color: #0071E3 !important;
         }
         .apple-chevron-col {
            width: 44px !important;
            min-width: 44px !important;
            max-width: 44px !important;
            text-align: center !important;
         }
         .apple-user-link {
            font-size: 13.5px;
            font-weight: 600;
            color: #1d1d1f;
            letter-spacing: -0.15px;
            text-decoration: none;
            transition: color 0.15s ease;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 100%;
         }
         .apple-email-link {
            font-size: 11.5px !important;
            font-weight: 400 !important;
            color: #86868b !important;
            text-decoration: none !important;
            letter-spacing: 0.05px !important;
            margin-top: 1.5px !important;
            display: block !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            white-space: nowrap !important;
            max-width: 100% !important;
            transition: color 0.15s ease !important;
         }
         .apple-email-link:hover {
            color: #0071E3 !important;
            text-decoration: underline !important;
         }
         .apple-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            color: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 13px;
            letter-spacing: -0.2px;
            flex-shrink: 0;
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 2px 5px rgba(0, 0, 0, 0.08);
            text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
         }
         .apple-avatar--header {
            width: 32px !important;
            height: 32px !important;
            font-size: 12px !important;
            line-height: 1 !important;
            flex-shrink: 0 !important;
         }
         .slds-global-actions__avatar {
            padding: 0 !important;
            border: none !important;
            background: transparent !important;
            cursor: pointer !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
         }
         .apple-row-chevron {
            stroke: #c7c7cc;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
            transition: stroke 0.15s ease, transform 0.15s ease;
         }


/* ==========================================================================
   DIRECTORIO DE EMPLEADOS Y TARJETAS DE CONTACTO APPLE HIG
   (Migrado desde directorio.php para estandarización arquitectónica)
   ========================================================================== */

.directorio-container {
            max-width: 1360px;
            margin: 0 auto;
            padding: 24px 20px 60px 20px;
        }
        .directorio-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 16px;
            margin-bottom: 24px;
        }
        .directorio-header__title-group {
            display: flex;
            align-items: center;
            gap: 14px;
        }
        .directorio-header__icon-box {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            background: rgba(0, 113, 227, 0.1);
            color: #0071E3;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(0, 113, 227, 0.12);
        }
        .directorio-header__title {
            font-size: 1.15rem !important;
            font-weight: 700 !important;
            color: #1d1d1f !important;
            letter-spacing: -0.015em !important;
            margin: 0;
            line-height: 1.25 !important;
        }
        .directorio-header__subtitle {
            font-size: 0.82rem !important;
            color: #86868b !important;
            margin: 3px 0 0 0;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .directorio-header__actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: nowrap;
        }
        .btn-apple-vcf {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 6px !important;
            background: #0071E3 !important;
            color: #ffffff !important;
            font-size: 0.82rem !important;
            font-weight: 600 !important;
            height: 34px !important;
            line-height: 34px !important;
            padding: 0 14px !important;
            border-radius: 980px !important;
            border: none !important;
            cursor: pointer !important;
            text-decoration: none !important;
            box-shadow: 0 2px 6px rgba(0, 113, 227, 0.22) !important;
            transition: all 0.2s ease !important;
            box-sizing: border-box !important;
            white-space: nowrap !important;
        }
        .btn-apple-vcf:hover {
            background: #0077ED !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 10px rgba(0, 113, 227, 0.32) !important;
        }
        .btn-apple-vcf svg {
            width: 17px;
            height: 17px;
            stroke-width: 2.2;
        }
        /* Grid de Tarjetas de Contacto */
        .directorio-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
            gap: 16px;
        }
        .contacto-card {
            background: #ffffff;
            border-radius: 18px;
            border: 1px solid rgba(0, 0, 0, 0.06);
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
        }
        .contacto-card:hover {
            border-color: rgba(0, 113, 227, 0.3);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
            transform: translateY(-2px);
        }
        .contacto-card__header {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 14px;
        }
        .contacto-card__avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            color: #ffffff;
            font-weight: 600;
            font-size: 0.84rem;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        }
        .contacto-card__info {
            flex: 1;
            min-width: 0;
        }
        .contacto-card__name {
            font-size: 0.88rem !important;
            font-weight: 600 !important;
            color: #1d1d1f !important;
            margin: 0 0 3px 0;
            line-height: 1.25;
            text-decoration: none;
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        a.contacto-card__name:hover {
            color: #0071E3;
        }
        .contacto-card__badge-row {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }
        .contacto-card__details {
            margin-bottom: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .contacto-detail-item {
            display: flex;
            align-items: center;
            gap: 9px;
            font-size: 0.84rem;
            color: #48484a;
        }
        .contacto-detail-item svg {
            width: 15px;
            height: 15px;
            color: #86868b;
            flex-shrink: 0;
        }
        .contacto-detail-link {
            color: #1d1d1f;
            text-decoration: none;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            transition: color 0.15s ease;
        }
        .contacto-detail-link:hover {
            color: #0071E3;
            text-decoration: underline;
        }
        /* Botones de acción 1-clic */
        .contacto-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            padding-top: 14px;
            border-top: 1px solid rgba(0, 0, 0, 0.05);
        }
        .btn-action-call {
            flex: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            height: 34px !important;
            line-height: 34px !important;
            background: rgba(0, 113, 227, 0.08);
            color: #0071E3 !important;
            font-size: 0.82rem !important;
            font-weight: 600;
            border-radius: 8px !important;
            text-decoration: none !important;
            border: none;
            transition: all 0.18s ease;
        }
        .btn-action-call:hover {
            background: #0071E3;
            color: #ffffff !important;
        }
        .btn-action-call.is-disabled {
            background: #f5f5f7;
            color: #c7c7cc !important;
            pointer-events: none;
        }
        .btn-action-wa {
            flex: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            height: 34px !important;
            line-height: 34px !important;
            background: rgba(37, 211, 102, 0.1);
            color: #128C7E !important;
            font-size: 0.82rem !important;
            font-weight: 600;
            border-radius: 8px !important;
            text-decoration: none !important;
            border: none;
            transition: all 0.18s ease;
        }
        .btn-action-wa:hover {
            background: #25D366;
            color: #ffffff !important;
        }
        .btn-action-wa.is-disabled {
            background: #f5f5f7;
            color: #c7c7cc !important;
            pointer-events: none;
        }
        .btn-action-vcf-single {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 34px !important;
            height: 34px !important;
            border-radius: 8px !important;
            background: #f5f5f7;
            color: #48484a;
            border: none;
            cursor: pointer;
            text-decoration: none !important;
            transition: all 0.18s ease;
        }
        .btn-action-vcf-single:hover {
            background: #e5e5ea;
            color: #1d1d1f;
        }
        .btn-action-vcf-single svg {
            width: 16px;
            height: 16px;
        }
        /* Toggle de vista */
        .directorio-view-toggle {
            display: inline-flex;
            background: rgba(118, 118, 128, 0.12);
            padding: 3px;
            border-radius: 10px;
            gap: 2px;
        }
        .directorio-view-btn {
            background: transparent;
            border: none;
            border-radius: 8px;
            padding: 5px 9px;
            color: #86868b;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease;
        }
        .directorio-view-btn.is-active {
            background: #ffffff;
            color: #1d1d1f;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
        }
        @media (max-width: 600px) {
            .directorio-container {
                padding: 16px 12px 48px 12px;
            }
            .directorio-header__title {
                font-size: 1.35rem;
            }
            .btn-apple-vcf {
                width: 100%;
                justify-content: center;
            }
        }

/* Directorio Page - Apple HIG Clean Toolbar */
body.directorio-page .dashboard-card {
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    margin-bottom: 16px;
}

body.directorio-page .dashboard-toolbar {
    padding: 20px 24px;
    border-bottom: none;
}

body.directorio-page .directorio-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

body.directorio-page .dashboard-segmented-scroll {
    flex: 1 1 auto;
    min-width: 0;
}

body.directorio-page .directorio-toolbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

body.directorio-page .apple-search-wrap {
    flex: 0 0 280px;
    width: 280px;
    max-width: 280px;
    height: 36px;
    position: relative;
    display: flex;
    align-items: center;
}

body.directorio-page .apple-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: #86868b;
    pointer-events: none;
}

body.directorio-page .apple-search-input {
    width: 100%;
    height: 36px;
    padding: 7px 32px 7px 36px;
    font-size: 0.86rem;
    line-height: 20px;
    font-family: inherit;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 10px;
    background: #f2f2f7;
    color: #1d1d1f;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

body.directorio-page .apple-search-input:focus {
    background: #ffffff;
    border-color: #0071E3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

body.directorio-page .apple-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
}

body.directorio-page .directorio-toolbar-counter {
    font-size: 0.80rem;
    color: #86868b;
    font-weight: 500;
    white-space: nowrap;
}

body.directorio-page .directorio-toolbar-counter strong {
    color: #1d1d1f;
}

@media (max-width: 767px) {
    body.directorio-page .apple-card-header {
        padding: 14px 14px !important;
    }
    body.directorio-page .apple-card-header.apple-header-with-action {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 12px !important;
    }
    body.directorio-page .apple-card-title-group {
        width: 100% !important;
        min-width: 0 !important;
    }
    body.directorio-page .apple-card-title {
        white-space: normal !important;
        word-break: normal !important;
        font-size: 1.25rem !important;
    }
    body.directorio-page .directorio-header__actions {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        margin: 0 !important;
    }
    body.directorio-page #formEmpresaDirectorio {
        flex: 1 1 160px !important;
        width: 100% !important;
        margin: 0 !important;
    }
    body.directorio-page #directorioEmpresaSelect {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        height: 38px !important;
    }
    body.directorio-page .btn-apple-vcf {
        width: 100% !important;
        height: 38px !important;
        line-height: 38px !important;
        padding: 0 14px !important;
        font-size: 0.84rem !important;
        justify-content: center !important;
        text-align: center !important;
    }
    body.directorio-page .dashboard-toolbar {
        padding: 14px 16px !important;
    }
    body.directorio-page .directorio-toolbar-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    body.directorio-page .apple-search-wrap {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        height: 36px !important;
        order: -1;
    }
    body.directorio-page .apple-search-input {
        height: 36px !important;
        padding: 7px 32px 7px 36px !important;
    }
    body.directorio-page .directorio-toolbar-right {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    body.directorio-page .directorio-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}


/* ==========================================================================
   DASHBOARD DE ASISTENCIA - APPLE HIG & SLDS
   (Consolidado desde css/dashboard.css para unificación arquitectónica)
   ========================================================================== */

/* Alineación y espaciado global unificado heredado de .custom-body-container */
@media (max-width: 767px) {
    .apple-control-capsule {
        height: 32px !important;
        border-radius: 8px !important;
        padding: 0 10px !important;
    }
    .apple-btn-icon-capsule {
        width: 32px !important;
        height: 32px !important;
        border-radius: 8px !important;
    }
}

/* ==========================================================================
   DASHBOARD DE ASISTENCIA - APPLE HIG & SLDS PREMIUM STYLES
   ========================================================================== */

.dashboard-page-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 24px 20px 48px 20px;
}

/* Page Header & Actions */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-header__left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dashboard-header__title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-header__title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.025em;
    margin: 0;
    line-height: 1.2;
}

.dashboard-header__badge {
    background: rgba(0, 113, 227, 0.1);
    color: #0071E3;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dashboard-header__subtitle {
    font-size: 0.88rem;
    color: #86868b;
    margin: 0;
}

.dashboard-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Date Picker Capsule */
.apple-control-capsule {
    display: inline-flex;
    align-items: center;
    height: 34px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 0 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    gap: 10px;
    transition: all 0.2s ease;
}

.apple-control-capsule:focus-within,
.apple-control-capsule:hover {
    border-color: #0071E3;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.12);
}

.apple-control-capsule__icon {
    width: 16px;
    height: 16px;
    color: #86868b;
    flex-shrink: 0;
}

.apple-control-capsule__input {
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    color: #1d1d1f;
    background: transparent;
    cursor: pointer;
}

select.apple-control-capsule__input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 4px center / 12px;
    padding-right: 24px;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.apple-control-capsule:has(#dashboardDateInput) {
    position: relative;
    cursor: pointer;
}

#dashboardDateInput {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    font-weight: 600;
    padding-right: 22px;
}

.apple-control-capsule:has(#dashboardDateInput)::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat center center / contain;
    pointer-events: none;
    opacity: 0.8;
}

#dashboardDateInput::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.apple-btn-icon-capsule {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    box-sizing: border-box;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #636366;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.apple-btn-icon-capsule svg {
    width: 14px;
    height: 14px;
    stroke-width: 1.8;
    color: #636366;
    transition: color 0.15s ease;
}

.apple-btn-icon-capsule:hover {
    background: #f5f5f7;
    border-color: rgba(0, 0, 0, 0.2);
    color: #1d1d1f;
    transform: translateY(-1px);
}

.apple-btn-icon-capsule:hover svg {
    color: #1d1d1f;
}

.apple-btn-icon-capsule.is-spinning svg {
    animation: appleSpin 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes appleSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Dashboard Bento Grid 5 Column Adaptation (Apple HIG 1:1 con vacaciones) */
.apple-metrics-grid[style*="repeat(5"],
.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 14px;
}

@media (max-width: 1200px) {
    .apple-metrics-grid[style*="repeat(5"],
    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .apple-metrics-grid[style*="repeat(5"],
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    .apple-metrics-grid[style*="repeat(5"] .apple-metric-tile:last-child,
    .dashboard-kpi-tile:last-child {
        grid-column: span 2 !important;
    }
}

@media (max-width: 420px) {
    .apple-metrics-grid[style*="repeat(5"] .apple-metric-tile,
    .dashboard-kpi-tile {
        padding: 14px 14px;
        min-height: 108px;
    }
    .apple-metrics-grid[style*="repeat(5"] .apple-metric-big-num,
    .dashboard-kpi-tile__number {
        font-size: 1.85rem;
    }
}

.dashboard-kpi-tile {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 18px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    min-height: 114px;
    transition: border-color 0.2s ease;
}

.dashboard-kpi-tile:hover {
    border-color: rgba(0, 0, 0, 0.12);
}

.dashboard-kpi-tile__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dashboard-kpi-tile__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.dashboard-kpi-tile__icon-box {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-kpi-tile__icon-box.icon-blue {
    background: rgba(0, 113, 227, 0.1);
    color: #0071E3;
}

.dashboard-kpi-tile__icon-box.icon-green {
    background: rgba(52, 199, 89, 0.12);
    color: #34C759;
}

.dashboard-kpi-tile__icon-box.icon-orange {
    background: rgba(255, 149, 0, 0.12);
    color: #FF9500;
}

.dashboard-kpi-tile__icon-box.icon-red {
    background: rgba(255, 59, 48, 0.12);
    color: #FF3B30;
}

.dashboard-kpi-tile__icon-box.icon-purple {
    background: rgba(175, 82, 222, 0.12);
    color: #AF52DE;
}

.dashboard-kpi-tile__value-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 10px 0 0 0;
}

.dashboard-kpi-tile__number {
    font-size: 2.15rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    color: #1d1d1f;
}

.dashboard-kpi-tile__footer {
    margin-top: auto;
    padding-top: 6px;
    font-size: 0.76rem;
    color: #86868b;
}

/* Toolbar & Filters Card */
.dashboard-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.dashboard-toolbar {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dashboard-toolbar__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Segmented Control Scroll Wrap */
.dashboard-segmented-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100%;
}

.dashboard-segmented-scroll::-webkit-scrollbar {
    display: none;
}

.dashboard-toolbar__controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-toolbar__filters {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Live Search Input */
.apple-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 240px;
    flex: 1 1 240px;
}

.apple-search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: #86868b;
    pointer-events: none;
}

.apple-search-input {
    width: 100%;
    padding: 7px 32px 7px 36px;
    font-size: 0.84rem;
    font-family: inherit;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: #fbfbfd;
    color: #1d1d1f;
    outline: none;
    transition: all 0.2s ease;
}

.apple-search-input:focus {
    background: #ffffff;
    border-color: #0071E3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.apple-search-clear {
    position: absolute;
    right: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.12);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: opacity 0.15s ease;
}

.apple-search-clear:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Select Pills */
.apple-select-control {
    appearance: none;
    height: 34px;
    box-sizing: border-box;
    background: #ffffff url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' 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") no-repeat right 10px center/14px;
    padding: 0 32px 0 12px;
    font-size: 0.84rem;
    font-family: inherit;
    font-weight: 500;
    color: #1d1d1f;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    min-width: 160px;
}

.apple-select-control:focus,
.apple-select-control:hover {
    border-color: #0071E3;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.12);
}

/* Rich Table Enhancements */
.apple-table-wrap {
    overflow-x: auto;
}

.dashboard-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.80rem;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.dashboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

a.dashboard-user-name,
span.dashboard-user-name,
.dashboard-user-name {
    font-weight: 600 !important;
    color: #1d1d1f !important;
    font-size: 0.88rem !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
    transition: color 0.15s ease !important;
    white-space: nowrap !important;
}

a.dashboard-user-name:hover {
    color: #0071E3 !important;
    text-decoration: none !important;
}

.dashboard-user-emp-no {
    font-size: 0.75rem;
    color: #86868b;
    font-variant-numeric: tabular-nums;
}

/* Department Badge */
.apple-dept-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f5f5f7;
    color: #48484a;
    font-size: 0.76rem;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Shift Info */
.dashboard-shift-info {
    display: flex;
    flex-direction: column;
}

.dashboard-shift-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: #1d1d1f;
}

.dashboard-shift-hours {
    font-size: 0.74rem;
    color: #86868b;
    font-variant-numeric: tabular-nums;
}

/* Time & Punctuality Badges */
.dashboard-time-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-time-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1d1d1f;
    font-variant-numeric: tabular-nums;
}

.dashboard-time-empty {
    color: #c7c7cc;
    font-weight: 400;
}

.apple-pill-delta {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 6px;
}

.apple-pill-delta.delta-ontime {
    background: rgba(52, 199, 89, 0.12);
    color: #248a3d;
}

.apple-pill-delta.delta-late {
    background: rgba(255, 149, 0, 0.14);
    color: #d97706;
}

.apple-pill-delta.delta-justified {
    background: rgba(0, 113, 227, 0.12);
    color: #0071e3;
}

/* Operational Status Badges */
.apple-op-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.op-badge-text-full {
    display: inline;
}
.op-badge-text-short {
    display: none;
}

.apple-modal-date-input {
    height: 42px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    padding: 0 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    background: #ffffff !important;
    width: 100% !important;
    box-sizing: border-box !important;
    color: #1d1d1f !important;
    -webkit-appearance: none;
}
.apple-modal-date-input:focus {
    border-color: #0071E3 !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15) !important;
    outline: none !important;
}

.apple-op-badge.badge-working {
    background: rgba(52, 199, 89, 0.14);
    color: #248a3d;
}

.apple-op-badge.badge-ontime {
    background: rgba(52, 199, 89, 0.1);
    color: #248a3d;
}

.apple-op-badge.badge-late {
    background: rgba(255, 149, 0, 0.14);
    color: #d97706;
}

.apple-op-badge.badge-absent {
    background: rgba(255, 59, 48, 0.12);
    color: #d70015;
}

.apple-op-badge.badge-pending {
    background: rgba(142, 142, 147, 0.12);
    color: #636366;
}

.apple-op-badge.badge-vacation {
    background: rgba(175, 82, 222, 0.12);
    color: #8944ab;
}

.apple-op-badge.badge-holiday {
    background: rgba(0, 113, 227, 0.12);
    color: #0071e3;
}

.apple-op-badge.badge-justified {
    background: rgba(0, 113, 227, 0.12);
    color: #0071e3;
}

.apple-op-badge.badge-missing-exit {
    background: rgba(255, 106, 0, 0.14);
    color: #c83803;
}

.apple-actions-cell {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: auto !important;
    white-space: nowrap !important;
}

/* Action Buttons & Justified Chips (Homologados con el sistema) */
.apple-actions-cell .apple-btn-mini-action,
.apple-actions-cell .btn-abrir-justificar,
.btn-abrir-justificar,
.apple-action-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 124px !important;
    min-width: 124px !important;
    max-width: 124px !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    line-height: 24px !important;
    padding: 0 6px !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    border: 1px solid rgba(0, 113, 227, 0.25) !important;
    background: #ffffff !important;
    color: #0071e3 !important;
    cursor: pointer !important;
    transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    text-align: center !important;
}

.apple-actions-cell .apple-btn-mini-action:hover,
.apple-actions-cell .btn-abrir-justificar:hover,
.btn-abrir-justificar:hover,
.apple-action-pill:hover {
    background: #0071e3 !important;
    background-color: #0071e3 !important;
    color: #ffffff !important;
    border-color: #0071e3 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.25) !important;
}

.apple-actions-cell .apple-btn-mini-action:active,
.apple-actions-cell .btn-abrir-justificar:active,
.btn-abrir-justificar:active,
.apple-action-pill:active {
    transform: scale(0.97) !important;
}

.apple-justified-chip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    width: 124px !important;
    min-width: 124px !important;
    max-width: 124px !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    line-height: 24px !important;
    padding: 0 4px 0 6px !important;
    border-radius: 6px !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    background: rgba(52, 199, 89, 0.12) !important;
    color: #248a3d !important;
    border: 1px solid rgba(52, 199, 89, 0.25) !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    text-align: center !important;
}

.apple-justified-chip span {
    display: inline-block;
    line-height: 24px;
    vertical-align: middle;
}

/* Botón neutral de reversión (Acción honesta secundaria Apple HIG) */
.apple-btn-revert {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    height: 26px !important;
    padding: 0 10px !important;
    border-radius: 6px !important;
    font-size: 0.74rem !important;
    font-weight: 500 !important;
    color: #636366 !important;
    background: #f5f5f7 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    cursor: pointer !important;
    transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.apple-btn-revert svg {
    width: 12px !important;
    height: 12px !important;
    color: #86868b !important;
    transition: color 0.16s ease !important;
}

.apple-btn-revert:hover {
    background: rgba(255, 59, 48, 0.08) !important;
    border-color: rgba(255, 59, 48, 0.28) !important;
    color: #d70015 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 1px 4px rgba(215, 0, 21, 0.12) !important;
}

.apple-btn-revert:hover svg {
    color: #d70015 !important;
}

.apple-btn-revert:active {
    transform: scale(0.97) !important;
}

/* Botón compacto de reversión (para filas con botón principal pendiente) */
.apple-btn-revert-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 6px !important;
    background: #f5f5f7 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #86868b !important;
    cursor: pointer !important;
    transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.apple-btn-revert-icon svg {
    width: 12px !important;
    height: 12px !important;
    color: #86868b !important;
    transition: color 0.16s ease !important;
}

.apple-btn-revert-icon:hover {
    background: rgba(255, 59, 48, 0.08) !important;
    border-color: rgba(255, 59, 48, 0.28) !important;
    color: #d70015 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 1px 4px rgba(215, 0, 21, 0.12) !important;
}

.apple-btn-revert-icon:hover svg {
    color: #d70015 !important;
}

.apple-btn-revert-icon:active {
    transform: scale(0.97) !important;
}

/* Texto Conforme en celda de acciones */
.apple-cell-conforme {
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    color: #8e8e93 !important;
    display: inline-block !important;
    line-height: 26px !important;
    white-space: nowrap !important;
}

/* ==========================================================================
   CALIBRACIÓN DE TABLA DE ASISTENCIA (DESKTOP)
   1. Columna 'Colaborador' fija (sticky) para que NUNCA se oculte al hacer scroll.
   2. Proporciones y espaciados compactos para que quepa con la barra lateral abierta.
   3. Celdas de acción y chips con white-space nowrap para evitar saltos de línea.
   ========================================================================== */
@media (min-width: 768px) {
    body.dashboard-page .apple-table {
        width: 100% !important;
        table-layout: auto !important;
    }

    body.dashboard-page .apple-table thead th {
        padding: 9px 10px !important;
        font-size: 0.69rem !important;
        white-space: nowrap !important;
        text-align: left !important;
    }

    body.dashboard-page .apple-table tbody td {
        padding: 8px 10px !important;
    }

    body.dashboard-page .apple-table thead th:first-child,
    body.dashboard-page .apple-table tbody td:first-child {
        position: sticky !important;
        left: 0 !important;
        z-index: 5 !important;
        background: #ffffff !important;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04) !important;
        padding-left: 20px !important;
        padding-right: 14px !important;
    }

    body.dashboard-page .apple-table thead th:first-child {
        background: #fafafc !important;
        z-index: 6 !important;
    }

    body.dashboard-page .apple-table tbody tr:hover td:first-child {
        background: #fbfbfd !important;
    }

    body.dashboard-page .apple-table thead th:last-child,
    body.dashboard-page .apple-table tbody td:last-child {
        padding-right: 20px !important;
        text-align: center !important;
    }

    body.dashboard-page .apple-dept-badge,
    body.dashboard-page .apple-loc-badge {
        padding: 2px 6px !important;
        font-size: 0.74rem !important;
        font-weight: 500 !important;
        background: #f5f5f7 !important;
        color: #48484a !important;
        border: 1px solid rgba(0, 0, 0, 0.04) !important;
        border-radius: 6px !important;
        white-space: nowrap !important;
    }

    body.dashboard-page .dashboard-shift-name {
        font-size: 0.79rem !important;
        white-space: nowrap !important;
    }

    body.dashboard-page .dashboard-shift-hours {
        font-size: 0.71rem !important;
        white-space: nowrap !important;
    }

    body.dashboard-page .dashboard-time-value {
        font-size: 0.82rem !important;
        white-space: nowrap !important;
    }

    body.dashboard-page .apple-op-badge {
        font-size: 0.74rem !important;
        padding: 3px 8px !important;
        white-space: nowrap !important;
    }

    /* Acciones en línea horizontal para mantener altura uniforme de fila */
    body.dashboard-page .apple-actions-cell {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        width: auto !important;
        white-space: nowrap !important;
    }
}

.apple-justified-chip button.btn-revertir-justificacion {
    border: none;
    background: transparent;
    color: #248a3d;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: 16px;
    height: 16px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50%;
    transition: all 0.15s ease;
    flex-shrink: 0;
    line-height: 1;
}

.apple-justified-chip button.btn-revertir-justificacion:hover {
    background: rgba(215, 0, 21, 0.15);
    color: #d70015;
}

.apple-justified-chip button.btn-revertir-justificacion svg {
    display: block;
    width: 10px;
    height: 10px;
    pointer-events: none;
}

.apple-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34C759;
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
    animation: applePulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes applePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(52, 199, 89, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 199, 89, 0);
    }
}

/* Location Badge - Homologado idéntico con Department Badge */
.apple-loc-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f5f5f7;
    color: #48484a;
    font-size: 0.76rem;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.04);
    white-space: nowrap;
}

/* Empty Filter State */
.dashboard-empty-state {
    padding: 60px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dashboard-empty-state__icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #f5f5f7;
    color: #86868b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.dashboard-empty-state__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 4px 0;
}

.dashboard-empty-state__desc {
    font-size: 0.84rem;
    color: #86868b;
    max-width: 360px;
    margin: 0;
}

/* ==========================================================================
   OPTIMIZACIÓN RESPONSIVA MÓVIL ESTILO APPLE HIG (<= 767px)
   ========================================================================== */
@media (max-width: 767px) {
    body.dashboard-page .dashboard-page-container {
        padding: 16px 12px 48px 12px;
    }

    body.dashboard-page .apple-card {
        border-radius: 16px;
    }

    body.dashboard-page .apple-card-header {
        padding: 14px 16px 10px 16px !important;
    }

    body.dashboard-page .apple-card-title-group {
        gap: 10px !important;
        align-items: flex-start !important;
    }

    body.dashboard-page .apple-card-icon-wrap {
        width: 32px !important;
        height: 32px !important;
        border-radius: 8px !important;
        margin-top: 2px !important;
    }

    body.dashboard-page .apple-card-icon-wrap svg {
        width: 17px !important;
        height: 17px !important;
    }

    body.dashboard-page .apple-card-title {
        font-size: 1.05rem !important;
        line-height: 1.25 !important;
    }

    body.dashboard-page .apple-card-subtitle {
        font-size: 0.76rem !important;
    }

    body.dashboard-page .dashboard-header__actions {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-top: 2px !important;
    }

    body.dashboard-page .apple-control-capsule {
        height: 34px !important;
        padding: 0 12px !important;
        gap: 10px !important;
        border-radius: 8px !important;
        font-size: 0.80rem !important;
    }

    body.dashboard-page select#empresaFilterSelect.apple-select-control {
        width: 100% !important;
        flex: 1 1 100% !important;
        min-width: 0 !important;
        background-color: #ffffff !important;
    }

    body.dashboard-page .apple-control-capsule:has(#dashboardDateInput) {
        flex: 1 !important;
        min-width: 0 !important;
        position: relative !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
    }

    body.dashboard-page #dashboardDateInput {
        flex: 1 !important;
        min-width: 0 !important;
        width: 100% !important;
        font-size: 0.80rem !important;
        padding-right: 20px !important;
    }

    body.dashboard-page .apple-control-capsule:has(#dashboardDateInput)::after {
        right: 8px !important;
    }

    body.dashboard-page .apple-control-capsule__icon {
        width: 14px !important;
        height: 14px !important;
    }

    body.dashboard-page .apple-btn-icon-capsule {
        width: 34px !important;
        height: 34px !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
    }

    body.dashboard-page .apple-btn-icon-capsule svg {
        width: 13px !important;
        height: 13px !important;
        stroke-width: 1.8 !important;
        color: #636366 !important;
    }

    body.dashboard-page .apple-card-body {
        padding: 6px 14px 14px 14px !important;
    }

    body.dashboard-page #seccionHorasExtra .apple-card-body,
    body.dashboard-page .apple-card-body:has(.apple-table-wrap),
    body.dashboard-page .apple-card-body.slds-p-horizontal_none {
        padding: 0 !important;
    }

    /* Bento Grid Mobile Calibration (Apple Health/Fitness Style) */
    body.dashboard-page .apple-metrics-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    body.dashboard-page .apple-metric-tile {
        padding: 10px 12px !important;
        border-radius: 12px !important;
        min-height: 76px !important;
        height: auto !important;
        background: #fbfbfd !important;
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    body.dashboard-page .apple-metric-header-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 4px !important;
        min-height: 16px !important;
    }

    body.dashboard-page .apple-metric-label {
        font-size: 0.68rem !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.02em !important;
        color: #86868b !important;
    }

    body.dashboard-page .apple-metric-pill {
        font-size: 0.62rem !important;
        font-weight: 600 !important;
        padding: 2px 6px !important;
        border-radius: 9999px !important;
    }

    body.dashboard-page .apple-metric-value-wrap {
        margin: 2px 0 1px 0 !important;
        display: flex !important;
        align-items: baseline !important;
    }

    body.dashboard-page .apple-metric-big-num {
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
    }

    body.dashboard-page .apple-metric-caption {
        font-size: 0.68rem !important;
        line-height: 1.2 !important;
        color: #86868b !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    body.dashboard-page .apple-segmented-wrap {
        margin-bottom: 12px !important;
    }

    /* Scroll táctil fluido de chips con padding derecho para evitar recortes */
    body.dashboard-page .dashboard-segmented-scroll {
        -webkit-overflow-scrolling: touch;
        padding: 2px 0 6px 0 !important;
    }

    body.dashboard-page .apple-segmented-control {
        display: inline-flex !important;
        padding: 3px !important;
        background: rgba(118, 118, 128, 0.12) !important;
        border-radius: 10px !important;
        gap: 2px !important;
        width: max-content !important;
    }

    body.dashboard-page .apple-segment-btn {
        padding: 6px 12px !important;
        font-size: 0.78rem !important;
        font-weight: 500 !important;
        border-radius: 7px !important;
        white-space: nowrap !important;
        min-height: 32px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    body.dashboard-page .apple-segment-badge {
        font-size: 0.70rem !important;
        padding: 1px 6px !important;
        border-radius: 9999px !important;
        font-weight: 600 !important;
    }

    /* Toolbar de Búsqueda y Filtros Compacto iOS (Resuelve espacios muertos de 240px flex-basis) */
    body.dashboard-page .dashboard-toolbar {
        padding: 10px 14px !important;
        gap: 8px !important;
        height: auto !important;
        flex: none !important;
    }

    body.dashboard-page .dashboard-toolbar__controls {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        height: auto !important;
        min-height: 0 !important;
        flex: none !important;
    }

    body.dashboard-page .apple-search-wrap {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 38px !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
    }

    body.dashboard-page .apple-search-icon {
        left: 10px !important;
        width: 15px !important;
        height: 15px !important;
    }

    body.dashboard-page .apple-search-input {
        width: 100% !important;
        height: 38px !important;
        padding: 0 32px 0 34px !important;
        font-size: 0.82rem !important;
        border-radius: 10px !important;
        background: #f2f2f7 !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: none !important;
    }

    body.dashboard-page .apple-search-input:focus {
        background: #ffffff !important;
        border-color: #0071E3 !important;
        box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15) !important;
    }

    body.dashboard-page .dashboard-toolbar__filters {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }

    body.dashboard-page .apple-select-control {
        width: 100% !important;
        min-width: 0 !important;
        height: 34px !important;
        font-size: 0.78rem !important;
        border-radius: 8px !important;
        padding: 0 22px 0 10px !important;
        background-color: #ffffff !important;
        background-size: 11px !important;
        background-position: right 8px center !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }

    /* TRANSFORMACIÓN DE TABLA EN TARJETAS ESTILO APPLE (GROUPED INSET CARDS) */
    body.dashboard-page .apple-table-wrap {
        overflow-x: visible;
        padding: 8px 12px 16px 12px;
    }

    body.dashboard-page .apple-table {
        display: block;
        width: 100% !important;
        border: none !important;
    }

    body.dashboard-page .apple-table thead {
        display: none !important;
    }

    body.dashboard-page .apple-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    body.dashboard-page .apple-table-row.dashboard-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px 12px !important;
        position: relative !important;
        padding: 16px !important;
        background: #ffffff !important;
        border-radius: 16px !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
        transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    }

    /* Regla crítica para que las tarjetas se oculten correctamente al filtrar en móvil */
    body.dashboard-page .apple-table-row.dashboard-row.is-hidden,
    body.dashboard-page .apple-table-row.dashboard-row[style*="display: none"],
    body.dashboard-page .apple-table-row.dashboard-row[style*="display:none"] {
        display: none !important;
    }

    .apple-table-row.dashboard-row:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
    }

    /* Celda 1: Colaborador (Nombre, Avatar, ID) */
    .apple-table-row.dashboard-row td:nth-child(1) {
        grid-column: 1 / -1;
        display: flex !important;
        align-items: center !important;
        padding: 0 !important;
        border: none !important;
        padding-right: 125px !important; /* Espacio reservado para el badge de estado */
        min-width: 0 !important;
    }

    .dashboard-user-cell {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .dashboard-user-info {
        display: flex !important;
        flex-direction: column !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    .dashboard-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.80rem;
        flex-shrink: 0 !important;
    }

    .dashboard-user-name {
        font-size: 0.94rem !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* Celda 6: Estado Operativo (Anclado arriba a la derecha de la tarjeta) */
    .apple-table-row.dashboard-row td:nth-child(6) {
        position: absolute !important;
        top: 14px !important;
        right: 14px !important;
        padding: 0 !important;
        border: none !important;
        z-index: 2 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    .apple-op-badge {
        font-size: 0.72rem !important;
        padding: 3px 8px !important;
        white-space: nowrap !important;
        line-height: 1.2 !important;
        flex-shrink: 0 !important;
    }

    .op-badge-text-full {
        display: none !important;
    }
    .op-badge-text-short {
        display: inline !important;
    }

    /* Celda 2: Departamento */
    .apple-table-row.dashboard-row td:nth-child(2) {
        grid-column: 1;
        display: flex !important;
        align-items: center !important;
        padding: 0 !important;
        border: none !important;
    }

    /* Celda 3: Turno */
    .apple-table-row.dashboard-row td:nth-child(3) {
        grid-column: 2;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        text-align: right !important;
        padding: 0 !important;
        border: none !important;
    }

    .dashboard-shift-name {
        font-size: 0.8rem;
        font-weight: 600;
    }

    .dashboard-shift-hours {
        font-size: 0.72rem;
        color: #86868b;
    }

    /* Celda 4: Hora Entrada (Distribución vertical estilo Apple HIG) */
    .apple-table-row.dashboard-row td:nth-child(4) {
        grid-column: 1;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
        gap: 5px !important;
        background: #fbfbfd;
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
        border-radius: 12px;
        padding: 8px 12px !important;
        min-height: 56px;
        box-sizing: border-box;
    }

    .apple-table-row.dashboard-row td:nth-child(4)::before {
        content: "Entrada";
        font-size: 0.68rem;
        font-weight: 600;
        color: #86868b;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        line-height: 1;
    }

    /* Celda 5: Hora Salida (Distribución vertical estilo Apple HIG) */
    .apple-table-row.dashboard-row td:nth-child(5) {
        grid-column: 2;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
        gap: 5px !important;
        background: #fbfbfd;
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
        border-radius: 12px;
        padding: 8px 12px !important;
        min-height: 56px;
        box-sizing: border-box;
    }

    .apple-table-row.dashboard-row td:nth-child(5)::before {
        content: "Salida";
        font-size: 0.68rem;
        font-weight: 600;
        color: #86868b;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        line-height: 1;
    }

    .apple-table-row.dashboard-row .dashboard-time-cell {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
    }

    .apple-table-row.dashboard-row .dashboard-time-value {
        font-size: 0.86rem !important;
        font-weight: 700 !important;
        color: #1d1d1f !important;
        white-space: nowrap !important;
        line-height: 1.2 !important;
    }

    .apple-table-row.dashboard-row .apple-pill-delta {
        font-size: 0.68rem !important;
        font-weight: 600 !important;
        padding: 2px 7px !important;
        border-radius: 9999px !important;
        white-space: nowrap !important;
        line-height: 1.2 !important;
        flex-shrink: 0 !important;
    }

    .apple-table-row.dashboard-row .dashboard-time-empty {
        font-size: 0.86rem !important;
        color: #86868b !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
    }

    /* Celda 7: Ubicación */
    .apple-table-row.dashboard-row td:nth-child(7) {
        grid-column: 1 / -1;
        display: flex !important;
        align-items: center !important;
        padding: 8px 0 0 0 !important;
        border: none !important;
        border-top: 1px dashed rgba(0, 0, 0, 0.06) !important;
        font-size: 0.78rem;
    }

    .apple-table-row.dashboard-row td:nth-child(7)::before {
        content: "Ubicación:";
        font-weight: 600;
        color: #86868b;
        margin-right: 6px;
        font-size: 0.74rem;
    }

    /* Celda 8: Acciones / Justificación en móvil */
    .apple-table-row.dashboard-row td:nth-child(8) {
        grid-column: 1 / -1;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        padding: 8px 0 0 0 !important;
        border: none !important;
        border-top: 1px dashed rgba(0, 0, 0, 0.06) !important;
    }

    /* Empty state en móvil */
    #dashboardEmptyState {
        display: block;
        width: 100%;
        background: transparent;
        border: none;
    }

    #dashboardEmptyState td {
        display: block;
        width: 100%;
        padding: 0;
        border: none;
    }

    /* Transformación Móvil de Horas Extra (.fila-he) en Tarjetas Apple Congruentes */
    /* Transformación Móvil de Horas Extra (.fila-he) en Tarjetas Apple Compactas y Congruentes */
    body.dashboard-page #tablaHorasExtraPendientes {
        display: block !important;
        width: 100% !important;
        border: none !important;
    }

    body.dashboard-page #tablaHorasExtraPendientes thead {
        display: none !important;
    }

    body.dashboard-page #tablaHorasExtraPendientes tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        padding: 4px 0 16px 0 !important;
    }

    body.dashboard-page .apple-table-row.fila-he {
        display: grid !important;
        width: 100% !important;
        box-sizing: border-box !important;
        grid-template-columns: auto 1fr !important;
        grid-template-areas:
            "colab   colab"
            "fecha   fecha"
            "extra   prop"
            "actions actions" !important;
        align-items: center !important;
        gap: 6px 10px !important;
        position: relative !important;
        padding: 12px 14px 12px 14px !important;
        background: #ffffff !important;
        border-radius: 14px !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
        transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    }

    /* Celda 1: Colaborador */
    body.dashboard-page .apple-table-row.fila-he td:nth-child(1) {
        grid-area: colab !important;
        display: flex !important;
        align-items: center !important;
        padding: 0 !important;
        border: none !important;
        padding-right: 85px !important;
    }

    /* Celda 2: Fecha */
    body.dashboard-page .apple-table-row.fila-he td:nth-child(2) {
        grid-area: fecha !important;
        display: flex !important;
        align-items: center !important;
        padding: 0 !important;
        border: none !important;
        font-size: 0.76rem !important;
        color: #86868b !important;
        font-weight: 500 !important;
        margin-top: -3px !important;
    }

    body.dashboard-page .apple-table-row.fila-he td:nth-child(2)::before {
        content: "Fecha:";
        font-weight: 600;
        color: #86868b;
        font-size: 0.72rem;
        margin-right: 5px;
    }

    body.dashboard-page .apple-table-row.fila-he td:nth-child(2) .slds-badge {
        position: absolute !important;
        top: 12px !important;
        right: 14px !important;
        margin: 0 !important;
        font-size: 0.70rem !important;
        padding: 3px 8px !important;
        border-radius: 980px !important;
        font-weight: 600 !important;
    }

    /* Celda 3: Tiempo Extra (Chip compacto) */
    body.dashboard-page .apple-table-row.fila-he td:nth-child(3) {
        grid-area: extra !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: 6px 0 0 0 !important;
        border: none !important;
        border-top: 1px dashed rgba(0, 0, 0, 0.06) !important;
    }

    body.dashboard-page .apple-table-row.fila-he td:nth-child(3) .slds-badge {
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        padding: 2px 7px !important;
        border-radius: 6px !important;
        background: rgba(255, 149, 0, 0.12) !important;
        color: #d97706 !important;
        margin: 0 !important;
        display: inline-flex !important;
    }

    /* Celda 4: Propuesta LFT (Chip compacto) */
    body.dashboard-page .apple-table-row.fila-he td:nth-child(4) {
        grid-area: prop !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: 6px 0 0 0 !important;
        border: none !important;
        border-top: 1px dashed rgba(0, 0, 0, 0.06) !important;
    }

    body.dashboard-page .apple-table-row.fila-he td:nth-child(4) > div {
        display: inline-flex !important;
        flex-direction: row !important;
        gap: 4px !important;
        align-items: center !important;
    }

    body.dashboard-page .apple-table-row.fila-he td:nth-child(4) span {
        font-size: 0.74rem !important;
        font-weight: 600 !important;
        padding: 2px 7px !important;
        border-radius: 6px !important;
        display: inline-flex !important;
    }

    /* Celda 5: Acciones (Ubicadas en la fila inferior de la tarjeta para ergonomía móvil) */
    body.dashboard-page .apple-table-row.fila-he td:nth-child(5) {
        grid-area: actions !important;
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
        padding: 6px 0 0 0 !important;
        margin-top: 2px !important;
        border: none !important;
        border-top: 1px dashed rgba(0, 0, 0, 0.06) !important;
    }

    body.dashboard-page .apple-table-row.fila-he td:nth-child(5) > div {
        display: flex !important;
        width: 100% !important;
        gap: 6px !important;
        align-items: center !important;
    }

    body.dashboard-page .apple-table-row.fila-he td:nth-child(5) .apple-btn-mini-action {
        flex: 1 1 50% !important;
        width: 100% !important;
        height: 29px !important;
        min-height: 29px !important;
        line-height: 29px !important;
        font-size: 0.76rem !important;
        padding: 0 8px !important;
        border-radius: 6px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        font-weight: 600 !important;
        text-align: center !important;
        box-sizing: border-box !important;
        transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease !important;
    }

    body.dashboard-page .apple-table-row.fila-he td:nth-child(5) .apple-btn-mini-action:active {
        transform: scale(0.98) !important;
        opacity: 0.9 !important;
    }

    body.dashboard-page .apple-table-row.fila-he td:nth-child(5) .btn-abrir-autorizar-he {
        background: #2e844a !important;
        color: #ffffff !important;
        border: 1px solid #2e844a !important;
        font-weight: 600 !important;
    }

    body.dashboard-page .apple-table-row.fila-he td:nth-child(5) .btn-abrir-autorizar-he:hover {
        background: #26713f !important;
        border-color: #26713f !important;
    }

    body.dashboard-page .apple-table-row.fila-he td:nth-child(5) .btn-abrir-rechazar-he {
        background: #ffffff !important;
        color: #ff3b30 !important;
        border: 1px solid rgba(255, 59, 48, 0.25) !important;
        font-weight: 600 !important;
    }

    body.dashboard-page .apple-table-row.fila-he td:nth-child(5) .btn-abrir-rechazar-he:hover {
        background: #ff3b30 !important;
        color: #ffffff !important;
        border-color: #ff3b30 !important;
    }
}

/* ==========================================================================
   BOTONES DE ACCIÓN HORAS EXTRA (HOMOLOGADOS ESCRITORIO Y MÓVIL)
   Garantiza verde Apple uniforme (#2e844a) con texto blanco (#ffffff)
   ========================================================================== */
.btn-abrir-autorizar-he,
body.dashboard-page .btn-abrir-autorizar-he,
body.dashboard-page .slds-button_success.apple-btn-mini-action,
.apple-table-row.fila-he td .btn-abrir-autorizar-he {
    background: #2e844a !important;
    background-color: #2e844a !important;
    color: #ffffff !important;
    border: 1px solid #2e844a !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
}

.btn-abrir-autorizar-he:hover,
body.dashboard-page .btn-abrir-autorizar-he:hover,
body.dashboard-page .slds-button_success.apple-btn-mini-action:hover,
.apple-table-row.fila-he td .btn-abrir-autorizar-he:hover {
    background: #26713f !important;
    background-color: #26713f !important;
    border-color: #26713f !important;
    color: #ffffff !important;
}

.btn-abrir-rechazar-he,
body.dashboard-page .btn-abrir-rechazar-he,
body.dashboard-page .slds-button_destructive.apple-btn-mini-action,
.apple-table-row.fila-he td .btn-abrir-rechazar-he {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #ff3b30 !important;
    border: 1px solid rgba(255, 59, 48, 0.25) !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
}

.btn-abrir-rechazar-he:hover,
body.dashboard-page .btn-abrir-rechazar-he:hover,
body.dashboard-page .slds-button_destructive.apple-btn-mini-action:hover,
.apple-table-row.fila-he td .btn-abrir-rechazar-he:hover {
    background: #ff3b30 !important;
    background-color: #ff3b30 !important;
    color: #ffffff !important;
    border-color: #ff3b30 !important;
}

/* ==========================================================================
   ORGANIGRAMA EMPRESARIAL - APPLE HIG FREEFORM CANVAS
   ========================================================================== */
.organigrama-header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.organigrama-header-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.organigrama-canvas-card {
    border-radius: 20px;
    overflow: hidden;
    margin-top: 0;
}

.organigrama-toolbar__search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 280px;
}

.organigrama-toolbar .apple-search-wrap {
    height: 36px;
}

.organigrama-toolbar .apple-search-input {
    height: 36px;
    padding: 0 32px 0 36px;
    font-size: 0.84rem;
    border-radius: 980px;
    background: #f2f2f7;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.organigrama-toolbar .apple-search-icon {
    left: 12px;
    width: 15px;
    height: 15px;
}

.organigrama-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.apple-btn-capsule {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #1d1d1f;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 980px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.apple-btn-capsule:hover {
    border-color: #0071E3;
    color: #0071E3;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.12);
}

.apple-btn-subtle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #1d1d1f;
    background: #f2f2f7;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.apple-btn-subtle:hover {
    background: #e5e5ea;
    color: #0071E3;
}

.organigrama-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    padding: 4px;
}

.organigrama-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.organigrama-search-item:hover {
    background: rgba(0, 113, 227, 0.08);
}

.organigrama-search-item__name {
    font-size: 0.86rem;
    font-weight: 600;
    color: #1d1d1f;
}

.organigrama-search-item__sub {
    font-size: 0.74rem;
    color: #86868b;
}

.organigrama-canvas-card {
    padding: 0 !important;
    overflow: hidden;
    position: relative;
    border-radius: 18px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05) !important;
}

.organigrama-viewport {
    position: relative;
    width: 100%;
    height: calc(100vh - 220px);
    min-height: 640px;
    max-height: 900px;
    overflow: hidden;
    user-select: none;
    cursor: grab;
    background-color: #f8f8fa;
    background-image: radial-gradient(rgba(0, 0, 0, 0.10) 1.2px, transparent 1.2px);
    background-size: 24px 24px;
}

.organigrama-viewport:active {
    cursor: grabbing;
}

.organigrama-surface {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.organigrama-svg-layer {
    position: absolute;
    top: -5000px;
    left: -5000px;
    width: 10000px;
    height: 10000px;
    pointer-events: none;
    overflow: visible;
}

.organigrama-link {
    fill: none;
    stroke: rgba(0, 113, 227, 0.28);
    stroke-width: 2px;
    stroke-linecap: round;
    transition: stroke 0.2s ease, stroke-width 0.2s ease;
}

.organigrama-link.is-highlighted {
    stroke: #0071E3 !important;
    stroke-width: 3px !important;
    filter: drop-shadow(0 2px 4px rgba(0, 113, 227, 0.35));
}

.organigrama-nodes-layer {
    position: absolute;
    top: 0;
    left: 0;
}

.organigrama-card {
    position: absolute;
    width: 240px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, border-color 0.18s ease;
    user-select: none;
}

.organigrama-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 113, 227, 0.35);
}

.organigrama-card.is-selected {
    border-color: #0071E3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.20), 0 8px 24px rgba(0, 113, 227, 0.18);
}

.organigrama-card.is-pulse {
    animation: appleCardPulse 1.2s cubic-bezier(0.16, 1, 0.3, 1) 2;
}

@keyframes appleCardPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 113, 227, 0); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(0, 113, 227, 0.25); border-color: #0071E3; }
}

.organigrama-card__top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.organigrama-card__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
}

.organigrama-card__info {
    flex: 1;
    min-width: 0;
}

.organigrama-card__name {
    font-size: 0.86rem;
    font-weight: 600;
    color: #1d1d1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.organigrama-card__role {
    font-size: 0.72rem;
    color: #86868b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.organigrama-card__pills {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.organigrama-badge-depto {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.05);
    color: #424245;
}

.organigrama-toggle-btn {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 980px;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #0071E3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.18s ease;
    white-space: nowrap;
    z-index: 10;
}

.organigrama-toggle-btn:hover {
    background: #0071E3;
    color: #ffffff;
    border-color: #0071E3;
    transform: translateX(-50%) translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.25);
}

.organigrama-toggle-btn svg {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.organigrama-card.is-collapsed .organigrama-toggle-btn svg {
    transform: rotate(180deg);
}

.organigrama-dock {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    border-radius: 980px;
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 20;
}

.dock-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #1d1d1f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dock-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #0071E3;
}

.dock-btn:active {
    transform: scale(0.92);
}

.dock-pill {
    font-size: 0.74rem;
    font-weight: 600;
    color: #86868b;
    padding: 0 6px;
    min-width: 44px;
    text-align: center;
}

.dock-divider {
    width: 1px;
    height: 18px;
    background: rgba(0, 0, 0, 0.10);
    margin: 0 2px;
}

.organigrama-inspector {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 350px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.06);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.organigrama-inspector.is-open {
    transform: translateX(0);
}

.inspector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.inspector-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1d1d1f;
}

.inspector-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: #86868b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.inspector-close-btn:hover {
    background: rgba(0, 0, 0, 0.10);
    color: #1d1d1f;
}

.inspector-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

.inspector-profile {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.inspector-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 10px auto;
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.inspector-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
}

.inspector-subtitle {
    font-size: 0.80rem;
    color: #86868b;
    margin-top: 4px;
}

.inspector-actions-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
}

.inspector-action-btn {
    flex: 1;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    color: #1d1d1f;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

.inspector-action-btn:hover {
    border-color: #0071E3;
    color: #0071E3;
    background: rgba(0, 113, 227, 0.04);
}

.inspector-section {
    margin-top: 18px;
}

.inspector-section-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #86868b;
    margin-bottom: 8px;
}

.inspector-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 0.82rem;
}

.inspector-item-label {
    color: #86868b;
}

.inspector-item-val {
    font-weight: 500;
    color: #1d1d1f;
}

.inspector-relation-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #f5f5f7;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 6px;
}

.inspector-relation-card:hover {
    background: rgba(0, 113, 227, 0.10);
}

.inspector-relation-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.inspector-relation-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1d1d1f;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767px) {
    body.organigrama-page .apple-card {
        height: auto !important;
        border-radius: 16px !important;
    }

    body.organigrama-page .apple-card-header {
        padding: 14px 14px 12px 14px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    body.organigrama-page .apple-card-title-group {
        gap: 10px !important;
    }

    body.organigrama-page .organigrama-header-controls {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    body.organigrama-page .organigrama-header-controls > form,
    body.organigrama-page .organigrama-header-controls > select {
        width: 100% !important;
    }

    body.organigrama-page #organigramaEmpresaSelect,
    body.organigrama-page #organigramaDeptoFilter {
        width: 100% !important;
        min-width: 0 !important;
        height: 36px !important;
    }

    body.organigrama-page .organigrama-header-actions-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1.2fr !important;
        gap: 6px !important;
        width: 100% !important;
    }

    body.organigrama-page .organigrama-header-actions-row button {
        width: 100% !important;
        justify-content: center !important;
        height: 34px !important;
        padding: 0 6px !important;
        font-size: 0.78rem !important;
    }

    .organigrama-viewport {
        height: calc(100vh - 200px);
        min-height: 480px;
    }

    .organigrama-inspector {
        width: 100% !important;
        left: 0 !important;
    }
}

/* ==========================================================================
   MÓDULO DE REPORTES Y HORAS EXTRA (APPLE HIG / SLDS ESTANDARIZADO)
   ========================================================================== */

/* Botones estándar del módulo de reportes y horas extra */
.reportes-page .slds-button,
#seccionHorasExtra .slds-button {
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reportes-page .slds-button_brand,
#modalAutorizarHE .slds-button_brand {
    background-color: #0071E3 !important;
    border-color: #0071E3 !important;
    color: #ffffff !important;
}

.reportes-page .slds-button_brand:hover,
#modalAutorizarHE .slds-button_brand:hover {
    background-color: #0051a8 !important;
    border-color: #0051a8 !important;
}

.reportes-page .slds-button_success {
    background-color: #34C759 !important;
    border-color: #34C759 !important;
    color: #ffffff !important;
}

.reportes-page .slds-button_success:hover {
    background-color: #248a3d !important;
    border-color: #248a3d !important;
}

.reportes-page .slds-button_destructive,
#modalRechazarHE .slds-button_destructive {
    background-color: #FF3B30 !important;
    border-color: #FF3B30 !important;
    color: #ffffff !important;
}

.reportes-page .slds-button_destructive:hover,
#modalRechazarHE .slds-button_destructive:hover {
    background-color: #d70015 !important;
    border-color: #d70015 !important;
}

/* Mini botones de acción en tabla */
.apple-btn-mini-action {
    font-size: 0.78rem !important;
    padding: 4px 10px !important;
    height: auto !important;
    line-height: 1.25 !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

/* Campos de formulario estandarizados a 34px y 0.82rem */
.reportes-page .slds-select,
.reportes-page .slds-input {
    height: 34px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    background-color: #ffffff !important;
    color: #1d1d1f !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.reportes-page .slds-select:focus,
.reportes-page .slds-input:focus {
    border-color: #0071E3 !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18) !important;
    outline: none !important;
}

.reportes-page .slds-form-element__label {
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #86868b !important;
    margin-bottom: 4px !important;
}

/* Control Segmentado Tipo de Período en Kardex (Apple HIG - Sin sombras invasivas) */
.kardex-segmented-control {
    display: flex;
    background: #f2f2f7;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 2px;
    height: 34px;
    box-sizing: border-box;
    gap: 2px;
}

.kardex-segmented-control .btn-kardex-toggle {
    flex: 1;
    height: 28px !important;
    line-height: 28px !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    color: #48484a !important;
    font-size: 0.80rem !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: all 0.15s ease-in-out !important;
}

.kardex-segmented-control .btn-kardex-toggle:hover {
    color: #1d1d1f !important;
    background: rgba(0, 0, 0, 0.04) !important;
    box-shadow: none !important;
    transform: none !important;
}

.kardex-segmented-control .btn-kardex-toggle.is-active {
    background: #0071E3 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Previsualización del Kardex */
.kardex-box-preview {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    transition: box-shadow 0.2s ease;
}

.kardex-box-preview:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
}

/* Modales Horas Extra y Justificaciones */
#modalAutorizarHE .slds-modal__container,
#modalRechazarHE .slds-modal__container,
#modalJustificarIncidencia .slds-modal__container {
    background: #ffffff !important;
    border-radius: 18px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28), 0 2px 10px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
}

#modalAutorizarHE .slds-modal__header,
#modalRechazarHE .slds-modal__header,
#modalJustificarIncidencia .slds-modal__header {
    background: #ffffff !important;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07) !important;
    padding: 16px 20px !important;
}

#modalAutorizarHE .slds-modal__footer,
#modalRechazarHE .slds-modal__footer,
#modalJustificarIncidencia .slds-modal__footer {
    background: #ffffff !important;
    border-bottom-left-radius: 14px !important;
    border-bottom-right-radius: 14px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
    padding: 12px 20px !important;
}

/* ==========================================================================
   CENTRO DE REPORTES - OPTIMIZACIÓN RESPONSIVA Y ESTILOS APPLE HIG
   ========================================================================== */
body.reportes-page {
    background-color: #f5f5f7;
}

body.reportes-page .apple-card-body {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

body.reportes-page .apple-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

/* Acciones en Cabecera de Reportes (Apple Utility Action Pills) */
.reportes-page .apple-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.reportes-page .btn-reportes-action {
    height: 34px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 14px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.reportes-page .btn-reportes-excel {
    background: #ffffff !important;
    color: #107c41 !important;
    border: 1px solid rgba(16, 124, 65, 0.32) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.reportes-page .btn-reportes-excel:hover {
    background: rgba(16, 124, 65, 0.06) !important;
    border-color: #107c41 !important;
    color: #0b532c !important;
    box-shadow: 0 2px 6px rgba(16, 124, 65, 0.12) !important;
    transform: translateY(-0.5px);
}

.reportes-page .btn-reportes-excel:active {
    transform: scale(0.98);
}

.reportes-page .btn-reportes-excel svg {
    color: #107c41;
}

.reportes-page .btn-reportes-print {
    background: #ffffff !important;
    color: #0071E3 !important;
    border: 1px solid rgba(0, 113, 227, 0.32) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    text-decoration: none !important;
}

.reportes-page .btn-reportes-print:hover {
    background: rgba(0, 113, 227, 0.06) !important;
    border-color: #0071E3 !important;
    color: #0051a8 !important;
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.12) !important;
    transform: translateY(-0.5px);
}

.reportes-page .btn-reportes-print:active {
    transform: scale(0.98);
}

/* Barra de Filtros Estandarizada */
.reportes-page .reportes-filter-bar {
    background: #fafafc !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.reportes-page .reportes-filter-bar .slds-form-element__label {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #86868b !important;
    margin-bottom: 4px !important;
    display: block !important;
}

.reportes-page .reportes-filter-bar .slds-select,
.reportes-page .reportes-filter-bar .slds-input {
    height: 34px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    background-color: #ffffff !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.reportes-page .reportes-filter-bar .slds-select:focus,
.reportes-page .reportes-filter-bar .slds-input:focus {
    border-color: #0071E3 !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15) !important;
}

.reportes-page .reportes-rango-aplicado {
    font-size: 0.78rem;
    color: #86868b;
    margin-top: 6px;
}

.reportes-page .reportes-rango-aplicado strong {
    color: #1d1d1f;
}

/* Tablas de Datos en Reportes (Tipografía Tabular y Jerarquía Visual) */
.reportes-page .apple-vacaciones-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
}

.reportes-page .apple-vacaciones-table th {
    background: #fbfbfd !important;
    color: #86868b !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    white-space: nowrap !important;
}

.reportes-page .apple-vacaciones-table td {
    padding: 11px 14px !important;
    font-size: 0.84rem !important;
    color: #1d1d1f !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    vertical-align: middle !important;
    font-variant-numeric: tabular-nums !important;
}

.reportes-page .apple-vacaciones-table tbody tr {
    transition: background-color 0.12s ease !important;
}

.reportes-page .apple-vacaciones-table tbody tr:hover td {
    background-color: rgba(0, 0, 0, 0.015) !important;
}

/* ==========================================================================
   COLUMNAS FIJAS (STICKY) EN REPORTES: EXCLUSIVO PARA DESKTOP / TABLET (>= 768px)
   En móviles (<= 767px), las columnas NO son fijas para garantizar que la pantalla
   no quede bloqueada por columnas de 230px-380px, permitiendo desplazamiento táctil 100% fluido (Apple HIG)
   ========================================================================== */
@media (min-width: 768px) {
    /* Columna 'Colaborador' fija (sticky) a la izquierda en tablas de reportes (Apple HIG) */
    .reportes-page .apple-table-wrap table th:first-child:not([colspan]),
    .reportes-page .apple-table-wrap table td:first-child:not([colspan]),
    .reportes-page .apple-vacaciones-table th:first-child:not([colspan]),
    .reportes-page .apple-vacaciones-table td:first-child:not([colspan]) {
        position: sticky !important;
        left: 0 !important;
        z-index: 10 !important;
        background: #ffffff !important;
        box-shadow: 3px 0 8px rgba(0, 0, 0, 0.05) !important;
        border-right: 1px solid rgba(0, 0, 0, 0.06) !important;
        min-width: 210px !important;
        max-width: 250px !important;
        width: 230px !important;
    }

    .reportes-page .apple-table-wrap table th:first-child:not([colspan]),
    .reportes-page .apple-vacaciones-table th:first-child:not([colspan]) {
        background: #fbfbfd !important;
        z-index: 12 !important;
    }

    .reportes-page .apple-table-wrap table tbody tr:hover td:first-child:not([colspan]),
    .reportes-page .apple-vacaciones-table tbody tr:hover td:first-child:not([colspan]) {
        background: #f5f5f7 !important;
    }

    /* Manejo seguro de filas con colspan (estados vacíos) */
    .reportes-page .apple-table-wrap table td[colspan],
    .reportes-page .apple-vacaciones-table td[colspan] {
        position: static !important;
        max-width: none !important;
        width: auto !important;
        box-shadow: none !important;
        border-right: none !important;
    }

    /* Exclusión estricta de Kardex Individual / Tira de Firmas (Conservar formato original para impresión y PDF móvil) */
    .reportes-page .kardex-box-preview .apple-table-wrap table th:first-child,
    .reportes-page .kardex-box-preview .apple-table-wrap table td:first-child,
    .reportes-page .kardex-cards-container .apple-table-wrap table th:first-child,
    .reportes-page .kardex-cards-container .apple-table-wrap table td:first-child {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
        background: inherit !important;
        box-shadow: none !important;
        border-right: none !important;
        min-width: 90px !important;
        max-width: none !important;
        width: auto !important;
    }

    .reportes-page .kardex-box-preview .apple-table-wrap table th:first-child,
    .reportes-page .kardex-cards-container .apple-table-wrap table th:first-child {
        background: #fbfbfd !important;
    }

    .reportes-page .kardex-box-preview .apple-table-wrap table tbody tr:hover td:first-child,
    .reportes-page .kardex-cards-container .apple-table-wrap table tbody tr:hover td:first-child {
        background: inherit !important;
    }

    /* 1. HORAS EXTRA: Columna 1 = Fecha (110px), Columna 2 = Colaborador (left: 110px) */
    .reportes-page .apple-table-horas-extra th:nth-child(1):not([colspan]),
    .reportes-page .apple-table-horas-extra td:nth-child(1):not([colspan]) {
        position: sticky !important;
        left: 0 !important;
        z-index: 10 !important;
        background: #ffffff !important;
        min-width: 110px !important;
        max-width: 110px !important;
        width: 110px !important;
        border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
        box-shadow: none !important;
    }

    .reportes-page .apple-table-horas-extra th:nth-child(1):not([colspan]) {
        background: #fbfbfd !important;
        z-index: 12 !important;
    }

    .reportes-page .apple-table-horas-extra th:nth-child(2):not([colspan]),
    .reportes-page .apple-table-horas-extra td:nth-child(2):not([colspan]) {
        position: sticky !important;
        left: 110px !important;
        z-index: 10 !important;
        background: #ffffff !important;
        min-width: 210px !important;
        max-width: 250px !important;
        width: 230px !important;
        border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 3px 0 8px rgba(0, 0, 0, 0.05) !important;
    }

    .reportes-page .apple-table-horas-extra th:nth-child(2):not([colspan]) {
        background: #fbfbfd !important;
        z-index: 12 !important;
    }

    .reportes-page .apple-table-horas-extra tbody tr:hover td:nth-child(1):not([colspan]),
    .reportes-page .apple-table-horas-extra tbody tr:hover td:nth-child(2):not([colspan]) {
        background: #f5f5f7 !important;
    }

    /* 2. AUDITORÍA GPS: Columna 1 = Fecha y Hora (150px), Columna 2 = Colaborador (left: 150px) */
    .reportes-page .apple-table-gps th:nth-child(1):not([colspan]),
    .reportes-page .apple-table-gps td:nth-child(1):not([colspan]) {
        position: sticky !important;
        left: 0 !important;
        z-index: 10 !important;
        background: #ffffff !important;
        min-width: 150px !important;
        max-width: 150px !important;
        width: 150px !important;
        border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
        box-shadow: none !important;
    }

    .reportes-page .apple-table-gps th:nth-child(1):not([colspan]) {
        background: #fbfbfd !important;
        z-index: 12 !important;
    }

    .reportes-page .apple-table-gps th:nth-child(2):not([colspan]),
    .reportes-page .apple-table-gps td:nth-child(2):not([colspan]) {
        position: sticky !important;
        left: 150px !important;
        z-index: 10 !important;
        background: #ffffff !important;
        min-width: 210px !important;
        max-width: 250px !important;
        width: 230px !important;
        border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 3px 0 8px rgba(0, 0, 0, 0.05) !important;
    }

    .reportes-page .apple-table-gps th:nth-child(2):not([colspan]) {
        background: #fbfbfd !important;
        z-index: 12 !important;
    }

    .reportes-page .apple-table-gps tbody tr:hover td:nth-child(1):not([colspan]),
    .reportes-page .apple-table-gps tbody tr:hover td:nth-child(2):not([colspan]) {
        background: #f5f5f7 !important;
    }
}

/* En móviles (<= 767px): liberación total de columnas fijas para scroll horizontal natural */
@media (max-width: 767px) {
    .reportes-page .apple-table-wrap table th,
    .reportes-page .apple-table-wrap table td,
    .reportes-page .apple-vacaciones-table th,
    .reportes-page .apple-vacaciones-table td {
        position: static !important;
        left: auto !important;
        box-shadow: none !important;
    }

    .reportes-page .apple-table-wrap {
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: contain !important;
    }
}

.reportes-page .rfc-cell {
    font-family: -apple-system-ui-monospaced, "SF Mono", Menlo, monospace !important;
    font-size: 0.80rem !important;
    color: #48484a !important;
    letter-spacing: -0.01em !important;
}

.reportes-page .td-percepcion-total {
    font-weight: 700 !important;
    color: #1d1d1f !important;
    font-size: 0.92rem !important;
    font-variant-numeric: tabular-nums !important;
}


/* Previsualización del Kardex Individual */
.kardex-cards-container {
    padding: 16px 20px;
}

.kardex-box-preview {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    margin-bottom: 24px;
    transition: box-shadow 0.2s ease;
}

.kardex-box-preview:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
}

.kardex-box-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #1d1d1f;
    padding-bottom: 12px;
    margin-bottom: 14px;
    gap: 16px;
}

.kardex-colab-details {
    flex: 1;
    min-width: 0;
}

.kardex-colab-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.kardex-colab-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
    line-height: 1.25;
}

.kardex-colab-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 113, 227, 0.08);
    color: #0071E3;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}

.kardex-colab-meta {
    font-size: 0.80rem;
    color: #86868b;
    margin: 4px 0 0;
    line-height: 1.45;
    word-break: break-word;
}

.kardex-colab-meta strong {
    color: #48484a;
}

.kardex-colab-meta .meta-dot {
    margin: 0 4px;
    color: #c7c7cc;
}

.kardex-periodo-pill {
    text-align: right;
    flex-shrink: 0;
    background: #fafafc;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    padding: 6px 12px;
}

.kardex-periodo-label {
    font-size: 0.70rem;
    text-transform: uppercase;
    color: #86868b;
    font-weight: 600;
    letter-spacing: 0.04em;
    display: block;
}

.kardex-periodo-val {
    font-size: 0.90rem;
    font-weight: 700;
    color: #0071E3;
    display: block;
    margin-top: 1px;
    white-space: nowrap;
}

.kardex-box-footer {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    background: #fafafc;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    gap: 16px;
}

.kardex-totales-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.kardex-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.78rem;
    color: #48484a;
}

.kardex-chip__lbl {
    color: #86868b;
}

.kardex-chip__val {
    font-weight: 700;
    color: #1d1d1f;
}

.kardex-chip_asistencias .kardex-chip__val {
    color: #34C759;
}

.kardex-chip_faltas {
    border-color: rgba(215, 0, 21, 0.2);
    background: #fdf2f2;
}

.kardex-chip_faltas .kardex-chip__val {
    color: #d70015;
}

.kardex-chip_retardos {
    border-color: rgba(217, 119, 6, 0.2);
    background: #fffbeb;
}

.kardex-chip_retardos .kardex-chip__val {
    color: #d97706;
}

.kardex-chip_he .kardex-chip__val {
    color: #0071E3;
}

.kardex-firma-box {
    text-align: center;
    min-width: 240px;
    max-width: 320px;
    flex-shrink: 0;
}

.kardex-firma-linea {
    border-top: 1.5px solid #1d1d1f;
    padding-top: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1d1d1f;
}

.kardex-firma-disclaimer {
    font-size: 0.68rem;
    color: #86868b;
    margin-top: 4px;
    line-height: 1.25;
}

.reportes-btn-aplicar-col {
    display: flex;
    align-items: flex-end;
}

.reportes-btn-aplicar {
    height: 34px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 0 18px !important;
    background: #0071E3 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease, transform 0.1s ease !important;
}

.reportes-btn-aplicar:hover {
    background: #0077ED !important;
}

.reportes-btn-aplicar:active {
    transform: scale(0.97) !important;
}

/* Responsividad exclusiva para pantallas móviles (<= 767px) */
@media (max-width: 767px) {
    .reportes-page .custom-body-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .reportes-page .slds-p-horizontal_medium {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .reportes-page .apple-segmented-wrap {
        margin-bottom: 12px !important;
    }

    .reportes-page .dashboard-segmented-scroll {
        -webkit-overflow-scrolling: touch !important;
        padding: 2px 2px 6px 2px !important;
    }

    .reportes-page .apple-segment-btn {
        padding: 6px 12px !important;
        font-size: 0.78rem !important;
        white-space: nowrap !important;
    }

    .reportes-page .apple-card {
        border-radius: 14px !important;
    }

    .reportes-page .apple-card-header.apple-header-with-action {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        padding: 14px 16px 12px 16px !important;
    }

    .reportes-page .apple-card-title-group {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        gap: 10px !important;
    }

    .reportes-page .apple-card-title {
        font-size: 1.10rem !important;
        line-height: 1.25 !important;
    }

    .reportes-page .apple-card-subtitle {
        font-size: 0.76rem !important;
        line-height: 1.35 !important;
    }

    .reportes-page .apple-header-actions {
        width: auto !important;
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    .reportes-page .apple-header-actions form {
        flex: none !important;
        width: auto !important;
        margin: 0 !important;
    }

    .reportes-page .apple-header-actions button,
    .reportes-page .apple-header-actions a {
        width: auto !important;
        min-width: 0 !important;
        height: 32px !important;
        min-height: 32px !important;
        padding: 0 12px !important;
        font-size: 0.78rem !important;
        font-weight: 600 !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
        line-height: 32px !important;
        border-radius: 8px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .reportes-btn-aplicar-col {
        width: 100% !important;
        margin-top: 6px !important;
    }

    .reportes-btn-aplicar {
        width: 100% !important;
        height: 34px !important;
        min-height: 34px !important;
        line-height: 34px !important;
        padding: 0 16px !important;
        font-size: 0.82rem !important;
        border-radius: 8px !important;
    }

    .reportes-page .apple-card-body.reportes-filter-bar {
        padding: 12px 12px 6px 12px !important;
    }



    /* Kardex Móvil */
    .kardex-cards-container {
        padding: 10px 8px;
    }

    .kardex-box-preview {
        padding: 12px 10px;
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .kardex-box-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .kardex-periodo-pill {
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 10px;
    }

    .kardex-box-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 14px;
    }

    .kardex-totales-chips {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        width: 100%;
    }

    .kardex-chip {
        justify-content: space-between;
        padding: 6px 10px;
        font-size: 0.74rem;
    }

    .kardex-firma-box {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        margin-top: 6px;
        padding-top: 6px;
    }

    /* Liberar columna fija (sticky) en móvil para tablas de reportes (Pre-Nómina, GPS, Horas Extra, Saldos) */
    .reportes-page .apple-table-wrap table th:first-child:not([colspan]),
    .reportes-page .apple-table-wrap table td:first-child:not([colspan]),
    .reportes-page .apple-vacaciones-table th:first-child:not([colspan]),
    .reportes-page .apple-vacaciones-table td:first-child:not([colspan]) {
        position: static !important;
        left: auto !important;
        box-shadow: none !important;
        border-right: 1px solid rgba(0, 0, 0, 0.06) !important;
        min-width: 140px !important;
        max-width: none !important;
        width: auto !important;
        z-index: auto !important;
    }

    .reportes-page .apple-table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: contain !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .reportes-page .apple-table-wrap table {
        min-width: 680px !important;
    }

    /* Historial de asistencia en móvil */
    .apple-historial-table {
        min-width: 520px !important;
        width: 100% !important;
    }
    .apple-historial-table th,
    .apple-historial-table td {
        padding: 10px 10px !important;
        font-size: 0.80rem !important;
    }
}

@media (max-width: 480px) {
    .kardex-totales-chips {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   MODAL USUARIOS ASIGNADOS (EMPRESA.PHP) - TABLA Y TARJETAS MÓVILES APPLE HIG
   ========================================================================== */
.empresa-usuarios-modal-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.empresa-usuarios-modal-table thead th {
    background-color: #fafafc !important;
    color: #86868b !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.empresa-usuarios-modal-table tbody tr {
    transition: background-color 0.15s ease !important;
}

.empresa-usuarios-modal-table tbody tr:hover {
    background-color: rgba(0, 113, 227, 0.03) !important;
}

.empresa-usuarios-modal-table tbody th,
.empresa-usuarios-modal-table tbody td {
    padding: 11px 14px !important;
    font-size: 0.85rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    vertical-align: middle !important;
}

.empresa-modal-user-link {
    color: #1d1d1f !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

.empresa-modal-user-link:hover {
    color: #0071E3 !important;
    text-decoration: underline !important;
}

/* Transformación responsiva a tarjetas limpias estilo Apple en Móviles (<= 767px) */
@media (max-width: 767px) {
    .empresa-usuarios-modal-table thead {
        display: none !important;
    }

    .empresa-usuarios-modal-table,
    .empresa-usuarios-modal-table tbody {
        display: block !important;
        width: 100% !important;
    }

    .empresa-usuarios-modal-table tr:not(.tr-empty-state) {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background: #ffffff !important;
        border: 1px solid rgba(0, 0, 0, 0.09) !important;
        border-radius: 12px !important;
        margin-bottom: 10px !important;
        padding: 12px 14px !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    }

    .empresa-usuarios-modal-table th[scope="row"] {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 0 8px 0 !important;
        margin-bottom: 8px !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
        text-align: left !important;
    }

    .empresa-usuarios-modal-table th[scope="row"] .empresa-modal-user-link {
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        color: #0071E3 !important;
        display: block !important;
    }

    .empresa-usuarios-modal-table td[data-label] {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 4px 0 !important;
        border: none !important;
        font-size: 0.82rem !important;
    }

    .empresa-usuarios-modal-table td[data-label]::before {
        content: attr(data-label);
        color: #86868b !important;
        font-weight: 500 !important;
        font-size: 0.78rem !important;
        flex-shrink: 0 !important;
        margin-right: 12px !important;
    }

    .empresa-usuarios-modal-table td[data-label] .slds-truncate {
        color: #1d1d1f !important;
        font-weight: 500 !important;
        text-align: right !important;
        white-space: normal !important;
        word-break: break-word !important;
    }
}

/* ==========================================================================
   Notificaciones Toast (Espaciado Robusto en Móvil y Desktop)
   ========================================================================== */
.slds-notify_container,
.custom-notificacion {
    position: fixed !important;
    top: 14px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    max-width: calc(100vw - 32px) !important;
    z-index: 100000 !important;
    pointer-events: none !important;
}

.slds-notify_toast,
.slds-notify--toast {
    pointer-events: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 280px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 42px 10px 16px !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.slds-notify_toast .slds-icon_container,
.slds-notify--toast .slds-icon_container {
    margin-right: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.slds-notify_toast .slds-icon_small,
.slds-notify--toast .slds-icon_small {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
}

.slds-notify_toast .slds-notify__content,
.slds-notify--toast .slds-notify__content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.slds-notify_toast .slds-text-heading_small,
.slds-notify--toast .slds-text-heading_small {
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    word-break: break-word !important;
}

.slds-notify_toast .slds-notify__close,
.slds-notify--toast .slds-notify__close {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 10px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@media (max-width: 767px) {
    .slds-notify_container,
    .custom-notificacion {
        top: 10px !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
    }

    .slds-notify_toast,
    .slds-notify--toast {
        width: 100% !important;
        min-width: 0 !important;
        padding: 10px 38px 10px 12px !important;
        gap: 12px !important;
    }

    .slds-notify_toast .slds-icon_container,
    .slds-notify--toast .slds-icon_container {
        margin-right: 12px !important;
        flex-shrink: 0 !important;
    }

    .slds-notify_toast .slds-text-heading_small,
    .slds-notify--toast .slds-text-heading_small {
        font-size: 0.82rem !important;
        line-height: 1.3 !important;
    }
}/* ==========================================================================
   GLOBAL MOBILE SAFE AREAS & VIEWPORT OVERFLOW PROTECTION (APPLE HIG)
   ========================================================================== */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

@media (max-width: 767px) {
    .custom-body-container,
    main {
        padding-bottom: calc(28px + env(safe-area-inset-bottom, 20px)) !important;
    }
}

/* ==========================================================================
   PREVENCIÓN DE AUTO-ZOOM EN DISPOSITIVOS MÓVILES (iOS SAFARI HIG)
   iOS Safari fuerza un zoom de pantalla no deseado al enfocar cualquier campo
   de texto si su tamaño de fuente computado es menor a 16px.
   Garantizamos font-size: 16px en pantallas móviles y táctiles para todos
   los inputs, selects y textareas del sistema.
   ========================================================================== */
@media screen and (max-width: 768px), (pointer: coarse) and (max-width: 1024px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="range"]):not([type="color"]):not([type="file"]),
    select,
    textarea,
    .slds-input,
    .slds-select,
    .slds-textarea,
    .input,
    input.input,
    select.input,
    .custom-input-form,
    .apple-modal-date-input,
    .apple-filter-input,
    .apple-search-input,
    .apple-select-control,
    .dashboard-toolbar-search input,
    .reportes-page .slds-input,
    .reportes-page .reportes-filter-bar .slds-input,
    .slds-combobox__input {
        font-size: 16px !important;
    }
}

/* ==========================================================================
   RECONOCIMIENTO FACIAL - FOTO OFICIAL Y CÁMARA (APPLE HIG CRAFT)
   ========================================================================== */
.kw-avatar-outer-wrapper {
    position: relative !important;
    display: inline-block !important;
    line-height: 0 !important;
    overflow: visible !important;
    cursor: pointer;
    border-radius: 50% !important;
    vertical-align: middle;
}

.kw-avatar-wrapper {
    position: relative !important;
    display: inline-block !important;
    cursor: pointer;
    border-radius: 50% !important;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease !important;
}

.kw-avatar-outer-wrapper:hover .kw-avatar-wrapper {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28) !important;
}

.kw-avatar-badge {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff !important;
    color: #1d1d1f !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28) !important;
    cursor: pointer;
    transition: background 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 10;
    line-height: 1;
    box-sizing: border-box;
    padding: 0;
    outline: none;
}

.kw-avatar-badge svg {
    display: block !important;
    width: 14px !important;
    height: 14px !important;
    stroke: #1d1d1f !important;
    fill: none !important;
    stroke-width: 2.2 !important;
    transition: transform 0.18s ease !important;
}

.kw-avatar-outer-wrapper:hover .kw-avatar-badge,
.kw-avatar-badge:hover,
.kw-avatar-badge:focus-visible {
    background: #f5f5f7 !important;
    border-color: #ffffff !important;
    transform: scale(1.08) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32) !important;
}

.kw-avatar-badge:active {
    transform: scale(0.96) !important;
    background: #e5e5ea !important;
}

@media (max-width: 767px) {
    .kw-avatar-badge {
        width: 22px !important;
        height: 22px !important;
        bottom: 0px !important;
        right: 0px !important;
        border-width: 1.5px !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    }
    .kw-avatar-badge svg {
        width: 11px !important;
        height: 11px !important;
        stroke-width: 2.3 !important;
        stroke: #1d1d1f !important;
    }
}

/* ==========================================================================
   MODAL DE VERIFICACIÓN / ENROLAMIENTO FACIAL (APPLE HIG)
   ========================================================================== */
.kw-facial-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.kw-facial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.kw-facial-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    animation: kwModalEnter 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes kwModalEnter {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.kw-facial-header {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    margin-bottom: 20px;
}

.kw-facial-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(0, 113, 227, 0.1);
    color: #0071E3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kw-facial-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.kw-facial-subtitle {
    font-size: 0.8125rem;
    color: #86868b;
    margin: 4px 0 0 0;
    line-height: 1.35;
}

.kw-facial-close-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: #f5f5f7;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e6e73;
    cursor: pointer;
    transition: all 0.18s ease;
}

.kw-facial-close-btn:hover {
    background: #e8e8ed;
    color: #1d1d1f;
}

.kw-facial-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kw-facial-viewport {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    overflow: hidden;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.kw-facial-viewport video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.kw-facial-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid #0071E3;
    box-shadow: 0 0 18px rgba(0, 113, 227, 0.45);
    pointer-events: none;
    box-sizing: border-box;
}

.kw-facial-ring.is-scanning {
    animation: kwPulseRing 2s infinite ease-in-out;
}

@keyframes kwPulseRing {
    0%, 100% {
        box-shadow: 0 0 12px rgba(0, 113, 227, 0.4);
        border-color: #0071E3;
    }
    50% {
        box-shadow: 0 0 28px rgba(0, 113, 227, 0.85);
        border-color: #409CFF;
    }
}

.kw-facial-ring.is-success {
    border-color: #34C759 !important;
    box-shadow: 0 0 24px rgba(52, 199, 89, 0.6) !important;
}

.kw-facial-ring.is-error {
    border-color: #FF3B30 !important;
    box-shadow: 0 0 24px rgba(255, 59, 48, 0.6) !important;
}

.kw-facial-live-status {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    z-index: 3;
    pointer-events: none;
}

.kw-facial-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34C759;
    box-shadow: 0 0 6px #34C759;
}

.kw-facial-hint {
    margin-top: 14px;
    font-size: 0.8125rem;
    color: #6e6e73;
    text-align: center;
    line-height: 1.4;
    padding: 0 8px;
}

.kw-facial-footer {
    width: 100%;
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.kw-facial-footer .apple-btn-dock {
    flex: 1;
    justify-content: center;
    height: 44px;
}

/* ==========================================================================
   Encabezados de Sección en Formularios (Alineación con campos del formulario)
   ========================================================================== */
.kw-form-section-header {
    padding: 1.25rem 0 0.35rem 0;
    margin: 0;
}

.kw-form-section-header.has-divider {
    margin: 1.5rem 0 0.35rem 0;
    padding: 1.25rem 0 0.35rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.kw-form-section-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6e6e73;
    margin: 0;
    padding: 0;
}








