/* Reset básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

:root {
    /* Ancho máximo de contenido centrado */
    --content-max: 980px;
    /* 920–1100px suele ir bien */
}



/* Estilos generales */
body {
    background-color: #1E305C;
    color: #333;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header con logo centrado y hamburguesa a la izquierda */
header {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    text-align: center;
    padding: 10px 0;
    background-color: #1E305C;
    z-index: 1000;
}

header img {
    max-width: 200px;
    height: auto;
}

#hamburgerBtn {
    position: absolute;
    left: 10px;
    top: 10px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: #1E305C;
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform .15s ease, background .15s ease;
    z-index: 1000;
}

/* En desktop, muévelo para que “caiga” sobre el borde izquierdo del contenido centrado */
@media (min-width: 992px) {
    #hamburgerBtn {
        left: calc((100vw - var(--content-max)) / 2 + 12px);
        /*             margen izquierdo del contenedor  padding interno */
    }
}

#hamburgerBtn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.03);
}

#hamburgerBtn i {
    font-size: 1.4rem;
    line-height: 1;
}

/* === SIDE MENU DEFINITIVO (174 fixed) === */
:root {
    --content-max: 980px;
    /* ancho base del contenido centrado */
}

/* Estado base: cerrado */
#sideMenu {
    position: fixed;
    top: 0;
    left: 0;
    /* móvil: sale desde el borde */
    width: 280px;
    height: 100vh;
    background: #102243;
    color: #fff;
    z-index: 1200;
    padding: 14px 12px;
    box-shadow: 2px 0 18px rgba(0, 0, 0, .4);

    /* cierre/apertura con transform (independiente del left) */
    transform: translateX(-100%);
    /* CERRADO SIEMPRE */
    transition: transform .25s ease-in-out;
}


/* ABIERTO: solo cambiamos el transform */
#sideMenuBackdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 1100;
    display: none;
}

#sideMenuBackdrop.show {
    display: block;
}


/* Estado ABIERTO del off-canvas */
#sideMenu.open {
    transform: translateX(0);
}


@media (min-width: 992px) {
    :root {
        --gutter: calc((100vw - var(--content-max)) / 2);
    }

    #sideMenu {
        left: var(--gutter);
        /* lo alineas al borde del contenido */
        transform: translateX(calc(-100% - var(--gutter)));
        /* lo escondes del todo */
    }

    /* abierto en desktop = sin desplazamiento */
    #sideMenu.open {
        transform: translateX(0);
    }
}

#sideMenu[aria-hidden="true"] {
    transform: translateX(-100%);
}

@media (min-width: 992px) {
    #sideMenu[aria-hidden="true"] {
        transform: translateX(calc(-100% - var(--gutter)));
    }
}

.sideMenu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 10px;
}

.sideMenu-header span {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: .3px;
}

#closeMenuBtn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 8px;
    padding: 6px;
}

#closeMenuBtn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.sideMenu-list {
    list-style: none;
    margin-top: 8px;
}

.sideMenu-item {
    width: 100%;
    text-align: left;
    background: #1B3464;
    border: none;
    color: #fff;
    padding: 12px 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .15s ease, transform .1s ease;
}

.sideMenu-item i {
    font-size: 1.1rem;
}

.sideMenu-item:hover {
    background: #254279;
    transform: translateX(2px);
}

/* Estado deshabilitado para items del menú lateral */
.sideMenu-item.is-disabled,
.sideMenu-item:disabled {
    background: #3a4a73 !important;
    /* más apagado que #1B3464 */
    color: #cbd5e1 !important;
    /* texto gris-azulado */
    cursor: not-allowed !important;
    pointer-events: none !important;
    /* no recibe clic */
    transform: none !important;
    /* sin efecto hover */
    opacity: 0.7;
}

.sideMenu-item.is-disabled i,
.sideMenu-item:disabled i {
    opacity: 0.85;
}


/* Contenido principal */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 8px 16px 12px;
}

main .container {
    background-color: #fff;
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 80px;
    /* espacio base para toast */
    width: 100%;
    max-width: 500px;
    margin-top: 0;
}

h1,
h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #004a99;
}

/* Input de código */
#code-container {
    margin-bottom: 24px;
}

#codeInput {
    width: 80%;
    max-width: 300px;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid #004a99;
    border-radius: 10px;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-align: center;
}

#codeInput::placeholder {
    text-transform: none;
}

#code-container button {
    padding: 12px 25px;
    font-size: 1.1rem;
    background-color: #004a99;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

#code-container button:hover {
    background-color: #0066cc;
}

/* Selected shift info */
#selected-shift-info {
    font-size: 1rem;
    color: #333;
    margin-top: 6px;
}

#selected-shift-info>.mb-3 {
    margin-bottom: 8px !important;
}

#shiftDatetime {
    color: #004a99;
    font-weight: bold;
}

/* Acciones */
#action-container {
    margin-top: 6px;
    margin-bottom: 6px;
}

#action-container button {
    width: 100%;
    padding: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    margin: 14px 0;
}

#action-container button:hover {
    opacity: 0.9;
}

@media (max-height: 660px) {
    #action-container button {
        font-size: 1.3rem;
        padding: 16px;
    }
}

/* Colores de botones */
.btn-checkin {
    background-color: #28a745;
    color: #fff;
    border-radius: 12px;
    opacity: 0.9;
}

.btn-checkout {
    background-color: #dc3545;
    color: #fff;
    border-radius: 12px;
    opacity: 0.9;

}

.btn-report-checkout {
   /* background: linear-gradient(90deg, #2563eb, #16a34a); */
    background:#dc3545;
    color: #fff;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    opacity: 0.96;
}


.btn-break {
    background-color: #ffc107;
    color: #000 !important;
    border-radius: 12px;
    padding: 14px;
    font-size: 1.3rem;
    opacity: 0.9;
}

.btn-break i {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

@media (max-height: 660px) {
    .btn-break {
        font-size: 1.1rem;
        padding: 12px;
    }
}

/* Timers */
#timers {
    margin-top: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

@media (max-height: 660px) {
    #timers {
        font-size: 16px;
        padding: 8px 24px;
    }
}

#break-timer {
    color: #dc3545;
}

#shift-timer {
    color: #000;
}

/* Modal cámara */
#camera-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    /* el JS lo pone en display:flex cuando lo crea */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#camera-modal video,
#camera-modal img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 0 10px #000;
    background-color: black;
    margin-bottom: 20px;
    object-fit: cover;
    touch-action: none;
}

