/* ============================================
   ESTILOS OFICIALES MSP
   Sistema de Historia Clínica Médica
   Basado en Manual Oficial MSP Ecuador
   ============================================ */

/* ============================================
   COLORES OFICIALES POR FORMATO
   ============================================ */

/* Encabezados Principales por Formato */
.msp-001-header {
    background-color: #00B0A9;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.msp-002-header {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.msp-003-header {
    background-color: #2196F3;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.msp-005-header {
    background-color: #9C27B0;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.msp-006-header {
    background-color: #FF9800;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.msp-007-header {
    background-color: #009688;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.msp-008-header {
    background-color: #F44336;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.msp-020-header {
    background-color: #00BCD4;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.msp-024-header {
    background-color: #607D8B;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.pediatria-header {
    background-color: #E91E63;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

/* MSP-033 ODONTOLOGÍA - Color oficial verde dental */
.msp-033-header {
    background-color: #2E7D32;
    color: white;
    padding: 12px 15px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px 4px 0 0;
    font-size: 15px;
    letter-spacing: 0.5px;
}

/* ============================================
   ESTILOS ESPECÍFICOS ODONTOLOGÍA MSP-033
   ============================================ */

/* Títulos de sección odontológica con borde verde */
.odonto-section-title {
    border-left-color: #2E7D32 !important;
    background-color: #E8F5E9 !important;
    color: #1B5E20;
    font-weight: 700;
}

/* Checkboxes personalizados para odontología */
.msp-checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    padding: 5px 0;
}

.msp-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Inputs pequeños para tablas */
.msp-input-sm {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
}

.msp-select-sm {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    background-color: white;
}

/* Tablas específicas de odontología */
.odonto-tratamiento-table th {
    background-color: #2E7D32 !important;
    color: white !important;
    font-size: 12px;
    padding: 8px 6px;
}

.odonto-prescripcion-table th {
    background-color: #1976D2 !important;
    color: white !important;
    font-size: 12px;
    padding: 8px 6px;
}

/* ============================================
   ODONTOGRAMA - DISEÑO PROFESIONAL V2.0 (GEOMÉTRICO)
   ============================================ */

.odontograma-pro-container {
    background-color: #ffffff;
    border: 2px solid #2E7D32;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Toolbar Sticky */
.sticky-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f9f9f9;
    border-bottom: 2px solid #2E7D32;
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.toolbar-title {
    font-weight: bold;
    font-size: 11px;
    margin-bottom: 8px;
    color: #1B5E20;
    text-transform: uppercase;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}

.toolbar-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tool-item {
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    background: white;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 15px;
    transition: all 0.2s;
}

.tool-item:hover {
    background-color: #E8F5E9;
    border-color: #2E7D32;
}

.tool-item input:checked+span+span,
.tool-item input:checked+span {
    font-weight: bold;
}

.tool-item input {
    margin-right: 6px;
}

.color-box {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1px solid #999;
    margin-right: 6px;
    border-radius: 2px;
}

.symbol-box {
    display: inline-block;
    width: 20px;
    text-align: center;
    font-weight: bold;
    margin-right: 4px;
    font-family: monospace;
}

.bg-caries {
    background-color: #D32F2F;
}

.bg-obturado {
    background-color: #1976D2;
}

.bg-endodoncia {
    background-color: #FBC02D;
}

.color-red {
    color: #D32F2F;
    font-weight: bold;
}

/* Visual del Diente */
.odontograma-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    overflow-x: auto;
    padding: 10px;
}

.arcada {
    display: flex;
    gap: 30px;
}

.cuadrante {
    display: flex;
    gap: 4px;
    padding: 8px;
    /* border: 1px dashed #ccc; */
    background: #fafafa;
    border-radius: 8px;
}

.separador-arcadas {
    width: 80%;
    height: 1px;
    background: #e0e0e0;
}

/* Componente Diente Individual */
.diente-wrapper {
    position: relative;
    width: 44px;
    text-align: center;
    user-select: none;
    margin: 0 2px;
}

.diente-numero {
    font-size: 11px;
    font-weight: bold;
    color: #555;
    margin-bottom: 4px;
}

.diente-shape {
    position: relative;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    /* background-color: #eee; Guía visual opcional */
}

/* CARAS DEL DIENTE (GEOMETRÍA) */
.cara {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transition: background-color 0.2s, transform 0.1s;
    cursor: crosshair;
    background-color: #fff;
    border: 0.5px solid #bbb;
    /* Fallback border */
}

.cara:hover {
    filter: brightness(0.92);
    z-index: 20;
    /* Elevate on hover */
}

/* FORMAS CON CLIP-PATH */

