/* StitchLift Design System — Dark Theme with Teal Accents */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-base: #0B0B0F;
  --bg-surface: #111118;
  --bg-elevated: #18181F;
  --bg-card: #1A1A24;
  --bg-input: #141419;
  --border: #252530;
  --border-focus: #14B8A6;
  --teal: #14B8A6;
  --teal-hover: #0D9488;
  --teal-glow: rgba(20, 184, 166, 0.12);
  --teal-dim: rgba(20, 184, 166, 0.06);
  --text-primary: #EAEAF0;
  --text-secondary: #8A8A9A;
  --text-muted: #55556A;
  --text-inverse: #0B0B0F;
  --error: #EF4444;
  --warning: #F59E0B;
  --success: #10B981;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-hover); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--teal);
  color: var(--text-inverse);
}
.btn-primary:hover {
  background: var(--teal-hover);
  box-shadow: 0 0 20px var(--teal-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--teal);
  background: var(--teal-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Inputs */
.input, input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.input:focus, input:focus, textarea:focus, select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

::placeholder { color: var(--text-muted); }

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

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.5px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Badge / Chip */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.chip:hover, .chip.active {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-dim);
}

/* Section helpers */
.section { padding: 80px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Labels */
.label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

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

/* Fade in */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn 0.4s ease-out; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: var(--shadow);
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
}
.toast.error { border-color: var(--error); }
.toast.success { border-color: var(--success); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Grid patterns for backgrounds */
.grid-bg {
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center;
}

/* Glow effect */
.teal-glow {
  box-shadow: 0 0 30px var(--teal-glow), 0 0 60px rgba(20, 184, 166, 0.05);
}


/* ── Mobile Responsive ── */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; height: 52px; }
  .navbar-brand { font-size: 18px; }
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .card { padding: 16px; }
  .btn-lg { padding: 12px 20px; font-size: 15px; }
}
