:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --sidebar-bg: #1e293b;
    --card-bg: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #22c55e;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-menu {
    flex: 1;
    padding: 1rem;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.menu-item:hover, .menu-item.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--text-main);
}

.menu-item i {
    width: 20px;
    margin-right: 0.75rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Forms */
.card {
    background-color: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--border);
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--text-main);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Tables */
.table-container {
    background-color: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-completed { background-color: rgba(34, 197, 94, 0.1); color: var(--success); }
.status-processing { background-color: rgba(99, 102, 241, 0.1); color: var(--primary); }
.status-error { background-color: rgba(239, 68, 68, 0.1); color: var(--error); }

/* Utility */
.mb-4 { margin-bottom: 1rem; }
.text-success { color: var(--success); }
.text-error { color: var(--error); }

/* Login Page */
.login-page {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-dark);
}

.login-card {
    width: 100%;
    max-width: 400px;
}

@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }
    .main-content {
        margin-left: 0;
    }
}
