body {
    font-size: .88rem;
    background-color: #f4f6f9;
}

/* Layout */
main {
    padding: 1rem !important;
}

/* Títulos */
.page-title-compact h1,
h1.h2 {
    font-size: 1.35rem;
    margin-bottom: 0;
}

/* Cards */
.card {
    border-radius: .6rem;
}

.card-body {
    padding: .75rem !important;
}

.card-header {
    padding: .55rem .75rem !important;
}

/* Formularios */
.form-control,
.form-select {
    min-height: 32px;
    padding: .28rem .5rem;
    font-size: .84rem;
}

label,
.form-label {
    font-size: .78rem;
    font-weight: 600;
    margin-bottom: .2rem;
}

/* Tablas compactas */
.table-compact {
    font-size: .80rem;
}

.table-compact th {
    padding: .42rem .5rem;
    white-space: nowrap;
    font-weight: 600;
    background-color: #f8f9fa;
}

.table-compact td {
    padding: .32rem .5rem;
    vertical-align: middle;
}

.table-compact .fw-bold {
    font-weight: 600 !important;
}

.table-compact small {
    font-size: .72rem;
}

/* Acciones */
.btn-xs {
    padding: .18rem .4rem;
    font-size: .72rem;
    line-height: 1.2;
}

.btn-xxs{
  padding: 0.05rem 0.25rem;
  font-size: 0.7rem;
  line-height: 1;
  border-radius: 0.15rem;
}

.btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-toolbar-compact .btn {
    padding: .3rem .55rem;
    font-size: .80rem;
}

/* Badges */
.badge {
    font-size: .68rem;
    padding: .28rem .4rem;
}

/* Filtros */
.filters-compact .card-body {
    padding: .65rem !important;
}

.filters-compact .row {
    --bs-gutter-x: .75rem;
    --bs-gutter-y: .5rem;
}

/* Paginación */
.pagination {
    margin-bottom: 0;
}

.page-link {
    padding: .28rem .55rem;
    font-size: .80rem;
}

/* Sidebar */
.sidebar {
    width: 220px !important;
    min-width: 220px !important;
}

.sidebar a {
    padding: 7px 12px !important;
    font-size: .84rem;
}

.sidebar i {
    width: 18px;
    text-align: center;
}

/* Navbar */
.navbar {
    min-height: 48px;
}

.navbar-brand {
    font-size: 1rem;
}

.detail-drawer {
    position: fixed;
    top: 120px;
    bottom: 0;
    right: -580px;
    width: 580px;
    border-radius: 12px 0 0 12px;
    background: #fff;
    z-index: 2000;
    box-shadow: -6px 0 24px rgba(0,0,0,.15);
    transition: right .25s ease;
    display: flex;
    flex-direction: column;
}

.detail-drawer.open {
    right: 0;
}

.drawer-overlay {

    position: fixed;

    top: 120px;
    left: 220px;

    right: 0;
    bottom: 0;

    background: rgba(0,0,0,.25);

    z-index: 1990;

    opacity: 0;

    visibility: hidden;

    transition: all .2s ease;
}

.drawer-overlay.show {

    opacity: 1;

    visibility: visible;
}

/* Modals must appear above the detail-drawer (z-index: 2000) */
.modal          { z-index: 2100 !important; }
.modal-backdrop { z-index: 2090 !important; }
.swal2-container { z-index: 2200 !important; }

/* Kanban de Tareas */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    align-items: stretch;
    min-width: 0;
}

.kanban-column {
    flex: 1 1 260px;
    min-width: 260px;
    max-width: 340px;
    background: #f4f6f9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 260px);
    min-height: 300px;
}

.kanban-column-header {
    padding: 0.6rem 0.75rem;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kanban-column-body {
    padding: 0.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 80px;
    transition: background-color .15s ease;
}

.kanban-column-body.drag-over {
    background-color: rgba(13, 110, 253, .08);
    outline: 2px dashed #0d6efd;
    outline-offset: -2px;
}

.kanban-card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.kanban-card.kanban-card-principal {
    border-left: 3px solid #0d6efd;
}

.kanban-card.dragging {
    opacity: 0.4;
}

.kanban-card-ticket {
    font-size: 0.75rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.kanban-card-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin: 0.15rem 0;
    overflow-wrap: anywhere;
}

.kanban-card-ambito {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.4rem;
}

.kanban-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-width: 0;
}

.kanban-card-footer > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.kanban-card-due {
    font-size: 0.72rem;
    color: #6c757d;
    white-space: nowrap;
}