/* CENTRO (Oclusal) - Cuadrado rotado o Círculo */
.cara-centro {
    clip-path: polygon(25% 25%, 75% 25%, 75% 75%, 25% 75%);
    background-color: #fff;
    z-index: 10;
    border: none;
    /* clip-path recorta el borde, asi que usamos box-shadow o pseudo-elementos si queremos bordes, pero el background difiere */
}

/* Truco para bordes en clip-path: Poner un contenedor padre con color de fondo (borde) y el hijo un poco mas pequeño. 
   Por simplicidad, usamos background diferenciado. */

/* ARRIBA */
.cara-arriba {
    clip-path: polygon(0 0, 100% 0, 75% 25%, 25% 25%);
    z-index: 5;
}

/* ABAJO */
.cara-abajo {
    clip-path: polygon(25% 75%, 75% 75%, 100% 100%, 0 100%);
    z-index: 5;
}

/* IZQUIERDA */
.cara-izquierda {
    clip-path: polygon(0 0, 25% 25%, 25% 75%, 0 100%);
    z-index: 5;
}

/* DERECHA */
.cara-derecha {
    clip-path: polygon(100% 0, 75% 25%, 75% 75%, 100% 100%);
    z-index: 5;
}

/* Bordes visuales (Fake borders via background container not viable here easily without complex HTML).
   Usaremos un truco: un background radial/conico o imagen SVG es mejor, pero CSS puro:
   Simplemente el hover y el contraste bastan.
*/

/* ============================================
   SIMBOLOGÍA ODONTOLÓGICA COMPLETAMENTE DETALLADA
   ============================================ */

/* ESTADOS DE CARA (Relleno) */
.pat-caries {
    background-color: #D32F2F !important;
}

/* Rojo */
.pat-obturado {
    background-color: #1976D2 !important;
}

/* Azul */
.pat-endodoncia {
    background-color: transparent !important;
}

/* Endodoncia es simbolo global triangulo, no cara pintada */

/* CORONA (Borde Rojo en la cara o en el diente?) 
   Si es estado de cara (corona parcial) o diente total. 
   Asumiremos Corona Total cubre todo el diente -> Borde Rojo al wrapper o square rojo.
   La imagen muestra un cuadrado rojo circunscrito.
*/
.pat-corona {
    background-color: transparent !important;
    box-shadow: inset 0 0 0 2px #D32F2F;
    /* Borde interno rojo */
}

/* SIMBOLOS SUPERPUESTOS (OVERLAY) */
.simbolo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 30;
    display: block;
    /* Forzar block para evitar flex behavior antiguo */
}

/* Span interno para cada símbolo (Stacked) */
.stacked-sym {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 2px white;
    pointer-events: none;
    /* Asegurar click-through */
    color: inherit;
    /* Heredar color definido en regla pseudo */
}

/* Compatibilidad con logica antigua (si se aplica clase directo al overlay) */
.simbolo-overlay.sym-extraccion::after,
.simbolo-overlay.sym-perdida-caries::after,
.simbolo-overlay.sym-perdida-otra::after,
.simbolo-overlay.sym-endodoncia::after,
.simbolo-overlay.sym-protesis-total::after,
.simbolo-overlay.sym-protesis-removible::after,
.simbolo-overlay.sym-protesis-fija::after,
.simbolo-overlay.sym-sellante-nec::after,
.simbolo-overlay.sym-sellante-rea::after,
.simbolo-overlay.sym-ausente::after {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* X Roja = Extracción Indicada */
.sym-extraccion::after {
    content: "X";
    color: #D32F2F;
    font-size: 36px;
    line-height: 1;
}

/* X Azul = Pérdida por Caries */
.sym-perdida-caries::after {
    content: "X";
    color: #1976D2;
    font-size: 36px;
    line-height: 1;
}

/* (X) Roja = Pérdida otra causa */
.sym-perdida-otra::after {
    content: "⊗";
    color: #D32F2F;
    font-size: 36px;
}

/* Triangulo Rojo = Endodoncia */
.sym-endodoncia::after {
    content: "▲";
    color: #D32F2F;
    font-size: 20px;
}

/* Prótesis Total = "=" Rojo arriba y abajo (Esto seria para edentulos totales, afecta marcacion multiple)
   Para diente individual, usaremos estilo visual aproximado */
.sym-protesis-total::after {
    content: "=";
    color: #D32F2F;
    font-size: 40px;
    margin-top: -5px;
}

/* Prótesis Removible = "( )" Rojos abarcando el diente */
.sym-protesis-removible::after {
    content: "( )";
    color: #D32F2F;
    font-size: 28px;
    letter-spacing: 15px;
    /* Separar parentesis */
}

/* Prótesis Fija = "[ ]" o similar */
.sym-protesis-fija::after {
    content: "[ ]";
    color: #D32F2F;
    font-size: 28px;
    letter-spacing: 15px;
}

/* Sellante Necesario = * Rojo */
.sym-sellante-nec::after {
    content: "*";
    color: #D32F2F;
    font-size: 30px;
    margin-top: 5px;
    /* Centrar mejor el asterisco */
}

/* Sellante Realizado = * Azul */
.sym-sellante-rea::after {
    content: "*";
    color: #1976D2;
    font-size: 30px;
    margin-top: 5px;
}

/* Ausente (X Negra en mi version anterior, MSP suele ser azul o tachado)
   Si usuario pide "Perdida por caries = X Azul", Ausente "Normal" (agenesia) suele ser distinta.
   Mantendremos X Negra para Ausente comun si no especifica, o unificar.
*/
.sym-ausente::after {
    content: "X";
    color: #333;
    /* O #1976D2 si es azul */
    font-size: 36px;
}

/* Otros */
.msp-limit-height {
    max-height: 400px;
    overflow-y: auto;
}

.odonto-tratamiento-table input {
    width: 100%;
    border: none;
    background: transparent;
}


}

