:root {
  --bg: #f5f0eb;
  --bg-strong: #fbf7f2;
  --panel: #ffffff;
  --panel-soft: #f8f6f3;
  --sidebar: #1a1a2e;
  --sidebar-hover: #16213e;
  --sidebar-active: #0f3460;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-soft: rgba(99, 102, 241, 0.1);
  --text: #1e1e2e;
  --text-secondary: #4a4a6a;
  --muted: rgba(30, 30, 46, 0.5);
  --line: rgba(30, 30, 46, 0.1);
  --line-strong: rgba(30, 30, 46, 0.2);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --transition: 150ms ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
}
#app-container { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: var(--sidebar); color: #fff;
  display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-header { padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-logo { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.sidebar-subtitle { font-size: 11px; opacity: 0.6; margin-top: 2px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-item {
  display: block; padding: 10px 16px; color: rgba(255,255,255,0.7);
  text-decoration: none; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background var(--transition);
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.sidebar-footer { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.top-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.top-bar h1 { font-size: 20px; font-weight: 600; }
.page-body { flex: 1; padding: 20px 24px; overflow-y: auto; }
.loading-state, .error-state, .empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 20px; text-align: center;
}
.loading-state .spinner {
  width: 32px; height: 32px; border: 3px solid var(--line);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-state h3 { color: var(--danger); margin-bottom: 8px; }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { margin-bottom: 6px; }
.text-muted { color: var(--muted); font-size: 13px; }
