body {
  min-height: 100vh;
  color: #172033;
  background: #f4f7fb;
}

.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  overflow-y: auto;
  color: #d9e3f5;
  background: #111827;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  margin-bottom: 14px;
  font-weight: 700;
  color: #ffffff;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: #4f46e5;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
}

.sidebar-search {
  margin-bottom: 14px;
}

.sidebar-search input,
.search,
.field,
.select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  color: #172033;
  background: #ffffff;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.sidebar-search input {
  height: 36px;
  color: #dbe6f8;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-search input::placeholder {
  color: #7f8da7;
}

.sidebar-search input:focus,
.search:focus,
.field:focus,
.select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

.nav-group {
  position: relative;
  margin: 6px 0;
}

.nav-root-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  min-height: 38px;
  border-radius: 8px;
  cursor: pointer;
}

.nav-root-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-root-link,
.nav-item {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 8px;
}

.nav-root-link:hover,
.nav-item:hover,
.nav-root-link.active,
.nav-item.active {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.22);
}

.nav-toggle {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #8b9ab2;
  border-radius: 6px;
  transition: transform 160ms ease, color 160ms ease;
}

.nav-toggle.open {
  color: #ffffff;
  transform: rotate(90deg);
}

.nav-children {
  position: relative;
  display: grid;
  gap: 2px;
  margin: 2px 0 8px 12px;
  padding-left: 14px;
}

.nav-children::before {
  position: absolute;
  top: -3px;
  bottom: 12px;
  left: 4px;
  width: 1px;
  content: "";
  background: rgba(148, 163, 184, 0.28);
}

.nav-group.collapsed .nav-children {
  display: none;
}

.nav-child {
  height: 34px;
  font-weight: 500;
}

.nav-skeleton-root,
.nav-skeleton-item {
  height: 34px;
  margin: 8px 4px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
  background-size: 180% 100%;
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}

.nav-skeleton-item {
  height: 28px;
  margin-left: 22px;
}

@keyframes skeleton-pulse {
  to {
    background-position: -180% 0;
  }
}

.main {
  min-width: 0;
  padding: 22px 28px 36px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.title {
  margin: 0;
  font-size: 30px;
  line-height: 1.16;
  color: #101827;
}

.subtitle {
  margin-top: 6px;
  color: #64748b;
  font-size: 14px;
}

.user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: #263247;
  white-space: nowrap;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  border-radius: 50%;
  background: #818cf8;
}

.logout {
  padding: 7px 10px;
  color: #64748b;
  border-radius: 8px;
}

.logout:hover {
  color: #ef4444;
  background: #fee2e2;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.panel {
  background: #ffffff;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  padding: 18px;
}

.metric-label,
.detail-label {
  color: #64748b;
  font-size: 13px;
}

.metric-value {
  margin-top: 8px;
  color: #111827;
  font-size: 28px;
  font-weight: 800;
}

.dashboard-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 20px;
}

.dashboard-note strong {
  margin-right: 6px;
}

.dashboard-mascot {
  position: relative;
  width: 86px;
  height: 58px;
  flex: 0 0 auto;
}

.dashboard-mascot i,
.dashboard-mascot b,
.dashboard-mascot em {
  position: absolute;
  display: block;
  border-radius: 999px;
}

.dashboard-mascot i {
  inset: 10px 12px 8px 8px;
  background: #6366f1;
}

.dashboard-mascot b {
  right: 8px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  background: #14b8a6;
}

.dashboard-mascot em {
  top: 2px;
  left: 26px;
  width: 24px;
  height: 24px;
  background: #f59e0b;
}

.menu-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.toolbar,
.role-toolbar,
.user-toolbar {
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #e7edf5;
}

.toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.role-toolbar,
.user-toolbar {
  grid-template-columns: minmax(180px, 280px) 150px minmax(0, 1fr) auto auto;
}

.toolbar-title {
  font-weight: 700;
}

.toolbar-actions,
.bulk-actions,
.row-actions,
.role-actions,
.user-actions,
.pager,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar-actions {
  min-width: 360px;
}

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e7edf5;
}

.tree {
  padding: 10px;
}

.segmented-control {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: rgba(241, 245, 249, .9);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.segment {
  min-width: 58px;
  height: 30px;
  padding: 0 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  border-radius: 6px;
}

.segment.active {
  color: #111827;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}

.menu-node {
  position: relative;
}

.menu-node[data-depth]:not([data-depth="0"])::before {
  position: absolute;
  top: -8px;
  bottom: 18px;
  left: calc((var(--depth) * 22px) + 11px);
  width: 1px;
  content: "";
  background: rgba(148, 163, 184, 0.42);
}

.menu-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, auto) minmax(150px, auto) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  margin: 4px 0;
  padding: 8px 10px 8px calc(10px + var(--depth) * 22px);
  border: 1px solid transparent;
  border-radius: 8px;
}

.menu-row:hover,
.menu-row.selected {
  background: #f8fafc;
  border-color: #dbe4f0;
}

.menu-row.dragging {
  opacity: 0.55;
}

.menu-row.drop-target {
  border-color: #6366f1;
}

.node-main,
.permission-select {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.drag-handle {
  color: #94a3b8;
  cursor: grab;
}

.menu-check {
  width: 16px;
  height: 16px;
  accent-color: #6366f1;
}

.chevron {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #64748b;
  border-radius: 6px;
  transition: transform 160ms ease, background 160ms ease;
}

.chevron:not(.placeholder):hover {
  background: #e9eef8;
}

.chevron.open {
  transform: rotate(90deg);
}

.chevron.placeholder {
  opacity: 0.25;
  cursor: default;
}

.node-title {
  min-width: 0;
}

.node-name-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.node-name,
.permission-name {
  overflow: hidden;
  color: #172033;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-id,
.detail-title-id {
  overflow: hidden;
  max-width: 210px;
  color: #8a94a6;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-title-id {
  display: inline-block;
  margin-left: 8px;
  vertical-align: baseline;
}

.node-path,
.permission-path,
.role-desc {
  margin-top: 2px;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-edit {
  width: min(260px, 100%);
  height: 32px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.api-list {
  display: grid;
  gap: 5px;
  margin: 4px 0 8px calc(38px + var(--depth) * 22px);
}

.api-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 8px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 8px;
}

.resource-list {
  display: grid;
  padding: 10px;
}

.resource-group-row {
  cursor: pointer;
}

.resource-group-row .row-actions {
  min-width: 56px;
}

.checkbox-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
}

.toolbar-actions .hidden,
.toolbar-actions [hidden] {
  display: none !important;
}

.method {
  min-width: 48px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
}

.api-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail {
  position: sticky;
  top: 22px;
  align-self: start;
  padding: 16px;
}

.detail-title,
.modal-title {
  margin: 0;
  color: #111827;
  font-size: 18px;
}

.detail-body {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.detail-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.detail-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 8px;
  overflow: hidden;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #eef2f7;
  border-radius: 999px;
}

.pill.menu {
  color: #2563eb;
  background: #dbeafe;
}

.pill.api {
  color: #047857;
  background: #d1fae5;
}

.pill.warn {
  color: #b45309;
  background: #fef3c7;
}

.state,
.tree-empty,
.sidebar-empty,
.placeholder-view {
  padding: 22px;
  color: #64748b;
  text-align: center;
}

.role-panel,
.user-panel {
  overflow: hidden;
}

.role-table,
.user-table {
  width: 100%;
  border-collapse: collapse;
}

.role-table {
  table-layout: fixed;
}

.role-col-name {
  width: 32%;
}

.role-col-domain,
.role-col-type,
.role-col-status,
.role-col-user,
.role-col-permission {
  width: 10%;
}

.role-col-action {
  width: 28%;
}

.role-table th,
.role-table td,
.user-table th,
.user-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}

.role-table th,
.user-table th {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  background: #f8fafc;
}

.role-table td:last-child,
.user-table td:last-child {
  text-align: right;
}

.role-name-cell,
.user-name-cell {
  min-width: 180px;
}

.role-user-count {
  text-decoration: none;
  cursor: pointer;
}

.role-user-count:hover {
  text-decoration: underline;
}

.role-user-count:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.user-workbench {
  display: grid;
  gap: 14px;
}

.user-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.user-metric {
  padding: 15px;
}

.user-metric span {
  color: #64748b;
  font-size: 13px;
}

.user-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.table-avatar {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 50%;
  background: #eef2f7;
}

.user-avatar-cell {
  width: 64px;
}

.user-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.user-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 7px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  background: #e0f2fe;
  border-radius: 999px;
}

.pager {
  padding: 12px 14px;
}

.primary-button,
.mini-button,
.icon-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.primary-button,
.mini-button.primary {
  color: #ffffff;
  background: #4f46e5;
}

.primary-button:hover,
.mini-button.primary:hover {
  background: #4338ca;
}

.action-loading-button {
  gap: 7px;
}

.button-spinner {
  display: none;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, .46);
  border-top-color: #fff;
  border-radius: 999px;
  animation: button-spin .75s linear infinite;
}

.action-loading-button.is-loading .button-spinner {
  display: inline-block;
}

.action-loading-button.is-loading {
  cursor: wait;
  opacity: .86;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

.mini-button,
.icon-button {
  color: #334155;
  background: #ffffff;
  border-color: #dbe4f0;
}

.mini-button:hover,
.icon-button:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.mini-button.ghost {
  background: transparent;
}

.mini-button.danger,
.icon-button.danger,
.danger-button {
  color: #dc2626;
  background: #fff7f7;
  border-color: #fecaca;
}

.danger-button:disabled,
.mini-button:disabled,
.icon-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.46);
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: min(720px, 100%);
  max-height: min(86vh, 820px);
  overflow: hidden;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.global-modal-backdrop {
  padding: 24px 32px;
}

.global-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1180px, calc(100vw - 64px));
  max-height: min(90vh, 920px);
}

.global-modal .modal-body {
  min-height: 0;
  overflow: auto;
}

.global-modal-fullscreen-backdrop {
  padding: 0;
}

.global-modal-fullscreen {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
}

.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e7edf5;
}

.modal-foot {
  border-top: 1px solid #e7edf5;
  border-bottom: 0;
}

