:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --bg-dark: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text-light: #f8fafc;
    --text-dim: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --danger: #ef4444;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    height: 100vh;
    overflow: hidden;
}

.layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.brand {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.sidebar nav {
    flex: 1;
    padding: 0 1rem;
}

.sidebar nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background-color: var(--surface-hover);
    color: var(--text-light);
}

/* Content */
.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

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

h1 {
    margin: 0;
    font-size: 1.8rem;
}

/* Cards */
.card {
    background-color: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-dim);
    font-weight: 500;
}

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

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

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

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* Buttons */
.btn {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    /* Fix padding issue */
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
}

.btn-secondary:hover {
    background-color: var(--surface-hover);
    color: var(--text-light);
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
        overflow: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
    }

    .content {
        overflow: visible;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}