* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

.flex-column-div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.general-table {
    border-collapse: collapse;
    margin: 10px;
}

.general-table th {
    border: solid 0px;
    padding: 4px 8px;
    background-color: #d9d9d9;
}

.general-table td {
    padding: 3px 7px;
    border-bottom: 1px solid #d9d9d9;
    background-color: #e4f2f5;
    max-width: 650px;
}

.general-table-gr {
    background-color: #e5e5e5;
    border-radius: 20px;
    padding: 10px;
    min-width: 400px;
    table-layout: auto;
}

.general-table-gr .col-label {
    width: 260px;
    /* el ancho que quieras para la etiqueta */
    white-space: nowrap;
}

.general-table-gr .col-fill {
    width: auto;
    /* que las 3 columnas restantes se repartan */
}

/* Asegura que la celda con colspan "toma" todo el ancho disponible */
.general-table-gr td[colspan="3"] {
    width: 100%;
}

/* Y que el textarea llene esa celda */
.general-table-gr td[colspan="3"] .general-textarea {
    width: 100%;
    display: block;
    /* evita que el inline afecte el tamaño */
}

.general-table-gr td {
    padding: 3px 7px;
    min-width: 140px;
    max-width: 270px;
}

.general-table-gr-tk {
    background-color: #e5e5e5;
    border-radius: 20px;
    padding: 10px;
    min-width: 400px;
}

.general-table-gr-tk td {
    padding: 3px 7px;
    min-width: 140px;
    border-bottom: 1px solid #d9d9d9;
    height: 50px;
}

.general-td-s {
    width: 190px;
}

.general-td-l {
    width: 500px;
}

.general-table-gr-ct {
    background-color: #e5e5e5;
    border-radius: 20px;
    padding: 10px;
    min-width: 400px;
}

.general-td-ct-l {
    padding: 3px 7px;
    min-width: 160px;
    max-width: 170px;
}

.general-td-ct-r {
    padding: 3px 7px;
    width: 450px;
    max-width: 450px;
    position: relative;
}

.general-select {
    width: auto;
    text-align: center;
    padding: 8px;
    margin: 0px 10px 0px 0px;
    border-radius: 10px;
}

.general-select-l {
    width: auto;
    max-width: 250px;
    text-align: center;
    padding: 8px;
    margin: 0px 10px 0px 0px;
    border-radius: 10px;
}

.general-h2 {
    width: 100%;
    text-align: center;
    padding: 8px 0px 12px;
    font-size: 29px;
}

.general-h3 {
    width: 100%;
    text-align: center;
    padding: 8px 0px 12px;
    font-size: 25px;
}

.general-input {
    border-radius: 12px;
    border: solid 1px;
    padding: 8px;
    margin: 0px 10px 0px 3px;
    width: 200px;
}

.general-input-l {
    border-radius: 12px;
    border: solid 1px;
    padding: 8px;
    margin: 0px 10px 0px 3px;
    width: 250px;
    max-width: 250px;
}

.general-input-arch {
    border-radius: 12px;
    border: solid 1px;
    padding: 8px;
    margin: 0px 10px 0px 3px;
    width: 350px;
}

.general-input-date {
    border-radius: 12px;
    border: solid 1px;
    padding: 8px;
    margin: 0px 10px 0px 3px;
    width: 130px;
}

.general-textarea {
    border-radius: 12px;
    border: solid 1px;
    padding: 8px;
    margin: 0px 10px 0px 3px;
    width: 200px;
}

.general-btn {
    padding: 8px 10px;
    border-radius: 16px;
    width: auto;
    background-color: #2097AF;
    border: solid 1px #f1f7f7;
    color: #f1f7f7;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.general-btn:hover {
    background-color: #A7C33B;
    color: #000;
    font-size: 15px;
}

.btn-primario {
    min-width: 132px;
}

.img-icon {
    width: 23px;
    padding: 3px;
}

.img-icon:hover {
    background-color: #A7C33B;
    border-radius: 12px;
}

.general-paginacion {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    margin: 3px;
}

.SpcBtnSubmit {
    text-align: center;
}

.login-h1 {
    width: 90%;
    height: 70px;
    color: #2097AF;
    margin-top: 50px;
    padding-top: 20px;
    text-align: center;
}

.login-label {
    text-align: left;
    width: 200px;
    height: 35px;
    margin: 10px;
    color: #6a6a6a;
    border-radius: 20px;
    padding: 5px;
    font-size: 15px;
}

.login-input {
    height: 40px;
    margin: 10px;
    border: solid #67B347 2px;
    border-radius: 20px;
    padding: 5px;
    outline: none;
    width: 260px;
}

.login-input:focus {
    border: solid #2097AF 2px;
}

.header {
    background-color: #fff;
    display: block;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.cabecera {
    position: relative;
    height: 100px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    border-bottom: 3px #0396ff solid;
    z-index: 2;
}

.cabecera-img {
    width: 280px;
}

.cabecera-p {
    font-size: 40px;
    font-weight: 700;
    color: #788387;
}

.header-user {
    position: absolute;
    right: 12px;
    bottom: 8px;
    font-size: 16px;
    color: #333;
    background: rgba(255, 255, 255, .95);
    padding: 8px 14px;
    border: 1px solid #e6e9ef;
    border-radius: 6px;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
    white-space: nowrap;
}

.header-user .u-name {
    font-weight: 600;
}

.header-user .u-meta {
    opacity: .8;
    font-size: 13px;
}

.menu-lateral {
    background-color: #f2f2f2;
    height: calc(100vh - 100px);
    width: 200px;
    position: fixed !important;
    display: block;
    top: 100px;
    z-index: 1;
    overflow: auto;
    padding-top: 5px;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)
}

.menu-lateral ul {
    overflow: hidden;
}

