/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #222;
    color: #f3f8fb;
    line-height: 1.6;
}

/* Home navigation button */
.home-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(82, 203, 84, 0.9);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.home-btn:hover {
    background-color: rgba(82, 203, 84, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(82, 203, 84, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 20px 20px;
}

/* Main content styles */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.stats-section {
    background: #333;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
}

.stats-section h2 {
    color: #f3f8fb;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 600;
    border-bottom: 2px solid #555;
    padding-bottom: 10px;
}

/* Overall statistics cards */
.overall-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #444;
    color: #f3f8fb;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #555;
}

.stat-card.primary {
    border-color: #667eea;
}

.stat-card.success {
    border-color: #52cb54;
}

.stat-card.info {
    border-color: #38f9d7;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #52cb54;
}

.stat-card.primary .stat-number {
    color: #667eea;
}

.stat-card.success .stat-number {
    color: #52cb54;
}

.stat-card.info .stat-number {
    color: #38f9d7;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: #b0b0b0;
}

/* Ticket type breakdown */
.type-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.type-card {
    background: #444;
    border: 2px solid #555;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.type-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f3f8fb;
}

.type-percentage {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.type-numbers {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.type-total, .type-scanned {
    text-align: center;
}

.type-total .number, .type-scanned .number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f3f8fb;
}

.type-total .label, .type-scanned .label {
    font-size: 0.9rem;
    color: #b0b0b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #555;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #52cb54;
    transition: width 0.8s ease;
}

/* Timeline controls */
.timeline-controls {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-controls label {
    font-weight: 600;
    color: #f3f8fb;
    white-space: nowrap;
}

.timeline-controls select {
    padding: 10px 15px;
    border: 2px solid #555;
    border-radius: 8px;
    background: #444;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 120px;
    color: #f3f8fb;
}

.timeline-controls select:focus {
    outline: none;
    border-color: #52cb54;
    box-shadow: 0 0 0 3px rgba(82, 203, 84, 0.1);
}

.timeline-controls input[type="datetime-local"] {
    padding: 10px 15px;
    border: 2px solid #555;
    border-radius: 8px;
    background: #444;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 180px;
    color: #f3f8fb;
}

.timeline-controls input[type="datetime-local"]:focus {
    outline: none;
    border-color: #52cb54;
    box-shadow: 0 0 0 3px rgba(82, 203, 84, 0.1);
}

.custom-range {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Chart container */
.chart-container {
    background: #444;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #555;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    height: 500px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 80px 15px 20px 15px;
    }
    
    .overall-stats {
        grid-template-columns: 1fr;
    }
    
    .type-breakdown {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .timeline-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .custom-range {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .timeline-controls input[type="datetime-local"] {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-section {
        padding: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .type-card {
        padding: 20px;
    }
}