video::-webkit-media-controls,
video::-webkit-media-controls-overlay-enclosure {
    display: none !important;
    -webkit-appearance: none !important;
}

#camera-modal button {
    margin: 6px;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease-in-out;
}

#camera-modal button:hover {
    background-color: #e0e0e0;
}

#camera-modal .btn-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    max-width: 500px;
    margin-top: 16px;
}

#camera-modal .btn-row .btn {
    flex: 0 1 auto;
    white-space: nowrap;
    padding: 10px 16px;
    line-height: 1.2;
    border-radius: 10px;
    min-width: 120px;
    font-size: clamp(13px, 2.6vw, 16px);
}

#camera-modal .btn-row .btn i,
#camera-modal .btn-row .btn .icon {
    display: inline-block;
    margin-right: 8px;
    vertical-align: -1px;
    font-size: 1em;
}

@media (max-width: 420px) {
    #camera-modal .btn-row {
        gap: 10px;
    }

    #camera-modal .btn-row .btn {
        min-width: 108px;
        padding: 9px 14px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    #camera-modal .btn-row {
        gap: 8px;
    }

    #camera-modal .btn-row .btn {
        min-width: 100px;
        padding: 8px 12px;
        font-size: 12.5px;
    }
}

@media (max-width: 340px) {
    #camera-modal .btn-row {
        gap: 6px;
    }

    #camera-modal .btn-row .btn {
        min-width: 90px;
        padding: 7px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #camera-modal button {
        font-size: 18px;
        padding: 12px 24px;
    }
}

/* Toast / showMessage */
#responseMessage {
    margin-top: 12px;
    width: 100%;
}

#responseMessage .alert {
    margin: 0;
    border-radius: 8px;
    font-weight: lighter;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ===== CLOSE BUTTONS ===== */
/* Look común para TODOS los botones de cierre */
.close-btn {
    color: #1E305C;
    /* color por defecto */
}

.close-btn:hover {
    background: rgba(30, 48, 92, 0.08);
}

.close-btn:focus-visible {
    outline: 2px solid #9ec5fe;
    outline-offset: 2px;
}

/* mantener el “empuje” visual del header-close también al hacer click */
.close-btn:active {
    transform: translate(10px, -10px) scale(0.98);
}

/* Modificador: rojo (úsalo donde quieras) */
.close-btn.is-red {
    color: #dc2626;
}

.close-btn.is-red:hover {
    background: rgba(220, 38, 38, 0.08);
}

.close-btn.is-red:focus-visible {
    outline: 2px solid #fecaca;
    outline-offset: 2px;
}


/* ===== Scheduler header con botón Close (X círculo) ===== */
.scheduler-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid #e7eef8;

    display: flex;
    align-items: center;
    justify-content: center;
    /* título realmente centrado */
    margin-bottom: 10px;

    /* deja sitio a la derecha para el botón flotado */
    padding: 10px 72px 6px 10px;
    /* mayor padding-right */
    overflow: visible;
    /* por si el botón se desplaza hacia afuera */
}

.scheduler-title {
    margin: 0;
    color: #004a99;
    line-height: 1.2;
    /* evita saltos verticales entre iOS */
}

/* Botón X: más arriba y más a la derecha, con buen área táctil */
.header-close {
    position: absolute;
    right: 0;
    /* ancla a borde derecho interno */
    top: 0;
    /* ancla a borde superior interno */
    width: 44px;
    /* área táctil recomendada */
    height: 44px;
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    color: #1E305C;
    border-radius: 12px;
    cursor: pointer;

    /* empuja visualmente aún más arriba/derecha sin perder el área táctil */
    transform: translate(10px, -10px);
    line-height: 0;
    /* fix Safari/iPhone 8: evita que “baje” por baseline */
}

.header-close i {
    font-size: 1.45rem;
    display: block;
    /* junto con line-height:0, fija el alto del ícono */
}

.header-close:hover {
    background: rgba(30, 48, 92, 0.08);
}

.header-close:active {
    transform: translate(10px, -10px) scale(0.98);
}

.header-close:focus-visible {
    outline: 2px solid #9ec5fe;
    outline-offset: 2px;
}



.scheduler-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.scheduler-card {
    text-align: left;
    border: 2px solid #e7eef8;
    border-radius: 14px;
    padding: 12px 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform .08s ease, box-shadow .2s ease;
}

.scheduler-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.scheduler-card .row1 {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
    color: #1E305C;
    font-weight: 600;
}

.scheduler-card .row2 {
    color: #004a99;
    font-weight: 600;
    margin-bottom: 2px;
}

.scheduler-card .row3 {
    color: #2b2b2b;
    opacity: .9;
}

.scheduler-empty {
    padding: 16px;
    color: #666;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 10px;
    margin-top: 12px;
}

/* ===== CONTACT MODAL ===== */

/* ===== CONTACT MODAL (FULL, reemplaza tu bloque del modal) ===== */
#contact-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: none;
    /* se muestra con .show */
    align-items: center;
    justify-content: center;
}

#contact-modal.show {
    display: flex;
}

#contact-modal .cm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

#contact-modal .cm-dialog {
    position: relative;
    width: min(92vw, 480px);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.25);
    padding: 14px 16px;
    z-index: 1;
    text-align: left;
}

/* Header centrado con espacio reservado para el botón (derecha) */
#contact-modal .cm-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-right: 72px;
    /* más espacio para el botón */
    overflow: visible;
    /* por si el botón se “sale” un poquito */
    /* espacio para el botón X */
}

#contact-modal .cm-header h4 {
    margin: 0;
    color: #004a99;
    font-weight: 700;
}

/* Botón Close del modal: X en círculo rojo */
#contact-modal .modal-close {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 44px;
    height: 44px;
    /* área táctil óptima */
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    border-radius: 12px;
    line-height: 0;
    /* evita “bajar” del ícono en iOS */
    transform: translate(12px, -12px);
    /* lo empuja visualmente hacia afuera (↑ y →) */
    z-index: 2;
}

#contact-modal .modal-close i {
    font-size: 1.4rem;
    display: block;
}

/* Color y estados (usa tus clases .close-btn + .is-red) */
#contact-modal .modal-close.close-btn.is-red {
    color: #dc2626;
}

#contact-modal .modal-close.close-btn.is-red:hover {
    background: rgba(220, 38, 38, 0.08);
}