.menu-boton {
    width: 100%;
    display: block;
    padding: 8px 13px 8px 14px;
    text-align: left;
    font-size: 15px;
    border: none;
    white-space: normal;
    float: none;
    outline: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.menu-boton:hover {
    color: #000 !important;
    background-color: #ccc !important;
}

.menu-opc-oc {
    display: none !important
}

.menu-opc-mu {
    display: block !important;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 20px 0 rgba(0, 0, 0, 0.19);
    color: #000 !important;
    background-color: #fff !important;
}

.acc-color {
    color: #fff !important;
    background-color: #0396ff !important
}

.menu-pausas {
    position: fixed;
    max-width: 200px;
    bottom: 0;
    padding: 8px 16px !important;
    margin-bottom: 10px;
    text-align: center;
}

.menu-pausa-label {
    font-size: 13px;
}

main {
    top: 100px;
    padding-top: 100px;
    margin-left: 210px;
    margin-top: 8px;
    display: block;
}

.locked-p {
    padding: 15px 0px;
}

.manage-btn-ed {
    padding: 6px 10px;
    border-radius: 16px;
    width: auto;
    background-color: #2097AF;
    border: solid 1px #f1f7f7;
    color: #f1f7f7;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.manage-btn-ed:hover {
    background-color: #4cbf99;
    color: #000;
    font-size: 13px;
}

.manage-label {
    font-size: 14px;
    min-width: 180px;
}

.div-hidden {
    display: none !important;
}

.hidden {
    display: none !important;
}

/* Fondo oscuro para modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Contenido del modal */
.modal-content {
    position: relative;
    background: #e5e5e5;
    padding: 20px;
    border-radius: 20px;
    max-width: 90%;
    max-height: 650px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease-in-out;
}

.modal-content-l {
    position: relative;
    width: auto;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background-color: #e5e5e5;
    padding: 20px;
    padding-right: 50px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-content-xl {
    position: relative;
    width: auto;
    min-width: 940px;
    max-width: 985px;
    height: 600px;
    max-height: 600px;
    overflow-y: auto;
    background-color: #e5e5e5;
    padding: 20px;
    padding-right: 50px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-content-x {
    position: relative;
    width: auto;
    min-width: 640px;
    max-width: 685px;
    height: 600px;
    max-height: 600px;
    overflow-y: auto;
    background-color: #e5e5e5;
    padding: 20px;
    padding-right: 50px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-pdf {
    width: 90%;
    max-width: 900px;
    height: 90vh;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    padding: 35px 20px 20px;
}

.modal-pdf iframe {
    width: 100%;
    height: calc(100% - 30px);
    border: none;
}

.pause-div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 450px;
    height: 280px;
}

.pause-p {
    max-width: 300px;
    text-align: center;
}

.pause-p-cont {
    font-size: 20px;
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2.5rem;
    color: #333;
    cursor: pointer;
}

.close-btn:hover {
    color: red;
}

.stats-graf {
    width: 60%;
    height: 400px;
    margin: auto;
}

.stats-table {
    margin: 10px;
    border-spacing: 5px;
    cursor: pointer;
}

.stats-tb-1 {
    background-color: rgba(54, 162, 235, 1);
    padding: 5px 8px;
    text-align: center;
    padding: 5px;

}

.stats-tb-2 {
    background-color: rgba(75, 192, 192, 1);
    padding: 5px 8px;
    padding: 5px;
}

.stats-tb-3 {
    background-color: rgba(255, 99, 132, 1);
    padding: 5px 8px;
    padding: 5px;
}

.stats-tb-4 {
    background-color: rgba(153, 102, 255, 1);
    padding: 5px 8px;
    padding: 5px;
}

.stats-tb-5 {
    background-color: rgba(255, 206, 86, 1);
    padding: 5px 8px;
    padding: 5px;
}

.stats-tb-1:hover {
    background-color: rgba(54, 162, 235, 0.3);

}

.stats-tb-2:hover {
    background-color: rgba(75, 192, 192, 0.3);
}

.stats-tb-3:hover {
    background-color: rgba(255, 99, 132, 0.3);
}

.stats-tb-4:hover {
    background-color: rgba(153, 102, 255, 0.3);
}

.stats-tb-5:hover {
    background-color: rgba(255, 206, 86, 0.3);
}

.manage-checkbox {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;
    width: 240px;
    gap: 7px;
    margin: 10px;
}

.child-row.child-hidden {
    display: none;
}

.parent-row {
    background-color: #f8f9fa;
    font-weight: bold;
}

.child-row {
    background-color: #ffffff;
    padding-left: 20px;
}

.toggle-children {
    cursor: pointer;
    font-weight: bold;
    color: #007BFF;
    user-select: none;
}

.toggle-children:hover {
    text-decoration: underline;
}

.parent-row[draggable="true"],
.child-row[draggable="true"] {
    cursor: grab;
    background-color: #F9F9F9;
}

.parent-row[draggable="true"]:hover,
.child-row[draggable="true"]:hover {
    background-color: #E1E1E1;
}

.dragging {
    opacity: 0.5;
    background-color: #CCC;
}

.drag-over {
    background-color: rgba(0, 123, 255, 0.2);
    border: 2px dashed #007bff;
}

.order-mode .dragging {
    background-color: #ccc;
    border: 2px dashed #007bff;
}

.parent-row,
.child-row {
    transition: background-color 0.3s;
}

.order-mode .edit-btn,
.order-mode .assign-btn,
.order-mode .delete-btn {
    display: none;
}

.accordion-item {
    border-bottom: 1px solid #ccc;
    margin-bottom: 5px;
}

.accordion-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.label-checkbox {
    display: block;
    margin: 5px 0;
    padding: 3px;
    border: #67B347 dashed 1px;
}

/* Contenedor de cada grupo de permisos */
.accordion-section {
    border: 1px solid #ccc;
    margin-bottom: 5px;
    border-radius: 5px;
    overflow: hidden;
}

/* Botón del encabezado */
.accordion-header {
    width: 100%;
    background-color: #2097AF;
    color: white;
    padding: 10px;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: block;
}

/* Contenedor del contenido desplegable */
.accordion-content {
    padding: 10px;
    background-color: #f8f9fa;
    max-height: 250px;
    overflow-y: auto;
}

/* Estilo cuando el acordeón está abierto */
.accordion-content.accordion-open {
    display: flex;
}

/* Evitar desplazamiento lateral al expandir acordeón */
.accordion-section {
    width: 100%;
}

.dropdown-list {
    position: absolute;
    width: 100%;
    max-width: 210px;
    font-size: 12px;
    background: white;
    max-height: 150px;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 1000;
    padding: 0;
    list-style: none;
}

.dropdown-list li {
    padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
}

.dropdown-list li:hover {
    background: #f0f0f0;
}

.dropdown-visible {
    visibility: visible !important;
    opacity: 1 !important;
}

.input-container {
    position: relative;
    /* Necesario para que el listado se posicione debajo del input */
}

.dropdown-pacientes {
    position: absolute;
    top: 100%;
    /* Coloca la lista justo debajo del input */
    left: 0;
    width: 100%;
    /* Hace que la lista tenga el mismo ancho que el input */
    background: white;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    padding: 0;
    list-style: none;
    visibility: hidden;
    /* Inicialmente, la lista está oculta */
    opacity: 0;
    /* La lista es invisible */
    transition: opacity 0.3s ease;
    /* Desaparece suavemente */
}

.dropdown-pacientes.dropdown-visible {
    visibility: visible;
    /* Hacemos visible la lista cuando se activa */
    opacity: 1;
    /* La lista se desvanece */
}

.dropdown-pacientes li {
    padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.dropdown-pacientes li:hover {
    background: #f0f0f0;
}

.direccion-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: #F9F9F9;
    border-radius: 5px;
}

.direccion-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.direccion-row label {
    width: 120px;
    font-weight: bold;
}

.direccion-select,
.direccion-input {
    padding: 5px;
    border: 1px solid #CCC;
    border-radius: 4px;
    font-size: 14px;
}

.direccion-input {
    width: 60px;
    text-align: center;
}

.num {
    width: 70px;
}

.text {
    width: 150px;
}

.direccion-output {
    width: 100%;
    padding: 5px;
    border: 1px solid #CCC;
    background: #E9ECEF;
    font-weight: bold;
}

.texto-m {
    font-size: 14px;
    width: 250px;
}

.texto-s {
    font-size: 14px;
    width: 160px;
}

.tab-container {
    margin-bottom: 1rem;
    border-bottom: 2px solid #888;
    font-size: 0;
}

.tab-btn {
    background-color: #f1f7f7;
    border: 1px solid #ccc;
    padding: 8px 16px;
    cursor: pointer;
}

.tab-btn:hover {
    background-color: #A7C33B;
}

.tab-btn.active {
    background-color: #2097AF !important;
    font-weight: bold;
    padding-top: 10px;
    color: #f1f7f7;
}

.tab-content {
    margin-top: 1rem;
}

.lista-adjuntos {
    list-style: none;
    padding: 0;
}

.lista-adjuntos li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.general-btn.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.error {
    color: #d9534f;
    font-weight: bold;
    margin-top: 10px;
}

.btn-mini {
    font-size: 15px;
    padding: 8px 10px;
    margin-left: 5px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    width: auto;
}

.btn-rojo {
    background-color: #e74c3c;
    color: #f1f7f7;
}

.btn-rojo:hover {
    background-color: #c0392b;
}

.btn-verde {
    background-color: #00acc1;
    color: #f1f7f7;
}

.btn-verde:hover {
    background-color: #0097a7;
    color: #000;
}

.btn-azul {
    background-color: #3498db;
    color: #f1f7f7;
}

.btn-azul:hover {
    background-color: #2980b9;
    color: #000;
}

.btn-gris {
    background-color: #bdc3c7;
    color: #000;
}

.btn-gris:hover {
    background-color: #95a5a6;
    color: #000;
}

.soporte-grupo {
    margin-bottom: 15px;
}

.estado-soporte {
    margin-left: 10px;
    font-weight: bold;
    color: #a00;
}

.estado-soporte.success {
    color: green;
}

.estado-soporte.ok {
    color: green;
    font-weight: bold;
}

.estado-soporte.error {
    color: red;
    font-weight: bold;
}

#form-soportes td {
    padding: 5px;
    vertical-align: middle;
}

.soporte-item {
    padding: 8px 10px;
    margin-bottom: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.adjunto-flex {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 5px 0;
    border-bottom: 1px solid #ccc;
}

.adjunto-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

.adjunto-label {
    font-weight: bold;
    margin-bottom: 3px;
    font-size: 0.9em;
    color: #333;
}

.adjunto-nombre {
    font-size: 0.85em;
    color: #555;
    word-break: break-all;
}

.adjunto-acciones button {
    margin-left: 8px;
}

.lista-seguimientos {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.seguimiento-item {
    background: #f1f1f1;
    border-left: 4px solid #2097AF;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.seguimiento-form {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.comentario-input {
    flex: 1;
    height: 60px;
    resize: vertical;
    padding: 10px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #fcfdf9;
}

.btn-agregar {
    height: 60px;
    padding: 0 20px;
    background-color: #2097AF;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.btn-agregar:hover {
    background-color: #A7C33B;
    color: #000;
}

.ticket-h4 {
    padding-bottom: 8px;
}

.item-cita {
    background: #fff;
    border-left: 5px solid #00acc1;
    padding: 10px 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cita-detalle {
    font-size: 14px;
    line-height: 1.4;
}

.acciones-cita {
    display: flex;
    gap: 8px;
}

.procedimientos-agregados {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.procedimiento-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background-color: #fff;
    border-left: 4px solid #2097AF;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.procedimiento-texto {
    flex: 1;
    margin-right: 10px;
    word-break: break-word;
}

.general-input-ct,
.general-textarea-ct {
    width: 100%;
    font-size: 15px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid;
    box-sizing: border-box;
}

.general-input-date-ct {
    width: 40%;
    font-size: 15px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid;
    box-sizing: border-box;
}

.general-input-ct-s {
    width: 80%;
    font-size: 15px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid;
    box-sizing: border-box;
}

.general-textarea-ct {
    min-height: 80px;
    resize: vertical;
}

.acciones-formulario {
    display: flex;
    justify-content: center;
    margin-left: -150px;
}

.lista-citas {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.cita-cotizacion-item {
    background-color: #fff;
    border-radius: 10px;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 6px solid #00acc1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
}

.cita-cotizacion-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
}

.acciones-cotizacion-horizontal {
    display: flex;
    gap: 10px;
}

.acciones-cotizacion button {
    width: 140px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.cotizacion-item {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.cotizacion-item input {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 13px;
}

.input-mini {
    width: 65px;
}

.input-pequeno {
    width: 55px;
    text-align: center;
}

.input-mediano {
    width: 110px;
    text-align: right;
}

.input-total {
    width: 120px;
    font-weight: bold;
    text-align: right;
}

.input-descripcion {
    width: 280px;
}

.observaciones-container {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 100%;
}

.item-input-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    flex: 1 1 auto;
}

.editor-botones {
    margin-bottom: 4px;
}

.editor-botones button {
    margin-right: 4px;
    font-size: 14px;
    padding: 2px 6px;
    cursor: pointer;
}

.editor-toolbar {
    margin-bottom: 5px;
}

.editor-toolbar button {
    margin-right: 5px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 14px;
    width: 35px;
}

.btn-format.activo {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.item-observacion-editor {
    border: 1px solid #ccc;
    padding: 8px;
    min-height: 80px;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    user-select: text;
}

.underline {
    text-decoration: underline;
}

.div-lista-roles {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.p-lista-roles {
    margin-top: -10px;
    font-weight: bold;
}

.color-input {
    width: 50px;
    height: 35px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    border-radius: 40px;
}

.bloque-reprogramaciones {
    background-color: #f9f9f9;
    border-left: 4px solid #007BFF;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.historial-lista h4 {
    margin: 0;
    margin-bottom: 5px;
    font-size: 16px;
    color: #333;
}

.historial-lista {
    margin: 0;
    padding: 5px;
    list-style-type: disc;
}

.historial-lista li {
    margin-bottom: 6px;
    font-size: 14px;
    color: #444;
}

.d-flex {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ml-10 {
    margin-left: 10px;
}

input[readonly] {
    background-color: #f0f0f0 !important;
    color: #555;
    cursor: not-allowed;
    border-color: #ccc;
}

.estado-cita {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.estado-cita.reprogramada {
    background-color: #f0ad4e;
}

.estado-cita.cancelada {
    background-color: #d9534f;
}

.estado-cita.sobreagendada {
    background-color: #ff9800;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

.hora-cita {
    margin-left: 8px;
    font-weight: normal;
    color: #333232;
}

.modal-warning {
    color: #b22222;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    width: 350px;
}

.modal-actions {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.motivo-cancelacion-texto {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    color: #721c24;
}

.tx_center {
    text-align: center;
}

.firma-actual {
    max-height: 80px;
    display: block;
    margin: 5px 0;
}

.firma-nombre-previo {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    font-family: 'Arial', sans-serif;
    word-break: break-word;
}

.firma-ampliada {
    max-height: 80vh;
    max-width: 100%;
    margin-bottom: 10px;
}

.novedad-item {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
}

.novedad-item p {
    margin: 4px 0;
}

.acciones {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.acciones button {
    padding: 5px 10px;
    font-size: 0.9rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.acciones .btn-editar {
    background-color: #007bff;
    color: white;
}

.acciones .btn-eliminar {
    background-color: #dc3545;
    color: white;
}

/* contenedor general del acordeon */
.acordeon-disponibilidad {
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
    background-color: #f9f9f9;
}

/* Cada dia con disponibilidad */
.acordeon-dia {
    border-bottom: 1px solid #ddd;
    margin-bottom: 6px;
    padding: 5px 0;
}

/* Encabezado de cada día */
.acordeon-header {
    font-weight: bold;
    cursor: pointer;
    padding: 8px;
    background-color: #e7f1ff;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.acordeon-header:hover {
    background-color: #d0e6ff;
}

/* Contenido desplegable (bloques) */
.acordeon-contenido {
    margin-top: 6px;
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 5px 10px;
}

.acordeon-visible {
    display: flex !important;
}

/* Botones de bloques horarios */
.bloque-horario {
    padding: 6px 10px;
    margin: 5px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 130px;
    transition: all 0.2s ease;
}

.bloque-horario.disponible {
    background-color: #d4f8d4;
    color: #0b5b0b;
}

.bloque-horario.disponible:hover {
    background-color: #b6ecb6;
}

.bloque-horario.reservado {
    background-color: #fff3cd;
    color: #856404;
    cursor: not-allowed;
    opacity: 0.8;
}

.bloque-horario.ocupado {
    background-color: #f8d7da;
    color: #721c24;
    cursor: not-allowed;
    opacity: 0.8;
}

.bloque-horario.bloqueado {
    background-color: #e2e3e5;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.bloque-horario.seleccionado {
    border: 2px solid #007bff;
    background-color: #cce5ff;
    color: #004085;
}

.bloque-horario.sobreagendado {
    background-color: #ffcccb;
    cursor: pointer;
    opacity: 1;
}

/* Texto para cuando no hay bloques o errores */
.sin-disponibilidad,
.sin-bloques {
    font-style: italic;
    color: #888;
    padding: 8px;
}

.resumen-cita {
    margin-top: 10px;
    font-weight: bold;
    background-color: #f0f8ff;
    border: 1px solid #0077cc;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    font-size: 15px;
    color: #005288;
    margin-bottom: 10px;
}

.texto-procedimiento-seleccionado {
    display: block;
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    background: #f5f5f5;
    padding: 6px 10px;
    border-left: 3px solid #007bff;
    border-radius: 4px;
    word-break: break-word;
}

#btn-limpiar-cups {
    margin-left: 6px;
    height: 36px;
    width: 36px;
    border-radius: 50%;
    font-weight: bold;
    background: #e74c3c;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

#btn-limpiar-cups:hover {
    background: #c0392b;
}

.txt-especialidad {
    font-size: 14px;
    word-wrap: break-word;
    width: 100px;
}

.col-mediano {
    word-wrap: break-word;
    width: 280px;
}

.col-pequeno {
    word-wrap: break-word;
    width: 100px;
}

.txt-mediano {
    font-size: 14px;
}

.txt-pequeno {
    font-size: 12px;
}

#bloque-reprogramaciones {
    margin-top: 10px;
}

#bloque-reprogramaciones h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #333;
    border-left: 4px solid #007BFF;
    padding-left: 8px;
}

.lista-reprogramaciones {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lista-reprogramaciones li {
    background: #f5f7fa;
    border-left: 4px solid #007BFF;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #444;
}

.lista-reprogramaciones li strong {
    display: block;
    font-weight: bold;
    color: #222;
}

.lista-reprogramaciones li span.motivo {
    display: block;
    margin-top: 4px;
    font-style: italic;
    color: #555;
}

.motivo-cancelacion {
    display: inline-block;
    background: #FFE6E6;
    color: #B30000;
    padding: 6px 10px;
    border-left: 4px solid #FF4D4D;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.3;
}

.span-der {
    width: 20px;
}

/* Compactar los días activos */
.horario-dia {
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* Menos espacio vertical */
    padding-bottom: 4px;
    margin-bottom: 4px;
}

/* Reducir la altura de las filas */
.fila-horario,
.fila-almuerzo {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

/* Etiquetas más compactas */
.fila-horario label,
.fila-almuerzo label {
    font-size: 0.85em;
    font-weight: 500;
    text-align: right;
    color: #444;
}

/* Inputs un poco más angostos */
.fila-horario input,
.fila-almuerzo input {
    width: 120px;
    padding: 6px;
}

/* Línea separadora más discreta */
.tr-separador hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 6px 0;
}

/* Ajustar encabezados */
.horario-thead th {
    text-align: center;
    font-size: 0.9em;
    font-weight: bold;
    padding-bottom: 6px;
}

.ver-mas-fechas-container {
    text-align: center;
    margin-top: 5px;
}

/* Botón ver más */
#btn-ver-mas {
    background: #007bff;
    /* azul */
    color: white;
    font-size: 14px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
    margin-right: 8px;
    /* separa de otros botones */
}

#btn-ver-mas:hover {
    background: #0056b3;
}

#btn-ver-mas:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Botón buscar automáticamente */
#btn-buscar-disponibilidad {
    background: #28a745;
    /* verde */
    color: white;
    font-size: 14px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

#btn-buscar-disponibilidad:hover {
    background: #1e7e34;
}

#btn-buscar-disponibilidad:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.item-cita {
    display: flex;
    justify-content: space-between;
    /* Texto a la izquierda, botones a la derecha */
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    gap: 15px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 10px;
}

.cita-info {
    flex: 1 1 auto;
    /* Ocupa todo el espacio disponible */
    min-width: 0;
    /* Necesario para truncamiento */
}

.cita-procedimiento {
    max-width: 650px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    color: #444;
}

.cita-info p {
    margin: 2px 0;
    /* un poco más compacto */
}

.cita-botones {
    flex: 0 0 auto;
    /* Mantiene tamaño fijo */
    display: flex;
    gap: 8px;
}

.cita-botones button {
    white-space: nowrap;
    /* No rompe texto del botón */
    padding: 6px 12px;
}

#download-modal select.general-select {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

#download-modal input.general-input {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

#download-modal .modal-content {
    overflow: visible;
    /* Permite que los dropdowns salgan si es necesario */
}

.input-con-boton {
    position: relative;
    padding-right: 50px;
}

.boton-dentro-input {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
}

.general-helptext {
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
    font-style: italic;
    text-align: center;
}

.empty-row {
    text-align: center;
    padding: 12px;
    color: #6b7280;
}

.campo-centro {
    position: relative;
}

.campo-centro .dropdown-list,
.campo-centro .dropdown-pacientes {
    position: absolute;
    top: calc(100% + 4px);
    /* debajo del input */
    left: 0;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    z-index: 4000;
    /* por encima del modal/tabla */
    display: none;
    /* se muestra con .dropdown-visible */
}

.dropdown-visible {
    display: block !important;
}

.dropdown-pacientes .suggestion-item,
.dropdown-list .suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
}

.dropdown-pacientes .suggestion-item:hover,
.dropdown-list .suggestion-item:hover {
    background: #f2f6ff;
}


/* Para botones y filtros */
/* Barra superior */
.toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 8px 0 16px;
}

/* Botones centrados y con separación */
.toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Contenedor de filtros (no tenías estilos para .filtros-avz) */
.filtros-avz {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 12px;
    align-items: center;
    margin-top: 4px;
}

/* Que los controles ocupen todo el ancho de su celda */
.filtros-avz .general-select,
.filtros-avz .general-input {
    width: 100%;
}

/* En pantallas anchas, haz que Buscar y Centro ocupen 2 columnas para respirar */
@media (min-width: 1024px) {

    #search-input,
    .campo-centro {
        grid-column: span 2;
    }
}

/* Anclaje y estilo del dropdown del centro */
.campo-centro {
    position: relative;
}

.campo-centro .dropdown-list,
.campo-centro .dropdown-pacientes {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e3e6eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    z-index: 4000;
    display: none;
    /* se muestra con .dropdown-visible */
}

.dropdown-visible {
    display: block !important;
}

.dropdown-list .suggestion-item,
.dropdown-pacientes .suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
}

.dropdown-list .suggestion-item:hover,
.dropdown-pacientes .suggestion-item:hover {
    background: #f2f6ff;
}

/* Mobile: botones a ancho completo si quieres */
@media (max-width: 480px) {
    .toolbar-actions .general-btn {
        flex: 1 1 auto;
    }
}

.toolbar-actions,
.filtros-avz {
    max-width: 1040px;
    /* antes: 1200px; ajusta entre 960–1100 a tu gusto */
    width: 100%;
    margin: 0 auto;
    /* centra horizontalmente */
    padding: 0 12px;
    /* respiración en los bordes */
}

/* Grid un poco más amplio para que salgan menos columnas en monitores grandes */
.filtros-avz {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    /* antes: 220px */
    gap: 12px 14px;
    /* un pelín más de espacio */
}

/* En desktop, que los campos largos ocupen 2 columnas */
@media (min-width: 1024px) {

    /* Tickets */
    #search-input,
    .campo-centro {
        grid-column: span 2;
    }

    /* Reportes (por si usas el id de paciente con ui-*) */
    #ui-filter-paciente,
    .campo-centro {
        grid-column: span 2;
    }
}

.filtros-avz.div-hidden {
    display: none !important;
}


.estado-cita.admitido {
    background: #28a745;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.estado-cita.no-asistio {
    background: #dc3545;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.estado-cita.pendiente {
    background: #ffc107;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.detalle-admision {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

.cita-card {
    width: 100%;
    /* 🔹 ocupa todo el ancho */
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    background: #fff;
    margin: 10px 0;
}

/* 🔴 variante para citas canceladas */
.cita-card.cita-card--cancelada {
    border-color: #f3c3c1;
    background: #fff7f7;
}

.cita-main {
    flex: 1;
    /* 🔹 asegura que se estire y ocupe el espacio */
    min-width: 0;
}

.cita-tit {
    font-size: 15px;
    margin-bottom: 2px;
}

.cita-tit .hora {
    opacity: .8;
    font-weight: 500;
    margin-left: 6px;
}

.cita-sub {
    font-size: 14px;
    color: #333;
    opacity: .9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cita-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.cita-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #667085;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.8;
}

.badge--admitido {
    background: #d1f7d6;
    color: #0f8a2f;
}

.badge--noasistio {
    background: #ffe0e0;
    color: #b42318;
}

.badge--pendiente {
    background: #fff1c2;
    color: #9a6b00;
}

.badge--reprog {
    background: #e6eafe;
    color: #3a4bdb;
}

.badge--sobre {
    background: #ffe9cc;
    color: #aa5a00;
}

/* 🔴 badge cancelada en rojo */
.badge--cancelada {
    background: #d9534f;
    color: #fff;
}

.cita-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn {
    border: 1px solid #d0d5dd;
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
}

.btn--prim {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #fff;
}

.btn--ghost {
    background: transparent;
}

.menu {
    position: relative;
}

.menu-list {
    position: absolute;
    right: 0;
    top: 110%;
    min-width: 160px;
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(16, 24, 40, .08);
    padding: 6px;
    display: none;
    z-index: 20;
}

.menu-list.open {
    display: block;
}

.menu-item {
    width: 100%;
    text-align: left;
    padding: 6px 8px;
    background: transparent;
    border: none;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
}

.menu-item:hover {
    background: #f2f4f7;
}

.odonto-dx-resumen {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.odonto-dx-resumen .badge {
    background: #eef2f6;
    color: #475569;
    padding: 4px 8px;
    border-radius: 14px;
    font-size: 12px;
}

.input-container.suggest-wrap {
    position: relative;
    width: 100%;
}

/* Lista de órdenes (nevo) */
.nevo-list {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.nevo-item {
    display: grid;
    grid-template-columns: 1fr auto;
    /* texto | botón */
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    /* sutil */
}

.nevo-main {
    display: grid;
    gap: 4px;
}

.nevo-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.nevo-code {
    font-weight: 700;
    letter-spacing: .3px;
}

.nevo-desc {
    color: #111827;
}

.nevo-meta {
    font-size: 12px;
    color: #6b7280;
}

.nevo-detail {
    font-size: 12px;
    color: #374151;
    font-style: italic;
}

.nevo-remove {
    border: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: #23a7bb;
    /* tu cyan */
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.nevo-remove:hover {
    filter: brightness(.95);
}

/* Responsive: si el texto es largo, el botón baja solo */
@media (max-width: 680px) {
    .nevo-item {
        grid-template-columns: 1fr;
    }

    .nevo-remove {
        justify-self: start;
    }
}

/* Acordeones */
.acc {
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #fff;
}

.acc>summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.acc>summary::marker {
    display: none;
}

.acc>summary::after {
    content: "▾";
    margin-left: auto;
    transition: transform .15s ease;
}

.acc[open]>summary::after {
    transform: rotate(180deg);
}

.acc__body {
    border-top: 1px solid #e6e9ef;
}

/* Modal export específico */
.modal--export .modal__content {
    width: 860px;
    max-width: 96vw;
    max-height: 90vh;
    /* ↑ un pelín más alto */
    padding: 16px 16px 12px;
    border-radius: 14px;
    position: relative;
    background: #fff;

    /* NUEVO: que el modal sea una columna y el cuerpo crezca */
    display: flex;
    flex-direction: column;
}

.modal__title {
    margin: 4px 8px 10px;
}

.modal__close {
    position: absolute;
    right: 10px;
    top: 8px;
    background: transparent;
    border: 0;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

/* NUEVO: el body ocupa el alto disponible; el scroll va en .exh-right */
.modal__body {
    flex: 1;
    overflow: hidden;
    /* ← evita doble scroll */
    padding-right: 0;
}

.modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef1f6;
    margin-top: 8px;
}

/* layout */
.exh-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 14px;

    /* NUEVO: para que calcule bien alturas con overflow */
    height: 100%;
    min-height: 0;
}

.exh-left {
    display: grid;
    gap: 10px;
    align-content: start;
}

.exh-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* NUEVO: aquí vive el scroll vertical del contenido */
.exh-right {
    padding-right: 6px;
    overflow: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* tarjetas (acordeones) */
.exh-card {
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    background: #fff;
    padding: 0;
    overflow: hidden;
    margin-bottom: 12px;
}

.exh-card>summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 14px;
    font-weight: 700;
    border-bottom: 1px solid #eef1f6;

    /* sticky para que la cabecera quede fija al scrollear la tarjeta */
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.exh-card[open]>summary {
    border-bottom-color: #eef1f6;
}

.exh-card>*:not(summary) {
    padding: 10px 14px;
}

.exh-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.exh-row-gap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 420px;
}

.exh-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.exh-label {
    font-weight: 700;
}

.exh-sub {
    margin-top: 8px;
}

.exh-hint {
    font-size: 12.5px;
    color: #6b7280;
    margin-bottom: 6px;
}

/* listas con tabla */
.exh-list {
    max-height: 200px;
    overflow: auto;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    background: #fff;
}

.exh-list table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
}

.exh-list thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    border-bottom: 1px solid #e6e9ef;
    padding: 8px;
}

.exh-list tbody td {
    padding: 6px 8px;
    border-bottom: 1px solid #f3f5f9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exh-list thead th:first-child,
.exh-list tbody td:first-child {
    width: 36px;
    text-align: center;
}

.exh-empty {
    color: #8a2a2a;
    font-size: 12.5px;
    margin-top: 6px;
}

/* Responsive: una sola columna y scroll cómodo en móviles */
@media (max-width: 900px) {
    .exh-grid {
        grid-template-columns: 1fr;
    }

    .exh-left {
        grid-auto-flow: row;
    }

    .exh-right {
        max-height: none;
    }
}

/* === Timeline de evoluciones === */
#hc-timeline {
    display: grid;
    gap: 12px;
    /* separa las cards entre sí */
}

/* === Card base === */
.hc-card {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 1px 0 rgba(16, 24, 40, .02);
    transition: border-color .15s ease, box-shadow .15s ease, transform .04s ease;
}

.hc-card:hover {
    box-shadow: 0 2px 10px rgba(16, 24, 40, .06);
    border-color: #dfe3ea;
}

/* Cabecera (fecha / profesional) */
.hc-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: -2px 0 8px;
}

.hc-card__date {
    font-size: 12.5px;
    color: #374151;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 4px 8px;
}

.hc-card__prof {
    font-size: 12.5px;
    color: #6b7280;
}

/* Cuerpo */
.hc-card__row {
    margin-top: 6px;
}

.hc-card__label {
    font-weight: 600;
    color: #111827;
    font-size: 13.5px;
    margin-right: 6px;
}

.hc-card__text {
    white-space: pre-wrap;
}

.hc-card__meta {
    font-size: 12.5px;
    color: #6b7280;
}

/* Botón ver odonto dentro de la card */
.hc-card .btn-odonto-view {
    margin-top: 8px;
}

/* Divider opcional si algún bloque interno necesita separar (órdenes ya lo hace) */
.hc-card__divider {
    height: 1px;
    background: linear-gradient(90deg, #eef2f7, rgba(238, 242, 247, 0));
    margin: 8px 0;
}

/* === Bloque de órdenes (lo que ya teníamos), con tipografía más discreta === */
.ev-orders {
    margin-top: 8px;
}

.ev-orders__title {
    font-weight: 600;
    font-size: 12.5px;
    color: #374151;
    margin-bottom: 6px;
}

.ev-orderlist {
    display: grid;
    gap: 8px;
}

.ev-order {
    border: 1px solid #edf0f5;
    border-radius: 10px;
    padding: 10px 12px;
    background: #ededed;
}

.ev-order__head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: baseline;
}

.ev-order__code {
    font-weight: 700;
    font-size: 12.5px;
    color: #134e4a;
    background: #e6fffb;
    border: 1px solid #b6f4ec;
    border-radius: 999px;
    padding: 3px 8px;
}

.ev-order__desc {
    font-size: 13.5px;
    color: #111827;
}

.ev-order__meta {
    font-size: 12.5px;
    color: #6b7280;
    margin-left: auto;
}

.ev-order__detail {
    font-style: italic;
    color: #6b7280;
    margin: 4px 0 0 30px;
}

.ev-orders--compact .ev-order {
    padding: 8px 10px;
}

.ev-orders--compact .ev-order__desc {
    font-size: 13px;
}

/* Integra visualmente el bloque de órdenes con la card: */
.ev-ordenes--empty {
    padding-top: 0 !important;
    border-top: 0 !important;
}

.ev-ordenes--has {
    padding-top: 10px !important;
    border-top: 1px dashed #e3e6eb !important;
    margin-top: 10px !important;
}

/* Responsive */
@media (max-width:640px) {
    .hc-card__header {
        flex-wrap: wrap;
    }

    .ev-order__meta {
        margin-left: 0;
    }
}

/* —— Segmented control: toggle Agente/Médico —————————————— */
:root {
    --seg-bg: #f6f8fb;
    --seg-border: #d9e1e8;
    --seg-text: #2b3a42;
    --seg-hover: rgba(31, 182, 193, 0.12);
    --seg-active-1: #1fb6c1;
    /* parte alta del degradado activo */
    --seg-active-2: #1499a6;
    /* parte baja del degradado activo */
    --seg-active-text: #fff;
    --seg-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 10px rgba(0, 0, 0, .04);
}

.vista-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 16px;
}

.vista-label {
    font-weight: 600;
}

.segmented {
    position: relative;
    display: inline-flex;
    gap: 0;
    background: var(--seg-bg);
    border: 1px solid var(--seg-border);
    border-radius: 999px;
    padding: 4px;
    box-shadow: var(--seg-shadow);
}

.segmented-btn {
    position: relative;
    z-index: 1;
    border: 0;
    background: transparent;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 600;
    line-height: 1;
    color: var(--seg-text);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .05s ease;
}

.segmented-btn:hover {
    background: var(--seg-hover);
}

.segmented-btn:active {
    transform: translateY(1px);
}

.segmented-btn:focus-visible {
    outline: 3px solid rgba(31, 182, 193, .35);
    outline-offset: 2px;
    border-radius: 999px;
}

/* Indicador deslizante */
.seg-indicator {
    position: absolute;
    z-index: 0;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--seg-active-1), var(--seg-active-2));
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, .25);
    transition: transform 220ms ease, width 220ms ease, background 220ms ease;
}

