:root {
  --kbc-primary: #b5495b;
  --kbc-primary-dark: #8f3547;
  --kbc-accent: #e8a798;
  --kbc-bg: #f7f3f2;
  --kbc-sidebar: #2f2130;
  --kbc-sidebar-active: #b5495b;
  --kbc-text-muted: #7a6f6d;
}

* { box-sizing: border-box; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--kbc-bg);
  color: #34282a;
  margin: 0;
}

/* ---------- Auth pages ---------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #b5495b 0%, #6a3243 100%);
  padding: 20px;
}
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.auth-card .auth-icon {
  width: 56px; height: 56px;
  background: var(--kbc-primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin: 0 auto 16px;
}
.auth-card h1 { font-size: 1.25rem; font-weight: 600; text-align: center; margin-bottom: 2px;}
.auth-card p.sub { text-align: center; color: var(--kbc-text-muted); font-size: .875rem; margin-bottom: 24px;}

/* ---------- App layout ---------- */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--kbc-sidebar);
  color: #fff;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand i { font-size: 26px; color: var(--kbc-accent); }
.brand-title { font-weight: 700; font-size: 1rem; line-height: 1.1; }
.brand-sub { font-size: .72rem; color: #cbb9c0; }

.sidebar-nav { padding: 14px 10px; }
.sidebar-nav .nav-link {
  color: #d9cdd2;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .9rem;
  margin-bottom: 2px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-nav .nav-link i { font-size: 1.05rem; width: 18px; text-align: center; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link[aria-current="page"] { background: var(--kbc-sidebar-active); color: #fff; }

.main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: #fff;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid #eee;
  position: sticky; top: 0; z-index: 10;
}
.page-title { font-size: 1.15rem; font-weight: 600; margin: 0; flex: 1; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: .9rem; }

.page-body { padding: 24px; flex: 1; }
.page-footer { text-align: center; font-size: .78rem; color: var(--kbc-text-muted); padding: 16px; }

/* ---------- Cards / widgets ---------- */
.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #f0e6e6;
  box-shadow: 0 4px 14px rgba(181,73,91,.06);
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; color: var(--kbc-primary-dark); }
.stat-card .stat-label { color: var(--kbc-text-muted); font-size: .85rem; }
.stat-card i.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: #fbeaea; color: var(--kbc-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 10px;
}

.card { border-radius: 14px; border: 1px solid #f0e6e6; }
.card-header { background: #fff; border-bottom: 1px solid #f0e6e6; font-weight: 600; border-radius: 14px 14px 0 0 !important; }

.btn-primary { background: var(--kbc-primary); border-color: var(--kbc-primary); }
.btn-primary:hover { background: var(--kbc-primary-dark); border-color: var(--kbc-primary-dark); }
.text-primary-kbc { color: var(--kbc-primary) !important; }

.table thead th { font-size: .8rem; text-transform: uppercase; color: var(--kbc-text-muted); border-bottom-width: 1px; }

.panca-badge {
  display: inline-block;
  background: #fbeaea;
  color: var(--kbc-primary-dark);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .76rem;
  margin: 2px 3px 2px 0;
}

.form-section-title {
  font-weight: 600;
  color: var(--kbc-primary-dark);
  margin: 22px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #fbeaea;
}
.form-section-title:first-child { margin-top: 0; }

@media (max-width: 991px) {
  .sidebar { position: fixed; left: -260px; z-index: 1000; transition: left .2s; height: 100vh; }
  .sidebar.show { left: 0; }
}
