:root{
  --mocbt-sky: #0ea5e9;
  --mocbt-sky-dark: #0284c7;
  --mocbt-navy: #0b1220;
  --mocbt-dark: #111827;
  --mocbt-white: #ffffff;
  --mocbt-muted: #64748b;
  --mocbt-border: rgba(148,163,184,.25);
  --mocbt-bg: #f8fafc;
  --mocbt-card: #ffffff;
  --mocbt-text: #0f172a;
  --mocbt-shadow-soft: 0 10px 24px rgba(15,23,42,.08);
  --mocbt-shadow-card-hover: 0 16px 36px rgba(2,132,199,.16);
  --mocbt-radius-xl: 16px;
}

html[data-mocbt-theme="dark"]{
  --mocbt-bg: #0b1220;
  --mocbt-card: #0f172a;
  --mocbt-text: #e5e7eb;
  --mocbt-muted: #94a3b8;
  --mocbt-border: rgba(148,163,184,.18);
  --mocbt-shadow-soft: 0 10px 24px rgba(0,0,0,.28);
  --mocbt-shadow-card-hover: 0 16px 36px rgba(14,165,233,.22);
}

html[data-mocbt-theme="dark"] body,
html[data-mocbt-theme="dark"] .card,
html[data-mocbt-theme="dark"] .table,
html[data-mocbt-theme="dark"] .modal-content,
html[data-mocbt-theme="dark"] .dropdown-menu,
html[data-mocbt-theme="dark"] .list-group-item,
html[data-mocbt-theme="dark"] .offcanvas,
html[data-mocbt-theme="dark"] .navbar,
html[data-mocbt-theme="dark"] .form-label,
html[data-mocbt-theme="dark"] label,
html[data-mocbt-theme="dark"] .nav-link,
html[data-mocbt-theme="dark"] .text-dark {
  color: #e5e7eb !important;
}
html[data-mocbt-theme="dark"] .card,
html[data-mocbt-theme="dark"] .modal-content,
html[data-mocbt-theme="dark"] .dropdown-menu,
html[data-mocbt-theme="dark"] .list-group-item,
html[data-mocbt-theme="dark"] .offcanvas,
html[data-mocbt-theme="dark"] .table,
html[data-mocbt-theme="dark"] .form-control,
html[data-mocbt-theme="dark"] .form-select {
  background-color: #0f172a !important;
  border-color: rgba(148,163,184,.28) !important;
}
html[data-mocbt-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  color: #e5e7eb !important;
  background-color: rgba(255,255,255,.03) !important;
}
html[data-mocbt-theme="dark"] .navbar-toggler,
html[data-mocbt-theme="dark"] .btn-outline-secondary {
  border-color: rgba(226,232,240,.6) !important;
  color: #f8fafc !important;
}
html[data-mocbt-theme="dark"] .navbar-toggler-icon {
  filter: invert(1) grayscale(1) brightness(1.7);
}
html[data-mocbt-theme="dark"] .text-muted {
  color: #a8b3c7 !important;
}

/* Bootstrap modals: stay above backdrop/offcanvas; readable on mobile */
.modal {
  z-index: 1060;
}
.modal-backdrop {
  z-index: 1055;
}
html[data-mocbt-theme="dark"] .modal .btn-close {
  filter: invert(1) grayscale(1) brightness(1.8);
}

body.mocbt-theme-bg{
  background: var(--mocbt-bg);
  color: var(--mocbt-text);
}

.mocbt-brand-chip{
  background: var(--mocbt-sky);
  border: 1px solid var(--mocbt-sky-dark);
  color: #fff;
  font-weight: 700;
}

