@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #64748b;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --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);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    letter-spacing: -0.01em;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: 1.25rem;
}

/* Cards styling */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

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

.card-header {
    border-bottom: 1px solid var(--border);
    background-color: transparent;
    padding: 1.25rem;
    font-weight: 700;
}

/* Tables styling */
.table-responsive {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* Buttons */
.btn {
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-warning {
    background-color: #fef3c7;
    border-color: #fde68a;
    color: #d97706;
}

.btn-warning:hover {
    background-color: #fde68a;
    border-color: #fcd34d;
    color: #b45309;
}

.btn-success {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: #059669;
}

.btn-success:hover {
    background-color: #d1fae5;
    border-color: #6ee7b7;
    color: #047857;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 600;
    border-radius: 9999px;
}

.badge.bg-info {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
}

.badge.bg-success {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

.badge.bg-warning {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}

.badge.bg-danger {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

/* Inputs & Form Controls */
.form-control, .form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

/* Micro-animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-pulse-slow {
    animation: pulse 2s infinite ease-in-out;
}

/* DataTables customization */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--radius-sm) !important;
    font-weight: 600;
}

div.dataTables_wrapper div.dataTables_filter input {
    margin-left: 0.5em;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 0.375rem 0.75rem;
}

.dt-buttons .btn {
    border-radius: var(--radius-md) !important;
    margin-right: 0.25rem;
    font-size: 0.85rem;
}

/* Custom layout utilities */
.text-uppercase {
    text-transform: uppercase;
}

.bg-body-custom {
    background-color: var(--bg-light);
}

/* Table indicator colors */
tr.table-danger {
    background-color: #fff1f2 !important;
}

tr.table-danger:hover {
    background-color: #ffe4e6 !important;
}

/* Responsive Table & Viewport Optimizations */
.table-responsive {
    width: 100%;
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#tablaSolicitudes, #tablaHistorial {
    width: 100% !important;
}

@media (max-width: 991.98px) {
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .navbar-collapse {
        background-color: #1e293b;
        padding: 1rem;
        border-radius: var(--radius-md);
        margin-top: 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }
}

@media (max-width: 768px) {
    .table th, .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .table form {
        min-width: 250px;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
}

