/* CMVL Real Shell Rebuild: structural layout, not only visual polish. */
body.cmvl-real-shell-enabled .cmvl-real-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  min-height: 100vh;
  padding: 16px;
  background:
    radial-gradient(circle at 10% -4%, rgba(219, 234, 254, 0.95), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(79, 70, 229, 0.10), transparent 28%),
    linear-gradient(135deg, #f6f8fc 0%, #edf5ff 100%);
}

body.cmvl-real-shell-enabled .cmvl-sidebar {
  width: 280px;
  height: calc(100vh - 32px);
  position: sticky;
  top: 16px;
  overflow: auto;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(238, 246, 255, 0.92) 100%);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 28px;
  box-shadow:
    0 24px 70px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.cmvl-real-shell-enabled .cmvl-workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
}

body.cmvl-real-shell-enabled .cmvl-topbar {
  height: 72px;
  position: sticky;
  top: 16px;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 520px) minmax(280px, auto);
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

body.cmvl-real-shell-enabled .cmvl-main {
  min-width: 0;
  overflow-x: hidden;
  padding: 0 4px 8px;
}

body.cmvl-real-shell-enabled .cmvl-main-inner {
  max-width: 1440px;
  margin: 0 auto;
}

body.cmvl-real-shell-enabled .cmvl-page-body {
  display: grid;
  gap: 18px;
}

body.cmvl-real-shell-enabled .cmvl-footer {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--cmvl-soft-text);
  font-size: 12px;
  border: 1px solid var(--cmvl-border);
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

body.cmvl-real-shell-enabled .cmvl-nav-group summary {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #334155;
  font-weight: 900;
  letter-spacing: .05em;
}

body.cmvl-real-shell-enabled .cmvl-nav-group-icon,
body.cmvl-real-shell-enabled .cmvl-nav-icon,
body.cmvl-real-shell-enabled .cmvl-hub-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

body.cmvl-real-shell-enabled .cmvl-nav-group-icon {
  width: 22px;
  height: 22px;
  color: #2563eb;
}

body.cmvl-real-shell-enabled .cmvl-nav-icon svg,
body.cmvl-real-shell-enabled .cmvl-nav-group-icon svg,
body.cmvl-real-shell-enabled .cmvl-hub-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

body.cmvl-real-shell-enabled .cmvl-nav-item {
  border: 1px solid transparent;
}

body.cmvl-real-shell-enabled .cmvl-nav-item:hover {
  background: #eaf2ff;
  border-color: #d8e7ff;
}

body.cmvl-real-shell-enabled .cmvl-nav-item.is-active {
  border-color: rgba(255, 255, 255, .30);
}

body.cmvl-real-shell-enabled .cmvl-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

body.cmvl-real-shell-enabled .cmvl-breadcrumb button,
body.cmvl-real-shell-enabled .cmvl-back-button {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid #d8e2f0;
  background: #fff;
  color: #1e3a8a;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 850;
}

body.cmvl-real-shell-enabled .cmvl-back-button {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .20);
}

body.cmvl-real-shell-enabled .cmvl-hub-grid {
  grid-template-columns: repeat(auto-fit, minmax(252px, 1fr));
  gap: 16px;
}

body.cmvl-real-shell-enabled .cmvl-hub-card.cmvl-product-card {
  position: relative;
  min-height: 184px;
  text-align: left;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, .16), transparent 34%),
    linear-gradient(145deg, #ffffff, #f8fbff);
  border: 1px solid #dbe6f5;
  border-radius: 24px;
  box-shadow:
    0 18px 42px rgba(15, 23, 42, .09),
    inset 0 1px 0 rgba(255, 255, 255, .92);
}

body.cmvl-real-shell-enabled .cmvl-hub-card.cmvl-product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, .34);
  box-shadow: 0 24px 58px rgba(15, 23, 42, .14);
}

body.cmvl-real-shell-enabled .cmvl-hub-card.cmvl-product-card:focus-visible {
  outline: 4px solid rgba(37, 99, 235, .18);
  outline-offset: 3px;
}

body.cmvl-real-shell-enabled .cmvl-hub-card .cmvl-hub-icon {
  width: 48px;
  height: 48px;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 14px 28px rgba(37, 99, 235, .28);
}

body.cmvl-real-shell-enabled .cmvl-hub-card .cmvl-hub-icon svg {
  width: 24px;
  height: 24px;
}