.modal-body {
  padding: 18px;
  overflow: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-row {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.form-row textarea.field {
  height: auto;
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
}

.permission-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.permission-summary-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  background: #f1f5f9;
  border-radius: 999px;
}

.permission-search-wrap {
  position: relative;
  flex: 1;
}

.permission-search-icon {
  position: absolute;
  top: 50%;
  right: 10px;
  color: #94a3b8;
  font-size: 12px;
  transform: translateY(-50%);
}

.permission-project-bulkbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -6px 0 14px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e4ebf5;
  border-radius: 8px;
}

.permission-project-bulk-title {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.permission-project-bulk-count {
  color: #64748b;
  font-size: 12px;
}

.permission-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  gap: 18px;
  min-height: 0;
}

.permission-column {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e4ebf5;
  border-radius: 8px;
}

.permission-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e4ebf5;
}

.permission-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.permission-select-label,
.permission-count {
  color: #64748b;
  font-size: 12px;
}

.permission-list {
  max-height: 430px;
  overflow: auto;
}

.permission-modal .permission-modal-body {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.permission-modal .permission-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.permission-modal .permission-list {
  max-height: none;
  min-height: 0;
}

.permission-item {
  position: relative;
  border-bottom: 1px solid #edf2f7;
}

.permission-item.depth-1:not(.child) {
  background: rgba(248, 250, 252, .42);
}

.permission-item.child {
  background: linear-gradient(90deg, rgba(248, 250, 252, .95), rgba(255, 255, 255, .72));
}

.permission-item.child .permission-name {
  color: #334155;
  font-weight: 650;
}

.permission-item.child .menu-check {
  position: relative;
  z-index: 1;
  background: #fff;
}

.permission-select {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
}

.permission-tree-gutter {
  position: relative;
  flex: 0 0 calc(var(--permission-depth, 0) * 32px);
  align-self: stretch;
}

.permission-expand-toggle,
.permission-expand-placeholder {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.permission-expand-toggle {
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  background: #f8fafc;
  border: 1px solid #d8e1ee;
  border-radius: 5px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.permission-expand-toggle:hover {
  color: #0f172a;
  background: #eef4fb;
  border-color: #b8c6d9;
}

.permission-expand-toggle.open {
  color: #0f172a;
}

.permission-item.child .permission-tree-gutter::before {
  position: absolute;
  top: -9px;
  bottom: -9px;
  right: 18px;
  width: 1px;
  content: "";
  background: #cbd5e1;
}

.permission-item.child .permission-tree-gutter::after {
  position: absolute;
  top: 50%;
  right: 0;
  width: 18px;
  height: 1px;
  content: "";
  background: #cbd5e1;
}

.permission-main {
  flex: 1;
  min-width: 0;
}

.permission-name,
.permission-path {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-name {
  font-size: 12px;
  font-weight: 700;
}

.permission-path {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
}

.permission-inline-actions {
  display: none;
  gap: 6px;
}

.permission-project-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: #625d56;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.permission-project-toggle input {
  width: 12px;
  height: 12px;
  margin: 0;
  accent-color: #f06423;
}

.permission-project-toggle:has(input:checked) {
  color: #b54816;
  background: rgba(240, 100, 35, .08);
}

.permission-project-toggle:has(input:disabled) {
  opacity: .45;
  cursor: not-allowed;
}

.permission-project-toggle.static {
  cursor: default;
}

.permission-project-trigger {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  color: #b54816;
  font-size: 11px;
  font-weight: 700;
  background: rgba(240, 100, 35, .08);
  cursor: pointer;
}

.permission-project-trigger:hover {
  background: rgba(240, 100, 35, .14);
}

.permission-project-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 10px 36px;
}

.permission-project-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  background: #f8fafc;
  cursor: pointer;
}

.permission-project-option input {
  width: 11px;
  height: 11px;
  margin: 0;
  accent-color: #f06423;
}

.permission-project-option:has(input:checked) {
  color: #b54816;
  background: rgba(240, 100, 35, .1);
}

.switch-row {
  gap: 7px;
}

.switch-field {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  color: #4a5568;
  font-size: 11px;
}

.switch-field input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #f06423;
}

.permission-item:hover .permission-inline-actions,
.permission-item.editing .permission-inline-actions {
  display: inline-flex;
}

.permission-action-select {
  width: 104px;
  height: 32px;
}

.permission-icon-button {
  min-height: 30px;
  padding: 0 9px;
}

.multi-select {
  position: relative;
}

.multi-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  color: #172033;
  background: #ffffff;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
}

.multi-select-arrow {
  color: #64748b;
  transition: transform 160ms ease;
}

.multi-select.open .multi-select-arrow {
  transform: rotate(90deg);
}

.multi-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: none;
  width: 100%;
  max-height: 220px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

.multi-select.open .multi-select-menu {
  display: block;
}

.user-role-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid #edf2f7;
}

.user-role-option small {
  color: #64748b;
}

.Internal-frame-panel {
  height: calc(100vh - 118px);
  overflow: hidden;
}

.Internal-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
}

.namespace-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.namespace-select {
  width: 96px;
  height: 34px;
}

