﻿/**
 * CLUB V2.2 - Estilos de Admin Dashboard
 * Panel de administración del sistema
 */

/* ==========================================
   LAYOUT ADMIN
   ========================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F3F4F6;
}

/* ==========================================
   SIDEBAR
   ========================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: var(--gradient-primary);
    color: white;
    padding: 20px;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.menu-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.35);
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* ==========================================
   CONTENIDO PRINCIPAL
   ========================================== */
.main-content {
    margin-left: 250px;
    padding: 30px;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2rem;
    color: #333;
    font-weight: 700;
}

/* ==========================================
   ESTADÍSTICAS
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

.stat-change {
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 600;
}

.stat-change.positive {
    color: var(--color-success);
}

.stat-change.positive::before {
    content: '↑ ';
}

.stat-change.negative {
    color: var(--color-error);
}

.stat-change.negative::before {
    content: '↓ ';
}

/* ==========================================
   TARJETAS DE CONTENIDO
   ========================================== */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #F3F4F6;
}

/* ==========================================
   TABLAS
   ========================================== */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #F9FAFB;
}

th {
    text-align: left;
    padding: 12px;
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #E5E7EB;
    color: #333;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: #F9FAFB;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Imágenes en tablas */
table img {
    display: block;
    border: 2px solid #E5E7EB;
    transition: transform 0.2s ease;
}

table img:hover {
    transform: scale(1.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* ==========================================
   BADGES
   ========================================== */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.badge-success {
    background: var(--color-success-light);
    color: var(--color-success);
}

.badge-warning {
    background: var(--color-warning-light);
    color: var(--color-warning);
}

.badge-danger {
    background: var(--color-error-light);
    color: var(--color-error);
}

.badge-info {
    background: var(--color-info-light);
    color: var(--color-info);
}

/* ==========================================
   BOTONES
   ========================================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* ==========================================
   SECCIONES
   ========================================== */
.section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   FORMULARIOS
   ========================================== */
input[type="text"],
input[type="number"],
input[type="email"],
textarea {
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

label {
    color: #333;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
        padding: 20px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        padding-bottom: 10px;
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .btn-primary {
        width: 100%;
    }
}