body.cmvl-real-shell-enabled .cmvl-hub-context {
  position: absolute;
  top: 18px;
  right: 18px;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

body.cmvl-real-shell-enabled .cmvl-hub-card strong {
  margin-top: 15px;
  color: #0f172a;
  font-size: 18px;
  letter-spacing: -.02em;
}

body.cmvl-real-shell-enabled .cmvl-hub-card p {
  color: #475569;
  line-height: 1.5;
}

body.cmvl-real-shell-enabled .cmvl-hub-kpi {
  color: #1e3a8a;
  background: #eef6ff;
  border: 1px solid #dbeafe;
}

body.cmvl-real-shell-enabled .cmvl-hub-open {
  color: #2563eb;
  font-weight: 900;
}

body.cmvl-real-shell-enabled .cmvl-card,
body.cmvl-real-shell-enabled .cmvl-panel,
body.cmvl-real-shell-enabled .cmvl-content-card {
  border-color: #dbe6f5;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

body.cmvl-real-shell-enabled .cmvl-panel {
  overflow: hidden;
}

body.cmvl-real-shell-enabled .cmvl-table-wrap {
  max-width: 100%;
  overflow: auto;
  border-color: #dbe6f5;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

body.cmvl-real-shell-enabled .cmvl-table {
  min-width: 860px;
}

body.cmvl-real-shell-enabled .cmvl-pagination {
  position: sticky;
  left: 0;
  max-width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #dbe6f5;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

body.cmvl-real-shell-enabled .cmvl-pagination button,
body.cmvl-real-shell-enabled .cmvl-pagination select {
  min-height: 34px;
  border-radius: 999px;
}

body.cmvl-real-shell-enabled .cmvl-primary-action,
body.cmvl-real-shell-enabled .cmvl-crud-toolbar button:first-child,
body.cmvl-real-shell-enabled [data-cmvl-global-search-apply],
body.cmvl-real-shell-enabled [data-cmvl-filter-apply] {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
}

body.cmvl-nav-collapsed.cmvl-real-shell-enabled .cmvl-real-shell {
  grid-template-columns: 100px minmax(0, 1fr);
}

body.cmvl-nav-collapsed.cmvl-real-shell-enabled .cmvl-sidebar {
  width: 84px;
}

body.cmvl-nav-collapsed.cmvl-real-shell-enabled .cmvl-brand-copy,
body.cmvl-nav-collapsed.cmvl-real-shell-enabled .cmvl-nav-label,
body.cmvl-nav-collapsed.cmvl-real-shell-enabled .cmvl-nav-group summary,
body.cmvl-nav-collapsed.cmvl-real-shell-enabled .cmvl-nav-collapse {
  display: none;
}

:root[data-theme="dark"] body.cmvl-real-shell-enabled .cmvl-real-shell {
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.16), transparent 32%),
    radial-gradient(circle at 92% 8%, rgba(129, 140, 248, 0.12), transparent 28%),
    var(--cmvl-bg);
}

:root[data-theme="dark"] body.cmvl-real-shell-enabled .cmvl-sidebar {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  border-color: var(--cmvl-border);
}

:root[data-theme="dark"] body.cmvl-real-shell-enabled .cmvl-topbar,
:root[data-theme="dark"] body.cmvl-real-shell-enabled .cmvl-footer {
  background: rgba(17, 24, 39, 0.88);
  border-color: var(--cmvl-border);
}

:root[data-theme="dark"] body.cmvl-real-shell-enabled .cmvl-hub-card.cmvl-product-card,
:root[data-theme="dark"] body.cmvl-real-shell-enabled .cmvl-pagination,
:root[data-theme="dark"] body.cmvl-real-shell-enabled .cmvl-breadcrumb button {
  background: linear-gradient(145deg, #111827, #1f2937);
  border-color: #334155;
  color: #f8fafc;
}

:root[data-theme="dark"] body.cmvl-real-shell-enabled .cmvl-hub-card strong {
  color: #f8fafc;
}

:root[data-theme="dark"] body.cmvl-real-shell-enabled .cmvl-hub-card p {
  color: #cbd5e1;
}

@media (max-width: 1024px) {
  body.cmvl-real-shell-enabled .cmvl-real-shell {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 10px;
  }

  body.cmvl-real-shell-enabled .cmvl-sidebar {
    width: 100%;
    height: auto;
    min-height: auto;
    position: relative;
    top: 0;
    border-right: 0;
    border-radius: 22px;
  }

  body.cmvl-real-shell-enabled .cmvl-workspace {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  body.cmvl-real-shell-enabled .cmvl-topbar {
    height: auto;
    min-height: 64px;
    position: relative;
    top: 0;
    grid-template-columns: 1fr;
    padding: 14px;
    border-radius: 22px;
  }

  body.cmvl-real-shell-enabled .cmvl-main {
    padding: 14px;
  }
}

/* CMVL UX refinement: alignment, softer palette, audit-table standard and contextual drawers. */
body.cmvl-real-shell-enabled,
body.cmvl-real-shell-enabled .cmvl-real-shell {
  overflow-x: hidden !important;
}

body.cmvl-real-shell-enabled .cmvl-workspace,
body.cmvl-real-shell-enabled .cmvl-main,
body.cmvl-real-shell-enabled .cmvl-main-inner,
body.cmvl-real-shell-enabled .cmvl-page-body,
body.cmvl-real-shell-enabled .cmvl-panel,
body.cmvl-real-shell-enabled .cmvl-content-card {
  min-width: 0 !important;
  max-width: 100% !important;
}

body.cmvl-real-shell-enabled .cmvl-real-shell {
  grid-template-columns: 292px minmax(0, 1fr);
  background:
    radial-gradient(circle at 14% -8%, rgba(219, 234, 254, .80), transparent 28%),
    linear-gradient(135deg, #f8fafc 0%, #eef5ff 100%);
}

body.cmvl-real-shell-enabled .cmvl-sidebar {
  width: 276px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  border-color: #e5e7eb;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .075);
}

body.cmvl-real-shell-enabled .cmvl-topbar {
  grid-template-columns: minmax(230px, 1fr) minmax(280px, 520px) minmax(390px, auto);
  gap: 16px;
  padding: 0 20px;
  width: 100%;
  max-width: calc(100vw - 324px);
  justify-self: start;
  box-sizing: border-box;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .065);
}

body.cmvl-real-shell-enabled .cmvl-header-left,
body.cmvl-real-shell-enabled .cmvl-header-right,
body.cmvl-real-shell-enabled .cmvl-title-stack {
  min-width: 0;
}

body.cmvl-real-shell-enabled .cmvl-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

body.cmvl-real-shell-enabled .cmvl-search {
  width: min(100%, 520px);
  justify-self: center;
}

body.cmvl-real-shell-enabled .cmvl-search input {
  min-width: 0;
}

body.cmvl-real-shell-enabled .cmvl-theme-toggle,
body.cmvl-real-shell-enabled .cmvl-icon-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  color: #1e3a8a !important;
  box-shadow: none !important;
}

body.cmvl-real-shell-enabled .cmvl-user-name {
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #475569 !important;
  font-size: 12px !important;
}

body.cmvl-real-shell-enabled .cmvl-account-button {
  min-width: 118px !important;
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #dbe3ef !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .055) !important;
}

body.cmvl-real-shell-enabled .cmvl-page-title {
  color: #111827 !important;
}

body.cmvl-real-shell-enabled .cmvl-page-subtitle {
  color: #64748b !important;
}

body.cmvl-real-shell-enabled .cmvl-nav-group summary {
  color: #475569;
  letter-spacing: .045em;
}

body.cmvl-real-shell-enabled .cmvl-nav-group-icon,
body.cmvl-real-shell-enabled .cmvl-nav-icon {
  color: #1e3a8a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

body.cmvl-real-shell-enabled .cmvl-nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 11px;
}

body.cmvl-real-shell-enabled .cmvl-nav-item {
  position: relative;
  color: #111827;
  background: transparent;
}

body.cmvl-real-shell-enabled .cmvl-nav-item:hover {
  background: #f1f6ff;
  border-color: #dbeafe;
  transform: translateX(2px);
}

body.cmvl-real-shell-enabled .cmvl-nav-item.is-active {
  color: #1e3a8a !important;
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  box-shadow: none !important;
}

body.cmvl-real-shell-enabled .cmvl-nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #2563eb;
}

body.cmvl-real-shell-enabled .cmvl-nav-item.is-active .cmvl-nav-icon {
  color: #1e3a8a !important;
  background: #dbeafe !important;
  border-color: #bfdbfe !important;
}

body.cmvl-real-shell-enabled .cmvl-back-button {
  color: #1e3a8a !important;
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  box-shadow: none !important;
}

body.cmvl-real-shell-enabled .cmvl-breadcrumb button:not(.cmvl-back-button) {
  color: #475569;
  background: #ffffff;
  box-shadow: none;
}

body.cmvl-real-shell-enabled .cmvl-hub-grid {
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  align-items: stretch;
}

body.cmvl-real-shell-enabled .cmvl-hub-card.cmvl-product-card {
  min-height: 172px;
  background:
    radial-gradient(circle at 100% 0%, rgba(219, 234, 254, .90), transparent 30%),
    linear-gradient(145deg, #ffffff, #fbfdff);
  border-color: #e2e8f0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .075);
}

body.cmvl-real-shell-enabled .cmvl-hub-card.cmvl-product-card:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .105);
}

body.cmvl-real-shell-enabled .cmvl-hub-card .cmvl-hub-icon {
  width: 46px;
  height: 46px;
  color: #1e3a8a;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 18px rgba(15,23,42,.055);
}

body.cmvl-real-shell-enabled .cmvl-hub-context,
body.cmvl-real-shell-enabled .cmvl-hub-kpi {
  color: #1e3a8a;
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.cmvl-real-shell-enabled .cmvl-hub-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1e3a8a;
}

body.cmvl-real-shell-enabled .cmvl-context-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

body.cmvl-real-shell-enabled .cmvl-context-tab {
  min-height: 34px !important;
  border-radius: 12px;
  padding: 5px 10px !important;
  border: 1px solid transparent;
  background: #f8fafc;
  color: #475569;
  text-align: left;
  line-height: 1.15 !important;
}

body.cmvl-real-shell-enabled .cmvl-context-tab strong {
  display: block;
  color: #111827;
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body.cmvl-real-shell-enabled .cmvl-context-tab span {
  display: block;
  color: #64748b;
  font-size: 9px !important;
  line-height: 1.1 !important;
  margin-top: 1px !important;
}

body.cmvl-real-shell-enabled .cmvl-context-tab.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

body.cmvl-real-shell-enabled .cmvl-table-wrap {
  border-color: #e5e7eb !important;
  background: #ffffff !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .045) !important;
  border-radius: 18px !important;
}

body.cmvl-real-shell-enabled .cmvl-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  min-width: 760px;
}

body.cmvl-real-shell-enabled .cmvl-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 1px solid #e5e7eb !important;
  font-size: 10px !important;
  letter-spacing: .055em !important;
}

