/* =========================================================================
   FlowGeniQ Site Builder — Premium Dark Theme
   ========================================================================= */

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f35;
  --bg-card-hover: #222842;
  --bg-input: #151a2e;
  --border: #2a3050;
  --border-hover: #3a4070;
  --text-primary: #f0f2f5;
  --text-secondary: #8892a4;
  --text-muted: #5a6478;
  --gold: #c9a84c;
  --gold-light: #d4b85a;
  --gold-dark: #a88a3a;
  --gold-gradient: linear-gradient(135deg, #c9a84c, #d4a843, #e0c068);
  --accent: #4f7df5;
  --accent-light: #6b93ff;
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --sidebar-width: 260px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.4);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* =========================================================================
   Sidebar
   ========================================================================= */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: var(--gold-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--bg-primary);
}

.brand-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.brand-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.nav-item.active { background: rgba(201, 168, 76, 0.12); color: var(--gold); }
.nav-item.active i { color: var(--gold); }
.nav-item i { width: 20px; text-align: center; font-size: 16px; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--gold-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--bg-primary);
}

.user-name { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-credits { display: block; font-size: 11px; color: var(--text-muted); }
.user-credits i { color: var(--gold); margin-right: 4px; }

.logout-btn { color: var(--text-muted) !important; font-size: 13px !important; }
.logout-btn:hover { color: var(--error) !important; }

/* =========================================================================
   Main Content
   ========================================================================= */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-content {
  padding: 32px;
  max-width: 1400px;
}

/* =========================================================================
   Typography
   ========================================================================= */
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 32px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.gold-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================================================
   Stats Cards
   ========================================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 16px;
}

.stat-card .stat-icon.gold { background: rgba(201, 168, 76, 0.15); color: var(--gold); }
.stat-card .stat-icon.blue { background: rgba(79, 125, 245, 0.15); color: var(--accent); }
.stat-card .stat-icon.green { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.stat-card .stat-icon.orange { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* =========================================================================
   Project Cards
   ========================================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card:hover {
  border-color: var(--gold-dark);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(201, 168, 76, 0.1);
}

.project-card-header {
  height: 160px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-card-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.05) 0%, transparent 70%);
}

.project-card-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-header .placeholder-icon {
  font-size: 48px;
  color: var(--border);
}

.project-card-body {
  padding: 20px;
}

