/* ===================================================================
   Werkcamp Platform — Custom Stylesheet
   Bootstrap 5 base, augmented with design tokens and component styles.
   =================================================================== */

/* ------------------------------------------------------------------ */
/* Design tokens                                                       */
/* ------------------------------------------------------------------ */
:root {
  --wk-primary:       #5b5ef6;        /* indigo-ish violet */
  --wk-primary-dark:  #4446d6;
  --wk-primary-light: #ededff;
  --wk-dark:          #0f1117;
  --wk-dark-card:     #1a1d27;
  --wk-navy:          #141829;
  --wk-text-muted:    #6b7280;
  --wk-border:        #e5e7eb;
  --wk-radius:        0.875rem;
  --wk-radius-sm:     0.5rem;
  --wk-shadow:        0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
  --wk-shadow-lg:     0 4px 24px rgba(0, 0, 0, 0.10);
  --bs-primary:       var(--wk-primary);
  --bs-primary-rgb:   91, 94, 246;
}

/* ------------------------------------------------------------------ */
/* Global                                                              */
/* ------------------------------------------------------------------ */
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #1a1d27;
  background-color: #fafafa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main, section { flex: 1; }

/* Bootstrap primary override */
.btn-primary {
  background-color: var(--wk-primary);
  border-color: var(--wk-primary);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--wk-primary-dark);
  border-color: var(--wk-primary-dark);
}
.btn-outline-primary {
  color: var(--wk-primary);
  border-color: var(--wk-primary);
}
.btn-outline-primary:hover {
  background-color: var(--wk-primary);
  border-color: var(--wk-primary);
}
a { color: var(--wk-primary); }

/* Utility */
.py-6 { padding-top: 5rem; padding-bottom: 5rem; }

/* ------------------------------------------------------------------ */
/* Navbar                                                              */
/* ------------------------------------------------------------------ */
.wk-navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--wk-border);
  padding: 1rem 0;
}

.wk-navbar .navbar-brand {
  font-size: 1.15rem;
  color: var(--wk-dark);
  text-decoration: none;
}

.wk-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--wk-primary);
  color: #fff;
  font-size: 1rem;
}

