:root {
  --bni-navy: #0B1C2C;
  --bni-navy-soft: #132536;
  --bni-gold: #D4A017;
  --bni-gold-hover: #E6B422;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --info: #2563EB;
  --sidebar-width: 260px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --font: "Be Vietnam Pro", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: linear-gradient(180deg, #F1F5F9 0%, var(--bg) 40%, #EEF2FF 100%);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
.btn-bni {
  background: var(--bni-gold);
  border-color: var(--bni-gold);
  color: #111;
  font-weight: 600;
}
.btn-bni:hover { background: var(--bni-gold-hover); border-color: var(--bni-gold-hover); color: #111; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--bni-navy) 0%, #07131D 100%);
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  padding: 1.25rem 1rem;
  overflow-y: auto;
  transition: transform .25s ease;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .75rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 1rem;
}
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--bni-gold); color: #111;
  display: grid; place-items: center; font-weight: 800;
}
.brand-logo {
  width: 46px !important;
  height: 46px !important;
  max-width: 46px !important;
  max-height: 46px !important;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  padding: 3px;
  flex-shrink: 0;
  display: block;
}
.topbar-logo {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 2px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.topbar img {
  max-height: 36px;
  width: auto;
}
.brand-text { font-weight: 700; letter-spacing: .02em; line-height: 1.2; }
.brand-text small { display: block; font-weight: 400; opacity: .7; font-size: .75rem; }

.nav-link-app {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem .85rem; border-radius: 10px;
  color: rgba(255,255,255,.78); margin-bottom: .25rem;
}
.nav-link-app:hover, .nav-link-app.active {
  background: rgba(212,160,23,.15);
  color: #fff;
}
.nav-section {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.45); margin: 1rem .85rem .4rem;
}

.main-wrap {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
}
.topbar {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: .85rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.content { padding: 1.25rem; }

.card-soft {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat-card {
  padding: 1.1rem 1.2rem;
  height: 100%;
}
.stat-label { color: var(--muted); font-size: .85rem; margin-bottom: .35rem; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--bni-navy); }
.badge-status {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
}
.badge-DRAFT { background: #E2E8F0; color: #334155; }
.badge-UPCOMING { background: #DBEAFE; color: #1D4ED8; }
.badge-LIVE { background: #DCFCE7; color: #15803D; }
.badge-COMPLETED { background: #E0E7FF; color: #4338CA; }
.badge-CANCELLED { background: #FEE2E2; color: #B91C1C; }
.badge-PRESENT { background: #DCFCE7; color: #15803D; }
.badge-ABSENT { background: #FEE2E2; color: #B91C1C; }
.badge-LATE { background: #FEF3C7; color: #B45309; }
.badge-ONLINE { background: #DBEAFE; color: #1D4ED8; }
.badge-INVITED { background: #E0E7FF; color: #4338CA; }
.badge-CONFIRMED { background: #DBEAFE; color: #1D4ED8; }
.badge-ATTENDED { background: #DCFCE7; color: #15803D; }
.badge-NO_SHOW { background: #FEE2E2; color: #B91C1C; }
.badge-FOLLOWED_UP { background: #F1F5F9; color: #475569; }
.badge-LOW { background: #F1F5F9; color: #475569; }
.badge-MEDIUM { background: #DBEAFE; color: #1D4ED8; }
.badge-HIGH { background: #FEF3C7; color: #B45309; }
.badge-URGENT { background: #FEE2E2; color: #B91C1C; }
.badge-TODO { background: #FEF3C7; color: #B45309; }
.badge-IN_PROGRESS { background: #DBEAFE; color: #1D4ED8; }
.badge-DONE { background: #DCFCE7; color: #15803D; }
.badge-NORMAL { background: #F1F5F9; color: #475569; }
.badge-IMPORTANT { background: #FEF3C7; color: #B45309; }
.badge-MEMBER_OF_THE_WEEK,.badge-BEST_PRESENTATION,.badge-MOST_SUPPORTIVE,.badge-VISITOR_CHAMPION { background: #FEF3C7; color: #92400E; }


.check-item { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.check-item:last-child { border-bottom: 0; }
.check-ok { color: var(--success); font-weight: 700; }
.check-no { color: var(--muted); }

.agenda-item {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: .9rem 1rem; margin-bottom: .65rem; cursor: grab;
}
.agenda-item.dragging { opacity: .5; }
.login-page {
  min-height: 100vh;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at top right, rgba(212,160,23,.25), transparent 40%),
    linear-gradient(135deg, #0B1C2C 0%, #132536 50%, #0B1C2C 100%);
  padding: 1.5rem;
}
.login-card {
  width: 100%; max-width: 420px;
  background: #fff; border-radius: 20px; padding: 2rem;
  box-shadow: 0 30px 60px rgba(0,0,0,.25);
}
.login-brand { text-align: center; margin-bottom: 1.5rem; }
.login-logo {
  width: 88px !important;
  height: 88px !important;
  max-width: 88px !important;
  max-height: 88px !important;
  margin: 0 auto .75rem;
  display: block;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.login-brand .mark {
  width: 64px; height: 64px; margin: 0 auto .75rem; border-radius: 18px;
  background: var(--bni-gold); display: grid; place-items: center;
  font-weight: 800; font-size: 1.4rem; color: #111;
}

.table > :not(caption) > * > * { vertical-align: middle; }
.avatar-circle {
  width: 42px; height: 42px; border-radius: 50%;
  background: #FEF3C7; color: #92400E;
  display: grid; place-items: center; font-weight: 700;
  overflow: hidden; flex-shrink: 0;
}
.avatar-img { object-fit: cover; padding: 0; display: block; }
.profile-hero {
  background: linear-gradient(135deg, var(--bni-navy), #1e3a5f);
  color: #fff; border-radius: var(--radius); padding: 1.75rem;
}
.profile-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; border: 3px solid rgba(255,255,255,.35);
  flex-shrink: 0; background: #fff;
}
.profile-avatar-fallback {
  display: grid; place-items: center;
  background: var(--bni-gold); color: #111; font-weight: 800; font-size: 2rem;
}
.member-media-preview {
  width: 140px; height: 140px; border-radius: 12px;
  border: 1px solid var(--border); background: #f8fafc;
  overflow: hidden; display: grid; place-items: center; flex-shrink: 0;
}
.member-media-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member-media-preview-logo { width: 160px; height: 90px; }
.member-media-preview-logo img { object-fit: contain; background: #fff; padding: 6px; }
.member-media-empty {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-weight: 800; color: #94a3b8; font-size: 1.6rem; background: #eef2f7;
}
.member-account-form .card-soft h2 { color: var(--bni-navy); }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .sidebar-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1035;
  }
  .sidebar-backdrop.show { display: block; }
}
