:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #f39c12;
    --text-color: #333;
    --text-muted: #777;
    --border-color: #e0e0e0;
    --card-bg: #fff;
    --header-bg: #f8f9fa;
    --badge-bg: #e9ecef;
    --divider-color: #eee;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7fa;
    padding: 20px;
}

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

/* Header Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.badge {
    background-color: var(--badge-bg);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Card Styles */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background-color: var(--header-bg);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h2 i {
    color: var(--primary-color);
}

.card-content {
    padding: 20px;
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Data Row Styles */
.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.label {
    color: var(--text-muted);
}

.value {
    font-weight: 500;
}

.value.highlight {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.muted {
    color: var(--text-muted);
}

.divider {
    height: 1px;
    background-color: var(--divider-color);
    margin: 15px 0;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.status-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

#gate1-status, #gate2-status {
    background-color: #e9ecef;
}

#gate1-status::before, #gate2-status::before {
    content: "\f023";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 5px;
}

#gate3-status {
    background-color: #d1e7dd;
    color: #0f5132;
}

#gate3-status::before {
    content: "\f09c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 5px;
}

/* Tab Styles */
.tabs {
    width: 100%;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    position: relative;
    white-space: nowrap;
}

.tab-button.active {
    color: var(--primary-color);
    font-weight: 500;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Chart Container */
.chart-container {
    height: 400px;
    width: 100%;
}

/* Webcam Container */
.webcam-container {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.webcam-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
}