.segmented[data-active="agente"] .seg-indicator {
    transform: translateX(0);
}

.segmented[data-active="medico"] .seg-indicator {
    transform: translateX(100%);
}

/* Texto activo en blanco encima del indicador */
.segmented[data-active="agente"] .segmented-btn[data-mode="agente"],
.segmented[data-active="medico"] .segmented-btn[data-mode="medico"] {
    color: var(--seg-active-text);
}

/* Dark mode amistoso (opcional) */
@media (prefers-color-scheme: dark) {
    :root {
        --seg-bg: #1f2937;
        --seg-border: #374151;
        --seg-text: #e5e7eb;
        --seg-hover: rgba(31, 182, 193, 0.18);
        --seg-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .25);
    }
}


/* Modal gestor */
.modal--gestor .modal__content {
    width: 720px;
    max-width: 96vw;
    max-height: 88vh;
    overflow: hidden;
}

.modal--gestor .modal__body {
    overflow-y: auto;
    padding-right: 4px;
}

/* Tabs */
.ges-tabs {
    display: flex;
    gap: 6px;
    padding: 0 8px 8px;
    border-bottom: 1px solid #eef1f6;
}

.ges-tab {
    border: 1px solid #e6e9ef;
    background: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.ges-tab.is-active {
    background: #0ea5b5;
    color: #fff;
    border-color: #0ea5b5;
}

/* Panes */
.ges-pane {
    display: none;
    padding: 10px 12px;
}

.ges-pane.is-active {
    display: block;
}

.ges-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 10px;
    align-items: start;
    margin-bottom: 10px;
}

