/* ==========================================================================
   EventosMZ - Premium Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Colors - Dark Premium Theme */
    --primary: #8B5CF6;
    /* Violet */
    --primary-dark: #7C3AED;
    --secondary: #EC4899;
    /* Pink */
    --dark-bg: #0F172A;
    --dark-surface: #1E293B;
    --dark-border: #334155;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Spacing */
    --container-padding: 2rem;
    --header-height: 70px;
    --sidebar-width: 260px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* ==========================================================================
   Layout & Structure
   ========================================================================== */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--dark-surface);
    border-right: 1px solid var(--dark-border);
    position: fixed;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.75rem 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: white;
}

.sidebar-logo span {
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
}

.nav-item i {
    width: 20px;
    font-size: 1.1rem;
}

/* Submenus */
.nav-group {
    margin-bottom: 0.5rem;
}

.nav-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.nav-sub {
    padding-left: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.nav-sub:hover,
.nav-sub.active {
    color: var(--text-main);
}

.nav-sub::before {
    content: '';
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--dark-border);
}

/* Main Content */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-title h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
}

.btn-icon:hover {
    color: white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Content Area */
.app-content {
    padding: 2rem;
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
}

.stat-icon.pink {
    background: rgba(236, 72, 153, 0.1);
    color: var(--secondary);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--danger);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--dark-border);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--dark-border);
}

.table td {
    padding: 1rem 1.5rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--dark-border);
    font-size: 0.95rem;
}

.table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-published {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-draft {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-ended {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
}

/* Utilities */
.text-right {
    text-align: right;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    .app-main {
        margin-left: 0;
    }

    .show-sidebar .app-sidebar {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .app-header {
        padding: 0 1rem;
    }

    .app-content {
        padding: 1rem;
    }
}