@media (max-width: 1120px) {
  .global-modal-backdrop {
    padding: 14px;
  }

  .global-modal:not(.global-modal-fullscreen) {
    width: min(100%, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
  }

  .shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .metric-grid,
  .user-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-workbench,
  .permission-layout {
    grid-template-columns: 1fr;
  }

  .detail {
    position: static;
  }

  .menu-row {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .menu-row > .pill-row:nth-of-type(2),
  .row-actions {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .main {
    padding: 18px;
  }

  .topbar,
  .dashboard-note,
  .bulk-bar,
  .permission-summary-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .metric-grid,
  .user-metrics,
  .role-toolbar,
  .user-toolbar,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
  }

  .role-table,
  .user-table {
    min-width: 760px;
  }

  .role-panel,
  .user-panel {
    overflow-x: auto;
  }
}

/* Final Internal Auth sidebar alignment: keep the menu minimal and on-theme. */
body {
  padding: 0;
  color: var(--ia-ink);
  background:
    linear-gradient(90deg, rgba(23, 23, 23, .04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 23, 23, .035) 1px, transparent 1px),
    linear-gradient(135deg, #d9e2e2 0%, #f7efe2 44%, #f4d8c0 100%);
  background-size: 36px 36px, 36px 36px, cover;
}

.shell {
  grid-template-columns: 304px minmax(0, 1fr);
  min-height: 100vh;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 34px 26px;
  color: var(--ia-ink);
  background: rgba(255, 253, 248, .78);
  border-right: 1px solid rgba(23, 23, 23, .08);
  backdrop-filter: blur(14px);
}

.brand {
  height: 38px;
  margin-bottom: 28px;
  color: rgba(23, 23, 23, .7);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: conic-gradient(from 30deg, #ff8a5b, #f4d35e, #78c66f, #5a8dee, #6547d6, #ff8a5b);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
}

.sidebar-search input {
  height: 42px;
  color: var(--ia-ink);
  background: rgba(255, 255, 255, .56);
  border: 1px solid var(--ia-line);
  border-radius: 0;
}

.sidebar-search input::placeholder {
  color: rgba(23, 23, 23, .48);
}

.sidebar-search input:focus {
  background: #fff;
  border-color: var(--ia-ink);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, .1);
}

.nav-root-row {
  min-height: 42px;
  border-radius: 0;
}

.nav-root-row:hover {
  background: rgba(23, 23, 23, .045);
}

.nav-root-link,
.nav-item {
  height: 42px;
  padding: 0 12px;
  color: #4f4a43;
  font-size: 15px;
  font-weight: 700;
  border-radius: 0;
}

.nav-root-link.active,
.nav-item.active {
  color: var(--ia-ink);
  background: rgba(23, 23, 23, .07);
  box-shadow: inset 0 -2px 0 var(--ia-ink);
}

.nav-toggle {
  margin-right: 4px;
  color: rgba(23, 23, 23, .62);
  background: transparent;
}

.nav-children {
  gap: 2px;
  margin: 4px 0 12px;
  padding-left: 12px;
}

.nav-children::before,
.nav-child::before {
  display: none;
}

.nav-child {
  position: relative;
  height: 40px;
  color: #625d56;
  font-weight: 650;
}

/* ==================== Internal Auth visual system ==================== */
:root {
  --ia-ink: #1b1b1a;
  --ia-muted: #625d56;
  --ia-paper: #fffaf1;
  --ia-paper-2: rgba(255, 250, 241, 0.78);
  --ia-line: #d9cfbf;
  --ia-grid: rgba(27, 27, 26, 0.045);
  --ia-purple: #6547dc;
  --ia-orange: #ff8356;
  --ia-yellow: #f4d758;
  --ia-green: #14bea9;
}

body {
  padding: 0;
  color: var(--ia-ink);
  background:
    linear-gradient(var(--ia-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--ia-grid) 1px, transparent 1px),
    radial-gradient(circle at 0% 0%, rgba(148, 184, 172, 0.24), transparent 35%),
    radial-gradient(circle at 100% 46%, rgba(255, 131, 86, 0.2), transparent 36%),
    #f6f2e9;
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
}

.shell {
  grid-template-columns: 304px minmax(0, 1fr);
  min-height: 100vh;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 34px 26px;
  color: var(--ia-ink);
  background:
    linear-gradient(rgba(23, 23, 23, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, .028) 1px, transparent 1px),
    rgba(255, 253, 248, .76);
  background-size: 36px 36px, 36px 36px, auto;
  border-right: 1px solid rgba(27, 27, 26, 0.08);
  backdrop-filter: blur(10px);
}

.brand {
  height: 38px;
  margin-bottom: 28px;
  color: #4d4943;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: transparent;
  background: conic-gradient(from 30deg, #ff8a5b, #f4d35e, #78c66f, #5a8dee, #6547d6, #ff8a5b);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
}

.sidebar-search input {
  height: 44px;
  color: var(--ia-ink);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--ia-line);
  border-radius: 0;
}

.sidebar-search input::placeholder {
  color: #837d73;
}

.sidebar-search input:focus {
  background: rgba(255, 255, 255, 0.68);
  border-color: var(--ia-ink);
  box-shadow: 0 0 0 2px rgba(27, 27, 26, 0.08);
}

.nav-root-row {
  position: relative;
  min-height: 44px;
  border-radius: 0;
}

.nav-root-row:hover {
  background: rgba(23, 23, 23, .045);
}

.nav-root-link,
.nav-item {
  height: 44px;
  color: #4f4a43;
  font-size: 15px;
  font-weight: 800;
  border-radius: 0;
}

.nav-root-link.active,
.nav-item.active {
  color: var(--ia-ink);
  background: rgba(23, 23, 23, .07);
  box-shadow: inset 0 -2px 0 var(--ia-ink);
}

.nav-toggle {
  color: #4f4a43;
}

.nav-children {
  gap: 2px;
  margin: 4px 0 12px 0;
  padding-left: 30px;
}

.nav-child {
  position: relative;
  color: #5f5a52;
  padding-left: 22px;
}

.nav-children::before {
  display: block;
  top: -4px;
  bottom: calc(50% + 1px);
  left: 9px;
  width: 1px;
  background: rgba(95, 90, 82, 0.18);
}

.nav-child::before {
  position: absolute;
  top: 50%;
  left: -21px;
  display: block;
  width: 24px;
  height: 16px;
  content: "";
  border-bottom: 1px solid rgba(95, 90, 82, 0.18);
  border-left: 1px solid rgba(95, 90, 82, 0.18);
  border-bottom-left-radius: 8px;
  transform: translateY(-16px);
  pointer-events: none;
}

.nav-child:last-child::before {
  height: 18px;
  border-bottom-left-radius: 10px;
}

.nav-group.tail-root:not(:first-child)::before {
  position: absolute;
  top: -58px;
  bottom: calc(100% - 22px);
  left: 9px;
  display: block;
  width: 1px;
  content: "";
  background: rgba(95, 90, 82, 0.18);
  pointer-events: none;
}

.nav-group.tail-root:not(:first-child) .nav-root-row::before {
  position: absolute;
  top: 50%;
  left: 9px;
  display: block;
  width: 30px;
  height: 18px;
  content: "";
  border-bottom: 1px solid rgba(95, 90, 82, 0.18);
  border-left: 1px solid rgba(95, 90, 82, 0.18);
  border-bottom-left-radius: 10px;
  transform: translateY(-18px);
  pointer-events: none;
}

.nav-skeleton-root,
.nav-skeleton-item {
  border-radius: 0;
  background: linear-gradient(90deg, rgba(27, 27, 26, 0.055), rgba(27, 27, 26, 0.11), rgba(27, 27, 26, 0.055));
}

.main {
  min-height: 100vh;
  padding: 42px 48px;
  background: transparent;
}

.topbar {
  align-items: flex-start;
  margin-bottom: 32px;
}

.title {
  color: var(--ia-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.subtitle {
  margin-top: 12px;
  color: var(--ia-muted);
  font-size: 16px;
}

.user {
  color: var(--ia-ink);
}

.avatar {
  width: 42px;
  height: 42px;
  color: #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, #7a5cff, #6372ee);
}

.logout {
  color: #6e675e;
  border-radius: 0;
}

.logout:hover {
  color: #ffffff;
  background: var(--ia-ink);
}

.namespace-switch {
  color: var(--ia-ink);
  font-size: 15px;
}

.namespace-select,
.field,
.select,
.search,
.multi-select-trigger {
  height: 42px;
  color: var(--ia-ink);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--ia-line);
  border-radius: 0;
  box-shadow: none;
}

.namespace-select:focus,
.field:focus,
.select:focus,
.search:focus,
.multi-select-trigger:focus {
  border-color: var(--ia-ink);
  box-shadow: 0 0 0 2px rgba(27, 27, 26, 0.08);
}

.panel {
  background: var(--ia-paper-2);
  border: 1px solid var(--ia-line);
  border-radius: 0;
  box-shadow: 10px 10px 0 rgba(27, 27, 26, 0.035);
  backdrop-filter: none;
}

.metric-grid {
  gap: 18px;
}

.metric {
  min-height: 132px;
  padding: 24px;
  background: rgba(255, 250, 241, 0.82);
}

.metric-label,
.detail-label {
  color: #766f66;
  font-size: 14px;
  font-weight: 700;
}

.metric-value {
  margin-top: 18px;
  color: var(--ia-ink);
  font-size: 38px;
}

.dashboard-note {
  min-height: 128px;
  margin-top: 22px;
  padding: 30px;
  background: rgba(255, 250, 241, 0.82);
}

.dashboard-note strong,
.dashboard-note span {
  color: var(--ia-ink);
  font-size: 18px;
}

.dashboard-mascot i,
.dashboard-mascot b,
.dashboard-mascot em {
  border-radius: 999px;
  box-shadow: none;
}

.dashboard-mascot i {
  background: var(--ia-purple);
}

.dashboard-mascot b {
  background: var(--ia-green);
}

.dashboard-mascot em {
  background: #f4a400;
}

.toolbar,
.role-toolbar,
.user-toolbar,
.bulk-bar,
.permission-head,
.modal-head,
.modal-foot {
  border-color: var(--ia-line);
}

.primary-button,
.mini-button.primary {
  color: #ffffff;
  background: var(--ia-ink);
  border-color: var(--ia-ink);
  box-shadow: 4px 4px 0 rgba(27, 27, 26, 0.12);
}

.primary-button:hover,
.mini-button.primary:hover {
  background: #000000;
  transform: translate(-1px, -1px);
}

.mini-button,
.icon-button {
  color: var(--ia-ink);
  background: rgba(255, 250, 241, 0.64);
  border-color: var(--ia-line);
  border-radius: 0;
}

.mini-button:hover,
.icon-button:hover {
  background: #ffffff;
  border-color: var(--ia-ink);
}

.danger-button,
.mini-button.danger,
.icon-button.danger {
  color: #9d2d1f;
  background: rgba(255, 131, 86, 0.12);
  border-color: #ddb8a8;
}

.pill,
.user-role-chip {
  color: #4f4a43;
  background: rgba(27, 27, 26, 0.06);
  border-radius: 0;
}

.pill.menu {
  color: #3b2aa2;
  background: rgba(101, 71, 220, 0.13);
}

.pill.api {
  color: #116b60;
  background: rgba(20, 190, 169, 0.14);
}

.pill.warn {
  color: #8a5b00;
  background: rgba(244, 215, 88, 0.28);
}

.role-table th,
.user-table th {
  color: #615a52;
  background: rgba(27, 27, 26, 0.035);
}

.role-table th,
.role-table td,
.user-table th,
.user-table td {
  border-color: rgba(27, 27, 26, 0.09);
}

.menu-row {
  border-radius: 0;
}

.menu-row:hover,
.menu-row.selected,
.api-item {
  background: rgba(255, 255, 255, 0.5);
  border-color: var(--ia-line);
}

.detail-title,
.modal-title {
  color: var(--ia-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.modal {
  background: var(--ia-paper);
  border-radius: 0;
  box-shadow: 12px 12px 0 rgba(27, 27, 26, 0.15);
}

.modal-backdrop {
  background: rgba(27, 27, 26, 0.42);
}

.multi-select-menu,
.permission-column {
  background: var(--ia-paper);
  border-color: var(--ia-line);
  border-radius: 0;
}

.permission-head,
.permission-summary-pill,
.permission-item:hover {
  background: rgba(27, 27, 26, 0.035);
}

.Internal-frame-panel {
  background: rgba(255, 250, 241, 0.86);
}

@media (max-width: 1120px) {
  .shell {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .main {
    padding: 32px;
  }

  .title {
    font-size: 38px;
  }
}

@media (max-width: 760px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
  }

  .main {
    padding: 24px 18px;
  }
}

/* ==================== Manage Hub refreshed shell ==================== */
:root {
  --mhub-bg: #e9eef6;
  --mhub-surface: rgba(255, 255, 255, 0.82);
  --mhub-surface-strong: #ffffff;
  --mhub-line: #d8e1ee;
  --mhub-line-soft: rgba(148, 163, 184, 0.22);
  --mhub-text: #101827;
  --mhub-muted: #66758d;
  --mhub-sidebar: #101827;
  --mhub-sidebar-2: #151e31;
  --mhub-accent: #5b5ff0;
  --mhub-accent-2: #12b9ad;
  --mhub-warning: #f6a700;
  --mhub-shadow: 0 18px 48px rgba(34, 49, 75, 0.1);
}

body {
  padding: 12px;
  color: var(--mhub-text);
  background:
    radial-gradient(circle at 8% -8%, rgba(91, 95, 240, 0.12), transparent 30%),
    radial-gradient(circle at 94% 2%, rgba(18, 185, 173, 0.1), transparent 26%),
    var(--mhub-bg);
}

.shell {
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: calc(100vh - 24px);
  overflow: hidden;
  background: rgba(246, 249, 253, 0.9);
  border: 1px solid rgba(194, 205, 222, 0.72);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(18, 31, 56, 0.13);
}

.sidebar {
  position: relative;
  height: calc(100vh - 24px);
  padding: 24px 18px;
  background:
    linear-gradient(180deg, rgba(36, 48, 76, 0.5), transparent 26%),
    var(--mhub-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  height: 40px;
  margin-bottom: 18px;
  letter-spacing: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #695cff, #4f6ff4);
  box-shadow: 0 12px 28px rgba(79, 111, 244, 0.3);
}

.sidebar-search {
  margin-bottom: 18px;
}

.sidebar-search input {
  height: 42px;
  padding: 0 14px;
  color: #e9eef9;
  background: rgba(255, 255, 255, 0.095);
  border-color: rgba(255, 255, 255, 0.17);
  border-radius: 8px;
}

.sidebar-search input:focus {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(125, 139, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(91, 95, 240, 0.28);
}

.nav-group {
  margin: 7px 0;
}

.nav-root-row {
  min-height: 46px;
  overflow: hidden;
  border-radius: 8px;
}

.nav-root-row:hover {
  background: rgba(255, 255, 255, 0.075);
}

.nav-root-link,
.nav-item {
  height: 46px;
  padding: 0 14px;
  color: #d6deec;
  font-size: 15px;
  border-radius: 8px;
}

.nav-root-link {
  font-weight: 800;
}

.nav-root-link.active,
.nav-item.active {
  color: #ffffff;
  background: rgba(91, 95, 240, 0.34);
  box-shadow: inset 0 0 0 1px rgba(143, 151, 255, 0.18);
}

.nav-toggle {
  margin-right: 8px;
  background: transparent;
}

.nav-children {
  gap: 0;
  margin: 4px 0 10px 20px;
  padding-left: 22px;
}

.nav-children::before {
  top: -4px;
  bottom: 17px;
  left: 0;
  background: rgba(166, 179, 203, 0.32);
}

.nav-child {
  position: relative;
  height: 42px;
  color: #b8c4d7;
  font-weight: 650;
}

.nav-child::before {
  position: absolute;
  left: -22px;
  width: 16px;
  height: 1px;
  content: "";
  background: rgba(166, 179, 203, 0.32);
}

.nav-skeleton-root,
.nav-skeleton-item {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
}

.main {
  min-height: calc(100vh - 24px);
  padding: 30px 34px 42px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(246, 249, 253, 0.64)),
    #f5f8fc;
}

.topbar {
  align-items: center;
  margin-bottom: 26px;
}

.topbar > div:first-child {
  min-width: 0;
}

.title {
  font-size: 32px;
  font-weight: 850;
  color: #111827;
}

.subtitle {
  color: var(--mhub-muted);
  font-size: 15px;
}

.user {
  height: 44px;
  padding-left: 10px;
}

.avatar {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #8290ff, #6c6ff4);
}

.logout {
  height: 34px;
  padding: 0 8px;
}

.namespace-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  color: #273246;
  white-space: nowrap;
}

.namespace-select {
  width: 116px;
  height: 38px;
  padding-right: 28px;
  border-radius: 8px;
}

.panel {
  background: var(--mhub-surface);
  border-color: rgba(203, 213, 225, 0.86);
  border-radius: 8px;
  box-shadow: var(--mhub-shadow);
  backdrop-filter: blur(14px);
}

.metric-grid {
  gap: 16px;
}

.metric {
  min-height: 128px;
  padding: 22px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68)),
    var(--mhub-surface-strong);
}

.metric-label {
  font-size: 14px;
}

.metric-value {
  margin-top: 16px;
  font-size: 34px;
  line-height: 1;
}

.dashboard-note {
  min-height: 118px;
  margin-top: 20px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.76);
}

.dashboard-note strong {
  font-size: 17px;
}

.dashboard-note span {
  color: #273246;
  font-size: 17px;
}

.dashboard-mascot {
  width: 104px;
  height: 66px;
}

.dashboard-mascot i {
  inset: 16px 22px 7px 4px;
  background: #5b5ff0;
}

.dashboard-mascot b {
  right: 2px;
  bottom: 8px;
  width: 38px;
  height: 38px;
  background: var(--mhub-accent-2);
}

.dashboard-mascot em {
  top: 0;
  left: 46px;
  width: 30px;
  height: 30px;
  background: var(--mhub-warning);
}

.field,
.select,
.search {
  border-color: #d4deeb;
  border-radius: 8px;
}

.role-toolbar,
.user-toolbar,
.toolbar {
  padding: 16px;
}

.role-toolbar,
.user-toolbar {
  grid-template-columns: minmax(220px, 320px) 160px minmax(0, 1fr) auto auto;
}

.primary-button,
.mini-button,
.icon-button,
.danger-button {
  min-height: 36px;
  border-radius: 8px;
}

.primary-button,
.mini-button.primary {
  background: linear-gradient(135deg, #5b5ff0, #4b62de);
}

.role-table th,
.role-table td,
.user-table th,
.user-table td {
  padding: 15px 16px;
}

.modal {
  border-radius: 12px;
}

.multi-select-trigger,
.multi-select-menu {
  border-radius: 8px;
}

.Internal-frame-panel {
  height: calc(100vh - 142px);
}

@media (max-width: 1120px) {
  .shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    padding: 0;
  }

  .shell {
    min-height: 100vh;
    border-radius: 0;
  }

  .sidebar,
  .main {
    min-height: auto;
    height: auto;
  }
}

/* Final Internal Auth sidebar alignment: keep the menu minimal and on-theme. */
body {
  padding: 0;
  color: var(--ia-ink);
  background:
    linear-gradient(90deg, rgba(23, 23, 23, .04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 23, 23, .035) 1px, transparent 1px),
    linear-gradient(135deg, #d9e2e2 0%, #f7efe2 44%, #f4d8c0 100%);
  background-size: 36px 36px, 36px 36px, cover;
}

.shell {
  grid-template-columns: 304px minmax(0, 1fr);
  min-height: 100vh;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 34px 26px;
  color: var(--ia-ink);
  background: rgba(255, 253, 248, .78);
  border-right: 1px solid rgba(23, 23, 23, .08);
  backdrop-filter: blur(14px);
}

.brand {
  height: 38px;
  margin-bottom: 28px;
  color: rgba(23, 23, 23, .7);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: conic-gradient(from 30deg, #ff8a5b, #f4d35e, #78c66f, #5a8dee, #6547d6, #ff8a5b);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
}

.sidebar-search input {
  height: 42px;
  color: var(--ia-ink);
  background: rgba(255, 255, 255, .56);
  border: 1px solid var(--ia-line);
  border-radius: 0;
}

.sidebar-search input::placeholder {
  color: rgba(23, 23, 23, .48);
}

.sidebar-search input:focus {
  background: #fff;
  border-color: var(--ia-ink);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, .1);
}

.nav-root-row {
  min-height: 42px;
  border-radius: 0;
}

.nav-root-row:hover {
  background: rgba(23, 23, 23, .045);
}

.nav-root-link,
.nav-item {
  height: 42px;
  padding: 0 12px;
  color: #4f4a43;
  font-size: 15px;
  font-weight: 700;
  border-radius: 0;
}

.nav-root-link.active,
.nav-item.active {
  color: var(--ia-ink);
  background: rgba(23, 23, 23, .07);
  box-shadow: inset 0 -2px 0 var(--ia-ink);
}

.nav-toggle {
  margin-right: 4px;
  color: rgba(23, 23, 23, .62);
  background: transparent;
}

.nav-children {
  gap: 2px;
  margin: 4px 0 12px;
  padding-left: 12px;
}

.nav-children::before,
.nav-child::before {
  display: none;
}

.nav-child {
  position: relative;
  height: 40px;
  color: #625d56;
  font-weight: 650;
}

/* Final minimal sidebar correction: reference palette, no parent-child connector lines. */
.sidebar {
  background: rgba(255, 253, 248, .84) !important;
  border-right: 1px solid rgba(23, 23, 23, .1) !important;
  box-shadow: 14px 0 34px rgba(30, 28, 25, .06);
}

.brand {
  color: rgba(23, 23, 23, .76) !important;
}

.brand-mark {
  color: transparent !important;
  background: conic-gradient(from 30deg, #ff8a5b, #f4d35e, #78c66f, #ff8a5b) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .62), 4px 4px 0 rgba(23, 23, 23, .1) !important;
}

.nav-root-row {
  grid-template-columns: minmax(0, 1fr) 22px;
  border-radius: 0 !important;
}

.nav-root-row:hover,
.nav-root-row:has(.nav-root-link.active) {
  background: rgba(255, 138, 91, .1) !important;
}

.nav-root-link,
.nav-item {
  color: #4f4a43 !important;
  border-radius: 0 !important;
  box-shadow: none;
}

.nav-root-link:hover,
.nav-item:hover {
  color: var(--ia-ink) !important;
  background: rgba(23, 23, 23, .045) !important;
}

.nav-root-link.active,
.nav-item.active {
  color: var(--ia-ink) !important;
  background: rgba(255, 138, 91, .14) !important;
  box-shadow: inset 3px 0 0 #ff8a5b !important;
}

.nav-toggle {
  width: 22px;
  height: 22px;
  color: rgba(23, 23, 23, .52) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.nav-toggle.open {
  color: var(--ia-ink) !important;
}

.nav-children {
  margin: 2px 0 10px !important;
  padding-left: 10px !important;
  border: 0 !important;
}

.nav-children::before,
.nav-child::before {
  display: none !important;
  content: none !important;
}

.nav-child {
  height: 38px;
  padding-left: 14px !important;
  color: #625d56 !important;
  font-weight: 600 !important;
}

/* Menu tree selection should feel soft, not framed. */
.menu-row {
  border-color: transparent !important;
  box-shadow: none !important;
}

.menu-row:hover {
  border-color: transparent !important;
  background:
    linear-gradient(90deg, rgba(255, 138, 91, .08), rgba(244, 211, 94, .035) 48%, rgba(255, 255, 255, .24) 100%) !important;
}

.menu-row.selected {
  border-color: transparent !important;
  background:
    linear-gradient(90deg, rgba(255, 138, 91, .16) 0%, rgba(244, 211, 94, .08) 42%, rgba(255, 253, 248, .08) 100%) !important;
  box-shadow: none !important;
}

.menu-row.selected:hover {
  background:
    linear-gradient(90deg, rgba(255, 138, 91, .18) 0%, rgba(244, 211, 94, .09) 42%, rgba(255, 253, 248, .1) 100%) !important;
}

/* Fill the viewport and keep account actions compact. */
body {
  padding: 0 !important;
}

.shell {
  min-height: 100vh !important;
  height: 100vh;
  overflow: hidden;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.sidebar {
  height: 100vh !important;
}

.main {
  min-height: 100vh !important;
  height: 100vh;
  overflow-y: auto;
}

.topbar .user {
  position: relative;
  gap: 12px;
  height: auto;
  padding-left: 0 !important;
}

.account-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.account-menu::after {
  position: absolute;
  top: 100%;
  right: 0;
  display: none;
  width: 100%;
  min-width: 144px;
  height: 10px;
  content: "";
}

.account-menu:hover::after,
.account-menu:focus-within::after {
  display: block;
}

.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 2px 8px 2px 2px;
  color: var(--ia-ink);
  cursor: default;
}

.account-trigger #userName {
  max-width: 220px;
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 128px;
  padding: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  background: rgba(255, 253, 248, .96);
  border: 1px solid rgba(23, 23, 23, .1);
  box-shadow: 8px 8px 0 rgba(23, 23, 23, .1), 0 18px 44px rgba(30, 28, 25, .14);
  transition: opacity 140ms ease, transform 140ms ease;
}

.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.account-dropdown .logout {
  display: flex;
  width: 100%;
  height: 34px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  color: #a33a2a;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.account-dropdown .logout:hover {
  color: #7c241b;
  background: rgba(255, 138, 91, .12);
}

/* Production workbench refinement. */
:root {
  --mh-ink: #171717;
  --mh-text: #25211d;
  --mh-muted: #716a60;
  --mh-soft: #fbf7ee;
  --mh-paper: rgba(255, 253, 248, .86);
  --mh-paper-solid: #fffdf8;
  --mh-line: #ddd2c2;
  --mh-line-soft: rgba(23, 23, 23, .08);
  --mh-orange: #ff8a5b;
  --mh-yellow: #f4d35e;
  --mh-green: #2b9b84;
  --mh-blue: #5a8dee;
  --mh-danger: #b94735;
}

body {
  color: var(--mh-text) !important;
  background:
    linear-gradient(90deg, rgba(23, 23, 23, .035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 23, 23, .03) 1px, transparent 1px),
    radial-gradient(circle at 76% 10%, rgba(90, 141, 238, .13), transparent 28%),
    linear-gradient(135deg, #e5ebea 0%, #f8efe0 46%, #f3d8c1 100%) !important;
  background-size: 36px 36px, 36px 36px, cover, cover !important;
}

.shell {
  grid-template-columns: 286px minmax(0, 1fr) !important;
}

.sidebar {
  padding: 30px 28px !important;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .92), rgba(248, 241, 229, .82)) !important;
  border-right: 1px solid rgba(23, 23, 23, .11) !important;
  box-shadow: 10px 0 34px rgba(30, 28, 25, .055) !important;
}

.brand {
  height: 32px !important;
  margin-bottom: 34px !important;
  color: rgba(23, 23, 23, .66) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  letter-spacing: .13em !important;
}

.brand-mark {
  width: 26px !important;
  height: 26px !important;
  border-radius: 8px !important;
  background:
    radial-gradient(circle at 25% 22%, rgba(255, 255, 255, .82), transparent 24%),
    conic-gradient(from 35deg, var(--mh-orange), var(--mh-yellow), #78c66f, var(--mh-blue), var(--mh-orange)) !important;
  box-shadow: 4px 4px 0 rgba(23, 23, 23, .08) !important;
}

.sidebar-search {
  margin-bottom: 28px !important;
}

.sidebar-search input,
.field,
.select,
.search,
.multi-select-trigger,
.namespace-select {
  height: 42px !important;
  color: var(--mh-ink) !important;
  background: rgba(255, 253, 248, .74) !important;
  border: 1px solid rgba(23, 23, 23, .14) !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .58) inset !important;
}

.sidebar-search input {
  height: 44px !important;
  padding: 0 16px !important;
  font-size: 15px !important;
}

.sidebar-search input:focus,
.field:focus,
.select:focus,
.search:focus,
.multi-select-trigger:focus,
.namespace-select:focus {
  background: var(--mh-paper-solid) !important;
  border-color: rgba(23, 23, 23, .48) !important;
  box-shadow: 4px 4px 0 rgba(23, 23, 23, .08) !important;
}

.nav-group {
  margin: 8px 0 !important;
}

.nav-root-row {
  min-height: 36px !important;
}

.nav-root-link,
.nav-item {
  height: 38px !important;
  padding: 0 14px !important;
  color: #4b453d !important;
  font-size: 15px !important;
  font-weight: 760 !important;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav-root-link:hover,
.nav-item:hover {
  background: linear-gradient(90deg, rgba(255, 138, 91, .12), rgba(244, 211, 94, .05)) !important;
}

.nav-root-link.active,
.nav-item.active {
  background: linear-gradient(90deg, rgba(255, 138, 91, .2), rgba(244, 211, 94, .08) 72%, transparent) !important;
  box-shadow: none !important;
}

.nav-children {
  margin: 4px 0 16px !important;
  padding-left: 14px !important;
}

.main {
  padding: 34px 42px 46px !important;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .54), rgba(255, 253, 248, .16) 32%, transparent) !important;
}

.topbar {
  align-items: flex-start !important;
  margin-bottom: 28px !important;
}

.title {
  color: var(--mh-ink) !important;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif !important;
  font-size: 36px !important;
  font-weight: 860 !important;
  letter-spacing: 0 !important;
  line-height: 1.08 !important;
}

.subtitle {
  max-width: 720px;
  margin-top: 10px !important;
  color: #6d7b93 !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
}

.topbar .user {
  padding-top: 2px;
}

.namespace-switch {
  gap: 10px !important;
  color: #2f3a4b !important;
  font-size: 14px !important;
  font-weight: 720 !important;
}

.namespace-select {
  width: 142px !important;
}

.avatar {
  width: 42px !important;
  height: 42px !important;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .42), transparent 28%),
    linear-gradient(135deg, var(--mh-blue), #6f72f4) !important;
}

.account-trigger {
  min-height: 42px !important;
  padding-right: 4px !important;
}

.account-trigger #userName {
  color: var(--mh-ink);
  font-size: 15px;
  font-weight: 780;
}

.panel {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .92), rgba(255, 253, 248, .78)) !important;
  border: 1px solid rgba(23, 23, 23, .12) !important;
  border-radius: 8px !important;
  box-shadow: 0 24px 70px rgba(30, 28, 25, .08) !important;
  backdrop-filter: blur(10px);
}

