:root {
  --bm-teal:        #0F766E;
  --bm-teal-deep:   #134E4A;
  --bm-teal-soft:   #CCFBF1;
  --bm-peach:       #FFB59E;
  --bm-peach-deep:  #F08A6B;
  --bm-cream:       #FFF7ED;
  --bm-cream-deep:  #FBE9D0;
  --bm-ink:         #0B1220;
  --bm-slate:       #1F2937;
  --bm-line:        #E5E7EB;
  --bm-line-2:      #F1F5F9;
  --bm-danger:      #B91C1C;
  --bm-success:     #15803D;
  --bm-warn:        #B45309;
  --bm-white:       #FFFFFF;

  --bm-r-sm: 8px;
  --bm-r:    12px;
  --bm-r-lg: 18px;
  --bm-r-xl: 24px;

  --bm-shadow-sm: 0 1px 2px rgba(11,18,32,.06);
  --bm-shadow:    0 4px 14px rgba(11,18,32,.08);
  --bm-shadow-lg: 0 18px 40px rgba(11,18,32,.18);

  --bm-sidebar-w: 248px;
  --bm-topbar-h:  64px;
  --bm-bottomnav-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--bm-ink);
  background: linear-gradient(180deg, var(--bm-cream) 0%, #FFFFFF 60%);
  min-height: 100vh;
  font-size: clamp(14px, 0.45vw + 13px, 16px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: "Inter Tight", "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--bm-ink);
  letter-spacing: -0.01em;
  margin: 0 0 .5rem 0;
  font-weight: 700;
}
h1 { font-size: clamp(22px, 1.4vw + 16px, 32px); }
h2 { font-size: clamp(18px, 1.0vw + 14px, 24px); }
h3 { font-size: clamp(16px, 0.6vw + 14px, 19px); }
p  { margin: 0 0 .8em 0; color: var(--bm-slate); }
a  { color: var(--bm-teal-deep); text-decoration: none; }
a:hover { color: var(--bm-teal); text-decoration: underline; }

/* -------- Layout chrome ------------------------------------------------ */
.bm-app { padding-top: var(--bm-topbar-h); }
.bm-no-chrome { padding-top: 0; }
.bm-page {
  margin-left: var(--bm-sidebar-w);
  padding: 24px clamp(16px, 3vw, 40px) 80px;
  min-height: calc(100vh - var(--bm-topbar-h));
}
.bm-page-blank { margin-left: 0; padding: 0; min-height: 100vh; }

/* -------- Topbar ------------------------------------------------------- */
.bm-topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--bm-topbar-h);
  background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--bm-line);
  display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(12px, 2vw, 24px);
  z-index: 40;
}
.bm-brand { display: flex; align-items: center; gap: 10px; color: var(--bm-ink); text-decoration: none; }
.bm-brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--bm-teal) 0%, var(--bm-teal-deep) 100%);
  color: #fff; display: grid; place-items: center; font-weight: 800;
  box-shadow: inset 0 -6px 12px rgba(255,255,255,.15);
}
.bm-brand-mark span { font-family: "Inter Tight", sans-serif; font-size: 16px; letter-spacing: -.02em; }
.bm-brand-text { font-weight: 700; color: var(--bm-ink); }
.bm-topbar-search { flex: 1; max-width: 520px; margin-left: 8px; }
.bm-topbar-search input {
  width: 100%; height: 40px; border-radius: 999px;
  border: 1px solid var(--bm-line); background: #fff;
  padding: 0 16px; font: inherit; color: var(--bm-ink);
  transition: border-color .15s, box-shadow .15s;
}
.bm-topbar-search input::placeholder { color: #94A3B8; }
.bm-topbar-search input:focus { outline: none; border-color: var(--bm-teal); box-shadow: 0 0 0 4px rgba(15,118,110,.12); }
.bm-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; }