.project-card-body h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.project-card-body .project-type {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.project-card-body .project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.draft { background: rgba(90, 100, 120, 0.2); color: var(--text-muted); }
.status-badge.generating { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-badge.ready { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.status-badge.error { background: rgba(239, 68, 68, 0.15); color: var(--error); }
.status-badge.published { background: rgba(79, 125, 245, 0.15); color: var(--accent); }

.owner-tag {
  font-size: 11px;
  color: var(--text-muted);
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gold-gradient);
  color: var(--bg-primary);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.3);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover {
  background: rgba(201, 168, 76, 0.1);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--error);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-icon { padding: 10px; width: 40px; height: 40px; justify-content: center; }

/* =========================================================================
   Forms
   ========================================================================= */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.form-textarea { min-height: 120px; resize: vertical; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238892a4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* =========================================================================
   Cards & Containers
   ========================================================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* =========================================================================
   Empty State
   ========================================================================= */
.empty-state {
  text-align: center;
  padding: 80px 32px;
}

.empty-state .empty-icon {
  width: 80px;
  height: 80px;
  background: rgba(201, 168, 76, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 32px;
  color: var(--gold);
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================================
   Page Grid (for project detail)
   ========================================================================= */
.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.page-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.page-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.page-card-preview {
  height: 180px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.page-card-preview iframe {
  width: 200%;
  height: 200%;
  transform: scale(0.5);
  transform-origin: top left;
  border: none;
  pointer-events: none;
}

.page-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-card-body {
  padding: 16px;
}

.page-card-body h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.page-card-body .page-route {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 12px;
}

.page-card-actions {
  display: flex;
  gap: 8px;
}

/* =========================================================================
   Preview Frame
   ========================================================================= */
.preview-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.preview-tabs {
  display: flex;
  gap: 4px;
}

.preview-tab {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.preview-tab.active {
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold);
}

.preview-tab:hover { color: var(--text-primary); }

.preview-frame {
  width: 100%;
  min-height: 80vh;
  border: none;
  background: #fff;
}

/* =========================================================================
   Generation Progress — Premium Overlay
   ========================================================================= */
.gen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 18, 0.95);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.gen-overlay.active { opacity: 1; }

.gen-card {
  position: relative;
  background: linear-gradient(145deg, rgba(20, 24, 40, 0.95), rgba(12, 16, 30, 0.98));
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 24px;
  padding: 48px 40px 36px;
  text-align: center;
  max-width: 540px;
  width: 92%;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(201, 168, 76, 0.08), 0 24px 48px rgba(0, 0, 0, 0.4);
}

/* Floating particles */
.gen-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.gen-particle {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: genFloat 6s ease-in-out infinite;
}
.gen-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.gen-particle:nth-child(2) { left: 80%; top: 30%; animation-delay: 1s; }
.gen-particle:nth-child(3) { left: 30%; top: 70%; animation-delay: 2s; }
.gen-particle:nth-child(4) { left: 70%; top: 80%; animation-delay: 3s; }
.gen-particle:nth-child(5) { left: 50%; top: 10%; animation-delay: 4s; }
.gen-particle:nth-child(6) { left: 20%; top: 50%; animation-delay: 5s; }

@keyframes genFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(1); }
  25% { opacity: 0.6; }
  50% { opacity: 0.3; transform: translateY(-40px) scale(1.5); }
  75% { opacity: 0.6; }
}

/* Logo ring */
.gen-header { position: relative; z-index: 1; margin-bottom: 28px; }
.gen-logo-ring {
  width: 80px; height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--gold), transparent, var(--gold));
  padding: 3px;
  animation: genSpin 3s linear infinite;
}
.gen-logo-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: rgba(12, 16, 30, 0.95);
  display: flex; align-items: center; justify-content: center;
}
.gen-logo-inner i {
  font-size: 28px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes genSpin { to { transform: rotate(360deg); } }

.gen-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.gen-subtitle {
  font-size: 14px;
  color: var(--gold);
  font-weight: 500;
  min-height: 20px;
  transition: all 0.3s ease;
}

/* Progress bar */
.gen-progress-section {
  position: relative; z-index: 1;
  margin-bottom: 20px;
}
.gen-progress-bar {
  width: 100%; height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.gen-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #c9a84c, #e8d48b, #c9a84c);
  background-size: 200% 100%;
  border-radius: 3px;
  transition: width 1s ease;
  animation: genShimmer 2s ease infinite;
}
@keyframes genShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.gen-progress-glow {
  position: absolute; top: -4px; right: 0;
  width: 20px; height: 14px;
  background: radial-gradient(ellipse, rgba(201, 168, 76, 0.6), transparent);
  filter: blur(4px);
  pointer-events: none;
}
.gen-progress-info {
  display: flex; justify-content: space-between;
  margin-top: 10px;
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
}
.gen-progress-info span:first-child { color: var(--gold); }

/* Detail text */
.gen-detail {
  position: relative; z-index: 1;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  min-height: 18px;
  transition: all 0.3s ease;
}

/* Stages timeline */
.gen-stages {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}
.gen-stage {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
}
.gen-stage-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.5s ease;
}
.gen-stage-dot i { font-size: 14px; color: rgba(255, 255, 255, 0.2); transition: all 0.5s ease; }
.gen-stage-label { font-size: 11px; color: rgba(255, 255, 255, 0.25); font-weight: 500; transition: all 0.5s ease; }

.gen-stage.active .gen-stage-dot {
  background: rgba(201, 168, 76, 0.15);
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.3);
  animation: genPulse 2s ease infinite;
}
.gen-stage.active .gen-stage-dot i { color: var(--gold); }
.gen-stage.active .gen-stage-label { color: var(--gold); }

.gen-stage.completed .gen-stage-dot {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}
.gen-stage.completed .gen-stage-dot i { color: #10b981; }
.gen-stage.completed .gen-stage-label { color: #10b981; }

@keyframes genPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(201, 168, 76, 0.3); }
  50% { box-shadow: 0 0 30px rgba(201, 168, 76, 0.5); }
}

.gen-stage-line {
  width: 40px; height: 2px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 4px;
  margin-bottom: 24px;
  transition: all 0.5s ease;
}
.gen-stage-line.active {
  background: linear-gradient(90deg, #10b981, var(--gold));
}
.gen-stage-line.completed {
  background: #10b981;
}

/* Info bar */
.gen-info-bar {
  position: relative; z-index: 1;
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}
.gen-info-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
}
.gen-info-item i { color: rgba(201, 168, 76, 0.5); font-size: 11px; }
.gen-info-item strong { color: var(--text-secondary); }

.gen-warning {
  position: relative; z-index: 1;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  margin: 0;
}

/* Legacy classes kept for backward compat */
.progress-bar {
  width: 100%; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 24px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--gold-gradient);
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* =========================================================================
   Flash Messages
   ========================================================================= */
.flash {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.flash.error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--error); }
.flash.success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: var(--success); }
.flash.info { background: rgba(79, 125, 245, 0.1); border: 1px solid rgba(79, 125, 245, 0.3); color: var(--accent); }

/* =========================================================================
   Edit Modal
   ========================================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .page-content { padding: 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Animations
   ========================================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeInUp 0.5s ease forwards; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }
