.card-header-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.35rem 0.35rem 0 0;
    padding: 1rem 1.25rem;
    border-bottom: none;
    min-height: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header-gradient h6 {
    color: white;
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
    display: flex;
    align-items: center;
}

.card-header-gradient a {
    color: white;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.card-header-gradient a:hover {
    opacity: 1;
    color: white;
    text-decoration: none;
}
#vmSearchResults .list-group-item {
    cursor: pointer;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#vmSearchResults .list-group-item:hover {
    background-color: #f8f9fa;
    border-color: #4e73df;
}

#vmSearchResults .list-group-item.active {
    background-color: #4e73df;
    border-color: #4e73df;
    color: white;
}

.vm-item-header {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.4;
}

#vmSearchResults .list-group-item.active .vm-item-header {
    color: white;
}

#vmSearch:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#linkToCMDB + label {
    font-size: 1rem;
    font-weight: normal;
    color: #2c3e50;
}

#linkToCMDB + label strong {
    font-weight: normal;
}

#vmSelectionGroup {
    transition: all 0.3s ease;
}

#vmSearchResults {
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid #dee2e6;
}

#vmSearch:disabled {
    background-color: #e9ecef;
    opacity: 0.7;
}

.vm-result-item:focus {
    outline: 2px solid #4e73df;
    outline-offset: -2px;
}

@media (max-width: 768px) {
    #vmSearchResults .list-group-item {
        padding: 0.5rem 0.75rem;
    }
    
    .vm-item-header {
        font-size: 0.9rem;
    }
    
    #vmSearchResults {
        max-height: 250px;
    }
}

.alert.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.uuid-complete {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border-left: 3px solid #dee2e6;
    margin-top: 0.5rem;
    word-break: break-all;
}

.uuid-complete:hover {
    background: #e9ecef;
    cursor: pointer;
}

.vm-status-found {
    border-left-color: #28a745 !important;
}

.vm-status-partial {
    border-left-color: #ffc107 !important;
}

.vm-status-missing {
    border-left-color: #dc3545 !important;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.edit-mode .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.edit-mode .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.edit-mode .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

#selectedVMInfo small.text-muted {
    color: rgba(255, 255, 255, 0.8) !important; 
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    display: block;
    margin-top: 0.25rem;
    word-break: break-all;
}

#selectedVM .alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

#selectedVM .alert-success small.text-muted {
    color: #0c5460 !important;
    opacity: 0.8;
}

/* ===== SERVIDORES STYLES ===== */

.servidores-breadcrumb {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background-color: #e9ecef;
    border-radius: 0.375rem;
    color: #6c757d;
}

.servidores-nuevo-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 50px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    margin-left: auto;
}

.servidores-nuevo-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2) !important;
}

.servidores-nuevo-btn i {
    margin-right: 0.5rem;
    font-size: 0.7rem;
}

.servidores-th-id,
.servidores-td-id {
    width: 80px;
    text-align: center !important;
    vertical-align: middle !important;
}

.servidores-th-action,
.servidores-td-action {
    width: 100px;
    text-align: center !important;
    vertical-align: middle !important;
}

.servidores-action-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50% !important;
    background-color: #fff !important;
    border: 1px solid #4e73df !important;
    color: #4e73df !important;
    font-size: 0.75rem;
    line-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.servidores-action-btn:hover {
    background-color: #4e73df !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(78, 115, 223, 0.3);
}

.servidores-action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

#myTable thead th:first-child,
#myTable thead th:last-child,
#myTable tbody tr td:first-child,
#myTable tbody tr td:last-child {
    text-align: center !important;
    vertical-align: middle !important;
}

table.dataTable thead .sorting:first-child,
table.dataTable thead .sorting_asc:first-child,
table.dataTable thead .sorting_desc:first-child,
table.dataTable thead .sorting:last-child,
table.dataTable thead .sorting_asc:last-child,
table.dataTable thead .sorting_desc:last-child {
    text-align: center !important;
}

