:root {
  --ccb-sidebar-width: 232px;
  --ccb-primary: #5b55d6;
  --ccb-primary-deep: #4741bc;
  --ccb-primary-soft: #f0efff;
  --ccb-bg: #f3f5f9;
  --ccb-surface: #ffffff;
  --ccb-text: #202734;
  --ccb-text-soft: #5f6978;
  --ccb-muted: #8a94a3;
  --ccb-border: #e5e8ee;
  --ccb-border-strong: #d8dce5;
  --ccb-success: #18a55b;
  --ccb-danger: #e34d59;
}

.app-shell {
  min-height: 100vh;
  background: var(--ccb-bg);
}

.ccb-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: var(--ccb-sidebar-width);
  color: var(--ccb-text);
  background: var(--ccb-surface);
  border-right: 1px solid var(--ccb-border);
  box-shadow: 2px 0 10px rgba(36, 45, 64, 0.025);
}

.ccb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  flex: 0 0 64px;
  padding: 0 18px;
  border-bottom: 1px solid var(--ccb-border);
}
.ccb-brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #766eff, var(--ccb-primary));
  box-shadow: 0 5px 12px rgba(91, 85, 214, 0.22);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}
.ccb-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.ccb-brand strong { font-size: 15px; font-weight: 750; letter-spacing: 0.01em; }
.ccb-brand small { margin-top: 4px; color: var(--ccb-muted); font-size: 8px; font-weight: 700; letter-spacing: 0.13em; }

