/* Sección moderna sin bordes */

.section-modern {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.mis-datos-container {
    padding: 1.5rem;
}

.opciones-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.opcion-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.opcion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.opcion-card .card-body {
    padding: 1.5rem;
    gap: 1rem;
}

.opcion-icono {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.opcion-icono.grupo-familiar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.opcion-icono.obra-social {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.opcion-icono svg {
    width: 28px;
    height: 28px;
    color: white;
}

.opcion-contenido {
    flex: 1;
}

.opcion-contenido h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.opcion-contenido p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.opcion-flecha {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.opcion-card:hover .opcion-flecha {
    opacity: 1;
    transform: translateX(4px);
}

.opcion-flecha svg {
    width: 20px;
    height: 20px;
    color: #666;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-contenido {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 2rem;
}

.modal-cerrar {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-cerrar:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.modal-cerrar svg {
    width: 20px;
    height: 20px;
    color: #666;
}


/* Título moderno para el modal de obra social */

.modal-obra-social-content {
    background: transparent;
}

.modal-obra-social-title {
    position: relative;
    color: #034EA2;
    padding: 0.75rem 0 0.5rem 0;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.5rem;
}

.modal-obra-social-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #cc3333 0%, rgba(204, 51, 51, 0.5) 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

@media (max-width: 768px) {
    .mis-datos-container {
        padding: 1rem;
    }
    .opcion-card .card-body {
        padding: 1rem;
    }
    .opcion-icono {
        width: 50px;
        height: 50px;
    }
    .opcion-icono svg {
        width: 24px;
        height: 24px;
    }
    .opcion-contenido h5 {
        font-size: 1rem;
    }
    .opcion-contenido p {
        font-size: 0.85rem;
    }
    .modal-contenido {
        padding: 1.5rem;
        max-height: 85vh;
    }
}

@media (min-width: 769px) {
    .opciones-grid {
        grid-template-columns: 1fr;
    }
}


/* Estilos para modal de obras sociales */

.modal-contenido-obras-sociales {
    max-width: 800px;
}

.btn-agregar-obra-social {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-agregar-obra-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-agregar-obra-social svg {
    width: 18px;
    height: 18px;
}

.obras-sociales-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.obra-social-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.obra-social-card:hover {
    border-color: #0264b3;
    box-shadow: 0 4px 12px rgba(2, 100, 179, 0.1);
}

.obra-social-header {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.obra-social-inicial {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.obra-social-info {
    flex: 1;
}

.obra-social-info h5 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.numero-afiliado {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.numero-afiliado strong {
    color: #333;
}

.obra-social-acciones {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-accion-editar,
.btn-accion-eliminar {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-accion-editar {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-accion-editar:hover {
    background: #bbdefb;
    transform: translateY(-2px);
}

.btn-accion-eliminar {
    background: #ffebee;
    color: #d32f2f;
}

.btn-accion-eliminar:hover {
    background: #ffcdd2;
    transform: translateY(-2px);
}

.btn-accion-editar svg,
.btn-accion-eliminar svg {
    width: 18px;
    height: 18px;
}

.obra-social-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 1rem;
}

.obra-social-badge svg {
    width: 16px;
    height: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

@media (max-width: 768px) {
    .modal-contenido-obras-sociales {
        max-width: 100%;
    }
    .obra-social-card {
        padding: 1rem;
    }
    .obra-social-header {
        flex-wrap: wrap;
    }
    .obra-social-inicial {
        width: 48px;
        height: 48px;
        min-width: 48px;
        font-size: 1.5rem;
    }
    .obra-social-info {
        flex: 1 1 100%;
        order: 2;
    }
    .obra-social-info h5 {
        font-size: 1.05rem;
    }
    .numero-afiliado {
        font-size: 0.9rem;
    }
    .obra-social-acciones {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    .btn-accion-editar,
    .btn-accion-eliminar {
        flex: 1;
        justify-content: center;
    }
    .btn-agregar-obra-social {
        width: 100%;
        justify-content: center;
    }
}


/* Formulario de agregar obra social */

.form-agregar-obra-social {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #dee2e6;
}

.form-header h3 {
    color: #034EA2;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.btn-volver {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-volver:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.alert-success {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 1.5rem;
    color: #155724;
    margin-bottom: 1.5rem;
    animation: slideIn 0.4s ease;
}

.alert-success svg {
    flex-shrink: 0;
    color: #28a745;
    width: 28px;
    height: 28px;
}

.alert-success strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.alert-success p {
    margin: 0;
    font-size: 0.95rem;
    color: #155724;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #c33;
    margin-bottom: 1.5rem;
}

.alert-error svg {
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #495057;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #034EA2;
    box-shadow: 0 0 0 3px rgba(3, 78, 162, 0.1);
}

.form-control:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}


/* Select2 estilo dropdown con búsqueda */

.select2-container {
    position: relative;
}

.select2-input-wrapper {
    position: relative;
}

.select2-input {
    padding-right: 3rem !important;
}

.select2-input.active {
    border-color: #034EA2;
    box-shadow: 0 0 0 3px rgba(3, 78, 162, 0.1);
}

.select2-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.select2-input.active~.select2-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.select2-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.select2-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #034EA2;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    max-height: 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.select2-results-count {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.select2-results {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    max-height: 280px;
}

.select2-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f1f3f5;
}

.select2-result-item:hover {
    background: #f8f9fa;
}

.select2-result-item.selected {
    background: #e7f1ff;
}

.select2-result-name {
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.25rem;
}

.select2-result-sigla {
    font-size: 0.85rem;
    color: #6c757d;
}

.select2-no-results {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
}

.select2-no-results svg {
    margin: 0 auto 1rem;
    display: block;
    opacity: 0.5;
}

.select2-no-results p {
    margin: 0;
    font-size: 0.95rem;
}

.select2-loading {
    padding: 0.75rem 1rem;
    background: #e9ecef;
    border-radius: 8px;
    color: #6c757d;
    text-align: center;
    margin-top: 0.5rem;
}

.loading-select {
    padding: 0.75rem 1rem;
    background: #e9ecef;
    border-radius: 8px;
    color: #6c757d;
    text-align: center;
}

.form-text {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #dee2e6;
}

.btn-cancelar,
.btn-guardar {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancelar {
    background: #6c757d;
    color: white;
}

.btn-cancelar:hover:not(:disabled) {
    background: #5a6268;
}

.btn-guardar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-guardar:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-cancelar:disabled,
.btn-guardar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner-small {
    animation: spin 1s linear infinite;
}

@media (max-width: 768px) {
    .form-agregar-obra-social {
        padding: 1.5rem;
    }
    .form-actions {
        flex-direction: column-reverse;
    }
    .btn-cancelar,
    .btn-guardar {
        width: 100%;
        justify-content: center;
    }
}