@media (max-width: 768px) {
    .servidores-nuevo-btn {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .servidores-action-btn {
        width: 28px;
        height: 28px;
        line-height: 26px;
        font-size: 0.7rem;
    }
    
    .card-header-gradient {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .servidores-nuevo-btn {
        margin-left: 0;
        align-self: flex-end;
    }
}

.card.mx-auto[style*="max-width: 800px"] > .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.35rem 0.35rem 0 0;
    padding: 1rem 1.25rem;
    border-bottom: none;
    min-height: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card.mx-auto[style*="max-width: 800px"] > .card-header .m-0,
.card.mx-auto[style*="max-width: 800px"] > .card-header h6 {
    color: white !important;
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

.card.mx-auto[style*="max-width: 800px"] > .card-header a {
    color: white;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}
.card.mx-auto[style*="max-width: 800px"] > .card-header a:hover {
    opacity: 1;
    text-decoration: none;
}

.card.mx-auto[style*="max-width: 800px"] .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    box-shadow: 0 0.15rem 0.35rem rgba(102,126,234,0.15);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card.mx-auto[style*="max-width: 800px"] .btn-primary:hover,
.card.mx-auto[style*="max-width: 800px"] .btn-primary:focus {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(102,126,234,0.18);
}

.card.mx-auto[style*="max-width: 800px"] .btn-secondary {
    background: #6c757d !important;
    color: white !important;
    border: 1px solid #6c757d !important;
    transition: transform 0.12s ease, background 0.12s ease !important;
}
.card.mx-auto[style*="max-width: 800px"] .btn-secondary:hover,
.card.mx-auto[style*="max-width: 800px"] .btn-secondary:focus {
    background: #5a6268 !important;
    border-color: #545b62 !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

.card.mx-auto[style*="max-width: 800px"] .form-group .btn-secondary {
    background: #6c757d !important;
    color: white !important;
    border: 1px solid #6c757d !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 0.25rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    opacity: 1 !important;
}

.card.mx-auto[style*="max-width: 800px"] .form-group .btn-secondary:hover {
    background: #5a6268 !important;
    border-color: #545b62 !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2) !important;
}

.card.mx-auto[style*="max-width: 800px"] .form-group .btn-secondary i {
    margin-right: 0.5rem !important;
    font-size: 0.7rem !important;
    opacity: 1 !important;
    color: white !important;
}

.card.mx-auto[style*="max-width: 800px"] > .card-body > .container > form > .btn-secondary {
    background: #6c757d !important;
    color: white !important;
    border: 1px solid #6c757d !important;
    border-radius: 0.25rem !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    font-weight: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.card.mx-auto[style*="max-width: 800px"] > .card-body > .container > form > .btn-secondary:hover {
    background: #5a6268 !important;
    border-color: #545b62 !important;
    color: white !important;
    transform: none !important;
    box-shadow: none !important;
}

.card.mx-auto[style*="max-width: 800px"] .form-group .py-3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    padding-top: 0.5rem !important;
}

.card.mx-auto[style*="max-width: 800px"] .form-group .py-3:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

.card.mx-auto[style*="max-width: 800px"] .form-group .py-3 label {
    color: #212529 !important;
    font-weight: 600 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.card.mx-auto[style*="max-width: 800px"] .form-group .py-3 > div:last-child {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
}

.card.mx-auto[style*="max-width: 800px"] > .card-body > .container > form > .btn-secondary {
    background: #6c757d !important;
    color: white !important;
    border: 1px solid #6c757d !important;
    border-radius: 0.25rem !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    font-weight: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.card.mx-auto[style*="max-width: 800px"] > .card-body > .container > form > .btn-secondary:hover {
    background: #5a6268 !important;
    border-color: #545b62 !important;
    color: white !important;
    transform: none !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    .card.mx-auto[style*="max-width: 800px"] .form-group .py-3 {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }
    
    .card.mx-auto[style*="max-width: 800px"] .form-group .py-3 > div:last-child {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    .card.mx-auto[style*="max-width: 800px"] .form-group .btn-secondary {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

.card.mx-auto[style*="max-width: 800px"] select#metodoValidacion,
.card.mx-auto[style*="max-width: 800px"] select#tipoCertificado {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    margin: 0 !important;
    padding: 0.375rem 0.75rem !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    height: calc(1.5em + 0.75rem + 2px) !important;
    background-color: #fff !important;
    transform: none !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    float: none !important;
}

.card.mx-auto[style*="max-width: 800px"] label[for="metodoValidacion"],
.card.mx-auto[style*="max-width: 800px"] label[for="tipoCertificado"] {
    margin-bottom: 0.5rem !important;
    font-weight: 400 !important;
    color: #212529 !important;
    font-size: 1rem !important;
    display: block !important;
    width: 100% !important;
}

.card.mx-auto[style*="max-width: 800px"] .form-group {
    width: 100% !important;
    margin-bottom: 1rem !important;
    padding: 0 !important;
    display: block !important;
    position: relative !important;
}

.card.mx-auto[style*="max-width: 800px"] select.form-control {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 0.75rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1rem !important;
    padding-right: 2.25rem !important;
}

.card.mx-auto[style*="max-width: 800px"] #expirytodayand3m {
    background: #6c757d !important;
    color: white !important;
    border: 1px solid #6c757d !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 0.25rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    opacity: 1 !important;
}

.card.mx-auto[style*="max-width: 800px"] #expirytodayand3m:hover {
    background: #5a6268 !important;
    border-color: #545b62 !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2) !important;
}

.card.mx-auto[style*="max-width: 800px"] #expirytodayand3m i {
    margin-right: 0.5rem !important;
    font-size: 0.7rem !important;
    opacity: 1 !important;
    color: white !important;
}

/* ===== CERTIFICADO DETALLE STYLES ===== */

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] .card-header a:hover {
    opacity: 1 !important;
    text-decoration: none !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] .card-header a[id*="CrtLink"] {
    padding: 0.375rem !important;
    border-radius: 0.25rem !important;
    transition: all 0.15s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2rem !important;
    height: 2rem !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] .card-header a[id*="CrtLink"]:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] .card-header a#deleteCrtLink:hover {
    background: rgba(255, 107, 107, 0.2) !important;
    color: #ff6b6b !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] .card-body {
    padding: 1.5rem !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] .card-title {
    color: #2c3e50 !important;
    font-weight: 600 !important;
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] .card-text {
    color: #495057 !important;
    line-height: 1.6 !important;
    margin-bottom: 1rem !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] .card-text strong {
    color: #2c3e50 !important;
    font-weight: 600 !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] ul#servidores {
    padding-left: 1.5rem !important;
    margin: 0.5rem 0 1rem 0 !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] ul#servidores li {
    color: #495057 !important;
    margin-bottom: 0.25rem !important;
    font-family: 'Courier New', monospace !important;
    font-size: 0.875rem !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] #notasCrt {
    background: #f8f9fa !important;
    padding: 1rem !important;
    border-radius: 0.375rem !important;
    border-left: 4px solid #667eea !important;
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] #notasCrt h1,
.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] #notasCrt h2,
.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] #notasCrt h3 {
    color: #2c3e50 !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] #notasCrt code {
    background: #e9ecef !important;
    padding: 0.125rem 0.25rem !important;
    border-radius: 0.25rem !important;
    font-size: 0.8rem !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] #notasCrt pre {
    background: #2c3e50 !important;
    color: white !important;
    padding: 1rem !important;
    border-radius: 0.375rem !important;
    overflow-x: auto !important;
}