.ges-lab {
    font-weight: 600;
    padding-top: 6px;
}

.ges-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

/* Listados en la tarjeta */
.ev-box-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
}

.ev-list {
    display: grid;
    gap: 6px;
}

.ev-list--thin {
    gap: 4px;
}

.ev-pill {
    border: 1px solid #e6e9ef;
    background: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 13px;
}

/* Lista en acordeón dentro del modal de gestión */
.accordion-list .acc-item {
    border: 1px solid #e3e6eb;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #fff;
    overflow: hidden;
}

.acc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    user-select: none;
}

.acc-code {
    font-weight: 600;
}

.acc-badges {
    margin-left: auto;
    display: flex;
    gap: 6px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #e3e6eb;
    border-radius: 999px;
    font-size: 12px;
    color: #334155;
    background: #f8fafc;
}

.badge-dx {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.acc-caret {
    opacity: .6;
}

.acc-body {
    display: none;
    padding: 8px 10px;
    border-top: 1px solid #e3e6eb;
}

.acc-item.open .acc-body {
    display: block;
}

.acc-actions {
    margin-top: 8px;
    text-align: right;
}

.acciones-citas {
    margin-bottom: 5px;
    padding: 3px;
}

/* === HISTORIAS CLÍNICAS === */
.hc-card {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 10px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
}

.hc-card:hover {
    border-color: #b8d2ff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.hc-card-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hc-card-title {
    font-size: 15px;
    font-weight: bold;
    color: #111827;
}

.hc-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hc-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.hc-card-actions .btn {
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.hc-card-actions .btn:hover {
    opacity: 0.85;
}

/* Botón principal */
.hc-card-actions .btn--prim {
    background: #0284c7;
    color: #fff;
    border: none;
}

/* Botón PDF */
.hc-card-actions .btn--ghost {
    background: #f9fafb;
    color: #374151;
    border: 1px solid #d1d5db;
}

/* Estado badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.3;
}

.badge--admitido {
    background: #f1f5f9;
    color: #475569;
}

.badge--activo {
    background: #e6f7ff;
    color: #0369a1;
}

.badge--evolucion {
    background: #fff1e6;
    color: #8a4d00;
}

.badge--inicial {
    background: #e6fff2;
    color: #106b21;
}

/* === Layout de tarjetas de Historias Clínicas === */
#contenedor-paciente-historia #hc-historias-listado .hc-card {
    display: flex;
    /* 👉 lado a lado */
    justify-content: space-between;
    /* 👉 separa izquierda/derecha */
    align-items: center;
    gap: 16px;

    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 10px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

/* Columna izquierda (fecha + badges) crece */
#contenedor-paciente-historia #hc-historias-listado .hc-card-main {
    flex: 1;
    min-width: 0;
    /* evita overflow en títulos largos */
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#contenedor-paciente-historia #hc-historias-listado .hc-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

#contenedor-paciente-historia #hc-historias-listado .hc-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Columna derecha (botones) fija a la derecha */
#contenedor-paciente-historia #hc-historias-listado .hc-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    /* 👉 no se encoge */
}

#contenedor-paciente-historia #hc-historias-listado .hc-card-actions .btn {
    white-space: nowrap;
    /* 👉 evita saltos de línea en botones */
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
}

