﻿/* Variables CSS */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-color: #2d3748;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body principal */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== NAVIGATION ===== */
.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.8rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

    .navbar-nav .nav-link:hover {
        color: white;
        transform: translateY(-2px);
    }

    .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: -5px;
        left: 50%;
        background: white;
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

    .navbar-nav .nav-link:hover::after {
        width: 100%;
    }

/* ===== MAIN CONTAINER ===== */
.main-container {
    padding-top: 100px;
    min-height: 100vh;
    position: relative;
}

    .main-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

@keyframes moveGrid {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, 20px);
    }
}

/* ===== HEADER DE PÁGINA ===== */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.header-icon {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

    .header-icon i {
        font-size: 3rem;
        color: white;
    }

.page-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 300;
}

/* ===== ALERTAS ===== */
.custom-alert {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.alert-success {
    border-left: 4px solid #28a745;
}

.alert-danger {
    border-left: 4px solid #dc3545;
}

/* ===== TARJETAS ===== */
.form-card, .data-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.form-card-header, .data-card-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .form-card-header h3, .data-card-header h3 {
        color: #333;
        font-weight: 600;
        margin: 0;
        font-size: 1.3rem;
    }

.form-card-body, .data-card-body {
    padding: 2rem;
}

/* ===== FORMULARIOS ===== */
.form-label {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.required {
    color: #dc3545;
}

.custom-input, .custom-textarea {
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    width: 100%;
}

    .custom-input:focus, .custom-textarea:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        background: white;
        transform: translateY(-1px);
    }

.form-help {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

/* ===== BOTONES ===== */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    justify-content: center;
}

.btn-primary, .btn-warning, .btn-danger, .btn-secondary, .btn-success {
    padding: 0.75rem 2rem;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(40, 167, 69, 0.4);
    }

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

    .btn-success:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(40, 167, 69, 0.4);
    }

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #ff8c00);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

    .btn-warning:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(255, 193, 7, 0.4);
    }

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

    .btn-danger:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(220, 53, 69, 0.4);
    }

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

    .btn-secondary:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(108, 117, 125, 0.4);
    }

/* ===== TABLA ===== */
.table-responsive {
    border-radius: 15px;
    overflow: hidden;
}

.custom-table {
    margin: 0;
    background: white;
    border-collapse: separate;
    border-spacing: 0;
}

    .custom-table thead {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

        .custom-table thead th {
            color: white;
            font-weight: 600;
            padding: 1rem;
            border: none;
            font-size: 0.95rem;
        }

    .custom-table tbody td {
        padding: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        vertical-align: middle;
    }

    .custom-table tbody tr {
        transition: all 0.3s ease;
    }

        .custom-table tbody tr:hover {
            background: rgba(102, 126, 234, 0.05);
            transform: translateY(-1px);
        }

/* ===== BOTÓN EDITAR ===== */
.btn-edit {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-edit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
    }

/* ===== ESTADO VACÍO ===== */
.empty-state {
    padding: 3rem;
    color: #666;
}

    .empty-state i {
        color: #ccc;
        margin-bottom: 1rem;
    }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .header-icon {
        width: 80px;
        height: 80px;
    }

        .header-icon i {
            font-size: 2rem;
        }

    .form-card-body, .data-card-body {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn-primary, .btn-warning, .btn-danger, .btn-secondary, .btn-success {
        width: 100%;
        justify-content: center;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-card, .data-card {
    animation: fadeInUp 0.6s ease-out;
}

.custom-alert {
    animation: fadeInUp 0.4s ease-out;
}
