:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --background: #f8fafc;
    --sidebar-bg: #1e293b;
    --sidebar-text: #f1f5f9;
    --sidebar-active: #334155;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

body.dark-theme {
    --background: #0f172a;
    --card-bg: #1e293b;
    --card-border: #334155;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --sidebar-bg: #020617;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.sidebar-nav li:hover {
    background-color: var(--sidebar-active);
}

.sidebar-nav li.active {
    background-color: var(--primary-color);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

#theme-toggle {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

#theme-toggle:hover {
    background: rgba(255,255,255,0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.header-info h1 {
    font-size: 1.875rem;
    font-weight: 700;
}

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

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Summary Cards */
.summary-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

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

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.stat-item.success .stat-value { color: var(--success); }
.stat-item.danger .stat-value { color: var(--danger); }

/* Table Section */
.table-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.table-container {
    overflow-x: auto;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

.btn-copy-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.btn-copy-sm:hover {
    background: var(--background);
}

/* DataTables Overrides */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 6px 12px;
}

table.dataTable thead th {
    border-bottom: 1px solid var(--card-border);
    background-color: var(--background);
    padding: 12px;
    font-weight: 600;
}

table.dataTable tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--card-border);
}

.dt-buttons {
    margin-bottom: 1rem;
}

.dt-button {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 6px !important;
    padding: 6px 16px !important;
    font-size: 0.875rem !important;
}

/* Status colors in cells */
.status-time {
    font-weight: 500;
}
.started {
    color: var(--success);
    /* background: #ecfdf5; */
}
.not-started {
    color: var(--danger);
    /* background: #fef2f2; */
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
}