#contact-modal .modal-close.close-btn.is-red:focus-visible {
    outline: 2px solid #fecaca;
    outline-offset: 2px;
}

/* Evita el “salto” de translate heredado */
#contact-modal .modal-close:active {
    transform: translate(12px, -12px) scale(0.98);
}

/* Cuerpo del modal */
#contact-modal .cm-body p {
    margin: 0 0 10px 0;
    color: #24324B;
    line-height: 1.45;
}

/* soporte para inert (deshabilita puntero y foco) */
[inert] {
    pointer-events: none;
}

[inert] * {
    pointer-events: none !important;
}

/* ===== WHATSAPP LINK ===== */
.wa-link {
    color: #25D366;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wa-link:hover {
    text-decoration: underline;
}

.wa-link .bi-whatsapp {
    font-size: 1.1em;
    line-height: 1;
}

/* ===== NEXT PAYROLL ===== */
.payroll-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid #e7eef8;

    display: flex;
    align-items: center;
    justify-content: center;
    /* título centrado */
    margin-bottom: 10px;

    /* espacio para el botón X a la derecha */
    padding: 10px 72px 6px 10px;
    overflow: visible;
}

.payroll-title {
    margin: 0;
    color: #004a99;
    line-height: 1.2;
}

/* ===== NEXT PAYROLL: Shift Date + Time en 1 sola columna ===== */
.payroll-table td.payroll-dt {
  white-space: normal;     /* permite 2 líneas dentro de la celda */
  line-height: 1.15;
  min-width: 120px;        /* ajusta si quieres más/menos */
}

.payroll-table td.payroll-dt .dt-date {
  font-weight: 600;
  color: #2b2b2b;
}

.payroll-table td.payroll-dt .dt-time {
  margin-top: 2px;
  font-weight: 700;
  color: #1E305C;
}


.payroll-empty {
    padding: 16px;
    color: #666;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 10px;
    margin-top: 12px;
}

.payroll-table-wrap {
    position: relative;
    /* scrolling ancestor para sticky */
    margin-top: 8px;
    border: 2px solid #e7eef8;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    max-height: 65vh;
    overflow-y: auto;
    overflow-x: auto;
    /* barra horizontal si no cabe */
}

/* Tabla */
.payroll-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
    /* fuerza scroll horizontal si es necesario */
}

.payroll-table thead th {
    position: sticky;
    top: 0;
    background: #e9f1fb;
    color: #1E305C;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #d6e4f7;
    z-index: 3;
}

/* TH de Total: fijo arriba y pegado a la derecha */
.payroll-table thead th:last-child {
    position: sticky;
    top: 0;
    right: 0;
    z-index: 5;
    /* sobre las celdas del body */
    background: #e9f1fb;
    border-left: 1px solid #d6e4f7;
    min-width: 96px;
    /* ancho estable para $ */
}

.payroll-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #eef3fb;
    font-size: 0.95rem;
    background: #fff;
}

.payroll-table tbody tr:nth-child(even) td {
    background: #f8fbff;
}

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

/* Alineaciones y comportamiento de texto */
.payroll-table th,
.payroll-table td {
    white-space: nowrap;
    /* evita cortes en números/horas */
}

.payroll-table th.event,
.payroll-table td.event {
    white-space: normal;
    /* el Event puede ocupar dos líneas */
    max-width: 260px;
    /* limitar ancho del Event */
}

.payroll-table td.event {
  text-align: left;
  padding-left: 12px;   /* un pelín de aire visual */
}

.payroll-table th.num,
.payroll-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.payroll-table td.num.center {
    text-align: center;
}

/* Columna TOTAL siempre visible (pegada a la derecha) en el body */
.payroll-table tbody td:last-child {
    position: sticky;
    right: 0;
    z-index: 4;
    /* debajo del header */
    background: #fff;
    border-left: 1px solid #eef3fb;
}

.payroll-table tbody tr:nth-child(even) td:last-child {
    background: #f8fbff;
}



/* ===== LAST PAYROLL (cards como Scheduler) ===== */
.lp-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid #e7eef8;

    display: flex;
    align-items: center;
    justify-content: center;
    /* título centrado */
    margin-bottom: 10px;

    /* espacio para el botón X a la derecha */
    padding: 10px 72px 6px 10px;
    overflow: visible;
}

.lp-title {
    margin: 0;
    color: #004a99;
    line-height: 1.2;
}

.lp-empty {
    padding: 16px;
    color: #666;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 10px;
    margin-top: 12px;
}

/* contenedor de las cards (reutiliza .scheduler-list) */
#last-list {
    max-height: 65vh;
    overflow-y: auto;
}

/* Ajustes específicos para las filas internas de las tarjetas SOLO en Last Payroll */
#last-list .scheduler-card .row3 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    color: #1E305C;
    margin-top: 6px;
}

#last-list .scheduler-card .row3 i {
    margin-right: 4px;
}

#last-list .scheduler-card .row4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed #e7eef8;
    color: #1E305C;
}

#last-list .scheduler-card .row4 i {
    margin-right: 6px;
}

#last-list .scheduler-card .row4 strong {
    font-size: 1.05rem;
}

/* === Mini color-coding para Last Payroll === */
#last-list .scheduler-card .row3 .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .92rem;
}

#last-list .scheduler-card .row3 .chip i {
    margin-right: 2px;
}

/* Chips por tipo */
#last-list .chip--hrs {
    background: #eef3fb;
    color: #1E305C;
}

#last-list .chip--rate {
    background: #e7fff6;
    color: #0a7f66;
}

/* teal suave */
#last-list .chip--reimb {
    background: #e8f4ff;
    color: #0b6efb;
}

/* azul */
#last-list .chip--reimb-zero {
    background: #f3f4f6;
    color: #7a8699;
}

/* apagado */

/* Barra Total con acento a la izquierda */
#last-list .total-bar {
    border-top: 1px dashed #e7eef8;
    margin-top: 8px;
    padding-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid transparent;
    border-radius: 8px;
    padding-left: 10px;
}

/* Intensidades por monto total */
#last-list .total--hi {
    background: rgba(40, 167, 69, .08);
    color: #2e7d32;
    border-left-color: #2e7d32;
}

/* ≥ 200 */
#last-list .total--med {
    background: #fff7e6;
    color: #b26a00;
    border-left-color: #b26a00;
}

/* 100–199.99 */
#last-list .total--low {
    background: #f2f4f7;
    color: #334155;
    border-left-color: #94a3b8;
}