.menu-workbench {
  grid-template-columns: minmax(720px, 1fr) minmax(300px, 380px) !important;
  gap: 20px !important;
  align-items: start;
}

.toolbar,
.bulk-bar,
.role-toolbar,
.user-toolbar {
  padding: 16px 18px !important;
  border-color: rgba(23, 23, 23, .1) !important;
  background: rgba(255, 253, 248, .48);
}

.toolbar-title {
  color: var(--mh-ink);
  font-size: 16px;
  font-weight: 860;
}

.toolbar-actions {
  min-width: 430px !important;
}

.bulk-bar {
  min-height: 54px;
  color: #3d4655;
}

.bulk-bar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}

.tree {
  padding: 14px 14px 18px !important;
}

.menu-node[data-depth]:not([data-depth="0"])::before {
  background: rgba(119, 135, 160, .18) !important;
}

.menu-row {
  grid-template-columns: minmax(330px, 1fr) minmax(176px, auto) minmax(136px, auto) auto !important;
  gap: 14px !important;
  min-height: 62px !important;
  margin: 3px 0 !important;
  padding: 9px 12px 9px calc(14px + var(--depth) * 28px) !important;
  border: 0 !important;
  border-radius: 6px !important;
  transition: background 140ms ease, transform 140ms ease;
}

