    margin-bottom: 32px;
.patient-institucion {
    font-size: 0.95em;
    color: #6a1b9a;
    font-weight: 500;
    display: block;
    margin-top: 2px;
}
.patient-institucion .material-icons {
    font-size: 1em;
    vertical-align: middle;
    margin-right: 2px;
}
/* Botones principales en fila en desktop, columna en móvil */
.botones-principales {
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: center;
    align-items: center;
}
@media (max-width: 600px) {
    .botones-principales {
        flex-direction: column;
        gap: 12px;
    }
    .brand-logo {
        font-size: 1.5rem;
        padding: 10px 0;
        text-align: center;
        width: 100%;
    }
    .main-container .search-card .center-align .btn-large {
        width: auto;
        margin-bottom: 8px;
        font-size: 1.1em;
        padding: 12px 24px;
        height: auto;
        line-height: 1.2;
        white-space: nowrap;
        overflow: visible;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 140px;
    }
    .main-container .search-card .center-align .search-button {
        font-size: 1rem;
        padding: 12px 24px;
        min-height: 48px;
        white-space: nowrap;
        line-height: 1.3;
        width: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
}
/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    text-align: center;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
}
.close:hover,
.close:focus {
    color: #e74c3c;
    text-decoration: none;
    cursor: pointer;
}
body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 0;
}
.container {
    max-width: 600px;
    margin: 30px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* Unificación de títulos con Material Design */
h1, h3, .brand-logo {
    color: #1976d2 !important; /* Azul Material Design */
    font-weight: bold;
    text-align: center;
}

/* Estilos para la página principal - Sin encabezado, más espacio útil */
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Contenedor principal centrado */
.main-container {
    max-width: 900px;
    margin: 5px auto 0 auto;
    padding: 20px;
    text-align: center;
}

/* Título principal integrado */
.main-title {
    margin-bottom: 40px;
}

.hospital-icon {
    font-size: 4rem !important;
    color: #1976d2;
    margin-bottom: 16px;
}

.main-title h2 {
    margin: 0;
    color: #1976d2;
    font-weight: 300;
    font-size: 2.5rem;
}

/* Sección de búsqueda mejorada */
.search-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 6px 30px rgba(103, 58, 183, 0.15);
    overflow: hidden;
    margin-bottom: 40px;
    border-radius: 20px;
    z-index: 3;
}

