:root {
  /* Colors sampled directly from the Figma file (see docs/FIGMA_ANALYSIS.md) */
  --hbp-green-900: #063b1e;   /* dark panel / sidebar / primary buttons */
  --hbp-green-700: #00703d;   /* links, secondary accents */
  --hbp-green-accent: #8bef35; /* bright lime CTA buttons, active nav pill */
  --hbp-green-accent-hover: #7bd82e;
  --hbp-bg: #faf9f7;          /* page background */
  --hbp-bg-soft: #f0f4f0;     /* soft card background */
  --hbp-text: #1c1817;
  --hbp-text-secondary: #4a4241;
  --hbp-text-muted: #665d5b;
  --hbp-border: #e4e0dd;

  /* Admin panel gets its own neutral palette so staff always know they're
     in the internal tool, not the Brand-facing portal (see ASSUMPTIONS.md) */
  --admin-900: #1f2937;
  --admin-700: #374151;
  --admin-accent: #2563eb;
  --admin-bg: #f3f4f6;

  --sidebar-width: 280px;
}

body {
  background-color: var(--hbp-bg);
  color: var(--hbp-text);
  min-height: 100vh;
}

a { color: var(--hbp-green-700); }

/* ---------------------------------------------------------------
   Shared bits
--------------------------------------------------------------- */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  color: inherit;
  text-decoration: none;
}
.brand-logo .brand-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hbp-green-accent);
  color: var(--hbp-green-900);
  font-weight: 900;
}
.brand-logo .brand-logo-divider {
  width: 1px;
  height: 20px;
  background: currentColor;
  opacity: 0.4;
}

.btn-hbp-primary {
  background-color: var(--hbp-green-900);
  border-color: var(--hbp-green-900);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
}
.btn-hbp-primary:hover, .btn-hbp-primary:focus {
  background-color: #042a15;
  border-color: #042a15;
  color: #fff;
}
.btn-hbp-accent {
  background-color: var(--hbp-green-accent);
  border-color: var(--hbp-green-accent);
  color: var(--hbp-green-900);
  border-radius: 999px;
  font-weight: 700;
}
.btn-hbp-accent:hover, .btn-hbp-accent:focus {
  background-color: var(--hbp-green-accent-hover);
  border-color: var(--hbp-green-accent-hover);
  color: var(--hbp-green-900);
}
.form-control, .form-select {
  border-radius: 0.75rem;
  padding: 0.65rem 0.9rem;
}
.card-soft {
  background: var(--hbp-bg-soft);
  border: none;
  border-radius: 1rem;
}
.card-dark {
  background: var(--hbp-green-900);
  color: #fff;
  border-radius: 1rem;
}
.card-dark .text-muted { color: rgba(255,255,255,0.65) !important; }

/* ---------------------------------------------------------------
   A) Split-screen auth layout (Login)
--------------------------------------------------------------- */
.split-shell {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
}
.split-panel-hero {
  flex: 1 1 420px;
  background: var(--hbp-green-900);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 3.5rem;
  min-width: 0;
}
.split-panel-form {
  flex: 1.2 1 480px;
  background: var(--hbp-bg);
  display: flex;
  align-items: center;
  padding: 3rem 2rem;
  min-width: 0;
}
.split-panel-form > div {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
.split-hero-title {
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
}
.split-hero-title .accent { color: var(--hbp-green-accent); }

@media (max-width: 767.98px) {
  .split-panel-hero { padding: 2rem 1.5rem; }
  .split-panel-form { padding: 2rem 1.25rem; }
}

/* ---------------------------------------------------------------
   B) Two-column content page (Daftar Brand)
--------------------------------------------------------------- */
.content-shell {
  min-height: 100vh;
  padding: 2rem 1.25rem;
}
.content-shell-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------
   C) Centered card (Lupa Password, Aktivasi Akun, dst.)
--------------------------------------------------------------- */
.centered-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.centered-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ---------------------------------------------------------------
   Authenticated app shell (shared shape, different palette per side)
--------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  color: #fff;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
  padding: 1.75rem 1.25rem;
  transition: transform 0.2s ease-in-out;
  z-index: 1040;
}
.app-sidebar.brand-theme { background: var(--hbp-green-900); }
.app-sidebar.admin-theme { background: var(--admin-900); }