/* Opcional: hover sutil */
#contenedor-paciente-historia #hc-historias-listado .hc-card:hover {
    border-color: #b8d2ff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
    transform: translateY(-1px);
}

/* Responsivo: si el ancho es chico, apila ordenadamente */
@media (max-width: 680px) {
    #contenedor-paciente-historia #hc-historias-listado .hc-card {
        flex-direction: column;
        align-items: stretch;
    }

    #contenedor-paciente-historia #hc-historias-listado .hc-card-actions {
        justify-content: flex-end;
    }
}

.general-card {
    padding: 6px;
}

.general-card-list {
    padding: 12px;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    background: #fff;
}

/* ================================ */
/* Para Overlay en historia Clinica */
/* ================================ */

@keyframes hcspin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hc-loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font: 14px system-ui, sans-serif;
    color: #333;
    opacity: 0;
    z-index: 99999;
    transition: opacity 0.25s ease-in-out;
}

.hc-loader-overlay.visible {
    opacity: 1;
}

.hc-loader-spinner {
    width: 38px;
    height: 38px;
    border: 4px solid #e0e0e0;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: hcspin 0.9s linear infinite;
    margin-bottom: 10px;
}

.hc-loader-text {
    font-size: 15px;
    text-align: center;
    color: #444;
}