.bm-iconbtn {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid transparent;
  color: var(--bm-slate); cursor: pointer; position: relative;
  transition: background .15s, border-color .15s, color .15s;
}
.bm-iconbtn:hover { background: var(--bm-cream); color: var(--bm-teal-deep); border-color: var(--bm-cream-deep); }
.bm-bell-badge {
  position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--bm-peach-deep); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1;
}

.bm-profile { position: relative; }
.bm-profile-btn {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px;
  border-radius: 999px; border: 1px solid var(--bm-line); background: #fff;
  cursor: pointer; color: var(--bm-ink); font: inherit;
}
.bm-profile-btn:hover { border-color: var(--bm-cream-deep); background: var(--bm-cream); }
.bm-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--bm-peach), var(--bm-peach-deep));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.bm-profile-name { font-weight: 600; }
.bm-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--bm-line); border-radius: 14px;
  box-shadow: var(--bm-shadow-lg); padding: 6px; list-style: none; margin: 0;
  display: none; z-index: 50;
}
.bm-profile.is-open .bm-menu { display: block; }
.bm-menu li a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--bm-ink); }
.bm-menu li a:hover { background: var(--bm-cream); text-decoration: none; }
.bm-menu-sep { height: 1px; background: var(--bm-line); margin: 4px 6px; }

/* -------- Sidebar ------------------------------------------------------ */
.bm-sidebar {
  position: fixed; top: var(--bm-topbar-h); left: 0; bottom: 0;
  width: var(--bm-sidebar-w);
  background: #fff; border-right: 1px solid var(--bm-line);
  padding: 16px 12px; display: flex; flex-direction: column; gap: 12px;
  z-index: 30;
}
.bm-sidenav { display: flex; flex-direction: column; gap: 2px; }
.bm-sidenav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--bm-slate); font-weight: 600;
  position: relative;
}
.bm-sidenav-item:hover { background: var(--bm-cream); color: var(--bm-teal-deep); text-decoration: none; }
.bm-sidenav-item.is-active { background: linear-gradient(90deg, rgba(255,181,158,.18), transparent 70%); color: var(--bm-teal-deep); }
.bm-sidenav-item.is-active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px;
  background: var(--bm-teal); border-radius: 0 4px 4px 0;
}
.bm-sidenav-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--bm-cream-deep);
  box-shadow: inset 0 0 0 2px #fff;
}
.bm-sidenav-item.is-active .bm-sidenav-dot { background: var(--bm-teal); }
.bm-sidebar-foot { margin-top: auto; }
.bm-sidebar-role {
  display: inline-flex; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.bm-role-admin  { background: var(--bm-teal); color: #fff; }
.bm-role-user   { background: var(--bm-cream-deep); color: var(--bm-teal-deep); }
.bm-role-client { background: var(--bm-peach); color: var(--bm-ink); }

/* -------- Bottom nav (mobile) ----------------------------------------- */
.bm-bottomnav { display: none; }
@media (max-width: 1023px) {
  .bm-sidebar { transform: translateX(-110%); transition: transform .2s; box-shadow: var(--bm-shadow-lg); }
  .bm-sidebar.is-open { transform: translateX(0); }
  .bm-page { margin-left: 0; }
}
@media (max-width: 639px) {
  .bm-topbar-search { display: none; }
  .bm-bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0;
    height: var(--bm-bottomnav-h);
    background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--bm-line);
    z-index: 50; padding: 6px 8px env(safe-area-inset-bottom, 6px);
    justify-content: space-around;
  }
  .bm-bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--bm-slate); font-size: 11px; font-weight: 600;
    padding: 4px 6px; border-radius: 12px;
  }
  .bm-bn-item:hover { color: var(--bm-teal-deep); text-decoration: none; }
  .bm-bn-item.is-active { color: var(--bm-teal-deep); background: var(--bm-cream); }
  .bm-bn-cta { margin-top: -22px; }
  .bm-bn-cta-bubble {
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, var(--bm-teal), var(--bm-teal-deep));
    color: #fff; display: grid; place-items: center;
    font-size: 26px; font-weight: 600;
    box-shadow: var(--bm-shadow-lg);
  }
  .bm-page { padding-bottom: calc(var(--bm-bottomnav-h) + 24px); }
}
.bm-only-mobile { display: none; }
@media (max-width: 1023px) { .bm-only-mobile { display: inline-grid; } }