.app-sidebar .nav-link {
  color: rgba(255,255,255,0.85);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-weight: 600;
}
.app-sidebar.brand-theme .nav-link.active { background: var(--hbp-green-accent); color: var(--hbp-green-900); }
.app-sidebar.brand-theme .nav-link:hover:not(.active) { background: rgba(255,255,255,0.08); }
.app-sidebar.admin-theme .nav-link.active { background: var(--admin-accent); color: #fff; }
.app-sidebar.admin-theme .nav-link:hover:not(.active) { background: rgba(255,255,255,0.08); }

.app-main { flex-grow: 1; margin-left: var(--sidebar-width); min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  background: #fff;
  border-bottom: 1px solid var(--hbp-border);
  position: sticky; top: 0; z-index: 1020;
  padding: 1rem 1.5rem;
}
.app-content { padding: 1.5rem; flex-grow: 1; min-width: 0; }
.app-content.admin-bg { background: var(--admin-bg); }

.avatar-circle {
  width: 40px; height: 40px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--hbp-green-900); color: #fff; font-weight: 700; font-size: 0.85rem;
}

.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1030; }

@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.show { transform: translateX(0); }
  .app-main { margin-left: 0; }
  body.sidebar-open .sidebar-backdrop { display: block; }
}
@media (max-width: 575.98px) {
  .app-content { padding: 0.9rem; }
  .centered-card { padding: 1.75rem 1.25rem; }
}

.table-responsive-card { overflow-x: auto; }

/* FAQ accordion */
.faq-item > summary { cursor: pointer; list-style: none; }
.faq-item > summary::-webkit-details-marker { display: none; }

/* ---------------------------------------------------------------
   Landing page hero/sections (moved out of an inline <style> block --
   CSP's style-src has no 'unsafe-inline', see docs/SECURITY.md)
--------------------------------------------------------------- */
.hero-banner {
  background: linear-gradient(135deg, #0a2e17 0%, var(--hbp-green-900) 60%);
  color: #fff;
  padding: 4rem 1.5rem;
  border-radius: 0 0 2rem 2rem;
}
.hero-title { font-weight: 800; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.1; }
.hero-title .accent { color: var(--hbp-green-accent); }
.step-circle {
  width: 48px; height: 48px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(139,239,53,0.15); color: var(--hbp-green-accent); font-weight: 800;
  border: 1px solid var(--hbp-green-accent);
}
.cara-kerja-section { background: var(--hbp-green-900); color: #fff; padding: 4rem 1.5rem; }
.benefit-card { border: 1px solid var(--hbp-border); border-radius: 1rem; padding: 1.75rem; height: 100%; }
.benefit-icon {
  width: 48px; height: 48px; border-radius: 0.75rem; background: var(--hbp-bg-soft);
  display: inline-flex; align-items: center; justify-content: center; color: var(--hbp-green-700);
  font-size: 1.25rem; margin-bottom: 1rem;
}

/* ---------------------------------------------------------------
   Inline-style replacements (CSP: style-src has no 'unsafe-inline',
   so every style="..." attribute must instead be a class here)
--------------------------------------------------------------- */
.bg-admin-accent { background: var(--admin-accent); }
.bg-admin-accent-white { background: var(--admin-accent); color: #fff; }
.bg-admin { background: var(--admin-bg); }
.bg-hbp-900 { background: var(--hbp-green-900); }
.bg-hbp-900-solid { background: var(--hbp-green-900); color: #fff; border-color: var(--hbp-green-900); }
.bg-hbp-soft { background: var(--hbp-bg-soft); }
.bg-hbp-accent-text-900 { background: var(--hbp-green-accent); color: var(--hbp-green-900); }
.bg-white-10-text-accent { background: rgba(255,255,255,0.1); color: var(--hbp-green-accent); }
.badge-accent-soft { background: rgba(139,239,53,0.15); color: var(--hbp-green-accent); letter-spacing: .05em; }
.text-hbp-accent { color: var(--hbp-green-accent); }
.text-hbp-900 { color: var(--hbp-green-900); }

.opacity-80 { opacity: .8; }
.opacity-60 { opacity: .6; }

.fs-2rem { font-size: 2rem; }
.fs-2-5rem { font-size: 2.5rem; }

.w-10em { width: 10em; }
.w-12em { width: 12em; }
.w-15em { width: 15em; }
.min-w-220 { min-width: 220px; }
.mw-180 { max-width: 180px; }
.mw-280 { max-width: 280px; }
.mw-420-op85 { max-width: 420px; opacity: .85; }
.mw-480-op85 { max-width: 480px; opacity: .85; }
.mw-560-op85 { max-width: 560px; opacity: .85; }

.icon-box-42 { width: 42px; height: 42px; flex-shrink: 0; }
.icon-box-56 { width: 56px; height: 56px; font-size: 1.1rem; }
.icon-box-72 { width: 72px; height: 72px; background: var(--hbp-bg-soft); }
.icon-box-96-bordered { width: 96px; height: 96px; border: 2px solid var(--hbp-green-accent); }

.pos-abs-inset { position: absolute; bottom: 1.75rem; left: 1.25rem; right: 1.25rem; }
