/**
 * app.css — Sistema de diseño premium para Incidencias.
 * Alineado con Activos y Face_Id (glassmorphism, gradientes, tema oscuro).
 */

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

/* ===== FONDO ANIMADO ===== */
@keyframes subtle-gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);
    background-size: 400% 400%;
    animation: subtle-gradient-animation 20s ease infinite;
    color: #f4f6f7;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
}

/* ===== GLASSMORPHISM ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px) saturate(160%);
    -webkit-backdrop-filter: blur(15px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.nav-glass {
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== TABLAS PREMIUM ===== */
.custom-table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.custom-table thead th {
    color: #a8b3c1;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px;
}

.custom-table tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: transform 0.2s ease, background 0.2s ease;
}

.custom-table tbody tr:hover {
    background: rgba(108, 140, 213, 0.1);
    transform: scale(1.002);
}

.custom-table td {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-table td:first-child {
    border-radius: 12px 0 0 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-table td:last-child {
    border-radius: 0 12px 12px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== INPUTS MODERNOS ===== */
input, select, textarea {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f4f6f7 !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    padding: 10px 14px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
}

input:focus, select:focus, textarea:focus {
    border-color: #6c8cd5 !important;
    box-shadow: 0 0 0 4px rgba(108, 140, 213, 0.2) !important;
    outline: none;
}

input::placeholder {
    color: rgba(168, 179, 193, 0.5) !important;
}

select option {
    background-color: #1a1f3a;
    color: #f4f6f7;
}

/* ===== BOTONES ===== */
.btn-primary {
    background: linear-gradient(135deg, #4a6fa5, #6c8cd5);
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(74, 111, 165, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 111, 165, 0.5);
}

.btn-danger {
    background: rgba(220, 38, 38, 0.1);
    color: #f87171;
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-1px);
}

.btn-success {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-success:hover {
    background: #16a34a;
    color: white;
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: #a8b3c1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f4f6f7;
    transform: translateY(-1px);
}

/* ===== TARJETA DE MÉTRICA ===== */
.metric-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: rgba(108, 140, 213, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ===== FULLCALENDAR THEME ===== */
#calendar,
#calendar-admin,
#calendar-rh,
#calendar-director,
#calendar-personal {
    --fc-bg-event-color: #4a6fa5;
    --fc-border-color: rgba(255, 255, 255, 0.1);
    --fc-today-bg-color: rgba(108, 140, 213, 0.15);
    --fc-daygrid-event-dot-width: 8px;
}

.fc .fc-button-primary {
    background: linear-gradient(135deg, #4a6fa5, #6c8cd5) !important;
    border-color: transparent !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    transition: all 0.3s ease !important;
}

.fc .fc-button-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.4) !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: #6c8cd5 !important;
}

.fc-toolbar-title {
    color: #f4f6f7 !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
}

.fc-daygrid-day-number {
    color: #a8b3c1 !important;
}

.fc-col-header-cell-cushion {
    color: #f4f6f7 !important;
    font-weight: 600 !important;
}

.fc-event, .fc-event-main {
    white-space: normal !important;
    overflow: hidden;
}

.fc-scrollgrid {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.fc th, .fc td {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

/* ===== ANIMACIONES ===== */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0e27; }
::-webkit-scrollbar-thumb { background: #2d4373; border-radius: 10px; }

.custom-scroll::-webkit-scrollbar { width: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
    background: rgba(5, 7, 20, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-card {
    background: rgba(26, 31, 58, 0.95);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* ===== SWEETALERT2 DARK THEME OVERRIDES ===== */
.swal2-popup {
    background: rgba(26, 31, 58, 0.95) !important;
    backdrop-filter: blur(20px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    color: #f4f6f7 !important;
}

.swal2-title, .swal2-html-container {
    color: #f4f6f7 !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #4a6fa5, #6c8cd5) !important;
    color: white !important;
    border-radius: 12px !important;
    font-weight: bold !important;
    padding: 10px 20px !important;
    box-shadow: 0 4px 15px rgba(74, 111, 165, 0.3) !important;
}

.swal2-cancel {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #f4f6f7 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    font-weight: bold !important;
    padding: 10px 20px !important;
}

.swal2-cancel:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        padding: 12px !important;
    }
    
    .glass-card {
        border-radius: 16px;
        padding: 16px;
    }

    .nav-glass {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px !important;
    }
}