.card.shadow.mb-4.mx-auto[style*="max-width: 800px"] #ultimaModificacionCrt {
    font-family: 'Courier New', monospace !important;
    font-size: 0.8rem !important;
    color: #6c757d !important;
    background: #f8f9fa !important;
    padding: 0.5rem !important;
    border-radius: 0.25rem !important;
    display: inline-block !important;
    margin-top: 0.25rem !important;
}

#crtTestCard.card.mb-4.py-3.border-left-primary {
    border-left-color: #667eea !important;
    background: #f8f9fa !important;
}

#crtTestCard .card-body {
    padding: 1rem 1.25rem !important;
}

#crtTestCard .table {
    margin-bottom: 0 !important;
    font-size: 0.85rem !important;
    width: 100% !important;
}

#crtTestCard .table th {
    background: #667eea !important;
    color: white !important;
    border-color: #5a6fd8 !important;
    font-weight: 600 !important;
    padding: 0.75rem !important;
    text-align: center !important;
}

#crtTestCard .table td {
    padding: 0.75rem !important;
    vertical-align: middle !important;
    text-align: center !important;
}

#crtTestCard .alert-danger {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

#crtTestCard .alert-warning {
    background-color: #fff3cd !important;
    color: #856404 !important;
}

/* ===== CERTIFICADO DETALLE STYLES - PANTALLA COMPLETA ===== */

.card.shadow.mb-4 .card-header a:hover {
    opacity: 1 !important;
    text-decoration: none !important;
}

.card.shadow.mb-4 .card-header a[id*="CrtLink"] {
    padding: 0.375rem !important;
    border-radius: 0.25rem !important;
    transition: all 0.15s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2rem !important;
    height: 2rem !important;
}

.card.shadow.mb-4 .card-header a[id*="CrtLink"]:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
}

.card.shadow.mb-4 .card-header a#deleteCrtLink:hover {
    background: rgba(255, 107, 107, 0.2) !important;
    color: #ff6b6b !important;
}

.card.shadow.mb-4 .card-body {
    padding: 1.5rem !important;
}

.card.shadow.mb-4 .card-title {
    color: #2c3e50 !important;
    font-weight: 600 !important;
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
}

.card.shadow.mb-4 .card-text {
    color: #495057 !important;
    line-height: 1.6 !important;
    margin-bottom: 1rem !important;
}

