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