:root {
  --bp-blue: #2563eb;
  --bp-cyan: #0ea5e9;
  --bp-gradient: linear-gradient(135deg, #2563eb, #0ea5e9);
  --bp-bg: #f8fafc;
  --bp-surface: #ffffff;
  --bp-text: #0f172a;
  --bp-muted: #64748b;
  --bp-border: #e2e8f0;
  --bp-radius: 12px;
  --bp-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --bp-shadow-lg: 0 12px 40px rgba(37, 99, 235, 0.12);
  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bp-bg);
  color: var(--bp-text);
  line-height: 1.5;
  min-height: 100vh;
}

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

.layout-wrapper { display: flex; min-height: calc(100vh - 56px); }

.topbar {
  height: 56px;
  background: var(--bp-surface);
  border-bottom: 1px solid var(--bp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--bp-text);
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bp-gradient);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.sidebar {
  width: 240px;
  background: var(--bp-surface);
  border-right: 1px solid var(--bp-border);
  padding: 1rem 0.75rem;
  flex-shrink: 0;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  color: var(--bp-muted);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  margin-bottom: 2px;
}

.sidebar a:hover { background: #f1f5f9; color: var(--bp-text); }
.sidebar a.active {
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(14,165,233,0.08));
  color: var(--bp-blue);
  font-weight: 600;
}

.main-content { flex: 1; padding: 1.5rem 1.75rem; max-width: 1200px; }

.page-header { margin-bottom: 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.page-subtitle { color: var(--bp-muted); font-size: 0.9rem; margin-top: 0.25rem; }
.page-header-content { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.btn-ghost {
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  color: var(--bp-text);
}

.btn-primary {
  background: var(--bp-gradient);
  color: #fff;
  box-shadow: var(--bp-shadow);
}

.btn-primary:hover, .btn-ghost:hover { text-decoration: none; opacity: 0.95; }

.panel-card {
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  padding: 1.25rem;
  box-shadow: var(--bp-shadow);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  padding: 1.1rem 1.25rem;
}

.stat-card strong { display: block; font-size: 1.75rem; font-weight: 700; color: var(--bp-blue); }
.stat-card span { font-size: 0.85rem; color: var(--bp-muted); }

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.mb-4 { margin-bottom: 1rem; }

.form-grid { display: grid; gap: 1rem; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-grid-2 { grid-template-columns: 1fr; } .sidebar { display: none; } }

.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; }
.form-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--bp-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
}
.form-hint { font-size: 0.8rem; color: var(--bp-muted); margin-top: 0.3rem; }

.isletme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.isletme-card {
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  padding: 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.isletme-card:hover { box-shadow: var(--bp-shadow-lg); border-color: #bfdbfe; text-decoration: none; }
.isletme-title { font-weight: 700; font-size: 1rem; }
.isletme-sub { font-size: 0.8rem; color: var(--bp-muted); margin-top: 0.2rem; }
.status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.status-pill.active { background: #dcfce7; color: #166534; }
.status-pill.suspended { background: #fee2e2; color: #991b1b; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bp-bg);
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bp-surface);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--bp-shadow-lg);
  border: 1px solid var(--bp-border);
}

.login-card h1 { font-size: 1.35rem; margin-bottom: 0.25rem; }
.login-card p { color: var(--bp-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.login-brand {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bp-gradient);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  margin-bottom: 1rem;
}

/* Progress modal */
body.bp-modal-open { overflow: hidden; }
.bp-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.bp-modal.is-open { opacity: 1; pointer-events: auto; }
.bp-progress-card {
  background: var(--bp-surface);
  border-radius: 16px;
  width: 100%; max-width: 520px;
  max-height: 85vh; overflow: hidden;
  box-shadow: var(--bp-shadow-lg);
}
.bp-progress-card__head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bp-border);
  background: linear-gradient(135deg, rgba(37,99,235,0.04), rgba(14,165,233,0.03));
}
.bp-progress-card__body { padding: 1rem 1.5rem; max-height: 50vh; overflow-y: auto; }
.bp-steps-list .step-item {
  display: flex; gap: 0.75rem; padding: 0.5rem 0;
  font-size: 0.875rem; border-bottom: 1px solid #f1f5f9;
}
.step-icon { width: 20px; flex-shrink: 0; color: var(--bp-blue); }
