/* ============================================
   CONTROLTOTAL90 - DARK THEME DESIGN SYSTEM
   ============================================ */

/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

/* CSS Variables - Dark Theme */
:root {
    /* Colors */
    --color-primary-dark: #0f172a;
    /* Slate 900 */
    --color-accent-green: #a7f3d0;
    /* Emerald 200/300 */
    --color-bg-card: #1f2937;
    /* Gray 800 */
    --color-bg-hover: #374151;
    /* Gray 700 */
    --color-border: #374151;
    /* Gray 700 */
    --color-border-light: #4b5563;
    /* Gray 600 */
    --color-text-primary: #f8fafc;
    /* Slate 50 */
    --color-text-secondary: #e2e8f0;
    /* Slate 200 */
    --color-text-muted: #94a3b8;
    /* Slate 400 */

    /* Shadows & Glows */
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --glow-green: 0 0 40px -5px rgba(167, 243, 208, 0.3);
    --glow-green-strong: 0 0 20px rgba(167, 243, 208, 0.5);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-primary-dark);
    color: var(--color-text-primary);
    /* Efecto sutil de campo de juego iluminado */
    background-image: radial-gradient(circle at center, rgba(167, 243, 208, 0.05) 0%, rgba(15, 23, 42, 1) 70%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Card Glow Effect */
.card-glow {
    box-shadow: var(--shadow-card), var(--glow-green);
    transition: all var(--transition-normal);
}

.card-glow:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1), var(--glow-green-strong);
    transform: translateY(-2px);
}

/* Logo Glow Animation */
@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(167, 243, 208, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 10px rgba(167, 243, 208, 0.8));
    }
}

.logo-glow {
    animation: pulse-glow 3s infinite ease-in-out;
}

/* Mobile Menu */
.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-content {
    background-color: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
}

.mobile-menu-content.active {
    display: block !important;
}

/* Navigation Active State */
.nav-link.active {
    background-color: var(--color-bg-hover) !important;
    color: var(--color-accent-green) !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 9999px;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(94deg, #10b981 2.92%, #059669 100%);
    color: #000;
    box-shadow: var(--glow-green);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: var(--glow-green-strong);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text-primary);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    background-color: var(--color-bg-hover);
    border-color: var(--color-accent-green);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Cards */
.card {
    background-color: var(--color-bg-card);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all var(--transition-normal);
}

.card:hover {
    background-color: var(--color-bg-hover);
}

/* Forms */
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    color: var(--color-text-primary);
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent-green);
    box-shadow: 0 0 0 3px rgba(167, 243, 208, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-bg-card);
    border-radius: 1rem;
    overflow: hidden;
}

.table thead {
    background-color: rgba(167, 243, 208, 0.1);
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-accent-green);
    cursor: pointer;
    user-select: none;
}

.table th:hover {
    background-color: rgba(167, 243, 208, 0.15);
}

.table td {
    padding: 1rem;
    border-top: 1px solid var(--color-border);
}

.table tbody tr:hover {
    background-color: var(--color-bg-hover);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(167, 243, 208, 0.2);
    border-top-color: var(--color-accent-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notifications */
#notification-container {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    min-width: 300px;
    padding: 1rem 1.5rem;
    background-color: var(--color-bg-card);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    border-left: 4px solid #10b981;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.warning {
    border-left: 4px solid #f59e0b;
}

.notification.info {
    border-left: 4px solid #3b82f6;
}

/* Stat Cards */
.stat-card {
    background-color: var(--color-bg-card);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card), var(--glow-green);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--color-accent-green);
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Utility Classes */
.text-accent {
    color: var(--color-accent-green);
}

.text-muted {
    color: var(--color-text-muted);
}

.bg-dark {
    background-color: var(--color-primary-dark);
}

.bg-card {
    background-color: var(--color-bg-card);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .stat-value {
        font-size: 1.75rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease;
}

/* Scroll Animations */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}