/* ============================================================
   CREB Admin — dashboard theme
   DARK sidebar + LIGHT content. Brand: deep blue #1C50A1, sky #65A9DC
   ============================================================ */
:root {
  --sb-w: 264px;
  --brand: #1C50A1;
  --brand-deep: #15356d;
  --brand-sky: #65A9DC;
  /* dark sidebar */
  --sidebar: #0f1a2e;
  --sidebar-deep: #0a1322;
  /* light content */
  --ink: #18222f;
  --muted: #6b7889;
  --bg: #eef2f7;
  --card: #ffffff;
  --line: #e3e9f1;
  --topbar-h: 60px;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", system-ui, "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
}

/* ---- Shell layout ---- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* ---- Sidebar (DARK) ---- */
.admin-sidebar {
  width: var(--sb-w);
  background: linear-gradient(185deg, var(--sidebar) 0%, var(--sidebar-deep) 100%);
  color: #aebacb;
  display: flex; flex-direction: column; border: 0;
}
.admin-sidebar .sb-brand {
  display: flex; align-items: center; gap: 10px;
  height: var(--topbar-h); padding: 0 20px;
  color: #fff; font-weight: 800; font-size: 1.18rem; letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10); text-decoration: none;
}
.admin-sidebar .sb-brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand-sky); box-shadow: 0 0 12px 2px rgba(101, 169, 220, 0.7);
}
.admin-sidebar .sb-nav { padding: 16px 12px; overflow-y: auto; flex: 1; }
.admin-sidebar .sb-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(174, 186, 203, 0.45); padding: 16px 12px 6px;
}
.admin-sidebar .sb-link {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; margin: 3px 0;
  color: #b8c4d6; text-decoration: none;
  border-radius: 10px; font-weight: 500; font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.admin-sidebar .sb-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

/* selected effect: filled gradient pill + glow + dot indicator */
.admin-sidebar .sb-link.active {
  background: linear-gradient(135deg, #2b6fd0 0%, var(--brand) 100%);
  color: #fff; font-weight: 700;
  box-shadow: 0 8px 20px -6px rgba(101, 169, 220, 0.55),
    inset 0 0 0 1px rgba(101, 169, 220, 0.45);
}
.admin-sidebar .sb-link.active::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-sky); box-shadow: 0 0 8px 1px var(--brand-sky);
  margin-right: 2px;
}

/* ---- Topbar (LIGHT) ---- */
.admin-topbar {
  height: var(--topbar-h);
  background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 18px;
  position: sticky; top: 0; z-index: 1020;
}
.admin-topbar .tb-toggle {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
}
.admin-topbar .tb-toggle:hover { background: #f1f5fa; }
.admin-topbar .tb-title { font-weight: 700; color: var(--ink); }
.admin-topbar .tb-spacer { flex: 1; }
.admin-topbar .tb-user { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.admin-topbar .tb-user .who { color: var(--ink); font-weight: 600; }
.admin-topbar .tb-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-sky), var(--brand));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}

/* ---- Content area (LIGHT) ---- */
.admin-content { padding: 26px 26px 60px; }
.admin-content > .container,
.admin-content > .container-fluid { padding-left: 0; padding-right: 0; max-width: 1180px; }
.admin-content h1 { font-weight: 800; letter-spacing: -0.02em; }

.admin-content .table {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 40, 80, 0.04), 0 6px 18px rgba(20, 40, 80, 0.05);
}
.admin-content .table thead th {
  background: #f6f9fc; color: var(--muted);
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.admin-content .card {
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(20, 40, 80, 0.04), 0 6px 18px rgba(20, 40, 80, 0.05);
}
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }

/* ---- Desktop collapse (drawer hides, content expands) ---- */
@media (min-width: 992px) {
  .admin-shell.sidebar-collapsed .admin-sidebar { display: none; }
}
/* ---- Mobile: Bootstrap offcanvas slides the dark sidebar in ---- */
@media (max-width: 991.98px) {
  .admin-content { padding: 18px 16px 48px; }
}