.ccb-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
  padding: 16px 11px;
  overflow-y: auto;
}
.ccb-nav-link,
.ccb-nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: #525d6d;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}
.ccb-nav-link:hover,
.ccb-nav-group-toggle:hover { color: var(--ccb-primary); background: #f6f6fc; }
.ccb-nav-link.active,
.ccb-nav-group-toggle.active { color: var(--ccb-primary); background: var(--ccb-primary-soft); font-weight: 700; }
.ccb-nav-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: #657083;
  border: 1px solid #d7dce5;
  border-radius: 5px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
}
.ccb-nav-link.active .ccb-nav-icon,
.ccb-nav-group-toggle.active .ccb-nav-icon { color: #fff; background: var(--ccb-primary); border-color: var(--ccb-primary); }
.ccb-chevron { margin-left: auto; color: #9aa3b1; font-size: 15px; transition: transform 0.18s ease; }
.ccb-nav-group-toggle[aria-expanded="false"] .ccb-chevron { transform: rotate(-90deg); }
.ccb-nav-children {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0 7px 26px;
  padding-left: 11px;
  border-left: 1px solid #e5e7ee;
}
.ccb-nav-children button {
  min-height: 35px;
  padding: 0 11px;
  color: #667182;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.ccb-nav-children button:hover { color: var(--ccb-primary); background: #f7f7fc; }
.ccb-nav-children button.active { color: var(--ccb-primary); background: var(--ccb-primary-soft); font-weight: 700; }

.ccb-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 78px;
  margin-top: auto;
  padding: 13px 14px;
  border-top: 1px solid var(--ccb-border);
  background: #fcfcfd;
}
.ccb-profile .user-chip { min-width: 0; gap: 9px; }
.ccb-profile .user-chip div { min-width: 0; }
.ccb-profile .user-chip strong,
.ccb-profile .user-chip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccb-profile .avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #766eff, var(--ccb-primary)); font-size: 13px; }
.ccb-role-badge { align-self: end; margin-bottom: 7px; padding: 2px 6px; color: var(--ccb-primary); background: var(--ccb-primary-soft); border-radius: 4px; font-size: 9px; white-space: nowrap; }
.ccb-logout-button {
  grid-column: 1 / -1;
  min-height: 27px;
  color: #788292;
  border: 1px solid var(--ccb-border);
  border-radius: 5px;
  background: #fff;
  font-size: 10px;
  cursor: pointer;
}
.ccb-logout-button:hover { color: var(--ccb-danger); border-color: rgba(227, 77, 89, 0.35); }

.app-main {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--ccb-sidebar-width);
}
.ccb-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--ccb-border);
  backdrop-filter: blur(12px);
}
.ccb-mobile-menu {
  display: none;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--ccb-text);
  border: 1px solid var(--ccb-border);
  border-radius: 6px;
  background: #fff;
  font-size: 16px;
  cursor: pointer;
}
.ccb-page-heading { min-width: 0; flex: 1 1 auto; }
.ccb-page-heading p { margin: 0 0 3px; color: var(--ccb-muted); font-size: 9px; letter-spacing: 0.05em; }
.ccb-page-heading h1 { margin: 0; overflow: hidden; color: var(--ccb-text); font-size: 17px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.ccb-top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ccb-top-actions .connection-chip { min-height: 32px; padding: 0 11px; color: #697384; background: #fafbfc; border-color: var(--ccb-border); border-radius: 7px; font-size: 10px; }
.ccb-top-button {
  min-height: 32px;
  padding: 0 12px;
  color: #525d6d;
  border: 1px solid var(--ccb-border-strong);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}
.ccb-top-button:hover { color: var(--ccb-primary); border-color: rgba(91, 85, 214, 0.4); background: #fafaff; }
.ccb-service-state { display: flex; align-items: center; gap: 6px; color: #5f6a78; font-size: 10px; white-space: nowrap; }
.ccb-service-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--ccb-success); box-shadow: 0 0 0 3px rgba(24, 165, 91, 0.1); }

.ccb-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  color: var(--ccb-muted);
  background: #f7f8fb;
  border-bottom: 1px solid var(--ccb-border);
  font-size: 12px;
}
.ccb-breadcrumb #breadcrumbParent,
.ccb-breadcrumb b { display: none; }
.ccb-breadcrumb strong { padding: 4px 8px; color: var(--ccb-primary); background: var(--ccb-primary-soft); border-radius: 4px; font-size: 11px; font-weight: 600; }

.workspace {
  max-width: none;
  padding: 20px 24px 30px;
}
.admin-slot-card {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--ccb-border);
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(35, 43, 60, 0.04);
}
.admin-slot-card .section-heading { margin-bottom: 10px; }
.admin-slot-card .section-heading h2 { font-family: var(--font-body); font-size: 17px; font-weight: 700; }
.admin-slot-card .eyebrow { margin-bottom: 4px; color: var(--ccb-primary); font-size: 8px; letter-spacing: 0.12em; }
.slot-mode-tag { padding: 3px 7px; color: var(--ccb-primary); background: var(--ccb-primary-soft); border-radius: 4px; font-size: 9px; font-weight: 700; }
.admin-slot-card select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: var(--ccb-text);
  background: #fff;
  border: 1px solid var(--ccb-border-strong);
  border-radius: 5px;
  font-size: 12px;
}
.admin-slot-card .primary-button.small-button { width: 100%; margin-top: 9px; color: #fff; background: var(--ccb-primary); border-color: var(--ccb-primary); border-radius: 5px; box-shadow: none; }
.admin-slot-card .primary-button.small-button:hover { background: var(--ccb-primary-deep); box-shadow: none; transform: none; }
.admin-slot-card .primary-button.small-button:disabled { opacity: 0.42; cursor: not-allowed; }
.admin-slot-card p:last-child { margin: 9px 0 0; color: var(--ccb-muted); font-size: 9px; line-height: 1.55; }
.system-shell {
  display: block;
  max-width: none;
  margin: 0;
  padding: 14px 24px 28px;
}
.system-content { min-width: 0; }
.system-page { animation: ccb-page-in 0.24s ease both; }
.admin-surface {
  overflow: hidden;
  background: var(--ccb-surface);
  border: 1px solid var(--ccb-border);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(35, 43, 60, 0.025);
}
.admin-page-head,
.system-hero {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 0;
  padding: 18px 20px 16px;
  overflow: visible;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.system-hero::after { display: none; }
.system-hero-copy { position: static; min-width: 0; }
.system-hero .eyebrow { margin-bottom: 6px; color: var(--ccb-primary); font-size: 9px; letter-spacing: 0.12em; }
.system-hero h1 { margin: 0; color: var(--ccb-text); font-family: var(--font-body); font-size: 19px; font-weight: 750; letter-spacing: 0; line-height: 1.35; }
.system-hero p:last-child { max-width: 760px; margin: 5px 0 0; color: var(--ccb-muted); font-size: 11px; line-height: 1.55; }
.system-actions { position: static; display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }

.system-button {
  min-height: 34px;
  padding: 0 13px;
  color: #505b6b;
  background: #fff;
  border: 1px solid var(--ccb-border-strong);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.system-button:hover { color: var(--ccb-primary); border-color: rgba(91, 85, 214, 0.42); background: #fafaff; }
.system-button.primary { color: #fff; background: var(--ccb-primary); border-color: var(--ccb-primary); box-shadow: none; }
.system-button.primary:hover { color: #fff; background: var(--ccb-primary-deep); border-color: var(--ccb-primary-deep); transform: none; box-shadow: none; }
.system-button.danger { color: var(--ccb-danger); background: #fff; border-color: rgba(227, 77, 89, 0.32); }
.system-button.danger:hover { color: #c93643; background: #fff7f8; border-color: rgba(227, 77, 89, 0.5); }
.system-button.ghost { background: transparent; }
.system-button.small { min-height: 27px; padding: 0 9px; font-size: 10px; }
.system-button:disabled { opacity: 0.42; cursor: not-allowed; }

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--ccb-border);
}
.admin-tab {
  min-height: 33px;
  padding: 0 15px;
  color: #606b7a;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.admin-tab:hover { color: var(--ccb-primary); background: #f7f7fc; }
.admin-tab.active { color: #fff; background: var(--ccb-primary); }

.filter-card,
.admin-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin: 14px 20px 16px;
  padding: 13px;
  background: #fbfcfe;
  border: 1px solid var(--ccb-border);
  border-radius: 7px;
}
.filter-field { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
.filter-field.grow { min-width: 0; }
.filter-field label,
.form-field label { color: #697384; font-size: 11px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.filter-submit { display: flex; gap: 7px; }
.filter-submit .system-button { min-width: 66px; }

.system-input,
.system-select,
.system-textarea {
  width: 100%;
  min-height: 35px;
  padding: 0 10px;
  color: var(--ccb-text);
  background: #fff;
  border: 1px solid var(--ccb-border-strong);
  border-radius: 5px;
  font-size: 12px;
}
.system-select { cursor: pointer; }
.system-textarea { min-height: 82px; padding-top: 9px; resize: vertical; line-height: 1.55; }
.system-input::placeholder,
.system-textarea::placeholder { color: #adb5c1; }
.system-input:focus,
.system-select:focus,
.system-textarea:focus { border-color: var(--ccb-primary); outline: 0; box-shadow: 0 0 0 3px rgba(91, 85, 214, 0.09); }

.admin-table-card { min-width: 0; }
.table-card { overflow: hidden; background: #fff; border: 0; border-radius: 0; }
.table-scroll { overflow-x: auto; }
.system-table { width: 100%; border-collapse: collapse; color: var(--ccb-text); font-size: 12px; }
.system-table th {
  height: 44px;
  padding: 0 14px;
  color: #697383;
  background: #fff;
  border-top: 1px solid var(--ccb-border);
  border-bottom: 1px solid var(--ccb-border);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-align: left;
  white-space: nowrap;
}
.system-table td { min-height: 52px; padding: 10px 14px; border-bottom: 1px solid #eef0f4; vertical-align: middle; }
.system-table tbody tr:last-child td { border-bottom: 0; }
.system-table tbody tr:hover { background: #fafaff; }
.table-user { display: flex; align-items: center; gap: 10px; min-width: 145px; }
.table-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  color: #fff;
  background: #b8bdc7;
  border-radius: 50%;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
}
.table-user strong { display: block; font-size: 12px; font-weight: 600; }
.table-user small { display: block; margin-top: 3px; color: var(--ccb-muted); font-size: 9px; }
.menu-code { color: #8490a0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.status-pill,
.type-pill,
.scope-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 4px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.status-pill.on { color: #259554; background: #eaf8f0; }
.status-pill.off { color: #db5261; background: #fff0f2; }
.type-pill.dir { color: #665fd4; background: #f0efff; }
.type-pill.page { color: #3b78c4; background: #edf5ff; }
.type-pill.button { color: #c36d25; background: #fff4e9; }
.scope-pill { color: #596474; background: #f0f2f5; }
.lock-tag { padding: 3px 6px; color: #b16b22; background: #fff3df; border-radius: 4px; font-size: 9px; font-weight: 600; white-space: nowrap; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.user-table .row-actions .system-button,
.menu-tree-table .row-actions .system-button { min-height: 24px; padding: 0 4px; color: #5267e8; border: 0; background: transparent; font-size: 10px; }
.user-table .row-actions .system-button:hover,
.menu-tree-table .row-actions .system-button:hover { color: var(--ccb-primary-deep); background: transparent; text-decoration: underline; }
.user-table .row-actions .system-button.danger,
.menu-tree-table .row-actions .system-button.danger { color: var(--ccb-danger); background: transparent; }
.table-empty { padding: 54px 20px; color: var(--ccb-muted); text-align: center; font-size: 12px; }
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 9px 16px;
  color: #778292;
  background: #fff;
  border-top: 1px solid var(--ccb-border);
  font-size: 10px;
}
.table-footer-actions { display: flex; align-items: center; gap: 6px; }
.admin-pagination .system-button { min-width: 64px; }
.page-current { display: grid; place-items: center; width: 27px; height: 27px; color: #fff; background: var(--ccb-primary); border-radius: 4px; font-size: 10px; }
.loading-block { display: grid; place-items: center; min-height: 300px; color: var(--ccb-muted); font-size: 12px; }
.loading-block.compact { min-height: 140px; }
.loading-block span { width: 22px; height: 22px; margin-bottom: 10px; border: 2px solid rgba(91, 85, 214, 0.15); border-top-color: var(--ccb-primary); border-radius: 50%; animation: spin 0.8s linear infinite; }

.role-page-surface { padding-bottom: 20px; }
.role-layout { display: grid; grid-template-columns: minmax(235px, 0.3fr) minmax(0, 1fr); gap: 20px; padding: 0 20px; }
.role-list-card,
.role-detail-card { min-width: 0; background: #fff; border: 1px solid var(--ccb-border); border-radius: 7px; }
.role-list-card { padding: 0 12px 12px; }
.role-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; border-bottom: 1px solid var(--ccb-border); }
.role-list-head > div { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.role-list-head h2 { margin: 0; font-size: 13px; font-weight: 700; white-space: nowrap; }
.role-list-head span { color: var(--ccb-muted); font-size: 10px; white-space: nowrap; }
.role-list { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; }
.role-item {
  width: 100%;
  padding: 12px 13px;
  color: var(--ccb-text);
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.role-item:hover { background: #fafaff; border-color: #e3e0ff; }
.role-item.active { background: linear-gradient(105deg, #f2f1ff, #f8f7ff); border-color: #d8d5ff; box-shadow: inset 3px 0 0 var(--ccb-primary); }
.role-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.role-item strong { font-size: 12px; font-weight: 650; }
.role-item-code { display: block; margin-top: 5px; color: #818b99; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.role-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; color: #8c96a4; font-size: 9px; }
.role-meta span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-detail-card { min-height: 560px; padding: 0 20px 20px; }
.role-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 63px; border-bottom: 1px solid var(--ccb-border); }
.role-detail-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.role-detail-title h2 { margin: 0; font-size: 15px; font-weight: 700; }
.role-code { display: inline-block; padding: 3px 7px; color: #7e8795; background: #f3f4f7; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.role-warning { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 12px 13px; color: #8b671e; background: #fff8e7; border: 1px solid #f3dc9d; border-radius: 5px; font-size: 11px; line-height: 1.6; }
.role-warning strong { display: grid; place-items: center; width: 16px; height: 16px; flex: 0 0 auto; color: #8c671c; border: 1px solid #b68d35; border-radius: 50%; font-size: 10px; }
.role-detail-tabs { display: flex; align-items: center; gap: 24px; height: 48px; border-bottom: 1px solid var(--ccb-border); }
.role-detail-tab { position: relative; align-self: stretch; padding: 0; color: #697384; border: 0; background: transparent; font-size: 12px; cursor: pointer; }
.role-detail-tab.active { color: var(--ccb-primary); font-weight: 700; }
.role-detail-tab.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--ccb-primary); }
.role-tab-panel { padding-top: 16px; }
.role-description { margin: 0 0 14px; color: #667181; font-size: 12px; line-height: 1.7; }
.role-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.role-fact { min-height: 112px; padding: 15px; background: #f7f8fb; border: 1px solid #eceef3; border-radius: 6px; }
.role-fact span { display: block; color: #8993a1; font-size: 10px; }
.role-fact strong { display: block; margin-top: 8px; color: var(--ccb-text); font-size: 14px; font-weight: 650; }
.role-fact small { display: block; margin-top: 8px; color: #9ba4b0; font-size: 9px; line-height: 1.5; }
.permission-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.permission-head h3 { margin: 0; font-size: 13px; }
.permission-head p { margin: 4px 0 0; color: var(--ccb-muted); font-size: 10px; }
.permission-tools { display: flex; gap: 6px; }
.permission-tree { padding: 9px; background: #f8f9fb; border: 1px solid var(--ccb-border); border-radius: 6px; }
.permission-node + .permission-node { margin-top: 4px; }
.permission-row { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 6px 9px; background: #fff; border: 1px solid #eef0f4; border-radius: 5px; }
.permission-row:hover { border-color: #dfe1ee; }
.permission-row input { width: 14px; height: 14px; accent-color: var(--ccb-primary); }
.permission-row-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.permission-row-label strong { font-size: 11px; }
.permission-row-label code { color: #8993a1; font-size: 9px; }
.permission-children { display: grid; gap: 4px; margin: 4px 0 0 25px; padding-left: 11px; border-left: 1px dashed #d9dde5; }
.permission-notice { margin-top: 2px; padding: 13px; color: #78642d; background: #fff9e9; border: 1px solid #f1dfad; border-radius: 5px; font-size: 11px; line-height: 1.6; }

.menu-table-card .system-table th { border-top: 0; }
.menu-tree-table { min-width: 950px; }
.menu-tree-table td:first-child { min-width: 265px; }
.menu-name-cell { display: flex; align-items: center; gap: 9px; }
.menu-indent { display: inline-block; flex: 0 0 auto; height: 1px; border-left: 1px dashed #cbd0da; }
.menu-indent.depth-0 { width: 0; margin-left: 0; border-left: 0; }
.menu-indent.depth-1 { width: 10px; margin-left: 14px; }
.menu-indent.depth-2 { width: 10px; margin-left: 28px; }
.menu-indent.depth-3 { width: 10px; margin-left: 42px; }
.menu-indent.depth-4 { width: 10px; margin-left: 56px; }
.menu-indent.depth-5 { width: 10px; margin-left: 70px; }
.menu-indent.depth-6 { width: 10px; margin-left: 84px; }
.menu-indent.depth-7 { width: 10px; margin-left: 98px; }
.menu-indent.depth-8 { width: 10px; margin-left: 112px; }
.menu-icon-box { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 auto; color: #5b6370; background: #f4f5f8; border: 1px solid #e4e6eb; border-radius: 5px; font-size: 10px; }

.system-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  color: var(--ccb-text);
  background: #fff;
  border: 1px solid var(--ccb-border-strong);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(27, 34, 49, 0.22);
  overflow: auto;
}
.system-dialog.wide { width: min(760px, calc(100vw - 28px)); }
.system-dialog::backdrop { background: rgba(24, 29, 40, 0.45); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px 15px; border-bottom: 1px solid var(--ccb-border); }
.dialog-head .eyebrow { margin-bottom: 5px; color: var(--ccb-primary); font-size: 8px; letter-spacing: 0.13em; }
.dialog-head h2 { margin: 0; font-family: var(--font-body); font-size: 18px; font-weight: 700; }
.dialog-head p { margin: 5px 0 0; color: var(--ccb-muted); font-size: 10px; line-height: 1.55; }
.dialog-close { display: grid; place-items: center; width: 29px; height: 29px; color: #6d7786; border: 1px solid var(--ccb-border); border-radius: 5px; background: #fff; font-size: 16px; cursor: pointer; }
.dialog-close:hover { color: var(--ccb-danger); border-color: rgba(227, 77, 89, 0.35); }
.dialog-body { padding: 18px 22px 21px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field .system-input,
.form-field .system-select,
.form-field .system-textarea { min-height: 39px; font-size: 12px; }
.form-field .system-textarea { min-height: 92px; }
.form-hint { margin: 4px 0 0; color: var(--ccb-muted); font-size: 9px; line-height: 1.5; }
.checkbox-field { display: flex; align-items: center; gap: 8px; min-height: 39px; color: #5e6877; font-size: 11px; }
.checkbox-field input { width: 14px; height: 14px; accent-color: var(--ccb-primary); }
.dialog-error { min-height: 18px; margin-top: 10px; color: #b52c3a; font-size: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 15px; }

.app-shell.sidebar-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 28;
  background: rgba(24, 29, 40, 0.36);
}

@keyframes ccb-page-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1080px) {
  .admin-filter { grid-template-columns: repeat(2, minmax(150px, 1fr)) auto; }
  .role-layout { grid-template-columns: minmax(210px, 0.34fr) minmax(0, 1fr); }
  .role-facts { grid-template-columns: 1fr; }
  .role-fact { min-height: 88px; }
}

@media (max-width: 960px) {
  .ccb-sidebar {
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 16px 0 45px rgba(25, 32, 46, 0.14);
  }
  .app-shell.sidebar-open .ccb-sidebar { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .ccb-mobile-menu { display: grid; }
  .ccb-topbar { padding: 0 16px; }
  .ccb-breadcrumb { padding: 0 16px; }
  .workspace { padding: 16px; }
  .admin-slot-card { grid-column: 1 / -1; }
  .system-shell { padding: 12px 16px 22px; }
  .role-layout { grid-template-columns: 1fr; }
  .role-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-detail-card { min-height: 0; }
}

@media (max-width: 760px) {
  .ccb-topbar { height: 58px; gap: 10px; }
  .ccb-page-heading p { display: none; }
  .ccb-page-heading h1 { font-size: 16px; }
  .ccb-top-actions .connection-chip { display: none; }
  .ccb-service-state { display: none; }
  .ccb-breadcrumb { height: 42px; }
  .workspace { gap: 12px; padding: 12px 10px 24px; }
  .system-shell { padding: 10px 10px 20px; }
  .admin-page-head,
  .system-hero { align-items: flex-start; flex-direction: column; gap: 12px; padding: 16px; }
  .system-actions { width: 100%; justify-content: flex-start; }
  .admin-tabs { padding: 11px 16px; }
  .admin-filter { grid-template-columns: 1fr 1fr; margin: 12px 16px 14px; }
  .filter-field { grid-template-columns: 1fr; gap: 5px; }
  .filter-submit { grid-column: 1 / -1; }
  .filter-submit .system-button { flex: 1; }
  .table-footer { align-items: flex-start; flex-direction: column; }
  .user-table,
  .user-table tbody,
  .user-table tr,
  .user-table td { display: block; width: 100%; }
  .user-table thead { display: none; }
  .user-table tbody { display: grid; gap: 10px; padding: 10px; }
  .user-table tr { overflow: hidden; background: #fff; border: 1px solid var(--ccb-border); border-radius: 7px; }
  .user-table tbody tr:hover { background: #fff; }
  .user-table td { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; padding: 8px 11px; border-bottom: 1px solid #f0f2f5; text-align: right; }
  .user-table td:first-child { display: block; padding: 11px; text-align: left; background: #fafbfc; }
  .user-table td::before { content: attr(data-label); flex: 0 0 auto; color: var(--ccb-muted); font-size: 10px; font-weight: 600; }
  .user-table td:first-child::before { display: none; }
  .user-table td:last-child { border-bottom: 0; }
  .user-table .row-actions { justify-content: flex-end; }
  .user-table td[colspan] { display: block; text-align: center; }
  .user-table td[colspan]::before { display: none; }
  .role-layout { padding: 0 16px; }
  .role-list { grid-template-columns: 1fr; }
  .role-detail-card { padding: 0 15px 15px; }
  .role-detail-head { align-items: flex-start; flex-direction: column; gap: 10px; padding: 13px 0; }
  .role-detail-head .system-actions { width: auto; }
  .role-detail-tabs { gap: 20px; }
  .role-facts { grid-template-columns: 1fr; }
  .permission-head { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .system-dialog { max-height: calc(100vh - 18px); }
}

@media (max-width: 520px) {
  .ccb-top-actions { gap: 6px; }
  .ccb-top-button { padding: 0 9px; font-size: 10px; }
  .admin-filter { grid-template-columns: 1fr; }
  .filter-submit { grid-column: auto; }
  .admin-tabs { gap: 2px; padding: 10px 12px; }
  .admin-tab { flex: 1; padding: 0 8px; }
  .system-hero h1 { font-size: 18px; }
  .role-detail-tabs { gap: 16px; }
  .role-detail-title { flex-wrap: wrap; }
  .system-dialog { width: calc(100vw - 18px); }
  .dialog-head,
  .dialog-body { padding-right: 16px; padding-left: 16px; }
}
