:root {
    --primary: #6b8e6b;
    --primary-dark: #4a6e4a;
    --bg: #f5f5f0;
    --sidebar-bg: #2c3e2c;
    --sidebar-text: #e8e8e0;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #ddd;
    --danger: #d9534f;
    --success: #5cb85c;
    --warning: #f0ad4e;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 { font-size: 18px; margin-bottom: 4px; }
.user-name { font-size: 13px; opacity: 0.7; }

.nav-links {
    list-style: none;
    margin-top: 10px;
}

.nav-links li a {
    display: block;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: background 0.2s;
}

.nav-links li a:hover { background: rgba(255,255,255,0.1); }
.nav-links li a.active { background: var(--primary); font-weight: 600; }
.logout-link { opacity: 0.6; margin-top: 20px; }

/* Content */
.content {
    margin-left: 240px;
    padding: 30px;
    flex: 1;
    max-width: 1100px;
}

.content-full { margin-left: 0; max-width: 100%; }

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card h2 { margin-bottom: 16px; font-size: 20px; }
.card h3 { margin-bottom: 12px; font-size: 16px; color: var(--text-light); }

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stat-card .number { font-size: 36px; font-weight: 700; color: var(--primary); }
.stat-card .label { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea { min-height: 100px; resize: vertical; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: white; }
.btn-secondary { background: #e0e0e0; color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th { font-weight: 600; font-size: 13px; color: var(--text-light); }
td { font-size: 14px; }

.product-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }

/* Login page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--primary-dark);
}

/* Actions row */
.actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h1 { font-size: 24px; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 100%; height: auto; position: relative; }
    .content { margin-left: 0; }
    body { flex-direction: column; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