.menu-row:hover {
  background:
    linear-gradient(90deg, rgba(255, 138, 91, .09), rgba(244, 211, 94, .04) 48%, rgba(255, 253, 248, .16)) !important;
}

.menu-row.selected {
  background:
    linear-gradient(90deg, rgba(255, 138, 91, .18), rgba(244, 211, 94, .08) 40%, rgba(255, 253, 248, .18) 100%) !important;
}

.node-main {
  gap: 10px !important;
}

.drag-handle {
  color: rgba(90, 115, 150, .44) !important;
}

.menu-check {
  accent-color: var(--mh-orange) !important;
}

.chevron {
  color: #7b8797 !important;
  border-radius: 5px !important;
}

.chevron:not(.placeholder):hover {
  background: rgba(255, 138, 91, .1) !important;
}

.node-name,
.permission-name {
  color: #141820 !important;
  font-size: 15px !important;
  font-weight: 850 !important;
}

.node-id,
.detail-title-id {
  color: #7b8496 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}

.node-path,
.permission-path,
.role-desc {
  color: #64748b !important;
  font-size: 12px !important;
}

.pill,
.user-role-chip {
  min-height: 26px !important;
  padding: 4px 10px !important;
  color: #4d463d !important;
  font-size: 12px !important;
  font-weight: 780 !important;
  background: rgba(23, 23, 23, .055) !important;
  border-radius: 3px !important;
}

.pill.menu {
  color: #354258 !important;
  background: rgba(90, 141, 238, .14) !important;
}

.pill.api {
  color: #0f7669 !important;
  background: rgba(43, 155, 132, .13) !important;
}

.pill.warn {
  color: #8a5b00 !important;
  background: rgba(244, 211, 94, .24) !important;
}

.row-actions {
  gap: 10px !important;
}

.primary-button,
.mini-button,
.icon-button,
.danger-button {
  min-height: 38px !important;
  padding: 0 14px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 820 !important;
}

.primary-button,
.mini-button.primary {
  color: #fff !important;
  background: var(--mh-ink) !important;
  border-color: var(--mh-ink) !important;
  box-shadow: 4px 4px 0 rgba(23, 23, 23, .14) !important;
}

.mini-button,
.icon-button {
  color: var(--mh-ink) !important;
  background: rgba(255, 253, 248, .74) !important;
  border-color: rgba(23, 23, 23, .14) !important;
}

.mini-button:hover,
.icon-button:hover {
  background: #fff !important;
  border-color: rgba(23, 23, 23, .42) !important;
}

.danger-button,
.mini-button.danger,
.icon-button.danger {
  color: var(--mh-danger) !important;
  background: rgba(255, 138, 91, .11) !important;
  border-color: rgba(185, 71, 53, .28) !important;
}

.danger-button:hover,
.mini-button.danger:hover,
.icon-button.danger:hover {
  background: rgba(255, 138, 91, .18) !important;
}

.detail {
  top: 24px !important;
  padding: 22px 20px !important;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .96), rgba(255, 253, 248, .8)) !important;
}

.detail-title,
.modal-title {
  color: var(--mh-ink) !important;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif !important;
  font-size: 26px !important;
  font-weight: 860 !important;
}

.detail-body {
  gap: 14px !important;
  margin-top: 22px !important;
}

.detail-row {
  grid-template-columns: 74px minmax(0, 1fr) !important;
  gap: 14px !important;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(23, 23, 23, .065);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-label,
.metric-label {
  color: #766f66 !important;
  font-size: 13px !important;
  font-weight: 780 !important;
}

.detail-row strong,
.detail-value {
  color: #151923 !important;
  font-size: 15px;
  font-weight: 820;
}

.role-panel,
.user-panel {
  background: rgba(255, 253, 248, .86) !important;
}

.role-table th,
.user-table th {
  color: #766f66 !important;
  background: rgba(23, 23, 23, .035) !important;
}

.role-table th,
.role-table td,
.user-table th,
.user-table td {
  padding: 15px 18px !important;
  border-color: rgba(23, 23, 23, .075) !important;
}

.role-table tbody tr:hover,
.user-table tbody tr:hover {
  background: rgba(255, 138, 91, .055);
}

.user-metrics,
.metric-grid {
  gap: 14px !important;
}

.user-metric,
.metric {
  min-height: 112px !important;
  padding: 20px !important;
}

.user-metric strong,
.metric-value {
  color: var(--mh-ink) !important;
  font-size: 30px !important;
  line-height: 1.1;
}

.pager {
  padding: 14px 18px !important;
  border-top: 1px solid rgba(23, 23, 23, .075);
}

.account-dropdown {
  border-radius: 6px !important;
}

@media (max-width: 1280px) {
  .shell {
    grid-template-columns: 260px minmax(0, 1fr) !important;
  }

  .main {
    padding: 28px !important;
  }

  .menu-workbench {
    grid-template-columns: 1fr !important;
  }

  .detail {
    position: static !important;
  }
}

/* Soften the sidebar edge and active menu treatment. */
.sidebar {
  position: relative !important;
  overflow: visible !important;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .82), rgba(249, 243, 232, .68)) !important;
  border-right: 0 !important;
  box-shadow: 16px 0 42px rgba(30, 28, 25, .035) !important;
}