/* -------- Buttons ----------------------------------------------------- */
.bm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px;
  font: inherit; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; background: var(--bm-cream); color: var(--bm-ink);
  transition: transform .05s, background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.bm-btn:hover { background: var(--bm-cream-deep); }
.bm-btn:active { transform: translateY(1px); }
.bm-btn-primary { background: linear-gradient(135deg, var(--bm-teal), var(--bm-teal-deep)); color: #fff; box-shadow: var(--bm-shadow-sm); }
.bm-btn-primary:hover { filter: brightness(1.05); background: linear-gradient(135deg, var(--bm-teal), var(--bm-teal-deep)); }
.bm-btn-ghost   { background: transparent; border-color: var(--bm-line); }
.bm-btn-ghost:hover { background: var(--bm-cream); }
.bm-btn-danger  { background: var(--bm-danger); color: #fff; }
.bm-btn-block   { width: 100%; }
.bm-btn-sm      { height: 34px; padding: 0 14px; border-radius: 10px; font-size: 13px; }

/* -------- Forms ------------------------------------------------------- */
.bm-field { display: block; margin-bottom: 14px; }
.bm-field > label {
  display: block; font-weight: 600; color: var(--bm-ink); margin-bottom: 6px; font-size: 14px;
}
.bm-input, .bm-textarea, .bm-select {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--bm-line); border-radius: 12px; background: #fff;
  font: inherit; color: var(--bm-ink);
  transition: border-color .15s, box-shadow .15s;
}
.bm-textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 96px; }
.bm-input:focus, .bm-textarea:focus, .bm-select:focus {
  outline: none; border-color: var(--bm-teal); box-shadow: 0 0 0 4px rgba(15,118,110,.12);
}
.bm-hint { color: var(--bm-slate); font-size: 13px; }
.bm-error { color: var(--bm-danger); font-size: 13px; font-weight: 600; margin-top: 4px; }
.bm-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* -------- Cards / empty / 404 ---------------------------------------- */
.bm-card {
  background: #fff; border: 1px solid var(--bm-line); border-radius: var(--bm-r-lg);
  box-shadow: var(--bm-shadow-sm); padding: 22px;
}
.bm-card-pad-sm { padding: 14px; }
.bm-card-pad-lg { padding: 28px; }
.bm-card-warn   { border-color: var(--bm-peach); background: linear-gradient(180deg, var(--bm-cream) 0%, #fff 80%); }
.bm-empty {
  display: grid; place-items: center; gap: 14px; padding: 60px 20px; text-align: center;
}
.bm-empty h1 { font-size: clamp(36px, 4vw + 16px, 64px); margin: 0; color: var(--bm-teal-deep); }
.bm-404, .bm-403 { padding-top: 40px; }

/* -------- Flash ------------------------------------------------------- */
.bm-flash {
  padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 600;
  border: 1px solid transparent;
}
.bm-flash-ok    { background: #DCFCE7; border-color: #BBF7D0; color: var(--bm-success); }
.bm-flash-warn  { background: #FEF3C7; border-color: #FDE68A; color: var(--bm-warn); }
.bm-flash-err   { background: #FEE2E2; border-color: #FECACA; color: var(--bm-danger); }

/* -------- Toasts ------------------------------------------------------ */
.bm-toast-stack {
  position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px;
  z-index: 1000; max-width: min(92vw, 380px);
}
@media (max-width: 639px) { .bm-toast-stack { bottom: calc(var(--bm-bottomnav-h) + 12px); right: 12px; left: 12px; } }
.bm-toast {
  background: #fff; color: var(--bm-ink); border: 1px solid var(--bm-line);
  border-left: 4px solid var(--bm-teal);
  padding: 12px 14px; border-radius: 12px; box-shadow: var(--bm-shadow-lg);
  display: flex; gap: 10px; align-items: flex-start; animation: bm-toast-in .18s ease-out;
}
.bm-toast.is-out { animation: bm-toast-out .2s ease-in forwards; }
.bm-toast-ok    { border-left-color: var(--bm-success); }
.bm-toast-err   { border-left-color: var(--bm-danger); }
.bm-toast-warn  { border-left-color: var(--bm-warn); }
.bm-toast-info  { border-left-color: var(--bm-teal); }
.bm-toast-msg  { flex: 1; font-weight: 600; }
.bm-toast-close { background: none; border: 0; cursor: pointer; color: var(--bm-slate); font-size: 18px; line-height: 1; }
@keyframes bm-toast-in  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bm-toast-out { to   { opacity: 0; transform: translateY(8px); } }

/* -------- Modal ------------------------------------------------------- */
.bm-modal-root { position: fixed; inset: 0; pointer-events: none; z-index: 900; }
.bm-modal-root.is-open { pointer-events: auto; }
.bm-modal-backdrop {
  position: absolute; inset: 0; background: rgba(11,18,32,.45); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .15s;
}
.bm-modal-root.is-open .bm-modal-backdrop { opacity: 1; }
.bm-modal {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.97);
  background: #fff; border-radius: var(--bm-r-xl);
  width: min(92vw, 520px); max-height: 88vh; overflow: auto;
  box-shadow: var(--bm-shadow-lg); border: 1px solid var(--bm-line);
  opacity: 0; transition: opacity .15s, transform .15s;
}
.bm-modal-root.is-open .bm-modal { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.bm-modal-head { padding: 18px 22px; border-bottom: 1px solid var(--bm-line); display: flex; align-items: center; gap: 12px; }
.bm-modal-head h3 { margin: 0; flex: 1; }
.bm-modal-body { padding: 20px 22px; }
.bm-modal-foot { padding: 14px 22px; border-top: 1px solid var(--bm-line); display: flex; gap: 10px; justify-content: flex-end; }

/* -------- Auth shell -------------------------------------------------- */
.bm-auth {
  min-height: 100vh; display: grid; grid-template-columns: 1fr; place-items: center;
  background:
    radial-gradient(80% 60% at 10% 0%, rgba(255,181,158,.45), transparent 60%),
    radial-gradient(60% 50% at 90% 100%, rgba(15,118,110,.18), transparent 60%),
    linear-gradient(180deg, var(--bm-cream) 0%, #fff 100%);
  padding: 24px;
}
.bm-auth-card {
  width: 100%; max-width: 420px;
  background: #fff; border: 1px solid var(--bm-line); border-radius: var(--bm-r-xl);
  box-shadow: var(--bm-shadow-lg); padding: 28px;
}
.bm-auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.bm-auth h1 { font-size: 26px; margin-bottom: 4px; }
.bm-auth-sub { color: var(--bm-slate); margin-bottom: 22px; }
.bm-auth-foot { margin-top: 18px; text-align: center; color: var(--bm-slate); font-size: 14px; }

/* -------- Utility ----------------------------------------------------- */
.bm-stack    { display: flex; flex-direction: column; gap: 12px; }
.bm-stack-lg { display: flex; flex-direction: column; gap: 22px; }
.bm-mt-2     { margin-top: 12px; } .bm-mt-3 { margin-top: 18px; } .bm-mt-4 { margin-top: 24px; }
.bm-text-center { text-align: center; }
.bm-muted { color: var(--bm-slate); }
.bm-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--bm-cream); color: var(--bm-teal-deep);
}
.bm-grid { display: grid; gap: 16px; }
.bm-grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* -------- Dashboard hero (PRD-1 placeholder UI) ----------------------- */
.bm-hero {
  border-radius: var(--bm-r-xl); padding: clamp(20px, 3vw, 36px);
  background:
    radial-gradient(60% 80% at 90% 10%, rgba(255,181,158,.45), transparent 60%),
    linear-gradient(135deg, var(--bm-teal) 0%, var(--bm-teal-deep) 100%);
  color: #fff; box-shadow: var(--bm-shadow);
}
.bm-hero h1 { color: #fff; }
.bm-hero p  { color: rgba(255,255,255,.85); }
.bm-hero .bm-pill { background: rgba(255,255,255,.18); color: #fff; }

/* -------- Page head + filter bar -------------------------------------- */
.bm-page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.bm-page-head h1 { margin-bottom: 4px; }
.bm-page-head p { margin: 0; max-width: 64ch; }
.bm-page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bm-filterbar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 16px;
}
.bm-filterbar .bm-field { margin-bottom: 0; }
.bm-field-grow { flex: 1; min-width: 220px; }
.bm-label-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.bm-grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.bm-row-tight { gap: 8px; }
.bm-row-between { justify-content: space-between; width: 100%; }
.bm-form-narrow { max-width: 720px; }
.bm-form-foot { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; }

/* -------- Table ------------------------------------------------------- */
.bm-table-wrap { overflow-x: auto; }
.bm-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 14px;
}
.bm-table th, .bm-table td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--bm-line-2);
  vertical-align: middle;
}
.bm-table thead th {
  font-weight: 700; color: var(--bm-slate); font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em;
  background: #fff; position: sticky; top: 0;
}
.bm-table tbody tr:hover { background: var(--bm-cream); }
.bm-col-end { text-align: right; }

/* -------- Pills + avatars -------------------------------------------- */
.bm-pill-ok   { background: #DCFCE7; color: var(--bm-success); }
.bm-pill-mute { background: var(--bm-line-2); color: var(--bm-slate); }
.bm-avatar-sm { width: 24px; height: 24px; border-radius: 50%; font-size: 11px; }

/* -------- Project cards (index grid) --------------------------------- */
.bm-project-card {
  display: block; background: #fff; border: 1px solid var(--bm-line);
  border-radius: var(--bm-r-lg); overflow: hidden; color: var(--bm-ink);
  text-decoration: none; box-shadow: var(--bm-shadow-sm);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.bm-project-card:hover {
  text-decoration: none; transform: translateY(-2px);
  box-shadow: var(--bm-shadow); border-color: var(--bm-cream-deep);
}
.bm-project-stripe { display: block; height: 8px; background: var(--bm-teal); }
.bm-project-body { padding: 16px 18px 18px; }
.bm-project-name { margin: 0 0 6px 0; font-size: 18px; }
.bm-project-desc { margin: 0 0 12px 0; color: var(--bm-slate); font-size: 14px; }
.bm-project-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--bm-ink); }

/* -------- Project header + tabs -------------------------------------- */
.bm-project-head {
  background: #fff; border: 1px solid var(--bm-line); border-radius: var(--bm-r-xl);
  overflow: hidden; box-shadow: var(--bm-shadow-sm);
}
.bm-project-head-bar { height: 10px; background: var(--bm-teal); }
.bm-project-head-inner { padding: 22px clamp(18px, 3vw, 28px) 18px; }
.bm-project-head-inner h1 { margin: 0; }
.bm-project-head-desc { margin: 8px 0 8px 0; max-width: 80ch; color: var(--bm-slate); }
.bm-project-dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--bm-teal);
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--bm-line);
}
.bm-tabs {
  display: flex; gap: 4px; padding: 0 clamp(12px, 2vw, 20px);
  border-top: 1px solid var(--bm-line); background: linear-gradient(180deg, #fff, var(--bm-cream));
}
.bm-tab {
  display: inline-flex; align-items: center; padding: 12px 14px;
  font-weight: 700; color: var(--bm-slate); border-bottom: 3px solid transparent;
  text-decoration: none;
}
.bm-tab:hover { color: var(--bm-teal-deep); text-decoration: none; }
.bm-tab.is-active { color: var(--bm-teal-deep); border-bottom-color: var(--bm-teal); }

/* -------- Card head + definition list -------------------------------- */
.bm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bm-card-head h2 { margin: 0; }
.bm-dl { display: grid; gap: 8px; margin: 0; }
.bm-dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: baseline; }
.bm-dl dt { color: var(--bm-slate); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.bm-dl dd { margin: 0; color: var(--bm-ink); }

/* -------- Labels / swatches ----------------------------------------- */
.bm-label-list { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.bm-label-chip {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  font-weight: 700; font-size: 12px; color: #fff;
  background: var(--bm-teal);
}
.bm-swatch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.bm-swatch {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 12px; border: 2px solid transparent; cursor: pointer;
  background: var(--bm-line-2);
}
.bm-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.bm-swatch-dot {
  width: 22px; height: 22px; border-radius: 50%; background: var(--bm-teal);
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--bm-line);
}
.bm-swatch.is-selected { border-color: var(--bm-teal); background: var(--bm-cream); }
.bm-swatch-inline { display: inline-block; width: 14px; height: 14px; vertical-align: middle; margin-right: 4px; }

/* -------- Members grid (project form) -------------------------------- */
.bm-fieldset {
  border: 1px solid var(--bm-line); border-radius: var(--bm-r); padding: 16px; margin: 0;
}
.bm-fieldset legend { padding: 0 8px; font-weight: 700; color: var(--bm-ink); }
.bm-member-grid {
  display: grid; gap: 8px; grid-template-columns: 1fr; margin-top: 10px;
}
@media (min-width: 720px) { .bm-member-grid { grid-template-columns: 1fr 1fr; } }
.bm-member-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px;
  border: 1px solid var(--bm-line-2); border-radius: 12px; background: #fff;
}
.bm-check { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; }
.bm-check input { position: absolute; opacity: 0; pointer-events: none; }
.bm-check-box {
  width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--bm-line);
  display: inline-grid; place-items: center; background: #fff; flex: 0 0 auto;
}
.bm-check input:checked + .bm-check-box {
  background: var(--bm-teal); border-color: var(--bm-teal);
  box-shadow: inset 0 0 0 3px #fff;
}
.bm-check-label { display: flex; align-items: center; gap: 10px; }
.bm-check-label > span:last-child { display: grid; line-height: 1.2; }
.bm-check-label > span:last-child .bm-muted { font-size: 12px; }
.bm-select-sm { height: 34px; padding: 0 10px; border-radius: 10px; font-size: 13px; }

