:root {
  --primary: #1D6FFF;
  --primary-dark: #1558d6;
  --primary-light: #e8f0ff;
  --surface: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 0.75rem;
}
* { box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--primary); color: #fff;
  border-radius: 0.5rem; font-weight: 600; font-size: 0.9rem;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none; border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary); border-radius: 0.5rem;
  font-weight: 600; font-size: 0.9rem;
  transition: all 0.15s; cursor: pointer; text-decoration: none;
}
.btn-secondary:hover { background: var(--primary-light); }

.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.stat-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
}
.stat-value { font-size: 2rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 0.8rem; color: var(--muted); font-weight: 500; margin-top: 0.25rem; }

.sidebar {
  width: 240px; min-height: 100vh; background: #0f172a; color: #fff;
  display: flex; flex-direction: column; padding: 1.5rem 1rem;
  position: fixed; top: 0; left: 0; z-index: 40;
}
.sidebar-brand {
  font-size: 1.2rem; font-weight: 800; color: var(--primary);
  padding: 0.5rem 0.75rem 1.5rem; letter-spacing: -0.5px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.75rem; border-radius: 0.5rem;
  color: #94a3b8; font-size: 0.875rem; font-weight: 500;
  text-decoration: none; transition: all 0.15s; cursor: pointer;
}
.sidebar-link:hover, .sidebar-link.active { background: rgba(29,111,255,0.15); color: #fff; }
.dashboard-main {
  margin-left: 240px; min-height: 100vh;
  background: var(--surface); padding: 2rem;
}

/* Themes */
.theme-minimal  { --block-bg: #fff;     --block-btn: #1D6FFF; --block-text: #0f172a; }
.theme-gradient { --block-bg: linear-gradient(135deg,#1D6FFF,#8b5cf6); --block-btn: #fff; --block-text: #fff; }
.theme-dark     { --block-bg: #0f172a;  --block-btn: #1D6FFF; --block-text: #f1f5f9; }
.theme-neon     { --block-bg: #000;     --block-btn: #00ff87; --block-text: #00ff87; }
.theme-pastel   { --block-bg: #fdf4ff;  --block-btn: #a855f7; --block-text: #581c87; }

/* Toast */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  background: #0f172a; color: #fff; padding: 0.75rem 1.25rem;
  border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transform: translateY(100px); opacity: 0;
  transition: all 0.3s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #dc2626; }
.toast.success { background: #16a34a; }

/* Skeleton loading */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 0.5rem; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Toggle switch */
.toggle { width: 2.5rem; height: 1.25rem; border-radius: 999px; border: none; cursor: pointer; position: relative; transition: background 0.2s; }
.toggle.on { background: var(--primary); }
.toggle.off { background: #d1d5db; }
.toggle::after { content: ''; position: absolute; top: 2px; width: 1rem; height: 1rem; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: left 0.2s; }
.toggle.on::after { left: calc(100% - 18px); }
.toggle.off::after { left: 2px; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .dashboard-main { margin-left: 0; padding: 1rem; }
  .mobile-menu-btn { display: flex !important; }
}
