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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f8fafc;
  color: #1e293b;
}

/* NAV */
nav {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo { font-size: 1.4rem; font-weight: 700; color: #4F46E5; text-decoration: none; }

nav a { color: #64748b; text-decoration: none; margin-left: 1.5rem; font-size: 0.95rem; }
nav a:hover { color: #4F46E5; }

.btn {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary { background: #4F46E5; color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-outline { background: transparent; color: #4F46E5; border: 2px solid #4F46E5; }
.btn-outline:hover { background: #4F46E5; color: #fff; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }

/* HERO */
.hero {
  text-align: center;
  padding: 6rem 2rem 4rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1.2rem; line-height: 1.2; }
.hero p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 2.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero .btn-white { background: #fff; color: #4F46E5; }
.hero .btn-white:hover { background: #f1f5f9; }
.hero .btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.6); }
.hero .btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* FEATURES */
.features { padding: 5rem 2rem; max-width: 1100px; margin: 0 auto; }
.features h2 { text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 3rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }

.feature-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.6rem; }
.feature-card p { color: #64748b; font-size: 0.95rem; line-height: 1.6; }

/* PRICING */
.pricing { padding: 5rem 2rem; background: #f1f5f9; }
.pricing h2 { text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 3rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; max-width: 900px; margin: 0 auto; }

.price-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.price-card.featured { border: 2px solid #4F46E5; position: relative; }
.price-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: #4F46E5;
  color: #fff;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.price-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.price { font-size: 2.8rem; font-weight: 800; color: #4F46E5; margin: 1rem 0; }
.price span { font-size: 1rem; color: #64748b; font-weight: 400; }
.price-card ul { list-style: none; margin: 1.5rem 0; text-align: left; }
.price-card ul li { padding: 0.4rem 0; color: #475569; font-size: 0.95rem; }
.price-card ul li::before { content: '✓ '; color: #22c55e; font-weight: 700; }

/* FORMS */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.auth-card h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.4rem; }
.auth-card .subtitle { color: #64748b; margin-bottom: 2rem; font-size: 0.95rem; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.4rem; color: #374151; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: #4F46E5;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

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

.form-btn { width: 100%; padding: 0.85rem; font-size: 1rem; margin-top: 0.5rem; }
.form-link { text-align: center; margin-top: 1.2rem; font-size: 0.9rem; color: #64748b; }
.form-link a { color: #4F46E5; text-decoration: none; font-weight: 600; }

.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: none;
}
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* DASHBOARD */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  padding: 1.5rem 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo { padding: 0.5rem 1.5rem 1.5rem; border-bottom: 1px solid #e2e8f0; margin-bottom: 1rem; }
.sidebar-logo a { font-size: 1.3rem; font-weight: 700; color: #4F46E5; text-decoration: none; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #64748b;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 0;
  transition: all 0.15s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
  background: #eef2ff;
  color: #4F46E5;
}

.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 2rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.page-header h1 { font-size: 1.6rem; font-weight: 700; }

/* CARDS */
.card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-header h3 { font-size: 1.1rem; font-weight: 700; }

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-active { background: #dcfce7; color: #16a34a; }
.badge-inactive { background: #f1f5f9; color: #64748b; }

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 1rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h3 { font-size: 1.2rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #94a3b8; }

/* CODE BOX */
.code-box {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  font-family: monospace;
  font-size: 0.85rem;
  word-break: break-all;
  position: relative;
  margin-top: 0.5rem;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #4F46E5;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.copy-btn:hover { background: #4338ca; }

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #94a3b8;
}

.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.2rem; color: #64748b; margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.95rem; margin-bottom: 1.5rem; }

/* COLOR PICKER */
.color-options { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }
.color-opt {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.2s;
}
.color-opt.selected { border-color: #1e293b; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
}

/* FOOTER */
footer {
  background: #1e293b;
  color: #94a3b8;
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
}
