﻿.hidden-div {
    display: none;
}

.sidebar {
    transition: all 1s;
}

/*==============================================================*/
/*  Inicio Mini mensaje                                         */
/*==============================================================*/

#nim-container {
    position: fixed;
    bottom: 4rem;
    left: 55%;
    transform: translateX(-50%);
    width: auto;
    width: 80%;
    display: none;
    transition: all 1s;
    z-index: 99999999;
}

/*==============================================================*/
/*  Termina Mini mensaje                                        */
/*==============================================================*/

/*==============================================================*/
/*	Inicio Custom Paginator                                     */
/*==============================================================*/

.dataTables_paginate {
    border: solid 1px #ccc;
    border-radius: 7px;
    padding: 0 !important;
}

    .dataTables_paginate span a {
        border-left: solid 1px #ccc !important;
        border-radius: 0px !important;
        padding: 8px 10px 8px 12px !important;
    }

        .dataTables_paginate span a:last-child {
            border-right: solid 1px #ccc !important;
        }

        .dataTables_paginate span a.ui-state-disabled, .dataTables_paginate a.ui-state-disabled {
            color: #999 !important;
        }

/*==============================================================*/
/*	Termina Custom Paginator                                    */
/*==============================================================*/


/*==============================================================*/
/*	Inicia - Tamaños especiales Tablas                          */
/*==============================================================*/

.table_fs_13 {
    font-size: 13px;
}

.table_fs_12 {
    font-size: 12px;
}

.table_fs_10 {
    font-size: 10px;
}

/*==============================================================*/
/*	Termina - Tamaños especiales Tablas                         */
/*==============================================================*/

/*==========================================*/
/*  Inicia - Fix para easy-autocomplete     */
/*==========================================*/


.easy-autocomplete{
    width: 100% !important;
}

/*==========================================*/
/*	Termina - Fix para easy-autocomplete    */
/*==========================================*/


/*==========================================*/
/*  Inicia - Fix para datetime-picker     */
/*==========================================*/


.picker-switch.accordion-toggle a, .picker-switch.accordion-toggle, .picker-switch.accordion-toggle table {
    width: 100%!important;
    text-align: center;
}

.picker-switch.accordion-toggle a{
    cursor:pointer;
}

/*==========================================*/
/*	Termina -  Fix para datetime-picker    */
/*==========================================*/

/*==========================================*/
/*  Inicia - Div para carga de archivos     */
/*==========================================*/

#upload-panel {
    position: fixed;
    top: 0;
    right: -30%; /* Empieza fuera de la pantalla */
    width: 30%;
    height: 100%;
    background-color: #f4f4f4;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 99997;
    display: flex;
    flex-direction: column;
}

.upload-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
}

    .upload-panel-header h2 {
        margin: 0;
    }

    .upload-panel-header button {
        background: none;
        border: none;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
    }

.upload-panel-body {
    padding: 20px;
    flex-grow: 1;
}

#upload-toggle-button {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
    font-size: 18px;
    text-align: center;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
}

/* Cuando el panel está abierto */
#upload-panel.open {
    right: 0;
}

#upload-toggle-button.open {
    right: 30%;
}

/*==========================================*/
/*	Termina - Div para carga de archivos    */
/*==========================================*/

/* === SPLIT PANEL LAYOUT (Clientes, Proyectos y futuras pantallas) === */

.proy-panel-wrapper {
    display: flex;
    height: calc(100vh - 160px);
    overflow: hidden;
}

.proy-panel-left {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.proy-panel-left .proy-panel-header {
    flex-shrink: 0;
}

/* Zona scrolleable de la lista — reemplaza cualquier id específico */
.proy-panel-list {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

.proy-panel-footer {
    flex-shrink: 0;
    border-top: 1px solid #dee2e6;
    padding: 8px;
    background: #fff;
}

.proy-panel-right {
    flex: 1;
    overflow-y: auto;
}

/* El valor 160px cubre: navbar ~56px + page-header ~46px + padding ~30px + footer ~28px.
   Si en alguna resolución el paginador queda tapado, ajustar este valor. */

/* === PROYECTOS === */

.proyecto-item {
    cursor: pointer;
    transition: background-color .15s;
    border-left: 3px solid transparent;
}

.proyecto-item:hover {
    background-color: #f8f9fc;
}

.proyecto-item.active {
    background-color: #eaecf4;
    border-left-color: #4e73df;
}

.proyecto-item .drag-handle,
.cliente-item .drag-handle {
    opacity: .4;
    flex-shrink: 0;
}

.proyecto-item:hover .drag-handle,
.cliente-item:hover .drag-handle {
    opacity: .8;
}

.tarea-item .drag-handle-tarea {
    opacity: .4;
    flex-shrink: 0;
}

.tarea-item:hover .drag-handle-tarea {
    opacity: .8;
}

#tabsProyecto .nav-link {
    font-size: .875rem;
}

.tab-disabled {
    pointer-events: none !important;
    opacity: .4;
    cursor: default !important;
}

.table-sm td,
.table-sm th {
    font-size: .8rem;
}

/* === CLIENTES === */

.cliente-item {
    cursor: pointer;
    transition: background-color .15s;
    border-left: 3px solid transparent;
}

.cliente-item:hover {
    background-color: #f8f9fc;
}

.cliente-item.active {
    background-color: #eaecf4;
    border-left-color: #4e73df;
}

.cliente-item.active .text-muted {
    color: #5a5c69 !important;
}

.contacto-card {
    border: 1px solid #dee2e6;
    border-radius: .35rem;
    padding: .5rem .75rem;
    margin-bottom: .5rem;
    background: #fff;
}

#msgSortableDesactivado {
    display: none;
}

/* === SPLIT PANEL MOBILE === */
@media (max-width: 767px) {
    .proy-panel-wrapper  { flex-direction: column; }
    .proy-panel-left     { width: 100%; flex: 1; height: auto; }
    .proy-panel-right    { width: 100%; flex: 1; min-height: 0; overflow-y: auto; }
    .proy-panel-left.mobile-hidden  { display: none !important; }
    .proy-panel-right.mobile-hidden { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   NOTIFICACIONES — Campana (topbar bell). LMGA 2026-08-14.
   ═══════════════════════════════════════════════════════════════ */
.notif-bell-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
}
.notif-bell-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #858796;
    font-size: 1.1rem;
    padding: 4px 6px;
    position: relative;
    line-height: 1;
}
.notif-bell-btn:hover { color: #3a3b45; }
.notif-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #EB5A46;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 8px;
    line-height: 16px;
    text-align: center;
}
.notif-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 340px;
    max-height: 440px;
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.16);
    z-index: 9999;
    border: 1px solid #e3e6f0;
}
.notif-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 700;
    font-size: .85rem;
    color: #3a3b45;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.notif-mark-all {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #0079BF;
    font-size: .75rem;
    font-weight: 600;
    padding: 0;
}
.notif-mark-all:hover { text-decoration: underline; }
.notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background .15s;
}
.notif-item:hover           { background: #f8f9fc; }
.notif-item.no-leida        { background: #EBF5FF; border-left: 3px solid #0079BF; }
.notif-item-titulo          { font-weight: 600; font-size: .82rem; color: #3a3b45; }
.notif-item-mensaje         { font-size: .77rem; color: #666; margin-top: 2px; line-height: 1.4; }
.notif-item-fecha           { font-size: .72rem; color: #aaa; margin-top: 4px; }
.notif-empty                { text-align: center; padding: 28px 16px; color: #aaa; font-size: .83rem; }

/* ═══════════════════════════════════════════════════════════════
   PROYECTOS — Board Picker + Kanban. LMGA 2026-08-14.
   ═══════════════════════════════════════════════════════════════ */

/* Contenedor raíz: posicionamiento relativo para que #layerKanban
   use absolute y no cubra sidebar ni topbar */
#proyectosRoot {
    position: relative;
    min-height: calc(100vh - 160px);
}

/* ── Board Picker (capa 1) ── */
.board-picker-wrapper {
    min-height: calc(100vh - 160px);
    background: #f4f5f7;
}
.board-picker-header {
    background: #fff;
    border-bottom: 1px solid #dfe1e6;
    padding: 14px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.board-picker-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: #172b4d;
    margin-right: auto;
}
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    padding: 24px;
}
.board-card {
    border-radius: 8px;
    height: 120px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    color: #fff;
}
.board-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,.3) 100%);
    pointer-events: none;
}
.board-card:hover       { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.board-card-name        { font-size: 1rem; font-weight: 700; line-height: 1.3; position: relative; z-index: 1; }
.board-card-client      { font-size: .75rem; opacity: .85; position: relative; z-index: 1; }
.board-card-footer      { display: flex; justify-content: space-between; align-items: flex-end; position: relative; z-index: 1; }
.board-card-badge {
    font-size: .67rem;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255,255,255,.22);
    font-weight: 600;
    line-height: 1.6;
}
.board-card-badge.badge-pending { background: rgba(235,90,70,.5); }
.board-card-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .67rem;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,.55);
    flex-shrink: 0;
}
.board-add-card {
    background: rgba(9,30,66,.07);
    border: 2px dashed rgba(9,30,66,.2);
    border-radius: 8px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #5e6c84;
    font-weight: 600;
    font-size: .9rem;
    transition: background .18s;
}
.board-add-card:hover   { background: rgba(9,30,66,.13); color: #172b4d; }

/* ── Kanban Board (capa 2 — absolute, no cubre sidebar/topbar) ── */
#layerKanban {
    position: absolute;
    inset: 0;
    min-height: calc(100vh - 160px);
    z-index: 900;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.kanban-bg {
    position: absolute;
    inset: 0;
    background: #0052CC;
    transition: background .4s;
}
.kanban-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.kanban-header {
    flex-shrink: 0;
    background: rgba(0,0,0,.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 9px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    flex-wrap: nowrap;
    overflow-x: auto;
}
.kanban-header::-webkit-scrollbar { display: none; }
.kanban-header .btn-ghost {
    background: rgba(255,255,255,.18);
    border: none;
    color: #fff;
    font-size: .82rem;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s;
}
.kanban-header .btn-ghost:hover { background: rgba(255,255,255,.3); }
.kanban-header .k-title {
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kanban-header .k-subtitle {
    font-size: .78rem;
    opacity: .75;
    flex-shrink: 0;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kanban-spacer          { flex: 1 1 0; min-width: 0; }
#kanbanAvatars          { display: flex; gap: 4px; flex-shrink: 0; }

.kanban-board-scroll {
    flex: 1;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 14px 14px;
    gap: 12px;
    align-items: flex-start;
}
.kanban-board-scroll::-webkit-scrollbar       { height: 7px; }
.kanban-board-scroll::-webkit-scrollbar-track { background: rgba(0,0,0,.1); border-radius: 4px; }
.kanban-board-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.35); border-radius: 4px; }

.kanban-col {
    background: #EBECF0;
    border-radius: 8px;
    min-width: 272px;
    max-width: 272px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 208px);
    flex-shrink: 0;
}
.kanban-col-header {
    padding: 10px 12px 8px;
    font-size: .875rem;
    font-weight: 700;
    color: #172b4d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 3px solid var(--col-accent, #B0B0B0);
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}
.col-count {
    background: #dfe1e6;
    color: #5e6c84;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: .73rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.kanban-cards {
    overflow-y: auto;
    flex: 1;
    padding: 4px 8px;
    min-height: 44px;
}
.kanban-cards::-webkit-scrollbar       { width: 4px; }
.kanban-cards::-webkit-scrollbar-thumb { background: #c1c5cb; border-radius: 2px; }

.kanban-col-footer { padding: 6px 8px 8px; flex-shrink: 0; }
.kanban-add-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: #5e6c84;
    font-size: .83rem;
    padding: 6px 8px;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}
.kanban-add-btn:hover   { background: rgba(9,30,66,.1); color: #172b4d; }

.kanban-card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.14);
    margin-bottom: 8px;
    cursor: pointer;
    transition: box-shadow .18s, transform .15s;
    overflow: hidden;
    user-select: none;
}
.kanban-card:hover {
    box-shadow: 0 5px 14px rgba(0,0,0,.22);
    transform: translateY(-1px);
}
.kanban-card-accent     { height: 4px; width: 100%; }
.kanban-card-body       { padding: 8px 10px 10px; }
.kanban-card-name {
    font-size: .855rem;
    color: #172b4d;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: break-word;
}
.kanban-card-meta       { display: flex; justify-content: space-between; align-items: center; }
.kanban-card-date       { font-size: .73rem; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.kanban-card-icons      { display: flex; align-items: center; gap: 6px; color: #5e6c84; font-size: .78rem; }
.kanban-card-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .64rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sortable-ghost         { opacity: .35; }
.sortable-chosen .kanban-card { box-shadow: 0 10px 22px rgba(0,0,0,.28); }
.kanban-col.drag-over .kanban-cards {
    background: rgba(0,121,191,.07);
    border-radius: 4px;
}

.layer-fade-in { animation: fadeInUp .22s ease; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* ── Modal de tarea ── */
#modalTarea .modal-dialog { max-width: 720px; }
#modalTarea .modal-body {
    display: grid;
    grid-template-columns: 1fr 210px;
    gap: 24px;
    padding: 20px 24px 24px;
    align-items: start;
}
#modalTarea .modal-header { padding: 10px 20px; }
.modal-tarea-title {
    font-size: 1rem;
    font-weight: 700;
    color: #172b4d;
    border: none;
    background: transparent;
    width: 100%;
    resize: none;
    padding: 5px 8px;
    border-radius: 4px;
    line-height: 1.4;
    min-height: 58px;
    margin-bottom: 14px;
}
.modal-tarea-title:focus        { outline: none; background: #f4f5f7; }
.modal-tarea-notes {
    width: 100%;
    resize: vertical;
    border: 1px solid #dfe1e6;
    border-radius: 4px;
    padding: 8px;
    font-size: .85rem;
    min-height: 80px;
    background: #f4f5f7;
}
.modal-tarea-notes:focus        { outline: none; border-color: #0079BF; background: #fff; }
.tarea-sidebar-label {
    font-size: .72rem;
    font-weight: 700;
    color: #5e6c84;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
    margin-top: 14px;
    display: block;
}
.tarea-sidebar-label:first-child { margin-top: 0; }

/* ── Responsive ── */
@media (max-width: 767px) {
    .board-grid             { grid-template-columns: 1fr; padding: 12px; gap: 10px; }
    .board-card             { height: 100px; }
    .board-picker-header    { padding: 10px 14px; }
    .kanban-board-scroll    { flex-direction: column; overflow-x: hidden; overflow-y: auto; }
    .kanban-col             { min-width: 100%; max-width: 100%; max-height: none; }
    #modalTarea .modal-body { grid-template-columns: 1fr; gap: 12px; }
    #modalTarea .modal-dialog { margin: .5rem; }
}

/* ═══════════════════════════════════════════════════════════════
   TAREAS — Pantalla Kanban cross-proyecto. LMGA 2026-08-24.
   ═══════════════════════════════════════════════════════════════ */

/* Header fijo con filtros horizontales */
.tareas-kanban-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 0;
}
.tareas-kanban-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    color: #172b4d;
    white-space: nowrap;
}

/* Nombre del proyecto encima del título de la tarjeta */
.kanban-card-project {
    font-size: .70rem;
    color: #5e6c84;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 3px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mini barra de progreso del checklist en la tarjeta */
.tarea-checklist-bar {
    height: 4px;
    background: #dfe1e6;
    border-radius: 2px;
    margin: 6px 0 2px;
    overflow: hidden;
}
.tarea-checklist-fill {
    height: 100%;
    background: #61BD4F;
    border-radius: 2px;
    transition: width .3s;
}
.tarea-checklist-txt {
    font-size: .67rem;
    color: #5e6c84;
    margin-bottom: 6px;
}

/* Barra de progreso del checklist en el modal */
.checklist-progress-bar {
    height: 8px;
    background: #dfe1e6;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}
.checklist-progress-fill {
    height: 100%;
    background: #61BD4F;
    border-radius: 4px;
    transition: width .3s;
}

/* Filas de items del checklist en el modal */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}
.checklist-item:last-child              { border-bottom: none; }
.checklist-item label {
    flex: 1;
    margin-bottom: 0;
    font-size: .855rem;
    cursor: pointer;
    color: #172b4d;
}
.checklist-item label.completado        { text-decoration: line-through; color: #aaa; }

/* Fila de input + botón para agregar item */
.checklist-add-row {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    align-items: center;
}
.checklist-add-row .form-control        { flex: 1; }

/* ═══════════════════════════════════════════════════════════════
   TICKETS DE SOPORTE. LMGA 2026-08-25.
   ═══════════════════════════════════════════════════════════════ */

.ticket-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ticket-interaccion {
    border: 1px solid #dee2e6;
    border-left: 4px solid #4e73df;
    border-radius: 6px;
    padding: 10px 14px;
    background: #f8f9fc;
}

.ticket-interaccion-interna {
    border-left-color: #858796;
    background: #f0f0f5;
    opacity: .9;
}

.ticket-interaccion-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: .875rem;
}

.ticket-interaccion-body {
    font-size: .875rem;
    color: #3a3b45;
}

.ticket-adjunto-link {
    display: inline-flex;
    align-items: center;
    font-size: .8rem;
    color: #4e73df;
    text-decoration: none;
    padding: 2px 6px;
    border: 1px solid #c2cbe0;
    border-radius: 4px;
    margin-right: 4px;
    margin-bottom: 2px;
}

.ticket-adjunto-link:hover {
    background: #e8edf8;
    text-decoration: none;
}

/* LMGA 2026-08-27: Color de borde lateral por rol en interacciones de ticket. */
.ticket-interaccion-cliente {
    border-left-color: #1cc88a;
    background: #f0faf6;
}

.ticket-interaccion-staff {
    border-left-color: #36b9cc;
    background: #f0f9fc;
}

/* ─── Finanzas: bancos, movimientos y cierre mensual. LMGA 2026-10-13. ─── */
.fin-toolbar            { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.fin-toolbar .fin-push  { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.fin-select             { max-width: 260px; }
.fin-mes-label          { min-width: 160px; text-align: center; font-weight: 700; }
.fin-resumen            { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.fin-kpi                { border: 1px solid #e3e6f0; border-radius: .35rem; padding: .6rem .8rem; background: #fff; }
.fin-kpi-label          { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: #858796; }
.fin-kpi-valor          { font-size: 1.15rem; font-weight: 700; color: #3a3b45; font-variant-numeric: tabular-nums; }
.fin-monto              { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fin-cargo              { color: #e74a3b; }
.fin-abono              { color: #17a673; }
.fin-concepto           { max-width: 420px; word-break: break-word; font-size: .85rem; }
.fin-nota               { display: block; font-size: .75rem; color: #858796; }
.fin-estatus            { display: inline-block; padding: .15rem .55rem; border-radius: 1rem; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.fin-estatus-Cerrado    { background: #17a673; color: #fff; }
.fin-estatus-Conciliado { background: #36b9cc; color: #fff; }
.fin-estatus-Cargado    { background: #4e73df; color: #fff; }
.fin-estatus-SinCargar  { background: #e74a3b; color: #fff; }
.fin-estatus-EnCurso    { background: #f6c23e; color: #3a3b45; }
.fin-estatus-Futuro,
.fin-estatus-NoAplica,
.fin-estatus-SinMovimientos { background: #eaecf4; color: #858796; }
.fin-estatus-Pendiente  { background: #f6c23e; color: #3a3b45; }
.fin-estatus-Ignorado   { background: #eaecf4; color: #858796; }
.fin-sin-categoria      { color: #e74a3b; font-style: italic; font-size: .8rem; }
.fin-grid th, .fin-grid td { text-align: center; vertical-align: middle; }
.fin-grid th:first-child, .fin-grid td:first-child { text-align: left; white-space: nowrap; }
.fin-celda              { cursor: pointer; min-width: 88px; }
.fin-celda:hover        { background: #f8f9fc; }
.fin-celda.fin-activa   { outline: 2px solid #4e73df; outline-offset: -2px; }
.fin-celda-detalle      { display: block; font-size: .7rem; color: #858796; margin-top: .2rem; }
.fin-leyenda            { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.fin-resultado-carga    { border: 1px solid #e3e6f0; border-radius: .35rem; padding: .75rem; background: #f8f9fc; }
.fin-resultado-carga li { font-size: .85rem; }
#fin-avisos .alert      { margin-bottom: .5rem; padding: .55rem .9rem; }
#fin-avisos .alert a    { font-weight: 700; }
#fin-avisos .alert .close { padding: .4rem .8rem; }   /* LMGA 2026-10-19: X para cerrar el aviso */

/* LMGA 2026-10-13: Finanzas Lote 2 — facturas, egresos y pre-cierre contable. */
.fin-select-corto              { max-width: 170px; }
.fin-estatus-Programada,
.fin-estatus-Programado        { background: #858796; color: #fff; }
.fin-estatus-Emitida           { background: #4e73df; color: #fff; }
.fin-estatus-CobradaParcial    { background: #f6c23e; color: #3a3b45; }
.fin-estatus-Cobrada,
.fin-estatus-Pagado            { background: #17a673; color: #fff; }   /* LMGA 2026-11-04: verde más oscuro para leer el texto blanco */
.fin-estatus-Cancelada,
.fin-estatus-Cancelado         { background: #eaecf4; color: #858796; text-decoration: line-through; }
.fin-estatus-Vencida           { background: #e74a3b; color: #fff; }
.fin-estatus-Abierto           { background: #258391; color: #fff; }
.fin-estatus-BancoSinBanco     { background: #eaecf4; color: #858796; }
.fin-estatus-BancoSinCargar    { background: #e74a3b; color: #fff; }
.fin-estatus-BancoCargado      { background: #4e73df; color: #fff; }
.fin-estatus-BancoCerrado      { background: #1cc88a; color: #fff; }
.fin-estatus-BancoEnCurso      { background: #f6c23e; color: #3a3b45; }
.fin-estatus-BancoFuturo       { background: #eaecf4; color: #858796; }
.fin-tabla-periodos td,
.fin-tabla-periodos th         { vertical-align: middle; white-space: nowrap; }
.fin-fila-inactiva td          { background: #f8f9fc; font-size: .8rem; }
.fin-fila-total td             { font-weight: 700; background: #f8f9fc; border-top: 2px solid #d1d3e2; }

/* LMGA 2026-10-13: Login con código de 6 dígitos. */
.otp-digit-group               { display: flex; justify-content: center; gap: .5rem; }
.otp-input-slot                { width: 3rem; }
.otp-input-slot .digit-input   { height: 3.25rem; text-align: center; font-size: 1.5rem; font-weight: 700; padding: 0; }

/* LMGA 2026-10-14: Dashboard financiero y tablas tipo Excel. */
.fin-seccion                   { font-weight: 700; color: #4e73df; margin: .5rem 0 .75rem; text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; }
.fin-kpi-nota                  { display: block; font-size: .72rem; color: #858796; margin-top: .15rem; }
.fin-kpi-ayuda                 { font-size: .65rem; opacity: .6; }
.fin-kpi[title]                { cursor: help; }
.fin-alerta                    { color: #e0a800; }
.fin-grafica                   { position: relative; height: 300px; }
.fin-ordenable                 { cursor: pointer; user-select: none; white-space: nowrap; }
.fin-ordenable::after          { content: "\f0dc"; font-family: "Font Awesome 5 Free", "Font Awesome 6 Free"; font-weight: 900; margin-left: .35rem; opacity: .35; font-size: .7rem; }
.fin-orden-asc::after          { content: "\f0de"; opacity: .9; }
.fin-orden-desc::after         { content: "\f0dd"; opacity: .9; }
.fin-tabla tfoot td            { font-weight: 700; background: #f8f9fc; color: #3a3b45; border-top: 2px solid #d1d3e2; }   /* LMGA 2026-11-04: el tema pone tfoot en blanco */

/* LMGA 2026-10-19: El panel de ayuda arranca oculto; se abre con el botón ? (toggleInfoPanel). */
#pnl-guide                         { display: none; }

/* LMGA 2026-10-19: Modo móvil (< 768 px). El menú lateral se oculta y se abre con el botón ≡ de la barra superior;
   así el contenido usa todo el ancho. Ajustes de avisos, pestañas, indicadores y filtros de Finanzas. */
@media (max-width: 767.98px) {
    #accordionSidebar:not(.show):not(.collapsing) { display: none !important; }
    #fin-avisos .alert             { font-size: .78rem; padding: .4rem 2.2rem .4rem .6rem; }
    #dashboardTabs                 { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
    #dashboardTabs .nav-link       { white-space: nowrap; padding: .4rem .6rem; }
    .fin-resumen                   { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .fin-kpi                       { padding: .5rem .6rem; }
    .fin-kpi-valor                 { font-size: 1rem; word-break: break-word; }
    .fin-toolbar .fin-select,
    .fin-toolbar .fin-select-corto { max-width: none; flex: 1 1 140px; }
    .fin-toolbar .fin-push         { margin-left: 0; width: 100%; }
    .fin-grafica                   { height: 240px; }
    /* LMGA 2026-10-19: Título de la barra superior: el botón ? queda a la derecha del título (no abajo),
       sin márgenes extra, y el nombre usa como máximo 2 renglones. Escritorio sin cambios. */
    #sidebarToggleTop              { margin-right: .5rem !important; flex-shrink: 0; }
    .topbar-titulo                 { flex: 1 1 auto; min-width: 0; }
    .topbar-titulo > div           { display: flex !important; align-items: center; margin-bottom: 0 !important; min-width: 0; }
    .ttl_page                      { font-size: 1rem; line-height: 1.2; margin: 0; min-width: 0; overflow: hidden;
                                     display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .topbar-titulo .hint--bottom   { flex-shrink: 0; }
    .topbar-titulo #a_help         { width: 1.6rem; height: 1.6rem; font-size: .7rem; margin-left: .4rem !important; }
    .topbar .navbar-nav.ml-auto .nav-link { padding-left: .4rem; padding-right: .4rem; }
    /* Tablas: ancho mínimo y desplazamiento lateral (como Excel) en vez de columnas aplastadas. */
    .fin-tabla, #tbl-movimientos   { min-width: 720px; }
    .fin-tabla .fin-concepto       { min-width: 220px; }
    .card-header.d-flex            { flex-wrap: wrap; gap: .25rem; }
}

/* LMGA 2026-11-02: Cambio de contraseña — requisitos en vivo y medidor de fuerza. */
.pwd-card                      { border-top: 4px solid #4e73df; }
.pwd-icono                     { width: 3.25rem; height: 3.25rem; margin: 0 auto .75rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #eaecf4; color: #4e73df; font-size: 1.3rem; }
.pwd-medidor                   { height: 6px; border-radius: 3px; background: #eaecf4; overflow: hidden; }
.pwd-medidor-barra             { height: 100%; width: 0; transition: width .25s ease, background-color .25s ease; }
.pwd-debil                     { background: #e74a3b; }
.pwd-media                     { background: #f6c23e; }
.pwd-fuerte                    { background: #36b9cc; }
.pwd-muy-fuerte                { background: #1cc88a; }
.pwd-reglas                    { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .75rem; font-size: .85rem; color: #858796; }
.pwd-reglas li i               { font-size: .7rem; margin-right: .35rem; opacity: .5; }
.pwd-reglas li.pwd-ok          { color: #17a673; }
.pwd-reglas li.pwd-ok i        { font-size: .85rem; opacity: 1; }
@media (max-width: 575.98px) {
    .pwd-reglas                { grid-template-columns: 1fr; }
}

/* LMGA 2026-11-03: Liga de consulta de horas para clientes (página pública). */
.consulta-body                 { background: #f8f9fc; }
.consulta-contenedor           { max-width: 1400px; padding-top: 1.25rem; padding-bottom: 1.5rem; }
.consulta-header               { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.consulta-logo                 { height: 40px; width: auto; }
/* LMGA 2026-11-03: liga de consulta - saldos por bolsa y selector de varios meses. */
.cst-saldos                    { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.cst-saldo                     { flex: 1 1 260px; background: #fff; border: 1px solid #e3e6f0; border-left: 4px solid #4e73df; border-radius: .35rem; padding: .75rem 1rem; }
.cst-saldo-nombre              { font-size: .8rem; font-weight: 700; text-transform: uppercase; color: #4e73df; }
.cst-saldo-valor               { font-size: 1.75rem; font-weight: 700; color: #3a3b45; line-height: 1.2; }
.cst-saldo-nota                { font-size: .78rem; color: #858796; }
.fin-toolbar .cst-select-anio { flex: 0 0 auto; width: 95px; max-width: 95px; }
/* LMGA 2026-11-04: selectores múltiples (meses, sitios / clientes, tipos) con el aspecto de un select.
   Selector .btn.cst-multi-btn para ganarle a .btn / .btn-sm (padding y alineación). */
.btn.cst-multi-btn             { min-width: 170px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
                                 text-align: left !important; background: #fff; border: 1px solid #d1d3e2 !important; color: #6e707e;
                                 padding: .25rem 2rem .25rem .6rem !important; position: relative; font-size: .875rem; line-height: 1.5; }
.btn.cst-multi-btn::after      { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); margin: 0; }
.btn.cst-multi-btn:hover,
.btn.cst-multi-btn:focus,
.btn.cst-multi-btn:active,
.show > .btn.cst-multi-btn     { background: #fff !important; color: #6e707e !important; border-color: #bac8f3 !important; box-shadow: 0 0 0 .2rem rgba(78, 115, 223, .25) !important; }
.cst-multi-menu                { min-width: 260px; padding: .5rem .75rem; }
.cst-multi-lista               { max-height: 300px; overflow-y: auto; }
.cst-multi-acciones            { display: flex; justify-content: space-between; gap: 1rem; white-space: nowrap; }
.consulta-footer               { font-size: .75rem; text-align: center; margin-top: 1rem; }
.cst-fila-compra td            { background: #eafaf3; }
/* LMGA 2026-11-03: Ligas de consulta en la ficha del cliente. */
.enl-item                      { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid #eaecf4; }

/* LMGA 2026-11-03: Horas - panel de ligas de consulta y nota de horas adicionales del socio */
.hrs-ligas { border: 1px solid #d1d3e2; border-radius: .35rem; padding: .75rem 1rem; margin-bottom: 1rem; background: #f8f9fc; }
.hrs-adicional { color: #1cc88a; font-weight: 600; white-space: nowrap; }
.hrs-adicionales { border-top: 1px dashed #d1d3e2; padding-top: .5rem; margin-bottom: .5rem; }
/* LMGA 2026-11-03: Horas - selectores de año y mes. */
.fin-toolbar .hrs-select-anio { flex: 0 0 auto; width: 95px; max-width: 95px; }
.fin-toolbar .hrs-select-mes { flex: 0 0 auto; width: 135px; max-width: 135px; }
/* LMGA 2026-11-04: pestañas de pantallas (Horas, Bancos, Cobros, Egresos, Catálogos) con el mismo estilo del Dashboard. */
.crm-tabs                      { margin-bottom: 0; }
.crm-tabs .nav-link            { color: #4e73df; font-weight: 500; }
.crm-tabs .nav-link i          { margin-right: .25rem; }
.crm-tabs .nav-link.active     { color: #3a3b45; font-weight: 600; }
/* LMGA 2026-11-04: Horas - interruptor "Reporta" bloqueado se ve atenuado con su motivo. */
.hrs-switch-motivo             { display: block; font-size: .7rem; color: #858796; line-height: 1.1; margin-top: .15rem; }
/* LMGA 2026-11-04: liga "Ir a resolver" de los avisos del sistema con el color del aviso (en claro y oscuro se leía mal). */
.alert a.ml-2                  { color: inherit; font-weight: 700; text-decoration: underline; }
/* LMGA 2026-11-04: Bitácora del agente - fechas compactas, renglones clicables y JSON legible en el detalle. */
.fin-toolbar .age-fecha        { flex: 0 0 auto; width: 150px; max-width: 150px; }
.age-fila                      { cursor: pointer; }
.tar-filtro-colaborador        { max-width: 200px; }
.pag-difiere                   { background: #fff3cd; color: #856404; font-weight: 700; }
.pag-notas                     { max-height: 160px; overflow: auto; white-space: pre-wrap; font-size: .78rem; background: #f8f9fc; color: #3a3b45; border: 1px solid #e3e6f0; border-radius: .35rem; padding: .5rem .75rem; margin-bottom: 0; }
.age-json                      { max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: .78rem; background: #f8f9fc; color: #3a3b45; border: 1px solid #e3e6f0; border-radius: .35rem; padding: .6rem .75rem; }
/* LMGA 2026-11-05: Sitios de mailing - dominios como etiquetas, editor HTML y vista previa del correo. */
.sml-dominio                   { display: inline-block; font-size: .75rem; padding: .15rem .55rem; margin: 0 .25rem .25rem 0; border-radius: 1rem; background: #eaecf4; color: #3a3b45; white-space: nowrap; }
.sml-quitar                    { margin-left: .35rem; color: #858796; }
.sml-quitar:hover              { color: #e74a3b; text-decoration: none; }
.sml-sin-dominio               { font-size: .75rem; color: #858796; font-style: italic; }
.sml-inactivo td               { color: #858796; }
.sml-encabezado                { gap: .5rem; }
.sml-toolbar                   { gap: .5rem; }
.sml-info                      { color: #5a5c69; white-space: nowrap; }
.sml-tamano.sml-pesado         { color: #e74a3b; font-weight: 700; }
.sml-panel-titulo              { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .8rem; padding: .3rem .6rem; border-bottom: 1px solid #e3e6f0; color: #858796; background: #f8f9fc; }
.sml-ayuda                     { font-size: .72rem; text-align: right; }
.sml-ayuda code                { font-size: .72rem; }
.sml-col-editor                { border-right: 1px solid #e3e6f0; }
/* Editor: números de renglón + textarea sin ajuste de línea, misma tipografía y altura de renglón en ambos. */
.sml-editor-wrap               { display: flex; height: 70vh; min-height: 420px; background: #fff; }
.sml-gutter,
.sml-editor                    { font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12.5px; line-height: 1.55; padding: .6rem .5rem; margin: 0; }
.sml-gutter                    { flex: 0 0 auto; min-width: 3.2rem; overflow: hidden; text-align: right; color: #b7b9cc; background: #f8f9fc; border-right: 1px solid #e3e6f0; user-select: none; }
.sml-editor                    { flex: 1 1 auto; width: 100%; height: 100%; border: 0; outline: 0; resize: none; white-space: pre; overflow: auto; tab-size: 4; color: #2e2f37; background: #fff; }
.sml-editor:focus              { box-shadow: inset 0 0 0 2px rgba(78, 115, 223, .25); }
/* Vista previa: fondo gris como bandeja de correo; en "Celular" el correo se angosta a 375 px. */
.sml-preview-wrap              { height: 70vh; min-height: 420px; padding: .75rem; background: #eaecf4; overflow: auto; }
.sml-preview                   { display: block; width: 100%; height: 100%; margin: 0 auto; border: 0; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); transition: width .2s ease; }
.sml-preview.sml-preview-mobile { width: 375px; max-width: 100%; border-radius: 12px; }
/* Pantalla completa del editor. */
.sml-editor-card.sml-fullscreen { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1050; margin: 0 !important; border-radius: 0; display: flex; flex-direction: column; }
.sml-fullscreen > .card-body   { flex: 1 1 auto; min-height: 0; }
.sml-fullscreen > .card-body > .row { height: 100%; }
.sml-fullscreen .sml-col-editor,
.sml-fullscreen .sml-col-preview { display: flex; flex-direction: column; height: 100%; }
.sml-fullscreen .sml-editor-wrap,
.sml-fullscreen .sml-preview-wrap { flex: 1 1 auto; height: auto; min-height: 0; }
body.sml-sin-scroll            { overflow: hidden; }
@media (max-width: 991px) {
    .sml-col-editor            { border-right: 0; border-bottom: 1px solid #e3e6f0; }
    .sml-editor-wrap,
    .sml-preview-wrap          { height: 55vh; min-height: 320px; }
}