body.cmvl-real-shell-enabled .cmvl-table td {
  background: #ffffff !important;
  border-bottom: 1px solid #eef2f7 !important;
  color: #111827 !important;
}

body.cmvl-real-shell-enabled .cmvl-table th:last-child,
body.cmvl-real-shell-enabled .cmvl-table td:last-child {
  min-width: 168px !important;
  width: 168px !important;
  padding-right: 18px !important;
}

body.cmvl-real-shell-enabled .cmvl-table tbody tr.is-green td,
body.cmvl-real-shell-enabled .cmvl-table tbody tr.is-yellow td,
body.cmvl-real-shell-enabled .cmvl-table tbody tr.is-red td,
body.cmvl-real-shell-enabled .cmvl-table tr.is-red td,
body.cmvl-real-shell-enabled .cmvl-table tr.is-yellow td,
body.cmvl-real-shell-enabled .cmvl-table tr.is-green td {
  background: #ffffff !important;
}

body.cmvl-real-shell-enabled .cmvl-table tbody tr:hover td,
body.cmvl-real-shell-enabled .cmvl-table tbody tr[data-cmvl-row-open-action]:hover td {
  background: #f8fbff !important;
  filter: none !important;
}

body.cmvl-real-shell-enabled .cmvl-badge {
  padding: 3px 8px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  border: 1px solid transparent;
}

