/* ============================================ */
/* ADMINHUB - ESTILOS PROFESIONALES */
/* ============================================ */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-bg: #212529;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: #333;
}

/* ============================================ */
/* SPLASH SCREEN */
/* ============================================ */

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    color: white;
}

.splash-content h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 20px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.splash-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/* LOGIN */
/* ============================================ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.2);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    animation: slideInUp 0.5s ease-out;
}

.login-card h1 {
    color: var(--primary-color);
    font-weight: bold;
}

.login-card .form-control,
.login-card .form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.95rem;
}

.login-card .form-control:focus,
.login-card .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.login-card .btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.login-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ============================================ */
/* NAVBAR */
/* ============================================ */

.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white !important;
}

.navbar-brand i {
    margin-right: 8px;
    color: var(--info-color);
}

.nav-link {
    color: #ccc !important;
    transition: all 0.3s ease;
    margin-right: 15px;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 5px;
}

.nav-link i {
    margin-right: 5px;
}

.navbar .badge {
    position: absolute;
    top: -5px;
    right: -10px;
    font-size: 0.7rem;
}

.navbar .dropdown-menu {
    margin-top: 10px;
}

.navbar-nav .dropdown {
    margin-right: 20px;
}

/* ============================================ */
/* MAIN CONTENT */
/* ============================================ */

.container-fluid {
    padding-bottom: 40px;
}

.section {
    animation: slideInUp 0.3s ease-out;
}

h2 {
    color: var(--dark-bg);
    font-weight: bold;
    margin-bottom: 10px;
}

h2 i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* ============================================ */
/* TARJETAS DE ESTADÍSTICAS */
/* ============================================ */

.stats-card {
    border: none;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.stats-card .card-body {
    padding: 25px;
}

.stats-card h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin: 0;
}

.stats-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* ============================================ */
/* CARDS */
/* ============================================ */

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    color: white;
    border: none;
    border-radius: 10px 10px 0 0;
    padding: 20px;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

.card-footer {
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 10px 10px;
}

/* ============================================ */
/* TABLAS */
/* ============================================ */

.table {
    margin-bottom: 0;
}

.table thead {
    background: linear-gradient(135deg, var(--dark-bg), #36454f);
}

.table thead th {
    color: white;
    font-weight: 600;
    border: none;
    padding: 15px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: var(--light-bg);
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
}

.table .badge {
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================ */
/* BOTONES */
/* ============================================ */

.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0a58ca, var(--primary-color));
}

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #157347;
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #bb2d3b;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn i {
    margin-right: 5px;
}

/* ============================================ */
/* FORMULARIOS */
/* ============================================ */

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-bg);
    margin-bottom: 8px;
}

.input-group-text {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
}

/* ============================================ */
/* MODALES */
/* ============================================ */

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    color: white;
    border: none;
}

.modal-header .modal-title {
    font-weight: bold;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
}

/* ============================================ */
/* PAGINACION */
/* ============================================ */

.pagination {
    gap: 5px;
}

.page-link {
    border-radius: 5px;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* ============================================ */
/* ALERTAS */
/* ============================================ */

.alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-danger {
    background: #f8d7da;
    color: #842029;
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
}

.alert-warning {
    background: #fff3cd;
    color: #664d03;
}

.alert-info {
    background: #cfe2ff;
    color: #084298;
}

/* ============================================ */
/* NOTIFICACIONES */
/* ============================================ */

.dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.dropdown-item {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

/* ============================================ */
/* ACTIVIDAD Y USUARIOS RECIENTES */
/* ============================================ */

.activity-item,
.user-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.activity-item:hover,
.user-item:hover {
    background: var(--light-bg);
}

.activity-item:last-child,
.user-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.activity-icon.login {
    background: var(--info-color);
}

.activity-icon.create {
    background: var(--success-color);
}

.activity-icon.edit {
    background: var(--warning-color);
    color: var(--dark-bg);
}

.activity-icon.delete {
    background: var(--danger-color);
}

.activity-text h6 {
    margin: 0;
    font-weight: 600;
    color: var(--dark-bg);
}

.activity-text small {
    color: var(--secondary-color);
}

/* ============================================ */
/* RESPONSIVIDAD */
/* ============================================ */

@media (max-width: 768px) {
    .login-card {
        padding: 30px 20px;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .stats-card .card-body {
        padding: 15px;
    }

    .table {
        font-size: 0.85rem;
    }

    .table thead th,
    .table tbody td {
        padding: 10px 5px;
    }

    .btn-sm {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .modal-body {
        padding: 20px;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 10px;
    }

    .card {
        margin-bottom: 15px;
    }

    .stats-card {
        margin-bottom: 15px;
    }

    .table {
        font-size: 0.75rem;
    }

    .nav-link {
        margin-right: 0;
        padding: 10px 0 !important;
    }

    .dropdown-menu {
        position: fixed !important;
        left: auto !important;
        right: 10px !important;
        top: auto !important;
        bottom: auto !important;
    }
}

/* ============================================ */
/* ANIMACIONES GENERALES */
/* ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* ============================================ */
/* SCROLL PERSONALIZADO */
/* ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ============================================ */
/* ESTADOS Y ROLES */
/* ============================================ */

.estado-activo {
    color: var(--success-color);
    font-weight: 600;
}

.estado-inactivo {
    color: var(--warning-color);
    font-weight: 600;
}

.estado-bloqueado {
    color: var(--danger-color);
    font-weight: 600;
}

.rol-admin {
    background: #cfe2ff;
    color: #084298;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
}

.rol-editor {
    background: #d1e7dd;
    color: #0f5132;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
}

.rol-usuario {
    background: #e7d4f5;
    color: #5a1d82;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
}

.rol-moderador {
    background: #ffeeba;
    color: #856404;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
}

/* ============================================ */
/* EFECTOS ESPECIALES */
/* ============================================ */

.loading {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
    animation: blink 1.4s infinite both;
}

.loading:nth-child(2) {
    animation-delay: 0.2s;
}

.loading:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

/* ============================================ */
/* UTILIDADES */
/* ============================================ */

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-muted {
    color: var(--secondary-color) !important;
}

.bg-light {
    background-color: var(--light-bg) !important;
}

.rounded {
    border-radius: 10px !important;
}

.shadow {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

.cursor-pointer {
    cursor: pointer;
}

.no-wrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}