/* Portal de Soporte API - Estilos personalizados */

/* Variables CSS */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Estilos generales */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navbar personalizado */
.navbar-brand {
    font-weight: 600;
    font-size: 1.2rem;
}

.navbar-brand i {
    margin-right: 8px;
    color: #ffc107;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto;
}

.sidebar-heading {
    font-size: .875rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.nav-section {
    margin-bottom: 1rem;
}

.nav-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.nav-header a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.nav-header a:hover {
    color: var(--primary-color);
}

.sidebar .nav-link {
    color: #333;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0;
    transition: all 0.15s ease-in-out;
}

.sidebar .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
}

.sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
    border-left: 3px solid var(--primary-color);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

/* Contenido principal */
main {
    padding-top: 20px;
}

.content {
    font-size: 1rem;
    line-height: 1.8;
}

.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.content h1 {
    font-size: 2rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.content h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.content p {
    margin-bottom: 1rem;
    text-align: justify;
}

.content code {
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    color: #e83e8c;
}

.content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    border-left: 4px solid var(--primary-color);
    overflow-x: auto;
}

.content blockquote {
    border-left: 4px solid var(--info-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #6c757d;
    font-style: italic;
}

.content ul, .content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease-in-out;
}

.content a:hover {
    border-bottom-color: var(--primary-color);
}

/* Cards personalizados */
.card {
    border: 1px solid rgba(0, 0, 0, 0.125);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: rgba(13, 110, 253, 0.03);
    border-bottom: 1px solid rgba(13, 110, 253, 0.125);
}

/* Badges personalizados */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Botones */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-group .btn i {
    margin-right: 0;
}

/* Alertas */
.alert {
    border: none;
    border-left: 4px solid;
    border-radius: 0.375rem;
}

.alert-primary {
    border-left-color: var(--primary-color);
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-info {
    border-left-color: var(--info-color);
}

.alert-light {
    background-color: #f8f9fa;
    border-left-color: #dee2e6;
    color: #495057;
}

/* Jumbotron personalizado */
.jumbotron {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 2rem;
}

.jumbotron h1 {
    font-weight: 300;
}

.jumbotron .lead {
    font-size: 1.25rem;
    font-weight: 300;
}

/* Tabla responsive */
.table-responsive {
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.table td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Formularios */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Búsqueda */
.navbar .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.navbar .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.navbar .form-control:focus {
    background-color: white;
    color: #333;
    border-color: #fff;
    box-shadow: none;
}

/* Utilidades */
.text-truncate-2 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.text-truncate-3 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Responsive */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
        box-shadow: none;
    }
    
    main {
        padding-top: 0;
    }
    
    .d-md-block {
        display: none !important;
    }
}

/* Estados de loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Destacados */
.highlight {
    background-color: #fff3cd;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border-left: 3px solid #ffc107;
}

/* Footer si se necesita */
.footer {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #dee2e6;
}

/* Animaciones sutiles */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mejoras de accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible para navegación por teclado */
.btn:focus-visible,
.nav-link:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .alert {
        display: none !important;
    }
    
    .content {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .content a {
        color: black;
        text-decoration: none;
    }
    
    .content a:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
}