.wk-navbar .nav-link {
  color: #4b5563;
  font-size: 0.925rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--wk-radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.wk-navbar .nav-link:hover { color: var(--wk-primary); background: var(--wk-primary-light); }

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.wk-hero {
  padding: 6rem 0 5rem;
  background: linear-gradient(160deg, #f8f9ff 0%, #f0f1ff 50%, #fafafa 100%);
}

.wk-badge-pill {
  background: var(--wk-primary-light);
  color: var(--wk-primary);
  border: 1px solid rgba(91, 94, 246, 0.2);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 2rem;
}

.wk-gradient-text {
  background: linear-gradient(135deg, var(--wk-primary) 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero mockup card */
.wk-hero-card {
  background: var(--wk-dark-card);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--wk-shadow-lg), 0 0 0 1px rgba(255,255,255,0.08) inset;
}
.wk-browser-bar {
  background: #252836;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.wk-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #555;
  display: inline-block;
}
.wk-dot:nth-child(1) { background: #ff5f57; }
.wk-dot:nth-child(2) { background: #febc2e; }
.wk-dot:nth-child(3) { background: #28c840; }
.wk-url-bar {
  margin-left: 0.75rem;
  font-size: 0.75rem;
  color: #9ca3af;
  font-family: monospace;
}
.wk-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 2rem;
}
@media (max-width: 576px) {
  .wk-hero-stats { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}
.wk-stat-card {
  text-align: center;
  padding: 1rem;
  border-right: 1px solid rgba(255,255,255,0.07);
}
.wk-stat-card:last-child { border-right: none; }
.wk-stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.wk-stat-label {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ------------------------------------------------------------------ */
/* Features                                                            */
/* ------------------------------------------------------------------ */
.wk-feature-card {
  background: #fff;
  border: 1px solid var(--wk-border);
  border-radius: var(--wk-radius);
  padding: 2rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.wk-feature-card:hover {
  box-shadow: var(--wk-shadow-lg);
  transform: translateY(-2px);
}
.wk-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--wk-primary-light);
  color: var(--wk-primary);
  font-size: 1.3rem;
}

/* ------------------------------------------------------------------ */
/* Pricing                                                             */
/* ------------------------------------------------------------------ */
.wk-pricing-section {
  background: #f3f4f6;
}
.wk-price-card {
  background: #fff;
  border: 1px solid var(--wk-border);
  border-radius: var(--wk-radius);
  padding: 2.25rem;
  position: relative;
}
.wk-price-card--featured {
  background: var(--wk-dark);
  border-color: var(--wk-dark);
  box-shadow: var(--wk-shadow-lg), 0 0 0 2px var(--wk-primary);
}
.wk-plan-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: 2rem;
  background: var(--wk-primary-light);
  color: var(--wk-primary);
}
.wk-plan-badge--pro {
  background: rgba(91, 94, 246, 0.25);
  color: #a5b4fc;
}
.wk-price-amount {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--wk-dark);
}
.wk-price-card--featured .wk-price-amount { color: #fff; }
.wk-feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.95rem;
}
.wk-feature-list--dark { color: #d1d5db; }

/* ------------------------------------------------------------------ */
/* CTA section                                                         */
/* ------------------------------------------------------------------ */
.wk-cta-section {
  background: linear-gradient(135deg, var(--wk-primary) 0%, #7c3aed 100%);
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.wk-footer {
  background: var(--wk-dark);
  color: #fff;
}
.footer-link {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 2;
  transition: color 0.15s ease;
  display: block;
}
.footer-link:hover { color: #fff; }

/* ------------------------------------------------------------------ */
/* Auth pages                                                          */
/* ------------------------------------------------------------------ */
.wk-auth-section {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 4rem 0;
  background: linear-gradient(160deg, #f8f9ff 0%, #f0f1ff 50%, #fafafa 100%);
}
.wk-auth-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--wk-dark);
  text-decoration: none;
}
.wk-auth-logo i { color: var(--wk-primary); }
.wk-auth-card {
  background: #fff;
  border: 1px solid var(--wk-border);
  border-radius: var(--wk-radius);
  padding: 2.25rem;
  box-shadow: var(--wk-shadow);
}
.wk-auth-card .input-group-text {
  border-right: none;
}
.wk-auth-card .form-control {
  border-left: none;
}
.wk-auth-card .form-control:focus {
  box-shadow: none;
  border-color: #dee2e6;
}
.wk-auth-card .input-group:focus-within .input-group-text,
.wk-auth-card .input-group:focus-within .form-control {
  border-color: var(--wk-primary);
}

/* ------------------------------------------------------------------ */
/* Dashboard                                                           */
/* ------------------------------------------------------------------ */
.wk-dashboard-section {
  padding: 3rem 0 5rem;
  min-height: calc(100vh - 72px);
}

.wk-dash-card {
  background: #fff;
  border: 1px solid var(--wk-border);
  border-radius: var(--wk-radius);
  padding: 2rem;
  box-shadow: var(--wk-shadow);
}

.wk-instance-url-block {
  background: #f9fafb;
  border: 1px solid var(--wk-border);
  border-radius: var(--wk-radius-sm);
  padding: 1rem 1.25rem;
}
.wk-instance-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: var(--wk-primary-light);
  color: var(--wk-primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Status badges */
.wk-badge-running {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.wk-badge-provisioning {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde68a;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.wk-badge-stopped {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.wk-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  animation: wk-pulse 2s infinite;
  display: inline-block;
}
@keyframes wk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ------------------------------------------------------------------ */
/* Request form section                                                */
/* ------------------------------------------------------------------ */
#request .card {
  border-color: var(--wk-border);
}
#request .form-control:focus,
#request .form-select:focus {
  border-color: var(--wk-primary);
  box-shadow: 0 0 0 0.2rem rgba(91, 94, 246, 0.15);
}

/* ------------------------------------------------------------------ */
/* Status stepper                                                      */
/* ------------------------------------------------------------------ */
.wk-step-done .step-icon {
  background: #dcfce7;
  color: #15803d;
  border: 2px solid #bbf7d0;
}
.wk-step-pending .step-icon {
  background: #f3f4f6;
  color: #9ca3af;
  border: 2px solid #e5e7eb;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 768px) {
  .wk-hero { padding: 4rem 0 3rem; }
  .display-3 { font-size: 2.25rem; }
  .wk-hero-stats { gap: 1rem; padding: 1.25rem; }
  .wk-dash-card { padding: 1.5rem; }
}