#hc-detalle-header {
    position: relative;
    z-index: 100000;
}

/* ======================================= */
/* Para Card Evolucion en historia Clinica */
/* ======================================= */

/* Acordeones de secciones en la evolución */
details.ev-sec {
    margin: 10px 0 0 0;
}

details.ev-sec>summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.25;
    /* <- tamaño igual para todas */
    list-style: none;
    margin: 0 0 6px 0;
}

/* Oculta el marcador nativo en todos los navegadores */
details.ev-sec>summary::-webkit-details-marker {
    display: none;
}

details.ev-sec>summary::marker {
    content: "";
}

/* Flecha */
details.ev-sec>summary::before {
    content: "▸";
}

details.ev-sec[open]>summary::before {
    content: "▾";
}

/* Contador “(n)” a la derecha del título */
.ev-sec__count {
    opacity: .7;
    font-weight: 500;
}

/* Chips / pills y utilidades ya usadas en las listas */
.ev-pill {
    background: #f2f4f7;
    border-radius: 12px;
    padding: 10px 12px;
    margin: 6px 0;
}

.ev-subtle {
    opacity: .75;
}

.ev-line {
    margin-left: 2px;
}

/* Contenedor de filtros en grid */
#filtros-avanzados.filtro-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: flex-start;
}

/* Cada grupo (label + control) */
.filtro-group {
    display: flex;
    flex-direction: column;
}

/* Label de los filtros */
.filtro-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

/* Que selects e inputs ocupen todo el ancho del grupo */
.filtro-group .general-select,
.filtro-group .general-input,
.filtro-group .campo-centro {
    width: 100%;
}

/* Para que el campo centro no rompa el layout si crece */
.filtro-centro-group {
    grid-column: 1 / -1; /* ocupa todo el ancho, opcional */
}