.mocbt-text-muted{ color: var(--mocbt-muted) !important; }
.mocbt-card{
  background: var(--mocbt-card);
  border: 1px solid var(--mocbt-border);
  border-radius: var(--mocbt-radius-xl);
  box-shadow: var(--mocbt-shadow-soft);
}
.mocbt-navbar{
  background: var(--mocbt-card);
  border: 1px solid var(--mocbt-border);
  box-shadow: var(--mocbt-shadow-soft);
}
.mocbt-sidebar{
  background: var(--mocbt-navy);
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,.16);
  box-shadow: var(--mocbt-shadow-soft);
}
.mocbt-sidebar a{ color: #cbd5e1; text-decoration:none; }
.mocbt-sidebar a:hover{ color: #fff; }
.mocbt-badge-soft{
  border: 1px solid var(--mocbt-border);
  background: rgba(14,165,233,.08);
  color: var(--mocbt-sky-dark);
}
.mocbt-table-wrap{ overflow-x:auto; }
.mocbt-footer-credit{
  border-top: 1px solid var(--mocbt-border);
  padding: 1rem 0;
  font-size: .9rem;
  color: var(--mocbt-muted);
}

/* Premium motion primitives */
.mocbt-card-hover{
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.mocbt-card-hover:hover{
  transform: translateY(-3px);
  box-shadow: var(--mocbt-shadow-card-hover);
  border-color: rgba(14,165,233,.35);
}

.btn, .form-control, .form-select, .list-group-item{
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover{
  transform: translateY(-1px);
}
.btn:active{
  transform: translateY(0);
}

.mocbt-fade-in{
  /* Opacity only — any transform on an ancestor breaks position:fixed (Bootstrap modals, dropdowns). */
  animation: mocbtFadeIn .35s ease both;
}

@keyframes mocbtFadeIn{
  from{ opacity: 0; }
  to{ opacity: 1; }
}

@media (prefers-reduced-motion: reduce){
  .mocbt-card-hover,
  .btn, .form-control, .form-select, .list-group-item{
    transition: none !important;
  }
  .mocbt-fade-in{
    animation: none !important;
  }
}

/* Mobile: do NOT hide .mocbt-sidebar globally — it is reused inside the offcanvas menu. */

.mocbt-mobile-drawer .offcanvas-header{
  background: var(--mocbt-card);
  border-color: var(--mocbt-border) !important;
}
.mocbt-mobile-drawer-title{
  color: var(--mocbt-text);
}
.mocbt-offcanvas-body{
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  padding-top: 0;
  background: #f1f5f9;
}

.mocbt-sidebar-shell{
  min-height: 100%;
}

/* Dark: drawer matches deep sidebar */
html[data-mocbt-theme="dark"] .mocbt-mobile-drawer .mocbt-offcanvas-body{
  background: #0b1220;
}
html[data-mocbt-theme="dark"] .mocbt-mobile-drawer .offcanvas-header{
  background: #0f172a;
  border-color: rgba(148,163,184,.28) !important;
}
html[data-mocbt-theme="dark"] .mocbt-mobile-drawer-title{
  color: #e5e7eb !important;
}
html[data-mocbt-theme="dark"] .mocbt-mobile-drawer .btn-close{
  filter: invert(1) grayscale(1) brightness(1.8);
}

/* Light: premium sky sidebar inside mobile drawer only (desktop sidebar stays navy). */
html:not([data-mocbt-theme="dark"]) .mocbt-mobile-drawer .mocbt-sidebar{
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 55%);
  color: #0f172a;
  border: 1px solid rgba(14,165,233,.22);
  box-shadow: none;
}
html:not([data-mocbt-theme="dark"]) .mocbt-mobile-drawer .mocbt-sidebar .fw-bold.text-white{
  color: #0c4a6e !important;
}
html:not([data-mocbt-theme="dark"]) .mocbt-mobile-drawer .mocbt-sidebar a{
  color: #0369a1;
}
html:not([data-mocbt-theme="dark"]) .mocbt-mobile-drawer .mocbt-sidebar .mocbt-nav-link{
  color: #0369a1;
}
html:not([data-mocbt-theme="dark"]) .mocbt-mobile-drawer .mocbt-sidebar .mocbt-nav-link:hover{
  color: #0c4a6e;
  background: rgba(14,165,233,.12);
  border-color: rgba(14,165,233,.25);
}
html:not([data-mocbt-theme="dark"]) .mocbt-mobile-drawer .mocbt-sidebar .mocbt-nav-link.active{
  color: #0b1220;
  background: linear-gradient(135deg, #bae6fd, #7dd3fc);
  border-color: rgba(14,165,233,.5);
  box-shadow: 0 8px 22px rgba(14,165,233,.2);
}
html:not([data-mocbt-theme="dark"]) .mocbt-mobile-drawer .mocbt-sidebar .mocbt-section-label{
  color: #64748b;
}
html:not([data-mocbt-theme="dark"]) .mocbt-mobile-drawer .mocbt-sidebar .mocbt-nav-icon{
  color: #0284c7;
}

.mocbt-chat-date-pill{
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  letter-spacing: .02em;
  background: rgba(14,165,233,.12);
  color: var(--mocbt-muted);
  border: 1px solid var(--mocbt-border);
}
html[data-mocbt-theme="dark"] .mocbt-chat-date-pill{
  background: rgba(14,165,233,.14);
  color: #cbd5e1;
}

.mocbt-sidebar .mocbt-nav-link{
  border-radius: 12px;
  padding: .55rem .75rem;
  margin-bottom: .25rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  border: 1px solid transparent;
}
.mocbt-sidebar .mocbt-nav-link:hover{
  color: #fff;
  background: rgba(255,255,255,.06);
  border-color: rgba(148,163,184,.18);
  transform: translateX(2px);
}
.mocbt-sidebar .mocbt-nav-link.active{
  color: #0b1220;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  border-color: rgba(14,165,233,.45);
  box-shadow: 0 8px 22px rgba(14,165,233,.18);
}
.mocbt-sidebar .mocbt-nav-link .mocbt-nav-icon{
  width: 1.35rem;
  text-align: center;
  opacity: .9;
}
.mocbt-sidebar .mocbt-section-label{
  letter-spacing: .14em;
  font-size: .68rem;
  color: #94a3b8;
  margin: 1rem 0 .35rem;
  text-transform: uppercase;
}
.mocbt-sidebar .mocbt-menu-badge{
  font-size: .65rem;
}

.mocbt-dash-header{
  background: linear-gradient(120deg, rgba(14,165,233,.14), rgba(15,23,42,.04));
  border: 1px solid var(--mocbt-border);
  box-shadow: var(--mocbt-shadow-soft);
}

.mocbt-user-pill{
  border: 1px solid var(--mocbt-border);
  background: rgba(255,255,255,.65);
  border-radius: 999px;
  padding: .35rem .65rem;
}
html[data-mocbt-theme="dark"] .mocbt-user-pill{
  background: rgba(15,23,42,.65);
}

.mocbt-kpi-premium{
  border-radius: 18px;
  border: 1px solid var(--mocbt-border);
  background: radial-gradient(120% 120% at 10% 10%, rgba(14,165,233,.12), transparent 55%), var(--mocbt-card);
  box-shadow: var(--mocbt-shadow-soft);
  padding: 1.1rem 1.15rem;
  position: relative;
  overflow: hidden;
}
.mocbt-kpi-premium::after{
  content:'';
  position:absolute;
  inset:-40% 55% auto -30%;
  height: 140%;
  background: radial-gradient(circle at 30% 30%, rgba(14,165,233,.22), transparent 55%);
  pointer-events:none;
}
.mocbt-kpi-premium .label{ color: var(--mocbt-muted); font-size: .82rem; }
.mocbt-kpi-premium .value{ font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }

.mocbt-chat-bubble{
  max-width: 78%;
  border-radius: 16px;
  padding: .65rem .85rem;
  box-shadow: 0 8px 22px rgba(15,23,42,.08);
}
.mocbt-chat-bubble.me{
  margin-left: auto;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
}
.mocbt-chat-bubble.them{
  margin-right: auto;
  background: var(--mocbt-card);
  border: 1px solid var(--mocbt-border);
}

.mocbt-dash-hero{
  background: radial-gradient(120% 120% at 10% 10%, rgba(255,255,255,.22), transparent 55%),
              linear-gradient(135deg, #0ea5e9, #0b1220 55%, #111827);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: var(--mocbt-shadow-soft);
}

.mocbt-chat-shell{
  border: 1px solid var(--mocbt-border);
  border-radius: 18px;
  background: var(--mocbt-card);
  box-shadow: var(--mocbt-shadow-soft);
  min-height: 520px;
}
.mocbt-chat-thread-list{
  border-right: 1px solid var(--mocbt-border);
  max-height: 640px;
  overflow-y: auto;
}
.mocbt-chat-thread-item{
  border-bottom: 1px solid var(--mocbt-border);
  padding: .75rem .85rem;
  cursor: pointer;
  transition: background-color .15s ease;
}
.mocbt-chat-thread-item:hover{ background: rgba(14,165,233,.06); }
.mocbt-chat-thread-item.active{
  background: rgba(14,165,233,.12);
  border-left: 3px solid var(--mocbt-sky);
}
.mocbt-chat-messages{
  max-height: 520px;
  overflow-y: auto;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(14,165,233,.04), transparent 40%);
}
@media (max-width: 991.98px){
  .mocbt-chat-thread-list{
    border-right: 0;
    border-bottom: 1px solid var(--mocbt-border);
    max-height: 240px;
  }
}

/* Public home page (restored layout) */
.mocbt-public-main-fluid {
  padding: 0;
  max-width: 100%;
}
.mocbt-home-bleed {
  width: 100vw;
  max-width: 100%;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.mocbt-home-hero {
  background: linear-gradient(135deg, #0ea5e9 0%, #0b1220 55%, #111827 100%);
  color: #fff;
}
.mocbt-home-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #bae6fd;
  font-weight: 700;
}
.mocbt-home-kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  display: inline-block;
}
.mocbt-home-title {
  line-height: 1.15;
}
.mocbt-home-btn-primary {
  background: #fff;
  color: #0b1220;
  border: none;
  font-weight: 600;
}
.mocbt-home-btn-primary:hover {
  background: #e0f2fe;
  color: #0b1220;
}
.mocbt-home-btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}
.mocbt-home-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.mocbt-home-showcase {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 1.25rem;
}
.mocbt-home-showcase-label {
  color: #bae6fd;
}
.mocbt-home-pulse {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
}
.mocbt-home-pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 4px;
}
.mocbt-home-pillar {
  background: var(--mocbt-card);
  border: 1px solid var(--mocbt-border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--mocbt-shadow-soft);
}
.mocbt-home-pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--mocbt-sky-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}
.mocbt-home-band {
  background: var(--mocbt-bg);
}
.mocbt-home-feature-panel {
  border-radius: 18px;
}
.mocbt-home-steps .mocbt-home-step {
  padding: 1.5rem;
  background: var(--mocbt-card);
}
.mocbt-home-step-accent {
  background: rgba(14, 165, 233, 0.08);
}
.mocbt-home-step-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--mocbt-sky);
  line-height: 1;
}
.mocbt-home-cta {
  background: #0b1220;
}
.mocbt-home-faq-card .mocbt-home-faq-index {
  color: var(--mocbt-sky);
}
.mocbt-home-quote-mark {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 2.5rem;
  opacity: 0.12;
  color: var(--mocbt-sky);
}