/* < 100 */



/* ===== Menú: badge rojo para "Reportes" ===== */
.badge-pill {
    margin-left: auto;
    /* empuja a la derecha */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc2626;
    /* rojo */
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px rgba(16, 34, 67, 0.4);
    /* halo sobre menú oscuro */
}


/* ===== REPORTS  ===== */
.reports-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid #e7eef8;

    display: flex;
    align-items: center;
    justify-content: center;
    /* título centrado */
    margin-bottom: 10px;

    /* espacio para el botón X a la derecha */
    padding: 10px 72px 6px 10px;
    overflow: visible;
}

.reports-title {
    margin: 0;
    color: #004a99;
    line-height: 1.2;
}


#backToMainFromReports {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.reports-empty {
    padding: 16px;
    color: #666;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 10px;
    margin-top: 12px;
}

#reports-list {
    max-height: 65vh;
    overflow-y: auto;
}

/* Chips (reutilizamos el estilo del Scheduler y añadimos tipos de Reporte) */
#reports-list .scheduler-card .row3 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    color: #1E305C;
    margin-top: 6px;
}

#reports-list .scheduler-card .row3 .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .92rem;
}

#reports-list .scheduler-card .row3 .chip i {
    margin-right: 2px;
}

/* Tipos de chips */
.chip--status {
    background: #fff4e5;
    color: #b26a00;
}

/* pending */
.chip--urgent {
    background: #fde2e2;
    color: #b91c1c;
}

/* overdue */
.chip--location {
    background: #eef3fb;
    color: #1E305C;
}

.chip--id {
    background: #f3f4f6;
    color: #475569;
}

/* Fila inferior con “Due/Created” */
#reports-list .scheduler-card .row4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed #e7eef8;
    color: #1E305C;
}

#reports-list .scheduler-card .row4 i {
    margin-right: 6px;
}

/* Estado deshabilitado del menú (por compatibilidad con el helper) */
.sideMenu-item.is-disabled,
.sideMenu-item:disabled {
    background: #3a4a73 !important;
    color: #cbd5e1 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: none !important;
    opacity: .7;
}

.sideMenu-item.is-disabled i,
.sideMenu-item:disabled i {
    opacity: .85;
}


/* ===== REPORT CAPTURE (Wizard) ===== */

.rc-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid #e7eef8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    /* <<< clave: permite 2 filas (título + subtítulo) */
    margin-bottom: 8px;
    padding: 10px 72px 6px 10px;
    /* 72px para no chocar con el botón X */
    overflow: visible;
     position: relative; /* NECESARIO para el botón close */
}

#rcCloseBtn {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.rc-title, #rcTitle {
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    padding-right: 40px; /* espacio para el close */
    padding-left: 12px;
    margin-top: 6px;
}

.rc-subtitle, #rcSubtitle {
    text-align: left;  
    padding-right: 48px;
    padding-left: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pequeño efecto elegante */
.rc-title + .rc-subtitle {
    margin-top: -2px;           /* más juntitos visualmente */
}

@media (max-width: 600px) {
    .rc-title, #rcTitle {
        font-size: 1.35rem;
    }
    .rc-subtitle, #rcSubtitle {
        font-size: 0.95rem;
    }
}



.rc-label.is-required .rc-req,
.rc-checklabel.is-required .rc-req {
    color: #dc3545;
    /* rojo Bootstrap-ish */
    margin-left: 4px;
    font-weight: 700;
}

.rc-steps {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    /* antes ~8px */
    padding: 0 4px;
    /* antes 6px */
    overflow-x: auto;
    /* si son muchas, que deslicen horizontal */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

@media (max-width: 480px) {
    .rc-steps {
        gap: 3px;
        margin-bottom: 4px;
        padding: 0 2px;
    }

    .rc-step {
        padding: 2px 7px;
        font-size: .78rem;
    }
}

.rc-step {
    padding: 3px 8px;
    /* antes 6px 10px */
    border-radius: 999px;
    font-weight: 600;
    font-size: .82rem;
    /* antes .92rem */
    line-height: 1.0;
    /* más apretado */
    background: #eef3fb;
    color: #1E305C;
    border: 1px solid #d6e4f7;
}

.rc-step.is-active {
    background: #1E305C;
    color: #fff;
    border-color: #1E305C;
}

.rc-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rc-section {
    display: none;
}

.rc-section.is-active {
    display: block;
}

.rc-group {
    margin-bottom: 10px;
}

.rc-label {
    display: block;
    font-weight: 700;
    color: #1E305C;
    margin-bottom: 6px;
}

/* Solo cuando un label lleva acciones (como Translate) */
.rc-label--row {
    display: flex;
    /* mantiene tu tipografía/color/margen */
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    /* conserva el spacing original */
}

/* ==== Spacing fino para los 3 botones del SUMMARY ==== */
/* 1) Separación general del label y sus “chips” (status, etc.) */
.rc-label--row {
    gap: 6px;
    /* <— ajusta si quieres más/menos separación global */
}

/* 2) Separación específica entre los botones */
.rc-label--row .rc-trans-btn:first-of-type {
    margin-left: 8px;
    /* espacio entre el texto "EVENT SUMMARY" y el primer botón */
}

.rc-label--row .rc-trans-btn+.rc-trans-btn {
    margin-left: 4px;
    /* espacio entre botones (2º y 3º) */
}

/* (opcional) Cuando se apilen en móviles, reduce el gap */
@media (max-width: 420px) {
    .rc-label--row {
        gap: 4px;
    }

    .rc-label--row .rc-trans-btn:first-of-type {
        margin-left: 6px;
    }

    .rc-label--row .rc-trans-btn+.rc-trans-btn {
        margin-left: 3px;
    }
}


/* Botón pequeñito junto al label */
.rc-trans-btn {
    padding: 6px 10px;
}

/* Translate button — refuerzo visual (funciona con o sin Bootstrap) */
.rc-label .rc-trans-btn.btn-outline-success {
    border: 2px solid #22c55e;
    /* verde outline */
    color: #16a34a;
    /* texto verde */
    background: #fff;
}

.rc-label .rc-trans-btn.btn-outline-success:hover {
    background: #22c55e;
    color: #fff;
}

.rc-label .rc-trans-btn.btn-outline-success:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.rc-label .rc-trans-btn:focus-visible {
    outline: 2px solid #bbf7d0;
    /* anillo de enfoque verde claro */
    outline-offset: 2px;
}

/* Botón de borrar (estilo uniforme) */
.rc-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1;
}

/* Opcional: pequeño hover para diferenciar */
.rc-clear-btn:hover {
    opacity: .95;
}

/* Asegura fila para label con acciones */
.rc-label.rc-label--row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    /* Clear puede ir a la derecha con margin-left:auto cuando se necesite */
}


.rc-help {
    font-size: .9rem;
    color: #6b7280;
    margin-top: 4px;
}

.rc-input,
.rc-textarea,
.rc-select {
    width: 100%;
    border: 2px solid #e7eef8;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 1rem;
    background: #fff;
}

.rc-textarea {
    min-height: 96px;
    resize: vertical;
}

.rc-input:focus,
.rc-textarea:focus,
.rc-select:focus {
    outline: none;
    border-color: #9ec5fe;
    box-shadow: 0 0 0 3px rgba(158, 197, 254, .35);
}

.rc-error {
    color: #b91c1c;
    font-weight: 600;
    margin-top: 6px;
}

.rc-invalid .rc-input,
.rc-invalid .rc-textarea,
.rc-invalid .rc-select {
    border-color: #fca5a5;
    box-shadow: 0 0 0 3px rgba(252, 165, 165, .35);
}

.rc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rc-chip {
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    background: #eaf2ff;
    color: #1E305C;
    border: 1px solid #cfe0fb;
    user-select: none;
}

.rc-chip.is-on {
    background: #1E305C;
    color: #fff;
    border-color: #1E305C;
}

.rc-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rc-thumb {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e7eef8;
    background: #f6f9ff;
    display: grid;
    place-items: center;
}

.rc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rc-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.rc-footer {
    position: sticky;
    bottom: 0;
    z-index: 15;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 24%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 6px 6px;
}

.rc-footer .spacer {
    flex: 1;
}

/* compact móvil: campos en una columna, ya es así por defecto */
@media (min-width: 720px) {
    .rc-two {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}


/* === Editor de tablas del Reporte === */
.rc-table-wrap {
    border: 2px solid #e7eef8;
    border-radius: 12px;
    padding: 8px;
    background: #fff;
}

.rc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.rc-table thead th {
    position: sticky;
    top: 0;
    background: #e9f1fb;
    color: #1E305C;
    font-weight: 700;
    font-size: .95rem;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #d6e4f7;
}

.rc-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #eef3fb;
}

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

.rc-table input.rc-input {
    width: 100%;
}

.rc-table .rc-delrow {
    padding: 6px 10px;
}

.rc-grandtotal {
    text-align: right;
    font-weight: 800;
    color: #1E305C;
    margin-top: 8px;
}


/* ===== REIMBURSEMENTS (v169 estándar) ===== */

#reimb-view {
    position: relative;
}

/* Header sticky blanco, mismo preset que Payroll/Reports */
#reimb-view .reimb-header {
    position: sticky;
    top: 0;
    z-index: 20;
    /* igual que las otras vistas */
    background: #fff;
    border-bottom: 1px solid #e7eef8;

    display: flex;
    align-items: center;
    justify-content: center;
    /* título centrado */
    padding: 10px 72px 6px 10px;
    /* espacio al botón X */
    margin-bottom: 10px;
    overflow: visible;
}

#reimb-view .reimb-title {
    margin: 0;
    color: #004a99;
    line-height: 1.2;
    letter-spacing: .3px;
}

/* Botón Close: usa EXACTAMENTE el preset .close-btn.is-red (sin bordes extra) */
#closeReimbBtn {
    position: absolute;
    right: 0;
    top: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: transparent !important;
    border: none !important;
    /* quita el aro para evitar “doble círculo” */
    box-shadow: none !important;
    color: inherit;
    /* el rojo lo pone .is-red */
    border-radius: 12px;
    transform: translate(10px, -10px);
    line-height: 0;
}

#closeReimbBtn i {
    font-size: 1.45rem;
}

/* Card/cuerpo debajo del header (sí, lo usamos) */
#reimb-view .reimb-wrap {
    border: 2px solid #e7eef8;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    padding: 12px;
    border-top: 0;
}


/* === v169.8 — Fix Reimbursements header sticky + close rojo === */

/* 1) Reimbursements: NO scroll interno.
   Dejamos que el scroll sea del documento (natural) para que el footer NO se monte sobre campos. */
#reimb-view .reimb-wrap {
    max-height: none;
    overflow: visible;
    padding-bottom: 12px; /* vuelve al padding normal de la card */
}

/* 2) Close rojo real: el ID estaba pisando a .is-red; forzamos el color */
#closeReimbBtn.is-red {
    color: #dc2626 !important;
    /* rojo estándar */
}

#closeReimbBtn:hover {
    background: rgba(220, 38, 38, 0.08) !important;
    /* hover rojo */
}

/* Reimbursements — acciones del archivo */
.rc-file-actions {
    display: flex;
    gap: 8px;
}

/* Two fields side-by-side: keep 2 cols at all widths */
.rc-row.two-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.rc-row.two-cols .rc-group {
    margin-bottom: 10px;
}

/* Compact tweaks for small screens but still 2 cols */
@media (max-width: 560px) {
    .rc-row.two-cols {
        gap: 8px;
    }

    .rc-row.two-cols .rc-label {
        font-size: 0.92rem;
    }

    .rc-row.two-cols .rc-input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

/* Reimbursements — footer con botones centrados y 50/50 - apilar en móviles, agrega el media-query abajo y cambia a 1fr */
#reimb-view .rc-footer {
    position: static;            /* <- Reimbursements: NO sticky (evita que se monte sobre inputs) */
    background: transparent;
    padding: 8px 0 0;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Submit status banner: ocupa toda la fila encima de los botones */
#reimb-view #reimbSubmitStatusBanner {
    margin: 12px 0;
}


/* Oculta el spacer usado antes para alinear a la derecha */
#reimb-view .rc-footer .spacer {
    display: none !important;
}

/* Botones llenan su celda */
#reimb-view .rc-footer .btn {
    flex: 1;
    width: auto;
    padding: 12px 16px;
    font-weight: 600;
    border-radius: 10px;
}

/* Banners de Reimbursements (File / Submit) */
#reimb-view .reimb-banner {
    border-radius: 10px;
    font-weight: 600;
}

/* ===== RC MODAL (reusable) ===== */
.rc-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: none;
}

.rc-modal.show {
    display: block;
}