body.cmvl-real-shell-enabled .cmvl-badge.is-green {
  color: #166534 !important;
  background: #dcfce7 !important;
  border-color: #bbf7d0 !important;
}

body.cmvl-real-shell-enabled .cmvl-badge.is-yellow {
  color: #92400e !important;
  background: #fef3c7 !important;
  border-color: #fde68a !important;
}

body.cmvl-real-shell-enabled .cmvl-badge.is-red {
  color: #991b1b !important;
  background: #fee2e2 !important;
  border-color: #fecaca !important;
}

body.cmvl-real-shell-enabled .cmvl-badge.is-neutral {
  color: #475569 !important;
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

body.cmvl-real-shell-enabled .cmvl-row-actions {
  display: flex !important;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: max-content;
}

body.cmvl-real-shell-enabled .cmvl-row-actions > button,
body.cmvl-real-shell-enabled .cmvl-actions-menu summary {
  flex: 0 0 auto;
  min-height: 28px !important;
  border-radius: 9px !important;
  border: 1px solid #dbe3ef !important;
  background: #ffffff !important;
  color: #1e3a8a !important;
  box-shadow: none !important;
}

body.cmvl-real-shell-enabled .cmvl-row-actions > button:first-child {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
}

body.cmvl-real-shell-enabled .cmvl-actions-menu:not([open]) .cmvl-actions-menu-body {
  display: none !important;
}

body.cmvl-real-shell-enabled .cmvl-actions-menu[open] .cmvl-actions-menu-body {
  display: grid !important;
}

body.cmvl-real-shell-enabled .cmvl-page-body > .cmvl-breadcrumb,
body.cmvl-real-shell-enabled .cmvl-page-body > .cmvl-admin-return {
  display: none !important;
}

body.cmvl-real-shell-enabled .cmvl-drawer {
  width: min(620px, 100vw) !important;
  background: #ffffff;
  box-shadow: -18px 0 60px rgba(15, 23, 42, .18) !important;
}

body.cmvl-real-shell-enabled .cmvl-drawer header {
  min-height: 64px !important;
  padding: 12px 16px !important;
  background: #ffffff !important;
  color: #111827 !important;
  border-bottom: 1px solid #e5e7eb !important;
}

body.cmvl-real-shell-enabled .cmvl-drawer header span {
  color: #64748b !important;
}

body.cmvl-real-shell-enabled .cmvl-drawer header strong {
  color: #111827 !important;
  font-size: 15px !important;
}

body.cmvl-real-shell-enabled .cmvl-drawer header button {
  border-color: #dbe3ef !important;
  background: #f8fafc !important;
  color: #1e3a8a !important;
}

body.cmvl-real-shell-enabled .cmvl-drawer-body {
  height: calc(100% - 64px) !important;
  padding: 14px !important;
}

body.cmvl-real-shell-enabled .cmvl-drawer-tabs button {
  min-height: 30px !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  color: #475569 !important;
}

body.cmvl-real-shell-enabled .cmvl-drawer-tabs button.is-active {
  background: #eff6ff !important;
  color: #1e3a8a !important;
  border-color: #bfdbfe !important;
}

@media (max-width: 1366px) {
  body.cmvl-real-shell-enabled .cmvl-topbar {
    grid-template-columns: minmax(190px, .9fr) minmax(240px, 420px) minmax(310px, auto);
    gap: 10px;
    padding-inline: 14px;
    max-width: calc(100vw - 292px);
  }

  body.cmvl-real-shell-enabled .cmvl-user-name {
    max-width: 118px;
  }
}

@media (max-width: 1024px) {
  body.cmvl-real-shell-enabled .cmvl-topbar {
    max-width: 100%;
  }
}

/* CMVL UX fix real: compact accordion sidebar, robust scroll and no legacy green CTAs. */
body.cmvl-real-shell-enabled {
  display: block !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

html:has(body.cmvl-real-shell-enabled) {
  height: auto !important;
  min-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.cmvl-real-shell-enabled .main-section,
body.cmvl-real-shell-enabled .page-container,
body.cmvl-real-shell-enabled .page-content,
body.cmvl-real-shell-enabled .page-body,
body.cmvl-real-shell-enabled .layout-main-section,
body.cmvl-real-shell-enabled .layout-main-section-wrapper {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body.cmvl-real-shell-enabled .cmvl-real-shell {
  align-items: start;
  height: auto !important;
  min-height: max(100vh, 100%);
  overflow: visible !important;
  padding-bottom: 28px;
}

body.cmvl-real-shell-enabled .cmvl-workspace {
  align-self: stretch;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  height: auto !important;
  min-height: calc(100vh - 32px);
}

body.cmvl-real-shell-enabled .cmvl-main {
  flex: 0 0 auto !important;
  min-height: auto !important;
  overflow: visible !important;
  padding-bottom: 28px;
}

body.cmvl-real-shell-enabled .cmvl-topbar {
  height: 72px !important;
  min-height: 72px !important;
}

body.cmvl-real-shell-enabled .cmvl-footer {
  margin-top: 10px;
  flex-shrink: 0;
}

body.cmvl-real-shell-enabled .cmvl-sidebar {
  padding: 10px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-gutter: stable;
}

body.cmvl-real-shell-enabled .cmvl-brand {
  display: block !important;
  margin: 0 0 10px !important;
  color: #111827 !important;
}

body.cmvl-real-shell-enabled .cmvl-brand-card {
  position: relative;
  min-height: 78px;
  padding: 10px 42px 10px 10px !important;
  border-radius: 20px !important;
  overflow: visible !important;
  align-items: center !important;
  gap: 10px !important;
}

body.cmvl-real-shell-enabled .cmvl-brand-mark {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  border-radius: 16px !important;
  overflow: visible !important;
  display: grid !important;
  place-items: center !important;
}

body.cmvl-real-shell-enabled .cmvl-brand-logo,
body.cmvl-real-shell-enabled .cmvl-brand img {
  width: 54px !important;
  height: 54px !important;
  max-width: 54px !important;
  max-height: 54px !important;
  object-fit: contain !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: block !important;
}

body.cmvl-real-shell-enabled .cmvl-brand-copy {
  min-width: 0;
}

body.cmvl-real-shell-enabled .cmvl-brand-copy span {
  font-size: 9px !important;
  letter-spacing: .08em !important;
  color: #64748b !important;
}

body.cmvl-real-shell-enabled .cmvl-brand-copy strong {
  font-size: 16px !important;
  line-height: 1.05 !important;
  color: #111827 !important;
}

body.cmvl-real-shell-enabled .cmvl-brand-copy small {
  display: inline-flex;
  margin-top: 3px;
  font-size: 10px;
  color: #1e3a8a;
  background: #eff6ff;
  border-radius: 999px;
  padding: 2px 7px;
}

body.cmvl-real-shell-enabled .cmvl-nav-collapse {
  position: absolute !important;
  right: 9px;
  top: 9px;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  border-radius: 10px !important;
}

body.cmvl-real-shell-enabled .cmvl-nav-group {
  margin-bottom: 8px !important;
}

body.cmvl-real-shell-enabled .cmvl-nav-group summary {
  min-height: 30px !important;
  padding: 5px 7px !important;
  border-radius: 11px !important;
  font-size: 10px !important;
}

body.cmvl-real-shell-enabled .cmvl-nav-group-items {
  display: grid;
  gap: 3px;
  padding: 3px 0 0 3px !important;
}

body.cmvl-real-shell-enabled .cmvl-nav-item {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 8px !important;
  border-radius: 11px !important;
  font-size: 12px !important;
  gap: 8px !important;
}

body.cmvl-real-shell-enabled .cmvl-nav-icon {
  width: 26px !important;
  height: 26px !important;
  border-radius: 9px !important;
}

body.cmvl-real-shell-enabled .cmvl-nav-icon svg,
body.cmvl-real-shell-enabled .cmvl-nav-group-icon svg {
  width: 17px !important;
  height: 17px !important;
}

body.cmvl-real-shell-enabled .cmvl-topbar {
  grid-template-columns: minmax(210px, 1fr) minmax(220px, 480px) minmax(420px, max-content);
  padding-right: 24px !important;
}

body.cmvl-real-shell-enabled .cmvl-header-right {
  min-width: 390px;
  padding-right: 0;
}

body.cmvl-real-shell-enabled .cmvl-search input::placeholder {
  color: #94a3b8;
}

body.cmvl-real-shell-enabled .cmvl-primary-action,
body.cmvl-real-shell-enabled .cmvl-crud-toolbar button:first-child,
body.cmvl-real-shell-enabled [data-cmvl-global-search-apply],
body.cmvl-real-shell-enabled [data-cmvl-filter-apply],
body.cmvl-real-shell-enabled .cmvl-inline-actions button:first-child {
  background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

body.cmvl-real-shell-enabled .cmvl-tabs button,
body.cmvl-real-shell-enabled .cmvl-context-tab,
body.cmvl-real-shell-enabled .cmvl-drawer-tabs button,
body.cmvl-real-shell-enabled .cmvl-crud-toolbar button,
body.cmvl-real-shell-enabled .cmvl-inline-actions button,
body.cmvl-real-shell-enabled .cmvl-filter-bar button,
body.cmvl-real-shell-enabled .cmvl-pagination button,
body.cmvl-real-shell-enabled .cmvl-pagination select {
  background: #ffffff !important;
  color: #1e3a8a !important;
  border-color: #dbe3ef !important;
}

body.cmvl-real-shell-enabled .cmvl-tabs button.is-active,
body.cmvl-real-shell-enabled .cmvl-context-tab.is-active,
body.cmvl-real-shell-enabled .cmvl-drawer-tabs button.is-active {
  background: #eff6ff !important;
  color: #1e3a8a !important;
  border-color: #bfdbfe !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08) !important;
}

body.cmvl-real-shell-enabled .cmvl-alert.is-green:not(.cmvl-status),
body.cmvl-real-shell-enabled .cmvl-feedback.is-green {
  background: #eff6ff !important;
  color: #1e3a8a !important;
  border-color: #bfdbfe !important;
}

body.cmvl-real-shell-enabled .cmvl-table-wrap {
  max-height: none !important;
}

body.cmvl-real-shell-enabled .cmvl-panel {
  overflow: visible !important;
}

body.cmvl-real-shell-enabled .cmvl-table-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

body.cmvl-real-shell-enabled .cmvl-pagination {
  position: relative !important;
  left: auto !important;
  margin-top: 10px;
}

@media (max-width: 1366px) {
  body.cmvl-real-shell-enabled .cmvl-topbar {
    grid-template-columns: minmax(170px, 1fr) minmax(180px, 360px) minmax(340px, max-content);
    max-width: calc(100vw - 292px);
  }

  body.cmvl-real-shell-enabled .cmvl-page-subtitle,
  body.cmvl-real-shell-enabled .cmvl-user-name {
    max-width: 92px;
  }

  body.cmvl-real-shell-enabled .cmvl-search input::placeholder {
    color: transparent;
  }
}

/* CMVL final layout shell fix: fixed zones, internal page scroll and ERP anti-flicker. */
html.cmvl-booting:not(.cmvl-ready)::before {
  content: "CMVL Condo";
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  color: #1e3a8a;
  font: 800 18px/1.2 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .04em;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(219, 234, 254, .95), transparent 34%),
    linear-gradient(135deg, #f6f8fc, #eff6ff);
}

html.cmvl-ready::before {
  content: none !important;
  display: none !important;
}

html.cmvl-booting:not(.cmvl-ready) body .layout-main-section,
html.cmvl-booting:not(.cmvl-ready) body .layout-main-section-wrapper,
html.cmvl-booting:not(.cmvl-ready) body .page-container,
html.cmvl-booting:not(.cmvl-ready) body .page-content,
html.cmvl-booting:not(.cmvl-ready) body .page-body,
html.cmvl-booting:not(.cmvl-ready) body .navbar,
html.cmvl-booting:not(.cmvl-ready) body .desk-sidebar,
html.cmvl-booting:not(.cmvl-ready) body .standard-sidebar {
  visibility: hidden !important;
}

html.cmvl-ready body .layout-main-section,
html.cmvl-ready body .layout-main-section-wrapper,
html.cmvl-ready body .page-container,
html.cmvl-ready body .page-content,
html.cmvl-ready body .page-body,
html.cmvl-ready body .navbar,
html.cmvl-ready body .desk-sidebar,
html.cmvl-ready body .standard-sidebar {
  visibility: visible;
}

html:has(body.cmvl-real-shell-enabled),
body.cmvl-real-shell-enabled {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  overflow: hidden !important;
}

body.cmvl-real-shell-enabled .main-section,
body.cmvl-real-shell-enabled .page-container,
body.cmvl-real-shell-enabled .page-content,
body.cmvl-real-shell-enabled .page-body,
body.cmvl-real-shell-enabled .layout-main-section,
body.cmvl-real-shell-enabled .layout-main-section-wrapper {
  width: 100% !important;
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.cmvl-real-shell-enabled .cmvl-real-shell {
  --cmvl-sidebar-width: 280px;
  --cmvl-topbar-height: 72px;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: var(--cmvl-sidebar-width) minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  align-items: stretch !important;
  background:
    radial-gradient(circle at 10% -4%, rgba(219, 234, 254, 0.86), transparent 34%),
    linear-gradient(135deg, #f6f8fc 0%, #edf5ff 100%) !important;
}

body.cmvl-real-shell-enabled .cmvl-sidebar {
  grid-column: 1 !important;
  width: var(--cmvl-sidebar-width) !important;
  height: 100vh !important;
  max-height: 100vh !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 70 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border-radius: 0 !important;
  border-width: 0 1px 0 0 !important;
  pointer-events: auto !important;
  scrollbar-gutter: stable !important;
}

body.cmvl-real-shell-enabled .cmvl-sidebar *,
body.cmvl-real-shell-enabled .cmvl-sidebar summary,
body.cmvl-real-shell-enabled .cmvl-sidebar button {
  pointer-events: auto !important;
}

body.cmvl-real-shell-enabled .cmvl-workspace {
  grid-column: 2 !important;
  min-width: 0 !important;
  height: 100vh !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: var(--cmvl-topbar-height) auto minmax(0, 1fr) 36px !important;
  gap: 0 !important;
  padding: 0 16px !important;
  overflow: hidden !important;
  align-self: stretch !important;
}

body.cmvl-real-shell-enabled .cmvl-topbar {
  grid-row: 1 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 60 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: var(--cmvl-topbar-height) !important;
  min-height: var(--cmvl-topbar-height) !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 520px) max-content !important;
  gap: 20px !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 10px 24px !important;
  box-sizing: border-box !important;
  border-radius: 0 0 22px 22px !important;
}

body.cmvl-real-shell-enabled .cmvl-header-left,
body.cmvl-real-shell-enabled .cmvl-search,
body.cmvl-real-shell-enabled .cmvl-header-right,
body.cmvl-real-shell-enabled .cmvl-topbar-right {
  min-width: 0 !important;
}

body.cmvl-real-shell-enabled .cmvl-topbar-right,
body.cmvl-real-shell-enabled .cmvl-header-right {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  min-width: max-content !important;
  max-width: 100% !important;
}

body.cmvl-real-shell-enabled .cmvl-search {
  width: 100% !important;
  max-width: 520px !important;
  justify-self: center !important;
}

body.cmvl-real-shell-enabled .cmvl-contextbar {
  grid-row: 2 !important;
  position: sticky !important;
  top: var(--cmvl-topbar-height) !important;
  z-index: 50 !important;
  min-width: 0 !important;
  padding: 12px 0 10px !important;
  background: linear-gradient(180deg, rgba(246, 248, 252, .98), rgba(246, 248, 252, .90)) !important;
  backdrop-filter: blur(14px);
}

body.cmvl-real-shell-enabled .cmvl-contextbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
  min-width: 0;
}

body.cmvl-real-shell-enabled .cmvl-contextbar .cmvl-breadcrumb {
  margin: 0 !important;
}

body.cmvl-real-shell-enabled .cmvl-contextbar-dynamic {
  display: grid;
  gap: 10px;
  min-width: 0;
}

body.cmvl-real-shell-enabled .cmvl-contextbar-dynamic[hidden] {
  display: none !important;
}

body.cmvl-real-shell-enabled .cmvl-main,
body.cmvl-real-shell-enabled .cmvl-page-scroll {
  grid-row: 3 !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 14px 0 18px !important;
  scroll-behavior: smooth;
}

body.cmvl-real-shell-enabled .cmvl-main-inner {
  max-width: 1440px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 0 0 4px !important;
}

body.cmvl-real-shell-enabled .cmvl-page-body {
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body.cmvl-real-shell-enabled .cmvl-panel,
body.cmvl-real-shell-enabled .cmvl-content-card,
body.cmvl-real-shell-enabled .cmvl-table-shell {
  min-height: 0 !important;
  min-width: 0 !important;
}

body.cmvl-real-shell-enabled .cmvl-table-wrap {
  min-height: 0 !important;
  max-height: min(62vh, 720px) !important;
  overflow: auto !important;
}

body.cmvl-real-shell-enabled .cmvl-pagination {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 10 !important;
  background: rgba(255,255,255,.96) !important;
  backdrop-filter: blur(10px);
}

body.cmvl-real-shell-enabled .cmvl-footer {
  grid-row: 4 !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  border-radius: 16px 16px 0 0 !important;
  flex-shrink: 0 !important;
}

body.cmvl-real-shell-enabled .modal-backdrop,
body.cmvl-real-shell-enabled .dropdown-backdrop {
  pointer-events: none;
}

@media (max-width: 1366px) {
  body.cmvl-real-shell-enabled .cmvl-real-shell {
    --cmvl-sidebar-width: 260px;
  }

  body.cmvl-real-shell-enabled .cmvl-workspace {
    padding: 0 12px !important;
  }

  body.cmvl-real-shell-enabled .cmvl-topbar {
    grid-template-columns: minmax(190px, 1fr) minmax(180px, 360px) max-content !important;
    gap: 12px !important;
    padding: 10px 16px !important;
  }
}

/* CMVL operational UX cleanup: list pages stay compact and do not duplicate hub navigation. */
body.cmvl-real-shell-enabled .cmvl-operational-actions {
  padding: 12px 14px !important;
}

body.cmvl-real-shell-enabled .cmvl-operational-actions .cmvl-inline-actions {
  margin: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

body.cmvl-real-shell-enabled .cmvl-list-summary {
  display: block !important;
}

body.cmvl-real-shell-enabled .cmvl-list-summary .cmvl-card {
  min-height: 72px !important;
  padding: 12px !important;
}

body.cmvl-real-shell-enabled .cmvl-profile-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

body.cmvl-real-shell-enabled .cmvl-profile-badge,
body.cmvl-real-shell-enabled [data-wizard-profile] {
  min-height: 32px !important;
  border-radius: 999px !important;
  padding: 0 11px !important;
  background: #f8fafc !important;
  color: #1e3a8a !important;
  border: 1px solid #dbe3ef !important;
  box-shadow: none !important;
}

body.cmvl-real-shell-enabled .cmvl-profile-badge:hover,
body.cmvl-real-shell-enabled [data-wizard-profile]:hover,
body.cmvl-real-shell-enabled [data-wizard-profile].is-active {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
}

body.cmvl-real-shell-enabled .cmvl-page-body > .cmvl-panel:empty,
body.cmvl-real-shell-enabled .cmvl-panel .cmvl-hub-grid:empty {
  display: none !important;
}
