/* 
 * SGAc 2025 - Design System 
 * Basado en Estética Premium y Dinámica
 */

:root {
    /* Paleta de Colores Institucional (Editable por Tenant) */
    --primary: #2563eb;         /* Azul Premium */
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    
    --secondary: #64748b;
    --accent: #f59e0b;          /* Ámbar para alertas */
    
    /* Colores de Fondo y Superficie */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    
    /* Estados de Evaluación */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Bordes y Sombras */
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Radio de Borde */
    --radius: 0.75rem;
}

/* Modo Oscuro (Opcional) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: #0f172a;
        --bg-card: #1e293b;
        --text-main: #f8fafc;
        --text-muted: #94a3b8;
        --border-color: #334155;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-back:hover {
    background-color: #e2e8f0;
    color: var(--primary-dark);
    transform: translateX(-2px);
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination {
    display: flex;
    gap: 0.25rem;
}

.page-link {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.85rem;
    background: white;
    transition: all 0.2s;
}

.page-link:hover:not(.active) {
    background: var(--bg-main);
    border-color: var(--primary);
}

.page-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
    background: #f1f5f9;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rows-per-page {
    padding: 0.3rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}

/* Utils Responsivos */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
