/* GlassBook Design System — Glassmorphism AAA */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-color: #0f172a;
  --bg-deep: #070b15;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-bg-strong: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-strong: rgba(255, 255, 255, 0.18);
  --accent-cyan: #38bdf8;
  --accent-purple: #a855f7;
  --accent-lime: #a3e635;
  --accent-pink: #f472b6;
  --accent-glow: rgba(56, 189, 248, 0.3);
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #22d3a7;
  --warning: #fbbf24;
  --danger: #f87171;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 4px 30px var(--accent-glow);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', system-ui, sans-serif; }

html, body { background: var(--bg-color); color: var(--text-main); min-height: 100vh; }

body {
  overflow-x: hidden;
  position: relative;
  background:
    radial-gradient(ellipse 800px 600px at 10% -10%, rgba(56, 189, 248, 0.18), transparent 70%),
    radial-gradient(ellipse 900px 700px at 110% 110%, rgba(168, 85, 247, 0.20), transparent 70%),
    linear-gradient(180deg, var(--bg-color) 0%, var(--bg-deep) 100%);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

/* Orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
  animation: float 12s infinite alternate ease-in-out;
}
.orb-1 { width: 520px; height: 520px; background: rgba(56, 189, 248, 0.35); top: -160px; left: -120px; }
.orb-2 { width: 420px; height: 420px; background: rgba(168, 85, 247, 0.35); bottom: -120px; right: -80px; animation-delay: -6s; }
.orb-3 { width: 300px; height: 300px; background: rgba(163, 230, 53, 0.20); top: 40%; right: 20%; animation-delay: -3s; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 30px) scale(1.08); }
}

/* Layout Shell */
.shell {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  border-right: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
  padding: 0 12px;
}
.sidebar-section {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
  padding: 18px 16px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.25s ease;
}
.nav-item:hover { background: var(--glass-bg); color: var(--text-main); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(168, 85, 247, 0.12));
  color: var(--text-main);
  box-shadow: var(--shadow-glow);
}
.nav-item-icon {
  width: 18px; height: 18px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0.85;
}
.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.user-meta { overflow: hidden; }
.user-name { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Main */
.main {
  padding: 36px 48px 64px;
  max-width: 1440px;
  width: 100%;
}

/* Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.page-title { font-size: 1.8rem; font-weight: 700; }
.page-subtitle { font-size: 0.95rem; color: var(--text-muted); margin-top: 4px; }

/* Search Bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 10px 18px;
  min-width: 320px;
  transition: border-color 0.25s;
}
.search-bar:focus-within { border-color: var(--accent-cyan); box-shadow: var(--shadow-glow); }
.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  flex: 1;
  font-size: 0.95rem;
}
.search-bar input::placeholder { color: var(--text-dim); }

/* Glass Card */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.glass-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  background: var(--glass-bg-strong);
  border-color: var(--glass-border-strong);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: white;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(168, 85, 247, 0.45); }
.btn-ghost {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--text-main);
}
.btn-ghost:hover { background: var(--glass-bg-strong); border-color: var(--glass-border-strong); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-soft);
}
.badge-cyan { color: var(--accent-cyan); border-color: rgba(56, 189, 248, 0.3); background: rgba(56, 189, 248, 0.08); }
.badge-purple { color: var(--accent-purple); border-color: rgba(168, 85, 247, 0.3); background: rgba(168, 85, 247, 0.08); }
.badge-lime { color: var(--accent-lime); border-color: rgba(163, 230, 53, 0.3); background: rgba(163, 230, 53, 0.08); }
.badge-pink { color: var(--accent-pink); border-color: rgba(244, 114, 182, 0.3); background: rgba(244, 114, 182, 0.08); }

/* Progress */
.progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* Utilities */
.stack { display: flex; flex-direction: column; }
.gap-xs { gap: 6px; }
.gap-sm { gap: 10px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.dim { color: var(--text-dim); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.88rem; }
.text-lg { font-size: 1.15rem; }
.text-xl { font-size: 1.5rem; }
.text-2xl { font-size: 2rem; }
.text-3xl { font-size: 2.5rem; }
.fw-6 { font-weight: 600; }
.fw-7 { font-weight: 700; }
.fw-8 { font-weight: 800; }

@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; flex-direction: row; overflow-x: auto; }
  .sidebar-footer, .sidebar-section { display: none; }
  .main { padding: 24px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .search-bar { min-width: 0; width: 100%; }
  .page-header { flex-direction: column; align-items: stretch; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