/* -------- Activity list --------------------------------------------- */
.bm-activity-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bm-activity-item {
  display: grid; grid-template-columns: 12px 1fr; gap: 12px; align-items: start;
  padding: 12px 14px; background: var(--bm-cream); border-radius: 12px;
}
.bm-activity-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--bm-teal); margin-top: 6px;
}
.bm-activity-body { display: grid; gap: 4px; }
.bm-activity-meta { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--bm-slate); word-break: break-all; }
.bm-activity-time { font-size: 12px; }

/* -------- Sidebar: recent projects group ---------------------------- */
.bm-sidegroup { margin-top: 4px; display: flex; flex-direction: column; gap: 6px; }
.bm-sidegroup-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: var(--bm-slate);
}
.bm-sidegroup-add {
  width: 22px; height: 22px; border-radius: 8px; display: inline-grid; place-items: center;
  background: var(--bm-cream); color: var(--bm-teal-deep); font-weight: 700; line-height: 1;
}
.bm-sidegroup-add:hover { background: var(--bm-cream-deep); text-decoration: none; }
.bm-sidegroup-empty { padding: 4px 12px; color: var(--bm-slate); font-size: 13px; margin: 0; }
.bm-sideproject-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.bm-sideproject {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 10px; color: var(--bm-ink);
}
.bm-sideproject:hover { background: var(--bm-cream); text-decoration: none; }
.bm-sideproject.is-active { background: var(--bm-cream); color: var(--bm-teal-deep); }
.bm-sideproject-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bm-teal); flex: 0 0 auto; }
.bm-sideproject-name { flex: 1; font-weight: 600; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bm-sideproject-tag { font-size: 10px; font-weight: 800; color: var(--bm-slate); background: var(--bm-line-2); padding: 2px 6px; border-radius: 6px; }
.bm-sidegroup-foot {
  display: block; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--bm-teal-deep);
}
.bm-sidegroup-foot:hover { text-decoration: underline; }

