:root {
    /* Light Theme Colors */
    --bg-dark: #f0f4f8;
    --sidebar-dark: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.07);

    --text-main: #1e293b;
    --text-muted: #64748b;

    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --accent-warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-dark);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.02);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    color: var(--accent-blue);
    margin-bottom: 3rem;
}

.logo h2 {
    color: var(--text-main);
    font-weight: 700;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.menu a.nav-link.active i,
.menu a.nav-link:hover i {
    color: var(--accent-blue);
}

.menu a:hover,
.menu a.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
    height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Glass Effect */
.glass-effect {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
}

.full-height {
    min-height: 400px;
}

/* Overview Cards */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
}

.card-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.card-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.card-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.card-info h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-info h2 {
    font-size: 2rem;
    margin: 4px 0;
    color: var(--text-main);
}

.trend {
    font-size: 0.8rem;
    font-weight: 500;
}

.trend.up {
    color: var(--accent-red);
}

.trend.down {
    color: var(--accent-green);
}

.status-text {
    font-size: 0.8rem;
    color: var(--accent-green);
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.chart-container {
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.time-filter {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 8px;
    outline: none;
    font-size: 0.9rem;
}

.canvas-wrapper {
    position: relative;
    height: 250px;
    width: 100%;
}

.system-status {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    height: 100%;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.progress-box {
    margin-top: 0.5rem;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out, background 0.5s ease;
}

.fill-red {
    background: linear-gradient(90deg, var(--accent-warning), var(--accent-red));
}

.action-btn {
    margin-top: auto;
    background: linear-gradient(135deg, var(--accent-blue), #2563eb);
    color: white;
    border: none;
    padding: 0.9rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.action-btn:active {
    transform: translateY(0);
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.data-table td {
    font-size: 0.95rem;
    color: var(--text-main);
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Enzyme Stats */
.enzyme-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-box {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1rem;
    border-radius: 12px;
}

.stat-box h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-box p {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-green);
}

/* Settings Form */
.settings-form {
    max-width: 600px;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    padding: 10px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    outline: none;
    font-size: 0.95rem;
    background: white;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--accent-blue);
}

.checkbox-group {
    display: flex;
    gap: 15px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-main);
    cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .logo {
        margin-bottom: 0;
    }

    .menu {
        flex-direction: row;
        overflow-x: auto;
    }

    .menu a span {
        display: none;
    }

    .overview-cards {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 1.5rem;
        height: auto;
        overflow-y: visible;
    }
}