.search-header {
    background: linear-gradient(135deg, #673ab7 0%, #9c27b0 100%);
    padding: 40px 30px;
    color: white;
    text-align: center;
    position: relative;
}

/* Botones flotantes en el header */
.search-header .btn-floating {
    background-color: rgba(255,255,255,0.2) !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.search-header .btn-floating:hover {
    background-color: rgba(255,255,255,0.3) !important;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.search-header .btn-floating:active {
    transform: scale(0.95);
}

.search-header .btn-floating i {
    color: white !important;
}

.search-icon {
    font-size: 4rem !important;
    margin-bottom: 16px;
}

.search-header h4 {
    margin: 0 0 8px 0;
    font-weight: 300;
}

.search-header p {
    margin: 0;
    opacity: 0.9;
}

.search-content {
    padding: 40px 30px;
}

.search-subheader {
    background: white;
    padding: 25px 30px;
    text-align: center;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-subheader h5 {
    margin: 0 0 8px 0;
    color: #6a1b9a;
    font-size: 2.0rem;
    font-weight: 300;
}

.search-subheader .patient-count {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    font-weight: 400;
}

.search-subheader .patient-basic-info {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    font-weight: 400;
}

/* Subencabezado detallado para ficha de paciente */
.patient-detailed-header {
    padding: 25px 30px 30px 30px;
    text-align: left !important;
    position: relative;
    align-items: flex-start !important;
}

/* Botón de acordeón en esquina superior derecha */
.accordion-toggle-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.patient-main-info {
    margin-bottom: 20px;
}

.patient-name-with-icon {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    width: 100%;
}

/* Contenedor izquierdo con icono y nombre */
.patient-left-content {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.patient-name-with-icon .toggle-view-btn {
    flex-shrink: 0; /* No se encoge */
    margin-left: auto; /* Se empuja hacia la derecha */
}

.patient-icon-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #f3e5f5;
    border-radius: 50%;
    flex-shrink: 0;
}

.patient-icon-header .material-icons {
    color: #6a1b9a;
    font-size: 26px;
}

.patient-name-with-icon h5 {
    margin: 0;
    color: #6a1b9a;
    font-size: 1.6rem;
    font-weight: 300;
    text-align: left;
}

.patient-name-info {
    flex-grow: 1;
    min-width: 0; /* Permite que el texto se truncque si es necesario */
    text-align: left;
}

.patient-age {
    margin: 2px 0 0 0;
    color: #666;
    font-size: 0.9rem;
    font-weight: 400;
    text-align: left;
}

/* Nuevos estilos para el contenedor de botones */
.patient-info-section {
    margin-bottom: 15px;
}

.patient-header-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e0e0e0 20%, #e0e0e0 80%, transparent 100%);
    margin: 15px 0;
}

.patient-buttons-container {
    padding-top: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Estilos para comportamiento acordeón */
.patient-header-minimal {
    cursor: pointer;
}

.patient-content-expandable {
    display: none !important;
    transition: all 0.4s ease-in-out;
    margin: 0 !important;
    height: 0 !important;
    max-height: 0 !important;
    min-height: 0 !important;
    opacity: 0;
    border: none !important;
    box-sizing: border-box !important;
    line-height: 0 !important;
}

.patient-content-expandable.expanded {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    opacity: 1;
    margin: 0 !important;
    line-height: normal !important;
}

.patient-all-data {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 !important;
    padding: 0 !important;
}

.patient-content-expandable:not(.expanded) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

.patient-all-data .data-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
}

.patient-all-data .data-item .material-icons {
    font-size: 18px;
    color: #6a1b9a;
    flex-shrink: 0;
    width: 20px;
}

.patient-all-data .data-item span {
    flex: 1;
}

.patient-all-data .data-item strong {
    color: #333;
    margin-right: 8px;
}

/* Estilos para encabezados de categorías de antecedentes */
.patient-all-data .data-item.category-header {
    font-weight: 600;
    color: #6a1b9a;
    margin-top: 15px;
    margin-bottom: 5px;
    font-size: 1rem;
}

.patient-all-data .data-item.category-header:first-of-type {
    margin-top: 0;
}

.patient-all-data .data-item.category-header .material-icons {
    color: #6a1b9a;
    font-size: 20px;
}

.patient-all-data .data-item.category-header strong {
    color: #6a1b9a;
}

/* Estilos para sub-items de antecedentes */
.patient-all-data .data-item.sub-item {
    margin-left: 32px;
    font-size: 0.9rem;
    color: #555;
}

.patient-all-data .data-item.sub-item.highlight {
    background: rgba(255, 193, 7, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    margin-left: 28px;
}

.patient-all-data .data-item.sub-item.highlight strong {
    color: #856404;
}

.patient-all-data .data-item.sub-item strong {
    color: #333;
}

.search-input {
    margin-bottom: 30px;
}

.search-field {
    font-size: 1.3rem !important;
}

.search-label {
    font-size: 1.1rem !important;
}

.search-button {
    border-radius: 30px !important;
    padding: 0 48px !important;
}

/* Tarjetas de acción */
.action-cards {
    margin-bottom: 20px;
}

.action-cards .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 16px;
    height: auto;
    padding: 24px 20px;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.action-cards .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.action-cards .card-content {
    text-align: center;
    padding: 16px !important;
}

.action-cards .card-content h5 {
    margin: 12px 0 8px 0;
    font-size: 1.5rem;
    font-weight: 400;
}

.action-cards .card-content p {
    margin-bottom: 20px;
    color: #666;
    font-size: 1rem;
}

.action-cards .btn {
    margin-top: 8px;
    border-radius: 25px;
    padding: 0 32px;
}

/* Contenedor principal centrado */
.container {
    max-width: 900px !important;
    margin: 0 auto;
    padding: 20px;
}

/* Eliminamos espacios innecesarios */
.section {
    padding: 12px 0;
}

.material-icons.large {
    font-size: 3.5rem !important;
    margin-bottom: 12px;
}

/* Responsividad mejorada */
@media (max-width: 600px) {
    .main-container {
        max-width: 95% !important;
        margin: 10px auto 0 auto;
        padding: 12px;
    }
    
    .container {
        max-width: 95% !important;
        margin: 0 auto;
        padding: 12px;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .action-cards .card {
        margin-bottom: 16px;
        padding: 20px 16px;
    }
    
    .search-header {
        padding: 30px 20px;
    }
    
    .search-content {
        padding: 30px 20px;
    }
}
nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}
nav a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}
nav a:hover {
    text-decoration: underline;
}
.buscador, .formulario {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
input[type="text"], button {
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1em;
}
button {
    background: #3498db;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
}
button:hover {
    background: #2980b9;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
th, td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}
th {
    background: linear-gradient(90deg, #6a1b9a 0%, #6a1b9a 100%);
    color: #fff;
    border: none;
}

.practicas-admin-table {
    table-layout: fixed;
}

.practicas-admin-table .col-codigo {
    width: 14%;
}

.practicas-admin-table .col-nombre {
    width: 25%;
}

.practicas-admin-table .col-descripcion {
    width: 39%;
}

.practicas-admin-table .col-acciones {
    width: 22%;
}

.practicas-admin-table th,
.practicas-admin-table td {
    vertical-align: middle;
}

.practicas-admin-table .acciones-cell {
    white-space: nowrap;
    text-align: left;
}

.practicas-admin-table .acciones-cell .btn-small {
    margin-right: 6px;
}

.practicas-admin-table td:nth-child(2),
.practicas-admin-table td:nth-child(3) {
    word-break: break-word;
}
@media (max-width: 600px) {
    .container {
        max-width: 100%;
        margin: 6px;
        padding: 6px;
    }
    .brand-logo {
        font-size: 1.5rem !important;
        padding: 10px 0 !important;
        text-align: center !important;
        width: 100% !important;
    }
    .btn-large {
        width: 100% !important;
        margin-bottom: 8px !important;
        font-size: 1.1em !important;
    }
    nav {
        flex-direction: column;
        gap: 8px;
    }
    table, th, td {
        font-size: 0.95em;
    }
}

/* Sidebar (menú lateral) */
.header-floating-btn {
    position: absolute;
    top: 8px;
    z-index: 10;
    min-width: 36px !important;
    width: 36px !important;
    height: 36px !important;
}

.header-floating-btn.left {
    left: 8px;
}

.header-floating-btn.right {
    right: 8px;
}

/* Sidebar (menú lateral) */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, #673ab7 0%, #9c27b0 100%);
    box-shadow: 2px 0 15px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 30px 20px 20px 20px;
    background: rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sidebar-user-info {
    color: white;
    text-align: center;
}

.sidebar-user-info i {
    font-size: 3rem !important;
    margin-bottom: 10px;
    opacity: 0.9;
}

.sidebar-user-info h5 {
    margin: 0 0 5px 0;
    font-weight: 300;
    font-size: 1.3rem;
}

.sidebar-user-info p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu-item {
    display: block;
    padding: 15px 30px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.sidebar-menu-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}

.sidebar-menu-item i {
    margin-right: 15px;
    vertical-align: middle;
    font-size: 1.2rem;
}

/* Overlay para cerrar sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

/* Responsividad del sidebar */
@media (max-width: 600px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }
}

/* Ícono personalizado de doctor */
.doctor-icon {
    width: 3rem;
    height: 3rem;
    color: white;
    fill: white;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    margin: 0 auto 10px auto;
    display: block;
}

/* Encabezado del médico centrado en el panel principal */
.doctor-header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-align: center;
    color: white;
    padding: 0 55px;
    min-height: 80px;
}

.doctor-header-icon {
    width: 60px;
    height: 60px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    flex-shrink: 0;
}

.doctor-header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.doctor-header-text h4 {
    margin: 0 0 4px 0;
    font-weight: 300;
    color: white;
    font-size: 1.8rem;
    line-height: 1.2;
}

.doctor-header-text p {
    margin: 0;
    opacity: 0.9;
    color: white;
    font-size: 1rem;
    font-weight: 300;
}

/* Responsividad para móviles */
@media (max-width: 600px) {
    .header-floating-btn {
        top: 3px;
        min-width: 28px !important;
        width: 28px !important;
        height: 28px !important;
    }
    
    .header-floating-btn.left {
        left: 5px;
    }
    
    .header-floating-btn.right {
        right: 5px;
    }
    
    .doctor-header-center {
        gap: 8px;
        padding: 4px 40px;
        min-height: 50px;
    }
    
    .doctor-header-icon {
        width: 32px;
        height: 32px;
    }
    
    .doctor-header-text h4 {
        font-size: 1.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
    }
    
    .doctor-header-text p {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
    }
}

/* ================================
   ESTILOS PARA LISTA DE PACIENTES
   ================================ */

.patients-list-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-top: 20px;
    overflow: hidden;
}

.patients-cards-container {
    padding: 20px;
}

.patient-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 15px;
}

.patient-card-link:last-child {
    margin-bottom: 0;
}

.patient-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 0;
}

.patient-card:hover,
.patient-card-link:hover .patient-card {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    border-color: #6a1b9a;
}

/* Resaltado para consulta visitada recientemente */
.patient-card.highlighted {
    background: linear-gradient(135deg, #f3e5f5 0%, #ffffff 100%);
    border-color: #9c27b0;
    box-shadow: 0 4px 16px rgba(156, 39, 176, 0.2);
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(156, 39, 176, 0.2);
    }
    50% {
        box-shadow: 0 6px 20px rgba(156, 39, 176, 0.3);
    }
}