/* -------- Dashboard recent-projects card ---------------------------- */
.bm-dash-projects { display: flex; flex-direction: column; gap: 12px; }
.bm-dash-project {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--bm-line-2); border-radius: 12px; color: var(--bm-ink);
  background: #fff; transition: background .12s, border-color .12s;
}
.bm-dash-project:hover { background: var(--bm-cream); border-color: var(--bm-cream-deep); text-decoration: none; }
.bm-dash-project-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bm-teal); flex: 0 0 auto; }
.bm-dash-project-body { flex: 1; display: grid; gap: 2px; }
.bm-dash-project-name { font-weight: 700; }
.bm-dash-project-meta { font-size: 12px; color: var(--bm-slate); }

/* -------- Bell dropdown ---------------------------------------------- */
.bm-bell-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: min(92vw, 360px); max-height: 70vh; overflow: auto;
  background: #fff; border: 1px solid var(--bm-line); border-radius: 16px;
  box-shadow: var(--bm-shadow-lg); padding: 8px; display: none; z-index: 60;
}
.bm-bell.is-open + .bm-bell-panel,
.bm-bell-panel.is-open { display: block; }
.bm-bell-head { display: flex; align-items: center; padding: 6px 10px; }
.bm-bell-head h4 { margin: 0; flex: 1; font-size: 14px; }
.bm-bell-item {
  display: block; padding: 10px 12px; border-radius: 10px; color: var(--bm-ink);
  border-bottom: 1px solid var(--bm-line-2);
}
.bm-bell-item:last-child { border-bottom: 0; }
.bm-bell-item:hover { background: var(--bm-cream); text-decoration: none; }
.bm-bell-item .bm-bell-title { font-weight: 700; }
.bm-bell-item .bm-bell-meta  { color: var(--bm-slate); font-size: 12px; margin-top: 2px; }
.bm-bell-item.is-unread       { background: var(--bm-cream); }
.bm-bell-item.is-unread::before {
  content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--bm-peach-deep); margin-right: 8px; vertical-align: middle;
}
.bm-bell-empty { padding: 24px; text-align: center; color: var(--bm-slate); }
.bm-bell-foot {
  border-top: 1px solid var(--bm-line-2);
  padding: 8px 12px; text-align: center; font-size: 13px;
}
.bm-bell-foot a { color: var(--bm-teal-deep); font-weight: 600; }
.bm-bell-badge.is-pulse {
  animation: bm-bell-pulse 380ms ease-out;
}
@keyframes bm-bell-pulse {
  0%   { transform: scale(1);   }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1);   }
}

/* -------- Notifications full-page list ------------------------------- */
.bm-notif-card { padding: 0; overflow: hidden; }
.bm-notif-list { display: flex; flex-direction: column; }
.bm-notif-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--bm-line-2);
  color: var(--bm-ink);
  text-decoration: none;
  transition: background 120ms ease;
}
.bm-notif-row:last-child { border-bottom: 0; }
.bm-notif-row:hover { background: var(--bm-cream); text-decoration: none; }
.bm-notif-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: transparent; margin-top: 6px;
}
.bm-notif-row.is-unread { background: rgba(255, 247, 237, 0.55); }
.bm-notif-row.is-unread .bm-notif-dot { background: var(--bm-peach-deep); }
.bm-notif-row.is-unread .bm-notif-title { font-weight: 800; }
.bm-notif-body { min-width: 0; }
.bm-notif-title { font-weight: 700; font-size: 14px; }
.bm-notif-meta  { color: var(--bm-slate); font-size: 13px; margin-top: 2px; line-height: 1.45; }
.bm-notif-time  { color: var(--bm-slate); font-size: 12px; margin-top: 4px; }
.bm-notif-footer {
  padding: 14px 18px; text-align: center;
  border-top: 1px solid var(--bm-line-2);
}