.sidebar::after {
  position: absolute;
  top: 0;
  right: -34px;
  bottom: 0;
  z-index: 0;
  width: 34px;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, rgba(248, 243, 232, .68), rgba(248, 243, 232, 0));
}

.brand,
.sidebar-search,
.sidebar nav {
  position: relative;
  z-index: 1;
}

.brand {
  margin-bottom: 32px !important;
}

.brand-mark {
  border-radius: 10px !important;
  filter: saturate(.9);
  box-shadow: 0 10px 22px rgba(30, 28, 25, .08) !important;
}

.sidebar-search input {
  background: rgba(255, 253, 248, .58) !important;
  border-color: rgba(23, 23, 23, .12) !important;
  box-shadow: 0 10px 28px rgba(30, 28, 25, .025) !important;
}

.nav-root-row {
  overflow: visible !important;
}

.nav-root-link,
.nav-item {
  width: calc(100% - 10px);
  height: 36px !important;
  margin: 2px 10px 2px 0;
  padding: 0 12px !important;
  color: rgba(49, 44, 38, .84) !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 720 !important;
}

.nav-root-link:hover,
.nav-item:hover {
  background: linear-gradient(90deg, rgba(255, 138, 91, .08), rgba(244, 211, 94, .035), transparent) !important;
}

.nav-root-link.active,
.nav-item.active {
  color: var(--mh-ink) !important;
  background:
    radial-gradient(circle at 18% 50%, rgba(255, 138, 91, .16), transparent 42%),
    linear-gradient(90deg, rgba(255, 138, 91, .12), rgba(244, 211, 94, .045) 62%, rgba(255, 253, 248, 0)) !important;
  box-shadow: none !important;
}

.nav-children {
  padding-left: 18px !important;
}

.nav-child {
  padding-left: 12px !important;
}

.main {
  position: relative;
  z-index: 1;
}

/* Compact commerce-admin sidebar: figure-1 style, neutral and scan-friendly. */
.shell {
  grid-template-columns: 224px minmax(0, 1fr) !important;
}

.sidebar {
  width: 224px !important;
  padding: 18px 12px !important;
  overflow: hidden auto !important;
  color: #5f6368 !important;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .82), rgba(249, 243, 232, .68)) !important;
  border-right: 0 !important;
  box-shadow: 16px 0 42px rgba(30, 28, 25, .035) !important;
}

.sidebar::after {
  display: block !important;
  position: absolute;
  top: 0;
  right: -34px;
  bottom: 0;
  z-index: 0;
  width: 34px;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, rgba(248, 243, 232, .68), rgba(248, 243, 232, 0));
}

.brand {
  height: 34px !important;
  margin: 0 6px 16px !important;
  gap: 9px !important;
  color: #5f6368 !important;
  font-size: 12px !important;
  font-weight: 780 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase;
}

.brand-mark {
  width: 26px !important;
  height: 26px !important;
  border-radius: 7px !important;
  font-size: 0 !important;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, .55), transparent 25%),
    conic-gradient(from 210deg, #73c76b, #7bb2f6, #f08b6f, #f7d25e, #73c76b) !important;
  box-shadow: 0 5px 14px rgba(76, 96, 130, .12) !important;
}

.sidebar-search {
  margin: 0 4px 14px !important;
}

.sidebar-search input {
  height: 32px !important;
  padding: 0 10px !important;
  color: #3f444b !important;
  background: #ffffff !important;
  border: 1px solid #e4e8ee !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 520 !important;
}

.sidebar-search input::placeholder {
  color: #a1a6ad !important;
}

.sidebar-search input:focus {
  border-color: #cfd6df !important;
  box-shadow: 0 0 0 2px rgba(83, 118, 242, .1) !important;
}

.sidebar nav {
  padding: 0 !important;
}

.nav-group {
  margin: 1px 0 !important;
}

.nav-root-row {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) !important;
  min-height: 32px !important;
  border-radius: 4px !important;
  background: transparent !important;
}

.nav-root-row:hover {
  background: transparent !important;
}

.nav-root-link,
.nav-item {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) !important;
  align-items: center !important;
  width: 100% !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 0 7px !important;
  overflow: visible !important;
  color: #686d73 !important;
  background: transparent !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 560 !important;
  letter-spacing: 0 !important;
}

.nav-root-link.has-toggle {
  grid-template-columns: minmax(0, 1fr) !important;
  padding-left: 10px !important;
}

.nav-root-link:hover,
.nav-item:hover {
  color: #3e4248 !important;
  background: #f1f4f8 !important;
}

.nav-root-link.active,
.nav-item.active {
  color: #2f3338 !important;
  background: #eef3ff !important;
  box-shadow: none !important;
  font-weight: 740 !important;
}

.nav-root-link.active::before,
.nav-item.active::before {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  width: 2px;
  content: "";
  background: #5b74f2;
  border-radius: 999px;
}

.nav-icon {
  position: relative;
  display: grid;
  width: 18px;
  min-width: 18px;
  height: 18px;
  place-items: center;
  color: #666b70;
  opacity: .92;
}

.nav-icon::before,
.nav-icon::after {
  position: absolute;
  content: "";
  box-sizing: border-box;
}

.nav-icon-dashboard::before {
  width: 6px;
  height: 6px;
  left: 2px;
  top: 2px;
  background: currentColor;
  box-shadow: 8px 0 0 currentColor, 0 8px 0 currentColor, 8px 8px 0 currentColor;
}