/* Mobile PWA install prompt on public site */
.mocbt-public-install {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}
.mocbt-public-install--hidden {
  display: none !important;
}
.mocbt-public-install__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.mocbt-public-install__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--mocbt-border);
  border-radius: 20px;
  padding: 1.25rem 1.15rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  text-align: center;
}
.mocbt-public-install__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.5rem;
  border-radius: 14px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--mocbt-sky-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.mocbt-public-install__title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}
.mocbt-public-install__text {
  font-size: 0.85rem;
  color: var(--mocbt-muted);
  margin-bottom: 0;
}
.mocbt-install-panel--hidden {
  display: none !important;
}
.mocbt-install-feedback {
  min-height: 1.25rem;
  color: var(--mocbt-muted);
}
.mocbt-install-feedback.text-success {
  color: #15803d;
}
.mocbt-install-feedback.text-danger {
  color: #b91c1c;
}
.mocbt-public-install-modal {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}
.mocbt-public-install-modal--hidden {
  display: none !important;
}
.mocbt-public-install-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}
.mocbt-public-install-modal__sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 18px 18px 12px 12px;
  padding: 1.25rem;
  box-shadow: var(--mocbt-shadow-soft);
}
@media (min-width: 992px) {
  .mocbt-public-install,
  .mocbt-public-install-modal {
    display: none !important;
  }
}