.rcm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.rcm-dialog {
    position: relative;
    z-index: 1;
    margin: 6vh auto 4vh auto;
    width: min(96vw, 560px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 42px rgba(0, 0, 0, .28);
    display: flex;
    flex-direction: column;
}

.rcm-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 64px 8px 12px;
    border-bottom: 1px solid #e7eef8;
}

.rcm-header h4 {
    margin: 0;
    color: #004a99;
    font-weight: 700;
}

.rcm-header .modal-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    transform: translate(10px, -10px);
    border: none;
    background: transparent;
    border-radius: 12px;
}

.rcm-body {
    padding: 12px;
    max-height: 60vh;
    overflow: auto;
}

.rcm-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 12px 12px;
    border-top: 1px solid #e7eef8;
}



.rc-btn-trash {
    color: #dc3545; /* rojo Bootstrap danger */
    padding: 2px 6px;
}

.rc-btn-trash:hover {
    color: #a71d2a;
    text-decoration: none;
}

.rc-btn-trash i {
    font-size: 1rem;
}


/* ================================
   SALES & INVENTORY — unified look
   (pegar al final de style179.css)
   ================================ */

/* --- Diálogo de modal (mismo ancho/espaciado) --- */
#sales-modal .rcm-dialog,
#inventory-modal .rcm-dialog {
  width: min(560px, 96vw);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(10, 30, 70, .20);
}

/* --- Header del modal --- */
#sales-modal .rcm-header,
#inventory-modal .rcm-header {
  background: linear-gradient(180deg, #f6f8ff 0%, #eef2fb 100%);
  border-bottom: 1px solid #dbe3f0;
  padding: 14px 16px;
}

#sales-modal .rcm-header h4,
#inventory-modal .rcm-header h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: .4px;
  color: #1E305C; /* azul GLP */
}

/* --- Acciones arriba de la tabla (Parse / Add row) --- */
#sales-modal .rcm-body .rc-actions,
#inventory-modal .rcm-body .rc-actions {
  display: flex;
  gap: 8px;
  margin: 8px 0 10px 0;
  flex-wrap: wrap;
}

#sales-modal .rcm-body .rc-actions .btn,
#inventory-modal .rcm-body .rc-actions .btn {
  height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
}

/* --- Tabla base unificada --- */
#sales-modal .rc-table,
#inventory-modal .rc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #e6eaf3;
  border-radius: 12px;
  overflow: hidden;
  font-size: .95rem;
  table-layout: fixed; /* consistente con anchos */
}

#sales-modal .rc-table thead th,
#inventory-modal .rc-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #f4f7ff 0%, #e9effc 100%);
  color: #1E305C;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid #dbe3f0;
  border-right: 1px solid #e9eef5;
}

#sales-modal .rc-table thead th:last-child,
#inventory-modal .rc-table thead th:last-child {
  border-right: none;
}

#sales-modal .rc-table tbody td,
#inventory-modal .rc-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f3fa;
  border-right: 1px solid #f3f6fd;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sales-modal .rc-table tbody tr:nth-child(even),
#inventory-modal .rc-table tbody tr:nth-child(even) {
  background: #fafbff;
}

#sales-modal .rc-table tbody td:last-child,
#inventory-modal .rc-table tbody td:last-child {
  border-right: none;
}

/* --- Anchos y alineaciones por columna --- */
#sales-modal .rc-table .col-product,
#inventory-modal .rc-table .col-product { width: 56%; }

#sales-modal .rc-table .col-qty,
#inventory-modal .rc-table .col-qty { 
  width: 20%;
  text-align: center;
}

#sales-modal .rc-table .col-total { width: 18%; text-align: right; }

#sales-modal .rc-table .col-actions,
#inventory-modal .rc-table .col-actions {
  width: 6%;
  text-align: center;
  white-space: nowrap;
}

/* --- Inputs de edición (mismo look para ambos modales) --- */
#sales-modal .rc-table .sales-input,
#inventory-modal .rc-table .sales-input {
  width: 100%;
  height: 34px;
  padding: 6px 10px;
  border: 1px solid #cfd9ea;
  border-radius: 10px;
  background: #fff;
  outline: none;
  box-shadow: inset 0 1px 1px rgba(10, 30, 70, .04);
  font-size: .95rem;
}

#sales-modal .rc-table .col-qty .sales-input,
#inventory-modal .rc-table .col-qty .sales-input,
#sales-modal .rc-table .col-total .sales-input {
  text-align: center;
}

#sales-modal .rc-table .sales-input:focus,
#inventory-modal .rc-table .sales-input:focus {
  border-color: #5b7cff;
  box-shadow: 0 0 0 3px rgba(91, 124, 255, .15);
}

/* --- Botón borrar fila --- */
#sales-modal .rc-table .rc-delrow,
#inventory-modal .rc-table .rc-delrow {
  border: none;
  background: transparent;
  color: #b5bfd3;
  padding: 4px;
  border-radius: 8px;
}

#sales-modal .rc-table .rc-delrow:hover,
#inventory-modal .rc-table .rc-delrow:hover {
  color: #ff4d4f;
  background: #fff1f0;
}

/* --- Footer del modal (botones del mismo tamaño y centrados) --- */
#sales-modal .rcm-footer,
#inventory-modal .rcm-footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  border-top: 1px solid #e8ecf6;
  padding-top: 12px;
}

#sales-modal .rcm-footer .btn,
#inventory-modal .rcm-footer .btn {
  min-width: 140px;           /* mismo ancho visual */
  height: 40px;
  border-radius: 12px;
  font-weight: 600;
}

/* --- Responsive tweaks --- */
@media (max-width: 480px) {
  #sales-modal .rcm-dialog,
  #inventory-modal .rcm-dialog {
    width: 94vw;
  }
  #sales-modal .rc-table .col-product,
  #inventory-modal .rc-table .col-product { width: 60%; }
  #sales-modal .rc-table .col-qty,
  #inventory-modal .rc-table .col-qty { width: 24%; }
  #sales-modal .rc-table .col-actions,
  #inventory-modal .rc-table .col-actions { width: 16%; }
}

/* ================================
   Column widths per modal
   ================================ */

/* SALES: Product + Qty + Amount + Actions = 100% */
#sales-modal .rc-table .col-product { width: 56%; }
#sales-modal .rc-table .col-qty     { width: 16%; text-align: center; }
#sales-modal .rc-table .col-total   { width: 22%; text-align: right; }
#sales-modal .rc-table .col-actions { width: 6%;  text-align: center; }