.patient-card:last-child {
    margin-bottom: 0;
}

.patient-card-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

div.patient-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #e1bee7;
    border-radius: 50%;
    flex-shrink: 0;
}

div.patient-icon .material-icons {
    color: #6a1b9a;
    background-color: transparent;
    font-size: 24px;
}

/* Contenedor del acordeón */
.accordion-container {
    margin-top: 8px;
}

/* Botón del acordeón */
.accordion-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
}

/* Contenido del acordeón */
.accordion-content {
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, padding 0.3s ease;
    opacity: 0;
    padding: 0;
}

/* Texto de datos personales */
.data-item .data-text {
    color: #333;
    font-size: 0.95rem;
    text-align: left;
}

/* Contenedor de cada elemento de datos */
.data-item {
    display: flex;
    align-items: left;
    gap: 10px;
}

/* Iconos de datos personales */
.material-icons.data-icon {
    color: #6a1b9a;
    font-size: 20px;
}

/* Botón EDITAR como pestaña del subencabezado blanco */
.patient-edit-tab {
    position: absolute;
    top: -70px; /* Se posiciona justo arriba del borde inferior del subencabezado */
    right: -1rem;
    z-index: 10;
}

.edit-btn-tab {
    background: white;
    color: #6a1b9a !important;
    padding: 9px 18px;
    border-radius: 15px 15px 0 0;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-bottom: none;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.edit-btn-tab:hover {
    background: #f8f8f8;
    text-decoration: none !important;
    transform: translateY(-2px);
    color: #6a1b9a !important;
}

.edit-btn-tab:active {
    transform: translateY(-1px);
    background: #f0f0f0;
}

/* ================================
   MODAL DE OPCIONES DE EDICIÓN
   ================================ */

/* Overlay del modal */
.edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease, background-color 0.25s ease;
}

.edit-modal-overlay.show {
    opacity: 1;
    visibility: visible;
    background-color: rgba(0, 0, 0, 0.6);
}

/* Contenido del modal */
.edit-modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(-20px);
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.edit-modal-overlay.show .edit-modal-content {
    transform: scale(1) translateY(0);
}

/* Encabezado del modal */
.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.edit-modal-header h5 {
    margin: 0;
    color: #6a1b9a;
    font-weight: 600;
    font-size: 1.2rem;
    text-align: center;
    flex: 1; /* Ocupa todo el espacio disponible para centrarse */
}

.edit-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.edit-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Cuerpo del modal */
.edit-modal-body {
    padding: 25px;
}

.edit-modal-body p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 1rem;
    text-align: center;
}

/* Botones de opciones */
.edit-option-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 18px 20px;
    margin-bottom: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    gap: 15px;
}

.edit-option-btn:hover {
    border-color: #6a1b9a;
    background: #f8f4fd;
    text-decoration: none;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 27, 154, 0.15);
}

.edit-option-btn:last-child {
    margin-bottom: 0;
}

.edit-option-btn i {
    font-size: 28px;
    color: #6a1b9a;
    width: 32px;
    text-align: center;
}

.edit-option-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.edit-option-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.edit-option-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.3;
}

.patient-card .patient-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
    flex: 1;
    text-align: left;
}

.patient-card .patient-name {
    font-size: 1.3rem;
    font-weight: 500;
    color: #333;
    flex: 1;
    text-align: left;
}

.patient-card .patient-dni {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
    margin-left: 0;
    text-align: left;
}

.empty-state {
    padding: 60px 30px;
    text-align: center;
}

.empty-state .material-icons.large {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h6 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.empty-state p {
    margin: 0 0 30px 0;
    font-size: 0.9rem;
}

/* ================================
   ESTILOS PARA BÚSQUEDA DE PACIENTES
   ================================ */

.patient-search-container {
    margin: 15px auto 0 auto;
    max-width: 400px;
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

.patient-search-field {
    position: relative;
    margin: 0;
    display: flex;
    width: 100%;
    max-width: 400px;
}

.patient-search-field .input-field {
    margin: 0;
}

.patient-search-input {
    background-color: white;
    border: 2px solid rgba(106, 27, 154, 0.3);
    border-radius: 25px;
    padding: 0 50px 0 20px !important;
    height: 45px !important;
    color: #333 !important;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100% !important;
    box-shadow: 0 2px 10px rgba(106, 27, 154, 0.15) !important;
}

.patient-search-input::placeholder {
    color: rgba(102, 102, 102, 0.8) !important;
    font-size: 0.9rem;
}

.patient-search-input:focus {
    background-color: white !important;
    border-color: #6a1b9a !important;
    box-shadow: 0 3px 20px rgba(106, 27, 154, 0.25) !important;
    outline: none !important;
}

/* Estilos del ícono de búsqueda - Eliminado
.patient-search-field .prefix {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6a1b9a;
    font-size: 20px;
    z-index: 3;
    transition: color 0.3s ease;
    pointer-events: none;
}

.patient-search-field.focused .prefix {
    color: #6a1b9a;
}
*/

.patient-search-field .suffix {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6a1b9a;
    font-size: 20px;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    border-radius: 50%;
    padding: 2px;
}

.patient-search-field .suffix:hover {
    color: #4a148c;
    background-color: rgba(106, 27, 154, 0.1);
}

/* Mensaje de sin resultados */
.no-results-message {
    padding: 40px 20px;
    text-align: center;
    display: none;
}

.no-results-message .material-icons.large {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.no-results-message h6 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    opacity: 0.8;
}

.no-results-message p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive para la lista de pacientes */
@media (max-width: 768px) {
    .search-subheader {
        padding: 15px 20px;
    }
    
    .search-subheader h5 {
        font-size: 1.5rem;
        margin: 0 0 6px 0;
    }
    
    .search-subheader .patient-count {
        font-size: 0.85rem;
    }
    
    .patients-cards-container {
        padding: 15px;
    }
    
    .patient-card-link {
        margin-bottom: 12px;
    }
    
    .patient-card {
        padding: 15px;
    }
    
    .patient-card-content {
        gap: 12px;
    }
    
    .patient-icon {
        width: 36px;
        height: 36px;
    }
    
    .patient-icon .material-icons {
        font-size: 20px;
    }
    
    .patient-name {
        font-size: 1.1rem;
    }
    
    .patient-dni {
        font-size: 0.9rem;
    }
    
    /* Estilos móviles para búsqueda */
    .patient-search-container {
        margin-top: 12px;
        max-width: 100%;
    }
    
    .patient-search-input {
        height: 40px !important;
        font-size: 0.9rem;
        padding: 0 45px 0 15px !important;
    }
    
    .patient-search-input::placeholder {
        font-size: 0.85rem;
    }
    
    /* Estilos móviles del ícono de búsqueda - Eliminado
    .patient-search-field .prefix {
        left: 12px;
        font-size: 18px;
    }
    */
    
    .patient-search-field .suffix {
        right: 12px;
        font-size: 18px;
    }
    
    .no-results-message {
        padding: 30px 15px;
    }
    
    .no-results-message .material-icons.large {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .no-results-message h6 {
        font-size: 1.1rem;
    }
    
    .no-results-message p {
        font-size: 0.85rem;
    }
    
    /* Estilos móviles para el botón EDITAR */
    .patient-edit-tab {
        top: -52px;    /* Ajusta la distancia desde arriba */
        right: -0.5rem; /* Ajusta la distancia desde la derecha */
    }
    
    .edit-btn-tab {
        padding: 4px 12px;
        font-size: 0.8rem;
        border-radius: 12px 12px 0 0;
        letter-spacing: 0.3px;
    }
}

/* Estilos específicos para móviles en orientación vertical */
@media (max-width: 768px) and (orientation: portrait) {
    .patient-edit-tab {
        top: -49px;
        right: -0.5rem;
    }
}

/* Estilos específicos para móviles en orientación horizontal */
@media (max-width: 768px) and (orientation: landscape) {
    .patient-edit-tab {
        top: -65px;    /* Ajuste para orientación horizontal */
        right: -1rem;   /* Ajuste para orientación horizontal */
    }
    
    .edit-btn-tab {
        padding: 7px 15px;
        font-size: 0.75rem;
    }
}

/* Estilos móviles para el modal de edición */
@media (max-width: 768px) {
    .edit-modal-content {
        width: 95%;
        max-width: none;
        margin: 0 10px;
    }
    
    .edit-modal-header {
        padding: 15px 20px 10px;
    }
    
    .edit-modal-header h5 {
        font-size: 1.1rem;
    }
    
    .edit-modal-body {
        padding: 20px;
    }
    
    .edit-option-btn {
        padding: 15px 18px;
        gap: 12px;
    }
    
    .edit-option-btn i {
        font-size: 24px;
    }
    
    .edit-option-title {
        font-size: 1rem;
    }
    
    .edit-option-desc {
        font-size: 0.85rem;
    }
}

/* ================================
   ESTILOS PARA FICHA DE PACIENTE
   ================================ */

.patient-details-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-top: 20px;
    overflow: hidden;
}

.patient-info-sections {
    padding: 30px;
}

.info-section {
    margin-bottom: 30px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h6 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6a1b9a;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3e5f5;
}

    color: #333;
    font-size: 20px;
.consultation-section h6 i {
    font-size: 18px;
    color: #6a1b9a;
}
}

.info-grid {
    display: grid;
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.1rem;
    color: #333;
    font-weight: 400;
    word-wrap: break-word;
}

.patient-actions {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.patient-actions .btn {
    margin: 5px;
}

/* Responsive para ficha de paciente */
@media (max-width: 768px) {
    .patient-detailed-header {
        padding: 15px 20px;
        text-align: left !important;
        align-items: flex-start !important;
    }
    
    .accordion-toggle-btn {
        top: 10px;
        right: 10px;
    }
    
    .patient-name-with-icon {
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .patient-left-content {
        gap: 10px;
    }
    
    .patient-icon-header {
        width: 35px;
        height: 35px;
    }
    
    .patient-icon-header .material-icons {
        font-size: 20px;
    }
    
    .patient-name-with-icon h5 {
        font-size: 1.2rem;
    }
    
    .patient-age {
        font-size: 0.8rem;
    }

    .patient-content-expandable {
        padding-bottom: 0;
    }

    .patient-all-data {
        gap: 10px;
    }
    
    .patient-all-data .data-item {
        font-size: 0.9rem;
        gap: 10px;
    }
    
    .patient-all-data .data-item .material-icons {
        font-size: 16px;
        width: 18px;
    }
    
    .patient-all-data .data-item strong {
        font-size: 0.85rem;
    }
    
    .patient-info-sections {
        padding: 20px;
    }
    
    .info-section {
        margin-bottom: 25px;
    }
    
    .info-section h6 {
        font-size: 1.1rem;
    }
    
    .info-label {
        font-size: 0.85rem;
    }
    
    .info-value {
        font-size: 1rem;
    }
    
    .patient-actions {
        padding: 15px 20px;
        flex-direction: column;
        align-items: center;
    }
    
    .patient-actions .btn {
        width: 100%;
        max-width: 280px;
        margin: 5px 0;
    }
}

/* ================================
   ESTILOS PARA ANTECEDENTES MÉDICOS
   ================================ */

.antecedentes-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-top: 20px;
    overflow: hidden;
}

.antecedentes-actions {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

.antecedentes-section {
    padding: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.antecedentes-section:last-child {
    border-bottom: none;
}

.antecedentes-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    color: #6a1b9a;
    font-size: 1.3rem;
    font-weight: 500;
}

.antecedentes-title .material-icons {
    font-size: 1.5rem;
}

.antecedentes-cards {
    display: grid;
    gap: 15px;
}

.antecedente-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.antecedente-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #6a1b9a;
}

.antecedente-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.antecedente-tipo {
    background: #f3e5f5;
    color: #6a1b9a;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.antecedente-fecha {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.antecedente-content {
    line-height: 1.6;
}

.antecedente-descripcion {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1rem;
}

.antecedente-observaciones {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.antecedentes-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

.habitos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.habito-item {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #6a1b9a;
}

/* Estilos para formularios de antecedentes */
.antecedentes-form-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
}

.antecedente-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.type-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.type-card:hover {
    border-color: #6a1b9a;
    box-shadow: 0 4px 12px rgba(106, 27, 154, 0.1);
}

.type-card.selected {
    border-color: #6a1b9a;
    background: #f3e5f5;
}

.type-card .material-icons {
    font-size: 2.5rem;
    color: #6a1b9a;
    margin-bottom: 10px;
}

.type-card h6 {
    margin: 10px 0 5px 0;
    color: #333;
    font-weight: 500;
}

.type-card p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.antecedente-form {
    margin-top: 30px;
}

/* Responsive para antecedentes */
@media (max-width: 768px) {
    .antecedentes-section {
        padding: 20px;
    }
    
    .antecedentes-actions {
        padding: 15px 20px;
    }
    
    .antecedente-card {
        padding: 15px;
    }
    
    .antecedente-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .antecedente-types {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .type-card {
        padding: 20px 15px;
    }
    
    .habitos-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .antecedentes-form-container {
        margin: 10px auto;
        padding: 0 10px;
    }
}

/* ================================
   MINI DASHBOARD DE ANTECEDENTES
   ================================ */

.dashboard-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.dashboard-toggle .btn-small {
    padding: 0 12px;
    height: 28px;
    line-height: 28px;
    font-size: 0.8rem;
}

.dashboard-view {
    width: 100%;
    min-height: 0;
    transition: all 0.3s ease;
}

/* Estilos específicos para vistas dentro del acordeón */
.patient-content-expandable .dashboard-view {
    min-height: 0 !important;
}

.patient-content-expandable:not(.expanded) .dashboard-view {
    min-height: 0 !important;
    height: 0 !important;
}

.patient-content-expandable .patient-all-data {
    margin-bottom: 0;
}

.mini-dashboard {
    margin-top: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    min-width: 90px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.summary-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.summary-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.summary-icon.warning {
    background: rgba(255, 193, 7, 0.8);
    color: #333;
}

.summary-icon .material-icons {
    font-size: 18px;
    color: white;
}

.summary-icon.warning .material-icons {
    color: #333;
}

.summary-content {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.summary-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    line-height: 1;
}

.summary-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1;
}

.risk-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.risk-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.risk-badge.alergia {
    background: #ffcdd2;
    color: #c62828;
    border: 1px solid #ef5350;
}

.risk-badge.habito {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ff9800;
}

.risk-badge .material-icons {
    font-size: 14px;
}

.family-history {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 15px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.family-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.family-title .material-icons {
    font-size: 16px;
}

.family-relevant {
    margin-bottom: 8px;
}

.family-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.family-badge {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-right: 6px;
    display: inline-block;
    margin-bottom: 4px;
}

.family-badge.important {
    background: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.5);
    color: #ffc107;
}

.family-all {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.family-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.family-relation {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    min-width: 60px;
}

.family-disease {
    color: white;
    flex: 1;
}

.family-age {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
}

.family-more {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-style: italic;
    margin-top: 4px;
}

/* Desglose de Antecedentes */
.antecedentes-breakdown {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 15px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.breakdown-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.breakdown-title .material-icons {
    font-size: 16px;
}

.breakdown-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.breakdown-category {
    font-size: 0.75rem;
}

.category-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    display: block;
    margin-bottom: 2px;
}

.category-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.breakdown-item {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
}

.breakdown-more {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-style: italic;
}

/* Medicación Detallada */
.medication-detail {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 15px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.medication-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.medication-title .material-icons {
    font-size: 16px;
}

.medication-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.medication-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.75rem;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.med-name {
    color: white;
    font-weight: 500;
}

.med-dose {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
}

.medication-more {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-style: italic;
    text-align: center;
    margin-top: 4px;
}

/* Antecedentes Ginecológicos */
.gineco-summary {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 15px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.gineco-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.gineco-title .material-icons {
    font-size: 16px;
}

.gineco-data {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gineco-item {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gineco-item.gineco-menopause {
    background: rgba(156, 39, 176, 0.3);
    border-color: rgba(156, 39, 176, 0.5);
    color: #ce93d8;
}

/* Hábitos Detallados */
.habits-detail {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 15px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.habits-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.habits-title .material-icons {
    font-size: 16px;
}

.habits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.habit-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.75rem;
}

.habit-item.habit-risk {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.habit-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.7rem;
}

.habit-value {
    color: white;
    font-weight: 400;
}

/* Responsive para mini dashboard */
@media (max-width: 768px) {
    .dashboard-toggle {
        top: 10px;
        right: 10px;
    }
    
    .dashboard-toggle .btn-small {
        padding: 0 8px;
        height: 24px;
        line-height: 24px;
        font-size: 0.7rem;
    }
    
    .dashboard-summary {
        gap: 10px;
        justify-content: center;
    }
    
    .summary-item {
        min-width: 80px;
        padding: 6px 10px;
    }
    
    .summary-icon {
        width: 28px;
        height: 28px;
    }
    
    .summary-icon .material-icons {
        font-size: 16px;
    }
    
    .summary-number {
        font-size: 1rem;
    }
    
    .summary-label {
        font-size: 0.7rem;
    }
    
    .risk-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .family-title {
        font-size: 0.8rem;
    }
    
    .family-badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}

/* Estilos Optimizados para el Mini Dashboard */
.dashboard-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    min-width: 120px;
    flex: 1;
    max-width: 200px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.summary-item.warning-item {
    border-color: rgba(255, 193, 7, 0.6);
    background: rgba(255, 193, 7, 0.15);
}

.summary-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
}

.summary-icon .material-icons {
    font-size: 20px;
    color: white;
}

.summary-content {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1;
}

.summary-number {
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
    line-height: 1.1;
    margin-bottom: 2px;
}

.summary-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1;
    margin-bottom: 4px;
}

.summary-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summary-item-detail {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.2;
}

.summary-more {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Grid Layout Compacto */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.grid-section {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.section-title .material-icons {
    font-size: 16px;
}

.compact-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.compact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    line-height: 1.3;
}

.compact-item.risk-item {
    background: rgba(244, 67, 54, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.item-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    min-width: 50px;
}

.item-value {
    color: white;
    font-weight: 400;
}

.item-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.item-detail {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
}

/* Family Badges Compactos */
.family-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.family-badge-compact {
    background: rgba(255, 193, 7, 0.3);
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #ffc107;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.family-more-compact {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-style: italic;
}

/* Vista Simple de Antecedentes */
.antecedentes-simple {
    margin-top: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.antecedentes-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 12px;
    gap: 15px;
}

.antecedentes-row:last-child {
    margin-bottom: 0;
}

.antecedente-item {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.antecedente-item.full-width {
    flex: 1 1 100%;
    min-width: 100%;
}

.antecedente-icon {
    font-size: 1.2rem;
    color: #666;
    margin-right: 8px;
    vertical-align: middle;
}

.antecedente-item.highlight {
    background: rgba(255, 193, 7, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

.antecedente-item.highlight .antecedente-icon {
    color: #856404;
}

.antecedente-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.antecedente-value {
    font-size: 1rem;
    color: #333;
    font-weight: 400;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Estilos específicos para hábitos en ficha */
.habitos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.habito-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.habito-sublabel {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.habito-valor {
    font-size: 0.9rem;
    color: #555;
    font-weight: 400;
}

/* Estilos específicos para antecedentes ginecológicos */
.ginecologicos-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.gine-item {
    font-size: 0.9rem;
    color: #555;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.antecedente-item.highlight .antecedente-label {
    color: #856404;
}

.antecedente-item.highlight .antecedente-value {
    color: #856404;
    font-weight: 500;
}

/* Antecedentes Médicos - Estilos para formularios de edición */
.form-section {
    background: white;
    border-radius: 12px;
    margin-bottom: 25px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    color: #6a1b9a;
    font-size: 1.3rem;
    font-weight: 500;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3e5f5;
}

.section-title .material-icons {
    font-size: 1.5rem;
}

/* Prevenir scroll automático en dropdowns - Solución robusta */
html {
    scroll-behavior: auto !important;
}

body {
    scroll-behavior: auto !important;
}

/* Bloqueo completo de scroll */
html.no-scroll,
body.no-scroll {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* Clase para bloquear scroll temporalmente */
body.no-scroll {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

/* Estilos específicos para los dropdowns de Materialize */
.dropdown-content {
    position: fixed !important;
    z-index: 9999 !important;
    will-change: transform !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

.select-wrapper .dropdown-content {
    position: absolute !important;
    z-index: 999 !important;
    will-change: transform !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

/* Prevenir comportamientos problemáticos en selects */
.select-wrapper input.select-dropdown {
    user-select: none !important;
    outline: 0 !important;
    border: none !important;
    background-color: transparent !important;
    border-bottom: 1px solid #9e9e9e !important;
    border-radius: 0 !important;
    height: 3rem !important;
    line-height: 3rem !important;
    width: 100% !important;
    font-size: 16px !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    display: block !important;
    cursor: pointer !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    font-family: "Roboto", sans-serif !important;
}

/* Evitar saltos de página al hacer focus */
.select-wrapper input.select-dropdown:focus {
    outline: none !important;
    border-bottom-color: #26a69a !important;
    box-shadow: 0 1px 0 0 #26a69a !important;
}

/* Contenedor principal que debe mantener su posición */
.main-content {
    position: relative;
}

/* Estilos para asegurar que los dropdowns no causen scroll */
.select-wrapper {
    position: relative !important;
    overflow: visible !important;
}

/* Forzar posición para evitar jumps */
.dropdown-content li {
    clear: both !important;
    color: rgba(0,0,0,0.87) !important;
    cursor: pointer !important;
    min-height: 50px !important;
    line-height: 1.5rem !important;
    width: 100% !important;
    text-align: left !important;
    padding: 14px 16px !important;
}

/* Estilos específicos para prevenir comportamientos no deseados en móviles */
@media (max-width: 768px) {
    .select-wrapper input.select-dropdown {
        font-size: 16px !important; /* Prevenir zoom automático en iOS */
    }
    
    .dropdown-content {
        max-height: 200px !important;
        overflow-y: auto !important;
        position: fixed !important;
    }
    
    /* Prevenir scroll en dispositivos táctiles */
    body.no-scroll {
        touch-action: none !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* Contenedor principal que debe mantener su posición */
.main-content {
    position: relative;
}

/* Dropdowns Personalizados - Sin scroll automático */
.custom-select {
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
    border-bottom: 1px solid #9e9e9e;
    border-radius: 0;
    outline: none;
    height: 3rem;
    line-height: 3rem;
    width: 100%;
    font-size: 16px;
    margin: 0 0 20px 0;
    padding: 0;
    display: block;
    font-family: "Roboto", sans-serif;
    transition: border-bottom-color 0.3s ease;
}

/* Alineación de select con ícono prefix en formulario de prácticas */
.categoria-field {
    position: relative;
}

.categoria-field .prefix {
    position: absolute;
    left: 0;
    right: auto;
    top: 0.85rem;
    width: 3rem;
    text-align: center;
    pointer-events: none;
    z-index: 1;
}

.categoria-field .select-wrapper {
    margin-left: 3rem;
    width: calc(100% - 3rem);
}

.categoria-field label {
    margin-left: 3rem;
    width: calc(100% - 3rem);
}

.categoria-field .select-wrapper .caret {
    right: 0;
}

.custom-select:focus,
.custom-select.focused {
    border-bottom-color: #26a69a;
    box-shadow: 0 1px 0 0 #26a69a;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0;
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 1rem;
    color: #212121;
    width: 100%;
}

.select-trigger:hover {
    border-bottom-color: #26a69a;
}

.select-value {
    flex: 1;
    text-align: left;
    color: #212121;
    font-size: 1rem;
    line-height: 3rem;
    display: block;
    padding-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-value.placeholder {
    color: #9e9e9e;
}

.select-trigger .material-icons {
    color: #9e9e9e;
    font-size: 24px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.custom-select.open .select-trigger .material-icons {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 160px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    margin-top: 2px;
}

.custom-select.open .select-options {
    display: block;
}

.option {
    padding: 12px 16px;
    cursor: pointer;
    color: #212121;
    font-size: 1rem;
    line-height: 1.5;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

.option:last-child {
    border-bottom: none;
}

.option:hover {
    background-color: #f5f5f5;
}

.option.selected {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

.option[data-value=""] {
    color: #9e9e9e;
    font-style: italic;
}

/* Estilos responsivos para dropdowns personalizados */
@media (max-width: 768px) {
    .select-options {
        max-height: 150px;
        font-size: 0.9rem;
    }
    
    .option {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .select-trigger {
        font-size: 0.9rem;
    }
    
    .select-value {
        font-size: 0.9rem;
    }
}

/* Overlay para cerrar dropdowns */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    display: none;
}

.dropdown-overlay.active {
    display: block;
}

/* Animaciones suaves */
.select-options {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.custom-select.open .select-options {
    opacity: 1;
    transform: translateY(0);
}

/* Estilos para estados de validación */
.custom-select.invalid {
    border-bottom-color: #f44336;
}

.custom-select.invalid .select-trigger {
    border-bottom-color: #f44336;
}

.custom-select.valid {
    border-bottom-color: #4caf50;
}

/* Estilos responsivos para formularios */
@media (max-width: 768px) {
    .form-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
}
.simple-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 25px 15px;
    margin: 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
}

.section-title .material-icons {
    font-size: 24px;
    color: #666;
}

.simple-table {
    padding: 0;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    padding: 15px 25px;
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e0e0e0;
}

/* Grid específico para antecedentes personales con columna de patología (2 columnas) */
.table-header:has(.col-patologia) {
    grid-template-columns: 1.5fr 3fr;
}

.table-header.medicamentos {
    grid-template-columns: 1.5fr 2fr 1.5fr;
}

.table-header.familiares {
    grid-template-columns: 1fr 2fr 1fr;
}

.table-header.habitos {
    grid-template-columns: 1fr 1fr 1.5fr;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    padding: 15px 25px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

/* Grid específico para antecedentes personales con columna de patología (2 columnas) */
.table-row:has(.col-patologia) {
    grid-template-columns: 1.5fr 3fr;
}

.table-row:hover {
    background: #fafafa;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row.medicamentos {
    grid-template-columns: 1.5fr 2fr 1.5fr;
}

.table-row.familiares {
    grid-template-columns: 1fr 2fr 1fr;
}

.table-row.habitos {
    grid-template-columns: 1fr 1fr 1.5fr;
}

.col-tipo, .col-parentesco, .col-medicamento {
    font-weight: 600;
    color: #333;
}

.col-patologia {
    font-weight: 700;
    color: #6a1b9a;
    font-size: 0.95rem;
}

.col-patologia strong {
    display: block;
    line-height: 1.3;
}

.col-habito {
    font-weight: 600;
    color: #333;
}

.col-descripcion, .col-enfermedad, .col-dosis, .col-indicacion {
    color: #555;
    line-height: 1.4;
}

.col-estado, .col-detalle {
    color: #555;
    line-height: 1.4;
}

.col-fecha, .col-edad {
    color: #666;
    font-size: 0.9rem;
}

.observaciones {
    display: block;
    color: #888;
    font-style: italic;
    margin-top: 5px;
    font-size: 0.85rem;
}

.via, .prescriptor {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-top: 3px;
}

.empty-state {
    padding: 40px 25px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Hábitos Simplificados */
.habits-simple {
    padding: 20px 25px;
}

.habit-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 15px;
}

.habit-row:last-child {
    margin-bottom: 0;
}

.habit-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.habit-label {
    font-weight: 600;
    color: #666;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.habit-value {
    color: #333;
    font-size: 1rem;
    line-height: 1.4;
}

/* Responsive para tabla simple */
@media (max-width: 768px) {
    .simple-section {
        margin-bottom: 25px;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .simple-table {
        border-radius: 8px;
        overflow: hidden;
    }
    
    .table-header {
        display: none;
    }
    
    .table-row {
        display: block;
        padding: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        margin-bottom: 10px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .table-row:hover {
        box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    }
    
    /* Estilos para antecedentes personales */
    .table-row .col-tipo {
        display: block;
        font-weight: 700;
        color: #2e7d32;
        font-size: 0.9rem;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .table-row .col-descripcion {
        display: block;
        color: #333;
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 8px;
    }
    
    .table-row .col-fecha {
        display: block;
        color: #666;
        font-size: 0.85rem;
        font-style: italic;
    }
    
    /* Estilos para antecedentes familiares */
    .table-row.familiares .col-parentesco {
        display: block;
        font-weight: 700;
        color: #1976d2;
        font-size: 0.9rem;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .table-row.familiares .col-enfermedad {
        display: block;
        color: #333;
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 8px;
    }
    
    .table-row.familiares .col-edad {
        display: block;
        color: #666;
        font-size: 0.85rem;
        font-style: italic;
    }
    
    /* Estilos para medicamentos */
    .table-row.medicamentos .col-medicamento {
        display: block;
        font-weight: 700;
        color: #7b1fa2;
        font-size: 0.9rem;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .table-row.medicamentos .col-dosis {
        display: block;
        color: #333;
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 8px;
    }
    
    .table-row.medicamentos .col-indicacion {
        display: block;
        color: #666;
        font-size: 0.85rem;
        font-style: italic;
    }
    
    /* Estilos para hábitos */
    .table-row.habitos .col-habito {
        display: block;
        font-weight: 700;
        color: #f57c00;
        font-size: 0.9rem;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .table-row.habitos .col-estado {
        display: block;
        color: #333;
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 8px;
        font-weight: 600;
    }
    
    .table-row.habitos .col-detalle {
        display: block;
        color: #666;
        font-size: 0.85rem;
        font-style: italic;
    }
    
    /* Estilos para elementos adicionales */
    .observaciones {
        display: block;
        margin-top: 5px;
        font-size: 0.8rem;
        color: #888;
    }
    
    .via, .prescriptor {
        display: block;
        margin-top: 3px;
        font-size: 0.75rem;
        color: #999;
    }
    
    /* Estado vacío en móvil */
    .empty-state {
        padding: 20px;
        text-align: center;
        background: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #e0e0e0;
    }
    
    .empty-state p {
        color: #666;
        font-size: 0.9rem;
        margin: 0;
    }
}

/* === ESTILOS PARA BOTONES DE FICHA PACIENTE === */
.patient-header-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px 0;
}

.patient-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.patient-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #2196f3;
    border-radius: 50%;
    color: white;
}

.patient-details h5 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.patient-details p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

.patient-action-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.patient-action-buttons .btn {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.patient-action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.expandable-content {
    overflow: hidden;
    transition: all 0.4s ease;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
}

.patient-full-details {
    padding: 20px;
}

.quick-actions {
    margin-top: 30px;
    padding: 20px 0;
}

.quick-actions .btn-large {
    height: 60px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.full-width {
    width: 100%;
}

/* Responsivo */
@media (max-width: 768px) {
    .patient-action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .patient-action-buttons .btn {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }
    
    .patient-header-container {
        padding: 10px 0;
    }
}

/* Estilos para formulario de edición de antecedentes */
.form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 20px 20px 20px;
}

.form-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #6a1b9a;
    color: #6a1b9a;
}

.section-title i {
    margin-right: 10px;
    font-size: 24px;
}

.medicacion-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
}

.form-actions .btn {
    min-width: 150px;
}

/* Responsive adjustments for forms */
@media (max-width: 768px) {
    .form-container {
        padding: 0px 10px 10px 10px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .form-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .medicacion-item {
        padding: 10px;
    }
}

/* Overlay para cerrar dropdowns personalizados */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 998;
    display: none;
}

.dropdown-overlay.active {
    display: block;
}

/* Responsive design para dropdowns personalizados */
@media (max-width: 600px) {
    .custom-select .select-options {
        max-height: 200px;
    }
    
    .custom-select .select-trigger {
        font-size: 14px;
    }
}

/* Compatibilidad con Materialize CSS - input-field */
.input-field .custom-select {
    margin-top: 0;
    margin-bottom: 0;
}

.input-field .custom-select + label {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 0.8rem;
    color: #9e9e9e;
    cursor: text;
    transition: 0.2s ease-out;
    transform: translateY(-14px);
    transform-origin: 0 0;
}

.input-field .custom-select + label.active {
    transform: translateY(-14px);
    color: #9e9e9e;
    font-size: 0.8rem;
}

.input-field .custom-select:focus + label,
.input-field .custom-select.focused + label {
    color: #26a69a;
}

/* Permitir clicks a través de labels hacia inputs */
.input-field label {
    pointer-events: none;
}

/* Alineación específica para formularios */
.medicacion-item .input-field {
    margin-bottom: 15px;
}

.medicacion-item .custom-select {
    margin-bottom: 0;
}

/* Fix para label de Edad Diagnóstico */
.edad-diagnostico-label {
    top: -20px !important;
    font-size: 12px !important;
}

/* =====================================
   ESTILOS PARA CONSULTAS MÉDICAS
   ===================================== */

/* Tarjetas de consulta con el mismo estilo que pacientes */
.consultation-card {
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.consultation-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: #2196f3;
}

.consultation-icon {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.consultation-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.consultation-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.consultation-motivo {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.3;
    margin-top: 2px;
}

.consultation-diagnostico {
    font-size: 0.9rem;
    color: #4caf50;
    font-weight: 500;
    font-style: italic;
}

.consultation-medico {
    font-size: 0.85rem;
    color: #999;
    margin-top: 4px;
}

/* Estados de las consultas */
.consultation-card.estado-completada {
    border-left: 4px solid #4caf50;
}

.consultation-card.estado-pendiente {
    border-left: 4px solid #ff9800;
}

.consultation-card.estado-cancelada {
    border-left: 4px solid #f44336;
    opacity: 0.7;
}

/* Botón de consultas en modal de edición */
.consultas-btn {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%) !important;
    color: white !important;
}

.consultas-btn:hover {
    background: linear-gradient(135deg, #388e3c 0%, #4caf50 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Responsive para consultas */
@media (max-width: 768px) {
    .consultation-card {
        padding: 12px 15px;
    }
    
    .consultation-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .consultation-date {
        font-size: 1rem;
    }
    
    .consultation-motivo {
        font-size: 0.9rem;
    }
    
    .consultation-diagnostico {
        font-size: 0.85rem;
    }
    
    .consultation-medico {
        font-size: 0.8rem;
    }
}

/* Formulario de nueva consulta */
.consultation-form-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.consultation-form-section h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.consultation-form-section h6 i {
    font-size: 20px;
    color: #6a1b9a;
}

/* Signos vitales en grid */
.signos-vitales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.signo-vital {
    display: flex;
    flex-direction: column;
}

/* Prácticas favoritas en nueva consulta */
.practicas-favoritas-wrapper {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 15px;
}

.practicas-favoritas-grupo {
    background: #faf7fd;
    border: 1px solid #eadcf5;
    border-radius: 14px;
    padding: 18px;
}

.practicas-favoritas-grupo-titulo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e4d3f1;
}

.practicas-favoritas-grupo-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6a1b9a;
    font-weight: 600;
}

.practicas-favoritas-grupo-label .material-icons {
    font-size: 18px;
}

.practicas-favoritas-grupo-count {
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #6a1b9a;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0 8px;
}

.practicas-favoritas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.practica-favorita-card {
    display: block;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 14px 14px 14px 48px;
    min-height: 86px;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.practica-favorita-card:hover {
    border-color: #c39be7;
    box-shadow: 0 4px 14px rgba(106, 27, 154, 0.08);
    transform: translateY(-1px);
}

.practica-favorita-card input[type="checkbox"] + span {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #333;
    line-height: 1.35;
    padding-left: 0 !important;
}

.practica-favorita-card input[type="checkbox"] + span:before,
.practica-favorita-card input[type="checkbox"] + span:after {
    top: 6px !important;
    left: -36px !important;
}

.practica-favorita-codigo {
    display: inline-block;
    color: #6a1b9a;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.practica-favorita-nombre {
    color: #4a4a4a;
    font-size: 1rem;
    font-weight: 600;
}

/* Estilos para el detalle de consulta */
.consultation-detail-header {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
    padding: 25px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.consultation-detail-header h4 {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.consultation-detail-header .consultation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    opacity: 0.9;
    font-size: 0.9rem;
}

.consultation-detail-header .consultation-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.consultation-detail-content {
    background: white;
    padding: 25px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.consultation-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.consultation-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.consultation-section h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.consultation-section h6 i {
    font-size: 18px;
    color: #6a1b9a;
}

.consultation-section p {
    color: #555;
    line-height: 1.6;
    margin: 5px 0;
    text-align: left;
}

.consultation-section .empty-field {
    color: #999;
    font-style: italic;
}

/* Grid para signos vitales en detalle */
.signos-vitales-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.signo-vital-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.signo-vital-label {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

.signo-vital-value {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

/* Responsive para formularios y detalles */
@media (max-width: 768px) {
    .consultation-form-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .signos-vitales-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }

    .practicas-favoritas-grupo {
        padding: 14px;
    }

    .practicas-favoritas-grupo-titulo {
        align-items: flex-start;
    }

    .practicas-favoritas-grid {
        grid-template-columns: 1fr;
    }

    .practica-favorita-card {
        min-height: auto;
    }
    
    .consultation-detail-header {
        padding: 20px 15px;
    }
    
    .consultation-detail-content {
        padding: 20px 15px;
    }
    
    .consultation-detail-header .consultation-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .signos-vitales-detail {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Panel de consultas del paciente */
.consultas-panel-container {
    margin-top: -25px;
}

.consultas-panel {
    background: white;
    position: relative;
    overflow: visible;
}

.consultas-edit-tab {
    position: absolute;
    top: -35px;
    right: 20px;
    z-index: 1000;
    height: 50px;
}

.consultas-btn-tab {
    background: white;
    color: #6a1b9a !important;
    padding: 12px 20px;
    border-radius: 15px 15px 0 0;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-bottom: none;
    display: block;
    cursor: pointer;
 /* box-shadow: 0 -2px 8px rgba(0,0,0,0.1); */
    white-space: nowrap;
}

.consultas-btn-tab:hover {
    background: #f8f8f8;
    text-decoration: none !important;
    transform: translateY(-2px);
    color: #6a1b9a !important;
}

.consultas-panel-content {
    padding: 20px;
    padding-top: 30px;
}

.consultas-panel-content h5 {
    margin: 0;
    color: #333;
}

.consultas-panel-content p {
    margin: 5px 0 0 0;
    color: #666;
}

/* Estilos responsive para móvil - Panel de consultas */
@media (max-width: 768px) {
    .consultas-panel-container {
        margin-top: -30px;
    }
    
    .consultas-edit-tab {
        top: -30px;
        right: 15px;
    }
    
    .consultas-btn-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
        letter-spacing: 0.3px;
        border-radius: 12px 12px 0 0;
    }
    
    .consultas-panel-content {
        padding: 15px;
        padding-top: 25px;
    }
}

@media (max-width: 480px) {
    .consultas-panel-container {
        margin-top: -30 px;
    }
    
    .consultas-edit-tab {
        top: -22px;
        right: 15px;
    }
    
    .consultas-btn-tab {
        padding: 6px 10px;
        font-size: 0.75rem;
        letter-spacing: 0.2px;
    }
    
    .consultas-panel-content {
        padding: 12px;
        padding-top: 20px;
    }
}

/* Título de consulta */
.consultation-title-container {
    margin-bottom: 0px;
}

.consultation-title {
    color: #6a1b9a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 400;
}

.patients-cards-container .consultation-title-container,
.patients-cards-container .consultation-form-section,
.patients-cards-container .consultation-form-section .row,
.patients-cards-container .consultation-form-section .col,
.patients-cards-container .consultation-form-section p,
.patients-cards-container .consultation-form-section .grey-text {
    text-align: left;
}

.patients-cards-container .consultation-form-section {
    padding: 18px;
    margin-bottom: 16px;
}

.patients-cards-container .consultation-form-section h6 {
    margin-bottom: 12px;
    padding-bottom: 8px;
}

.patients-cards-container .consultation-form-section .row {
    margin-bottom: 8px;
}

.patients-cards-container .consultation-form-section p {
    margin: 2px 0;
    line-height: 1.35;
}

.patients-cards-container .consultation-form-section .signos-vitales-grid {
    margin-top: 8px;
    gap: 10px;
}

.consultation-title .material-icons {
    margin-right: 8px;
    font-size: 1.8rem;
}

.consultation-date {
    color: #666;
    font-size: 16px;
    margin: 0;
    display: flex;
    align-items: center;
}

.consultation-date .material-icons {
    font-size: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

.password-toggle-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #6a1b9a;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:focus {
    outline: none;
}

.password-toggle-btn .material-icons {
    font-size: 1.4rem;
}

.input-field .password-toggle-btn + label {
    width: calc(100% - 2rem);
}
