@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f5f7fa;
  --bg-card: #ffffff;
  --bg-card2: #f8fafc;
  --bg-hover: #f1f5f9;
  --bg-sidebar: #ffffff;
  --accent: #10b981;
  --accent-dark: #059669;
  --accent-light: #d1fae5;
  --accent-lighter: #ecfdf5;
  --accent2: #3b82f6;
  --accent2-light: #dbeafe;
  --accent3: #8b5cf6;
  --accent3-light: #ede9fe;
  --accent4: #f59e0b;
  --accent4-light: #fef3c7;
  --accent5: #ef4444;
  --accent5-light: #fee2e2;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --success: #10b981;
  --success-light: #d1fae5;
  --info: #3b82f6;
  --info-light: #dbeafe;
  --text: #111827;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;
  --text-light: #d1d5db;
  --border: #e5e7eb;
  --border2: #d1d5db;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.06);
  --shadow-accent: 0 4px 16px rgba(16,185,129,0.25);
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --sidebar-w: 240px;
  --header-h: 64px;
  --grad-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-blue: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --grad-purple: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  --grad-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-red: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --grad-sky: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
  --grad-hero: linear-gradient(135deg, #10b981 0%, #3b82f6 50%, #8b5cf6 100%);
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --bg-secondary: #f8fafc;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

h1,h2,h3,h4,h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; color: var(--text); }
a { color: var(--accent); text-decoration: none; transition: all 0.2s; }
a:hover { opacity: 0.8; }
img { max-width: 100%; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px;
  border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13.5px;
  font-weight: 600; border: none; cursor: pointer; transition: all 0.2s ease;
  white-space: nowrap; text-decoration: none; line-height: 1.4; letter-spacing: -0.01em;
  position: relative; overflow: hidden;
}
.btn svg { flex-shrink: 0; }
.btn-primary {
  background: var(--grad-primary); color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16,185,129,0.4); opacity: 1; }
.btn-primary:active { transform: translateY(0); }
.btn-blue { background: var(--grad-blue); color: #fff; box-shadow: 0 2px 8px rgba(59,130,246,0.3); }
.btn-blue:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59,130,246,0.4); opacity: 1; }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1.5px solid var(--border2); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border2); opacity: 1; }
.btn-danger { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.15); opacity: 1; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); opacity: 1; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: var(--radius-xs); }
.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: var(--radius); }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.card:hover { border-color: var(--border2); box-shadow: var(--shadow); }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.01em; }
.form-input {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-family: var(--font-body);
  font-size: 14px; padding: 10px 13px; transition: all 0.2s; width: 100%;
}
.form-input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.form-input::placeholder { color: var(--text-dim); }
.form-input:hover:not(:focus) { border-color: var(--border2); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-purple { background: var(--accent3-light); color: var(--accent3); }

.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; max-width: 380px; }
.toast {
  padding: 13px 16px; border-radius: var(--radius); font-size: 13.5px; font-weight: 500;
  min-width: 260px; box-shadow: var(--shadow-md); animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  display: flex; align-items: center; gap: 10px; border: 1px solid; pointer-events: all;
  background: #fff; backdrop-filter: blur(10px);
}
.toast svg { flex-shrink: 0; width: 17px; height: 17px; }
.toast-success { border-color: #a7f3d0; color: #065f46; background: #f0fdf4; }
.toast-success svg { color: var(--success); }
.toast-error { border-color: #fca5a5; color: #7f1d1d; background: #fff5f5; }
.toast-error svg { color: var(--danger); }
.toast-info { border-color: #93c5fd; color: #1e3a8a; background: #eff6ff; }
.toast-info svg { color: var(--info); }
@keyframes toastIn { from { transform: translateX(110%) scale(0.9); opacity: 0; } to { transform: translateX(0) scale(1); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(110%); } }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(17,24,39,0.45); backdrop-filter: blur(6px);
  z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: all 0.25s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto;
  transform: translateY(20px) scale(0.97); transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header { padding: 22px 24px 0; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 18px 24px; }
.modal-footer { padding: 0 24px 22px; display: flex; gap: 10px; justify-content: flex-end; }

.spinner {
  width: 20px; height: 20px; border: 2.5px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%; animation: shimmer 1.6s infinite; border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.divider { display: flex; align-items: center; gap: 12px; color: var(--text-dim); font-size: 12px; font-weight: 500; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

@media (max-width: 768px) { .hide-mobile { display: none !important; } .card { padding: 16px; } }
@media (min-width: 769px) { .hide-desktop { display: none !important; } }
@media (max-width: 480px) { .hide-sm { display: none !important; } }