:root {
    --sidebar-width: 220px;
    --primary: #4f46e5;
    --bg: #f3f4f6;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
}

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

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); }

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

.sidebar {
    width: var(--sidebar-width);
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
}

.sidebar .logo { font-size: 18px; font-weight: 700; padding: 0 20px 24px; color: #fff; }

.sidebar ul { list-style: none; }
.sidebar a { display: block; padding: 10px 20px; color: #cbd5e1; text-decoration: none; font-size: 14px; transition: background .15s; }
.sidebar a:hover, .sidebar a.active { background: #334155; color: #fff; }

.main-content { margin-left: var(--sidebar-width); flex: 1; padding: 24px; }

.card { background: var(--card-bg); border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 16px; }

.card-header { font-size: 16px; font-weight: 600; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 12px; background: #f9fafb; border-bottom: 2px solid var(--border); font-weight: 600; color: var(--text-muted); }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
tr:hover { background: #f9fafb; }

.btn { display: inline-block; padding: 8px 16px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-xs { padding: 2px 8px; font-size: 12px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.badge-draft { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

.input, select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; width: 100%; }
.input:focus, select:focus { outline: none; border-color: var(--primary); }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 8px; padding: 24px; width: 480px; max-height: 80vh; overflow-y: auto; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card-bg); border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-card .stat-value { font-size: 28px; font-weight: 700; margin: 8px 0 0; }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); }

.low-stock { color: var(--danger); font-weight: 600; }
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-bar .input { max-width: 300px; }