/* INVENTORY: Product + Units + Actions = 100% */
#inventory-modal .rc-table .col-product { width: 74%; }
#inventory-modal .rc-table .col-qty     { width: 20%; text-align: center; }
#inventory-modal .rc-table .col-actions { width: 6%;  text-align: center; }

/* Inputs alignment (mantiene coherencia) */
#sales-modal .rc-table .col-total .sales-input { text-align: right; }
#sales-modal .rc-table .col-qty   .sales-input,
#inventory-modal .rc-table .col-qty .sales-input { text-align: center; }

/* Mobile tweaks */
@media (max-width: 480px) {
  /* SALES */
  #sales-modal .rc-table .col-product { width: 54%; }
  #sales-modal .rc-table .col-qty     { width: 18%; }
  #sales-modal .rc-table .col-total   { width: 22%; }
  #sales-modal .rc-table .col-actions { width: 6%;  }

  /* INVENTORY */
  #inventory-modal .rc-table .col-product { width: 72%; }
  #inventory-modal .rc-table .col-qty     { width: 22%; }
  #inventory-modal .rc-table .col-actions { width: 6%;  }
}

/* =========================================================
   SALES MODAL — asegurar columna Actions visible (trash)
   Modal: #sales-modal | Table: #salesModalTable
   ========================================================= */

#sales-modal .rc-table-wrap { overflow-x: hidden; } /* evita scroll horizontal raro */
#salesModalTable { table-layout: fixed; width: 100%; }

/* Ajuste de anchos por columna (usa tus clases) */
#salesModalTable th.col-product,
#salesModalTable td.col-product { width: 58%; }

#salesModalTable th.col-qty,
#salesModalTable td.col-qty { width: 14%; }

#salesModalTable th.col-amount,
#salesModalTable td.col-amount { width: 20%; }

#salesModalTable th.col-actions,
#salesModalTable td.col-actions {
  width: 8%;
  min-width: 38px;                 /* <-- reserva espacio para el ícono */
  text-align: center !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
}

/* Compacta celdas e inputs en móvil */
@media (max-width: 576px) {
  #salesModalTable th,
  #salesModalTable td {
    padding: 6px 6px !important;
    vertical-align: middle;
  }

  #salesModalTable input.form-control,
  #salesModalTable input.form-control-sm {
    padding: 6px 8px !important;
    height: 34px !important;
    font-size: 13px !important;
  }
}

/* Botón trash: tamaño fijo (no se corta) */
#sales-modal .rc-btn-trash,
#sales-modal .rcRowDel,
#sales-modal .rcDelSalesRow,
#sales-modal .rcRowTrash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0 !important;
  line-height: 1;
}

/* Ícono un poquito más grande */
#sales-modal .rc-btn-trash i,
#sales-modal .rcRowDel i,
#sales-modal .rcDelSalesRow i,
#sales-modal .rcRowTrash i {
  font-size: 1.05rem;
}

/* SALES modal — trash SIEMPRE rojo */
#sales-modal .rc-btn-trash,
#sales-modal .rcRowDel,
#sales-modal .rcDelSalesRow,
#sales-modal .rcRowTrash {
  color: #dc3545 !important;          /* rojo danger */
}

#sales-modal .rc-btn-trash i,
#sales-modal .rcRowDel i,
#sales-modal .rcDelSalesRow i,
#sales-modal .rcRowTrash i {
  color: #dc3545 !important;
}

#sales-modal .rc-btn-trash:hover,
#sales-modal .rcRowDel:hover,
#sales-modal .rcDelSalesRow:hover,
#sales-modal .rcRowTrash:hover {
  color: #a71d2a !important;          /* rojo más oscuro hover */
}

#sales-modal .rc-btn-trash:hover i,
#sales-modal .rcRowDel:hover i,
#sales-modal .rcDelSalesRow:hover i,
#sales-modal .rcRowTrash:hover i {
  color: #a71d2a !important;
}

/* SALES modal — delete button (rc-delrow) rojo */
#sales-modal .rc-delrow {
  color: #dc3545 !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#sales-modal .rc-delrow i {
  color: #dc3545 !important;
  font-size: 1.05rem;
}

#sales-modal .rc-delrow:hover,
#sales-modal .rc-delrow:focus {
  color: #a71d2a !important;
}

#sales-modal .rc-delrow:hover i,
#sales-modal .rc-delrow:focus i {
  color: #a71d2a !important;
}

/* =========================================================
   SALES modal — ajuste fino para que el trash SIEMPRE quepa
   ========================================================= */

#salesModalTable th.col-actions,
#salesModalTable td.col-actions {
  width: 9% !important;      /* antes 8% */
  min-width: 42px !important;
  white-space: nowrap;
  padding-left: 2px !important;
  padding-right: 2px !important;
  text-align: center !important;
}

/* Botón delete un poquito más compacto */
#sales-modal .rc-delrow {
  width: 30px !important;    /* antes 34 */
  height: 30px !important;
  padding: 0 !important;
}

/* Ícono apenas más chico */
#sales-modal .rc-delrow i {
  font-size: 1rem !important;
}


/* ===== Reimbursements: dual status banners (file + submit) ===== */
.reimb-banner{
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
#reimbFileStatusBanner{
    font-size: 0.95rem;
}
#reimbSubmitStatusBanner{
    font-size: 0.95rem;
}

/* Reimbursements: submit banner dentro del footer, ancho completo arriba de los botones */
#reimb-view #reimbSubmitStatusBanner{
    grid-column: 1 / -1;
    margin-bottom: 0;
}


/* === No Break modal: custom blue radio buttons === */

#noBreakModal .form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    margin: 0;
    cursor: pointer;
}

/* ocultamos el radio nativo */
#noBreakModal .form-check-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* radio visual */
#noBreakModal .form-check-label {
    position: relative;
    padding-left: 28px;
    text-align: left;
    line-height: 1.35;
    font-weight: 500;
    color: #212529;
    cursor: pointer;
}

/* círculo externo (no seleccionado) */
#noBreakModal .form-check-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #9ec5ff;   /* azul claro */
    background: #fff;
    transition: all 0.2s ease;
}

/* círculo interno (seleccionado) */
#noBreakModal .form-check-label::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0d6efd;        /* azul Bootstrap */
    transform: scale(0);
    transition: transform 0.2s ease;
}

/* estado seleccionado */
#noBreakModal .form-check-input:checked + .form-check-label::before {
    border-color: #0d6efd;
}

