:root {
    --primary: #0A0E27;
    --secondary: #1A1F3A;
    --accent: #6366f1;
    --accent-warm: #FF6B35;
    --accent-success: #4f46e5;
    --text-primary: #E8EAED;
    --text-secondary: #9BA3B4;
    --border: #2A2F4A;
    --bg-card: #13172E;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    
    color: var(--text-primary);
    line-height: 1.6;
}

.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-success) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header .subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid var(--accent-success);
    border-radius: 2rem;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.controls-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.date-range-selector {
    display: flex;
    gap: 0.5rem;
    background: var(--secondary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.date-btn {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.375rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.date-btn:hover {
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent);
}

.date-btn.active {
    background: var(--accent);
    color: var(--primary);
}

.export-controls {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
}

.btn-primary:hover {
    background: #00C4E6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideUp 0.6s ease-out backwards;
}

.metric-card:nth-child(1) { animation-delay: 0.1s; }
.metric-card:nth-child(2) { animation-delay: 0.2s; }
.metric-card:nth-child(3) { animation-delay: 0.3s; }
.metric-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0.5;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.icon-sales {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
}

.icon-tickets {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2) 0%, rgba(245, 87, 108, 0.2) 100%);
}

.icon-capacity {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.2) 100%);
}

.icon-conversion {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2) 0%, rgba(255, 107, 53, 0.2) 100%);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
}

.metric-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.metric-change.positive {
    background: rgba(78, 205, 196, 0.15);
    color: var(--accent-success);
}

.metric-change.negative {
    background: rgba(255, 107, 53, 0.15);
    color: var(--accent-warm);
}

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    animation: fadeIn 0.8s ease-out;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-header {
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.chart-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.chart-container {
    position: relative;
    height: 350px;
}

.traffic-sources {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.traffic-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.traffic-item:hover {
    background: var(--bg-card);
    border-color: var(--accent);
}

.traffic-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.traffic-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.traffic-name {
    font-weight: 600;
}

.traffic-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.traffic-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--accent);
}

.traffic-percentage {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.reports-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

select, input[type="date"] {
    padding: 0.75rem;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

select:focus, input[type="date"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    overflow: hidden;
    border-radius: 0.5rem;
}

.data-table thead {
    background: var(--secondary);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--secondary);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-confirmed {
    background: rgba(78, 205, 196, 0.15);
    color: var(--accent-success);
}

.status-pending {
    background: rgba(255, 193, 7, 0.15);
    color: #FFD93D;
}

.status-cancelled {
    background: rgba(255, 107, 53, 0.15);
    color: var(--accent-warm);
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

    .controls-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .export-controls {
        margin-left: 0;
    }

    .data-table {
        font-size: 0.75rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}
