/* ==========================================================================
   Bintang Hosting Platform — static prototype styles
   No framework, no build step. Shared by all pages in docs/html.
   ========================================================================== */

:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #f6f8fc;
  --card: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent: #f59e0b;
  --accent-soft: #fffbeb;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #0284c7;
  --info-soft: #e0f2fe;
  --sidebar: #0b1220;
  --sidebar-2: #101c33;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);
  --font: "Plus Jakarta Sans", "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: -0.03em; }
h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; }
h4 { font-size: 15px; line-height: 1.35; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.icon svg { width: 100%; height: 100%; }
.icon-lg { width: 22px; height: 22px; }
.icon-sm { width: 15px; height: 15px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.nowrap { white-space: nowrap; }
.w-full { width: 100%; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.pb-16 { padding-bottom: 16px; }
.pt-16 { padding-top: 16px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hidden { display: none !important; }

/* --------------------------------------------------------------------------
   App shell (client + admin)
   -------------------------------------------------------------------------- */

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}
.app-main { min-width: 0; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 14px 18px;
  color: #cbd5e1;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.28), transparent 34%),
    linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  z-index: 40;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.24); border-radius: 99px; }

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 2px 8px 20px;
  color: #fff;
}
.brand:hover { color: #fff; }
.brand-logo { display: block; width: auto; height: 30px; filter: brightness(0) invert(1); }
.brand-tag { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #94a3b8; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}
.brand-name { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; line-height: 1.1; }
.brand-sub { display: block; font-size: 11px; font-weight: 500; color: #94a3b8; margin-top: 3px; }

.nav-group { margin: 14px 0 4px; }
.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  font-weight: 700;
  padding: 0 12px 7px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  margin: 2px 0;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.95), rgba(37, 99, 235, 0.58));
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.25);
}
.nav-link .icon { opacity: 0.85; }
.nav-link.active .icon { opacity: 1; }
.nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}
.sidebar-footer {
  margin-top: 22px;
  padding: 14px 10px 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 12px;
  color: #94a3b8;
}
.sidebar-footer a { color: #cbd5e1; }
.sidebar-footer a:hover { color: #fff; }

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.mobile-menu-btn { display: none; }
.topbar-search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  width: min(380px, 42vw);
  height: 40px;
  color: var(--muted);
}
.topbar-search input {
  border: 0;
  background: transparent;
  outline: 0;
  width: 100%;
  color: var(--ink);
  font-size: 13px;
}
.topbar-search input::placeholder { color: var(--muted-2); }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.icon-btn:hover { background: #f8fafc; border-color: var(--line-2); }
.dot-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 800;
  padding: 0 4px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  flex: 0 0 auto;
}
.avatar-lg { width: 56px; height: 56px; font-size: 17px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.user-chip:hover { border-color: var(--line-2); color: var(--ink); }
.user-chip-text { line-height: 1.15; }
.user-chip-name { font-size: 12.5px; font-weight: 700; color: var(--ink); display: block; }
.user-chip-role { font-size: 10.5px; color: var(--muted); display: block; }

.content {
  padding: 28px;
  max-width: 1500px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}
.page-head h1 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 6px; }
.page-head p { margin: 0; color: var(--muted); max-width: 720px; }
.page-head-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.breadcrumbs { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { color: var(--line-2); }

/* --------------------------------------------------------------------------
   Buttons, badges, alerts
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  transition: 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-secondary:hover { background: #f8fafc; border-color: var(--line-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: #f1f5f9; color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 12px 20px; font-size: 14px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: 0.55; pointer-events: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-success { background: var(--success-soft); color: #166534; }
.badge-warning { background: var(--warning-soft); color: #92400e; }
.badge-danger { background: var(--danger-soft); color: #991b1b; }
.badge-info { background: var(--info-soft); color: #075985; }
.badge-neutral { background: #f1f5f9; color: #475569; }
.badge-primary { background: var(--primary-soft); color: #1e40af; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  margin-bottom: 20px;
}
.alert .icon { margin-top: 1px; }
.alert > div { min-width: 0; }
.alert-title { font-weight: 700; margin-bottom: 2px; }
.alert p { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.alert-info { background: var(--info-soft); border-color: #bae6fd; color: #0c4a6e; }
.alert-warning { background: var(--warning-soft); border-color: #fde68a; color: #78350f; }
.alert-danger { background: var(--danger-soft); border-color: #fecaca; color: #7f1d1d; }
.alert-success { background: var(--success-soft); border-color: #bbf7d0; color: #14532d; }
.alert-neutral { background: #f8fafc; border-color: var(--line); color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Cards and stats
   -------------------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h3, .card-header h4 { margin: 0; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.card-body { padding: 20px; }
.card-body-lg { padding: 26px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--line); background: #fbfdff; }
.card-hover:hover { border-color: #bfdbfe; box-shadow: 0 16px 36px rgba(37, 99, 235, 0.09); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { padding: 18px 18px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 80px; height: 80px; right: -26px; top: -26px; border-radius: 50%; background: var(--primary-soft); opacity: 0.8; }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; position: relative; z-index: 1; }
.stat-value { font-size: 25px; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 3px; position: relative; z-index: 1; }
.stat-meta { font-size: 11.5px; color: var(--muted); position: relative; z-index: 1; }
.stat-meta.up { color: var(--success); }
.stat-meta.down { color: var(--danger); }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.section-title h2, .section-title h3 { margin: 0; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
.data th {
  text-align: left;
  padding: 11px 16px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data td { padding: 13px 16px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.data tbody tr:hover { background: #fbfdff; }
.data tbody tr:last-child td { border-bottom: 0; }
.data .amount { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.data .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.table-toolbar .search { flex: 1 1 220px; max-width: 330px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.page-links { display: flex; gap: 4px; }
.page-link { min-width: 31px; height: 31px; padding: 0 8px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; }
.page-link:hover { background: #f8fafc; }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: var(--ink-2); }
.field .help { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.field .error-text { font-size: 11.5px; color: var(--danger); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-lg { height: 48px; padding: 12px 14px; font-size: 14px; }
.input:focus, .select:focus, .textarea:focus { border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.textarea { min-height: 110px; resize: vertical; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 10px 0 0 10px; }
.input-group .btn { border-radius: 0 10px 10px 0; }
.checkbox { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--ink-2); }
.checkbox input { margin-top: 3px; accent-color: var(--primary); }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 9px; cursor: pointer; background: #fff; font-size: 13px; }
.radio-card input { accent-color: var(--primary); }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.switch { position: relative; display: inline-flex; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; transition: 0.2s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(16px); }

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab {
  border: 0;
  background: transparent;
  padding: 11px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --------------------------------------------------------------------------
   Progress, timeline, stepper
   -------------------------------------------------------------------------- */

.progress { height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #2563eb); border-radius: 999px; }
.progress.success > span { background: linear-gradient(90deg, #34d399, #16a34a); }
.progress.warning > span { background: linear-gradient(90deg, #fbbf24, #d97706); }

.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 20px 28px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); box-shadow: 0 0 0 3px #eff6ff; }
.timeline-dot.success { border-color: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.timeline-dot.warning { border-color: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.timeline-dot.danger { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.timeline-title { font-weight: 700; font-size: 13px; }
.timeline-meta { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.timeline p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }

.stepper { display: flex; align-items: center; gap: 0; margin: 0 0 24px; }
.step { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line-2); font-size: 11px; }
.step.active { color: var(--primary); }
.step.active .step-num { background: var(--primary); color: #fff; border-color: var(--primary); }
.step.done { color: var(--success); }
.step.done .step-num { background: var(--success); color: #fff; border-color: var(--success); }
.step-line { height: 2px; background: var(--line); flex: 1; margin: 0 10px; min-width: 20px; }
.step-line.done { background: var(--success); }

/* --------------------------------------------------------------------------
   Key-value, usage, empty
   -------------------------------------------------------------------------- */

.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 9px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; color: var(--ink-2); word-break: break-word; }
.usage-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 90px; gap: 12px; align-items: center; font-size: 12.5px; margin-bottom: 12px; }
.usage-row:last-child { margin-bottom: 0; }
.empty-state { padding: 44px 22px; text-align: center; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin: 0 auto 14px; }
.empty-state h3 { color: var(--ink); margin-bottom: 5px; }
.empty-state p { max-width: 420px; margin: 0 auto 16px; }

/* --------------------------------------------------------------------------
   Public site
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}
.site-header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 72px; display: flex; align-items: center; gap: 28px; }
.site-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.site-nav a { color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 8px 11px; border-radius: 9px; }
.site-nav a:hover, .site-nav a.active { background: #f1f5f9; color: var(--primary); }
.site-actions { display: flex; align-items: center; gap: 9px; }
.site-main { min-height: 60vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--muted); margin: 0; font-size: 15px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--primary); font-weight: 800; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; }

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.12), transparent 34%),
    radial-gradient(circle at 85% 10%, rgba(245, 158, 11, 0.12), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 76px 24px 68px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 54px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.05; margin-bottom: 18px; letter-spacing: -0.045em; }
.hero h1 span { color: var(--primary); }
.hero p { color: var(--muted); font-size: 16px; max-width: 560px; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 22px;
  position: relative;
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(245, 158, 11, 0.12));
  z-index: -1;
}
.panel-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eef2f7; }
.panel-row:last-child { border-bottom: 0; }
.panel-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.panel-icon.amber { background: var(--accent-soft); color: #b45309; }
.panel-icon.green { background: var(--success-soft); color: #15803d; }
.panel-title { font-weight: 700; font-size: 13px; }
.panel-sub { font-size: 11.5px; color: var(--muted); }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -0.02em; font-size: 15px; }
.logo:hover { color: var(--ink); }
.logo-img { display: block; width: auto; height: 34px; }
.logo-invert .logo-img { filter: brightness(0) invert(1); opacity: 0.92; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; font-size: 17px; box-shadow: 0 7px 16px rgba(37, 99, 235, 0.25); }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px; }
.feature-card h3 { font-size: 15px; margin-bottom: 6px; }
.feature-card p { color: var(--muted); margin: 0; font-size: 13px; }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; }
.product-card.featured { border-color: #93c5fd; box-shadow: 0 20px 50px rgba(37, 99, 235, 0.12); }
.product-card .product-badge { position: absolute; top: 16px; right: 16px; }
.product-card h3 { font-size: 18px; margin-bottom: 5px; }
.product-card .desc { color: var(--muted); font-size: 13px; min-height: 40px; margin-bottom: 16px; }
.price { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.price small { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.product-features { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.product-features li { display: flex; gap: 8px; align-items: flex-start; }
.product-features .icon { color: var(--success); margin-top: 1px; }
.product-card .btn { margin-top: auto; }

.pill-row { display: flex; gap: 9px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.pill.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

.logo-strip { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; font-size: 12px; }
.logo-strip span { opacity: 0.8; }

.testimonial { background: linear-gradient(135deg, #0f172a, #172554); color: #e2e8f0; border-radius: 22px; padding: 34px; }
.testimonial blockquote { font-size: 18px; line-height: 1.55; margin: 0 0 20px; color: #f8fafc; }
.testimonial .who { display: flex; align-items: center; gap: 12px; color: #cbd5e1; font-size: 12px; }

.cta-band { background: linear-gradient(135deg, #1d4ed8, #2563eb 55%, #0ea5e9); border-radius: 24px; padding: 44px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: #dbeafe; margin: 0; max-width: 560px; }
.cta-band .btn-secondary { background: #fff; border-color: #fff; color: #1d4ed8; }

.site-footer { background: #0b1220; color: #94a3b8; padding: 48px 0 24px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 30px; }
.footer-grid h4 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.footer-grid a { display: block; color: #94a3b8; font-size: 12.5px; padding: 3px 0; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(148, 163, 184, 0.16); margin-top: 34px; padding-top: 18px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 11.5px; }

/* --------------------------------------------------------------------------
   Auth
   -------------------------------------------------------------------------- */

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.02fr 0.98fr; background: #fff; }
.auth-aside {
  background:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.35), transparent 34%),
    linear-gradient(145deg, #0b1220, #111f3d 60%, #1e3a8a);
  color: #e2e8f0;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-aside::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); right: -120px; bottom: -100px; }
.auth-aside h1 { color: #fff; font-size: clamp(30px, 3.4vw, 46px); margin: 30px 0 14px; }
.auth-aside p { color: #cbd5e1; max-width: 460px; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; font-size: 13px; }
.auth-points li { display: flex; align-items: center; gap: 10px; color: #e2e8f0; }
.auth-points .icon { color: #86efac; }
.auth-art { position: relative; z-index: 1; }
.auth-quote { font-size: 13px; color: #cbd5e1; border-left: 2px solid rgba(255,255,255,.2); padding-left: 14px; margin-top: 28px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 430px; }
.auth-card h2 { font-size: 28px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.demo-note { background: #f8fafc; border: 1px dashed var(--line-2); border-radius: 11px; padding: 11px 13px; font-size: 11.5px; color: var(--muted); margin-top: 18px; }
.demo-note strong { color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Tables / utility components for prototype
   -------------------------------------------------------------------------- */

.search { position: relative; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 36px; }
.filter-select { max-width: 170px; }
.inline-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid #fff; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; }
.code-block { background: #0b1220; color: #e2e8f0; border-radius: 11px; padding: 14px 16px; overflow-x: auto; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; line-height: 1.7; }
.code-block .comment { color: #94a3b8; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.chart-bars { display: flex; align-items: stretch; gap: 10px; height: 150px; padding-top: 8px; }
.chart-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; align-items: center; min-width: 0; height: 100%; }
.chart-bar .bar { width: 100%; max-width: 38px; background: linear-gradient(180deg, #60a5fa, #2563eb); border-radius: 7px 7px 3px 3px; min-height: 6px; flex: 0 0 auto; }
.chart-bar:nth-child(3n) .bar { background: linear-gradient(180deg, #93c5fd, #3b82f6); }
.chart-bar span { font-size: 10px; color: var(--muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
}
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.modal-close { border: 0; background: transparent; color: var(--muted); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.modal-close:hover { background: #f1f5f9; color: var(--ink); }

.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 8px; }
.toast {
  background: #0f172a;
  color: #fff;
  padding: 12px 14px;
  border-radius: 11px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 240px;
  animation: toastIn 0.2s ease;
}
.toast.success { background: #14532d; }
.toast.danger { background: #7f1d1d; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 35; }
.prototype-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed #fcd34d; background: #fffbeb; color: #92400e; border-radius: 999px; padding: 4px 9px; font-size: 10.5px; font-weight: 800; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-panel { max-width: 620px; }
  .footer-grid { grid-template-columns: 1.4fr repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr !important; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    width: 272px;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .nav-overlay { display: block; }
  .mobile-menu-btn { display: inline-flex; }
  .topbar { padding: 0 18px; }
  .content { padding: 20px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}

@media (max-width: 768px) {
  .site-header-inner { height: 64px; padding: 0 16px; gap: 12px; }
  .logo-img { height: 30px; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; position: absolute; left: 12px; right: 12px; top: 64px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px; flex-direction: column; align-items: stretch; }
  .site-nav.open a { padding: 10px 12px; }
  .site-actions .btn-secondary { display: none; }
  .hero-inner { padding: 48px 18px 44px; }
  .section { padding: 44px 0; }
  .container, .container-narrow { padding: 0 18px; }
  .stat-grid, .grid-2, .grid-3, .grid-4, .form-grid, .product-grid, .feature-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  .page-head-actions { justify-content: flex-start; }
  .topbar-search { display: none; }
  .topbar > .prototype-badge { display: none; }
  .topbar { height: 64px; padding: 0 14px; gap: 8px; }
  .user-chip-text { display: none; }
  .user-chip { border: 0; background: transparent; padding: 0; }
  .content { padding: 16px; }
  .card-body, .card-body-lg { padding: 16px; }
  .table-toolbar { padding: 12px; }
  .table-toolbar .search { max-width: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { padding: 28px; flex-direction: column; align-items: flex-start; }
  .kv { grid-template-columns: 1fr; gap: 3px 0; }
  .kv dt { margin-top: 8px; }
  .stepper { overflow-x: auto; padding-bottom: 6px; }
  .step { white-space: nowrap; }
  .auth-main { padding: 28px 18px; }
  .auth-card { max-width: none; }
  .modal { max-height: 94vh; }
}

@media (max-width: 480px) {
  .site-actions .btn { padding: 8px 10px; font-size: 12px; }
  .hero h1 { font-size: 34px; }
  .price { font-size: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .chart-bars { gap: 5px; }
}