.nav-icon-menu::before,
.nav-icon-invoice::before,
.nav-icon-log::before {
  width: 14px;
  height: 12px;
  left: 2px;
  top: 3px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.nav-icon-menu::after,
.nav-icon-invoice::after,
.nav-icon-log::after {
  width: 8px;
  height: 2px;
  left: 5px;
  top: 7px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.nav-icon-role::before,
.nav-icon-item::before {
  width: 10px;
  height: 14px;
  left: 4px;
  top: 2px;
  background: currentColor;
  border-radius: 1px 1px 5px 5px;
}

.nav-icon-user::before {
  width: 6px;
  height: 6px;
  left: 3px;
  top: 3px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 8px 0 0 currentColor;
}

.nav-icon-user::after {
  width: 16px;
  height: 7px;
  left: 1px;
  top: 11px;
  background: currentColor;
  border-radius: 8px 8px 2px 2px;
}

.nav-icon-money::before {
  left: 5px;
  top: -1px;
  content: "$";
  color: currentColor;
  font-size: 18px;
  font-weight: 760;
  line-height: 18px;
}

.nav-root-link.active .nav-icon,
.nav-item.active .nav-icon,
.nav-root-link:hover .nav-icon,
.nav-item:hover .nav-icon {
  color: #555a60;
}

.nav-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-toggle {
  width: 22px !important;
  height: 32px !important;
  color: #70757a !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-size: 16px !important;
  transform: rotate(0deg) !important;
}

.nav-toggle.open {
  color: #70757a !important;
  transform: rotate(90deg) !important;
}

.nav-children {
  display: grid !important;
  gap: 1px !important;
  padding: 0 0 3px 22px !important;
  margin: 0 !important;
  border: 0 !important;
}

.nav-children::before,
.nav-child::before {
  display: none !important;
}

.nav-root-link.active::before,
.nav-item.active::before {
  display: block !important;
}

.nav-child {
  padding-left: 0 !important;
}

.nav-skeleton {
  padding: 4px 6px !important;
}

.nav-loading-state {
  padding: 6px 2px 8px !important;
  color: #8b9199 !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

.nav-skeleton-root,
.nav-skeleton-item {
  height: 26px !important;
  margin: 5px 0 !important;
  border-radius: 4px !important;
  background: linear-gradient(90deg, #eef1f5, #f7f8fa, #eef1f5) !important;
}

.sidebar-empty,
.sidebar .state {
  color: #8b9199 !important;
  font-size: 12px !important;
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 224px minmax(0, 1fr) !important;
  }
}

/* Configured font icons for menus. No fallback icon is rendered when the menu icon is empty. */
.font-icon {
  display: inline-grid;
  place-items: center;
  font-style: normal;
  line-height: 1;
  color: currentColor;
}

.nav-root-link.has-icon,
.nav-item.has-icon {
  grid-template-columns: 24px minmax(0, 1fr) !important;
}

.nav-root-link.no-icon,
.nav-item.no-icon {
  grid-template-columns: minmax(0, 1fr) !important;
}

.nav-font-icon {
  width: 18px;
  height: 18px;
  color: #666b70;
  font-size: 16px;
  opacity: .92;
}

.menu-node-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: #687281;
  font-size: 17px;
}

.menu-detail-icon {
  width: 22px;
  height: 22px;
  color: #687281;
  font-size: 18px;
}

.menu-icon-detail {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.form-row-full {
  grid-column: 1 / -1;
}

.hint-text {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.5;
  color: #718096;
}

/* Final sidebar treatment, aligned with Cloudflare-style product navigation. */
.shell {
  grid-template-columns: 286px minmax(0, 1fr) !important;
}

.sidebar {
  width: 286px !important;
  padding: 18px 10px !important;
  color: #55585d !important;
  background:
    linear-gradient(180deg, rgba(250, 250, 249, .96), rgba(246, 244, 239, .9)) !important;
  border-right: 1px solid rgba(24, 24, 24, .08) !important;
  box-shadow: 14px 0 28px rgba(32, 31, 29, .03) !important;
}

.sidebar::after {
  display: none !important;
}

.brand {
  height: 42px !important;
  margin: 0 10px 18px !important;
}

.sidebar-search {
  margin: 0 8px 18px !important;
}

.sidebar-search input {
  height: 40px !important;
  border-color: rgba(28, 28, 28, .14) !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, .72) !important;
  font-size: 14px !important;
}

.nav-group {
  margin: 2px 0 !important;
}

.nav-root-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px !important;
  align-items: center !important;
  min-height: 52px !important;
  border-radius: 12px !important;
  background: transparent !important;
}

.nav-root-row:hover {
  background: rgba(32, 32, 32, .045) !important;
}

.nav-root-row:has(.nav-root-link.active) {
  background: rgba(32, 32, 32, .052) !important;
}

.nav-root-link,
.nav-item {
  position: relative !important;
  display: grid !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 52px !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 0 14px 0 22px !important;
  color: #53565a !important;
  background: transparent !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  font-size: 16px !important;
  font-weight: 560 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

.nav-root-link.has-icon,
.nav-item.has-icon {
  grid-template-columns: 42px minmax(0, 1fr) !important;
}

.nav-root-link.no-icon,
.nav-item.no-icon {
  grid-template-columns: minmax(0, 1fr) !important;
}

.nav-root-link:hover,
.nav-item:hover {
  color: #111213 !important;
  background: transparent !important;
}

.nav-root-link.active {
  color: #101112 !important;
  background: transparent !important;
  font-weight: 700 !important;
}

.nav-item.active {
  color: #101112 !important;
  background: transparent !important;
  font-weight: 700 !important;
}

.nav-root-link.active::before,
.nav-item.active::before {
  display: none !important;
}

.nav-font-icon {
  width: 22px !important;
  height: 22px !important;
  color: #9a9c9f !important;
  font-size: 19px !important;
}

.nav-root-link:hover .nav-font-icon,
.nav-root-link.active .nav-font-icon,
.nav-item:hover .nav-font-icon,
.nav-item.active .nav-font-icon {
  color: #777a7e !important;
}

.nav-text {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.nav-toggle {
  display: grid !important;
  width: 34px !important;
  height: 52px !important;
  place-items: center !important;
  color: #8f9296 !important;
  background: transparent !important;
  border-radius: 12px !important;
  font-size: 24px !important;
  line-height: 1 !important;
  transform: rotate(-90deg) !important;
  transition: transform 140ms ease, color 140ms ease !important;
}

.nav-toggle.open {
  color: #53565a !important;
  transform: rotate(0deg) !important;
}

.nav-children {
  position: relative !important;
  display: grid !important;
  gap: 0 !important;
  margin: 4px 0 10px 38px !important;
  padding: 4px 0 6px 24px !important;
  border-left: 1px solid rgba(45, 45, 45, .12) !important;
}

.nav-children::before,
.nav-child::before {
  display: none !important;
}

.nav-child {
  height: auto !important;
  min-height: 54px !important;
  padding: 7px 12px 7px 14px !important;
  border-radius: 8px !important;
}

.nav-child.has-icon {
  grid-template-columns: 34px minmax(0, 1fr) !important;
}

.nav-child.no-icon {
  grid-template-columns: minmax(0, 1fr) !important;
}

.nav-child:hover {
  background: rgba(32, 32, 32, .035) !important;
}

.nav-child-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.nav-subtext {
  min-width: 0;
  overflow: hidden;
  color: #9a9c9f;
  font-size: 12px;
  font-weight: 520;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-empty,
.sidebar .state {
  color: #8f9296 !important;
  font-size: 14px !important;
}

.sidebar-collapse-button {
  position: absolute;
  right: 12px;
  bottom: 18px;
  z-index: 5;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #777a7e;
  cursor: pointer;
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(28, 28, 28, .12);
  border-radius: 8px;
  box-shadow: none;
}

.sidebar-collapse-button:hover {
  color: #171717;
  background: rgba(32, 32, 32, .055);
}

.sidebar-collapse-button span {
  font-size: 26px;
  line-height: 1;
  transition: transform 140ms ease;
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 286px minmax(0, 1fr) !important;
  }
}

/* Final workspace frame: left navigation + top product bar + scrolling content. */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
  background:
    linear-gradient(90deg, rgba(246, 244, 239, .94) 0, rgba(246, 244, 239, .94) 286px, transparent 286px),
    #f8f7f3 !important;
}

body.sidebar-collapsed {
  background:
    linear-gradient(90deg, rgba(246, 244, 239, .94) 0, rgba(246, 244, 239, .94) 72px, transparent 72px),
    #f8f7f3 !important;
}

body::before,
body::after {
  content: "" !important;
  position: fixed !important;
  z-index: 80 !important;
  pointer-events: none !important;
}

body::before {
  top: 0 !important;
  bottom: 0 !important;
  left: 286px !important;
  width: 1px !important;
  background: rgba(28, 28, 28, .1) !important;
}

body::after {
  top: 56px !important;
  left: 0 !important;
  right: 0 !important;
  height: 1px !important;
  background: rgba(28, 28, 28, .1) !important;
}

body.sidebar-collapsed::before {
  left: 72px !important;
}

.shell {
  display: grid !important;
  grid-template-columns: 286px minmax(0, 1fr) !important;
  width: 100vw !important;
  min-width: 0 !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  background: transparent !important;
}

body.sidebar-collapsed .shell {
  grid-template-columns: 72px minmax(0, 1fr) !important;
}

.sidebar {
  position: relative !important;
  top: auto !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden auto !important;
}

body.sidebar-collapsed .sidebar {
  width: 72px !important;
  padding: 18px 8px !important;
}

body.sidebar-collapsed .brand {
  justify-content: center !important;
  margin: 0 0 22px !important;
}

body.sidebar-collapsed .brand span,
body.sidebar-collapsed .sidebar-search,
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .nav-subtext,
body.sidebar-collapsed .nav-toggle,
body.sidebar-collapsed .nav-children {
  display: none !important;
}

body.sidebar-collapsed .nav-root-row {
  display: block !important;
  min-height: 48px !important;
  margin: 6px 0 !important;
  border-radius: 12px !important;
}

body.sidebar-collapsed .nav-root-row:has(.nav-root-link.no-icon) {
  display: none !important;
}

body.sidebar-collapsed .nav-root-link,
body.sidebar-collapsed .nav-item {
  display: grid !important;
  grid-template-columns: 1fr !important;
  width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  justify-items: center !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

body.sidebar-collapsed .nav-root-link.no-icon {
  display: none !important;
}

body.sidebar-collapsed .nav-font-icon {
  width: 24px !important;
  height: 24px !important;
  font-size: 21px !important;
}

body.sidebar-collapsed .sidebar-collapse-button {
  right: 18px;
  bottom: 18px;
  width: 36px;
  height: 36px;
}

body.sidebar-collapsed .sidebar-collapse-button span {
  transform: rotate(180deg);
}

.main {
  display: grid !important;
  grid-template-rows: 64px minmax(0, 1fr) !important;
  min-width: 0 !important;
  height: 100vh !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background:
    linear-gradient(rgba(30, 30, 30, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 30, 30, .035) 1px, transparent 1px),
    #f7f6f1 !important;
  background-size: 40px 40px;
}

.topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 18px !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 0 18px 0 24px !important;
  background: rgba(248, 247, 243, .96) !important;
  border-bottom: 1px solid rgba(28, 28, 28, .1) !important;
  backdrop-filter: blur(10px);
}

.topbar > div:not(.project-switch):first-of-type {
  min-width: 0;
}

.title {
  overflow: hidden;
  color: #171717 !important;
  font-size: 18px !important;
  font-weight: 680 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtitle {
  margin-top: 3px !important;
  overflow: hidden;
  color: #767a80 !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section.active {
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 24px 28px 36px !important;
  overflow: auto !important;
}

.project-switch-title {
  min-width: 0;
  overflow: hidden;
  font-size: 14px !important;
  font-weight: 640 !important;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.namespace-select:hover {
  background-color: rgba(28, 28, 28, .06) !important;
}

.namespace-select:focus {
  background-color: rgba(255, 255, 255, .88) !important;
  box-shadow: 0 0 0 2px rgba(0, 81, 255, .14) !important;
}

.account-trigger {
  min-height: 40px !important;
  padding: 0 6px 0 0 !important;
  border-radius: 8px !important;
}

.account-trigger:hover {
  background: rgba(28, 28, 28, .055);
}

.avatar {
  width: 30px !important;
  height: 30px !important;
  color: #494949 !important;
  background: rgba(28, 28, 28, .1) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-size: 13px !important;
}

.account-trigger #userName {
  max-width: 160px !important;
  color: #262626 !important;
  font-size: 14px !important;
  font-weight: 560 !important;
}

.account-dropdown {
  top: calc(100% + 8px) !important;
  min-width: 172px !important;
  padding: 8px !important;
  background: #fff !important;
  border: 1px solid rgba(28, 28, 28, .13) !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .16) !important;
}

.account-dropdown .logout {
  height: 38px !important;
  padding: 0 10px !important;
  color: #c31313 !important;
  border-radius: 6px !important;
  font-size: 14px !important;
}

.account-dropdown .logout:hover {
  color: #b00000 !important;
  background: rgba(220, 38, 38, .08) !important;
}

.panel {
  background: rgba(255, 255, 255, .86) !important;
}

/* Final sidebar density pass: compact Cloudflare-like text rhythm and clean collapsed rail. */
.sidebar {
  padding: 18px 12px 56px !important;
}

.brand {
  min-height: 30px !important;
  margin: 0 0 14px !important;
}

.brand-mark {
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px !important;
}

.brand span {
  font-size: 12px !important;
}

.sidebar-search {
  position: relative;
  z-index: 100;
  margin: 0 0 12px !important;
}

.sidebar-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px 24px;
  gap: 2px;
  align-items: center;
}

.sidebar-search input {
  min-width: 0;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

.sidebar-search-action {
  display: inline-grid;
  width: 24px;
  height: 30px;
  padding: 0;
  place-items: center;
  color: #667085;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.sidebar-search-action:hover,
.sidebar-search-action[aria-expanded="true"] {
  color: #2563eb;
  background: #eff6ff;
}

.sidebar-search-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.16);
}

.sidebar-search-action .bi {
  font-size: 14px;
  line-height: 1;
}

.sidebar-menu-picker {
  position: absolute;
  z-index: 101;
  top: calc(100% + 6px);
  right: 0;
  width: 100%;
  max-height: min(420px, calc(100vh - 150px));
  padding: 6px;
  overflow-y: auto;
  color: #344054;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
  opacity: 1 !important;
  backdrop-filter: none !important;
  isolation: isolate;
}

#sideMenu {
  position: relative;
  z-index: 1;
}