.kanban-card-actions {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid #eee;
}
/* ── Chips de filtro (estilo WhatsApp) + barra de listado ── */
.toolbar-listado .chips-filtro { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.toolbar-listado .chips-sep { width: 1px; align-self: stretch; background: #dee2e6; margin: 0 .15rem; }
.toolbar-listado .buscador-listado { flex: 1 1 260px; min-width: 220px; }

.chip-filtro {
    border: 1px solid #9da1a6;
    background: #f1f3f5;
    color: #495057;
    border-radius: 999px;
    padding: .2rem .75rem;
    font-size: .8rem;
    line-height: 1.4;
    white-space: nowrap;
    transition: background-color .15s, color .15s, border-color .15s;
}
.chip-filtro:hover { background: #e9ecef; }
.chip-filtro.active {
    background: #fde6ee;
    border-color: #f173a0;
    color: #E50051;
    font-weight: 500;
}

/* ── Buscador en píldora (a juego con los chips de filtro) ── */
.buscador-pill {
    position: relative;
    display: flex;
    align-items: center;
    background: #f1f3f5;
    border: 1px solid #9da1a6;
    border-radius: 999px;
    height: 32px;
    padding: 0 .35rem 0 .8rem;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.buscador-pill:hover { background: #e9ecef; }
.buscador-pill-icon { color: #6c757d; font-size: .8rem; margin-right: .5rem; transition: color .15s; }
.buscador-pill input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #495057;
    font-size: .85rem;
    padding: 0;
}
.buscador-pill input::placeholder { color: #8a9096; }
.buscador-pill input::-webkit-search-cancel-button { -webkit-appearance: none; }
.buscador-pill-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: #dee2e6;
    color: #495057;
    font-size: .7rem;
    padding: 0;
    flex-shrink: 0;
}
.buscador-pill-clear:hover { background: #ced4da; }
.buscador-pill input:placeholder-shown ~ .buscador-pill-clear { visibility: hidden; }

/* Con foco o con texto escrito: mismo lenguaje que el chip activo */
.buscador-pill:focus-within,
.buscador-pill:has(input:not(:placeholder-shown)) {
    background: #fff;
    border-color: #f173a0;
}
.buscador-pill:focus-within { box-shadow: 0 0 0 3px rgba(229, 0, 81, .10); }
.buscador-pill:focus-within .buscador-pill-icon,
.buscador-pill:has(input:not(:placeholder-shown)) .buscador-pill-icon { color: #E50051; }
.buscador-pill:has(input:not(:placeholder-shown)) .buscador-pill-clear { background: #fde6ee; color: #E50051; }

/* ── Botones de acción (a juego con chips y buscador) ── */
/* Acción secundaria: círculo con solo icono, sin borde hasta hover */
.btn-accion {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: #495057;
    font-size: .85rem;
    text-decoration: none;
    flex-shrink: 0;
    transition: background-color .15s, color .15s, border-color .15s;
}
.btn-accion:hover,
.btn-accion:focus-visible,
.btn-accion.show {
    background: #f1f3f5;
    border-color: #9da1a6;
    color: #495057;
}
.btn-accion.btn-accion-sm { width: 28px; height: 28px; font-size: .78rem; }
.btn-accion.dropdown-toggle::after { display: none; }
/* Destructivas: neutras en reposo, rosa solo al pasar por encima */
.btn-accion.peligro:hover,
.btn-accion.peligro:focus-visible {
    background: #fde6ee;
    border-color: #f173a0;
    color: #E50051;
}
/* Contador sobre un icono (p. ej. solicitudes pendientes) */
.btn-accion .contador {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #E50051;
    color: #fff;
    font-size: .62rem;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
}

/* Acción principal de la pantalla: píldora con los colores del chip activo */
.btn-crear,
.btn-principal {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    height: 32px;
    padding: 0 .9rem;
    border: 1px solid #f173a0;
    border-radius: 999px;
    background: #fde6ee;
    color: #E50051;
    font-size: .82rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color .15s;
}
.btn-crear:hover,
.btn-principal:hover { background: #fbd3e1; color: #E50051; }
.btn-principal:disabled { opacity: .6; }
.btn-crear.btn-crear-sm { height: 26px; padding: 0 .7rem; font-size: .76rem; }
/* Split: "Nueva tarea" + desplegable con más opciones de creación */
.btn-crear-split { display: inline-flex; }
.btn-crear-split .btn-crear:first-child { border-radius: 999px 0 0 999px; padding-right: .7rem; }
.btn-crear-split .btn-crear.dropdown-toggle { border-radius: 0 999px 999px 0; border-left-color: #f5a3c0; padding: 0 .55rem; }
.btn-crear-split .btn-crear.dropdown-toggle::after { margin-left: 0; }

/* Separador vertical entre grupos de acciones */
.acciones-sep { width: 1px; height: 20px; background: #dee2e6; margin: 0 .2rem; }

/* Selector de vista (Lista / Kanban) tipo segmentado */
.vista-toggle {
    display: inline-flex;
    padding: 2px;
    border: 1px solid #9da1a6;
    border-radius: 999px;
    background: #f1f3f5;
}
.vista-toggle a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .15rem .75rem;
    border-radius: 999px;
    color: #495057;
    font-size: .8rem;
    text-decoration: none;
}
.vista-toggle a:hover { background: #e9ecef; }
.vista-toggle a.active { background: #fde6ee; color: #E50051; font-weight: 500; box-shadow: 0 0 0 1px #f173a0; }

/* Menús desplegables de acciones */
.menu-acciones {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: .3rem;
    font-size: .82rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}
.menu-acciones .dropdown-item { border-radius: 8px; padding: .35rem .7rem; color: #495057; }
.menu-acciones .dropdown-item i { width: 1.1rem; color: #6c757d; }
.menu-acciones .dropdown-item:hover,
.menu-acciones .dropdown-item:focus { background: #f1f3f5; color: #495057; }
.btn-accion:disabled { opacity: .45; cursor: default; background: transparent; border-color: transparent; }
.btn-accion:disabled .contador { display: none; }

/* Botón secundario con texto (Cancelar, Cerrar…): píldora gris como el chip sin pulsar */
.btn-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    height: 32px;
    padding: 0 .9rem;
    border: 1px solid #9da1a6;
    border-radius: 999px;
    background: #f1f3f5;
    color: #495057;
    font-size: .82rem;
    white-space: nowrap;
    transition: background-color .15s;
}
.btn-pill:hover { background: #e9ecef; color: #495057; }

/* ── Modales ── */
.modal-gt .modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
}
.modal-gt .modal-header {
    justify-content: space-between;
    border-bottom: 0;
    padding: 1rem 1rem .5rem 1.25rem;
}
.modal-gt .modal-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1rem;
    font-weight: 600;
    color: #343a40;
}
.modal-gt .modal-title-icon,
.tarjeta-gt-titulo .modal-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fde6ee;
    color: #E50051;
    font-size: .8rem;
}
.modal-gt .modal-body { padding: .5rem 1.25rem 1rem; }
.modal-gt .modal-footer {
    border-top: 0;
    padding: .5rem 1.25rem 1.1rem;
    gap: .4rem;
}
.modal-gt .modal-footer > * { margin: 0; }

/* Nota informativa neutra dentro del modal */
.modal-gt .nota-modal {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    background: #f1f3f5;
    border-radius: 10px;
    padding: .5rem .75rem;
    color: #495057;
    font-size: .8rem;
    margin-bottom: 1rem;
}
.modal-gt .nota-modal i { color: #6c757d; margin-top: .15rem; }

/* Campos: redondeados, gris pastel en reposo, rosa al enfocar (como el buscador) */
.modal-gt .form-label,
.form-gt .form-label { font-size: .78rem; font-weight: 500; color: #6c757d; margin-bottom: .25rem; }
.modal-gt .form-control,
.modal-gt .form-select,
.form-gt .form-control,
.form-gt .form-select {
    border: 1px solid #ced4da;
    border-radius: 10px;
    background-color: #f8f9fa;
    font-size: .85rem;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.modal-gt .form-control:focus,
.modal-gt .form-select:focus,
.form-gt .form-control:focus,
.form-gt .form-select:focus {
    background-color: #fff;
    border-color: #f173a0;
    box-shadow: 0 0 0 3px rgba(229, 0, 81, .10);
}
.modal-gt .form-text,
.form-gt .form-text { font-size: .75rem; color: #8a9096; }
.btn-pill.btn-pill-sm { height: 26px; padding: 0 .7rem; font-size: .76rem; }
.btn-principal.btn-principal-sm { height: 26px; padding: 0 .7rem; font-size: .76rem; }
.btn-pill.peligro:hover { background: #fde6ee; border-color: #f173a0; color: #E50051; }
.btn-crear:disabled { opacity: .5; cursor: default; }
a.btn-pill, a.btn-crear, a.btn-principal { text-decoration: none; }

/* ── Pantalla de configuración: grupos tipo "ajustes" ── */
.ajustes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 0 1rem;
    align-items: start;
}
.ajustes-grupo { margin-bottom: 1rem; }
.ajustes-grupo-titulo {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #8a9096;
    margin: 0 0 .4rem .9rem;
}
.ajustes-lista {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    overflow: hidden;
}
.ajustes-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .9rem;
    color: #343a40;
    text-decoration: none;
    transition: background-color .15s;
}
.ajustes-item + .ajustes-item { border-top: 1px solid #f1f3f5; }
.ajustes-item:hover { background: #f8f9fa; color: #343a40; }
.ajustes-item-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f3f5;
    color: #495057;
    font-size: .85rem;
    flex-shrink: 0;
    transition: background-color .15s, color .15s;
}
.ajustes-item:hover .ajustes-item-icono { background: #fde6ee; color: #E50051; }
.ajustes-item-texto { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.ajustes-item-titulo { font-size: .86rem; font-weight: 500; }
.ajustes-item-desc { font-size: .75rem; color: #8a9096; line-height: 1.3; }
.ajustes-item-flecha { color: #ced4da; font-size: .7rem; transition: color .15s, transform .15s; }
.ajustes-item:hover .ajustes-item-flecha { color: #E50051; transform: translateX(2px); }

/* Etiqueta informativa en rosa pastel (no interactiva), p. ej. "Predeterminada" */
.etiqueta-rosa {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .1rem .55rem;
    border: 1px solid #f173a0;
    border-radius: 999px;
    background: #fde6ee;
    color: #E50051;
    font-size: .72rem;
    font-weight: 500;
    line-height: 1.4;
    vertical-align: middle;
    white-space: nowrap;
}

/* ── Tabla de listado estilo "lista de chats" (propuesta en Tickets) ── */
.tabla-gt-card { border-radius: 14px; overflow: hidden; }
.tabla-gt { margin-bottom: 0; }
.tabla-gt thead th {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    color: #8a9096;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    padding-top: .65rem;
    padding-bottom: .65rem;
    user-select: none;
}
.tabla-gt thead th[onclick]:hover { color: #495057; }
.tabla-gt thead th .fa-sort { color: #ced4da !important; }
.tabla-gt thead th .fa-sort-up,
.tabla-gt thead th .fa-sort-down { color: #E50051; }
.tabla-gt thead th.orden-activo { color: #E50051; }
.tabla-gt tbody td {
    border-bottom: 1px solid #f1f3f5;
    padding-top: .55rem;
    padding-bottom: .55rem;
    vertical-align: middle;
}
.tabla-gt tbody tr:last-child td { border-bottom: 0; }
.tabla-gt.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f8f9fa; }
/* Registro cerrado: atenuado, sin fondo gris */
.tabla-gt tbody tr.fila-cerrada td { color: #9aa0a6; }
.tabla-gt tbody tr.fila-cerrada .avatar-gt { opacity: .6; }

.celda-id { color: #8a9096; font-size: .78rem; font-variant-numeric: tabular-nums; }
.celda-persona { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.celda-persona-texto { display: flex; flex-direction: column; min-width: 0; }
.celda-persona-nombre { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.celda-persona-sub { font-size: .74rem; color: #8a9096; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.celda-asunto { max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.celda-fecha { white-space: nowrap; line-height: 1.2; }
.celda-fecha small { display: block; color: #8a9096; font-size: .72rem; }

.avatar-gt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f3f5;
    color: #495057;
    font-size: .72rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: background-color .15s, color .15s;
}
.tabla-gt tbody tr:hover .avatar-gt { background: #fde6ee; color: #E50051; }

/* Indicador con punto de color (prioridad, estado): el color solo en el punto */
.punto-gt {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    white-space: nowrap;
}
.punto-gt::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--punto, #adb5bd);
    flex-shrink: 0;
}
.punto-gt.estado-pill {
    padding: .1rem .6rem;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    background: #fff;
    font-size: .74rem;
}
.icono-origen { color: #8a9096; font-size: .85rem; }

/* Paginación en píldoras */
.paginacion-gt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .6rem 1rem;
    border-top: 1px solid #f1f3f5;
    font-size: .78rem;
    color: #8a9096;
}
.paginacion-gt-paginas { display: flex; align-items: center; gap: .25rem; }
.paginacion-gt-paginas .pag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 .45rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #495057;
    font-size: .78rem;
    text-decoration: none;
}
.paginacion-gt-paginas .pag:hover { background: #f1f3f5; border-color: #9da1a6; }
.paginacion-gt-paginas .pag.active { background: #fde6ee; border-color: #f173a0; color: #E50051; font-weight: 600; }
.paginacion-gt-paginas .pag.disabled { opacity: .35; pointer-events: none; }
.paginacion-gt-paginas .pag-sep { color: #adb5bd; padding: 0 .15rem; }

/* ── Mi perfil ── */
.perfil-cabecera {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.perfil-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fde6ee;
    color: #E50051;
    font-size: 1.35rem;
    font-weight: 600;
    flex-shrink: 0;
}
.perfil-nombre { font-size: 1.1rem; font-weight: 600; color: #343a40; }
.perfil-email { font-size: .82rem; color: #8a9096; }
.perfil-datos {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.25rem;
    margin-left: auto;
    font-size: .76rem;
    color: #8a9096;
}
.perfil-datos strong { display: block; color: #495057; font-weight: 500; font-size: .8rem; }
.tarjeta-gt { border-radius: 14px; }
.tarjeta-gt .card-body { padding: 1rem 1.25rem; }
.tarjeta-gt-titulo {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .95rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: .9rem;
}

/* ── Pantallas de acceso (login, recuperar contraseña…) del backoffice y del portal ── */
.auth-body {
    background-color: #f4f6f9;
    display: flex;
    align-items: center;
    min-height: 100vh;
}
.auth-contenedor {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    margin: auto;
}
/* La hoja global fuerza .card-body a .75rem: las tarjetas de acceso necesitan más aire */
.auth-card .card-body { padding: 1.75rem 1.5rem !important; }
.auth-cabecera { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin-bottom: 1.25rem; text-align: center; }
.auth-titulo { font-size: 1.15rem; font-weight: 600; color: #343a40; margin: 0; }
.auth-subtitulo { font-size: .82rem; color: #8a9096; margin: 0; }
.auth-enlace { color: #6c757d; text-decoration: none; }
.auth-enlace:hover { color: #E50051; text-decoration: underline; }
.auth-nota { display: flex; align-items: flex-start; gap: .5rem; background: #f1f3f5; border-radius: 10px; padding: .5rem .75rem; color: #495057; font-size: .8rem; margin-bottom: 1rem; }
.auth-nota i { color: #6c757d; margin-top: .15rem; }

/* ── Menú lateral claro, agrupado (propuesta) ── */
.sidebar.sidebar-gt {
    background: #fff;
    color: #495057;
    border-right: 1px solid #e9ecef;
    overflow-y: auto;
}
.sidebar.sidebar-gt .menu-grupo-titulo {
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9aa0a6;
    padding: .9rem .75rem .3rem;
}
.sidebar.sidebar-gt .menu-grupo { gap: 2px; }
.sidebar.sidebar-gt a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .42rem .75rem !important;
    border-radius: 999px;
    color: #495057;
    font-size: .84rem;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}
.sidebar.sidebar-gt a i { width: 18px; text-align: center; color: #8a9096; transition: color .15s; }
.sidebar.sidebar-gt a:hover { background: #f1f3f5; color: #343a40; }
.sidebar.sidebar-gt a:hover i { color: #495057; }
.sidebar.sidebar-gt a.active {
    background: #fde6ee;
    color: #E50051;
    font-weight: 500;
}
.sidebar.sidebar-gt a.active i { color: #E50051; }
.sidebar.sidebar-gt .menu-texto { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar.sidebar-gt .menu-contador {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #E50051;
    color: #fff;
    font-size: .64rem;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Barra superior clara (a juego con el menú lateral) ── */
.navbar.navbar-gt {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    min-height: 52px;
    padding-top: .3rem;
    padding-bottom: .3rem;
}
.navbar-gt-marca {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: 1rem;
    font-weight: 600;
    color: #343a40;
}
.navbar-gt-marca:hover { color: #343a40; }
.navbar-gt-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fde6ee;
    color: #E50051;
    font-size: .85rem;
}
.navbar-gt-usuario {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .15rem .6rem .15rem .15rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #495057;
    font-size: .84rem;
    transition: background-color .15s, border-color .15s;
}
.navbar-gt-usuario:hover,
.navbar-gt-usuario.show { background: #f1f3f5; border-color: #9da1a6; }
.navbar-gt-usuario .avatar-gt { background: #fde6ee; color: #E50051; }
.navbar-gt-flecha { font-size: .6rem; color: #9aa0a6; }
.notif-dropdown.menu-acciones { padding: 0; overflow: hidden; }
.notif-dropdown-cabecera {
    padding: .6rem .9rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #8a9096;
    border-bottom: 1px solid #f1f3f5;
}

/* ── Mensajes: chats estilo WhatsApp (app/views/mensajes/_chat.php + assets/js/chat-gt.js) ── */
.chat-gt {
    display: flex;
    height: calc(100vh - 150px);
    min-height: 440px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}
.chat-gt-lista {
    display: flex;
    flex-direction: column;
    width: 340px;
    flex-shrink: 0;
    border-right: 1px solid #f1f3f5;
    min-width: 0;
}
.chat-gt-lista-cabecera { padding: .75rem .75rem .5rem; display: flex; flex-direction: column; gap: .5rem; }
.chat-gt-lista-cabecera .chips-filtro { display: flex; gap: .35rem; flex-wrap: wrap; }
.chat-gt-items { flex: 1 1 auto; overflow-y: auto; }
.chat-gt-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    padding: .6rem .75rem;
    border: 0;
    background: transparent;
    text-align: left;
    color: #343a40;
    cursor: pointer;
    transition: background-color .12s;
}
.chat-gt-item + .chat-gt-item { border-top: 1px solid #f8f9fa; }
.chat-gt-item:hover { background: #f8f9fa; }
.chat-gt-item.active { background: #fde6ee; }
.chat-gt-item.active .avatar-gt { background: #fff; color: #E50051; }
.chat-gt-item .avatar-gt { width: 40px; height: 40px; font-size: .8rem; }
.chat-gt-item-texto { flex: 1 1 auto; min-width: 0; }
.chat-gt-item-fila { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.chat-gt-item-nombre { flex: 1 1 auto; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-gt-item-hora { font-size: .72rem; color: #8a9096; flex-shrink: 0; }
.chat-gt-item.no-leido .chat-gt-item-hora { color: #E50051; font-weight: 600; }
.chat-gt-item-preview { flex: 1 1 auto; font-size: .8rem; color: #6c757d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-gt-item.no-leido .chat-gt-item-preview { color: #343a40; }
.chat-gt-item-icono { font-size: .72rem; color: #9aa0a6; flex-shrink: 0; }
.chat-gt-no-leidos {
    min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
    background: #E50051; color: #fff; font-size: .68rem; font-weight: 600;
    line-height: 19px; text-align: center; flex-shrink: 0;
}
.chat-gt-vacio { padding: 2.5rem 1rem; text-align: center; color: #8a9096; font-size: .85rem; }
.chat-gt-vacio i { display: block; font-size: 2rem; margin-bottom: .6rem; color: #ced4da; }

.chat-gt-panel { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; background: #f8f9fa; }
.chat-gt-panel-vacio { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #8a9096; gap: .4rem; }
.chat-gt-panel-vacio i { font-size: 2.6rem; color: #f5a3c0; }
.chat-gt-cabecera {
    display: flex; align-items: center; gap: .65rem;
    padding: .55rem .75rem; background: #fff; border-bottom: 1px solid #f1f3f5;
}
.chat-gt-cabecera .avatar-gt { width: 36px; height: 36px; background: #fde6ee; color: #E50051; }
.chat-gt-cabecera-texto { flex: 1 1 auto; min-width: 0; cursor: pointer; }
.chat-gt-cabecera-nombre { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-gt-cabecera-sub { font-size: .74rem; color: #8a9096; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-gt-volver { display: none; }

.chat-gt-mensajes { flex: 1 1 auto; overflow-y: auto; padding: .75rem 1rem; display: flex; flex-direction: column; gap: .2rem; }
.chat-gt-dia { align-self: center; margin: .6rem 0 .3rem; padding: .15rem .7rem; border-radius: 999px; background: #fff; border: 1px solid #e9ecef; font-size: .72rem; color: #6c757d; }
.chat-gt-evento { align-self: center; max-width: 80%; margin: .25rem 0; padding: .2rem .75rem; border-radius: 8px; background: #f1f3f5; color: #6c757d; font-size: .74rem; text-align: center; }
.chat-gt-fila { display: flex; }
.chat-gt-fila.mia { justify-content: flex-end; }
.chat-gt-fila.seguida { margin-top: -.05rem; }
.chat-gt-burbuja {
    position: relative;
    max-width: min(72%, 560px);
    padding: .4rem .6rem .3rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e9ecef;
    font-size: .86rem;
    line-height: 1.35;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.chat-gt-fila.mia .chat-gt-burbuja { background: #fde6ee; border-color: #f7c1d4; }
.chat-gt-burbuja:has(.chat-gt-burbuja-menu) { padding-right: 1.6rem; }
.chat-gt-burbuja-autor { font-size: .74rem; font-weight: 600; color: #E50051; margin-bottom: .1rem; }
.chat-gt-burbuja-texto { white-space: pre-wrap; }
.chat-gt-burbuja-pie { display: flex; justify-content: flex-end; align-items: center; gap: .3rem; margin-top: .1rem; font-size: .68rem; color: #8a9096; }
.chat-gt-burbuja.eliminado .chat-gt-burbuja-texto { font-style: italic; color: #8a9096; }
.chat-gt-check { font-size: .68rem; color: #9aa0a6; }
/* Responder (cita), reenviado, búsqueda y salto a un mensaje */
.chat-gt-cita {
    display: block; width: 100%; margin: .1rem 0 .25rem; padding: .25rem .5rem; border: 0; border-left: 3px solid #f173a0;
    border-radius: 6px; background: rgba(241,243,245,.9); text-align: left; font-size: .76rem; color: #6c757d; cursor: pointer;
}
.chat-gt-fila.mia .chat-gt-cita { background: rgba(255,255,255,.7); }
.chat-gt-cita-autor { display: block; font-weight: 600; color: #E50051; }
.chat-gt-cita-texto { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.chat-gt-reenviado { font-size: .7rem; font-style: italic; color: #8a9096; margin-bottom: .1rem; }
.chat-gt-burbuja.resaltado { box-shadow: 0 0 0 3px rgba(229,0,81,.25); transition: box-shadow .3s; }
.chat-gt-respuesta { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.chat-gt-respuesta .chat-gt-cita { margin: 0; cursor: default; flex: 1 1 auto; min-width: 0; }
.chat-gt-resultado { display: block; width: 100%; padding: .45rem .75rem; border: 0; background: #fff; text-align: left; color: #343a40; }
.chat-gt-resultado + .chat-gt-resultado { border-top: 1px solid #f8f9fa; }
.chat-gt-resultado:hover { background: #f8f9fa; }
.chat-gt-resultado-texto { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .8rem; color: #6c757d; }
.chat-gt-resultado mark { padding: 0; background: #fde6ee; color: #E50051; }
.chat-gt-resultados { max-height: 360px; overflow-y: auto; text-align: left; margin: 0 -.5rem; }
.chat-gt-check.leido { color: #E50051; }
.chat-gt-adjunto {
    display: flex; align-items: center; gap: .45rem; margin: .25rem 0 .1rem;
    padding: .35rem .55rem; border-radius: 8px; background: rgba(255,255,255,.75); border: 1px solid #e9ecef;
    color: #495057; font-size: .8rem; text-decoration: none;
}
.chat-gt-adjunto:hover { border-color: #f173a0; color: #E50051; }
.chat-gt-adjunto small { color: #8a9096; margin-left: auto; }
/* Notas de voz (se graban en la app; aquí solo se escuchan) */
.chat-gt-voz { display: flex; align-items: center; gap: .55rem; width: 260px; max-width: 100%; margin: .2rem 0 .05rem; }
.chat-gt-voz-play {
    flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border-radius: 50%;
    border: 1px solid #9da1a6; background: #f1f3f5; color: #495057; font-size: .8rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.chat-gt-voz-play:hover, .chat-gt-voz.sonando .chat-gt-voz-play { background: #fde6ee; border-color: #f173a0; color: #E50051; }
.chat-gt-voz-play .fa-play { margin-left: 2px; }
.chat-gt-voz-cuerpo { flex: 1 1 auto; min-width: 0; }
.chat-gt-voz-onda { display: flex; align-items: center; gap: 2px; height: 26px; cursor: pointer; }
.chat-gt-voz-onda span { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: #c3c7cb; transition: background .1s; }
.chat-gt-voz-onda span.oida { background: #E50051; }
.chat-gt-voz-info { display: flex; align-items: center; justify-content: space-between; margin-top: .05rem; font-size: .68rem; color: #8a9096; }
.chat-gt-voz-vel {
    padding: 0 .4rem; border: 1px solid #dee2e6; border-radius: 999px; background: rgba(255,255,255,.8);
    font-size: .66rem; font-weight: 600; color: #6c757d; line-height: 1.4;
}
.chat-gt-voz-vel:hover { border-color: #f173a0; color: #E50051; }
.chat-gt-burbuja-menu {
    position: absolute; top: 2px; right: 2px;
    width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: #8a9096; font-size: .7rem;
    opacity: 0; transition: opacity .12s;
}
.chat-gt-burbuja:hover .chat-gt-burbuja-menu,
.chat-gt-burbuja-menu.show { opacity: 1; background: rgba(241,243,245,.95); }
.chat-gt-nuevos {
    position: absolute; right: 1.25rem; bottom: 5rem;
    border: 1px solid #f173a0; background: #fde6ee; color: #E50051;
    border-radius: 999px; padding: .25rem .75rem; font-size: .76rem; box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.chat-gt-anteriores { align-self: center; }

.chat-gt-composer { background: #fff; border-top: 1px solid #f1f3f5; padding: .5rem .75rem; }
.chat-gt-composer-fila { display: flex; align-items: flex-end; gap: .5rem; }
.chat-gt-composer textarea {
    flex: 1 1 auto; resize: none; min-height: 38px; max-height: 140px;
    border: 1px solid #dee2e6; border-radius: 19px; background: #f8f9fa;
    padding: .45rem .9rem; font-size: .86rem; line-height: 1.35; outline: none;
}
.chat-gt-composer textarea:focus { background: #fff; border-color: #f173a0; box-shadow: 0 0 0 3px rgba(229,0,81,.10); }
.chat-gt-enviar { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; }
.chat-gt-pendientes { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .4rem; }
.chat-gt-pendiente { display: inline-flex; align-items: center; gap: .35rem; max-width: 220px; padding: .15rem .3rem .15rem .6rem; border-radius: 999px; background: #f1f3f5; font-size: .74rem; }
.chat-gt-pendiente span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-gt-solo-lectura { padding: .7rem; text-align: center; font-size: .8rem; color: #8a9096; background: #fff; border-top: 1px solid #f1f3f5; }

/* Selector de contactos de los modales de chat */
.chat-gt-contactos { max-height: 320px; overflow-y: auto; margin: .5rem -.25rem 0; }
.chat-gt-contacto {
    display: flex; align-items: center; gap: .6rem; width: 100%;
    padding: .45rem .5rem; border: 0; border-radius: 8px; background: transparent; text-align: left; color: #343a40;
}
.chat-gt-contacto:hover { background: #f8f9fa; }
.chat-gt-contacto.seleccionado { background: #fde6ee; }
.chat-gt-contacto.seleccionado .avatar-gt { background: #fff; color: #E50051; }
.chat-gt-contacto .chat-gt-contacto-check { margin-left: auto; color: #E50051; visibility: hidden; }
.chat-gt-contacto.seleccionado .chat-gt-contacto-check { visibility: visible; }
.chat-gt-seccion { font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #8a9096; padding: .6rem .5rem .2rem; }
.chat-gt-participante { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; }
.chat-gt-participante + .chat-gt-participante { border-top: 1px solid #f8f9fa; }
.chat-gt-participante.inactivo { opacity: .55; }

@media (max-width: 767.98px) {
    .chat-gt { height: calc(100vh - 120px); border-radius: 0; margin: 0 -1rem; }
    .chat-gt-lista { width: 100%; border-right: 0; }
    .chat-gt-panel { display: none; }
    .chat-gt.abierto .chat-gt-lista { display: none; }
    .chat-gt.abierto .chat-gt-panel { display: flex; }
    .chat-gt-volver { display: inline-flex; }
    .chat-gt-burbuja { max-width: 85%; }
    .chat-gt-burbuja-menu { opacity: 1; }
}

/* ══ Drawer de detalle "gt" (todos los listados) ══
   Panel flotante a toda altura: cabecera con identidad y acciones, pestañas
   segmentadas con contador (opcionales) y cuerpo gris con secciones blancas.
   Estructura:
     .detail-drawer.drawer-gt
       .drawer-gt-hero-wrap > .drawer-gt-hero (+ ul.drawer-gt-tabs opcional)
       .drawer-gt-body            (sin pestañas: scroll propio)
       .tab-content.drawer-gt-body > .tab-pane (con pestañas: scroll por pestaña) */
.drawer-overlay.drawer-overlay-gt {
    top: 0;
    left: 0;
    background: rgba(33, 37, 41, .28);
    backdrop-filter: blur(2px);
}
.detail-drawer.drawer-gt {
    top: 12px;
    bottom: 12px;
    right: calc(-1 * min(620px, 100vw - 24px) - 24px);
    width: min(620px, 100vw - 24px);
    border-radius: 18px;
    background: #f8f9fa;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
    overflow: hidden;
    transition: right .28s cubic-bezier(.2, .8, .2, 1);
}
.detail-drawer.drawer-gt.open { right: 12px; }

/* Cabecera: avatar + título + subtítulo; acciones a la derecha */
.drawer-gt-hero {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1.1rem 1rem .9rem 1.25rem;
    background: #fff;
    flex-shrink: 0;
}
.drawer-gt-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #fde6ee;
    color: #E50051;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
    flex-shrink: 0;
}
.drawer-gt.inactivo .drawer-gt-avatar { background: #f1f3f5; color: #8a9096; }
.drawer-gt-titulos { flex: 1 1 auto; min-width: 0; }
.drawer-gt-titulo {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #343a40;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.drawer-gt-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .6rem;
    margin-top: .3rem;
    font-size: .78rem;
    color: #8a9096;
}
.drawer-gt-codigo {
    font-family: SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .74rem;
    color: #495057;
    background: #f1f3f5;
    border-radius: 6px;
    padding: .05rem .4rem;
}
.drawer-gt-acciones { display: flex; align-items: center; gap: .15rem; flex-shrink: 0; }

/* Pestañas segmentadas con contador (mismo lenguaje que .vista-toggle) */
.drawer-gt-tabs {
    display: flex;
    gap: 2px;
    margin: 0 1rem .85rem 1.25rem;
    padding: 3px;
    border-radius: 999px;
    background: #f1f3f5;
    list-style: none;
    flex-shrink: 0;
}
.drawer-gt-hero-wrap { background: #fff; border-bottom: 1px solid #eceef0; flex-shrink: 0; }
.drawer-gt-tabs .nav-link {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .3rem .5rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #6c757d;
    font-size: .8rem;
    white-space: nowrap;
    transition: background-color .15s, color .15s;
}
.drawer-gt-tabs .nav-link:hover { color: #343a40; }
.drawer-gt-tabs .nav-link.active {
    background: #fff;
    color: #E50051;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.drawer-gt-tabs .tab-contador {
    min-width: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e3e6e9;
    color: #495057;
    font-size: .66rem;
    font-weight: 600;
    line-height: 17px;
    text-align: center;
}
.drawer-gt-tabs .tab-contador:empty { display: none; }
.drawer-gt-tabs .nav-link.active .tab-contador { background: #fde6ee; color: #E50051; }

/* Cuerpo: cada pestaña hace scroll propio; sin pestañas, el cuerpo entero */
.drawer-gt .drawer-gt-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.drawer-gt .drawer-gt-body:not(.tab-content) {
    padding: 1rem 1rem 1.25rem 1.25rem;
    overflow-y: auto;
    gap: .85rem;
}
.drawer-gt .drawer-gt-body > .tab-pane.show.active {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 1rem 1rem 1.25rem 1.25rem;
    overflow-y: auto;
    gap: .85rem;
}
/* Los hijos del cuerpo con scroll no deben encogerse: una sección con
   overflow:hidden (p. ej. .sin-padding) colocada directamente en la pestaña
   se encogía al alto visible y recortaba la lista, dejando el scroll sin efecto. */
.drawer-gt .drawer-gt-body:not(.tab-content) > *,
.drawer-gt .drawer-gt-body > .tab-pane.show.active > * { flex-shrink: 0; }

/* Secciones: tarjeta blanca con título en versalitas */
.drawer-gt-seccion {
    background: #fff;
    border-radius: 14px;
    padding: .8rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.drawer-gt-seccion-titulo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .45rem;
    color: #8a9096;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.drawer-gt-seccion.sin-padding { padding: 0; overflow: hidden; }
.drawer-gt-seccion.sin-padding > .drawer-gt-seccion-titulo { padding: .8rem 1rem 0; }

/* Pares etiqueta / valor */
.dato-gt {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: .75rem;
    padding: .45rem 0;
    font-size: .85rem;
}
.dato-gt + .dato-gt { border-top: 1px solid #f1f3f5; }
.dato-gt-label { color: #8a9096; }
.dato-gt-valor { color: #343a40; min-width: 0; overflow-wrap: anywhere; }
.dato-gt-valor small { color: #8a9096; }
.dato-gt-vacio { color: #adb5bd; }

/* Resumen en fichas: la de prorrata informa, las demás saltan a su pestaña */
/* Tantas columnas iguales como fichas haya (2, 3 o 4); en móvil, dos por fila */
.kpis-gt { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .6rem; }
.kpi-gt {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    padding: .7rem .8rem;
    border: 1px solid transparent;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    text-align: left;
    color: #343a40;
    transition: border-color .15s, background-color .15s;
}
button.kpi-gt:hover { border-color: #f173a0; background: #fffafc; }
.kpi-gt-icono { color: #adb5bd; font-size: .8rem; }
button.kpi-gt:hover .kpi-gt-icono { color: #E50051; }
.kpi-gt-valor { font-size: 1.2rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-gt-valor.texto { font-size: 1rem; }
.kpi-gt-label { font-size: .72rem; color: #8a9096; }

.drawer-gt-meta { font-size: .72rem; color: #adb5bd; text-align: center; }

/* Listas de elementos asignados */
.lista-gt { list-style: none; margin: 0; padding: 0; }
.lista-gt-item { display: flex; align-items: center; gap: .7rem; padding: .6rem 1rem; }
.lista-gt-item + .lista-gt-item,
.lista-gt-grupo + .lista-gt-grupo { border-top: 1px solid #f1f3f5; }
.lista-gt-texto { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.lista-gt-principal { font-weight: 500; color: #343a40; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista-gt-sub { font-size: .74rem; color: #8a9096; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista-gt-importe { font-size: .8rem; color: #495057; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lista-gt-icono {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 10px;
    background: #f1f3f5; color: #6c757d; font-size: .8rem; flex-shrink: 0;
}
.lista-gt-item .btn-accion { opacity: .35; transition: opacity .15s; }
.lista-gt-item:hover .btn-accion,
.lista-gt-item .btn-accion:focus-visible { opacity: 1; }
.lista-gt-cabecera { cursor: pointer; }
.lista-gt-cabecera:hover { background: #fcfcfd; }
.lista-gt-cabecera .fa-chevron-down { color: #adb5bd; font-size: .7rem; transition: transform .2s; }
.lista-gt-grupo.abierto .lista-gt-cabecera .fa-chevron-down { transform: rotate(180deg); }
.lista-gt-hijos { display: none; background: #fafbfc; }
.lista-gt-grupo.abierto .lista-gt-hijos { display: block; }
.lista-gt-hijos .lista-gt-item { padding-left: 3.3rem; }
.lista-gt-item.fila-cerrada { opacity: .6; }
.lista-gt-vacio { padding: 1.5rem 1rem; text-align: center; color: #adb5bd; font-size: .82rem; }
.lista-gt-vacio i { display: block; font-size: 1.4rem; margin-bottom: .4rem; color: #dee2e6; }

/* Etiquetas de tarifa: gris; la principal en rosa pastel */
.etiquetas-gt { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; }
.etiqueta-gt {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .05rem .5rem; border: 1px solid #dee2e6; border-radius: 999px;
    background: #fff; color: #495057; font-size: .7rem; white-space: nowrap;
}
.etiqueta-gt.principal { border-color: #f173a0; background: #fde6ee; color: #E50051; }

/* Formulario de alta plegable dentro de una sección */
.alta-gt { display: none; padding-top: .5rem; }
.drawer-gt-seccion.alta-abierta .alta-gt { display: block; }
.drawer-gt-seccion.alta-abierta .btn-toggle-alta i { transform: rotate(45deg); }
.btn-toggle-alta i { transition: transform .15s; }
.drawer-gt-seccion.sin-padding > .alta-gt { padding: .5rem 1rem .6rem; }

.drawer-gt .spinner-gt { padding: 2rem; text-align: center; color: #adb5bd; }

@media (max-width: 575.98px) {
    .detail-drawer.drawer-gt { top: 0; bottom: 0; width: 100vw; border-radius: 0; right: -100vw; }
    .detail-drawer.drawer-gt.open { right: 0; }
    .kpis-gt { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
    .dato-gt { grid-template-columns: 1fr; gap: .1rem; }
    .drawer-gt-tabs .nav-link .tab-texto { display: none; }
}

/* ── Prestación 68: adjuntos de tickets y seguimiento (adjuntos-gt.js) ── */
.adjuntos-gt-selector { display: flex; flex-direction: column; gap: .4rem; }
.adjuntos-gt-selector-fila { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.adjuntos-gt-ayuda { font-size: .72rem; color: #8a9096; }
.adjuntos-gt-pendientes { display: flex; flex-wrap: wrap; gap: .35rem; }
.adjuntos-gt-pendientes:empty { display: none; }
.adjunto-gt-pendiente {
    display: inline-flex; align-items: center; gap: .35rem; max-width: 240px;
    padding: .15rem .25rem .15rem .2rem; border: 1px solid #dee2e6; border-radius: 999px;
    background: #f1f3f5; font-size: .74rem; color: #495057;
}
.adjunto-gt-pendiente img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.adjunto-gt-pendiente > i { width: 24px; text-align: center; color: #6c757d; }
.adjunto-gt-pendiente span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adjunto-gt-pendiente button { border: 0; background: transparent; color: #6c757d; padding: 0 .3rem; line-height: 1; }
.adjunto-gt-pendiente button:hover { color: #E50051; }

.adjuntos-gt-lista { display: flex; flex-direction: column; gap: .35rem; margin-top: .4rem; }
.adjuntos-gt-lista.en-seccion { padding: .6rem 1rem; margin-top: 0; }
.adjuntos-gt-miniaturas { display: flex; flex-wrap: wrap; gap: .4rem; }
.adjunto-gt-mini {
    position: relative; display: block; width: 72px; height: 72px; border-radius: 10px; overflow: hidden;
    border: 1px solid #dee2e6; background: #f1f3f5;
}
.adjunto-gt-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adjunto-gt-fichero {
    display: flex; align-items: center; gap: .55rem; padding: .3rem .5rem; border: 1px solid #e9ecef;
    border-radius: 10px; background: #fff; color: #495057; text-decoration: none; font-size: .8rem;
}
.adjunto-gt-fichero:hover { background: #f8f9fa; color: #343a40; }
.adjunto-gt-fichero > i { font-size: 1.05rem; color: #6c757d; width: 1.2rem; text-align: center; }
.adjunto-gt-fichero .adjunto-gt-nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adjunto-gt-fichero .adjunto-gt-meta { font-size: .7rem; color: #8a9096; white-space: nowrap; }
.adjunto-gt-item { display: flex; align-items: center; gap: .3rem; }
.adjunto-gt-item .adjunto-gt-fichero { flex: 1; min-width: 0; }
.adjunto-gt-mini-wrap { position: relative; }
.adjunto-gt-mini-wrap .btn-accion {
    position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; font-size: .65rem;
    background: rgba(255, 255, 255, .9); opacity: 0; transition: opacity .15s;
}
.adjunto-gt-mini-wrap:hover .btn-accion, .adjunto-gt-mini-wrap .btn-accion:focus-visible { opacity: 1; }
.adjunto-gt-contexto { font-size: .68rem; color: #8a9096; }
@media (hover: none) { .adjunto-gt-mini-wrap .btn-accion { opacity: 1; } }

/* ── Prestación 66: avatar con foto (GT.avatar / gt_avatar_html) ──
   La foto ocupa el círculo (o el cuadrado redondeado del drawer); si no
   carga, GT.fotoFallida() vuelve a las iniciales y quita .con-foto. */
.avatar-gt.con-foto,
.perfil-avatar.con-foto,
.drawer-gt-avatar.con-foto { background: #f1f3f5; overflow: hidden; padding: 0; }
.avatar-gt.con-foto img,
.perfil-avatar.con-foto img,
.drawer-gt-avatar.con-foto img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.tabla-gt tbody tr:hover .avatar-gt.con-foto { background: #f1f3f5; }
.perfil-avatar-editable { position: relative; display: inline-flex; flex-shrink: 0; }
.perfil-avatar-editable .perfil-avatar-boton {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #9da1a6;
    background: #fff;
    color: #495057;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    padding: 0;
}
.perfil-avatar-editable .perfil-avatar-boton:hover { background: #fde6ee; border-color: #f173a0; color: #E50051; }
