:root {
  --bc-green: #0fb37f;
  --bc-green-light: #e6f9f2;
  --bc-cyan: #06a6c4;
  --bc-navy: #10141c;
  --bc-navy-soft: #1c202c;
  --bc-bg: #f4f7f6;
  --bc-border: #e3e8e6;
}

body {
  background: var(--bc-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Layout shell ---------- */
#app-shell {
  display: flex;
  min-height: 100vh;
}

#sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--bc-navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

#sidebar .brand-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

#sidebar .brand-area img {
  width: 30px;
  height: 30px;
}

#sidebar .brand-area span {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}

.nav-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.15s, color 0.15s;
}

.nav-item-link i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}

.nav-item-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item-link.active {
  background: var(--bc-green);
  color: #06231a;
}

#sidebar .sidebar-footer {
  padding: 14px 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 14px;
}

#sidebar .sidebar-footer .staff-email {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  word-break: break-all;
}

#sidebar .sidebar-footer a {
  color: #ff8a8a;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
}

#content-area {
  flex: 1;
  padding: 28px 32px;
  max-width: 1400px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.topbar h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--bc-navy);
  margin: 0;
}

/* ---------- Cards ---------- */
.card-clean {
  background: #fff;
  border: 1px solid var(--bc-border);
  border-radius: 16px;
}

.metric-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.bg-bc-green-subtle { background: var(--bc-green-light); color: var(--bc-green); }
.text-bc-green { color: var(--bc-green); }
.bg-bc-cyan-subtle { background: #e5f8fb; color: var(--bc-cyan); }

/* ---------- Tables ---------- */
.table-clean thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  border-bottom: 1px solid var(--bc-border);
  font-weight: 700;
}

.table-clean tbody td {
  border-bottom: 1px solid var(--bc-border);
  vertical-align: middle;
}

/* ---------- Login screen ---------- */
#login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--bc-navy) 0%, var(--bc-navy-soft) 100%);
}

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-card img {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
}

/* ---------- Toasts ---------- */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bc-toast {
  min-width: 260px;
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  animation: bc-toast-in 0.2s ease-out;
}

@keyframes bc-toast-in {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.bc-toast-success { background: #0fb37f; }
.bc-toast-danger { background: #e0554f; }
.bc-toast-info { background: #2b6cb0; }

.page-fade-in {
  animation: bc-fade-in 0.25s ease-out;
}

@keyframes bc-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