.card.shadow.mb-4 .card-text strong {
    color: #2c3e50 !important;
    font-weight: 600 !important;
}

.card.shadow.mb-4 ul#servidores {
    padding-left: 1.5rem !important;
    margin: 0.5rem 0 1rem 0 !important;
}

.card.shadow.mb-4 ul#servidores li {
    color: #495057 !important;
    margin-bottom: 0.25rem !important;
    font-family: 'Courier New', monospace !important;
    font-size: 0.875rem !important;
}

.card.shadow.mb-4 #notasCrt {
    background: #f8f9fa !important;
    padding: 1rem !important;
    border-radius: 0.375rem !important;
    border-left: 4px solid #667eea !important;
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
}

.card.shadow.mb-4 #notasCrt h1,
.card.shadow.mb-4 #notasCrt h2,
.card.shadow.mb-4 #notasCrt h3 {
    color: #2c3e50 !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
}

.card.shadow.mb-4 #notasCrt code {
    background: #e9ecef !important;
    padding: 0.125rem 0.25rem !important;
    border-radius: 0.25rem !important;
    font-size: 0.8rem !important;
}

.card.shadow.mb-4 #notasCrt pre {
    background: #2c3e50 !important;
    color: white !important;
    padding: 1rem !important;
    border-radius: 0.375rem !important;
    overflow-x: auto !important;
}

.card.shadow.mb-4 #ultimaModificacionCrt {
    font-family: 'Courier New', monospace !important;
    font-size: 0.8rem !important;
    color: #6c757d !important;
    background: #f8f9fa !important;
    padding: 0.5rem !important;
    border-radius: 0.25rem !important;
    display: inline-block !important;
    margin-top: 0.25rem !important;
}

#crtTestCard.card.mb-4.py-3.border-left-primary {
    border-left-color: #667eea !important;
    background: #f8f9fa !important;
}

#crtTestCard .card-body {
    padding: 1rem 1.25rem !important;
}

#crtTestCard .table {
    margin-bottom: 0 !important;
    font-size: 0.85rem !important;
    width: 100% !important;
}

#crtTestCard .table th {
    background: #667eea !important;
    color: white !important;
    border-color: #5a6fd8 !important;
    font-weight: 600 !important;
    padding: 0.75rem !important;
    text-align: center !important;
}

#crtTestCard .table td {
    padding: 0.75rem !important;
    vertical-align: middle !important;
    text-align: center !important;
}

#crtTestCard .alert-danger {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

#crtTestCard .alert-warning {
    background-color: #fff3cd !important;
    color: #856404 !important;
}

@media (max-width: 768px) {
    .card.shadow.mb-4 .card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    .card.shadow.mb-4 .card-header > div {
        align-self: flex-end !important;
    }
    
    .card.shadow.mb-4 .card-body {
        padding: 1rem !important;
    }
    
    .card.shadow.mb-4 .card-title {
        font-size: 1.1rem !important;
    }
    
    #crtTestCard .table {
        font-size: 0.75rem !important;
    }
    
    #crtTestCard .table th,
    #crtTestCard .table td {
        padding: 0.5rem !important;
    }
}

.card.shadow.mb-4 .loading-spinner {
    display: inline-block !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    border: 2px solid #f3f3f3 !important;
    border-top: 2px solid #667eea !important;
    border-radius: 50% !important;
    animation: certificado-spin-fullscreen 1s linear infinite !important;
    margin-right: 0.5rem !important;
}

@keyframes certificado-spin-fullscreen {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#notasCrt,
.certificado-notas-container {
    display: block !important;
    background: #f8f9fa !important;
    padding: 1rem !important;
    border-radius: 0.375rem !important;
    border-left: 4px solid #667eea !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    min-height: 60px !important;
    white-space: pre-wrap !important; 
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    color: #495057 !important;
}

#notasCrt:empty::before,
.certificado-notas-container:empty::before {
    content: "No hay notas disponibles para este certificado.";
    color: #6c757d !important;
    font-style: italic !important;
    display: block !important;
}

#notasCrt ul, #notasCrt ol {
    margin: 0.5rem 0 0.75rem 1.25rem !important;
    padding: 0 !important;
}

#notasCrt pre {
    background: #2c3e50 !important;
    color: #fff !important;
    padding: 0.75rem !important;
    border-radius: 0.375rem !important;
    overflow-x: auto !important;
    margin: 0.5rem 0 !important;
    font-family: 'Courier New', monospace !important;
    font-size: 0.85rem !important;
}

#notasCrt code {
    background: #e9ecef !important;
    padding: 0.125rem 0.25rem !important;
    border-radius: 0.25rem !important;
    font-size: 0.85rem !important;
}
