/* HarajBot SaaS - Clean modern styling */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #10b981;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  direction: ltr;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #059669; text-decoration: none; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-lg { padding: 0.8rem 2.5rem; font-size: 1.1rem; }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.85rem; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }

/* Hero */
.hero {
  text-align: center;
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text);
}
.hero h1 span { color: var(--primary); }
.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: box-shadow 0.2s;
}
.feature-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.feature-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}
.form-control {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
textarea.form-control { min-height: 80px; resize: vertical; }

/* Alert */
.alert {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: var(--primary); border: 1px solid #bfdbfe; }

/* Auth page */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 2rem;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { text-align: center; margin-bottom: 1.5rem; }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.pricing-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
}
.pricing-card.featured { border-color: var(--primary); }
.pricing-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 0.2rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.pricing-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 1rem 0;
}
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-features { list-style: none; text-align: left; margin: 1.5rem 0; }
.pricing-features li {
  padding: 0.4rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.pricing-features li::before {
  content: "\2713";
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.5rem;
}

/* Dashboard */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.dash-header h1 { font-size: 1.8rem; }
.dash-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}
.dash-tab {
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-size: 0.95rem;
}
.dash-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Search */
.search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.search-bar input { flex: 1; }

/* Results grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.result-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.result-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f1f5f9;
}
.result-card-body { padding: 1rem; }
.result-card-body h4 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-card-body .price {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}
.result-card-body .meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}
.result-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

/* Status badges */
.badge-connected { color: var(--accent); }
.badge-disconnected { color: var(--danger); }

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .nav { padding: 0.8rem 1rem; }
  .container { padding: 0 1rem; }
}