/* Leyenda del odontograma */
.odontograma-leyenda {
    background-color: #F5F5F5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}

.leyenda-title {
    font-weight: bold;
    font-size: 13px;
    color: #2E7D32;
    margin-bottom: 10px;
    text-align: center;
}

.leyenda-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.leyenda-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    padding: 5px;
}

.leyenda-item span {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border: 1px solid #666;
    text-align: center;
    line-height: 18px;
    font-weight: bold;
}

.simbolo-caries {
    background-color: #000000;
    color: white;
}

.simbolo-obturacion {
    background-color: #2196F3;
    color: white;
}

.simbolo-ausente {
    background-color: #F44336;
    color: white;
}

.simbolo-corona {
    background-color: #FFD700;
    color: #333;
}

.simbolo-endodoncia {
    background-color: #9C27B0;
    color: white;
}

.simbolo-extraccion {
    background-color: #FF5722;
    color: white;
}

/* Salto de página para impresión */
.page-break {
    page-break-before: always;
    margin: 30px 0;
    border-top: 2px dashed #ccc;
    padding-top: 20px;
}

@media print {
    .page-break {
        page-break-before: always;
        border: none;
        margin: 0;
        padding: 0;
    }

    .odontograma-container {
        page-break-inside: avoid;
    }

    .msp-033-header {
        background-color: #2E7D32 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .odonto-section-title {
        background-color: #E8F5E9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ============================================
   SECCIONES Y CONTENEDORES
   ============================================ */

.msp-container {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.msp-section {
    border: 1px solid #ddd;
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.msp-section-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
    padding: 8px 10px;
    background-color: #e0e0e0;
    border-left: 4px solid #00B0A9;
    border-radius: 2px;
}

.msp-subsection {
    margin-top: 10px;
    padding: 10px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
}

.msp-subsection-title {
    font-weight: 600;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

/* ============================================
   CAMPOS DE FORMULARIO
   ============================================ */

.msp-field-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: block;
    font-size: 13px;
}

.msp-field-required::after {
    content: " *";
    color: #F44336;
    font-weight: bold;
}

.msp-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.msp-input:focus {
    border-color: #00B0A9;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 176, 169, 0.1);
}

.msp-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.msp-textarea:focus {
    border-color: #00B0A9;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 176, 169, 0.1);
}

.msp-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
}

/* ============================================
   TABLAS MSP
   ============================================ */

.msp-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    background-color: white;
}

.msp-table th {
    background-color: #D8D8D8;
    padding: 10px 8px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #999;
    font-size: 13px;
    color: #333;
}

.msp-table td {
    padding: 8px;
    border: 1px solid #ddd;
    font-size: 13px;
}

.msp-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.msp-table tr:hover {
    background-color: #f5f5f5;
}

/* Tabla de signos vitales */
.msp-vital-signs-table th {
    background-color: #00B0A9;
    color: white;
}

/* Tabla de diagnósticos */
.msp-diagnostics-table th {
    background-color: #4CAF50;
    color: white;
}

/* Tabla de recetas */
.msp-prescriptions-table th {
    background-color: #9C27B0;
    color: white;
}

/* ============================================
   GRILLAS Y LAYOUTS
   ============================================ */

.msp-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.msp-col-1 {
    flex: 0 0 8.333%;
    max-width: 8.333%;
    padding: 0 10px;
}

.msp-col-2 {
    flex: 0 0 16.666%;
    max-width: 16.666%;
    padding: 0 10px;
}

.msp-col-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 10px;
}

.msp-col-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 10px;
}

.msp-col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
}

.msp-col-8 {
    flex: 0 0 66.666%;
    max-width: 66.666%;
    padding: 0 10px;
}

.msp-col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 10px;
}

.msp-form-group {
    margin-bottom: 15px;
}

/* ============================================
   BADGES Y ETIQUETAS
   ============================================ */

.msp-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.msp-badge-success {
    background-color: #4CAF50;
    color: white;
}

.msp-badge-danger {
    background-color: #F44336;
    color: white;
}

.msp-badge-warning {
    background-color: #FF9800;
    color: white;
}

.msp-badge-info {
    background-color: #2196F3;
    color: white;
}

/* Clasificación de Triaje */
.triaje-rojo {
    background-color: #F44336;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
}

.triaje-naranja {
    background-color: #FF9800;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
}

.triaje-amarillo {
    background-color: #FFC107;
    color: #333;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
}

.triaje-verde {
    background-color: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
}

.triaje-azul {
    background-color: #2196F3;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
}

/* ============================================
   BOTONES MSP
   ============================================ */

.msp-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.msp-btn-primary {
    background-color: #00B0A9;
    color: white;
}

.msp-btn-primary:hover {
    background-color: #009688;
}

.msp-btn-secondary {
    background-color: #607D8B;
    color: white;
}

.msp-btn-secondary:hover {
    background-color: #546E7A;
}

.msp-btn-danger {
    background-color: #F44336;
    color: white;
}

.msp-btn-danger:hover {
    background-color: #E53935;
}

/* ============================================
   ALERTAS Y MENSAJES
   ============================================ */

.msp-alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 4px solid;
}

.msp-alert-info {
    background-color: #E3F2FD;
    border-left-color: #2196F3;
    color: #1976D2;
}

.msp-alert-success {
    background-color: #E8F5E9;
    border-left-color: #4CAF50;
    color: #388E3C;
}

.msp-alert-warning {
    background-color: #FFF3E0;
    border-left-color: #FF9800;
    color: #F57C00;
}

.msp-alert-danger {
    background-color: #FFEBEE;
    border-left-color: #F44336;
    color: #D32F2F;
}

/* ============================================
   DATOS DEL PACIENTE (HEADER)
   ============================================ */

.msp-patient-header {
    background: #ffffff;
    color: #2c3e50;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-left: 5px solid #00ACC1;
}

.msp-patient-header span {
    color: #2c3e50;
    font-weight: 500;
}

.msp-patient-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.msp-patient-field {
    margin: 5px 15px 5px 0;
}

.msp-patient-field strong {
    font-weight: 600;
    margin-right: 5px;
}

/* ============================================
   SIGNOS VITALES
   ============================================ */

.msp-vital-signs {
    background-color: #E3F2FD;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #2196F3;
    margin-bottom: 15px;
}

.msp-vital-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.msp-vital-item {
    background-color: white;
    padding: 10px;
    border-radius: 3px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.msp-vital-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.msp-vital-value {
    font-size: 20px;
    font-weight: bold;
    color: #2196F3;
}

/* ============================================
   GENERADOR DE RECETAS (NO TOCAR)
   ============================================ */

#recetas {
    /* Mantener estilos existentes del sistema */
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {

    .msp-col-1,
    .msp-col-2,
    .msp-col-3,
    .msp-col-4,
    .msp-col-6,
    .msp-col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .msp-patient-info {
        flex-direction: column;
    }

    .msp-vital-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .msp-vital-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   IMPRESIÓN
   ============================================ */

@media print {
    .msp-no-print {
        display: none !important;
    }

    .msp-section {
        page-break-inside: avoid;
    }

    .msp-container {
        box-shadow: none;
        border: 1px solid #000;
    }

    .msp-patient-header {
        background: #00B0A9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .msp-table {
        page-break-inside: auto;
    }

    .msp-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

/* ============================================
   UTILIDADES
   ============================================ */

.msp-text-center {
    text-align: center;
}

.msp-text-right {
    text-align: right;
}

.msp-text-left {
    text-align: left;
}

.msp-mt-10 {
    margin-top: 10px;
}

.msp-mt-15 {
    margin-top: 15px;
}

.msp-mt-20 {
    margin-top: 20px;
}

.msp-mb-10 {
    margin-bottom: 10px;
}

.msp-mb-15 {
    margin-bottom: 15px;
}

.msp-mb-20 {
    margin-bottom: 20px;
}

.msp-p-10 {
    padding: 10px;
}

.msp-p-15 {
    padding: 15px;
}

.msp-p-20 {
    padding: 20px;
}

.msp-bold {
    font-weight: bold;
}

.msp-italic {
    font-style: italic;
}

.msp-hidden {
    display: none;
}

.msp-visible {
    display: block;
}

/* ============================================
   FIN DE ESTILOS MSP
   ============================================ */