#noBreakModal .form-check-input:checked + .form-check-label::after {
    transform: scale(1);
}

/* hover */
#noBreakModal .form-check:hover .form-check-label {
    color: #0d6efd;
}

/* === No Break modal: legal disclaimer === */
#noBreakModal .no-break-disclaimer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef; /* separador suave */
    font-size: 0.75rem;            /* pequeño pero legible */
    color: #6c757d;                /* gris Bootstrap */
    line-height: 1.3;
    text-align: left;
}

/* =========================
   Live Supervisor (v203)
   ========================= */

.rc-live-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 14px 10px 14px;
  border-bottom:1px solid rgba(0,0,0,.08);
  background:#fff;
  position:sticky;
  top:0;
  z-index:5;
}

.rc-live-title{
  font-weight:700;
  font-size:18px;
  letter-spacing:.2px;
}

.rc-live-body{
  padding:12px 12px 90px 12px; /* aire por si tienes footer sticky */
}

.rc-live-loading{
  padding:14px;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  font-weight:600;
  color:#444;
}

.rc-live-empty{
  padding:14px;
  border-radius:14px;
  background:#fff;
  border:1px dashed rgba(0,0,0,.18);
  color:#666;
  text-align:center;
}

.rc-live-grid{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.rc-live-row{
  display:flex;
  align-items:stretch;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  border-radius:16px;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}

.rc-live-info{
  flex:1 1 auto;
  min-width:0;
}

.rc-live-name{
  font-weight:800;
  font-size:16px;
  line-height:1.15;
  color:#1f2a37;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.rc-live-meta, .rc-live-meta2{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  font-size:12.5px;
  color:#667085;
  margin-top:4px;
}

.rc-dot{
  opacity:.6;
}

.rc-live-states{
  flex:0 0 auto;
  display:flex;
  align-items:stretch;
  gap:8px;
}

/* botón base de estado */
.rc-btn-state{
  width:86px;
  min-height:64px;
  border-radius:14px !important;
  font-weight:800;
  line-height:1.05;
  padding:8px 8px !important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(0,0,0,.12) !important;
  background:#f6f7f9;
  color:#8a8f98;
}

.rc-btn-state .rc-time{
  display:block;
  font-weight:800;
  font-size:12px;
  margin-top:4px;
}

/* IN/OUT DONE (verde sobrio) */
.rc-btn-in-done,
.rc-btn-out-done{
  background:rgba(16, 185, 129, .14) !important; /* green soft */
  border:1px solid rgba(16, 185, 129, .35) !important;
  color:#0f5132 !important;
}

/* vacío */
.rc-btn-empty{
  background:#f6f7f9 !important;
  color:#8a8f98 !important;
}

/* BREAK box (no clickable) */
.rc-break-box{
  width:92px;
  min-height:64px;
  border-radius:14px;
  padding:8px 8px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(0,0,0,.12);
  background:#f6f7f9;
}

.rc-break-label{
  font-weight:900;
  font-size:12px;
  letter-spacing:.4px;
  color:#6b7280;
}

.rc-break-time{
  margin-top:6px;
  font-weight:900;
  font-size:12px;
  color:#111827;
}

.rc-break-empty{
  opacity:.55;
}

.rc-break-done{
  background:rgba(59, 130, 246, .14); /* blue soft */
  border:1px solid rgba(59, 130, 246, .35);
}

.rc-break-on{
  background:rgba(59, 130, 246, .22);
  border:1px solid rgba(59, 130, 246, .55);
  box-shadow:0 0 0 3px rgba(59, 130, 246, .10);
}

/* Modal photo */
.rc-photo-modal{
  border-radius:18px;
  overflow:hidden;
}
.rc-photo-img{
  width:100%;
  height:auto;
  border-radius:14px;
}

/* Responsive */
@media (max-width: 420px){
  .rc-live-row{
    flex-direction:column;
  }
  .rc-live-states{
    justify-content:space-between;
  }
  .rc-btn-state, .rc-break-box{
    width:32%;
  }
}

/* ===== LIVE SUPERVISOR header: mismo look que Scheduler/Payroll/Reports ===== */
#liveSupervisorView .live-header{
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid #e7eef8;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 10px;
  padding: 10px 72px 6px 10px;  /* deja espacio para la X */
  overflow: visible;
}

#liveSupervisorView .live-title{
  margin: 0;
  color: #004a99;
  line-height: 1.2;
  letter-spacing: .3px;
  font-weight: 700;
}

/* opcional: para que el cuerpo no quede pegado al header */
#liveSupervisorView .rc-live-body{
  padding: 12px 0 90px 0;
}

.rc-live-event{
  margin-top: 2px;
  font-weight: 700;
  font-size: 12.5px;
  color: #1f2a37;
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#liveSupervisorView .ls-filters{
  display:flex;
  gap:10px;
  align-items:flex-end;
  flex-wrap:wrap;
  padding: 6px 0 12px 0;
}

#liveSupervisorView .ls-filter{
  min-width: 160px;
  flex: 1 1 200px;
}

#liveSupervisorView .ls-filter label{
  display:block;
  font-size: 12px;
  font-weight: 700;
  color: #335b8a;
  margin: 0 0 4px 2px;
}

#liveSupervisorView .ls-clear{
  height: 31px;
}

#checkHistoryView .live-header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

/* ============================
   RC FOOTER — iPhone Safari FIX
   (evita Next "partido")
   ============================ */

/* 1) Layout estable en iOS: usar GRID en vez de flex */
.rc-footer{
  display: grid !important;
  grid-template-columns: 1fr 1fr;   /* Back | Next */
  gap: 12px;
  width: 100%;
  align-items: center;
  overflow: visible !important;     /* evita clipping */
}

/* 2) Botones siempre ocupan su celda completa */
.rc-footer > button{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  box-sizing: border-box;
}

/* 3) Cuando rcSubmit aparece, que ocupe toda la fila */
#rcSubmit{
  grid-column: 1 / -1;   /* full width */
}

/* 4) Si rcSubmit está hidden por inline style display:none, no afecta.
      Pero cuando lo muestres, que el layout sea consistente */
#rcSubmit[style*="display:none"]{
  display: none !important;
}

/* 5) Hardening extra para Safari iOS */
@supports (-webkit-touch-callout: none) {
  .rc-footer{
    min-width: 0;
  }
  .rc-footer > button{
    min-width: 0;
  }
}