.sidebar-menu-picker[hidden] {
  display: none;
}

.sidebar-menu-picker-item {
  display: flex;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  align-items: center;
  gap: 8px;
  color: #344054;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.sidebar-menu-picker-item:hover {
  background: #f2f4f7;
}

.sidebar-menu-picker-item.active {
  color: #175cd3;
  background: #eff8ff;
}

.sidebar-menu-picker-item .nav-icon {
  flex: 0 0 auto;
}

.sidebar-menu-picker-empty {
  padding: 12px 10px;
  color: #98a2b3;
  font-size: 13px;
  text-align: center;
}

.nav-group {
  margin: 1px 0 !important;
}

.nav-root-row {
  grid-template-columns: minmax(0, 1fr) 28px !important;
  min-height: 36px !important;
  border-radius: 9px !important;
}

.nav-root-row.has-pin {
  grid-template-columns: minmax(0, 1fr) 24px 28px !important;
}

.nav-child-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: center !important;
  min-height: 44px !important;
}

.nav-child-row.has-pin {
  grid-template-columns: minmax(0, 1fr) 24px 28px !important;
}

.nav-root-link,
.nav-item {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 10px 0 14px !important;
  border-radius: 9px !important;
  font-size: 14px !important;
  font-weight: 560 !important;
}

.nav-root-link {
  font-size: 14px !important;
  font-weight: 620 !important;
}

.nav-child {
  height: 44px !important;
  min-height: 44px !important;
  font-size: 13px !important;
}

.nav-root-link.has-icon,
.nav-item.has-icon {
  grid-template-columns: 32px minmax(0, 1fr) !important;
}

.nav-font-icon {
  width: 18px !important;
  height: 18px !important;
  font-size: 17px !important;
}

.nav-subtext {
  font-size: 11px !important;
  line-height: 1.25 !important;
}

.nav-toggle {
  border: 0 !important;
  cursor: pointer !important;
  width: 28px !important;
  height: 36px !important;
  font-size: 13px !important;
}

.nav-pin-button {
  display: grid !important;
  width: 24px !important;
  height: 24px !important;
  place-items: center !important;
  color: #b0b3b7 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 6px !important;
  opacity: .55;
  transition: opacity 120ms ease, color 120ms ease, background 120ms ease !important;
}

.nav-root-row:hover .nav-pin-button,
.nav-child-row:hover .nav-pin-button,
.nav-pin-button.active {
  opacity: 1;
}

.nav-pin-button:hover {
  color: #8c5c12 !important;
  background: rgba(201, 138, 17, .1) !important;
}

.nav-pin-button.active {
  color: #a16810 !important;
}

.nav-children {
  margin-left: 22px !important;
  padding: 2px 0 3px 18px !important;
}

.nav-group.collapsed .nav-children {
  display: none !important;
}

.nav-children .nav-child.no-icon {
  grid-template-columns: 32px minmax(0, 1fr) !important;
}

.nav-children .nav-child.no-icon .nav-child-copy {
  grid-column: 2 !important;
}

.nav-children .nav-child.no-icon .nav-text {
  text-align: left !important;
}

.nav-group.tail-root .nav-children {
  border-left-color: transparent !important;
}

.nav-group.tail-root:not(:first-child)::before {
  top: -18px !important;
  height: 36px !important;
  bottom: auto !important;
  left: 22px !important;
  width: 34px !important;
  background: transparent !important;
  border-left: 1px solid rgba(45, 45, 45, .12) !important;
  border-bottom: 1px solid rgba(45, 45, 45, .12) !important;
  border-bottom-left-radius: 10px !important;
}

.nav-group.tail-root:not(:first-child) .nav-root-row::before {
  display: none !important;
}

body.sidebar-collapsed .nav-root-row {
  min-height: 48px !important;
}

body.sidebar-collapsed .nav-group:has(.nav-root-link.no-icon) {
  display: none !important;
}

body.sidebar-collapsed .nav-root-link,
body.sidebar-collapsed .nav-item {
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 !important;
}

/* Final topbar density pass. */
.topbar {
  min-height: 56px !important;
  padding: 0 16px 0 24px !important;
}

.pinned-menu-bar[hidden] {
  display: none !important;
}

.pinned-menu-bar::-webkit-scrollbar {
  display: none;
}

.pinned-menu-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 1px;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.pinned-menu-open,
.pinned-menu-remove {
  border: 0;
  background: transparent;
}

.pinned-menu-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 148px;
  height: 26px;
  padding: 0 9px;
  color: #4a4f57;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 560;
  white-space: nowrap;
  border: 1px solid rgba(28, 28, 28, .08);
  background: rgba(255, 255, 255, .62);
}

.pinned-menu-open:hover {
  background: rgba(255, 255, 255, .88);
}

.pinned-menu-open span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pinned-menu-icon {
  width: 13px;
  height: 13px;
  color: #8b9097;
  font-size: 13px;
  flex: 0 0 auto;
}

.pinned-menu-remove {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #9a9ea4;
  border-radius: 6px;
  font-size: 10px;
}

.pinned-menu-remove:hover {
  color: #6e7379;
  background: rgba(28, 28, 28, .05);
}

.title {
  font-size: 16px !important;
  font-weight: 680 !important;
}

.subtitle {
  display: none !important;
}

.topbar .user {
  min-height: 36px !important;
  gap: 6px !important;
}

.account-trigger {
  min-height: 34px !important;
  padding: 0 8px 0 4px !important;
  border-radius: 8px !important;
}

.avatar {
  width: 26px !important;
  height: 26px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

.account-trigger #userName {
  max-width: 150px !important;
  font-size: 12px !important;
  font-weight: 620 !important;
}

.account-dropdown {
  top: calc(100% + 2px) !important;
  min-width: 144px !important;
}

.account-dropdown .logout {
  height: 34px !important;
  font-size: 13px !important;
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    padding-right: 14px !important;
  }

  .pinned-menu-open {
    max-width: 124px;
  }

  .section.active {
    padding: 18px !important;
  }
}

/* Internal iframe workspace should spend pixels on the embedded app, not chrome. */
body[data-page="Internal"] .section.active {
  padding: 0 !important;
  overflow: hidden !important;
}

body[data-page="Internal"] .Internal-workspace-section {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

body[data-page="Internal"] .Internal-window-bar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 42px !important;
  padding: 6px 10px 6px 12px !important;
  background: rgba(248, 247, 243, .96) !important;
  border-bottom: 1px solid rgba(28, 28, 28, .1) !important;
}

body[data-page="Internal"] .Internal-window-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  overflow: auto hidden !important;
  scrollbar-width: none !important;
}

body[data-page="Internal"] .Internal-window-tabs::-webkit-scrollbar {
  display: none !important;
}

body[data-page="Internal"] .Internal-window-tab {
  display: inline-grid !important;
  grid-template-columns: minmax(0, 1fr) 24px !important;
  align-items: center !important;
  min-width: 112px !important;
  max-width: 220px !important;
  height: 30px !important;
  overflow: hidden !important;
  border: 1px solid rgba(28, 28, 28, .1) !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, .58) !important;
}

body[data-page="Internal"] .Internal-window-tab.active {
  border-color: rgba(36, 99, 235, .26) !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: inset 0 -2px 0 rgba(36, 99, 235, .72) !important;
}

body[data-page="Internal"] .Internal-window-tab.is-loading .Internal-window-tab-main::after {
  content: "" !important;
  width: 6px !important;
  height: 6px !important;
  margin-left: 4px !important;
  border-radius: 50% !important;
  background: #2563eb !important;
}

body[data-page="Internal"] .Internal-window-tab-main,
body[data-page="Internal"] .Internal-window-tab-close,
body[data-page="Internal"] .Internal-window-action {
  border: 0 !important;
  background: transparent !important;
}

body[data-page="Internal"] .Internal-window-tab-main {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  height: 100% !important;
  padding: 0 6px 0 9px !important;
  color: #343840 !important;
  font-size: 12px !important;
  font-weight: 580 !important;
  text-align: left !important;
}

body[data-page="Internal"] .Internal-window-tab-main span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-page="Internal"] .Internal-window-tab-icon {
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 auto !important;
  color: #7b818a !important;
  font-size: 14px !important;
}

body[data-page="Internal"] .Internal-window-tab-close {
  display: grid !important;
  width: 24px !important;
  height: 24px !important;
  place-items: center !important;
  color: #9a9ea4 !important;
  border-radius: 6px !important;
  font-size: 10px !important;
}

body[data-page="Internal"] .Internal-window-tab-close:hover,
body[data-page="Internal"] .Internal-window-action:hover:not(:disabled) {
  color: #424750 !important;
  background: rgba(28, 28, 28, .06) !important;
}

body[data-page="Internal"] .Internal-window-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

body[data-page="Internal"] .Internal-window-action {
  display: grid !important;
  width: 30px !important;
  height: 30px !important;
  place-items: center !important;
  color: #6f757d !important;
  border-radius: 7px !important;
  font-size: 14px !important;
}

body[data-page="Internal"] .Internal-window-action:disabled {
  cursor: not-allowed !important;
  opacity: .38 !important;
}

body[data-page="Internal"] .Internal-window-stage {
  position: relative !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body[data-page="Internal"] .Internal-frame-panel {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body[data-page="Internal"] .Internal-frame-panel[hidden] {
  display: none !important;
}

body[data-page="Internal"] .Internal-frame {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}

@media (max-width: 760px) {
  body[data-page="Internal"] .Internal-window-bar {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  body[data-page="Internal"] .Internal-window-actions {
    display: none !important;
  }

  body[data-page="Internal"] .Internal-window-tab {
    min-width: 104px !important;
    max-width: 168px !important;
  }
}

.topbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px auto !important;
  align-items: center !important;
  column-gap: 12px !important;
}

.topbar > .topbar-toolbar {
  grid-column: 1 !important;
  min-width: 0 !important;
}

.topbar > .notification-center {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: end !important;
  display: block !important;
}

.topbar > .user {
  grid-column: 3 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: end !important;
}
